20XX
Not enough ratings
Save State Editing
By LVL99
This guide will explain how you can edit your save state (.run) files.
   
Award
Favorite
Favorited
Unfavorite
Introduction
If you save your run at the end of a level (Reverent, Normal or Defiant mode), a save state file will be created. You can edit this file to become mightier than ever (edit stats, nuts, augs etc.).

In the past, the game would check for a hash of your save state file and invalidate it if it was modified. However, this doesn't happen anymore (I approve of this bug), so tampering is now possible.

Your save state file is called "20xx.run" and is located in Documents\20XX. You will need a hex editor to open and edit it (I recommend HxD). You can ignore the file "20xx.rnx", that's where the aforementioned hash is stored in.

The data is saved in the form of hexadecimal values (big-endian notation), so a basic understanding of the hexadecimal numeral system is required.

In the following section I will list the locations (also called offsets) of these values within the .run file.
Please note
Make sure to always close the game when you edit save state files, otherwise the changes will not take effect.

Also, save state files are not the same as general 20XX save data. For more info on that, check out Zero's excellent Save Editing Guide.
Offsets
Static offsets
Only a few of the important values in the save state file are static. You can find these near the beginning of the file. In this guide, I will prefix hexadecimal values with "0x" to avoid confusion (except for value lists).


Offset 0x04: Nuts (4 bytes)
In the screenshot you can see that my character currently has 34 nuts (0x22). Don't give yourself more than 0x7FFFFFFF nuts, or you will get a negative value in the game.

Offset 0x08: Tokens (4 bytes)
Works the same way as nuts.

Offset 0x0C: Seed (8 bytes)
In case you didn't know, seeds are simply numbers in the base-36 numeral system (imagine the hexadecimal numeral system, or base-16, but with g–z as additional number characters). My seed in the screenshot is 0x5C2B733D, which is the hexadecimal notation of "PKNOE5". You can use the following website to convert seeds back and forth: https://www.translatorscafe.com/unit-converter/en-us/numbers/39-19/

You can use the 8 highlighted bytes to change the seed.

Offsets 0x1E, 0x20, 0x22: Boss Portals
Single bytes that determine which bosses you can select next.

01 = Rollster
02 = Perforator
03 = Death Lotus
04 = Twin Astrals
05 = Shatterbeak
06 = Vile Visage
07 = Kur
08 = Eternal Star
0A = Brighton Sharp
0B = Arlan Flat
00 = Bugnisort (Agnisort with either Perf or Rollster in a tiny boss room)
09 = Brighton's Buggy Brother (see for yourself)

Relative offsets
The following offsets can only be found relative to what I call the "Reference offset".


Somewhere in the second half of the file you can find the byte sequence "23 01" (see the "#" in the Decoded Text section of your editor). All of the following values can only be found relative to the position of this byte sequence, which I will call "Reference offset" going forward.

Right before the Reference offset: Levels (1 byte per defeated boss)
Your current level is not saved as a single number, but in the form of a byte sequence, and each of these bytes stands for a boss you have beaten (think of the boss history that is displayed in the results screen at the end of a run).

For example, in my screenshot there are 3 bytes before the Reference offset (03 = Death Lotus, 07 = Kur, 02 = Perforator), which means that I am currently at the end of level 3 (Agnisort). If you want to change the level, you have to change the length of this byte sequence. As a result, the file will become longer or shorter. See the list above for the boss values.

So if I wanted to set my .run file to level 5, I would have to insert two bytes at the end of the boss sequence (e.g. 03 07 02 01 04).

Reference offset + 0x01: Character (1 byte)
The current character. In my screenshot it is Ace.

00 = Nina
01 = Ace
02 = Vika
03 = Jest
04 = Draco
05 = Hawk
06 = Dvorac
07 = Autumn

You might be tempted to change this to a number greater than 5, but IIRC that will just make your game crash.

Reference offset + 0x06: Max HP Boost (4 bytes)
This value determines how many additional max HP your character has, on top of your augs. If you activated the permanent HP upgrade in the HQ, this value will be at 4000 (0x00000FA0, meaning your character has 4 extra max HP), otherwise most likely at 0. You will have to increase this number by 1000 for each max HP you wish to gain.

Reference offset + 0x0E: Max NRG Boost (4 bytes)
Same as the Max HP Boost, add 1000 to increase your max NRG by 1 in the game.

Reference offset + 0x16: ATK Boost (4 bytes)
Permanent ATK boost. This is used for permanent stat upgrades that you get from Consuming Fury etc. You can increase or decrease this value by modding your save file. Unlike HP and NRG, you don't have to multiply this value by 1000. Just add 1 for each extra ATK point.

Reference offset + 0x1E: PWR Boost (4 bytes)
Same as above.

Reference offset + 0x26: SPD Boost (4 bytes)
Same as above.

Reference offset + 0x2E: JMP Boost (4 bytes)
Same as above. There doesn't seem to be a permanent attack speed boost.

Reference offset + 0x48: Current HP (4 bytes)
Your current HP. This has to be a multiple of 1000 again. If your current HP value is greater than your max HP, the game will reset it to your max HP value.

Reference offset + 0x50: Current NRG (4 bytes)
Same as current HP. However, theoretically you can have NRG fractions, for example Vera consumes 1/10 NRG per shot, which would increase or decrease this value by 100.

Reference offset + 0x58: Armor (4 bytes)
Same as current HP and NRG.
Offsets (continued)
Reference offset + 0x5C: Augs (2 bytes per aug)
Right after the armor value comes your chain of augs. For each aug you collect in the run, two bytes are added to this sequence. The aug sequence always ends at "23 23".

You can see that I have 12 augs in my screenshot. If you wanted to give yourself another aug or remove one, you'd have to insert or remove two bytes, respectively. Prototypes also go into this chain, as do core augs. In the case of core augs, the most recent core aug you collected for a specific body part will determine what your character will be wearing in that slot. Main weapons and powers do not go into this byte sequence though (I will talk about them later).

Here is a list of all the aug values (parentheses show decimal representations for reference):

00 C8 (200) = Plumber Hat
00 C9 (201) = Strongarm Band
00 CA (202) = Ninja Sash
00 CC (204) = Power Enhancer
00 CE (206) = Heart Container
00 CF (207) = Blue Lander
00 D0 (208) = Potato Battery
00 D1 (209) = Brain Food Lunch
00 D2 (210) = Zephyr
00 D5 (213) = Forcemetal Shell
00 D6 (214) = XCALBER
00 D7 (215) = Glass Cannon
00 DA (218) = Vitality Scavenger
00 DB (219) = Energy Scavenger
00 DC (220) = Scrapmetal Scavenger
00 DD (221) = Seven Leaf Clover
00 DE (222) = Spillover Matrix
00 DF (223) = Health Nut
00 E0 (224) = Charged Nuts
00 E4 (228) = Nut Replicator
00 E5 (229) = Minimech O. Grinder
00 E6 (230) = Murderdrone
00 E7 (231) = Skittery Smuggler
00 E8 (232) = Shinier Token
00 E9 (233) = Nutstack
00 EA (234) = Re-Flapp
00 EB (235) = Tiny Flamespewer
00 EC (236) = Gapminder
00 ED (237) = The Rebeginner
00 EE (238) = Shockwave Sidekick
00 EF (239) = Vendsmasher
00 F0 (240) = Nutsaving Stringwire
00 F1 (241) = Armor Nut
00 F2 (242) = Regenerative Plating
00 F3 (243) = Enerative Plating
00 F4 (244) = Armorative Plating
00 F6 (246) = Thrift Actuator
00 F7 (247) = Crisis Overdrive
00 F8 (248) = Crisis Timestopper
00 F9 (249) = System Restore
00 FA (250) = Armor Spreader
00 FB (251) = Choicebooster
00 FC (252) = Armor Bloom
00 FD (253) = Meganut
00 FE (254) = Pure Flame
00 FF (255) = Forgotten Memento
01 00 (256) = Bracer of Battle
01 01 (257) = Hypersash
01 02 (258) = Life Extender
01 03 (259) = Megaheart
01 04 (260) = Vibroreserve
01 05 (261) = Reclaimed Spark
01 06 (262) = Armor Scavenger
01 07 (263) = Entropy Lock
01 08 (264) = Striking Feather
01 09 (265) = Thunderous Boon
01 0A (266) = Band of Might
01 0B (267) = Mistimed Protector
01 0C (268) = The Volunteer
01 0D (269) = Thrillseeker
01 0E (270) = Quantum Spook
01 0F (271) = Hoarder's Might
01 10 (272) = Contractor Plus
01 11 (273) = Contractor Omega
01 12 (274) = Mixmatch Mastery
01 13 (275) = Charging Magnet
01 14 (276) = World Slug
01 15 (277) = Leafmetal Plating
01 16 (278) = Zookeeper's Sigil
01 18 (280) = Static Clicklets
01 19 (281) = Fortune Stabilizer
01 1A (282) = Spicy Incense
01 1B (283) = Patchwork Connector
01 1C (284) = Vitaboost
01 1D (285) = Thorned Hull
01 1E (286) = Juiced Reserves
01 1F (287) = Kinetic Converter
01 20 (288) = Dashbolt
01 22 (290) = Utilifier
01 23 (291) = Vibrofocus
01 24 (292) = Leafpetal
01 25 (293) = Splintering Twinifier
01 26 (294) = Zookeeper's Zeal
01 27 (295) = Crisis Lifebank
01 28 (296) = Deconstructor's Might
01 29 (297) = Armorall
01 2A (298) = Unflappable
01 2B (299) = Intensifier
01 2C (300) = Force Resonator
01 2D (301) = Case Resonator
01 2E (302) = Cranial Resonator
01 2F (303) = Kinetic Resonator
01 48 (328) = Sanity Converter
01 49 (329) = Violence Enhancer
01 4A (330) = Defiant Decree
01 4B (331) = Brutish Augmentation
01 4C (332) = Focusing Sagelens
01 4D (333) = Earthmetal Plating
01 4E (334) = Interesting Times
01 4F (335) = Uncharging Force
01 50 (336) = Final Shell
01 51 (337) = Zookeeper's Burden
01 52 (338) = Consuming Fury
01 53 (339) = Hysteria
01 54 (340) = Contractor Beta
01 55 (341) = Kingseeker
01 56 (342) = Vitality Partitioner
01 57 (343) = Patchwork Integrator
01 58 (344) = Enlightenment
01 7C (380) = Armatort Chest
01 80 (384) = Armatort Head
01 84 (388) = Armatort Leg
01 88 (392) = Armatort Arm
01 7D (381) = Oxjack Chest
01 81 (385) = Oxjack Head
01 85 (389) = Oxjack Leg
01 89 (393) = Oxjack Arm
01 7E (382) = Dracopent Chest
01 82 (386) = Dracopent Head
01 86 (390) = Dracopent Leg
01 8A (394) = Dracopent Arm
01 7F (383) = Owlhawk Chest
01 83 (387) = Owlhawk Head
01 87 (391) = Owlhawk Leg
01 8B (395) = Owlhawk Arm


Second to last byte in the file: Lives (1 byte?)
Set the amount of extra lives for Reverent (easy) mode. It's possible that this is another 4- or even 8-byte value, but why would you need so many lives?

Last byte in the file: Game Mode (1 byte)
You can change the game mode mid-run, even to modes that don't actually have save pods. These are the game modes I have identified:

04 = Reverent
00 = Normal
03 = Defiant
05 = Daily Challenge
06 = Daily Hardcore Challenge
07 = Weekly Challenge
08 = Weekly Hardcore Challenge
09 = Rush Job
0A = Seed Racer

Setting the game mode to a challenge run won't allow you to cheat though, your score will simply not be saved.


Reference offset + 0x31: Main weapon (2 bytes)
These two bytes will determine your current main weapon.

00 11 (17) = N-Buster
00 12 (18) = Star Beam
00 13 (19) = Forkalator
00 14 (20) = Wave Beam
00 15 (21) = Scatterblast
00 31 (49) = V-Shooter
00 19 (25) = A-Saber
00 1A (26) = Rippling Axe
00 1B (27) = Plasma Blender
00 1C (28) = Glaive
00 1D (29) = Sharp Sharp Spear
00 1E (30) = J-Cutter
00 1F (31) = The Siphon (Whip)
00 21 (33) = Unstoppable Force (Hammer)
00 22 (34) = Twinblade (Boomerang)
00 23 (35) = Vega
00 24 (36) = Peacebringer
00 25 (37) = Gemini
00 26 (38) = Rapture

If you give a character a main weapon that they can't legally use, the game will reset it to that character's default weapon, unfortunately.

Reference offset + 0x33: Powers (2 bytes per power)
Set your current powers. In the case of Draco or Dvorac, the first 2 bytes determine their power and the following byte pairs are their remaining main weapons (#2–8).

00 64 (100) = Vera
00 65 (101) = Mortar
00 66 (102) = Boomerang Blade
00 67 (103) = Dixie Twist
00 68 (104) = Shadespur
00 6A (106) = Quint Laser
00 6B (107) = Transposer
00 6C (108) = Flameshield
00 6D (109) = Splinterfrost
00 6E (110) = Force Nova
00 6F (111) = Wildfire
00 70 (112) = Blastjump
00 71 (113) = Seeking Striker
00 72 (114) = Protorifle
00 77 (119) = World Igniter
00 9E (158) = Al Laser (will crash your game if you select it in the pause menu)

You are free to experiment with these values. You can find values for any projectile that appears somewhere in the game, although most of these projectiles won't behave like they should when used by your character. Often, your game will also crash if you select the respective power slot in the pause menu.
Co-op save states
I haven't dabbled much into co-op save states, but it looks like the section from the character byte to the aug sequence is simply doubled for character 2.
Save State Editor
And if all of this is too much work for you, you can simply download my save state editor here[github.com]


My code is a dumpster fire, so I'm surprised the editor works as well as it does, but let me know if you ever encounter a bug. Note that it will not work for co-op save states.
Credits
Zero: For his Save Editing Guide (especially the aug values, which I copy-pasted from there).
2 Comments
转人工 7 Apr, 2024 @ 9:01am 
FK, brother, you've been a big help to me
I am a rookie and I am very annoyed with jumping levels
With you, I can start enjoying the game
And you, my friend, are the true hero
berndcrack 17 Jan, 2021 @ 9:35am 
I could use something like this for Jagged Alliance Wildfire...