-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame_dat.ksy
273 lines (273 loc) · 6.71 KB
/
game_dat.ksy
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
meta:
id: game_dat
title: WolfRPG Game.dat file
application: WolfRPG
file-extension: dat
license: MIT
endian: le
imports:
- common
types:
record_u8_settings:
seq:
- id: tile_size
type: u1
enum: common::tile_size
- id: character_directions_image
type: u1
enum: common::character_directions
- id: character_directions_move
type: u1
enum: common::character_directions
- id: guruguru_enabled
type: u1
enum: common::venable
- id: fps
type: u1
enum: common::fps
- id: character_shadow
type: u1
enum: common::venable
- id: midi_source
type: u1
enum: common::midi_source
- id: character_animation_patterns
type: u1
enum: common::character_animation_patterns
- id: character_movement_width
type: u1
enum: common::character_movement_width
- id: character_movement_hitbox
type: u1
enum: common::character_movement_width
- id: text_horizontal_padding
type: u1
- id: text_line_spacing
type: u1
- id: choice_line_spacing
type: u1
- id: unknown
type: u1
- id: anti_aliasing
type: u1
enum: common::anti_aliasing
- id: move_speed_event
type: u1
enum: common::move_speed
- id: move_speed_hero_allies
type: u1
enum: common::move_speed
- id: in_game_language
type: u1
enum: common::language
- id: image_scaling_method
type: u1
enum: common::image_scale
- id: inactive_window_behavior
type: u1
enum: common::inactive_behavior
- id: system_language
type: u1
enum: common::system_language
- id: unknown_2
type: u1
if: _io.size == 35
- id: pro_enable_f4
type: u1
enum: common::venable
if: _io.size == 35
- id: pro_enable_f5
type: u1
enum: common::venable
if: _io.size == 35
- id: pro_enable_f8
type: u1
enum: common::venable
if: _io.size == 35
- id: pro_enable_f11
type: u1
enum: common::venable
if: _io.size == 35
- id: pro_enable_f12
type: u1
enum: common::venable
if: _io.size == 35
- id: pro_enable_prtscr
type: u1
enum: common::venable
if: _io.size == 35
- id: unknown_3
type: u1
if: _io.size == 35
- id: unknown_4
type: u1
if: _io.size == 35
- id: unknown_5
type: u1
if: _io.size == 35
- id: unknown_6
type: u1
if: _io.size == 35
- id: pro_screen_scale
type: u1
enum: common::screen_scale
if: _io.size == 35
- id: pro_loading_fadein
type: u1
enum: common::venable
if: _io.size == 35
- id: pro_loading_fadeout
type: u1
enum: common::venable
if: _io.size == 35
record_string_settings_v3:
seq:
- id: game_title
type: common::t_str
- id: serial
type: common::t_str
- id: encryption_key
type: common::t_str
- id: font_base
type: common::t_str
- id: font_sub1
type: common::t_str
- id: font_sub2
type: common::t_str
- id: font_sub3
type: common::t_str
- id: starting_hero_graphic
type: common::t_str
- id: game_subtitle
type: common::t_str
- id: pro_game_loadingpic
type: common::t_str
- id: pro_game_loading_gauge
type: common::t_str
- id: pro_title_during_loading
type: common::t_str
- id: pro_title_during_gameplay
type: common::t_str
record_string_settings_v2:
seq:
- id: game_title
type: common::t_str_sjis
- id: serial
type: common::t_str_sjis
- id: encryption_key
type: common::t_str_sjis
- id: font_base
type: common::t_str_sjis
- id: font_sub1
type: common::t_str_sjis
- id: font_sub2
type: common::t_str_sjis
- id: font_sub3
type: common::t_str_sjis
- id: starting_hero_graphic
type: common::t_str_sjis
- id: unknown
type: common::t_str
record_u16_settings:
seq:
- id: len
type: u4
- id: unknown
type: u2
- id: custom_move_speed_hero_allies_0
type: u2
- id: custom_move_speed_events_0
type: u2
- id: custom_move_speed_hero_allies_1
type: u2
- id: custom_move_speed_events_1
type: u2
- id: custom_move_speed_hero_allies_2
type: u2
- id: custom_move_speed_events_2
type: u2
- id: custom_move_speed_hero_allies_3
type: u2
- id: custom_move_speed_events_3
type: u2
- id: custom_move_speed_hero_allies_4
type: u2
- id: custom_move_speed_events_4
type: u2
- id: custom_move_speed_hero_allies_5
type: u2
- id: custom_move_speed_events_5
type: u2
- id: custom_move_speed_hero_allies_6
type: u2
- id: custom_move_speed_events_6
type: u2
- id: unknown_2
type: u2
- id: screen_dimensions_w
type: u2
- id: screen_dimensions_h
type: u2
- id: wolf_rpg_version
type: u2
- id: pro_loading_gauge_x
type: u2
if: len > 19
- id: pro_loading_gauge_y
type: u2
if: len > 20
- id: unknown_3
type: u2
if: len > 21
- id: pro_default_screen_scale
type: u2
if: len > 22
static_randoms:
doc: |
pre-generated random numbers. It changes every time when save the game.dat file.
Two 32-bit numbers at the begining and then 28000+ 8-bit 0~127(include) randoms.
The randoms are generated consecutively so it's possible to predict later randoms by providing first few bytes.
See game_dat_random.c for details. Provide the position of this block and first few bytes.
seq:
- id: r1
type: u4
- id: r2
type: u4
- id: randoms
type: u1
repeat: eos
seq:
- id: magic
contents: [0, 'W', 0, 0, 'O', 'L', 0, 'F', 'M']
- id: version_header
type: u1
enum: common::version_header
- id: u8_settings_len
type: u4
- id: u8_settings
type: record_u8_settings
size: u8_settings_len
- id: string_settings_len
type: u4
- id: string_settings
type:
switch-on: version_header
cases:
common::version_header::v3: record_string_settings_v3
common::version_header::v2: record_string_settings_v2
- id: filesize
type: u4
valid: _io.size - 1
doc: |
`filesize == _io.size - 1` should be guaranteed.
Also, it's suggested to make `filesize == _io.pos + 29000` by adjusting size of "static randoms" setion according to the official editor's behavior.
- id: unknown3
type: u4
- id: u16_settings
type: record_u16_settings
- id: static_randoms
size: filesize - _io.pos
type: static_randoms
- id: footer
type: u1
enum: common::version_footer