2 .NA Update-sequence "The order of events at the update"
5 This document gives a rough order of events during the update.
8 1) First, prepare all sectors in the world, row by row, going from top
9 to bottom, left to right
11 a) fallout is checked, if FALLOUT is defined
12 b) guerrilla warfare is checked
13 c) if the sector doesn't have the plague, see if it catches it
14 otherwise plague the people
15 d) if there are no civs or mil in the sector, it reverts to the deity
16 e) taxes are collected from civs & uws. Mil are paid.
17 f) if the sector is a bank it makes $$ proportional to its efficiency
19 2) Then, in order of country #, deal with each country:
20 a) pay for military reserves.
21 b) in order of set priorities, 1-39, 1 going first, then 2, etc.
22 1) produce for owned sectors of that type
23 a) if the sector is a cap, it costs $$ equal to
24 the # of etus: np->nat_money -= etus;
25 b) people in non-sanctuary sectors eat
26 1) If not enough is available, the sector
27 uses the supply routines to draw more.
28 2) If still not enough is available,
29 the excess people will starve off.
30 a) No more than 50% of the people
32 b) If the NEW_STARVE option is not
33 enabled, all types of people
34 (civs, uw, mil) starve evenly.
35 c) If the NEW_STARVE option is enabled,
36 the uw's die first, then
37 the civs, then the mil.
38 c) if there was starvation, the work percentage is set
39 to 0, otherwise the work rate rises by
41 d) population grows and is truncated
42 e) sectors that are stopped are skipped.(see info stop)
46 c) If ship maintenance is not yet done, do it now
47 d) If ship building is not yet done, do it now
48 e) If plane maintenance is not yet done, do it now
49 f) If plane building is not yet done, do it now
50 g) If unit maintenance is not yet done, do it now
51 h) If unit building is not yet done, do it now
52 i) produce for all sectors that have not yet produced
53 a) if the sector is a cap, it costs $$ equal to
54 the # of etus: np->nat_money -= etus;
55 b) people in non-sanctuary sectors eat
56 1) If not enough is available, the sector
57 uses the supply routines to draw more.
58 2) If still not enough is available,
59 the excess people will starve off.
60 a) No more than 50% of the people
62 b) If the NEW_STARVE option is not
63 enabled, all types of people
64 (civs, uw, mil) starve evenly.
65 c) If the NEW_STARVE option is enabled,
66 the uw's die first, then
67 the civs, then the mil.
68 c) if there was starvation, the work percentage is set
69 to 0, otherwise the work rate rises by
71 e) population grows and is truncated
72 f) sectors that are stopped are skipped. (see info stop)
76 3) Then, do deliveries for all sectors in the world, row by row, going from
77 top to bottom, left to right
79 4) Then, do exporting via distribution for all sectors in the world, row by
80 row, going from top to bottom, left to right
82 5) Then, do importing via distribution for all sectors in the world, row by
83 row, going from top to bottom, left to right
85 6) modify tech/res/hap/edu levels & do tech bleed
86 7) decrease levels due to passing of time
87 8) update war declarations (for slow war)
89 9) If MOB_ACCESS is not enabled, mobility is updated as follows:
90 a) Add mobility to ships
91 b) Add mobility to sectors
92 c) Add mobility to planes
93 d) Add mobility to land units
94 1) Units with negative mobility have their mob halved (-100 goes to -50)