Skip to content

Cost

Changed in 0.2.0

The credit price of one object of this type, or the multiplier a country or a difficulty applies to every price it pays.

Object price

Specification — Object price
Applies to
AircraftTypeBuildingTypeInfantryTypeUnitType
File
rules.ini
Section
[<ObjectType ID>]
Value
integer
When omitted
0

The credits charged to produce one object of the type, before the owner’s country and difficulty multipliers scale it. Other figures are worked out from this price, among them the base build time, the experience a kill is worth, the score a kill earns, and the price of one repair step.

Repairing an aircraft uses its full written price. An aircraft’s price also lowers the repair price of a structure that comes with it, either as the structure’s FreeUnit= or through the PadAircraft= list. What a structure gives away gives the exact deduction and its effect on the structure’s purchase price.

Country price multiplier

Specification — Country price multiplier
Applies to
HouseType
File
rules.ini
Section
[<ObjectType ID>]
Value
floating point
When omitted
1.0

A house of this country pays each object’s Cost= multiplied by this value, so a value above 1 makes everything it builds more expensive. Build times do not change, because they come from the unmultiplied Cost=.

rules.ini
[NOD]
Cost=1.25 ; example: NOD pays 25% more for everything it builds

The multiplied price also applies where the game values an object the house owns:

  • Selling refunds the multiplied price, reduced by RefundPercent= when a human plays the house. A captured object is valued at its new owner’s multiplier.
  • A house that destroys or captures one of its objects adds the multiplied price to its score.
  • A structure’s survivor count is worked out from the multiplied price, so a higher value gives more survivors, still no more than 5.

Repairs do not use the multiplier.

Outside a campaign game, the house multiplies this value by the difficulty section’s Cost= once, when it is given its difficulty slot. A campaign game leaves the country’s value out, so it affects skirmish and multiplayer games only.

Difficulty price multiplier

Specification — Difficulty price multiplier
Applies to
difficulty settings
File
rules.ini
Section
[<Difficulty ID>]
Value
floating point
When omitted
1The difficulty block is re-read from fixed defaults whenever its section is present, so a later file that contains the section without this key restores 1 rather than keeping the earlier value.

[Easy], [Normal] and [Difficult] each set a price multiplier for the houses in their difficulty slot. A house pays about each object’s Cost= times this multiplier, so a value above 1 makes everything it buys more expensive. The price of a structure that comes with a unit or aircraft is multiplied in parts and can differ from that product. A factory charges that multiplied price over the production steps, and a computer house compares it with its credits when it decides what it can afford to build.

rules.ini
[Difficult]
Cost=1.2

The multiplier does not change build time. BuildTime= in the same section sets that.

Outside a campaign, the house also applies its country’s multiplier. What a house pays shows how the two combine.

An object’s Cost= is the base for most credit amounts in the game: what a factory charges, what selling refunds, the score a kill or capture adds, and the experience a kill awards. Points= affects none of these.

A structure with a FreeUnit=, and the pad dock, have a second, reduced price: their Cost= minus one or two deductions.

  • A FreeUnit= deducts that unit’s Cost=.
  • The pad dock deducts the average Cost= of the whole PadAircraft= list, rounded down. The pad dock is the first structure type in the Dock= list of the first PadAircraft= entry. No structure is the pad dock when SeparateAircraft=yes is set, and a structure whose FreeUnit= is an aircraft never is.

One pad aircraft goes to each HoverPad=yes structure, as PadAircraft= explains. A pad dock that is not one of them gets the reduced price and gives no aircraft.

A structure with a FreeUnit= never has a reduced price below 0. A pad dock with no FreeUnit= goes below 0 when its Cost= is below its deduction.

The full price adds the deductions back. A factory charges it, selling refunds it, and a kill scores and awards experience from it, so these all work from the written Cost=. A refinery with Cost=2000 that gives a 1400-credit harvester still costs 2000 to buy and is still worth 2000 when destroyed.

The exception is a structure with a FreeUnit= whose deductions exceed its Cost=. Its reduced price stops at 0, so its full price is the total of the deductions, which is more than its Cost=.

The reduced price is used in two places:

  • Repair. Each repair step is priced from it, so a structure that comes with something costs less to repair than its Cost= suggests. A pad dock with a negative reduced price pays 1 credit per step.
  • Anger. Damage to the structure raises its owner’s anger toward the attacker in proportion to the reduced price. Hitting a refinery that gives a harvester therefore raises less anger than its Cost= suggests, and hitting a pad dock with a negative reduced price lowers anger.

The country and difficulty forms of this key are price multipliers. A country sets one and a difficulty sets the other. A house multiplies the price of every object it buys by:

  • In a skirmish or a multiplayer match, its country’s multiplier times its difficulty’s.
  • In a single-player campaign, its difficulty’s alone. The country’s multiplier has no effect in a campaign.

Under a price multiplier, the reduced price and each deduction are multiplied separately, and each drops any fraction. The full price of a structure with a reduced price can therefore differ by a few credits from Cost= times the multiplier.

See also — repair, difficulty

History

  1. Changed0.2.0In development

    Read the overridden type values from the rules