-
Notifications
You must be signed in to change notification settings - Fork 0
/
Octopath.bt
341 lines (311 loc) · 23.9 KB
/
Octopath.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
//------------------------------------------------
//--- 010 Editor v8.0.1 Binary Template
//
// File: OctoPath.bt
// Authors: SleepyPrince
// Version: 0.1
// Purpose: Octopath Traveler Save File Template
//------------------------------------------------
// enum
enum <int> itemID { None=0, Healing_Grape=1, Healing_Grape_M=2, Healing_Grape_Bunch=3, Inspiriting_Plum=4, Inspiriting_Plum_M=5, Inspiriting_Plum_Basket=6, Energizing_Pomegrante=7, Energizing_Pomegrante_M=8, Energizing_Pomegrante_L=9, Refreshing_Jam=10, Revitalizing_Jam=11, Olive_of_Life=12, Olive_of_Life_M=13, Olive_of_Life_L=14, Herb_of_Healing=20, Herb_of_Clamor=21, Herb_of_Light=22, Herb_of_Clarity=23, Herb_of_Awakening=24, Herb_of_Valor=25, Herb_of_Revival=26, Bottle_of_Poison_Dust=30, Bottle_of_Blinding_Dust=31, Bottle_of_Befuddling_Dust=32, Bottle_of_Sleeping_Dust=33, Fire_Soulstone=40, Fire_Soulstone_M=41, Fire_Soulstone_L=42, Ice_Soulstone=43, Ice_Soulstone_M=44, Ice_Soulstone_L=45, Thunder_Soulstone=46, Thunder_Soulstone_M=47, Thunder_Soulstone_L=48, Wind_Soulstone=49, Wind_Soulstone_M=50, Wind_Soulstone_L=51, Light_Soulstone=52, Light_Soulstone_M=53, Light_Soulstone_L=54, Shadow_Soulstone=55, Shadow_Soulstone_M=56, Shadow_Soulstone_L=57, Nourshing_Nut=60, Nourshing_Nut_M=61, Nourshing_Nut_L=62, Invigorating_Nut=63, Invigorating_Nut_M=64, Invigorating_Nut_L=65, Fortifying_Nut=66, Fortifying_Nut_M=67, Fortifying_Nut_L=68, Tough_Nut=69, Tough_Nut_M=70, Tough_Nut_L=71, Magic_Nut=72, Magic_Nut_M=73, Magic_Nut_L=74, Resistant_Nut=75, Resistant_Nut_M=76, Resistant_Nut_L=77, Sharp_Nut=78, Sharp_Nut_M=79, Sharp_Nut_L=80, Slippery_Nut=81, Slippery_Nut_M=82, Slippery_Nut_L=83, Critical_Nut=84, Critical_Nut_M=85, Critical_Nut_L=86, Light_Nut=87, Light_Nut_M=88, Light_Nut_L=89, Scrap_of_Rope=90, Stuffed_Toy=91, Candy=92, Glass_Marble=93, Handkerchief=94, Hip_Flask=95, Myterious_Seed=96, Fish_Tooth=97, Mysterious_Ore=98, Tree_Nut=99, Hairbrush=100, Empty_Coin_Pouch=101, Coin_Pouch=102, Odds_and_Ends=103, Large_Feather=104, Dubious_Gold_Ore=105, Psuedo_Gold_Ore=106, Fools_Gold_Ore=107, Copper_Lantern=108, Bone=109, Weathered_Boots=110, Dirty_Ball_of_cloth=111, Rigid_Wire=112, Necklace=113, Poysenberry=114, Psuedo_Cider=115, Red_Apple=116, Bottle_Breath=117, Monster_Perfume=119, Small_Cup=121, Silver_Clock=122, Portrait_with_a_Kiss=123, Introduction_to_Adventuring=124, Rare_Stone=125, Heavy_Coin_Pouch=126, Commemorative_Coin=127, Silver_filled_Pouch=128, Feather_Duster=130, Alis_Bread=131, Joshuas_Poem=132, Cats_Eye=133, Tagged_Collar=134, Old_Coin=135, Copped_filled_Pouch=136, Curious_Antique=138, Dazzling_Artwork=139, Timepiece=140, Rusty_Cup=141, Glossy_Gold_Coin=142, Cloth_Map=143, Church_History=301, Translated_Tome=302, Original_Tome=303, Letter_from_Master=304, Herb_of_grace=305, Blue_swordfish=307, Bottle_of_Wine=308, Sleepweed_2=309, Anonymous_Diary=310, Nondescript_Stone=311, Skystone=312, Edbarts_Shield=313, Ancient_Map=314, Eldrite=315, Letter_from_Baltazar=316, Aelfrics_Lanthorn=317, Letter_of_Introduction=318, Fools_Bangle=319, Oasis_Water=320, Wyvern_Scale=321, Crystal_Ore=322, Crystal_Key=323, Ruby_Dragonstone=324, Aristrocrats_Mask=325, Attendants_Mask=326, Black_Market_Inventory=327, Brigand_Leaders_Garb=328, Brigands_Garb=329, Emerald_Dragonstone=330, Gold_Dragonstone=331, Alfyns_Satchel=332, Viper_Venom=333, Zephs_Satchel=334, Glowworm_Moss=335, Ore_Eagles_Pinion=336, House_Azelhart_Dagger=337, Yusufas_Handkerchief=338, Left_hand_Mans_Map=339, Dungeon_Key=340, Ambrosial_Milk=344, Emperor_Crab=345, Roc_Egg=346, Final_Masterpiece=348, Cow_Droppings=349, Lories_Diary=350, Diva_Dress=351, Saucy_Prawns=352, Rebels_Axe=354, Revolutionary_Sword=355, Spear_of_Justice=356, Giant_Tusk=357, Satisfactory_Coal=358, Adequate_Flax=359, Portable_Pot=360, Codget_Friendly_Bow=361, Leviathan_Egg=363, Beetroot=365, Orewell_Whetstone=369, Gendys_Footcloth=370, Byrons_Ring=375, Sword_of_Sokrath=379, Tales_from_a_Faraway_Land=380, House_Landar_Records=381, Memorial_Sword=384, Tools_of_Learning=385, Adventurers_Attire=386, Timeworn_Tapestry=387, Tightly_Sealed_Envelope=388, Snakesbane=389, Letter_from_Zeph=390, Letter_from_Mercedes=391, River_Blossom=392, Memorial_Necklace=394, Jotunn_Horn=395, Giant_Egg=396, Mercenary_Crest=397, Hugos_Journal=398, Mind_me_always=399, Astonishing_Object=400, Incredible_Item=401, Marvelous_Memento=402, Quatrait_Bloom=403, Dragon_Egg=404, Direwolf_Fang=405, Letter_from_Noa=406, Lapis_Lazuli=407, High_Hornburgian_Dictionary=408, Red_Apple_2=409, An_Eyewitness_Account=506, Where_the_Ice_Giant_Sleeps=507, Rumors_of_Knight_Ardante=518, History_of_the_Frostlands=524, Dragon_of_the_Frostlands=525, Where_the_Giant_Boar_Roams=549, Librarians_Testimony=563, The_Guardians_Situation=564, Russells_Situation=565, The_Song_of_Sokrath=569, The_Jellypeno=570, The_Headmasters_Situation=573, A_Use_for_Textiles=586, A_Lecture_to_Remember=600, Where_the_Direwolf_Prowls=603, Gossip_of_Glowworm_Moss=624, Vanesss_Carriage=625, Donovans_Condition=634, Laras_New_Life=655, A_Safe_Route=658, Dragon_of_the_highlands=671, The_Books_Whereabouts=675, Dominics_Seclusion=676, Dominics_Remorse=677, Bookbinding_Estimate=678, The_Fortress_of_Everhold=681, The_Leathers_Whereabouts=685, The_Materials_Whereabouts=686, The_Papers_Whereabouts=694, Dominics_Troubles=695, The_Fall_of_House_Landar=696, Gravekeepers_Information=718, The_Giant_Serpents=743, City_of_Gold=752, Chieftains_Schedule=758, Ninas_Secret=760, Elixir_Recipe=761, Meryls_Past=773, Old_Woman_to_the_Southeast=776, Tidings_of_Elderly_Friends=780, Old_Woman_to_the_Northwest=781, Early_Ice_Thawing=799, History_of_the_Cliftlands=808, Project_Plans=809, Where_the_Incidents_Happened=823, Witness_Testimony=824, The_Sewers=825, Why_She_Doesnt_Visit_Geoffrey=826, Ogens_Mutterings=843, Dragon_of_the_Cliftlands=844, How_to_Train_a_Tiger=852, Tale_of_the_Beast_Tamers=853, Martas_Gang=860, Father_and_Fighter=864, Estadass_Condition=865, Mont_DOrs_Condition=866, Joshuas_Weak_Points=867, Archibolds_Weak_Points=868, Gustavs_Weak_Points=869, Byron_Family_Lineage=878, History_of_the_Woodlands=879, The_Murals_Meaning=882, Trial_of_the_Twelve,_Volume_VII=883, Forbidden_Gold=884, From_the_Far_Reaches_of_Hell=885, Alphass_Poem=886, Battle_tested_Blade=1001, Haralds_Sword=1002, Enchanted_Sword=1003, Forbidden_Blade=1004, Werners_Sword=1005, Dragon_Saber=1006, Emperors_Blade=1007, Unseen_Saber=1008, Deathly_Blade=1009, Trinity_Sword=1010, Great_Blade=1011, Blade_of_Bravery=1012, Angel_Saber=1013, Platinum_Sword=1014, Divine_Blade=1015, Carnage_Blade=1016, Knights_Sword=1017, Refined_Sword=1018, Snipe_Saber=1019, Moonblade=1020, Mirage_Blade=1021, Eagle_Saber=1022, Bastard_Sword=1023, Heavy_Blade=1024, Falcon_Saber=1025, Spirit_Sword=1026, Captain_Sword=1027, Greatsword=1028, Silver_Sword=1029, Feather_Saber=1030, Broadsword=1031, Iron_Sword=1032, Long_Sword=1033, Makeshift_Sword=1034, Battle_tested_Spear=1101, Tradewinds_Spear=1102, Masters_Spear=1103, Rune_Glaive=1104, Forbidden_Spear=1105, Seraphim_Spear=1106, Scourge_Lance=1107, Soul_Glaive=1108, Jade_Lance=1109, Victors_Spear=1110, Platinum_Spear=1111, Miguels_Spear=1112, Imperial_Lance=1113, Magus_Glaive=1114, Hedgehog_Spear=1115, Bridge_Lance=1116, Elemental_Glaive=1117, Jaguar_Lance=1118, Heavy_Lance=1119, Calamity_Spear=1120, Bandits_Spear=1121, Sunlands_Spear=1122, War_Lance=1123, Silver_Spear=1124, Arcane_Glaive=1125, War_Spear=1126, Memorial_Harpoon=1127, Iron_Spear=1128, Spear=1129, Makeshift_Spear=1130, Battle_tested_Dagger=1201, Heathcotes_Dagger=1202, Viper_Dagger=1203, Adamatine_Dagger=1204, Forbidden_Dagger=1205, Legion_Dagger=1206, Rune_Knife=1207, Ultimate_Breaker=1208, Doombreaker=1209, Assassins_Dagger=1210, Soul_Knife=1211, Crimson_Dagger=1212, Justice_Breaker=1213, Skybreaker=1214, Magus_Knife=1215, Gaolbreaker=1216, Gideons_Dagger=1217, Tricksters_Dagger=1218, Crescent_Dagger=1219, Chainbreaker=1220, Swordbreaker=1221, Silver_Dagger=1222, Piercing_Dagger=1223, Falcon_Dagger=1224, Befuddling_Dagger=1225, Arcane_Knife=1226, Stinging_Dagger=1227, Iron_Dagger=1228, Dagger=1229, Makeshift_Knife=1230, Battle_tested_Axe=1301, Memorial_Axe=1302, Death_Cleaver=1303, Double_Tomahawk=1304, Forbidden_Axe=1305, Ogre_Cleaver=1306, Rune_Hatchet=1307, Golden_Axe=1308, Gargantuan_Axe=1309, Adamatine_Hatchet=1310, Hill_Cleaver=1311, Spirit_Hatchet=1312, Elemental_Hatchet=1313, Inferno_Axe=1314, Lizardkings_Axe=1315, Graviton_Axe=1316, Bear_Cleaver=1317, Rocket_Cleaver=1318, Soul_Hatchet=1319, Horn_Cleaver=1320, Argent_Axe=1321, Magus_Hatchet=1322, Viking_Axe=1323, Omars_Axe=1324, Steel_Axe=1325, Cleaver=1326, Enchanted_Axe=1327, Heavy_Axe=1328, Silver_Axe=1329, Battle_Axe=1330, Arcane_Hatchet=1331, Iron_Axe=1332, Handaxe=1333, Makeshift_Axe=1334, Battle_tested_Bow=1401, Primeval_Bow_of_Storms=1402, Transcendant_Bow_of_Shadows=1403, Improved_bow_of_the_Eagle=1404, Forbidden_Bow=1405, Hyperion_Bow=1406, Holy_Longbow=1407, Rune_Bow=1408, Yetis_Long_Bow=1409, Adamatine_Bow=1410, Augmented_Bow_of_the_Falcon=1411, Masters_Longbow=1412, Brilliant_Bow=1413, Pirates_Longbow=1414, Spirtit_Bow=1415, Huntresss_Longbow=1416, Elemental_Bow=1417, Shadow_Bow=1418, Tomahawk_Bow=1419, Marksmans_Longbow=1420, Soul_Bow=1421, Soldiers_Longbow=1422, Heavy_Bow=1423, Maguss_Bow=1424, Killer_Bow=1425, Arcane_Bow=1426, Wolfs_Bow=1427, Stone_Bow=1428, Composite_Bow=1429, Longbow=1430, Makeshift_Bow=1431, Battle_tested_Staff=1501, Bishops_Staff=1502, Knowledge_Staff=1503, Wizards_Rod=1504, Absolute_Zero_Staff=1505, Yddgrasil_Staff=1506, Mattiass_Scepter=1507, Forbidden_Staff=1508, Enchanted_Rod=1509, Giants_Club=1510, Meteorite_Rod=1511, Morning_Star=1512, Wisdom_Staff=1513, Sturdy_Sapphire_Rod=1514, Sledgehammer=1515, Sapphire_Rod=1516, War_Hammer=1517, Black_Staff=1518, Mages_Staff=1519, Sturdy_Quartz_Rod=1520, Staff_of_Wonders=1521, Pole_Mace=1522, Oak_Staff=1523, Flail=1524, Psychic_Staff=1525, Mace=1526, Laurel_Staff=1527, Composite_Staff=1528, Quartz_Rod=1529, Light_Staff=1530, Stone_Rod=1531, Staff=1532, Makeshift_Staff=1533, Battle_tested_Shield=1601, Mikk_and_Makks_Shield=1602, Forbidden_Shield=1603, Force_Shield=1604, Gargantuan_Shield=1605, Leviathan_Shield=1606, Knights_Shield=1607, Gustavs_Shield=1608, Adamantine_Shield=1609, Tower_Shield=1610, Spiked_Shield=1611, Elemental_Shield=1612, Elusive_Shield=1613, Plate_Shield=1614, Kite_Shield=1615, Sturdy_Shield=1616, Round_Shield=1617, Buckler=1618, Crystal_Helm=1701, Hypnos_Crown=1702, Adamantine_Hat=1703, Dragons_Helm=1704, Monster_Trainers_Hat=1705, Teachers_Hat=1706, Adventurers_Hat=1707, Platinum_Helm=1708, Histoarians_Hat=1709, Oasis_Hat=1710, Revellos_Helm=1711, Imperial_Helm=1712, Silent_Bandana=1713, Fur_Cap=1714, Enchanted_Criclet=1715, Elemental_Hat=1716, Veterans_Helm=1717, Gareths_Helm=1718, Grand_Helm=1719, Horned_Helm=1720, Starlight_Helm=1721, Hasty_Helm=1722, Falcon_Hat=1723, Bishops_Hat=1724, Golden_Hairpiece=1725, Silver_Helm=1726, Snowy_Hood=1727, Saintly_Tiara=1728, Chakra_Band=1729, Sturdy_Helm=1730, Flying_Helm=1731, Black_Cap=1732, Headgear=1733, Circlet=1734, Iron_Helm=1735, Silver_Hairpiece=1736, Bronze_Helm=1737, Feathered_Hat=1738, Pointed_Hat=1739, Leather_Helm=1740, Leather_Hat=1741, Oridinary_Hat=1742, Crystal_Armor=1801, Crystal_Vest=1802, Robe_of_the_Flame=1803, Dragonscale_Armor=1804, Dragons_Vest=1805, Ethereal_Dancer_Garb=1806, Sorcerers_Robe=1807, Confessional_Armor=1808, High_Houses_Armor=1809, Princesss_Coat=1810, Ardante_Attire=1811, Robe_of_the_Dragon_Princess=1812, Platinum_Armor=1813, Vandetta_Coat=1814, Imperial_Armor=1815, Platinum_Vest=1816, Imperial_Vest=1817, Elemental_Heavy_Armor=1818, Silent_Cape=1819, Primeval_Robe=1820, Rainbow_Robe=1821, Elemental_Light_Armor=1822, Fur_Coat=1823, Exotic_Garb=1824, Grand_Armor=1825, Obsidian_Garb=1826, Grand_Vest=1827, Falcon_Garb=1828, Elemental_Robe=1829, Spiked_Armor=1830, Silver_Armor=1831, Spiked_Vest=1832, Silver_Vest=1833, Charm_Robe=1834, Snowy_Cape=1835, Iron_Armor=1836, Sturdy_Armor=1837, Iron_Vest=1838, Peacebringers_Garb=1839, Sturdy_Vest=1840, Fur_Robe=1841, Black_Attire=1842, Wind_Attire=1843, Traditional_Dancer_Garb=1844, Bronze_Armor=1845, Bronze_Vest=1846, Linen_Robe=1847, Leather_Armor=1848, Leather_Vest=1849, Robe=1850, Spurning_Ribbon=1901, Alluring_Ribbon=1903, Captains_Badge=1904, Badge_of_Friendship=1905, Dragons_Scarf=1906, Beastly_Scarf=1907, Royal_Crest=1908, Gravekeepers_Mark=1909, Physical_Belt=1910, Mental_Belt=1911, Blessed_Blazon=1912, Blazon_of_Protection=1913, Mighty_Belt=1914, Elemental_Augmentor=1915, Guardian_Amulet=1916, Elemental_Ward=1917, Empowering_Necklace=1918, Stimulating_Necklace=1919, Protective_Necklace=1920, Unearring_Necklace=1921, Enlightening_Necklace=1922, Sprightly_Necklace=1923, Critical_Necklace=1924, Empowering_Bracelet=1925, Stimulating_Bracelet=1926, Protective_Bracelet=1927, Unerring_Bracelet=1928, Enlightening_Bracelet=1929, Sprightly_Bracelet=1930, Critical_Bracelet=1931, Empowering_Ring=1932, Stimulating_Ring=1933, Protective_Ring=1934, Unerring_Ring=1935, Enlightening_Ring=1936, Sprightly_Ring=1937, Critical_Ring=1938, Empowering_Earring=1939, Stimulating_Earring=1940, Protective_Earring=1941, Unerring_Earring=1942, Enlightening_Earring=1943, Sprightly_Earring=1944, Critical_Earring=1945, Weavers_Charm=1946, Gentlemans_Charm=1947, Gourmets_Charm=1948, Inferno_Amulet=1949, Blizzard_Amulet=1950, Tempest_Amulet=1951, Thunderstorm_Amulet=1952, Void_Amulet=1953, Gleaming_Amulet=1954, Fire_Amulet=1955, Ice_Amulet=1956, Wind_Amulet=1957, Lightning_Amulet=1958, Dark_Amulet=1959, Light_Amulet=1960, Antidote_Stone=1961, Wakeful_Stone=1962, Articulate_Stone=1963, Bright_Stone=1964, Claming_Stone=1965, Clarity_Stone=1966, Conscious_Stone=1967, Vivifying_Stone=1968, Soothing_Seed=2500, Soothing_Dust=2501, Purifying_Seed=2502, Purifying_Dust=2503, Injurious_Seed=2504, Injurious_Dust=2505, Ruinous_Seed=2506, Ruinous_Dust=2507, Noxroot=2516, Sleepweed=2517, Addlewort=2518, Essence_of_Grape=2519, Essence_of_Plum=2520, Essence_of_Pomegranate=2521, Olive_Bloom=2522, Curious_Bloom=2523 };
enum <uint> CharName { Olberic=1, Tressa, Cyrus, Primrose, Hannit, Therion, Ophilia, Alfyn};
enum <int> JobID { Nil=-1, Merchant=0, Thief=1, Warrior=2, Hunter=3, Cleric=4, Dancer=5, Scholar=6, Apothecary=7, Warmaster=8, Sorcerer=9, Starseeker=10, Runelord=11};
// typedef
typedef struct {
uint nameLength <hidden=true>;
string name <hidden=true>;
uint propertyLength <hidden=true>;
string property <hidden=true>;
if (property == "IntProperty")
{
ubyte dataSize <hidden=true>;
FSkip(8);
int value;
}else if(property == "BoolProperty"){
FSkip(8);
ushort value:1;
}else if(property == "ArrayProperty"){
uint dataSize <hidden=true>;
FSkip(8);
string type <hidden=true>;
FSkip(1);
int size;
}
} dataStruct;
// From lowest bit
// Sword Lance Dagger Axe Bow Rod
// Fire Ice Thunder Wind Light Dark ?
typedef struct {
uint nameLength <hidden=true>;
string name <hidden=true>;
uint propertyLength <hidden=true>;
string property <hidden=true>;
ubyte dataSize <hidden=true>;
FSkip(8);
int weapon:6 <format=binary>;
int :2;
int magic:6 <format=binary>;
int :2;
} weaknessStruct <size=90>;
typedef struct {
int idnameLength <hidden=true>;
string idname <hidden=true>;
FSkip(4);
string IDproperty <hidden=true>;
FSkip(9);
itemID id;
FSkip(4);
string Num <hidden=true>;
FSkip(4);
string Numproperty <hidden=true>;
FSkip(9);
uint amount;
FSkip(9);
} Item <size=156>;
typedef struct {
dataStruct ID <hidden=true>;
dataStruct Level <read=dataStructRead, comment="For leveling up please edit Exp below">;
dataStruct Exp <read=dataStructRead, write=dataStructWrite>;
dataStruct RawHP <read=dataStructRead, write=dataStructWrite, name="Current HP">;
dataStruct RawMP <read=dataStructRead, write=dataStructWrite, name="Current SP">;
dataStruct StatusEffect <hidden=true>;
dataStruct FirstJobID <read=jobRead, name="Primary Job">;
dataStruct SecondJobID <read=jobRead, name="Secondary Job">;
dataStruct JobPoint <read=dataStructRead, write=dataStructWrite, name="Job Point">;
// Equipment
FSeek(FindFirst("Sword_",true,false,0,0,1,FTell()));
FSkip(-4);
struct{
dataStruct Sword <read=equipRead>;
dataStruct Lance <read=equipRead>;
dataStruct Dagger <read=equipRead>;
dataStruct Axe <read=equipRead>;
dataStruct Bow <read=equipRead>;
dataStruct Rod <read=equipRead>;
dataStruct Shield <read=equipRead>;
dataStruct Head <read=equipRead>;
dataStruct Body <read=equipRead>;
dataStruct Accessory <read=equipRead>;
dataStruct Accessory <read=equipRead>;
} Equipment;
// DopingParam
FSeek(FindFirst("HP_",true,false,0,0,1,FTell()));
FSkip(-4);
struct {
dataStruct Extra_HP <name="Extra HP", read=dataStructRead, write=dataStructWrite, comment="75, 150, 300">;
dataStruct Extra_MP <name="Extra SP", read=dataStructRead, write=dataStructWrite, comment="3, 6, 12">;
dataStruct Extra_BP <hidden=true>;
dataStruct Extra_SP <hidden=true>;
dataStruct Extra_ATK <name="Extra ATK", read=dataStructRead, write=dataStructWrite, comment="7, 14, 28">;
dataStruct Extra_DEF <name="Extra DEF", read=dataStructRead, write=dataStructWrite, comment="7, 14, 28">;
dataStruct Extra_MATK <name="Extra MATK", read=dataStructRead, write=dataStructWrite, comment="7, 14, 28">;
dataStruct Extra_MDEF <name="Extra MDEF", read=dataStructRead, write=dataStructWrite, comment="7, 14, 28">;
dataStruct Extra_ACC <name="Extra ACC", read=dataStructRead, write=dataStructWrite, comment="7, 14, 28">;
dataStruct Extra_EVA <name="Extra EVA", read=dataStructRead, write=dataStructWrite, comment="7, 14, 28">;
dataStruct Extra_CON <name="Extra CON", read=dataStructRead, write=dataStructWrite, comment="7, 14, 28">;
dataStruct Extra_AGI <name="Extra AGI", read=dataStructRead, write=dataStructWrite, comment="7, 14, 28">;
} DopingParam <name="Extra Stats", comment="in-game Nuts items add the values below">;
} Character <size=6303>;
local int i;
// Start of data
FSeek(FindFirst("Money_")+0x42);
uint Money <write=moneyWrite, comment="Max 9,999,999">;
FSeek(FindFirst("PlaySecond")+0x24);
uint PlayTime <format=decimal,name="Play Time", comment="Play time in seconds">;
// ItemList
FSeek(FindFirst("ItemList")-4);
struct {
local TFindResults itemAddr = FindAll("ItemID_8", true, false, 0, 0, 1, FTell(), FindFirst("PlayerParty"));
for ( i = 0; i < itemAddr.count; i++){
FSeek(itemAddr.start[i]-4);
Item item <read=itemRead>;
}
} Inventory <comment="Player backpack (2000 slots)">;
FSeek(FindFirst("MainMemberID")-4);
FSkip(0x64);
struct {
for (i=0; i<4; i++){
uint MemberID <read=PartyRead>;
}
} MainMemberID <comment="Enter the number for the character">;
FSeek(FindFirst("SubMemberID")-4);
FSkip(0x63);
struct {
for (i=0; i<4; i++){
uint MemberID <read=PartyRead>;
}
} SubMemberID <comment="Enter the number for the character">;
// Character
// ID:Name
// 1:Olberic
// 2:Tressa
// 3:Cyrus
// 4:Primrose
// 5:H'annit
// 6:Therion
// 7:Ophilia
// 8:Alfyn
local TFindResults CharacterAddr = FindAll( "CharacterID" );
for ( i = 0; i < 8; i++){
FSeek(CharacterAddr.start[i]-4);
switch (i){
case 0:
Character character <name="Olberic", read=charRead>;
break;
case 1:
Character character <name="Tressa",read=charRead>;
break;
case 2:
Character character <name="Cyrus",read=charRead>;
break;
case 3:
Character character <name="Primrose", read=charRead>;
break;
case 4:
Character character <name="H'annit", read=charRead>;
break;
case 5:
Character character <name="Therion", read=charRead>;
break;
case 6:
Character character <name="Ophilia", read=charRead>;
break;
case 7:
Character character <name="Alfyn", read=charRead>;
break;
}
//Character character <read=charRead>;
}
// TownData
FSeek(FindFirst("TownData")-4);
local TFindResults ConnectionAddr = FindAll( "ConnectionValue" );
struct ConnectionList{
for ( i = 0; i < ConnectionAddr.count; i++){
FSeek(ConnectionAddr.start[i]-4);
dataStruct ConnectionValue <read=dataStructRead, write=dataStructWrite>;
}
} TownData <comment="Not yet fully documented, edit at your own risk">;
// TameMonsterData
FSeek(FindFirst("TameMonsterData")-4);
local TFindResults TameMonsterAddr = FindAll("EnemyID");
struct TameMonster{
for ( i = 0; i < 10; i++){
FSeek(TameMonsterAddr.start[i]-4);
struct {
dataStruct EnemyID <read=dataStructRead, write=dataStructWrite>;
dataStruct Count <read=dataStructRead, write=dataStructWrite>;
dataStruct Used <read=dataStructRead, write=dataStructWrite>;
} TameMonster;
}
} TameMonsterData;
// WeaknessOpen
FSeek(FindFirst("EnemyInfoData")-4);
local TFindResults WeaknessAddr = FindAll( "IsAnalyse" );
struct {
for ( i = 0; i < WeaknessAddr.count; i++){
FSeek(WeaknessAddr.start[i]-4);
struct EnemyData {
dataStruct IsAnalyse <read=dataStructRead, write=dataStructWrite>;
weaknessStruct WeaknessOpen <read=weaknessRead>;
FSkip(9); // None
} SaveEnemyData <size=166>;
}
} EnemyInfoData <comment="Not yet fully documented, edit at your own risk">;
// BitFlag (WIP)
FSeek(FindFirst("BitFlag")+0x987);
int :3;
int unlockedJobs:12 <hidden=true, format=binary, name="Unlocked Jobs?", comment="Still testing">;
// Read & Write
void moneyWrite(uint &d, string s){
d = (Atoi(s) > 9999999)? 9999999 : Atoi(s);
}
string charRead(Character &c){
string s;
SPrintf(s, "Lv: %-4d Exp: %-7d JP: %-7d", c.Level.value, c.Exp.value, c.JobPoint.value);
return s;
}
string dataStructRead(dataStruct &d){
string s;
SPrintf(s, "%d", d.value);
return s;
}
void dataStructWrite(dataStruct &d, string s){
d.value = Atoi(s);
}
string weaknessRead(weaknessStruct &d){
string s;
SPrintf(s, "%s %s", SubStr(IntToBinaryStr(d.magic),2), SubStr(IntToBinaryStr(d.weapon),2));
return s;
}
string weaknessRead2(weaknessStruct &d){
string s;
SPrintf(s, "%d", d.value);
return s;
}
string PartyRead(uint d){
string s;
CharName c = d+1;
SPrintf(s, "%s[%d]", EnumToString(c), d);
return s;
}
string jobRead(dataStruct &d){
if (d.value == -1){
return "None (-1)";
}else{
string s;
JobID i = d.value;
SPrintf(s, "%s (%d)", EnumToString(i), i);
return s;
}
}
string equipRead(dataStruct &d){
itemID i = d.value;
string s;
if (d.value == -1){
SPrintf(s, "%s (%d)", EnumToString(i), i);
return s;
}else{
string type;
if (i>=1000 && i<1100){
type = "Sword";
}else if( i>=1100 && i<1200 ){
type = "Spear";
}else if( i>=1200 && i<1300 ){
type = "Dagger";
}else if( i>=1300 && i<1400 ){
type = "Axe";
}else if( i>=1400 && i<1500 ){
type = "Bow";
}else if( i>=1500 && i<1600 ){
type = "Staff";
}else if( i>=1600 && i<1700 ){
type = "Shield";
}else if( i>=1700 && i<1800 ){
type = "Head";
}else if( i>=1800 && i<1900 ){
type = "Body";
}else if( i>=1900 && i<2000 ){
type = "Accessory";
}else{
type = "Invalid";
}
SPrintf(s, "%s: %s (%d)", type, EnumToString(i), i);
return s;
}
}
string itemRead (Item &i){
string s;
string id;
if (EnumToString(i.id) != ""){
SPrintf(s, "%s: %d", EnumToString(i.id), i.amount);
}else{
SPrintf(s, "(%d): %d", i.id, i.amount);
}
return s;
}
string townRead (ConnectionList &c){
return "Not yet fully documented, edit at your own risk";
}
string weaknessListRead (EnemyData &c){
return " Magic Weapon";
}