<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://manicpop.org/gewiki/index.php?action=history&amp;feed=atom&amp;title=Planetary_production</id>
	<title>Planetary production - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://manicpop.org/gewiki/index.php?action=history&amp;feed=atom&amp;title=Planetary_production"/>
	<link rel="alternate" type="text/html" href="https://manicpop.org/gewiki/index.php?title=Planetary_production&amp;action=history"/>
	<updated>2026-10-20T16:30:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://manicpop.org/gewiki/index.php?title=Planetary_production&amp;diff=2097&amp;oldid=prev</id>
		<title>CodexBot: Link and refine MSG option references</title>
		<link rel="alternate" type="text/html" href="https://manicpop.org/gewiki/index.php?title=Planetary_production&amp;diff=2097&amp;oldid=prev"/>
		<updated>2026-10-18T02:12:28Z</updated>

		<summary type="html">&lt;p&gt;Link and refine MSG option references&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Planetary production&amp;#039;&amp;#039;&amp;#039; is what happens during one call to [[Source code#routine-multiply|&amp;lt;code&amp;gt;multiply()&amp;lt;/code&amp;gt;]]: food and population are checked, existing gold is converted, items are produced, taxes are collected, and revolt may occur. This page follows the classic &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt; 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 &amp;#039;&amp;#039;when&amp;#039;&amp;#039; &amp;lt;code&amp;gt;plartia()&amp;lt;/code&amp;gt; schedules and repeats these passes, including ge-next timestamps and catch-up. For claiming and managing a colony, see [[Colonizing planets]] and [[Planet administration]].&lt;br /&gt;
&lt;br /&gt;
== 1. Food and population ==&lt;br /&gt;
Troops eat first. The required number of food cases is &amp;lt;code&amp;gt;floor(troops / 100)&amp;lt;/code&amp;gt;. If that exceeds current food stock, &amp;lt;code&amp;gt;floor(troops / 8)&amp;lt;/code&amp;gt; perish. The game then subtracts food for the &amp;#039;&amp;#039;remaining&amp;#039;&amp;#039; 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.&amp;lt;ref name=&amp;quot;classic-troops&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, lines 206–209 and 222–230.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Men are checked against the food left after troops have eaten. If &amp;lt;code&amp;gt;floor(men / 100)&amp;lt;/code&amp;gt; exceeds that stock, &amp;lt;code&amp;gt;floor(men / 8)&amp;lt;/code&amp;gt; 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.&amp;lt;ref name=&amp;quot;classic-men&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, lines 234–245. The classic routine has no subsequent food subtraction for men.&amp;lt;/ref&amp;gt; ge-next adds the configurable &amp;lt;code&amp;gt;MENEAT&amp;lt;/code&amp;gt; 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]].&lt;br /&gt;
&lt;br /&gt;
== 2. Tax factor and existing gold ==&lt;br /&gt;
The production factor attributable to tax is &amp;lt;code&amp;gt;1 − tax rate / 120&amp;lt;/code&amp;gt;. 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&amp;#039;s tax bank.&amp;lt;ref name=&amp;quot;classic-taxfactor&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, line 257.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, the planet converts &amp;#039;&amp;#039;gold already in inventory&amp;#039;&amp;#039; 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&amp;#039;s bank. Gold produced later in this pass is normally available for conversion on a later pass, not immediately.&amp;lt;ref name=&amp;quot;classic-gold&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, lines 261–265.&amp;lt;/ref&amp;gt; Classic&amp;#039;s unchecked multiplication can overflow near its numeric limit; ge-next caps the addition. See [[Gold]] and [[Cash]].&lt;br /&gt;
&lt;br /&gt;
== 3. Production, one item at a time ==&lt;br /&gt;
The game processes fourteen active [[Items|item types]] in inventory order: men, missiles, torpedoes, ion cannons, flux pods, food, fighters, decoys, troops, zippers, jammers, mines, gold, and spies. For &amp;#039;&amp;#039;each&amp;#039;&amp;#039; 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&amp;#039;s output.&lt;br /&gt;
&lt;br /&gt;
=== Base output ===&lt;br /&gt;
The configured production rate is first divided by 10,000.&amp;lt;ref name=&amp;quot;classic-rate&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, line 274.&amp;lt;/ref&amp;gt; Using the current population, the owner&amp;#039;s percentage allocation, and that rate, the unadjusted output is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;men × (allocation / 100) × (production rate / 10000) ÷ 6 ÷ 7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Equivalently, when allocation is entered as the integer percentage from 0 through 100:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;men × allocation × production rate ÷ 42,000,000&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These divisions are floating-point operations at this stage; the game truncates later when adding the produced amount to stock.&amp;lt;ref name=&amp;quot;classic-base&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, line 278.&amp;lt;/ref&amp;gt; For example, 100,000 men, a 10% torpedo allocation, and the stock torpedo rate of 500 give about 11.9048 torpedoes before planetary modifiers.&lt;br /&gt;
&lt;br /&gt;
=== Planet quality and tax ===&lt;br /&gt;
Poor, marginal, good, and very good each correspond to values 0, 1, 2, and 3. The quality factor is &amp;lt;code&amp;gt;(environment + resources + 2) / 4&amp;lt;/code&amp;gt;, ranging from 0.5 for poor/poor to 2 for very-good/very-good.&amp;lt;ref name=&amp;quot;classic-quality&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, line 280.&amp;lt;/ref&amp;gt; The tax factor from step 2 is multiplied into that quality factor.&amp;lt;ref name=&amp;quot;classic-quality-tax&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, line 282.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A good/marginal planet has a quality factor of &amp;lt;code&amp;gt;(2 + 1 + 2) / 4 = 1.25&amp;lt;/code&amp;gt;. With 10% tax, its combined quality-and-tax factor is &amp;lt;code&amp;gt;1.25 × (1 − 10 / 120) ≈ 1.14583&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Cash spent and funded bonus ===&lt;br /&gt;
Before producing &amp;#039;&amp;#039;each&amp;#039;&amp;#039; item, the bank keeps a condition-dependent fraction of its current cash. The retained fraction is &amp;lt;code&amp;gt;0.95 − (6 − environment − resources) / 10&amp;lt;/code&amp;gt;: 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.&amp;lt;ref name=&amp;quot;classic-cash&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, lines 284–286.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any cash remains &amp;#039;&amp;#039;after&amp;#039;&amp;#039; that item&amp;#039;s deduction, its output factor is multiplied by 1.5. The same factor also raises that item&amp;#039;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.&amp;lt;ref name=&amp;quot;classic-bonus&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, lines 288–289.&amp;lt;/ref&amp;gt; Cash is reduced for every item even when its production allocation is zero.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Item !! Good/marginal cash after deduction !! Poor/marginal cash after deduction&lt;br /&gt;
|-&lt;br /&gt;
| Men || 6,500 || 2,250&lt;br /&gt;
|-&lt;br /&gt;
| Missiles || 4,225 || 1,012&lt;br /&gt;
|-&lt;br /&gt;
| Torpedoes || 2,746 || 455&lt;br /&gt;
|-&lt;br /&gt;
| Ion cannons || 1,784 || 204&lt;br /&gt;
|-&lt;br /&gt;
| Flux pods || 1,159 || 91&lt;br /&gt;
|-&lt;br /&gt;
| Food || 753 || 40&lt;br /&gt;
|-&lt;br /&gt;
| Fighters || 489 || 18&lt;br /&gt;
|-&lt;br /&gt;
| Decoys || 317 || 8&lt;br /&gt;
|-&lt;br /&gt;
| Troops || 206 || 3&lt;br /&gt;
|-&lt;br /&gt;
| Zippers || 133 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Jammers || 86 || 0&lt;br /&gt;
|-&lt;br /&gt;
| Mines || 55 || 0&lt;br /&gt;
|-&lt;br /&gt;
| Gold || 35 || 0&lt;br /&gt;
|-&lt;br /&gt;
| Spies || 22 || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first planet receives the bonus for all fourteen items; the second loses it beginning with jammers. Men need only one cash unit &amp;#039;&amp;#039;after&amp;#039;&amp;#039; the first deduction to receive the bonus, but one unit &amp;#039;&amp;#039;before&amp;#039;&amp;#039; 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:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Cash retained per item !! Planet-quality combinations !! Minimum starting cash&lt;br /&gt;
|-&lt;br /&gt;
| 95% || Very good / very good || 15&lt;br /&gt;
|-&lt;br /&gt;
| 85% || Good / very good; very good / good || 37&lt;br /&gt;
|-&lt;br /&gt;
| 75% || Very good / marginal; good / good; marginal / very good || 115&lt;br /&gt;
|-&lt;br /&gt;
| 65% || Very good / poor; good / marginal; marginal / good; poor / very good || 865&lt;br /&gt;
|-&lt;br /&gt;
| 55% || Good / poor; marginal / marginal; poor / good || 6,170&lt;br /&gt;
|-&lt;br /&gt;
| 45% || Marginal / poor; poor / marginal || 106,012&lt;br /&gt;
|-&lt;br /&gt;
| 35% || Poor / poor || 2,732,598&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These are starting balances &amp;#039;&amp;#039;after&amp;#039;&amp;#039; 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.&lt;br /&gt;
&lt;br /&gt;
=== Add output and apply the maximum ===&lt;br /&gt;
The game multiplies base output by the quality, tax, and optional cash factors, truncates the produced quantity, and adds it to the existing stock.&amp;lt;ref name=&amp;quot;classic-output&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, lines 290–291.&amp;lt;/ref&amp;gt; In the 100,000-men torpedo example, &amp;lt;code&amp;gt;11.9048 × 1.14583&amp;lt;/code&amp;gt; produces 13 whole torpedoes. With the 1.5 cash bonus it produces 20.&lt;br /&gt;
&lt;br /&gt;
The same final factor scales the item&amp;#039;s configured planetary maximum, which is also truncated to a whole number.&amp;lt;ref name=&amp;quot;classic-max&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, lines 295–297.&amp;lt;/ref&amp;gt; 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 &amp;#039;&amp;#039;below stock already held&amp;#039;&amp;#039;; an update may discard goods even when the production rate is zero.&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;ref name=&amp;quot;classic-report&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, lines 313–326.&amp;lt;/ref&amp;gt; The proposed quantity is then capped at the effective maximum and stored.&amp;lt;ref name=&amp;quot;classic-cap&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, lines 328–333.&amp;lt;/ref&amp;gt; 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]].&lt;br /&gt;
&lt;br /&gt;
== 4. Taxes and revolt ==&lt;br /&gt;
After all items have been processed, the tax bank gains &amp;lt;code&amp;gt;floor((tax rate / 1200) × current men)&amp;lt;/code&amp;gt;, using the population &amp;#039;&amp;#039;after&amp;#039;&amp;#039; the men-production step.&amp;lt;ref name=&amp;quot;classic-taxbank&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, lines 335–338.&amp;lt;/ref&amp;gt; At 10% tax and 100,000 men, this adds 833 credits to the tax bank. The planetary production bank and the owner&amp;#039;s personal cash remain separate; see [[Taxes]].&lt;br /&gt;
&lt;br /&gt;
For a planet not already marked &amp;lt;code&amp;gt;**Free**&amp;lt;/code&amp;gt;, the revolt-pressure value is &amp;lt;code&amp;gt;men × (tax rate / 120) × 0.35&amp;lt;/code&amp;gt;. If that value is &amp;#039;&amp;#039;greater than&amp;#039;&amp;#039; 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.&amp;lt;ref name=&amp;quot;classic-revolt&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, lines 348–359.&amp;lt;/ref&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
On revolt, the planet keeps &amp;lt;code&amp;gt;floor(troops / divisor)&amp;lt;/code&amp;gt; troops, where the randomly selected divisor is an integer from 2 through 9; the rest die and ownership changes to &amp;lt;code&amp;gt;**Free**&amp;lt;/code&amp;gt;.&amp;lt;ref name=&amp;quot;classic-survivors&amp;quot;&amp;gt;Published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, lines 363–364.&amp;lt;/ref&amp;gt; Classic&amp;#039;s revolt message mislabels the surviving count as the number killed; ge-next corrects that report and updates the former owner&amp;#039;s planet count. See [[Classic bug: Revolt troop losses are reversed]].&lt;br /&gt;
&lt;br /&gt;
== Source notes ==&lt;br /&gt;
The 17 references below give line numbers in the published classic 3.2e &amp;lt;code&amp;gt;GEPLANET.C&amp;lt;/code&amp;gt;, not the reorganized ge-next source. The scheduling routine is &amp;lt;code&amp;gt;plartia()&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;GEMAIN.C&amp;lt;/code&amp;gt;; its classic and ge-next behavior is covered at [[Planetary update cycle]]. The basic &amp;lt;code&amp;gt;multiply()&amp;lt;/code&amp;gt; sequence above remains recognizable in ge-next. The formulas describe normal numeric ranges; separate overflow bugs can change results near storage limits.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Colonizing planets]], [[Planet administration]], and [[Planets]]&lt;br /&gt;
* [[Items]], [[Item and equipment configuration]], [[Gold]], [[Taxes]], and [[Economy and cargo]]&lt;br /&gt;
* [[Planetary update cycle]] and [[Classic bug: Cash and counter wraparound]]&lt;br /&gt;
&lt;br /&gt;
{{GE navigation}}&lt;br /&gt;
[[Category:Planets]]&lt;br /&gt;
[[Category:Economy]]&lt;/div&gt;</summary>
		<author><name>CodexBot</name></author>
	</entry>
</feed>