forked from three-houses-research-team/010-binary-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTeaTimeData.bt
428 lines (406 loc) · 9.69 KB
/
TeaTimeData.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
//------------------------------------------------
//--- 010 Editor v9.0.2 Binary Template
//
// File: TeaTime.bin / 24.bin
// Authors: DeathChaos
// Version: 1.00
// Purpose: Three Houses character file mapping
// History
// 1.00 2019-08-31 DeathChaos - started thisProficiencies
//------------------------------------------------
//---------------------------------------------
// Includes
//---------------------------------------------
#include "3H_Enums.bt"
LittleEndian();
local int i<hidden=true>;
struct File{
struct SectionPointers{
uint32 NumberOfSectionPointers;
uint32 PointerToUnk1<bgcolor=cRed>;
uint32 Unk1StructSize<bgcolor=cRed>;
uint32 PointerToUnk2<bgcolor=cBlue>;
uint32 Unk2StructSize<bgcolor=cBlue>;
uint32 PointerToUnk3<bgcolor=cPurple>;
uint32 Unk3StructSize<bgcolor=cPurple>;
uint32 PointerToUnk4<bgcolor=cDkBlue>;
uint32 Unk4StructSize<bgcolor=cDkBlue>;
uint32 PointerToRecruitRanks<bgcolor=cDkYellow>;
uint32 RecruitRanksStructSize<bgcolor=cDkYellow>;
uint32 PointerToUnk5<bgcolor=cBlack>;
uint32 Unk5StructSize<bgcolor=cBlack>;
uint32 PointerToUnk6<bgcolor=cGreen>;
uint32 Unk6StructSize<bgcolor=cGreen>;
uint32 PointerToUnk7<bgcolor=cDkRed>;
uint32 Unk7StructSize<bgcolor=cDkRed>;
uint32 PointerToUnk8<bgcolor=cDkPurple>;
uint32 Unk8StructSize<bgcolor=cDkPurple>;
uint32 PointerToUnk9<bgcolor=cDkGreen>;
uint32 Unk9StructSize<bgcolor=cDkGreen>;
uint32 PointerToFavTeaLeaves<bgcolor=cLtGreen>;
uint32 FavTeaLeavesStructSize<bgcolor=cLtGreen>;
uint32 PointerToFinalComment<bgcolor=cLtRed>;
uint32 FinalCommentStructSize<bgcolor=cLtRed>;
uint32 PointerToTeaAnswers1<bgcolor=cLtBlue>;
uint32 TeaAnswers1StructSize<bgcolor=cLtBlue>;
uint32 PointerToTeaAnswers2<bgcolor=cLtPurple>;
uint32 TeaAnswers2StructSize<bgcolor=cLtPurple>;
}sectionpointers<name="Section Pointers">;
FSeek(sectionpointers.PointerToUnk1);
struct Unk1{
uint32 Unk1Magic;
uint32 numunk1;
uint32 SizeOfUnk1;
struct Unk1Padding{
byte Padding[0x34];
}unk1padding<name="Padding">;
struct UnknownSection1{
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
}unknownsection1[numunk1]<name="Unknown Section1">;
}unk1<name="Unknown Section 1",bgcolor=cRed>;
FSeek(sectionpointers.PointerToUnk2);
struct Unk2{
uint32 Unk2Magic;
uint32 numunk2;
uint32 SizeOfUnk2;
struct Unk2Padding{
byte Padding[0x34];
}unk2padding<name="Padding">;
struct UnknownSection2{
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
}unknownsection2[numunk2]<name="Unknown Section2">;
}unk2<name="Unknown Section 2",bgcolor=cBlue>;
FSeek(sectionpointers.PointerToUnk3);
struct Unk3{
uint32 Unk3Magic;
uint32 numunk3;
uint32 SizeOfUnk3;
struct Unk3Padding{
byte Padding[0x34];
}unk3padding<name="Padding">;
struct UnknownSection3{
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
}unknownsection3[numunk3]<name="Unknown Section3">;
}unk3<name="Unknown Section 3",bgcolor=cPurple>;
FSeek(sectionpointers.PointerToUnk4);
struct Unk4{
uint32 Unk4Magic;
uint32 numunk4;
uint32 SizeOfUnk4;
struct Unk4Padding{
byte Padding[0x34];
}unk4padding<name="Padding">;
struct UnknownSection4{
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
}unknownsection4[numunk4]<name="Unknown Section4">;
}unk4<name="Unknown Section 4",bgcolor=cDkBlue>;
FSeek(sectionpointers.PointerToRecruitRanks);
struct RecruitRanks{
uint32 RecruitRanksMagic;
uint32 numRecruitRanks;
uint32 SizeOfRecruitRanks;
struct RecruitRanksPadding{
byte Padding[0x34];
}recruitrankspadding<name="Padding">;
struct RecruitRank{
uint16 unk1<name="Story Flags?">;
uint16 unk2<name="Always FF FF">;
MinRanks Req<name="Requirement Type">;
CharID charID<name="Character">;
RankStats SkillLvReq<name="Skill Level Required">;
ClassName BeginnerClass<name="Starting Class">;
ubyte StatReq1<name="Stat Amount Required">;
Level LvReq<name="Level Required">;
CharStat StatReq2<name="Stat Type Required">;
ClassName IntermediateClass<name="Intermediate Class">;
uint16 SylvainFlag<name="The Sylvain Flag">;
}recruitrank[numRecruitRanks]<name="Recruit Conditions",read=GetName>;
}recruitranks<name="Recruit Conditions",bgcolor=cDkYellow>;
FSeek(sectionpointers.PointerToUnk5);
struct Unk5{
uint32 Unk5Magic;
uint32 numunk5;
uint32 SizeOfUnk5;
struct Unk5Padding{
byte Padding[0x34];
}unk5padding<name="Padding">;
struct UnknownSection5{
ubyte unk;
ubyte unk;
ubyte unk;
ubyte unk;
ubyte unk;
ubyte unk;
}unknownsection5[numunk5]<name="Unknown Section4">;
}unk5<name="Unknown Section 5",bgcolor=cBlack>;
FSeek(sectionpointers.PointerToUnk6);
struct Unk6{
uint32 Unk6Magic;
uint32 numunk6;
uint32 SizeOfUnk6;
struct Unk6Padding{
byte Padding[0x34];
}unk6padding<name="Padding">;
struct UnknownSection6{
ubyte unk;
ubyte unk;
ubyte unk;
ubyte unk;
ubyte unk;
ubyte unk;
}unknownsection6[numunk6]<name="Unknown Section4">;
}unk6<name="Unknown Section 6",bgcolor=cGreen>;
FSeek(sectionpointers.PointerToUnk7);
struct UnknownSection7{
uint32 unk7Magic;
uint32 numunk7;
uint32 SizeOfunk7;
struct Unk7Padding{
byte Padding[0x34];
}unk7padding<name="Padding">;
struct Unk7{
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
ubyte unk;
CharID CharacterID;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
}unk7[numunk7]<name="Recruit Conditions 2",read=GetName2>;
}unknownsection7<name="Recruit Conditions 2",bgcolor=cDkRed>;
FSeek(sectionpointers.PointerToUnk8);
struct Unk8{
uint32 Unk8Magic;
uint32 numunk8;
uint32 SizeOfUnk8;
struct Unk8Padding{
byte Padding[0x34];
}unk8padding<name="Padding">;
struct UnknownSection8{
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
}unknownsection8[numunk8]<name="Unknown Section8">;
}unk8<name="Unknown Section 8",bgcolor=cDkPurple>;
FSeek(sectionpointers.PointerToUnk9);
struct Unk9{
uint32 Unk9Magic;
uint32 numunk9;
uint32 SizeOfUnk9;
struct Unk9Padding{
byte Padding[0x34];
}unk9padding<name="Padding">;
struct UnknownSection9{
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
uint16 unk;
}unknownsection9[numunk9]<name="Unknown Section9">;
}unk9<name="Unknown Section 9",bgcolor=cDkGreen>;
FSeek(sectionpointers.PointerToFavTeaLeaves);
struct FavoriteTeaLeaves{
uint32 TeaMagic;
uint32 numFavoriteTea;
uint32 SizeOfFavoriteTea;
struct TeaPadding{
byte Padding[0x34];
}teapadding<name="Padding">;
struct FavoriteTea{
ubyte unk;
CharID CharacterID;
ubyte unk;
ubyte unk;
ubyte unk;
MiscItem tea<name="Favorite Tea">;
MiscItem tea<name="Favorite Tea">;
MiscItem tea<name="Favorite Tea">;
MiscItem tea<name="Favorite Tea">;
}favoritetea[numFavoriteTea]<name="Favorite Tea Leaves",read=GetName3>;
}favoritelealeaves<name="Favorite Tea Leaves",bgcolor=cLtGreen>;
FSeek(sectionpointers.PointerToFinalComment);
struct FinalComment{
uint32 TeaMagic;
uint32 numFinalComment;
uint32 SizeOfFinalComment;
struct CommentPadding{
byte Padding[0x34];
}commentpadding<name="Padding">;
struct FinalTeaComment{
CharID CharacterID;
ubyte unk;
ubyte CommentID;
TrueFalse Nod;
TrueFalse Laugh;
TrueFalse Commend;
TrueFalse Disagree;
TrueFalse Admonish;
TrueFalse Sigh;
TrueFalse Chat;
TrueFalse SipTea;
TrueFalse Blush;
TrueFalse Praise;
ubyte pad;
}finalteacomment[numFinalComment]<name="Final Comment",read=GetName4>;
}finalcomment<name="Final Comment",bgcolor=cLtRed>;
}file;
string GetName(RecruitRank& value)
{
return EnumToString(value.charID);
}
string GetName2(Unk7& value)
{
return EnumToString(value.CharacterID);
}
string GetName4(FinalTeaComment& value)
{
return EnumToString(value.CharacterID);
}
string GetName3(FavoriteTea& value)
{
return EnumToString(value.CharacterID);
}