-
Notifications
You must be signed in to change notification settings - Fork 7
/
stat-spec
42 lines (42 loc) · 2.61 KB
/
stat-spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<record> ::= <date> <time> <data>
<data> ::= A <ac-uid> <b-or-f><type:int> <a-event> | T <targ-id:int> <t-event> | I <init-ev> | M <misc-ev> | C <cm-uid> <cclass> <crew-ev>
<date> ::= <day>-<month>-<year> # as save file; times < 12:00 are saved under the previous day
<time> ::= <hh>:<mm> # raids cannot begin before 18:00; post-raid is 11:00 thru 11:59
<ac-uid> ::= <hex>*8 # randomly generated token. P(match) = 2^-32 ~= 1/4.2e9
<cm-uid> ::= <hex>*16 # P(match) is negligible
<b-or-f> ::= B | F
<cclass> ::= P | N | B | E | W | G
<a-event>::= <ct-ev> | <nav-ev> | <pff-ev> | <raid-ev> | <hit-ev> | <dmg-ev> | <fail-ev> | <crsh-ev> | <scrp-ev> | <obs-ev>
<ct-ev> ::= CT <mark:int> # older saves may be missing <mark>, in which case assume 0
<nav-ev> ::= NA <navaid:int> # installation of a navaid (or, for fighters, radar)
<pff-ev> ::= PF # assignment to PFF - not reversible
<raid-ev>::= RA <targ-id:int> <ra-crew>
<ra-crew>::= <cm-uid> [<ra-crew>]
<hit-ev> ::= HI <targ-id:int> <bmb:int> # bmb is either lb of bombs, lb of mines, or # of leaflets. Need targ-id as we might have hit a different target to the one we were aiming for
<dmg-ev> ::= DM <delta-dmg:float> <current-dmg:float> (AC <from:ac-uid> | FK <flak-id:int> | TF <targ-d:int>)
<fail-ev>::= FA <failstate:int> # is really a bool
<crsh-ev>::= CR
<scrp-ev>::= SC
<obs-ev> ::= OB
<init-ev>::= INIT <filename:str> # Never generated, but should appear in all startpoints (*.sav.in)
<t-event>::= <t-dmg> | <t-flk> | <t-ship>
<t-dmg> ::= DM <delta-dmg:float> <current-dmg:float>
<t-flk> ::= FK <delta-flk:float> <current-flk:float>
<t-ship> ::= SH
<misc-ev>::= <cash-ev> | <conf-ev> | <mora-ev> | <gprd-ev> | <prio-ev> | <prop-ev>
<cash-ev>::= CA <delta-cash:int> <current-cash:int> # Only for Budget payments, as CT costs are known
<conf-ev>::= CO <confid:float>
<mora-ev>::= MO <morale:float>
<gprd-ev>::= GP <iclass:int> <gprod:float> <dprod:float> # dprod is _not_ the difference from the previous gprod!
<prio-ev>::= <tpri-ev> | <ipri-ev>
<tpri-ev>::= TP <tclass:int> <ignore:int> # really a bool
<ipri-ev>::= IP <iclass:int> <ignore:int> # really a bool
<prop-ev>::= PG <event:int>
<crew-ev>::= <gen-ev> | <ski-ev> | <csta-ev> | <op-ev> | <deth-ev> | <escp-ev>
<gen-ev> ::= GE <lrate:int> # generation of a new (student) crewman
<ski-ev> ::= SK <skill:int> # reached a new integer-part of skill
<csta-ev>::= ST <cstatus> # status change (see also EX)
<cstatus>::= C | S | I # never have E as that's an <escp-ev> rather than a <csta-ev>
<op-ev> ::= OP <tops:int> # completed an op (*not* generated daily for instructors!)
<deth-ev>::= DE | PW
<escp-ev>::= EX <rtime:int> # number of days until return