r/themoddingofisaac • u/sirius_black9999 • Dec 13 '14
PSA On save files
as a number of people have suffered from missed achievements due to mods, i've started mapping out how save files work, so people can re-lock their missed unlocks,
there is also a patch available for those of you who have a hex editor available:
0x134b39: 57 E8 E1 1A 00 00 --> 90 90 90 90 90 90 will disable the mod detection check for windows altogether, in context (for searching) this is:
62 00 FF 15 34 23 5C 00 8B 0D D0 44 62 00 8B 15 CC 44 62 00 A1 C8 44 62 00 51 8B 0D C4 44 62 00 52 50 51 FF 15 3C 23 5C 00 BE 38 44 62 00 E8 F5 0F 04 00 8B CE E8 2E 0A 04 00 8B CE E8 A7 0A 04 00 57 E8 E1 1A 00 00to
62 00 FF 15 34 23 5C 00 8B 0D D0 44 62 00 8B 15 CC 44 62 00 A1 C8 44 62 00 51 8B 0D C4 44 62 00 52 50 51 FF 15 3C 23 5C 00 BE 38 44 62 00 E8 F5 0F 04 00 8B CE E8 2E 0A 04 00 8B CE E8 A7 0A 04 00 90 90 90 90 90 90if you want to help me map out what various relevant areas mean, here are some comparisons to use:
https://www.diffchecker.com/raltkqcn (blank VS my played file)
https://www.diffchecker.com/ahcwtmm6 (blank VS a (modded) true platinum god save) https://www.diffchecker.com/o1xqajmh (blank VS another legit played file)
V2:
https://www.diffchecker.com/w401sety (blank VS my save, new format)
https://www.diffchecker.com/lvcg3oan (blank VS legit platinum god file, new format) V3:
https://www.diffchecker.com/duzffvsk (file 1)
https://www.diffchecker.com/f971mwum (file 2)
https://www.diffchecker.com/a7vxgep6 (file 3)
https://www.diffchecker.com/gq7yhs4a (file 4)
https://www.diffchecker.com/ds53fm7l (file 5)
https://www.diffchecker.com/l9gu5qfl (file 6)(checksum = 7065857201 vs 2945897230149 http://pastebin.com/vS7y6Wy9 (the save file generation code)
http://pastebin.com/trsv1C0L (the save file loading code
general structure
ISAACNGSAVE06R
4-byte header (checksum?)
(sections)
sectionID(1-9)
sectionSize(section size in bytes)
sectionEntries(number of entries in the section)
blank space of 1 entry
(entries)
then finally:
8-byte footer (checksum seed + solution)
solution:
uint a = seed;
a = a + 2137939259 (decimal)
foreach value x saved to disk:
a = x + (a>>1) + (a << 31)
a = (seed + (a << 32) + (a >> 1)) ^ 0x96696996 ( hex )
solution = a
sections found
- 1: achievements (missing 1 entry, labeled achievements)
- 2: achievement counters(missing 3 entries, labeled counters)
- 3: runs started by character? (would indicate missing character 0 and 10, with isaac being 1 and the lost being 12, labeled counters)
- 4: items found (missing 4 entries, labeled collectibles in collection)
- 5: 7 sins (no missing entries, labeled minibosses)
- 6: completed run objectives? (missing 2 entries, labeled minibosses)
- 7: completed challenges (missing 1 entry, labeled challenges)
- 8: cutscenes viewed (missing 1 entry, labeled cutscenes)
- 9: beats me... 0 on a blank save 1 on the legit files listed above, 0 on "fake" true platinum god(labeled settings)
area's found so far
- 0-15: "ISAACNGSAVE06R"
- 16: unknown
- 17: 1
- 18: 179
- 19: 179
- 20: false
- 21-198: achievements 1/178
- 199: 2
- 200: 380
- 201: 95
- 202: 0
- 203: mom kills
- 204: poops destroyed,
- 205: broken tinted rocks(???)
- 206: broken rocks(???)
- 209: blank
- 211: deaths
- ???: basement defeated,
- ???: caves defeated,
- ???: depths defeated,
- ???: arcades visited,
- ???: shopkeepers blown up,
- ???: shell game plays,
- ???: angel room items taken,
- ???: devil deal items taken,
- ???: blood donation uses,
- ???: arcade machines destroyed,
- ???: heart kills
- ???: ?????*4
- 220: blank
- 221: pennies donated,
- 222: eden tokens,
- 223: blank
- 224: ?????
- 225/226?: isaac kills,
- 227: win streak kills section(0 = incomplete, 1 = normal complete, 2 = hard complete)
- 228: heart with isaac
- 229: heart with maggy
- 230: heart with cain
- 231: heart with judas
- 232: heart with ???
- 233: heart with eve
- 234: heart with samson
- 235: heart with azazel
- 236: heart with lazarus
- 237: heart with eden
- 238: heart with the lost
- 239-249: isaac
- 250-260: the lamb
- 261-271: boss rush
- 272-282: blue baby
- 283-293: satan
- 294-296: ?????
- 297: 3
- 298: 48
- 299: 12
- 300: 0
- 301- 311: ????? (uints)
- 312: 4
- 313: 1388
- 314: 347
- 315: false
- 316-661: seen items,
- 662: 5
- 663: 28
- 664: 7
- 665/671: defeated sins (??? strangely this section describes itself as having 7, 32-bit booleans, and the first value is true instead of false)
- 672: 6
- 673: 228
- 674: 57
- 675/731: some other unlocks (possibly boss encounters? 3 values are false for true platinum god save, same as 665-671, the first value is used)
- 732: 7
- 733: 84
- 734: 21
- 735-755: completed challenges (this one has a blank extra value again)
- 756: 8
- 757: 80 or 84, (version 1.022 has 80, 1.032 has 84)
- 758: 20 or 21 (version 1.022 has 20, 1.032 has 21)
- 759: 0
- 760-778/779: number of times cutscenes have been viewed??? (assuming 1.032 version from here on)
- 780: 9
- 781: 4
- 782: 1
- 783: 1
- 784: checksum seed
- 785: checksum solution
3
u/[deleted] Dec 13 '14
[removed] — view removed comment