Planetary production
Planetary production is what happens during one call to multiply(): food and population are checked, existing gold is converted, items are produced, taxes are collected, and revolt may occur. This page follows the classic GEPLANET.C calculation in order and notes ge-next changes to the calculations and reports. It does not run merely because a player visits or scans a planet. See Planetary update cycle for when plartia() schedules and repeats these passes, including ge-next timestamps and catch-up. For claiming and managing a colony, see Colonizing planets and Planet administration.
1. Food and population
Troops eat first. The required number of food cases is floor(troops / 100). If that exceeds current food stock, floor(troops / 8) perish. The game then subtracts food for the remaining troops, or sets food to zero if the remainder is insufficient. A troop force below 100 has a zero-case requirement, so this check neither feeds nor starves it.[1]
Men are checked against the food left after troops have eaten. If floor(men / 100) exceeds that stock, floor(men / 8) perish. A population below 100 likewise has no integer food requirement. Classic GE performs this starvation check but never subtracts food for surviving men, so food can support them repeatedly without being consumed.[2] ge-next adds the configurable MENEAT option, enabled in its stock settings: after the starvation check, surviving men consume one food case per 100, using integer division. See Classic bug: Men do not consume food.
2. Tax factor and existing gold
The production factor attributable to tax is 1 − tax rate / 120. At a rate of 0, this factor is 1; at 100, it is one sixth. This reduces output and effective stock maxima, not just the amount credited to the owner's tax bank.[3]
Next, the planet converts gold already in inventory to planetary cash at the configured base gold price, then clears that old gold stock. With the stock price of 1,000, ten stored gold add 10,000 to the planet's bank. Gold produced later in this pass is normally available for conversion on a later pass, not immediately.[4] Classic's unchecked multiplication can overflow near its numeric limit; ge-next caps the addition. See Gold and Cash.
3. Production, one item at a time
The game processes fourteen active item types in inventory order: men, missiles, torpedoes, ion cannons, flux pods, food, fighters, decoys, troops, zippers, jammers, mines, gold, and spies. For each item it calculates an output quantity, reduces planetary cash, decides whether a funded-production bonus applies, computes a new maximum, and updates stock. Men are processed first, so the increased population is used to calculate every later item's output.
Base output
The configured production rate is first divided by 10,000.[5] Using the current population, the owner's percentage allocation, and that rate, the unadjusted output is:
men × (allocation / 100) × (production rate / 10000) ÷ 6 ÷ 7
Equivalently, when allocation is entered as the integer percentage from 0 through 100:
men × allocation × production rate ÷ 42,000,000
These divisions are floating-point operations at this stage; the game truncates later when adding the produced amount to stock.[6] For example, 100,000 men, a 10% torpedo allocation, and the stock torpedo rate of 500 give about 11.9048 torpedoes before planetary modifiers.
Planet quality and tax
Poor, marginal, good, and very good each correspond to values 0, 1, 2, and 3. The quality factor is (environment + resources + 2) / 4, ranging from 0.5 for poor/poor to 2 for very-good/very-good.[7] The tax factor from step 2 is multiplied into that quality factor.[8]
A good/marginal planet has a quality factor of (2 + 1 + 2) / 4 = 1.25. With 10% tax, its combined quality-and-tax factor is 1.25 × (1 − 10 / 120) ≈ 1.14583.
Cash spent and funded bonus
Before producing each item, the bank keeps a condition-dependent fraction of its current cash. The retained fraction is 0.95 − (6 − environment − resources) / 10: 95% for very-good/very-good, 35% for poor/poor, and a ten-percentage-point step for each change in either rating. The new cash balance is truncated to a whole number after every item.[9]
If any cash remains after that item's deduction, its output factor is multiplied by 1.5. The same factor also raises that item's effective stock maximum. The check happens afresh for every item; a bank that reaches zero partway through the list gives no bonus to later items.[10] Cash is reduced for every item even when its production allocation is zero.
For example, the following balances result from a good/marginal planet beginning the item loop with 10,000 cash (65% retained per item) and a poor/marginal planet beginning with 5,000 (45% retained). The bonus applies to an item only when its balance in the relevant column is above zero.
| Item | Good/marginal cash after deduction | Poor/marginal cash after deduction |
|---|---|---|
| Men | 6,500 | 2,250 |
| Missiles | 4,225 | 1,012 |
| Torpedoes | 2,746 | 455 |
| Ion cannons | 1,784 | 204 |
| Flux pods | 1,159 | 91 |
| Food | 753 | 40 |
| Fighters | 489 | 18 |
| Decoys | 317 | 8 |
| Troops | 206 | 3 |
| Zippers | 133 | 1 |
| Jammers | 86 | 0 |
| Mines | 55 | 0 |
| Gold | 35 | 0 |
| Spies | 22 | 0 |
The first planet receives the bonus for all fourteen items; the second loses it beginning with jammers. Men need only one cash unit after the first deduction to receive the bonus, but one unit before that deduction is insufficient: it is truncated to zero for every planet quality. The minimum starting bank for the men bonus is 2 cash where 55%–95% is retained, or 3 cash where 35%–45% is retained. For the stock arithmetic, the following starting balances are the minimum that leave at least one cash unit after all fourteen deductions:
| Cash retained per item | Planet-quality combinations | Minimum starting cash |
|---|---|---|
| 95% | Very good / very good | 15 |
| 85% | Good / very good; very good / good | 37 |
| 75% | Very good / marginal; good / good; marginal / very good | 115 |
| 65% | Very good / poor; good / marginal; marginal / good; poor / very good | 865 |
| 55% | Good / poor; marginal / marginal; poor / good | 6,170 |
| 45% | Marginal / poor; poor / marginal | 106,012 |
| 35% | Poor / poor | 2,732,598 |
These are starting balances after the earlier conversion of stored gold. They do not mean that a colony must hold that much cash to produce anything; they are thresholds for keeping the 1.5 multiplier on every item through the end of this pass.
Add output and apply the maximum
The game multiplies base output by the quality, tax, and optional cash factors, truncates the produced quantity, and adds it to the existing stock.[11] In the 100,000-men torpedo example, 11.9048 × 1.14583 produces 13 whole torpedoes. With the 1.5 cash bonus it produces 20.
The same final factor scales the item's configured planetary maximum, which is also truncated to a whole number.[12] The stock torpedo maximum of 59,833 becomes 68,558 on that good/marginal, 10%-tax planet, or 102,837 with the cash bonus. A tax increase or depleted bank can therefore reduce the effective maximum below stock already held; an update may discard goods even when the production rate is zero.
Classic sends a maximum-stock report when the previous quantity is at or below the calculated maximum and the proposed quantity reaches or exceeds it. Equality is sufficient, so a planet sitting exactly at a maximum can send repeated notices even without new production.[13] The proposed quantity is then capped at the effective maximum and stored.[14] ge-next changed the notification condition so mere equality no longer repeats the notice; its catch-up passes also suppress mail until the final pass. See Classic bug: Disabled production repeats maximum-stock notices.
4. Taxes and revolt
After all items have been processed, the tax bank gains floor((tax rate / 1200) × current men), using the population after the men-production step.[15] At 10% tax and 100,000 men, this adds 833 credits to the tax bank. The planetary production bank and the owner's personal cash remain separate; see Taxes.
For a planet not already marked **Free**, the revolt-pressure value is men × (tax rate / 120) × 0.35. If that value is greater than the current troop count, that pass has a one-in-ten revolt chance. Troops at or above the threshold prevent revolt through this particular test.[16] With 100,000 men and a 10% tax rate, at least 2,917 troops are needed to avoid the test. If the shortage persists across many passes, repeated 10% chances make revolt increasingly likely.
On revolt, the planet keeps floor(troops / divisor) troops, where the randomly selected divisor is an integer from 2 through 9; the rest die and ownership changes to **Free**.[17] Classic's revolt message mislabels the surviving count as the number killed; ge-next corrects that report and updates the former owner's planet count. See Classic bug: Revolt troop losses are reversed.
Source notes
The 17 references below give line numbers in the published classic 3.2e GEPLANET.C, not the reorganized ge-next source. The scheduling routine is plartia() in GEMAIN.C; its classic and ge-next behavior is covered at Planetary update cycle. The basic multiply() sequence above remains recognizable in ge-next. The formulas describe normal numeric ranges; separate overflow bugs can change results near storage limits.
- ↑ Published classic 3.2e
GEPLANET.C, lines 206–209 and 222–230. - ↑ Published classic 3.2e
GEPLANET.C, lines 234–245. The classic routine has no subsequent food subtraction for men. - ↑ Published classic 3.2e
GEPLANET.C, line 257. - ↑ Published classic 3.2e
GEPLANET.C, lines 261–265. - ↑ Published classic 3.2e
GEPLANET.C, line 274. - ↑ Published classic 3.2e
GEPLANET.C, line 278. - ↑ Published classic 3.2e
GEPLANET.C, line 280. - ↑ Published classic 3.2e
GEPLANET.C, line 282. - ↑ Published classic 3.2e
GEPLANET.C, lines 284–286. - ↑ Published classic 3.2e
GEPLANET.C, lines 288–289. - ↑ Published classic 3.2e
GEPLANET.C, lines 290–291. - ↑ Published classic 3.2e
GEPLANET.C, lines 295–297. - ↑ Published classic 3.2e
GEPLANET.C, lines 313–326. - ↑ Published classic 3.2e
GEPLANET.C, lines 328–333. - ↑ Published classic 3.2e
GEPLANET.C, lines 335–338. - ↑ Published classic 3.2e
GEPLANET.C, lines 348–359. - ↑ Published classic 3.2e
GEPLANET.C, lines 363–364.
See also
- Colonizing planets, Planet administration, and Planets
- Items, Item and equipment configuration, Gold, Taxes, and Economy and cargo
- Planetary update cycle and Classic bug: Cash and counter wraparound
Home · Play · Reference · Versions & history · Sysop · Development · Classic bugs