-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate_save.py
295 lines (263 loc) · 22 KB
/
generate_save.py
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
import os
nebby_pic = [
0x00002957,0x21112959,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x29592257,0x54F12217,0x29570000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x18CF5577,0x45772CB3,0x18CF0000,0x0000319B,0x211318D1,0x2115319F,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x18CF246F,0x1CF51151,0x29590000,0x18CF1259,0x13EB1C71,0x1367090F,0x21132113,0x29590000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x319B090F,0x1C2F18CD,0x00002115,0x2B1F3537,0x24F71CF7,0x1CF71CB3,0x23A9446D,0x22DD10CD,0x319D0000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x319D2959,0x319F0000,0x00000000,0x00000000,0x00000000,
0x0000319B,0x090D10CD,0x0000110F,0x55772D37,0x3D371CF7,0x1CF71CF7,0x1CF71CF7,0x1CF71C2D,0x10CD0000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x2959110D,0x225B22E1,0x11932113,0x00000000,0x00000000,0x00000000,
0x00000000,0x319F319D,0x319D1151,0x5DB93537,0x3D771CF7,0x1CF71CF7,0x1CF71CF7,0x1CF71CF7,0x11D539DF,0x00000000,0x00000000,0x00000000,0x0000319D,0x21132111,0x090F24B3,0x1CF71CF7,0x1CF5125B,0x29570000,0x29592959,0x00000000,
0x00000000,0x0000319D,0x114F44AF,0x3D771CF7,0x1CF75577,0x45771CF7,0x1CF724F7,0x4D771CF7,0x1259319D,0x00000000,0x00000000,0x00000000,0x29591151,0x3C2B44B1,0x246F1CF7,0x24F73D37,0x1CF71CB3,0x18CF2959,0x22592ADD,0x21130000,
0x00000000,0x00002111,0x446F55B9,0x35371CF7,0x3537B6BB,0xAEBB2D37,0x25372537,0x3D371CB5,0x110F0000,0x00000000,0x00000000,0x00000000,0x10CD24B3,0x35372D37,0x1CF71CF7,0x1CF76DF9,0x55771CF5,0x110F2957,0x23233D37,0x18CF0000,
0x00000000,0x00002113,0x342D2D37,0x2D373537,0x24F77E39,0x75F92D37,0x4D771CF5,0x24711A1B,0x108B0000,0x00000000,0x00000000,0x00000000,0x11931CF7,0x1CF72D37,0x35374577,0x24F72537,0x24F71CB3,0x10CD10CB,0x142D1BA9,0x18D10000,
0x00000000,0x0000319D,0x09911CF5,0x1CF73537,0x75F93537,0x1CF74D77,0x4535242F,0x2B6B2AE7,0x1911295B,0x00000000,0x00000000,0x00000000,0x10CD1CB3,0x1CF51CF5,0x4D77BEFD,0x7E3924F7,0x1CB309D5,0x108D09D5,0x099318CF,0x319D0000,
0x00000000,0x00000000,0x295708CB,0x1C711CF7,0x1CF71CF5,0x1CF58DF9,0x8DB52B6B,0x2AA53221,0x21552957,0x00000000,0x00000000,0x00000000,0x29590951,0x1BED2473,0x5D379639,0x4D771CF7,0x13232111,0x319F2959,0x39DF0000,0x00000000,
0x00000000,0x00000000,0x00002113,0x13671CF5,0x1CF51CB5,0x24712BEF,0x336B2AA5,0x322131E1,0x10CF319D,0x00000000,0x0000319B,0x18CD210B,0x18CD108B,0x2AA52AE7,0x33ED2CB3,0x24F55577,0x1C710993,0x29570000,0x00000000,0x00000000,
0x00000000,0x00000000,0x0000319F,0x10CB12DF,0x1B672369,0x2B692AE7,0x32653221,0x31E131E1,0x10CD39DF,0x00000000,0x319B2949,0xCE25EF63,0xAD5910CD,0x32213223,0x2AE723ED,0x1CB51CF7,0x1CF71CF5,0x110F0000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x211108C9,0x18D110CB,0x21971913,0x108B1089,0x215931E1,0x2159108B,0x21152957,0x1089D6A9,0xF767EF61,0xEF6139C9,0x215931E1,0x2A632B29,0x242F1CB5,0x1CF51CF5,0x110F0000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x095112E1,0x2957319D,0x2959319B,0x39DF319F,0x10CD31E1,0x29DF299D,0x21572155,0x321F31DF,0x4A9DB59D,0xEF615ACD,0x0843108B,0x32212AA5,0x22E52431,0x24B312E1,0x21130000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x110F1C71,0x10CD0000,0x00000000,0x000039DF,0x10CD29DF,0x29DF29DF,0x29DF29DF,0x29DF29DF,0x29DF321D,0xDEDF6B99,0x215729DF,0x31E13223,0x108B1151,0x115118D1,0x39DF0000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x319B18CF,0x29570000,0x00000000,0x000039DF,0x108B31DF,0x29DF29DF,0x29DF29DF,0x29DF29DF,0x29DF29DF,0xAD5D635B,0x29DF29DF,0x29DF31E1,0x108B0000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x319D2111,0x108B31DF,0x29DF29DF,0x29DF29DF,0x29DF299B,0x299B29DF,0x94DD4A9B,0x29DF29DF,0x299D108B,0x21150000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0000319B,0x10892159,0x29DF29DF,0x29DF29DF,0x29DF29DF,0x2151190B,0x190B2153,0x7BDB29DB,0x299D29DF,0x29DF1089,0x29590000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0000108B,0x299D29DF,0x29DF29DF,0x29DF29DF,0x29DF2157,0x190B190B,0x190B190B,0x298D2151,0x190B2111,0x29DF3A1F,0x108939DF,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x000010CD,0x29DF29DF,0x29DF29DF,0x29DF299B,0x1993194D,0x190BA517,0x6B53190B,0x190B190B,0x190B190B,0x299929DF,0x1911319B,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0000108B,0x29DF29DF,0x29DF29DF,0x29DF19D3,0x2D752D35,0x3211EF61,0x8455190B,0x190B214B,0x9CD7214B,0x215529DF,0x18CF319D,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x000018CD,0x295731DF,0x31DF41E1,0x49E11A99,0x35FB35B9,0x2A13C623,0x3A0D190B,0x190B5AD1,0xEF61424F,0x215529DF,0x18CF2113,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x319F20CD,0x51E341E3,0x51E36225,0x62252993,0x23A31ADD,0x194B190B,0x314F8259,0x51934A93,0xD6A32213,0x199129DF,0x29DF108B,0x319D0000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x29594157,0x6A256A25,0x6A256225,0x622559E1,0x210D190B,0x190B210B,0xBBE3E3A9,0xBAE1190B,0x1A1335B9,0x23E749E1,0x41E12157,0x21150000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x29574157,0x6A256A25,0x6A256225,0x62256225,0x210B190B,0x190B214B,0xC61DCCA3,0x7A19190B,0x1A5735BB,0x236361E3,0x6225419B,0x21150000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x319D20CD,0x72656A25,0x6A256225,0x62256225,0x210D190B,0x190B190B,0x190B214B,0x190B190B,0x194D1A15,0x41D96225,0x622328CF,0x319B0000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00002113,0x391161E1,0x6A236A25,0x62236225,0x4199190B,0x190B190B,0x190B190B,0x190B190B,0x315359E1,0x622559DF,0x28CF2111,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x295918CD,0x61977A25,0x6A256225,0x622551DF,0x41994A15,0x39CF190B,0x190B210D,0x59E16225,0x62251889,0x319B0000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x000039DF,0x188B9261,0x92657A25,0x7A257225,0x6221B55B,0x61E14199,0x415761E1,0x6A256223,0x499918D1,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x295981D7,0xD2E7BAA7,0xB2A58A61,0xBD9DA45B,0x82257A25,0x7A255155,0x311128CF,0x188B39DF,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x39DF1889,0xCBE5D3A5,0xBC1DD69D,0xD65DAAA3,0xB2A5AAA5,0x699718CD,0x319D319D,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x000018CD,0xD6A5EF61,0xEF61E6DF,0x3189410F,0x490F28CD,0x211339DF,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00002111,0xA51DEF61,0xE71F420B,0x21150000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0000319B,0x29499495,0x29472115,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x29592113,0x319D0000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000
]
nebby_texture = [
0x6DBF6DBF,0x657F657F,0x5D3D54FD,0x54FB54FB,0x54BB54B9,0x54795477,0x4C374C35,0x4BF54C37,0x54375437,0x54775CB5,0x6CF57D31,0x7CAD6C6F,0x5BF153F3,0x4BB34BB3,0x4BB34BB3,0x4BB34BB3,
0x6DBF6DBF,0x6DBF657F,0x657D653D,0x5D3D5CFB,0x54FB54B9,0x54795477,0x54374C37,0x4C354C35,0x4C355477,0x547954B9,0x8D2D9529,0x7CA9642F,0x53F14BF3,0x4BB34BB3,0x4BB34BB3,0x4BB34BB3,
0x6DBF6DBF,0x6DBF6DBF,0x657F5D3D,0x5D3D54FB,0x54BB54B9,0x54775437,0x4C354BF3,0x54375437,0x54775477,0x6CF57D31,0xA5A78CE9,0x746B642F,0x53F14BF3,0x4BB34BB3,0x4BB34BB3,0x4BB34BB3,
0x6DBF6DBF,0x6DBF6DBF,0x6DBF657F,0x657D5D3D,0x5CFB54B9,0x54795477,0x54374C35,0x4C354C37,0x547954B9,0x5CFBA5A7,0xB5A39D25,0x746B53F1,0x4BF34BB3,0x4BB34BB3,0x4BB34BB3,0x4BB34BB3,
0x657F6DBF,0x6DBF6DBF,0x6DBF5D7F,0x5D3D5D3D,0x54FB54B9,0x54774C35,0x4BB34B71,0x54775479,0x54B97533,0x95ABC61F,0xCE1B8CE7,0x6C6D5BF1,0x4BF34BF3,0x4BB34BB3,0x4BB34BB3,0x4BB34BB3,
0x657D657F,0x6DBF6DBF,0x6DBF6DBF,0x6DBF657D,0x653B5CFB,0x54B95477,0x54374C37,0x543754B9,0x5CFB95AB,0xB5E3C5DD,0xBD9F94E5,0x642F4BF3,0x4BB34BB3,0x4BB34BB3,0x4BB34BB3,0x4BB34BB1,
0x5D3D5D3D,0x657F5D7F,0x6DBF6DBF,0x5D7F5D7F,0x54FD54B9,0x4C374BB3,0x42ED54B9,0x5CB95D7F,0x8D71B5E5,0xD61BCDDB,0xA52384A9,0x642F53F3,0x4BF34BF3,0x4BF34BB3,0x4BB34BB3,0x4BB34BB1,
0x5D3D5D3D,0x657D5D3D,0x6DBF5D7F,0x7DFF75FF,0x757D653B,0x5CB954B9,0x54775D7F,0x5CFB5D7F,0xA5E9C61F,0xCE1BCDDB,0xBD9D7C67,0x53B14BB3,0x4BB34BB3,0x4BB34BB3,0x4BB34BB3,0x4BB14B71,
0x5CFB54FB,0x5D3D5D3D,0x657D5D7F,0x75FF75BF,0x5D7F5D7F,0x42ED64FB,0x64FB5D7F,0x7577A5EB,0xD65DD61B,0xCDDBC59B,0x9CE3742B,0x5BF153F3,0x53F34BF3,0x4BF34BF3,0x4BB34BB3,0x4B714B71,
0x54BB54BB,0x5CFB54FB,0x653B54FD,0x757D5D7F,0xFFFF5D7F,0x5D7F5D7F,0x6D7D5D7F,0x95EFBE25,0xD65DD61D,0xCDDBCDDB,0xB55B5BAD,0x4BB14BB3,0x4BB34BF3,0x4BB34BB3,0x4BB14B71,0x4BB14B71,
0x54B954B9,0x54B954B9,0x5CFB54B9,0x653B5D7F,0x5D7F5D7F,0xFFFF5D7F,0x75BF75B9,0xE69FDE9D,0xD61BCE1B,0xBD59A4E1,0x7C2563EF,0x5C335C35,0x5C355435,0x53F54BF3,0x4BB34B71,0x432F4BB1,
0x54795477,0x54795477,0x54B94C37,0x5CB942ED,0x5D7F5D7F,0x5D7F653B,0x6D39956D,0xD661DE9F,0xDE5DD61D,0xC59BBD59,0x6BE95BEF,0x42ED4BB3,0x4BB34BF5,0x4BB34BB3,0x42ED4BB3,0x4B714B71,
0x54775437,0x54374C35,0x54374BB3,0x54775477,0x54B942ED,0x5D7F5C75,0x6C6FA567,0xD663F761,0xBD59B55F,0x8CA36367,0x42ED42ED,0x84B374F7,0x6CB764B7,0x54374BF5,0x4B7142ED,0x53F34BB3,
0x4C374C35,0x4C354BB3,0x4BF542ED,0x4BB34BF3,0x4C354BF3,0x42ED42ED,0x7C6942ED,0xF761F761,0xF761BD59,0x6BE7532B,0x42ED436F,0x74F77539,0x42ED5D7F,0x42ED5C77,0x5C354BB3,0x54354C35,
0x4BF54BF3,0x4BF54B71,0x4BB34BB3,0x4BB342ED,0x4B71432F,0x536D42ED,0x42EDF761,0xF761A525,0x846742ED,0x42ED42ED,0x42ED436F,0x6CB7757B,0xFFFF5D7F,0x5D7F42ED,0x64B74C37,0x5C775477,
0x4BF54BB3,0x4BF34BB3,0x4B714B31,0x4B3142ED,0x4AED4AED,0x5B6B42ED,0xBD59F761,0x94E742ED,0x42ED42ED,0x42ED42ED,0x42ED436F,0x5C775D7F,0x5D7F5D7F,0xFFFF5D7F,0x6D3B54B9,0x5CB954B9,
0x4BF35371,0x4BB35331,0x533152EF,0x52EF52EF,0x52EF5B2D,0x6BAB42ED,0xF76142ED,0x42ED42ED,0x42ED42ED,0x42ED42ED,0x42ED42ED,0x42ED5D7F,0x5D7F5D7F,0x5D7F5D7F,0x6D7D54FD,0x5D3B54FB,
0x4BB35331,0x5B315AEF,0x5AEF5AEF,0x5AEF52EF,0x5B3142ED,0x6AF18CA9,0x94E77C69,0x42ED4AED,0x42ED42ED,0x42ED42ED,0x42ED4B2F,0x6475757B,0xFFFF5D7F,0x7DFF6DBF,0x6DBF5D7F,0x653D5D3D,
0x5B315AEF,0x5AEF5AEF,0x5AEF5AEF,0x62F15AEF,0x63316AF1,0x8CADF761,0xADA794E7,0x6BEB536B,0x4B2D4AED,0x42ED42ED,0x52EF52EF,0x6C3385BB,0x8E3F7DFF,0x75BF5D7F,0x5D7F5D7F,0x657F5D3D,
0x62EF62EF,0x62EF62EF,0x62EF62EF,0x633162F1,0x6B736AF1,0x5D7FF761,0xC667DEA3,0xC623BDE5,0x6BEB52EF,0x42ED6AF1,0x6AF162EF,0x7B73C73F,0xBEFF9E7F,0x963F5D7F,0x6DBF657F,0x657F5D7F,
0x62EF62EF,0x6AEF62F1,0x6AEF62F1,0x73316AF1,0x7B718BEF,0xA46DBCE9,0xDDA5F6A1,0xF761DF25,0x94ED632F,0x6AF16AF1,0x6AF16AF1,0x6AF17C35,0x8D7B8E3F,0x85FF75BF,0x65BF5D7F,0x5D7F5D7F,
0x6AEF62F1,0x72EF62F1,0x72EF6AF1,0x82EF6AF1,0x932D9B6D,0xB2A9BB69,0xDC65F5E1,0xF761C629,0x9C6D832F,0x82EF6AF1,0x6AF172F1,0x6AF17B73,0x8CB7A6BF,0x9E7F8E3F,0x7DFF65BF,0x657F5D7F,
0x72EF62F1,0x7AEF62F1,0x82EF6AF1,0x92ED9AEB,0xB2A9B2A9,0xB2A9CAE5,0xFA9FE4A3,0xCD27B4AB,0x5D7F9B2D,0xB2A9B2A9,0x82ED7AEF,0x6AF172F1,0x6AF184B7,0x85BD85FF,0x75FF6DBF,0x657F5D7F,
0x7AEF62F1,0x82ED92ED,0x92ED9AEB,0xA2ABAAAB,0xB2A9B2A9,0xBAA7B2A9,0xD3E3D4A3,0xC465B3E9,0xB2A9B2A9,0xB2A96AF1,0x8AAD7AEF,0x6AF172EF,0x6AF17BB3,0x8CF9967F,0x8E3F75BF,0x6DBF657F,
0x82ED92ED,0x92ED9AEB,0xA2ABAAAB,0xB2A9B2A9,0xB2A9B2A9,0xBAA7CBA5,0xD463F761,0xB2A9B2A9,0xB2A9AAE9,0xA2EB9AAB,0x92AD82EF,0x82EF7AEF,0x6AF172EF,0x6AF17CB9,0x7DBD75FF,0x6DBF65BF,
0x8AED9AEB,0x9AEBA2AB,0xAAA9B2A9,0xB2A9B2A9,0xB2A9B2A9,0xB2A9CCA5,0xCD21CD21,0xBD59BD59,0xB3A3B327,0xA2AB8AAD,0x82EF6AF1,0x82EF7AEF,0x7AEF72EF,0x7B317BB3,0x8D7B963F,0x75BF6DBF,
0x9AEBA2AB,0xA2ABAAA9,0xB2A9B2A9,0xB2A9B2A9,0xB2A9BB67,0xC425F761,0xD59FC51F,0xBC9FBC5F,0xB3E1B3A3,0xB2A99AEB,0x92AD8AED,0x82ED7AEF,0x7AEF7AEF,0x7AEF72EF,0x7C357CFB,0x75BF6DBF,
0xA2ABAAAB,0xAAA9B2A9,0xB2A9B2A9,0xB2A9BAE9,0xB2A9C3E7,0xCCE3CD21,0xBD59BD59,0xBD59BD59,0xBD59BD59,0xAB65A329,0x92AD82EF,0x7AEF82EF,0x82EF7AEF,0x7AEF7AEF,0x7B317BB3,0x74B9757D,
0xAAA9AAA9,0xB2A9B2A9,0xB2A9B2A9,0xB2A9BB27,0xC3A5C463,0xD5DFCD9D,0xC55DC51D,0xBD1DBCDD,0xBC9DBC5F,0xB41FB3E1,0x9B2992ED,0x8AED82ED,0x82EF82EF,0x7AEF7AEF,0x7AEF72EF,0x7C37753B,
0xAAA9B2A9,0xB2A9B2A9,0xB2A9B2E9,0xBB27C3A5,0xCCA3CD21,0xCD1FBD59,0xBD59BD59,0xBD59BD59,0xBD59BD59,0xBD59ABA3,0xA36792EB,0x8AED8AED,0x82ED82EF,0x7AEF7AEF,0x7AEF7AEF,0x7B317BB3,
0xB2A9B2A9,0xB2A9B2A9,0xBAE7BAE7,0xC3A7C425,0xC4A1CD9D,0xC55DC55B,0xC55BBD1B,0xBD1BBD1B,0xBCDBBCDD,0xBC9DBC5D,0xB41F9B29,0x92EB8AED,0x82ED82ED,0x82EF82EF,0x7AEF7AEF,0x7AEF7B73,
0xB2A9B2A9,0xB2E9B2E9,0xBB27BBA5,0xC425CCE1,0xCD1FC55D,0xBD59BD59,0xBD59BD59,0xBD59BD59,0xBD59BD59,0xBD59BD59,0xABE3A3A5,0x9B2992ED,0x8AED82ED,0x82ED82EF,0x82EF7AEF,0x7AEF7AEF
]
for savefile in 'Red', 'Blue':
sav = [0x00] * 0x8000
#sav = list(b''.join([x.to_bytes(2,'big') for x in range(0, 0x8000, 2)]))
sav[0x260A] = 0x29 # map = poke center
sav[0x29F7] = 0x20 # pokedex obtained (bit 5)
if savefile == 'Red':
sav[0x2598:0x2598+5] = [0x8C,0x80,0x93,0x93,0x50] # name
sav[0x2605:0x2607] = [0x37,0x21] # trainer ID
sav[0x284C] = 0 # current box: 1 (have not changed boxes before)
sav[0x2F2C] = 2 # number of pokemon in party
sav[0x30C0] = 0 # number of pokemon in current box (box 1)
sav[0x2F34:0x2F34+0x2C] = [0x99, # pokemon = bulbasaur
0x00,0x16,0x00,0x00,0x16,0x03,0x2D,
0x21,0x2D,0x00,0x00,0x37,0x21,0x00,0x00,
0xCC,0x00,0x27,0x00,0x34,0x00,0x2B,0x00,
0x41,0x00,0x32,0x23,0xED,0x23,0x28,0x00,
0x00,0x06,0x00,0x16,0x00,0x0B,0x00,0x0B,
0x00,0x0C,0x00,0x0E]
sav[0x307E:0x307E+10] = [0x81,0x94,0x8B,0x81,0x80, # nick
0x92,0x80,0x94,0x91,0x50]
sav[0x2F60:0x2F60+0x2C] = [0xA5, # pokemon = rattata
0x00,0x0F,0x00,0x00,0x00,0x00,0xFF,
0x21,0x27,0x00,0x00,0x37,0x21,0x00,0x00,
0x1B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x5B,0xDE,0x23,0x1E,0x00,
0x00,0x03,0x00,0x0F,0x00,0x08,0x00,0x07,
0x00,0x0A,0x00,0x07]
sav[0x3089:0x3089+8] = [0x91,0x80,0x93,0x93, # nick
0x80,0x93,0x80,0x50]
if savefile == 'Blue':
sav[0x2598:0x2598+8] = [0x8F,0x80,0x98,0x8B,0x8E,0x80,0x83,0x50] # name
sav[0x2605:0x2607] = (1025).to_bytes(2, 'big') # trainer ID
sav[0x284C] = 0x80 + 11 # current box: 12 (have changed boxes before)
sav[0x2F2C] = 0 # number of pokemon in party
sav[0x30C0] = 23 # number of pokemon in current box (box 12)
sav[0x336A:0x33CD] = [ 0x00,0x00,0x00,0x80,0x1E,0x4E,0xB0,0x00,0x00,0x00,0x00,0x00, 0x00,0x00, 0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x0C,0x00,0x78,0x00,0x00,0x01,0x04,0x01,0x0C,0x00,0x78,0x00, 0x01,0x8C, 0x0C,0x00,0x78,
0x00,0x00,0x00,0x38,0x01,0xA4,0x02,0x10,0x00,0x00,0x00,0xCC,0x01,0x30,0x00,0xE8,
0x80,0x00,0x00,0x3F,0x80,0x00,0x00,0x03,0x03,0x06,0xB0,0x16, 0x60,0x00, 0x13,0x5B,0x50,
0x80,0x13,0x58,0x30,0x80,0x1E,0x09,0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
sav[0x3446:0x3467] = [0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x8C,0x02,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x3F,
0x00,0x00,0xFF,0xFF,0xFF,0x00,0xFF,0xFF,0x00,0x00,0x00]
sav[0x3522:0x3543] = [0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,
0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,
0x80,0x80,0x50,0x50,0x80,0x80,0x50,0x50,0x80,0x80,0x80]
sav[0x3371:0x3373] = [0,5] # automatically go back
sav[0x33BD:0x33C1] = 0x80135830.to_bytes(4 ,'big') # don't crash
sav[0x33C5:0x33C9] = 0x801e72f4.to_bytes(4 ,'big') # ptr to payload
sav[0x344F] = 0x50 # don't crash
sav[0x4000] = 0 # pokemon in box 1
sav[0x4462] = 0 # pokemon in box 2
sav[0x48C4] = 0 # pokemon in box 3
sav[0x4D26] = 0 # pokemon in box 4
sav[0x5188] = 0 # pokemon in box 5
sav[0x55EA] = 0 # pokemon in box 6
sav[0x6000] = 0 # pokemon in box 7
sav[0x6462] = 0 # pokemon in box 8
sav[0x68C4] = 0 # pokemon in box 9
sav[0x6D26] = 0 # pokemon in box 10
sav[0x7188] = 0 # pokemon in box 11
# box 12 is current box and therefore doesn't need to be set
payload = nebby_pic + nebby_texture + [
0x3C18801E, # patch "hi"
0x2402003A,
0xA302F403,
0x3C022D29,
0xAF02F404,
0x3c025075, # patch "trade this pokemon" text
0x24427420,
0xaf02f430,
0x3c02696e,
0x24422074,
0xaf02f434,
0x3c026865,
0x24422062,
0xaf02f438,
0x3c026167,
0x24423f00,
0xaf02f43c,
0x3c025965,
0x24427300,
0xaf02f448,
0xa300f332,
0x2402434f, # patch ditto name
0xA702fd96,
0x3c02534d,
0x24424f47,
0xaf02fd98,
0xa300fd9c,
0x3c188013, # patch pokemon data
0x3c024e45,
0x24424242,
0xaf0251d8,
0x24020059,
0xa30251dc,
0x24020084,
0xa30251a8,
0x24020028,
0xa30251cc,
0x3c020096,
0x24426400,
0xaf0251b0,
0x24020d0d,
0xA70251ae,
0x3c18801f, # copy nebby pic (loop)
0x3c0f801e,
0x240e0c80,
0x8de25e74,
0xaf02eaf0,
0x27180004,
0x25ef0004,
0x25cefffc,
0x15c0fffa,
0x00000000,
0x3c188027, # copy over 3D texture (loop)
0x3c0f801e,
0x240e0800,
0x8de26af4,
0xaf02f130,
0x27180004,
0x25ef0004,
0x25cefffc,
0x15c0fffa,
0x00000000,
0x3c18800b, # round 3 (mewtwo)
0x24020002,
0xa302f732,
0x3c188000, # patch main game loop to mess with mewtwo health
0x3c023c20,
0x24428011,
0xaf0277a8,
0x3c0203e0,
0x24420008,
0xaf0277ac,
0x3c188011,
0x3c023c20,
0x24428028,
0xaf020000,
0x3c02a7e0,
0x24422d38,
0xaf020004,
0x3c02240e,
0x24420016,
0xaf020008,
0x3c02a7ee,
0x24422318,
0xaf02000c,
0x3c028fbf,
0x24420014,
0xaf020010,
0x3c0227bd,
0x24420018,
0xaf020014,
0x3c0203e0,
0x24420008,
0xaf020018,
0xaf00001c,
0x03E00008
]
assert len(payload) < (0x1A60 - 4)
for i,x in enumerate(payload):
sav[0x4004+i*4:0x4008+i*4] = x.to_bytes(4 ,'big')
sav[0x4D26] = 0
sav[0x5188] = 0
assert sav[0x4000] == 0
assert sav[0x4462] == 0
assert sav[0x48C4] == 0
assert sav[0x4D26] == 0
assert sav[0x5188] == 0
assert sav[0x55EA] == 0
assert sav[0x6000] == 0
assert sav[0x6462] == 0
assert sav[0x68C4] == 0
assert sav[0x6D26] == 0
assert sav[0x7188] == 0
checksum = 255
for x in sav[0x2598:0x3523]:
checksum -= x
checksum %= 256
sav[0x3523] = checksum
assert len(sav) == 0x8000
f=open(savefile + '.sav','wb')
f.write(bytes(sav))
f.close()