forked from three-houses-research-team/010-binary-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMiscItems 31.bt
85 lines (76 loc) · 1.89 KB
/
MiscItems 31.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
//------------------------------------------------
//--- 010 Editor v9.0.2 Binary Template
//
// File:
// Authors:
// Version:
// Purpose:
// History:
//------------------------------------------------
#include "3H_Enums.bt"
enum<ubyte> ItemTypes
{
Bait,
Seeds,
Ore,
Fish,
Produce,
Meat,
Tea,
};
enum<ubyte> Stars
{
_1_Star,
_2_Star,
_3_Star,
_4_Star,
_5_star,
};
LittleEndian();
local int i<hidden=true>;
struct FILE {
struct HEADER {
uint Header;
uint PointertoTable1;
uint SizeofTable1;
uint PointertoTable2;
uint SizeofTable2;
}Header<fgcolor=cLtBlue>;
FSeek(Header.PointertoTable1);
struct TABLE1 {
uint Header<bgcolor=cRed>;
uint Table1Num<bgcolor=cRed>;
uint Table1Size<bgcolor=cRed>;
ubyte Padding[0x34]<bgcolor=cBlue>;
struct TABLE1DATA {
for( i = 0; i < Table1Num; i++ )
{
struct ITEMDATA {
local MiscItem NameofItems<hidden=true>;
NameofItems = i;
int Price;
ubyte unk;
ubyte unk;
ItemTypes ItemType;
Stars Starlevel;
}ItemData<name="Item Data", read=GetItemNames>;
}
}Table1Data<name="Items", bgcolor=cLtGreen>;
}Table1<name="Item Table">;
FSeek(Header.PointertoTable2);
struct TABLE2 {
struct TABLE2HEADER {
uint Header;
uint Table2Num;
uint Table2Size;
ubyte Padding[0x34];
}Table2Header<bgcolor=cRed>;
struct TABLE2DATA {
ubyte Unk[Table2Header.Table2Size];
}Table2Data[Table2Header.Table2Num]<bgcolor=cLtBlue>;
}Table2;
}File;
string GetItemNames(ITEMDATA &p)
{
return EnumToString(p.NameofItems);
}