-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSave-Template.bt
124 lines (112 loc) · 3.35 KB
/
Save-Template.bt
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
//------------------------------------------------
//--- 010 Editor v10.0 Binary Template
//
// File:
// Authors:
// Version:
// Purpose:
// Category:
// File Mask:
// ID Bytes:
// History:
//------------------------------------------------
const int minVersionWithCosmic = 15;
const int minVersionWithHarmony = 12;
typedef struct {
short monsterId;
byte hasNickname<hidden=true>;
if (hasNickname) { FSkip(1); char nickname[ReadUByte(FTell() - 1)]<optimize=false>; }
short level;
short hp;
short sta;
short exp;
byte size<hidden=true, optimize=false>; if (size > 0) int skills[size];
byte size<hidden=true, optimize=false>; if (size > 0) int cores[size];
byte useGridAdapter;
if (useGridAdapter) {
string gridAdapter1;
int gridAdapter2;
int gridAdapter3;
byte gridAdapter4;
}
if (saveVersion >= minVersionWithCosmic) byte cosmic;
if (saveVersion >= minVersionWithHarmony) byte harmony;
} Monster;
typedef struct {
ubyte occupied;
if (occupied == 1) Monster monster;
} Slot;
typedef struct {
FSkip(1); char boxName[ReadUByte(FTell() - 1)];
int size1;
int size2;
Slot slot[size1]<optimize=false>;
} Box;
typedef struct {
int itemId;
int value;
} Item;
typedef struct {
int coins;
int diamonds;
int tokens;
} Wallet;
typedef struct {
uint saveVersion;
ubyte size<hidden=true, optimize=false>; if (size > 0) char buildDate[size];
ubyte size<hidden=true, optimize=false>; if (size > 0) char buildTarget[size];
ubyte size<hidden=true, optimize=false>; if (size > 0) char buildVersion[size];
ubyte size<hidden=true, optimize=false>; if (size > 0) char saveDateUtc[size];
ubyte size<hidden=true, optimize=false>; if (size > 0) char playerName[size];
ubyte size<hidden=true, optimize=false>; if (size > 0) char playerBody[size];
int playtimeSeconds;
ubyte size<hidden=true, optimize=false>; if (size > 0) char petBody[size];
int mapId;
int playerX;
int playerY;
FSkip(1); char playerDirection[ReadUByte(FTell() - 1)];
int checkpointMapId;
int checkpointX;
int checkpointY;
int volumeBGM;
int volumeSFX;
ubyte autoSaveEnabled;
FSkip(1); char languageId[ReadUByte(FTell() - 1)];
int size<hidden=true, optimize=false>; if (size > 0) Monster monsters[size]<optimize=false>;
int size<hidden=true, optimize=false>; Box storageBoxes[size]<optimize=false>;
int size<hidden=true, optimize=false>; Item items[size]<optimize=false>;
Wallet wallet;
} SaveData;
typedef struct {
enum <uint> SlotPosition {
TOP = 0xF73C5DB4,
MIDDLE = 0x65CA5D56,
BOTTOM = 0xA9F518D3,
UNK = 0x3D7878A0
} slotPosition<format=hex>;
uint unk2;
uint saveSize;
uint saveOffset<format=hex>;
} Ps4SlotHeader;
typedef struct {
string fallen; FSkip(1);
uint unk1;
uint unk2;
uint slotCount;
uint unk3;
Ps4SlotHeader ps4SlotHeader[slotCount];
local int i;
for (i = 0; i < slotCount; i++) {
FSeek(ps4SlotHeader[i].saveOffset);
if (ps4SlotHeader[i].slotPosition == UNK) {
byte unk[ps4SlotHeader[i].saveSize];
} else {
SaveData saveData;
}
}
} Ps4Header;
if (ReadString(FTell()) == "FALLEN") {
Ps4Header ps4Header<open=true>;
} else {
SaveData saveData<open=true>;
}