-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
317 lines (280 loc) · 13.2 KB
/
index.html
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
<!--
This project was created by Piotr "TheHardew" Syrokomski.
Do whatever you'd like with it, just credit me.
Before you read the code, please know, that I approached this project
while having practically no html, css or pojs knowledge. I know this code is horrendous.
Please do NOT learn from this.
Thanks to:
- Postal 1 developers (seriously, they're awesome)
- Mika "Crumblingstatue" Attila for creating Flowey's Time Machine
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Postal save-file editor</title>
<meta id="author" content="Piotr "TheHardew" Syrokomski">
<script type="text/javascript" src="scripts.js"></script>
<style>
@font-face {
font-family: Roboto;
src: url("fonts/Roboto-Light.woff2");
}
* {
font-family: Roboto, sans-serif;
color: #fafafa;
font-variant-ligatures: none;
}
body {
background-color: #2a2a2a;
margin: 0;
}
h1 {
text-align: center;
font-size: 300%;
margin: 20px;
}
form {
display: flex;
flex-wrap: wrap;
}
td.number {
display: flex;
}
input[type="number"] {
flex-grow: 1;
}
select,
option,
input[type="button"],
[type="number"] {
color: #000000;
}
footer {
display: flex;
background: #222222;
justify-content: space-between;
}
#save-file_structure {
margin: 94px 6px 6px 6px;
}
.footer_text {
margin: 6px;
}
#main-content {
display: flex;
flex-wrap: wrap;
margin: 8px;
flex: 1;
}
#site {
display: flex;
min-height: 100vh;
flex-direction: column;
}
</style>
</head>
<body id="site">
<header>
<h1>Postal save-file editor</h1>
</header>
<span style="color:yellow; margin: 8px;">If steam cloud replaces your new save-files, try placing them while the game is open!</span>
<main id="main-content">
<span>
<h2>File menu</h2>
<form>
<fieldset>
<legend>Files</legend>
Load save-file:<br>
<input type="file" id="loaded_save"><br><br>
<input type="number" id="save_number" value="0" min="0" max="7"> Save number<br>
<input style="width: 140px" type="button" id="download_save" value="Download save">
</fieldset>
</form>
</span>
<span>
<h2>Safe to edit</h2>
<form>
<fieldset>
<legend>Character</legend>
<input style="width:100%;" type="button" id="maximise_character" value="Maximise health and armor">
<table>
<tr>
<td>
In-game value
</td>
<td></td>
<td>
Actual value
</td>
</tr>
<tr>
<td class="number">
<input type="number" id="health_in-game" value="100" min="0" max="13107">
</td>
<td>=</td>
<td class="number">
<input type="number" id="health_real" min="0" max="65535">
</td>
<td>Health</td>
</tr>
<tr>
<td class="number">
<input type="number" id="armor_in-game" value="0" min="0" max="13107">
</td>
<td>=</td>
<td class="number">
<input type="number" id="armor_real" min="0" max="65535">
</td>
<td>Armor</td>
</tr>
</table><br>
<fieldset>
<legend>Ammunition</legend>
<input type="button" id="maximise_ammo" value="Maximise">
<input type="button" id="maximise_ammo_backpack" value="Maximise with backpack">
<table>
<tr>
<td>
In-game value
</td>
<td></td>
<td>
Actual value
</td>
</tr>
<tr>
<td class="number">
<input type="number" id="fuel_in-game" value="0" min="0" max="26214">
</td>
<td>=</td>
<td class="number">
<input type="number" id="fuel_real" min="0" max="65535">
</td>
<td>Fuel</td>
</tr>
</table><br>
<input type="number" id="shotgun_ammo" min="0" max="65535"> Shotgun ammo<br>
<input type="number" id="grenades" min="0" max="65535"> Grenades<br>
<input type="number" id="missiles" min="0" max="65535"> Standard missiles<br>
<input type="number" id="homing_missiles" min="0" max="65535"> Homing missiles<br>
<input type="number" id="molotovs" min="0" max="65535"> Molotovs<br>
<input type="number" id="napalm" min="0" max="65535"> Napalm<br>
<input type="number" id="mines" min="0" max="65535"> Mines<br>
</fieldset>
</fieldset>
<span>
<fieldset>
<legend>Game settings</legend>
<input type="number" id="difficulty" min="1" max="11"> Game difficulty<br>
</fieldset>
<fieldset>
<legend>World</legend>
<input type="number" id="level"> Level<br>
</fieldset>
<fieldset id="unlocked">
<legend>Unlocks</legend>
<input type="checkbox" id="unlocked_all">Unlocked all<br><br>
<input type="checkbox" id="unlocked_shotgun">Unlocked shotgun<br>
<input type="checkbox" id="unlocked_assault_rifle">Unlocked assault rifle<br>
<input type="checkbox" id="unlocked_missiles">Unlocked missile launcher<br>
<input type="checkbox" id="unlocked_napalm">Unlocked napalm launcher<br>
<input type="checkbox" id="unlocked_flamethrower">Unlocked flamethrower<br>
<input type="checkbox" id="unlocked_backpack">Has backpack<br>
</fieldset>
</span>
<fieldset id="achieved">
<legend>Achievements</legend>
<input type="checkbox" id="achieved_all">Achieved all<br><br>
<input type="checkbox" id="used_cheats">Used cheats<br>
<input type="checkbox" id="killed_everything">Killed everything<br>
<input type="checkbox" id="killed_hostiles_only">Killed only hostiles<br><br>
<fieldset id="used">
<legend>Used weapons</legend>
<input type="checkbox" id="used_all">Used all<br><br>
<input type="checkbox" id="used_m16">Used M16<br>
<input type="checkbox" id="used_shotgun">Used shotgun<br>
<input type="checkbox" id="used_grenades">Used grenades<br>
<input type="checkbox" id="used_missiles">Used missiles<br>
<input type="checkbox" id="used_molotovs">Used molotovs<br>
<input type="checkbox" id="used_napalm">Used napalm launcher<br>
<input type="checkbox" id="used_flamethrower">Used flamethrower<br>
<input type="checkbox" id="used_proximity_mines">Used proximity mines<br>
<input type="checkbox" id="used_timed_mines">Used timed mines<br>
<input type="checkbox" id="used_shrapnel_mines">Used shrapnel mines<br>
<input type="checkbox" id="used_homing_missiles">Used homing missiles<br>
<input type="checkbox" id="used_assault_rifle">Used assault rifle<br>
</fieldset>
</fieldset>
</form>
</span>
<span>
<h2>Advanced</h2>
<form>
<fieldset>
<legend>Save-file settings</legend>
<input type="number" id="version"> Save-file version<br>
<select id="action">
<option value="0">ACTION_NOTHING</option>
<option value="1">ACTION_PLAY_SINGLE (default)</option>
<option value="2">ACTION_PLAY_BROWSE</option>
<option value="3">ACTION_PLAY_HOST</option>
<option value="4">ACTION_PLAY_CONNECT</option>
<option value="5">ACTION_PLAY_CHALLENGE</option>
<option value="6">ACTION_EDITOR</option>
<option value="7">ACTION_DEMO_PLAYBACK</option>
<option value="8">ACTION_DEMO_RECORD</option>
<option value="9">ACTION_EDIT_INPUT_SETTINGS</option>
<option value="10">ACTION_POSTAL_ORGAN</option>
<option value="11">ACTION_LOAD_GAME</option>
<option value="12">ACTION_PLAY_ADDON</option>
<option value="13">ACTION_PLAY_ADDON2</option>
<option value="14">ACTION_PLAY_ALL</option>
<option value="15">ACTION_CONTINUE_GAME (mobile)</option>
</select> Action<br>
</fieldset>
</form>
</span>
<span>
<h2>Obselete</h2>
<form>
<fieldset id="achieved_obselete">
<legend>Achievements</legend>
<input type="checkbox" id="achieved_all_obselete">Achieved all<br><br>
<input type="checkbox" id="hardest_difficulty">Played on hardest difficulty<br><br>
<fieldset id="used_obselete">
<legend>Used weapons</legend>
<input type="checkbox" id="used_all_obselete">Used all<br><br>
<input type="checkbox" id="used_double_barrel">Used double barrel<br>
<input type="checkbox" id="used_remote_mines">Used remote mines<br>
<input type="checkbox" id="used_deathwad">Used deathwad<br>
</fieldset>
</fieldset>
<span>
<fieldset>
<legend>Time</legend>
<input type="number" id="time_ms" min="0" max="4294967296"> ms
</fieldset>
<fieldset>
<legend>Ammunition</legend>
<input type="number" id="bullets" min="0" max="65535"> Bullets<br>
</fieldset>
<fieldset id="unlocked_obselete">
<legend>Unlocks</legend>
<input type="checkbox" id="unlocked_all_obselete">Unlocked all<br><br>
<input type="checkbox" id="unlocked_double_barrel">Unlocked double barrel<br>
<input type="checkbox" id="unlocked_deathwad">Unlocked deathwad launcher<br>
<input type="checkbox" id="unlocked_m16">Unlocked M16<br>
</fieldset>
</span>
</form>
</span>
</main>
<a id="save-file_structure" href="Postal save-file structure.xlsx" download>Download Postal save-file structure spreadsheet</a>
<footer>
<span class="footer_text">License: Do whatever you want, just credit me</span>
<span class="footer_text">Inspired by <a href="https://crumblingstatue.github.io/FloweysTimeMachine/">Flowey's Time Machine</a></span>
<span class="footer_text">Created by Piotr "TheHardew" Syrokomski</span>
</footer>
</body>
</html>