Re: Inside of Stars! Files |
Mon, 18 July 2011 10:42 |
|
XyliGUN | | | Messages: 325
Registered: July 2004 Location: Russia, St.Petersburg |
|
|
In general any Stars! file consists of blocks. All blocks data in any files except the first block in file are encrypted (there is one exclusion, I’ll mention it later). Each block have 2 bytes header followed by data of variable length. Header contains block type and block length. First header byte is a low 8 bits of the block size. Low 2 bits of the second byte is a high 2 bits of the block size and high 6 bits of the second byte is a block type. Each block in file can have up to 1024 bytes of data.
So, here is a header block bitwise: XXXXXXXX YYYYYYZZ
(XXXXXXXX is a first byte, YYYYYYZZ is a second byte)
Where:
-> YYYYYY is a block type.
-> ZZXXXXXXXX is a block size.
Here is a list of blocks and their types I found so far. I’ve never met several of them in any game file, which I can access to, but you can try to find them in your own game files using this small command line tool (there is no decryption code, since block headers are never encrypted), and please if you find them let me know:
0. FileFooterBlock
1. ManualSmallLoadUnloadTaskBlock
2. ManualMediumLoadUnloadTaskBlock
3. WaypointDeleteBlock
4. WaypointAddBlock
5. WaypointChangeTaskBlock
6. PlayerBlock
7. PlanetsBlock
8. FileHeaderBlock
9. FileHashBlock
10. WaypointRepeatOrdersBlock
11. Never met it
12. EventsBlock
13. PlanetBlock
14. PartialPlanetBlock
15. Never met it
16. FleetBlock
17. PartialFleetBlock
18. Never met it
19. WaypointTaskBlock
20. WaypointBlock
21. FleetNameBlock
22. Never met it
23. MoveShipsBlock
24. FleetSplitBlock
25. ManualLargeLoadUnloadTaskBlock
26. DesignBlock
27. DesignChangeBlock
28. ProductionQueueBlock
29. ProductionQueueChangeBlock
30. BattlePlanBlock
31. BattleBlock (content isn't decoded yet)
32. CountersBlock
33. MessagesFilterBlock
34. ResearchChangeBlock
35. PlanetChangeBlock
36. ChangePasswordBlock
37. FleetsMergeBlock
38. PlayersRelationChangeBlock
39. BattleContinuationBlock (content isn't decoded yet)
40. MessageBlock
41. Record made by AI in H file (content isn't decoded yet)
42. SetFleetBattlePlanBlock
43. ObjectBlock
44. RenameFleetBlock
45. PlayerScoresBlock
46. SaveAndSubmitBlock
I’ll describe details of each of these blocks in the next posts.
[Updated on: Mon, 18 July 2011 10:46]
"Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
Robert A. Heinlein, Time Enough For LoveReport message to a moderator
|
|
|