Posted January 25, 2014
Pretty-printed the format; there's so many "0 padding bytes" that I think it's clear these are 16-bit fields. Makes the formats a bit easier to read, too.. =)
Crime files
-----------
Header (4 bytes)
ofs | datatype | description
----+----------+------------
0 | 16 bits | Number of participants
2 | 16 bits | Number of events
Followed by participant records
Participants (48 bytes)
ofs | datatype | description
----+----------+------------
0 | 16 bits | always 0xffff
2 | 16 bits | ?
4 | asciiz | 32 bytes for participant role + zero byte
36 | 16 bits | ?
38 | byte | Mastermind flag. 1 for mastermind, 0 for normal
39 | byte | ?
40 | 16 bits | always 0
42 | 16 bits | ?
44 | 16 bits | Rank of Participant, used solely for scoring
46 | 16 bits | ?
Followed by event records
Events (44 bytes)
ofs | datatype | description
----+----------+------------
0 | 16 bits | Person doing the event (so person sending a message or committing a crime)
2 | 16 bits | Always 0
4 | 16 bits | Message ID
6 | asciiz | 32 bytes for description of event + zero byte
38 | byte | Person the event is happening to (00 for crimes)
39 | byte | Type of event.
40 | byte | Bit-mask of items received by the person doing the event.
41 | byte | Bit-mask of items destroyed by the event.
42 | 16 bits | Score of event.
Note that last event is always just a special marker (empty event) starting with 0xff as the first field, otherwise zero.
Followed by objects until end of file
Objects (18 bytes)
ofs | datatype | description
----+----------+------------
0 | asciiz | 16 bytes for name of object + zero byte
17 | byte | Picture ID of object
18 | byte | Always 0xff
Event types are:
id | name
---+-----
02 | Sent message
03 | Received message
08 | Met with
09 | Was met by
20 | Crime
02/03 and 08/09 must happen in pairs
Picture IDs are:
id | name
---+-----
00 | Processed Drugs
01 | Sniper Rifle
01 | Weapons
02 | Raw Drugs
03 | Chemicals
03 | Supplies
04 | Explosives
05 | Alarm Bypass
05 | Product
06 | Photographs
07 | Hostage
07 | Pilot
07 | Escapee
08 | Bomb
09 | Payoff
09 | $1,000,000
09 | Gold Coin
0a | Photographs
0b | Camera
0c | Blueprints
0c | Mission Plans
0d | Stolen Goods
0d | Jeep
0d | Sample Item
0d | Forgery
0d | Equipment
0e | Passwords
Crime files
-----------
Header (4 bytes)
ofs | datatype | description
----+----------+------------
0 | 16 bits | Number of participants
2 | 16 bits | Number of events
Followed by participant records
Participants (48 bytes)
ofs | datatype | description
----+----------+------------
0 | 16 bits | always 0xffff
2 | 16 bits | ?
4 | asciiz | 32 bytes for participant role + zero byte
36 | 16 bits | ?
38 | byte | Mastermind flag. 1 for mastermind, 0 for normal
39 | byte | ?
40 | 16 bits | always 0
42 | 16 bits | ?
44 | 16 bits | Rank of Participant, used solely for scoring
46 | 16 bits | ?
Followed by event records
Events (44 bytes)
ofs | datatype | description
----+----------+------------
0 | 16 bits | Person doing the event (so person sending a message or committing a crime)
2 | 16 bits | Always 0
4 | 16 bits | Message ID
6 | asciiz | 32 bytes for description of event + zero byte
38 | byte | Person the event is happening to (00 for crimes)
39 | byte | Type of event.
40 | byte | Bit-mask of items received by the person doing the event.
41 | byte | Bit-mask of items destroyed by the event.
42 | 16 bits | Score of event.
Note that last event is always just a special marker (empty event) starting with 0xff as the first field, otherwise zero.
Followed by objects until end of file
Objects (18 bytes)
ofs | datatype | description
----+----------+------------
0 | asciiz | 16 bytes for name of object + zero byte
17 | byte | Picture ID of object
18 | byte | Always 0xff
Event types are:
id | name
---+-----
02 | Sent message
03 | Received message
08 | Met with
09 | Was met by
20 | Crime
02/03 and 08/09 must happen in pairs
Picture IDs are:
id | name
---+-----
00 | Processed Drugs
01 | Sniper Rifle
01 | Weapons
02 | Raw Drugs
03 | Chemicals
03 | Supplies
04 | Explosives
05 | Alarm Bypass
05 | Product
06 | Photographs
07 | Hostage
07 | Pilot
07 | Escapee
08 | Bomb
09 | Payoff
09 | $1,000,000
09 | Gold Coin
0a | Photographs
0b | Camera
0c | Blueprints
0c | Mission Plans
0d | Stolen Goods
0d | Jeep
0d | Sample Item
0d | Forgery
0d | Equipment
0e | Passwords