fot-save-edit/format.txt

112 lines
No EOL
2.2 KiB
Text

FString format - uint32_t len, 31 bit represents encoding where 0 is UTF-7 (ASCII), and 1 is UTF-16 (WCS-2)
Tag format
<TAG>\0version\0
/*<zar>
uint32_t unk1
uint32_t unk2
uint8_t unk3 ?
uint32_t unk4
0x46C - <zar> + 0x15 + (unk4 << 2) - B2 00
0x46D - unk5
next zar = <zar> + 0x1A + unk5
0xBC22 + (0x100<<2) = unk5 0x7659*/
<saveh>
uint8_t unk1
FString unknown
FString name
FString location
FString date
<campaign_save>
uint32_t unk1 - used in calloc, unk1 * 0x10C
<world>
uint32_t uncompressed_size;
uint32_t uncompressed_size;
*compressed world data*
<sgd>
uint8_t unk1[0x48]
uint32_t N - num strings
FString[N] - names
uint32_t M
M times - replics (dialog lines)
uint32_t K - num strings
FString[K]
<SSG>
uint8_t unk1[0x14]
<entity_file>
uint32_t N
FString[N] - entity types
uint16_t <esh> count
uint32_t unk1
count times - 1 (because entity id are indexed from 1)
uint32_t flags?
uint16_t type_idx
<esh>
<entity>
FString entity type
<esh>
<esh>
uint32_t N
N times
FString name
uint32_t type
uint32_t dataSize
uint8_t data[dataSize]
esh data types
1 - bool, 1 byte
2 - float, 4 byte
3 - int32_t/uint32_t
4 - FString
5 - entity? FString?
8 - FString (Sprite)
9 - FString
11 - esbin
12 - entity flags
uint16_t entity_id
uint16_t flags
13 - frame, 48 bytes -- multiply all numbers by 4.0. I have strong feeling that it is
// a 3x4 translation transform matrix, because one of the dumps showed it was
uint8_t unk1[0x24]
float c
float b
float a
14 - rect, 16 bytes
int32_t top
int32_t left
int32_t right
int32_t bottom
21 - FString
25 - FString
Attributes - player stats and skills
Modifiers - same as Attributes but applying new values to Attributes
Attribute - ESH
int levSincePerk
bool Binary
esbin
u32 section_size
<attribs>
int stats[7]
int traits[11]
int derived[26]
int skills[18]
bool skill_tags[18]
bool opt_traits[27]
bool type[11]
int perks[111]
int addictions[10]