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

Difference between revisions of "Cost"

From ModEnc
Jump to: navigation, search
(unsigned to signed int, note about negative values)
(tidied code, minor imporvements to wording and added note on FreeUnit and see also section.)
Line 1: Line 1:
{{flag|name=Cost|files=rules(md).ini|values={{Values|signed integers}}|default=0|types=All Types|ra=yes|cs=yes|am=yes|ts=yes|fs=yes|ets=yes|ra2=yes|yr=yes|rp=yes}}
+
{{flag
 +
|name={{PAGENAME}}
 +
|files=rules(md).ini
 +
|values={{Values|signed integers}}
 +
|default=0
 +
|types={{CatAllTypes}}
 +
|ra=yes
 +
|cs=yes
 +
|am=yes
 +
|ts=yes
 +
|fs=yes
 +
|ets=yes
 +
|ra2=yes
 +
|yr=yes
 +
|rp=yes
 +
}}
 
{{meanings|Multiplier}}
 
{{meanings|Multiplier}}
This flag sets the base amount of credits needed to purchase this object, before any multipliers are applied (such as Country bonuses or the Industrial Plant).
+
Sets the base amount of credits needed to purchase this object, before any multipliers are applied (such as Country bonuses or the [[FactoryPlant|Industrial Plant]]).
 
The final cost (after any multipliers have been applied) is the amount of credits that will be deducted from the constructing player during the course of construction (when the unit is, say, 10% constructed, 10% of the final cost will have been deducted from the player. When the unit is 50% constructed, 50% of the final cost will have been deducted, and so on).
 
The final cost (after any multipliers have been applied) is the amount of credits that will be deducted from the constructing player during the course of construction (when the unit is, say, 10% constructed, 10% of the final cost will have been deducted from the player. When the unit is 50% constructed, 50% of the final cost will have been deducted, and so on).
  
<tt>[[Cost]]</tt> also determines the default value of the <tt>[[Soylent]]=</tt> flag, as <tt>Soylent</tt> defaults to half the <tt>[[Cost]]=</tt>
+
{{TTL|Cost}} also determines the default value of the {{TTL|Soylent}} flag, as {{TTL|Soylent}} defaults to half the {{TTL|Cost}}.
(<tt>[[Soylent]]</tt> is the amount of credits refunded when the unit or building is sold or sent to a building with <tt>[[Grinding]]=yes</tt> set.)
 
  
<tt>[[Cost]]</tt> also determines, in part, the amount of time the object will take to construct. <tt>[[BuildSpeed]]</tt> determines the time, in minutes, to construct 1000 credits' worth of an object. So an object with a <tt>[[Cost]]=</tt> of 2000 credits will take ( 2 * <tt>[[BuildSpeed]]=</tt> ) minutes to construct.
+
{{TTL|Cost}} also determines, in part, the amount of time the object will take to construct. [{{TTL|General}}]{{arr|r}}{{TTL|BuildSpeed}} determines the time, in minutes, to construct 1000 credits' worth of an object, so an object with {{TTL|Cost|2000}} will take ( 2 * {{TTL|BuildSpeed}} ) minutes to construct.
Any multipliers to cost have ''no effect'' on construction time - construction time is always determined by the base <tt>[[Cost]]=</tt> of an object.
+
Any multipliers to cost have ''no effect'' on construction time - construction time is always determined by the base {{TTL|Cost}} of an object.
  
<tt>[[Cost]]</tt> also plays a part in determining [[Cameo_Sorting|the order objects' build icons will appear in the sidebar]].
+
{{TTL|Cost}} also determines, in part, [[Cameo_Sorting|the order objects' build icons will appear on the sidebar]] - if there are two or more objects of the same {{TTL|TechLevel}}, the cheaper one(s) will appear earlier in the list.
If there are two or more objects of the same TechLevel, the cheaper one(s) will appear earlier on the sidebar.
 
  
It is possible to set [[Cost]] to a negative value, so the player receives credits during the building process. Setting negative values to multiplayer start units has strange effects, because the game converts the values to 0 and the player will have an incredible amount of starting units.
+
It is possible to set {{TTL|Cost}} to a negative value so that the player will actually receive credits during the object's construction. However, setting negative {{TTL|Cost}} values on multiplayer start units causes you to start with a very high number of units, because the number of starting units is based, in part, on their {{TTL|Cost}} value, and negative {{TTL|Cost}} values are converted to zero for this calculation.
 +
 
 +
A [[BuildingType]] that has a {{TTL|FreeUnit}} with a higher {{TTL|Cost}} than the [[BuildingType]]'s own {{TTL|Cost}} will actually cost the same as the {{TTL|FreeUnit}} in-game, however the base cost is unchanged as far as other values, such as {{TTL|Soylent}} and build time, are concerned.
  
 
[[Category:INI_Flags]]
 
[[Category:INI_Flags]]
Line 21: Line 36:
 
[[Category:AircraftTypes Flags]]
 
[[Category:AircraftTypes Flags]]
 
[[Category:BuildingTypes Flags]]
 
[[Category:BuildingTypes Flags]]
 +
 +
==See Also==
 +
*{{TTL|FactoryPlant}}

Revision as of 22:47, 28 April 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: Cost
File(s): rules(md).ini
Values: Signed integers: All whole numbers from -2147483648 to 2147483647; in rare cases, only from -32768 to 32767.
Default: 0
Applicable to: TechnoTypes:

AircraftTypes, BuildingTypes, InfantryTypes and VehicleTypes



This is the primary usage of Cost; for other meanings, see Cost (Multiplier).

Sets the base amount of credits needed to purchase this object, before any multipliers are applied (such as Country bonuses or the Industrial Plant). The final cost (after any multipliers have been applied) is the amount of credits that will be deducted from the constructing player during the course of construction (when the unit is, say, 10% constructed, 10% of the final cost will have been deducted from the player. When the unit is 50% constructed, 50% of the final cost will have been deducted, and so on).

Template:TTL also determines the default value of the Template:TTL flag, as Template:TTL defaults to half the Template:TTL.

Template:TTL also determines, in part, the amount of time the object will take to construct. [[[:Template:TTL]]]→Template:TTL determines the time, in minutes, to construct 1000 credits' worth of an object, so an object with Template:TTL will take ( 2 * Template:TTL ) minutes to construct. Any multipliers to cost have no effect on construction time - construction time is always determined by the base Template:TTL of an object.

Template:TTL also determines, in part, the order objects' build icons will appear on the sidebar - if there are two or more objects of the same Template:TTL, the cheaper one(s) will appear earlier in the list.

It is possible to set Template:TTL to a negative value so that the player will actually receive credits during the object's construction. However, setting negative Template:TTL values on multiplayer start units causes you to start with a very high number of units, because the number of starting units is based, in part, on their Template:TTL value, and negative Template:TTL values are converted to zero for this calculation.

A BuildingType that has a Template:TTL with a higher Template:TTL than the BuildingType's own Template:TTL will actually cost the same as the Template:TTL in-game, however the base cost is unchanged as far as other values, such as Template:TTL and build time, are concerned.

See Also