outpost_2:concepts:population_and_morale

There are three classes of colonists in OP2:

  • Kids: All colonists start out as Children born at the Nursery. Their sole function is to grow up into Workers when trained by an active University.
  • Workers: Workers are required for operation of most structures, and can be trained into up to 10 Scientists at a time at any active University.
  • Scientists: Scientists are also required to operate certain structures, and can also do Research at any active Labs. They can also be assigned as Workers when there's a colonist shortage (though with a corresponding Morale hit as seen below).

The colony population is updated every 32nd processing tick (256 ticks) for each human player. AI players are forced to 4096 workers, 4096 scientists, and 256 kids.

The following discussion makes use of MFERTRATE and MDIERATE from morale.txt. MFERTRATE determines the rate at which new kids are born. A higher value means a higher birth rate. MDIERATE determines the rate at which people (kids, workers, and scientists) die. A HIGHER value means a LOWER death rate.

First, new workers are trained from kids, if there are any to train, and the player has an active University (having more than 1 university has no effect here), the worker count is increased (and kid count decreased) based on the following formula:

Trained Workers = (((min(160, Kids + Workers + Scientists) / 40) * 3 + 36) * 4) / (Remainder + Kids)

The remainder from this division is stored and used the next time the population is updated in this formula (starting at 0 when the game starts). This allows for fractional worker growth over multiple updates.

Next, the number of new kids is calculated based on the birth rate, if the player has an active Nursery (as before, having more than 1 nursery has no effect) and the total number of workers and scientists is less than the number of kid (i.e. kids are capped at 50% of total population), based on the following formula:

Kids Born = (Scientists / 4 + Workers / 2 + Remainder) / M_FERT_RATE

As before, the remainder is stored and used in the next update to allow for fractional kid growth over time. MFERTRATE is a value defined in morale.txt for each morale level.

Kid deaths are computed next, if the number of kids is greater than 0, according to the following formula:

Kid Deaths = (Kids + Remainder) / (Nurseries * 40 + M_DIE_RATE / 2 + Total Med Center Capacity)

The remainder is stored for use in the next update, and total med center capacity is a previously computed value for each player. In other words, Nurseries are assumed to have a capacity of 40 (note that this becomes fairly pointless once Med Centers are available as they lower death rate for all colonists and have a capacity of 75 once Automated Diagnostic Examinations is researched, for the same upkeep in workers, scientists, and power). MDIERATE is a value from morale.txt based on the player's current morale level.

Worker and Scientist deaths (assuming there are any) are separately computed similarly using the formula below:

Dead Workers or Scientists = (Workers or Scientists + Remainder) / (Total Med Center Capacity + M_DIE_RATE)

As before, the remainder is stored and used in the next update (separately for scientists and workers).

  • outpost_2/concepts/population_and_morale.1698737485.txt.gz
  • Last modified: 2023/10/31 07:31
  • by blackbox222