]> git.pond.sub.org Git - empserver/blob - info/Concepts/Update-sequence.t
Don't explain sector production twice; replace one copy by a
[empserver] / info / Concepts / Update-sequence.t
1 .TH Concept Innards
2 .NA Update-sequence "The order of events at the update"
3 .LV Expert
4 .s1
5 This document gives a rough order of events during the update.
6 .s1
7 .nf
8 1) First, prepare all sectors in the world, row by row, going from top
9         to bottom, left to right
10
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
18
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                 produce for owned sectors, maintain and build ships,
23                 planes and units; see below for details
24         c) If ship maintenance is not yet done, do it now
25         d) If ship building is not yet done, do it now
26                 ships execute their orders right after building
27                 finally, if option SAIL is enabled, follow sail paths
28         e) If plane maintenance is not yet done, do it now
29         f) If plane building is not yet done, do it now
30         g) If unit maintenance is not yet done, do it now
31         h) If unit building is not yet done, do it now
32         i) produce for all sectors that have not yet produced
33                 a) if the sector is a cap, it costs $$ equal to
34                    the # of etus: np->nat_money -= etus;
35                 b) people in non-sanctuary sectors eat
36                         1) If not enough is available, the sector
37                                 uses the supply routines to draw more.
38                         2) If still not enough is available,
39                                 the excess people will starve off.
40                                 a) No more than 50% of the people
41                                         in a sect can die
42                                 b) If the NEW_STARVE option is not
43                                         enabled, all types of people
44                                         (civs, uw, mil) starve evenly.
45                                 c) If the NEW_STARVE option is enabled,
46                                         the uw's die first, then
47                                         the civs, then the mil.
48                 c) if there was starvation, the work percentage is set
49                         to 0, otherwise the work rate rises by
50                         8+(1-15), max of 100
51                 d) population grows and is truncated
52                 e) sectors that are stopped are skipped (see info stop)
53                 f) first increase eff
54                 g) then make things
55
56 3) Then, do deliveries for all sectors in the world, row by row, going from
57         top to bottom, left to right
58
59 4) Then, do exporting via distribution for all sectors in the world, row by
60         row, going from top to bottom, left to right
61
62 5) Then, do importing via distribution for all sectors in the world, row by
63         row, going from top to bottom, left to right
64
65 6) modify tech/res/hap/edu levels & do tech bleed
66 7) decrease levels due to passing of time
67 8) update war declarations (for slow war)
68
69 9) If MOB_ACCESS is not enabled, mobility is updated as follows:
70    a) Add mobility to ships
71    b) Add mobility to sectors
72    c) Add mobility to planes
73    d) Add mobility to land units
74         1) Units with negative mobility have their mob halved (-100 goes to -50)
75         2) Mobility is added
76 .fi
77 .s1
78 .SA "Innards, Update"