-
Notifications
You must be signed in to change notification settings - Fork 2
/
mhfdat.bin.hexpat
92 lines (74 loc) · 1.76 KB
/
mhfdat.bin.hexpat
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
// Very large limits just in case, feel free to make these more sensible
#pragma pattern_limit 10000000
#pragma array_limit 200000
import std.sys;
import std.io;
#include <misc/s32p.pat>
//#define __ITEMNAMES 1
//#define __ITEMDATA 1
//#define __SHOP 1
//#define __WEAPONDATA 1
//#define __WEAPONNAMES 1
//#define __EQUIPDATA 1
//#define __EQUIPNAMES 1
//#define __CRAFTING 1
//#define __PARTBREAKS 1
//#define __QUESTLIST 1
//#define __ARENA 1
//#define __SEASONALEVENTS 1
//#define __SHARPNESS 1
//#define __DECOMPILE 1
#include <mhfdat/header.hexpat>
#include <mhfdat/constants.hexpat>
#ifdef __ITEMNAMES
#include <mhfdat/itemnames.hexpat>
#endif
/**
@param n The item ID
@return The item ID, formatted as expected by Ferias /sozai/sozai.htm?{ID}
Optionally also returns the item name, comment out the first return
to disable.
*/
fn getItemName(u16 n) {
return std::format("{:04X} | {}", n, rIPPS(header.ptrs.itemNames, n));
return std::format("{:04X}", n);
};
#ifdef __ITEMDATA
#include <mhfdat/itemdata.hexpat>
#endif
#ifdef __SHOP
#include <mhfdat/shop.hexpat>
#endif
#ifdef __EQUIPDATA
#include <mhfdat/equipdata.hexpat>
#endif
#ifdef __EQUIPNAMES
#include <mhfdat/equipnames.hexpat>
#endif
#ifdef __WEAPONDATA
#include <mhfdat/weapondata.hexpat>
#endif
#ifdef __WEAPONNAMES
#include <mhfdat/weaponnames.hexpat>
#endif
#ifdef __CRAFTING
#include <mhfdat/crafting.hexpat>
#endif
#ifdef __PARTBREAKS
#include <mhfdat/partbreaks.hexpat>
#endif
#ifdef __QUESTLIST
#include <mhfdat/questlist.hexpat>
#endif
#ifdef __ARENA
#include <mhfdat/arena.hexpat>
#endif
#ifdef __SEASONALEVENTS
#include <mhfdat/seasonalevents.hexpat>
#endif
#ifdef __SHARPNESS
#include <mhfdat/sharpness.hexpat>
#endif
#ifdef __DECOMPILE
#include <mhfdat/decompile/decompile.hexpat>
#endif