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

Cost: Difference between revisions

From ModEnc
Jump to navigation Jump to search
m Added to category - reads
Testid123 (talk | contribs)
mNo edit summary
 
(12 intermediate revisions by 7 users not shown)
Line 1: Line 1:
The cost of a unit is the amount of credits spent on an object when it is built/trained and half of which was recovered when an object was sold in the [[Service Depot]] (before YR 1.001) or the [[Grinder]] when [[Soylent|Soylent=]] was omitted. If there are two or more objects of the same TechLevel, the cheaper one gets priority on the sidebar. It is set by the Cost= flag (=P).
{{flag
|name={{PAGENAME}}
|files={{Categ|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}}
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).
 
{{f|Cost|link}} is sometimes used when calculating the [[Soylent#Default|refund amount]] a player gets when selling or grinding a unit or building, depending on the circumstances (see {{f|Soylent|link}} for details).
 
{{f|Cost|link}} also determines, in part, the amount of time the object will take to construct. [{{f|General|link}}]{{arr|r}}{{f|BuildSpeed|link}} determines the time, in minutes, to construct 1000 credits' worth of an object, so an object with {{f|Cost|2000|link}} will take ( 2 * {{f|BuildSpeed|link}} ) minutes to construct.
Any multipliers to cost have ''no effect'' on construction time - construction time is always determined by the base {{f|Cost|link}} of an object.
 
{{f|Cost|link}} 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 {{f|TechLevel|link}}, the cheaper one(s) will appear earlier in the list.
 
It is possible to set {{f|Cost|link}} to a negative value so that the player will actually receive credits during the object's construction. However, setting negative {{f|Cost|link}} 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 {{f|Cost|link}} value, and negative {{f|Cost|link}} values are converted to zero for this calculation.
 
A [[BuildingType]] that has a {{f|FreeUnit|link}} with a higher {{f|Cost|link}} than the [[BuildingType]]'s own {{f|Cost|link}} will actually cost the same as the {{f|FreeUnit|link}} in-game, however the base cost is unchanged as far as other values, such as {{f|Soylent|link}} and build time, are concerned.
 
{{Bugs}}
 
1.1 If you set any unit to have '''TechLevel=-1''' then set a strange price such as '''Cost=-999999999''' or '''Cost=999999999'''
 
1.2 Then set '''AllowedToStartInMultiplayer=yes''' to those units
 
1.3 You and the AI ​​must all have the same country.
 
1.4. When starting the game, you will find that there are no starting units even though you have specified them in the '''Starting Units''' section.


[[Category:INI_Flags]]
[[Category:INI_Flags]]
[[Category:rules(md).ini Flags]]
[[Category:InfantryTypes Flags]]
[[Category:VehicleTypes Flags]]
[[Category:AircraftTypes Flags]]
[[Category:BuildingTypes Flags]]
==See Also==
*{{f|FactoryPlant|link}}

Latest revision as of 08:00, 3 August 2024

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).

Cost is sometimes used when calculating the refund amount a player gets when selling or grinding a unit or building, depending on the circumstances (see Soylent for details).

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

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

It is possible to set Cost to a negative value so that the player will actually receive credits during the object's construction. However, setting negative 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 Cost value, and negative Cost values are converted to zero for this calculation.

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

Bugs/Side-Effects/Unexpected Limitations

1.1 If you set any unit to have TechLevel=-1 then set a strange price such as Cost=-999999999 or Cost=999999999

1.2 Then set AllowedToStartInMultiplayer=yes to those units

1.3 You and the AI ​​must all have the same country.

1.4. When starting the game, you will find that there are no starting units even though you have specified them in the Starting Units section.

See Also