-
Notifications
You must be signed in to change notification settings - Fork 18
/
CalendarData.bt
258 lines (229 loc) · 9.51 KB
/
CalendarData.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
//------------------------------------------------
//--- 010 Editor v9.0.2 Binary Template
//
// File: 35.bin/ fixed_calendar.bin (patch3)
// Authors: NellsRelo
// Version: 0.80
// Purpose: Mapping of fixed_calendar.bin.
// History
// 0.80 2020-08-14 NellsRelo - Start
// 0.81 2020-11-18 [FF7] Sephiroth - Added tournament data to UnknownData5 / Unknown30Byte
//------------------------------------------------
#include "3H_Enums.bt";
#include "3H_CalendarEnums.bt";
LittleEndian();
local int i<hidden=true>;
struct HeaderPadding {
byte Padding[0x34]<bgcolor=cDkYellow>;
};
// Birthdays and Holidays (and something else)
struct CelebrationData {
int celebrationMagic<bgcolor=cLtGreen>;
int celebrationCount<bgcolor=cLtGreen>;
int celebrationSize<bgcolor=cLtGreen>;
HeaderPadding eventHeaderPadding<name="Padding">;
for( i = 0; i < celebrationCount; i++ ) {
struct Celebration {
local CalendarEvent celebrationName;
celebrationName = i;
//Determines who's birthday on Birthdays, unknown use on Type-3 events
CharID relatedCharID<bgcolor=cDkGreen,name="Related Unit">;
CharID relatedCharID2<bgcolor=cYellow,name="Related Unit (2)">;
CharID relatedCharID3<bgcolor=cYellow,name="Related Unit (3)">;
ubyte eventDay<bgcolor=cDkGreen,name="Day of the Month">;
// Note that these will be ordered by Celebration, not Character ID
CelebrationType eventType<bgcolor=cDkGreen,name="Type of Event">;
Month eventMonth<bgcolor=cDkGreen,name="Month">;
CelebrationActivity eventActivity<bgcolor=cDkGreen,name="Activity (Holidays)">;
ubyte unk1<bgcolor=cRed>;
// Celebration is visible on odd numbers, hidden on even ones
// Outlier is Jeritza's birthday, which uses a 2. Hidden outside
// of Crimson Flower?
DisplayCircumstances uncDisplayCircumstances<bgcolor=cYellow>;
} celebration<name="Celebration",read=getCelebrationName>;
};
};
// Covers Free days, missions, and beginning of the month
struct Schedule {
// Only ever -1, 10, 11, or 12 - Likely Bird/Crawler/Wolf
byte rareMonsterSighting<name="Rare Monster Sighting">;
// When enabling Battle during Chapter 1, the Battles list will
// be empty. During Chapter 2, even by enabling a map to show up
// in Chapter 2 in fixed_scenario.bin, it will be a Practice Battle,
// and attempting to load it will crash the game.
struct FreeDayOptions {
ubyte bit0 : 1<name="Disable Explore">;
ubyte bit1 : 1<name="Disable Battle">;
ubyte bit2 : 1<name="Disable Seminar">;
ubyte bit3 : 1<name="Disable Rest">;
} freeDayOptions<name="Free Day Options">;
Month month<name="Month">;
byte day<name="Day">;
// Sets the chosen day to be a specific day of the week (0-6)
// Uncertain which schedule's offset will take precedence with
// multiple Schedules in a month touching this.
byte weekDay<name="Weekday">;
FoodEvents foodEvent<name="Food Event">;
DayType dayType<name="Day Type">;
ChoirEvents choirEvent<name="Choir Event">;
byte unk1<bgcolor=cBlack>;
byte unk2<bgcolor=cBlack>;
GardenEvents gardenEvent<name="Gardening Event">;
FishEvents fishingEvent<name="Fishing Event">;
// Four distinct bytes makes sense in White Clouds, but not in
// other routes when they have their own section. Possible
// artifact from prior development?
TournamentType churchTournament<name="Tournament (Silver Snow)">;
TournamentType lionsTournament<name="Tournament (Azure Wind)">;
TournamentType deerTournament<name="Tournament (Verdant Wind)">;
TournamentType eaglesTournament<name="Tournament (Crimson Flower)">;
local string scheduleName = EnumToString(month);
};
struct AcademyScheduleData {
int scheduleMagic<bgcolor=cLtGreen>;
int scheduleCount<bgcolor=cLtGreen>;
int scheduleSize<bgcolor=cLtGreen>;
HeaderPadding scheduleHeaderPadding<name="Padding">;
Schedule schedule[scheduleCount]<read=getScheduleName,optimize=false,bgcolor=cPurple>;
};
struct ChurchScheduleData {
int scheduleMagic<bgcolor=cLtGreen>;
int scheduleCount<bgcolor=cLtGreen>;
int scheduleSize<bgcolor=cLtGreen>;
HeaderPadding scheduleHeaderPadding<name="Padding">;
Schedule schedule[scheduleCount]<read=getScheduleName,optimize=false,bgcolor=cSilver>;
};
struct LionsScheduleData {
int scheduleMagic<bgcolor=cLtGreen>;
int scheduleCount<bgcolor=cLtGreen>;
int scheduleSize<bgcolor=cLtGreen>;
HeaderPadding scheduleHeaderPadding<name="Padding">;
Schedule schedule[scheduleCount]<read=getScheduleName,optimize=false,bgcolor=cBlue>;
};
struct DeerScheduleData {
int scheduleMagic<bgcolor=cLtGreen>;
int scheduleCount<bgcolor=cLtGreen>;
int scheduleSize<bgcolor=cLtGreen>;
HeaderPadding scheduleHeaderPadding<name="Padding">;
Schedule schedule[scheduleCount]<read=getScheduleName,optimize=false,bgcolor=cDkGreen>;
};
struct EaglesScheduleData {
int scheduleMagic<bgcolor=cLtGreen>;
int scheduleCount<bgcolor=cLtGreen>;
int scheduleSize<bgcolor=cLtGreen>;
HeaderPadding scheduleHeaderPadding<name="Padding">;
Schedule schedule[scheduleCount]<read=getScheduleName,optimize=false,bgcolor=cRed>;
};
struct Unknown10Byte {
byte unk1;
byte unk2;
byte unk3;
byte unk4;
short unused1<bgcolor=cSilver>;
short unused2<bgcolor=cSilver>;
short unused3<bgcolor=cSilver>;
};
struct UnknownData1 {
int unkMagic<bgcolor=cLtGreen>;
int unkCount<bgcolor=cLtGreen>;
int unkSize<bgcolor=cLtGreen>;
HeaderPadding classdataheaderpadding<name="Padding">;
Unknown10Byte unknown[unkCount];
};
struct UnknownData2 {
int unkMagic<bgcolor=cLtGreen>;
int unkCount<bgcolor=cLtGreen>;
int unkSize<bgcolor=cLtGreen>;
HeaderPadding classdataheaderpadding<name="Padding">;
Unknown10Byte unknown[unkCount];
};
struct UnknownData3 {
int unkMagic<bgcolor=cLtGreen>;
int unkCount<bgcolor=cLtGreen>;
int unkSize<bgcolor=cLtGreen>;
HeaderPadding classdataheaderpadding<name="Padding">;
Unknown10Byte unknown[unkCount];
};
struct UnknownData4 {
int unkMagic<bgcolor=cLtGreen>;
int unkCount<bgcolor=cLtGreen>;
int unkSize<bgcolor=cLtGreen>;
HeaderPadding classdataheaderpadding<name="Padding">;
Unknown10Byte unknown[unkCount];
};
struct Unknown30Byte {
short padding<bgcolor=cBlue>;
short unk1<name="Prize Item", comment="put a comment here">;
short unk2<name="Gold reward #1">;
short unk3<name="Gold reward #2">;
short unk4<name="Gold reward #3">;
short unk5<name="Gold reward #4">;
short unk6<name="Gold reward #5">;
byte unk7<name="Player Magic?">;
byte unk8<name="Player Weapon">;
byte unk9<name="Heal amount">;
byte unk10<name="Displayed Recommended Level">;
byte unk11<name="Displayed tournament info">;
ubyte unk12<bgcolor=cYellow,name="Opponent 1", comment="put a comment here">;
ubyte unk13<bgcolor=cYellow,name="Opponent 2", comment="put a comment here">;
ubyte unk14<bgcolor=cYellow,name="Opponent 3", comment="put a comment here">;
ubyte unk15<bgcolor=cYellow,name="Opponent 4", comment="put a comment here">;
ubyte unk16<bgcolor=cYellow,name="Opponent 5", comment="put a comment here">;
byte unk17<name="Opponent 1 Level", comment="put a comment here">;
byte unk18<name="Opponent 2 Level", comment="put a comment here">;
byte unk19<name="Opponent 3 Level", comment="put a comment here">;
byte unk20<name="Opponent 4 Level", comment="put a comment here">;
byte unk21<name="Opponent 5 Level", comment="put a comment here">;
byte padding<bgcolor=cBlue>;
};
struct UnknownData5 {
int unkMagic<bgcolor=cLtGreen>;
int unkCount<bgcolor=cLtGreen>;
int unkSize<bgcolor=cLtGreen>;
HeaderPadding classdataheaderpadding<name="Padding">;
Unknown30Byte unknown[unkCount];
};
struct File {
struct SectionPointer {
int header<bgcolor=cBlue>;
int celebrationDataPointer<bgcolor=cAqua>;
int celebrationDataSize<bgcolor=cAqua>;
int academyScheduleDataPointer<bgcolor=cPurple>;
int academyScheduleDataSize<bgcolor=cPurple>;
int churchScheduleDataPointer<bgcolor=cSilver>;
int churchScheduleDataSize<bgcolor=cSilver>;
int lionsScheduleDataPointer<bgcolor=cBlue>;
int lionsScheduleDataSize<bgcolor=cBlue>;
int deerScheduleDataPointer<bgcolor=cDkGreen>;
int deerScheduleDataSize<bgcolor=cDkGreen>;
int eaglesScheduleDataPointer<bgcolor=cRed>;
int eaglesScheduleDataSize<bgcolor=cRed>;
int unkDataPointer6<bgcolor=cRed>;
int unkDataSize6<bgcolor=cRed>;
int unkDataPointer7<bgcolor=cRed>;
int unkDataSize7<bgcolor=cRed>;
int unkDataPointer8<bgcolor=cRed>;
int unkDataSize8<bgcolor=cRed>;
int unkDataPointer9<bgcolor=cRed>;
int unkDataSize9<bgcolor=cRed>;
int unkDataPointer10<bgcolor=cRed>;
int unkDataSize10<bgcolor=cRed>;
} sectionPointers;
CelebrationData celebrationData;
AcademyScheduleData academyScheduleData;
ChurchScheduleData churchScheduleData;
LionsScheduleData lionsScheduleData;
DeerScheduleData deerScheduleData;
EaglesScheduleData eaglesScheduleData;
UnknownData1 unkData;
UnknownData2 unkData;
UnknownData3 unkData;
UnknownData4 unkData;
UnknownData5 unkData;
} file;
string getCelebrationName(Celebration & q) {
return EnumToString(q.celebrationName);
};
string getScheduleName(Schedule & q) {
return q.scheduleName;
};