]> git.pond.sub.org Git - empserver/blob - info/Update-sequence.t
WIP empdump, %a
[empserver] / info / Update-sequence.t
1 .TH Concept Update-sequence
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) ship maintenance
22                 pay maintenance, produce, then feed and plague people on board
23         c) plane maintenance
24         d) land unit maintenance
25                 pay maintenance, then feed and plague people on board
26         e) produce for all sectors
27                 a) if the sector is a cap, it costs $1 per etu since
28                         the last update
29                 b) people in non-sanctuary sectors eat
30                         1) If not enough is available, the sector
31                                 uses the supply routines to draw more.
32                         2) If still not enough is available,
33                                 the excess people will starve off.
34                                 a) No more than 50% of the people
35                                         in a sect can die;
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
40                         8+(1-15), max of 100
41                 d) population grows and is truncated
42                 e) sectors that are stopped are skipped (see info stop)
43                 f) first increase eff
44                 g) then make things
45         f) ship building
46                 stopped ships are started, but not built (see info stop)
47                 ships execute their orders right after building
48                 finally, if option SAIL is enabled, follow sail paths
49         g) plane building
50                 stopped planes are started, but not built (see info stop)
51         h) land unit building
52                 stopped land units are started, but not built (see info stop)
53
54 3) Then, do deliveries for all sectors in the world, row by row, going from
55         top to bottom, left to right
56
57 4) Then, do exporting via distribution for all sectors in the world, row by
58         row, going from top to bottom, left to right
59
60 5) Then, do importing via distribution for all sectors in the world, row by
61         row, going from top to bottom, left to right
62    Also start sectors that are stopped
63
64 6) modify tech/res/hap/edu levels & do tech bleed
65 7) decrease levels due to passing of time
66 8) update war declarations (for slow war)
67
68 9) If MOB_ACCESS is not enabled, mobility is updated as follows:
69    a) Add mobility to ships
70    b) Add mobility to sectors
71    c) Add mobility to planes
72    d) Add mobility to land units
73 .fi
74 .s1
75 .SA "Innards, Updates"