Buildings that produce cash
Pays a structure's owner a fixed sum at a fixed interval, or takes it when the sum is negative, and pays a bonus to a house that captures the structure from a neutral house.
A BuildingType can pay its owner credits without harvesting anything. It has two independent payments, and a type may set either one or both:
- The recurring payment:
ProduceCashAmountcredits everyProduceCashDelayframes, paid to whichever house owns the structure. - The startup bonus:
ProduceCashStartupcredits, paid to the house that captures the structure from a neutral house.
On this page, a neutral house is one whose country sets MultiplayPassive=yes.
[OILDERRICK] ; an example BuildingTypeCapturable=yesProduceCashStartup=1000 ; credits paid on capture from a neutral houseProduceCashStartupOneTime=yes ; pay that bonus only on the first such captureProduceCashAmount=100 ; credits paid each interval; a negative amount is taken insteadProduceCashDelay=750 ; frames between paymentsProduceCashBudget=5000 ; total the recurring payment can moveProduceCashResetOnCapture=no ; yes gives each new owner a fresh budgetThis structure pays 1,000 credits the first time a house captures it from a neutral house. From then on it pays its owner 100 credits every 750 frames, and stops after 50 payments have used up its 5,000-credit budget.
Payments go straight to the house’s credits. They do not pass through a refinery, do not count as harvested, and are not limited by Storage, so a house at its silo limit still receives every credit.
The interval
Section titled “The interval”A structure starts producing when it opens for business. A structure opens:
- when its construction finishes;
- when a structure the map places is revealed. For a computer-owned structure, or in any game other than a campaign mission, that happens when the structure is placed;
- again on every capture.
A structure first opens at the same moment its animations start and its other special abilities switch on.
In a campaign mission, a structure the player owns that starts under shroud produces nothing until the shroud over it lifts.
When the structure opens, it waits ProduceCashDelay frames and makes its first payment. It then waits the same delay before each later payment. Each structure keeps its own count, so two identical structures built a few seconds apart pay a few seconds apart.
The structure makes no recurring payment while any of the following holds:
ProduceCashDelayis zero or negative;ProduceCashAmountis zero;- the structure is being sold, counted from the moment the sale is ordered;
- its owner is a neutral house, so a neutral structure earns nothing until someone captures it;
- it has spent its budget;
- its type is
Powered=yesand it lacks power.
Where the money goes
Section titled “Where the money goes”A positive ProduceCashAmount adds that many credits to the owner. A negative amount takes that many from the owner. Credits are taken first. If they run out, the house’s stored Tiberium is sold at its credit value to cover the rest.
The owner never goes into debt. A house with no credits and no Tiberium left loses nothing.
The budget
Section titled “The budget”ProduceCashBudget caps the total that one structure’s recurring payment can move. A budget of zero or less sets no limit.
Payments and drains both count against the budget by their size, so the budget limits a drain the same way it limits a payment. The budget counts the full amount due each interval, even when a drain finds the house with nothing left to take. The startup bonus does not count against it.
The final installment is reduced to what remains of the budget. For example, ProduceCashBudget=250 with ProduceCashAmount=100 pays 100, 100 and then 50.
A structure that has spent its budget stops producing and stays on the map.
A structure receives its budget when it first opens. ProduceCashResetOnCapture=yes refills it on every capture, which revives a structure that had spent it. The refill is not limited to captures from a neutral house, so two opposing players who keep recapturing a spent structure refill it each time.
The power test applies only to a type that sets Powered=yes. Such a structure produces nothing while it is switched off, stunned by an EM pulse, or its house is short of power. A Powered=no structure keeps producing in all three cases.
While a Powered=yes structure is stopped this way, its interval pauses. When it can produce again, the interval resumes with the frames it had left.
Capture
Section titled “Capture”Engineers and capture owns everything else that changing hands does to a structure. For cash production, a capture does three things:
- The interval restarts from the full
ProduceCashDelayfor the new owner, whether or notProduceCashResetOnCapturerefills the budget. - The budget is refilled when
ProduceCashResetOnCapture=yes, and otherwise carries over unchanged. - The startup bonus may be paid, under the conditions below. Capturing a cash structure from another player transfers its recurring payment and pays no bonus.
The capturing house receives the startup bonus only when all of the following hold:
- the house the structure came from is neutral;
ProduceCashStartupis above zero;- the capturing house is not itself neutral;
- if the type sets
ProduceCashStartupOneTime=yes, this structure has never paid the bonus before.
Without ProduceCashStartupOneTime=yes, a structure pays the bonus again each time it is recaptured from a neutral house.
Related settings
9 of 9
| Key | Description | Value | When omitted |
|---|---|---|---|
CapturableBuildingType | Lets an engineer capture the structure, and shows the enter cursor over it. | boolean | no |
MultiplayPassiveHouseType | Keeps the country's computer houses from building or choosing attacks and, in skirmish and multiplayer games, takes its houses out of the contest. | boolean | no |
PoweredBuildingType | Whether the structure stops working while its house cannot meet its drain. | boolean | no |
ProduceCashAmountBuildingType | The credits a structure pays its owner each interval, taken from them instead when the figure is negative. | integer | 0 |
ProduceCashBudgetBuildingType | The total one structure produces, counted without regard to sign, before it stops. | integer | 0 |
ProduceCashDelayBuildingType | The frames between one structure's cash payments, and the switch that turns them on at all. | integer | 0 |
ProduceCashResetOnCaptureBuildingType | Hands each new owner of a cash-producing structure a fresh budget, reviving one that had already spent it. | boolean | no |
ProduceCashStartupBuildingType | The credits paid to a house that captures the structure from a neutral house. | integer | 0 |
ProduceCashStartupOneTimeBuildingType | Limits a structure's capture bonus to the first time it is paid, however often the structure changes hands afterward. | boolean | no |
No keys match the current filters.
History
- Added0.2.0In development