Your message contains 85686 characters.
The maximum number of allowed characters is 60000.
Ah well, I knew there was a limit
Happy reading!
I continued analysing and testing with same above save7.sav save game playing the Klingons, and kept punching the UE code.
While moving sectors, systems, outposts and task forces looks to be stable now, and adding new task forces does work also, the removal of task forces with assigned tasks does not. But I'm at it and I think with below analysis I can fix that one as well now.
Further I stumbled upon one major issue with the UE LZSS sav file compression, which led to corrupt any save game ever touched.
====
First, regarding the LZSS compression, while the algorithm itself works fine, it uses some little trick to further reduce the space some little.
It pre-fills the lookup dictionary with some configurable character. And while for compression in LzssOutputStream.java, it was set to 32, the space character, for decompression in LzssInputStream.java it was set to 0. These values however MUST match, and same wise they must match with whatever values trek.exe uses to pre-fill the dictionary.
It's amazing that most of the time the game loaded anyhow. I only noticed by re-opening an already modified sav file with UE, where I got prompted with an error stating that there was a tech entry or something missing. It turned out that for an expected index 32 the value was zeroed. Left me puzzled for quite some while. The compression algorithm here however expected the wrong value in the dictionary.
By testing, I found that I had to use the space character 32 (0x20) to pre-fill the dictionary, else the save wouldn't load. This likely goes back to a mis-assumption I found in my original sav file notes, where I assumed the dictionary was pre-filled with zeros. The algorithm there however featured that the dictionary was filled and written character by character, so for a long 00 00 .. 00 00 it would just refer the first value and assume the rest would be filled just in place while it went to copy the next character.
I found no reference to assume it is pre-filled to some other character for any of the files, and testing so far tells it is the space character for all of the sav contained files.
For proof however one would have to check the trek.exe implementation for each of the files.
I leave it at that as long no further errors show up.
update: I now found evidence, that at least for the techInfo file the LZSS dictionary indeed must be pre-filled with 00s, see viewtopic.php?p=54203#p54203 below
====
But now to the sav analysis updates:
---
GTForceList/GWTForce ---
hex view width: 108
I found a fault in here for 0x30-0x33:
this is not related to TT based system attacks at all, instead it is the computed
target sector index (row*columns + column-1, same like the outpost ids and 0xFFFFFFFF if none) !!
Guess that is not so unimportant when you change some task force move destination.
Further for the task force listings, the ability bitmask hasn't been documented yet. The only sparse documentation I found is in
viewtopic.php?f=275&t=500&p=32183&hilit ... ask#p32183
From my testing I found this unlocks the task force mission menu buttons. And you perfectly can allow a battle cruiser to colonize a system. The next turn however all abilities are reset automatically.
For myself btw I prefer the term 'flags', cause a 'mask' in programming is used for search algorithms and match making. E.g. you use a mask to filter for whether a task force has some required flags.
ability flags / ability mask
0x0001 (01 00) = can colonize
0x0002 (02 00) = can raid system
0x0004 (04 00) = can invade system
0x0008 (08 00) = ?? never seen used
0x0010 (10 00) = can intercept
0x0020 (20 00) = ?? never seen used
0x0040 (40 00) = can terraform
0x0080 (80 00) = can cloak
0x0100 (00 01) = can build outpost
0x0200 (00 02) = can build starbase
0x0400 (00 04) = can be scrapped
0x0800 (00 08) = can bombard system
0x1000 (00 10) = ?? never seen used
0x2000 (00 20) = ?? never seen used
0x4000 (00 40) = ?? never seen used
0x8000 (00 80) = ?? never seen used
(xx xx) = little endian
e.g.
00 04 Chodak
02 0C ferg attack cruiser, fed command cruiser
04 07 fed troop transport
12 0C tamarian ship, card cruiser, ferg weapon cruiser, fed scout, pakled transport
41 04 klng colony ship, rom colony ship
45 07 klng colony ship + troop transport
82 04 rom attack cruiser
92 04 cloaked klingon battle cruiser
92 0C uncloaked klingon battle cruiser
---
GShipHead = GTForceHd = GWTForceHd = GTFStasisHd ---
The header files still aren't fully known either. But from what I found, the unknown values are:
0x00-0x0F = asm function pointer offsets, see sub_46C430 / set_ship_lists?_startgame
_ 0x00-0x03 = GShipHead: offset sub_449C00, others: offset loc_448D00
_ 0x04-0x07 = offset sub_492F90 / call_get_code_address?
_ 0x08-0x0B = offset sub_492E90 / call__EnterCriticalSection_
_ 0x0C-0x0F = offset sub_492E60 / system_memory__clear_file?
0x1C-0x1F = some file flags, always: GTFStasisHd/GWTForceHd = 0x1, GShipHead/GTForceHd = 0x81
0x20-0x27 = some data pointer it seems, possibly the content data
---
TskSh files ---
Similar to the AgtSh files, these list the ship ids to be controlled by some agent.
It is a pure list of short values for the ship ids, and the .cnt files tell how many.
Like already documented, the race agent id can be matched by the AIAgent files.
By my guess these files list the current active ship tasks. It is not relevant when adding new ships, but for sure is when removing some.
---
treaty file ---
hex view width: 116
lists active treaties
0x0-0x3: num treaties
0x4-0x7: next id
[num * treaties]
0x00-0x27: contact race name if player initiated
0x28-0x2B: delay? (1 if waiting on player response, two majors involved, or for gifts to take effect)
0x2C-0x2F: treatyId
0x30-0x33: treatyType (1:peace 2:alliance 3:war pact 4:accepted demand 5:friendship 6:affiliation 7:membership 8:gift)
0x34-0x35: initiator raceId
0x36-0x37: recipient raceId
0x38-0x38: turns (-1 if unlimited)
0x39-0x3B: empty data alignment
0x3C-0x3F: turnStart (first active turn)
0x40-0x43: turnEnd (last active turn)
0x44-0x47: hasGift (0 or 1)
0x48-0x4B: hasDemand (0 or 1)
0x4C-0x4F: hasRepeatedGift (0 or 1)
0x50-0x53: hasRepeatedDemand (0 or 1)
0x54-0x57: credits gift (one time)
0x58-0x5B: credits demand (one time)
0x5C-0x60: cede disputed territories
0x61-0x63: unknown
0x64-0x67: peaceType (for major empires -> 0:non-aggression 1:friendship 2:affiliation)
0x68-0x6B: declareWar? (0 or 1)
0x6C-0x6F: declareWarAsWell? (0 or 1)
0x70-0x71: targetRaceId (for war pact, else -1)
0x72-0x73: empty data alignment
---
intelInfo file (update) ---
0x0058 to 0x02D7 (5 empires * 0x80) = intel expense:
Code: Select all
card:
00 00 00 00 2A 00 00 00 B3 00 00 00 87 00 00 00 8D 00 00 00 00 00 39 05 07 1C F2 28 09 08 00 00 economy
00 00 00 00 2A 00 00 00 28 00 00 00 87 00 00 00 BC 00 00 00 00 00 3A 03 D6 03 23 77 67 08 00 00 research
00 00 00 00 2A 00 00 00 95 00 00 00 87 00 00 00 8D 00 00 00 00 00 1C 00 28 00 48 00 22 00 00 00 military
00 00 00 00 A6 00 00 00 28 00 00 00 87 00 00 00 8D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 morale
fed:
2A 00 00 00 00 00 00 00 87 00 00 00 C1 00 00 00 67 00 00 00 12 04 00 00 16 14 8C 30 EC 04 00 00 economy
2A 00 00 00 00 00 00 00 87 00 00 00 C1 00 00 00 67 00 00 00 01 03 00 00 91 1F FF 93 5D 04 00 00 research
2A 00 00 00 00 00 00 00 87 00 00 00 C1 00 00 00 67 00 00 00 1B 00 00 00 26 00 48 00 1E 00 00 00 military
2A 00 00 00 00 00 00 00 87 00 00 00 C1 00 00 00 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 morale
ferg:
28 00 00 00 87 00 00 00 00 00 00 00 72 00 00 00 82 00 00 00 8B 03 10 0D 00 00 25 27 E5 06 00 00 economy
28 00 00 00 87 00 00 00 00 00 00 00 72 00 00 00 82 00 00 00 01 03 FF 0A 00 00 2D 65 03 05 00 00 research
28 00 00 00 87 00 00 00 00 00 00 00 72 00 00 00 82 00 00 00 1B 00 25 00 00 00 48 00 20 00 00 00 military
28 00 00 00 87 00 00 00 00 00 00 00 72 00 00 00 82 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 morale
klng:
00 00 00 00 C1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2E 14 00 00 00 00 00 00 00 00 economy
00 00 00 00 C1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 21 21 00 00 00 00 00 00 00 00 research
00 00 00 00 C1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2B 00 00 00 00 00 00 00 00 00 military
00 00 00 00 C1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 morale
rom:
8D 00 00 00 67 00 00 00 82 00 00 00 19 00 00 00 00 00 00 00 0A 0B 83 0A 71 13 CB 0A 00 00 00 00 economy
8D 00 00 00 67 00 00 00 82 00 00 00 19 00 00 00 00 00 00 00 95 0C A5 01 89 1D AF 0F 00 00 00 00 research
8D 00 00 00 67 00 00 00 82 00 00 00 19 00 00 00 00 00 00 00 24 00 22 00 25 00 40 00 00 00 00 00 military
8D 00 00 00 67 00 00 00 82 00 00 00 19 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 morale
----------- ----------- ----------- ----------- ----------- ----- ----- ----- ----- ----- -----
trn change trn change trn change trn change trn change spent spent spent spent spent empty
card fed ferg klng rom card fed ferg klng rom
0x00 0x10 0x20 * 5 * 4 = 0x280
---
result.lst / ordInfo ---
Now it gets interesting. While I analysed the result.lst file, I found it partially refers the exact same ordInfo data structures. So you find it used in both.
The one major difference is that in result.lst the compression is split to separate chunks and so is the ordInfo header and content data.
Like already has been found, in result.lst each data chunk is introduced by some header chunk, which is 12 bytes long, containing:
0x00-0x03 the data offset, 0x0C for the fist chunk
0x04-0x07 the uncompressed data size
0x08-0x0B the compressed data size
The data chunk then is LZSS compressed like any other sav file.
And the count of the chunks is listed by the sav file table at the end of the sav file.
Note that saving the uncompressed file with UE, instead of the chunk headers, the plain uncompressed size is prepended to each of the chunks. It however is not part of the actual data!
For result.lst, which from all I know is the only chunk based file, the first chunk lists the entry count and nothing else.
0x00-0x03: entry count
Each of the following entries then consist of a header chunk and a content chunk. Well, the header itself contains relevant info though.
Some of these entries however list another sub-entry or details chunk which by itself has a header chunk as well.
To give a better view on this, the result.lst is structured like this:
[first chunk header] if compressed: 12 bytes for the data offset, uncompressed and compressed size, or if uncompressed by UE: 4 bytes for the content size
[entry count] the first data chunk, 5 bytes if compressed, 4 bytes if uncompressed - the algorithm here doesn't do well
[next chunk header]
[first entry header]
[next chunk header]
[first entry content]
[next chunk header]
[an optional sub-entry header]
[next chunk header]
[followed by the sub-entry content]
[next chunk header]
[next entry header]
[next chunk header]
[next entry content]
.. and so on for all the entries
I identified the following six cases where only the 0x28 byte header is counted:
- 0x28 header -> 0x10 content for economic results
- 0x28 header -> 0x10 content for economic results -> 0x20 ordInfo-header -> 0x34 ordInfo economic order
- 0x28 header -> 0x10 content for economic results -> 0x20 ordInfo-header -> 0x48C ordInfo diplomatic order
- 0x28 header -> 0x9C content for military results
- 0x28 header -> 0x9C content for military results -> 0x20 ordInfo-header -> 0x34 ordInfo military order
- 0x28 header -> 0x74 content for intel results
Then I further had a look at each of these entries. With almost no testing and asm analysis but comparing some botf and known sav file values, I figured the following with all save7 entries listed:
header 0x28
===========
This is the central entry header for each of the entries.
1: economic result header (little endian)
Code: Select all
<38> 28 00 00 00 | 84 AB AA 2A 01 00 00 00 00 01 00 00 02 FF FF 00 FF FF FF FF 00 00 25 00 00 00 00 80 00 00 00 00 30 E6 ED 03 10 00 00 00 Carema (fed y:5 x:14):
<39> 28 00 00 00 | 85 AB AA 2A 01 00 00 00 00 01 00 00 02 FF FF 01 FF FF FF FF 00 80 06 00 00 00 00 00 00 00 00 00 18 E3 ED 03 10 00 00 00 Carema (fed y:5 x:14): ?insufficient energy
<49> 28 00 00 00 | CB 55 55 55 02 00 00 00 00 01 00 00 04 FF FF 00 FF FF FF FF 00 00 1F 00 00 00 00 00 00 00 00 00 A0 EB ED 03 10 00 00 00 Moab (ferg y:8 x:10): enthused on new trading (Begeisterung, neuer Handel)
<56> 28 00 00 00 | 49 00 00 80 03 00 FF FF 00 01 00 00 08 00 00 00 FF FF FF FF 00 00 40 00 00 00 00 40 00 00 00 00 08 79 8B 02 10 00 00 00 Marlonia (klng y:5 x:B): planet 4 became barren (unfruchtbar)
---- ----------- ----------- ----- ----- ----- ----- -- ----- -- ----------- ----- ----- ----------- ----------- ----------- -----------
entr size resultId race unk1 type emp1 | unk2 | sysId flgs1 cntT flags2 subAddr contentAddr contentSize
nbr 0x00 | ?evt 0x10 0x20 0x28
race flags
2: economic result header with economic ordInfo sub-entry (little endian)
Code: Select all
<11> 28 00 00 00 | F4 00 00 00 00 00 00 00 00 01 00 00 01 FF FF 40 43 00 00 00 00 80 00 00 00 00 00 00 50 FD 8B 02 B8 40 ED 03 10 00 00 00 Ariannus (card): upgraded type 6 constr. yard
<12> 28 00 00 00 | F5 00 00 00 00 00 00 00 00 01 00 00 01 FF FF 42 4D 00 00 00 00 80 00 00 00 00 00 00 18 5A 88 02 F8 42 ED 03 10 00 00 00 Tycho (card): upgraded type 2 constr. yard
<13> 28 00 00 00 | F6 00 00 00 00 00 00 00 00 01 00 00 01 FF FF EF 3F 00 00 00 00 80 00 00 00 00 00 00 D8 DC C5 02 30 EF ED 03 10 00 00 00 Canopus (card): built typ 1 shadow team
<40> 28 00 00 00 | 86 AB AA 2A 01 00 00 00 00 01 00 00 02 FF FF A1 FF FF FF FF 00 80 00 00 00 00 00 00 88 12 FA 04 80 42 ED 03 10 00 00 00 (fed): sent 7335 credits to the ferengi
<41> 28 00 00 00 | 87 AB AA 2A 01 00 00 00 00 01 00 00 02 FF FF 00 19 00 00 00 00 80 00 00 00 00 00 00 90 93 8B 02 40 EE ED 03 10 00 00 00 Carema (fed): built type 1 plasma reactor
<42> 28 00 00 00 | 88 AB AA 2A 01 00 00 00 00 01 00 00 02 FF FF EC 0B 00 00 00 00 80 00 00 00 00 00 00 F8 59 ED 03 88 EB ED 03 10 00 00 00 Rochani (fed): built wind turbines
<43> 28 00 00 00 | 89 AB AA 2A 01 00 00 00 00 01 00 00 02 FF FF 00 10 00 00 00 00 80 00 00 00 00 00 00 08 6F 88 02 F0 44 ED 03 10 00 00 00 Qualor (fed): built type 1 autom. farm
<52> 28 00 00 00 | CE 55 55 55 02 00 00 00 00 01 00 00 04 FF FF A5 FF FF FF FF 00 80 00 00 00 00 00 00 58 12 FA 04 68 2D 8B 02 10 00 00 00 (ferg): sent 665 credits to the takarians
<53> 28 00 00 00 | CF 55 55 55 02 00 00 00 00 01 00 00 04 FF FF 00 35 00 00 00 00 80 00 00 00 00 00 00 58 5A ED 03 B0 FC ED 03 10 00 00 00 Harrakis (ferg): built shied generator
<54> 28 00 00 00 | D0 55 55 55 02 00 00 00 00 01 00 00 04 FF FF 00 2A 00 00 00 00 80 00 00 00 00 00 00 78 49 ED 03 58 EB ED 03 10 00 00 00 Kostolain (ferg): upgraded type 2 market
<60> 28 00 00 00 | 4D 00 00 80 03 00 00 00 00 01 00 00 08 00 00 00 53 00 00 00 00 80 00 00 00 00 00 00 28 1B FA 04 28 3D ED 03 10 00 00 00 Eden (klng): built Scout II: IKC Dughro' B
<68> 28 00 00 00 | 43 AB AA AA 04 00 00 00 00 01 00 00 10 FF FF EB 51 00 00 00 00 80 00 00 00 00 00 00 48 49 ED 03 70 EB ED 03 10 00 00 00 Mintaka (rom): upgraded type 3 energy exchange
<69> 28 00 00 00 | 44 AB AA AA 04 00 00 00 00 01 00 00 10 FF FF 00 06 00 00 00 00 80 00 00 00 00 00 00 A8 04 FA 04 80 B2 8B 02 10 00 00 00 Romulus (rom): built orbital battery
---- ----------- ----------- ----- ----- ----- ----- -- ----- -- ----------- ----- ----- ----------- ----------- ----------- -----------
entr size resultId race unk1 type emp1 | unk2 | sysId flgs1 cntT flags2 subAddr contentAddr contentSize
nbr 0x00 | ?evt 0x10 0x20 0x28
race flags
3: economic result header with diplomatic ordInfo sub-entry (little endian)
Code: Select all
<03> 28 00 00 00 | EC 00 00 00 00 00 FF FF 00 05 00 00 11 00 00 00 FF FF FF FF 00 80 14 00 00 00 00 00 A8 12 ED 03 70 E5 C5 02 10 00 00 00 Diplomacy (rom): please keep sabotaging the klingons
<47> 28 00 00 00 | C9 55 55 55 02 00 FF FF 00 05 00 00 06 00 00 00 FF FF FF FF 00 80 15 00 00 00 00 00 78 10 FA 04 48 8D C5 02 10 00 00 00 Diplomacy (fed): rejected alliance or war pact
<48> 28 00 00 00 | CA 55 55 55 02 00 00 00 00 05 00 00 06 FF FF FB FF FF FF FF 00 00 19 00 00 00 00 00 D8 0A FA 04 C8 94 ED 03 10 00 00 00 Diplomacy (fed): sent ferengi 7335 credits
<61> 28 00 00 00 | 4E 00 00 80 03 00 00 00 00 05 00 00 0A FF FF 00 FF FF FF FF 00 00 17 00 00 00 00 00 08 0E FA 04 D8 E6 ED 03 10 00 00 00 Diplomacy (fed): demand 5345 credits, immediate
<72> 28 00 00 00 | 9A 55 55 D5 19 00 FF FF 00 05 00 00 04 00 00 00 FF FF FF FF 00 00 15 00 00 00 00 00 28 09 FA 04 40 3D ED 03 10 00 00 00 Diplomacy (ferg): Selay ??friendship
<73> 28 00 00 00 | 9B 55 55 D5 1B 00 00 00 00 05 00 00 04 FF FF FB FF FF FF FF 00 00 19 00 00 00 00 00 F8 27 C5 02 B0 94 ED 03 10 00 00 00 Diplomacy (ferg): sent takarians 665 credits
---- ----------- ----------- ----- ----- ----- ----- -- ----- -- ----------- ----- ----- ----------- ----------- ----------- -----------
entr size resultId race unk1 type emp1 | unk2 | ?unused flgs1 cntT flags2 subAddr contentAddr contentSize
nbr 0x00 | ?evt 0x10 0x20 0x28
race flags
4: military result header (little endian)
Code: Select all
<01> 28 00 00 00 | EA 00 00 00 00 00 FF FF 00 03 00 00 01 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 90 EC 8B 02 9C 00 00 00 card
<02> 28 00 00 00 | EB 00 00 00 00 00 FF FF 00 03 00 00 01 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 C8 12 C5 02 9C 00 00 00 card
<04> 28 00 00 00 | ED 00 00 00 00 00 FF FF 00 03 00 00 03 00 00 00 00 00 00 00 00 00 24 00 00 00 00 00 00 00 00 00 78 1C 8B 02 9C 00 00 00 card/fed
<05> 28 00 00 00 | EE 00 00 00 00 00 FF FF 00 03 00 00 05 00 00 00 00 00 00 00 00 00 24 00 00 00 00 00 00 00 00 00 A0 31 8B 02 9C 00 00 00 card/ferg
<06> 28 00 00 00 | EF 00 00 00 00 00 00 00 00 03 00 00 01 00 00 00 FF FF FF FF 00 80 0A 00 00 80 00 00 00 00 00 00 80 33 8B 02 9C 00 00 00 card: Nausicaan discovered in R1
<07> 28 00 00 00 | F0 00 00 00 00 00 FF FF 00 03 00 00 01 00 00 00 01 00 00 00 00 80 09 00 00 00 00 00 00 00 00 00 A8 22 C5 02 9C 00 00 00 card Ruah U15: 1 cruiser2
<08> 28 00 00 00 | F1 00 00 00 00 00 FF FF 00 03 00 00 01 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 80 81 79 01 9C 00 00 00 card
<09> 28 00 00 00 | F2 00 00 00 00 00 00 00 00 03 00 00 01 FF FF 10 FF FF 84 01 00 80 05 00 00 00 00 00 00 00 00 00 88 8D ED 03 9C 00 00 00 card: ship 84 01 got destroyed, still listed by AgtSh0, but missing from GShipList
<16> 28 00 00 00 | 6E AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 00 04 00 00 00 00 00 00 00 00 00 10 EF 8B 02 9C 00 00 00 fed
<17> 28 00 00 00 | 6F AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 00 04 00 00 00 00 00 00 00 00 00 E8 4B C5 02 9C 00 00 00 fed
<18> 28 00 00 00 | 70 AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 00 04 00 00 00 00 00 00 00 00 00 80 15 C5 02 9C 00 00 00 fed
<19> 28 00 00 00 | 71 AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 38 1B 8B 02 9C 00 00 00 fed
<20> 28 00 00 00 | 72 AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 F8 20 C5 02 9C 00 00 00 fed
<21> 28 00 00 00 | 73 AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 78 56 C5 02 9C 00 00 00 fed
<22> 28 00 00 00 | 74 AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 D0 21 C5 02 9C 00 00 00 fed
<23> 28 00 00 00 | 75 AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 F0 11 C5 02 9C 00 00 00 fed
<24> 28 00 00 00 | 76 AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 A8 14 C5 02 9C 00 00 00 fed
<25> 28 00 00 00 | 77 AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 B8 1D 8B 02 9C 00 00 00 fed
<26> 28 00 00 00 | 78 AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 A8 DF 88 03 9C 00 00 00 fed
<27> 28 00 00 00 | 79 AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 A8 25 C5 02 9C 00 00 00 fed
<28> 28 00 00 00 | 7A AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 E0 69 8B 02 9C 00 00 00 fed
<29> 28 00 00 00 | 7B AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 E0 66 8B 02 9C 00 00 00 fed
<30> 28 00 00 00 | 7C AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 C0 34 8B 02 9C 00 00 00 fed
<31> 28 00 00 00 | 7D AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 60 35 8B 02 9C 00 00 00 fed
<32> 28 00 00 00 | 7E AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 18 09 8B 02 9C 00 00 00 fed
<33> 28 00 00 00 | 7F AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 80 67 8B 02 9C 00 00 00 fed
<34> 28 00 00 00 | 80 AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 18 1D 8B 02 9C 00 00 00 fed
<35> 28 00 00 00 | 81 AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 00 36 8B 02 9C 00 00 00 fed
<36> 28 00 00 00 | 82 AB AA 2A 01 00 FF FF 00 03 00 00 02 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 A0 36 8B 02 9C 00 00 00 fed
<37> 28 00 00 00 | 83 AB AA 2A 01 00 FF FF 00 03 00 00 12 00 00 00 00 00 00 00 00 00 24 00 00 00 00 00 00 00 00 00 D8 1B 8B 02 9C 00 00 00 fed/rom
<45> 28 00 00 00 | C7 55 55 55 02 00 FF FF 00 03 00 00 04 00 00 00 FF FF FF FF 00 00 04 00 00 00 00 00 00 00 00 00 D0 ED 8B 02 9C 00 00 00 ferg
<46> 28 00 00 00 | C8 55 55 55 02 00 FF FF 00 03 00 00 04 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 98 1A 8B 02 9C 00 00 00 ferg
<50> 28 00 00 00 | CC 55 55 55 02 00 00 00 00 03 00 00 04 FF FF 10 FF FF 6A 01 00 80 05 00 00 00 00 00 00 00 00 00 28 8E ED 03 9C 00 00 00 ferg: ship 6A 01 got destroyed, still listed by AgtSh2, but missing from GShipList
<57> 28 00 00 00 | 4A 00 00 80 03 00 FF FF 00 03 00 00 0A 00 00 00 00 00 00 00 00 00 24 00 00 00 00 00 00 00 00 00 F8 19 8B 02 9C 00 00 00 klng/fed
<58> 28 00 00 00 | 4B 00 00 80 03 00 00 00 00 03 00 00 00 FF FF FB FF FF FF FF 00 00 05 00 00 00 00 00 00 00 00 00 00 54 FA 04 9C 00 00 00 klng: built Scout II "IKC Dughro' B" in Eden
<59> 28 00 00 00 | 4C 00 00 80 03 00 00 00 00 03 00 00 08 00 00 00 FF FF FF FF 00 00 04 00 00 00 00 00 00 00 00 00 A0 54 FA 04 9C 00 00 00 klng
<62> 28 00 00 00 | 3D AB AA AA 04 00 FF FF 00 03 00 00 10 00 00 00 FF FF FF FF 00 00 04 00 00 00 00 00 00 00 00 00 20 34 8B 02 9C 00 00 00 rom
<63> 28 00 00 00 | 3E AB AA AA 04 00 FF FF 00 03 00 00 10 00 00 00 FF FF FF FF 00 00 04 00 00 00 00 00 00 00 00 00 30 8A 79 01 9C 00 00 00 rom
<64> 28 00 00 00 | 3F AB AA AA 04 00 FF FF 00 03 00 00 10 00 00 00 FF FF FF FF 00 80 04 00 00 00 00 00 00 00 00 00 E8 87 79 01 9C 00 00 00 rom
<65> 28 00 00 00 | 40 AB AA AA 04 00 FF FF 00 03 00 00 11 00 00 00 00 00 00 00 00 00 24 00 00 00 00 00 00 00 00 00 80 26 C5 02 9C 00 00 00 rom/card
<66> 28 00 00 00 | 41 AB AA AA 04 00 FF FF 00 03 00 00 12 00 00 00 00 00 00 00 00 00 24 00 00 00 00 00 00 00 00 00 40 69 8B 02 9C 00 00 00 rom/fed
<67> 28 00 00 00 | 42 AB AA AA 04 00 FF FF 00 03 00 00 12 00 00 00 01 00 00 00 00 00 10 00 00 00 00 80 00 00 00 00 60 53 FA 04 9C 00 00 00 rom/fed: 5 rom cruisers attack Qualor
<70> 28 00 00 00 | 98 55 55 D5 26 00 FF FF 00 03 00 00 00 00 00 00 FF FF FF FF 00 00 05 00 00 00 00 00 00 00 00 00 78 08 8B 02 9C 00 00 00 chodak alien / Juggernaut
<71> 28 00 00 00 | 99 55 55 D5 26 00 FF FF 00 03 00 00 40 00 00 00 FF FF FF FF 00 00 04 00 00 00 00 00 00 00 00 00 40 37 8B 02 9C 00 00 00 chodak alien / Juggernaut
<74> 28 00 00 00 | 9C 55 55 D5 17 00 00 00 00 03 00 00 00 00 00 00 FF FF FF FF 00 80 0A 00 00 80 00 00 00 00 00 00 E0 32 8B 02 9C 00 00 00 Nausicaan: card discovered in R1
---- ----------- ----------- ----- ----- ----- ----- -- ----- -- ----- ----- ----- ----- ----------- ----------- ----------- -----------
entr size resultId race unk1 type emp1 | unk2 | unk4 shpId flgs1 cntT flags2 subAddr contentAddr contentSize
nbr 0x00 | ?evt ----------- 0x28
race flags ?deps->evt
5: military result header with military ordInfo sub-entry (little endian)
Code: Select all
<10> 28 00 00 00 | F3 00 00 00 00 00 FF FF 00 03 00 00 01 00 00 00 01 00 00 00 00 80 13 00 00 00 00 00 18 C4 C5 02 30 ED 8B 02 9C 00 00 00 card Canopus: 1 colony ship2
<51> 28 00 00 00 | CD 55 55 55 02 00 00 00 00 03 00 00 04 00 00 00 FF FF FF FF 00 80 10 00 00 01 00 00 38 10 ED 03 70 EE 8B 02 9C 00 00 00 ferg Moab: 1 light raider II
---- ----------- ----------- ----- ----- ----- ----- -- ----- -- ----- ----- ----- ----- ----------- ----------- ----------- -----------
entr size resultId race unk1 type emp1 | unk2 | unk4 shpId flgs1 cntT flags2 subAddr contentAddr contentSize
nbr 0x00 | ?evt ----------- 0x28
race flags ?deps->evt
6: intel result header (little endian)
Code: Select all
<14> 28 00 00 00 | F7 00 00 00 00 00 00 00 00 04 00 00 00 FF FF FB FF FF FF FF 00 80 00 00 00 00 00 00 00 00 00 00 58 E8 8B 02 74 00 00 00 discovored military structure of the federation
<15> 28 00 00 00 | F8 00 00 00 00 00 00 00 00 04 00 00 00 FF FF 00 FF FF FF FF 00 80 00 00 00 00 00 00 00 00 00 00 88 01 8B 02 74 00 00 00 lost important spion to the ferengi
<44> 28 00 00 00 | 8A AB AA 2A 01 00 00 00 00 04 00 00 00 FF FF FB FF FF FF FF 00 80 00 00 00 00 00 00 00 00 00 00 00 02 8B 02 74 00 00 00 enemy agents received secret military data
<55> 28 00 00 00 | D1 55 55 55 02 00 00 00 00 04 00 00 00 FF FF A2 FF FF FF FF 00 80 00 00 00 00 00 00 00 00 00 00 E0 E7 8B 02 74 00 00 00 repelled cardassian sabotage network
---- ----------- ----------- ----- ----- ----- ----- -- ----- -- ----------- ----- ----- ----------- ----------- ----------- -----------
entr size resultId race unk1 type emp1 | unk2 | ?unused flgs1 cntT flags2 subAddr contentAddr contentSize
nbr 0x00 | ?evt 0x10 0x20 0x28
race flags
entr nbr: the save7.sav result.lst entry number
size: Uncompressed chunk data size of the result header.
0x00-0x03 resultId: incremented unique result number, starting at different offsets for the races:
card: 01 00 00 00 (little endian) = 1
fed: AA AA AA 2A (little endian) = max_uint * 1/6
ferg: 55 55 55 55 (little endian) = max_uint * 2/6
klng: FF FF FF 7F (little endian) = max_uint * 3/6
rom: AA AA AA AA (little endian) = max_uint * 4/6
max_uint (unsigned) = 0xFFFFFFFF = 4294967295 decimal
The klingon 0x8000004D here ofc flipped all F when it reached 0x80000000.
0x04-0x05 race: the race id (card:0 fed:1 ferg:2 klng:3 rom:4 like usual)
0x06-0x07 unk1: unknown, sometimes FF FF = -1
0x08-0x0B type: the entry type
00 00 ?? none in save7, but refer bottom ordInfo
00 01 for economic results (little endian)
00 02 ?? none in save7, but refer bottom ordInfo
00 03 for military results
00 04 for intel results
00 05 for diplomatic results
00 06 for mp ship update
00 07 for labor results
0x0C-0x0D emp1: always empty 00 from what I've seen
0x0E race flags: flags for all the involved races (card:1 fed:2 ferg:4 klng:8 rom:10, no minors)
0x0F evt: likely some event type identifier
10 -> ship destroyed in battle, cntT = 05
9D -> ship or structure gained
B5 -> ship or structure lost
D1 -> ship lost on system attack
FB -> unit spawned, shared for at least result2, ship, intel and diplomacy results
---------
economic ordInfo results:
0x10-0x13 sysId: system/star id, but this isn't consistent for other entry types, see below
military results:
0x10-0x11 unk4: For military results, this obviously is not the system id. It might be some boolean, I dunno.
0x12-0x13 shpId: Instead of the system id, we now sometimes have a ship id listed.
---------
0x14-0x15 flags1: some event dependent flags it seems
0x16-0x17 cntT: content related event type
00 'none', shared for economic, intel and other results
- economic results
06 EnergyShortage,
1F EnthusedTrading, happy trading happening
40 PlanetaryShift, when a planet gets barren
- military results
04 TaskForceEvent for movement, details list the task force id
05 ShipEvent for ships built or lost, details list the ship id
09 Unknown, but occured with one cruiser that possibly reached home destination, details list the sector index
0A RaceDiscovery, when a race got discovered, no task force, sector or system details...
10 SystemManeuver, happens by system attack and system protect it seems, details list both the system and task force id
13 Terraformed, happens on terraform progress or completion, details list both the system and task force id
24 Combat, occures by encounter or battle, the race flags have always more than one race listed, but no task force...
- diplomatic results
14 Encouragement, when sabotage is encouraged
15 Rejection, when some alliance or war pact is rejected
17 Demand, a demand for credits is sent
19 Gift, when credits are sent
0x18-0x1B flags2: some event dependent flags it seems
0x1C-0x1F subAddr: most likely the loaded memory address of the ordInfo sub-entry data
0x20-0x23 contentAddr: most likely the loaded memory address of the content data
0x24-0x27 contentSize: the content entry data size
That's for the entry header, next comes the actual data contents I analysed.
edit: updated intelInfo analysis