ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Difference between revisions of "FreeUnit"

From ModEnc
Jump to: navigation, search
m (Removing outdated categ usage)
(minor rewrite, removed info unrelated to FreeUnit)
Line 11: Line 11:
 
}}
 
}}
  
{{Tt|FreeUnit}}= is a building tag that takes a value from the [[VehicleTypes]] list to tell the game that this unit should appear beside the building when it is constructed.
+
Specifies the [[VehicleType]] that should appear beside this [[BuildingType]] when it is placed after being constructed by the player (the '''unit''' comes '''free''' with the building).
This logic is used for the Ore Refinery.
+
This logic is only used by the two Ore Refineries in the unmodded game.
  
You cannot have a building that costs less than the FreeUnit.
+
You cannot have a [[BuildingType]] that costs less than its {{TTL|FreeUnit}}.
If the {{TTL|Cost}} value of the FreeUnit is higher than the cost of the building, the cost of the building will be overridden to match the cost of the vehicle.<br>
+
If the {{TTL|Cost}} of the {{TTL|FreeUnit}} is higher than the {{TTL|Cost}} of the [[BuildingType]], then the price of the [[BuildingType]] will be overridden to match the {{TTL|Cost}} of the {{TTL|FreeUnit}}.<br>
Example:<br>
+
For example, if you have a [[BuildingType]] with {{TTL|Cost|500}} and its {{TTL|FreeUnit}} has {{TTL|Cost|2000}} then the [[BuildingType]] will actually cost 2000 in-game (although note that the construction speed of the [[BuildingType]] is not affected by this change in price).<br>
Building Cost=500<br>
 
FreeUnit Cost=2000<br>
 
The building will actually cost 2000 in-game (although the construction speed of the building is not affected).<br>
 
  
Selling the building will give you the normal refund amount (the FreeUnit cost is not taken into account), so you need to set the {{TTL|Soylent}} for the building manually.
+
If the [[BuildingType]] is sold then the {{TTL|FreeUnit}} {{TTL|Cost}} is not taken into account - the [[BuildingType]]'s {{TTL|Soylent}} is based on the {{TTL|Cost}} of the [[BuildingType]] only, so you need to set the {{TTL|Soylent}} for the [[BuildingType]] manually.
In the case of the Ore Refinery, {{TTL|Soylent}} is set to 300 because the Ore Refinery cost is 2000 and the FreeUnit cost is 1400 (by normal rules, you get 50% refund when you sell a building).<br>
+
In the case of the Ore Refinery, {{TTL|Soylent}} is set to 300 because the Ore Refinery has {{TTL|Cost|2000}} and its {{TTL|FreeUnit}} has {{TTL|Cost|1400}} (in the unmodded game, you get 50% refund when you sell a [[BuildingType]]).
  
 
== FreeUnit and Industrial Plant logic ==
 
== FreeUnit and Industrial Plant logic ==
  
As far as Industrial Plant logic is concerned, 'free units' are not actually free.
+
As far as [[FactoryPlant|Industrial Plant logic]] is concerned, 'free units' are not actually free.
In the case of the Ore Refinery (Cost=2000), the game thinks you are paying for a 1400 credit Ore Miner and a 600 credit Ore Refinery at the same time.
+
In the case of the Ore Refinery ({{TTL|Cost|2000}}), the game thinks you are paying for a 1400 credit ore miner and a 600 credit Ore Refinery at the same time.
Assuming the original Industrial Plant settings are used, Vehicle costs are reduced to 0.75 and building costs are not reduced.
+
Assuming the original [[FactoryPlant|Industrial Plant]] settings are used, [[VehicleType]] prices are reduced to 75% and [[BuildingType]] prices are not reduced.
Therefore the cost of the Ore Refinery would become:
+
Therefore the price of the Ore Refinery becomes:
 
  (0.75 x 1400) + 600 = 1650
 
  (0.75 x 1400) + 600 = 1650
  
If you changed the Industrial Plant so that building costs were reduced to 0.5 as well (or made a new {{TTL|FactoryPlant|yes}} building), then the cost of the Ore Refinery would become:
+
If you changed the [[FactoryPlant|Industrial Plant]] so that [[BuildingType]] prices were reduced to 50% as well (or made a new [[FactoryPlant|Industrial Plant]]), then the price of the Ore Refinery would become:
 
  (0.75 x 1400) + (0.5 x 600) = 1350
 
  (0.75 x 1400) + (0.5 x 600) = 1350
  
When changing bonuses in Yuri's Revenge, don't forget that the Allied Ore Processor gives 25% ore bonus, which is sort of equivalent to a FactoryPlant with 0.75 cost multipliers for Infantry, Vehicles, Aircraft and Buildings. Yuri's Cloning Vats give an equivalent cost multiplier of 0.5 to Infantry.
+
Note that multiple [[FactoryPlant|Industrial Plants]] stack their bonuses. For example, owning two [unmodded] [[FactoryPlant|Industrial Plants]] would cause the price of the Ore Refinery to become:
 
+
  (0.75 x (0.75 x 1400)) + 600 = 1387.5
Also note that multiple Industrial Plants and/or Cloning Vats stack their bonuses.
 
EG: Two Factory Plants for a Flak Track would result in:
 
  0.75 x 0.75 x 500 = 281.25
 
 
 
Similarly, the Ore Purifier bonus stacks so that building more ore purifiers results in more credits per bail returned by the ore miner.
 
  
 
[[Category:General_Editing_Information]]
 
[[Category:General_Editing_Information]]
 
[[Category:INI_Flags]]
 
[[Category:INI_Flags]]

Revision as of 21:43, 4 June 2008

Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: FreeUnit
File(s): rules(md).ini
Values: Strings: Normal text. (Limited to: VehicleTypes)
Applicable to: BuildingTypes


Specifies the VehicleType that should appear beside this BuildingType when it is placed after being constructed by the player (the unit comes free with the building). This logic is only used by the two Ore Refineries in the unmodded game.

You cannot have a BuildingType that costs less than its Template:TTL. If the Template:TTL of the Template:TTL is higher than the Template:TTL of the BuildingType, then the price of the BuildingType will be overridden to match the Template:TTL of the Template:TTL.
For example, if you have a BuildingType with Template:TTL and its Template:TTL has Template:TTL then the BuildingType will actually cost 2000 in-game (although note that the construction speed of the BuildingType is not affected by this change in price).

If the BuildingType is sold then the Template:TTL Template:TTL is not taken into account - the BuildingType's Template:TTL is based on the Template:TTL of the BuildingType only, so you need to set the Template:TTL for the BuildingType manually. In the case of the Ore Refinery, Template:TTL is set to 300 because the Ore Refinery has Template:TTL and its Template:TTL has Template:TTL (in the unmodded game, you get 50% refund when you sell a BuildingType).

FreeUnit and Industrial Plant logic

As far as Industrial Plant logic is concerned, 'free units' are not actually free. In the case of the Ore Refinery (Template:TTL), the game thinks you are paying for a 1400 credit ore miner and a 600 credit Ore Refinery at the same time. Assuming the original Industrial Plant settings are used, VehicleType prices are reduced to 75% and BuildingType prices are not reduced. Therefore the price of the Ore Refinery becomes:

(0.75 x 1400) + 600 = 1650

If you changed the Industrial Plant so that BuildingType prices were reduced to 50% as well (or made a new Industrial Plant), then the price of the Ore Refinery would become:

(0.75 x 1400) + (0.5 x 600) = 1350

Note that multiple Industrial Plants stack their bonuses. For example, owning two [unmodded] Industrial Plants would cause the price of the Ore Refinery to become:

(0.75 x (0.75 x 1400)) + 600 = 1387.5