Repository navigation
Releases: ap0ught/ftk2-save-editor
Release list
v0.2.1 — Party rename sync + Carnival QoL
Party rename sync
--rename ID=NAME now syncs the display name across the run save and the User.ftk2 roster (PartyCharacters + LastRunCharacters) in a single pass. Both files are backed up before any writes; the User file is parsed once (JSON via demjson3), character lookup is resolved once, and roster writes are deferred until the run save succeeds. Malformed save files fail closed — undecodable bytes, missing JSON, or absent character data never raise; they produce a clear error and leave all originals untouched.
Carnival QoL
--tickets N— set the campaign Carnival Ticket pool (ItemPools.MISC_CARNIVALTICKET_01) to any non-negative integer (0–999,999).--wheel-piece ID— give one Carnival Wheel piece (MISC_WHEELPIECE_01, full-heal reward) to a character by GUID.--snacks-to-10— top up every party member's snack stacks (snickerdoodle, hotdog) to 10.
GUI
The Set Carnival tickets button is now a spinner (0–999,999) + Set tickets button, replacing the old hard-coded "set to 50" button. Disabled until a run save is loaded.
What's Changed
- feat: Carnival QoL — ticket pool, wheel piece, party snacks by @ap0ught in #10
- feat: rename party members, synced across run and User roster by @ap0ught in #9
Full Changelog: v0.2.0...v0.2.1
v0.2.0 - Party consumable top-up
Highlights
- Top up eligible consumable stacks to 10 for one selected character or every player-controlled party member.
- Supports herbs, tools, drinks, scrolls, safetystones, thrown items, orbs, candy, and
MISC_INK. - Carry consumables forward from the most recent save of a previous act.
- Replace equipped items or add inventory items from the saved item catalog.
- Display followers and mercenaries in the Party tab while excluding them from party-wide gold and consumable updates.
Safety And Feedback
- Creates a
.bakbackup before modifying a save. - Leaves stacks already at 10 or higher unchanged.
- Clearly reports when everything is already topped up and confirms that no save or backup was written.
- Preserves item IDs, equipped-slot wiring, stack metadata, and expansion metadata where required.
- Rejects malformed saves and ambiguous duplicate character or item IDs instead of making unsafe edits.
Other Changes
- Added a Non-Party tab.
- Improved party deduplication and save validation.
- Expanded automated coverage to 44 tests.
Downloads
ftk2_save_editor-0.2.0-py3-none-any.whlftk2_save_editor-0.2.0.tar.gz
Full changelog: v0.1.0...v0.2.0
v0.1.0 - Initial release
v0.1.0 - Initial Release
First release of the FTK2 Save Editor for For The King II (Steam appid 1676840).
Features
- Core Library (
ftk2_editor): XOR-obfuscated JSON parser/editor (key:21398xa2) - CLI (
ftk2-edit): Decrypt, encrypt, edit fields, verify saves - GUI (
ftk2-gui): PySide6 desktop app for browsing saves
Supported Operations
- Read/write
User.ftk2(UserData: settings, LocalStats, lore unlocks, party presets) - Read/write
GameRuns/*.ftk2(GameRunData: expedition state, party wallets, entities) - Wallet gold editing:
CURRENCY_ADVENTUREstack count on CharacterComponent.Things[] - Inventory top-up: Set herb/tool/drink stacks to minimum (default 10)
- Export decrypted JSON for manual editing
Format Details
.ftk2 files are UTF-8 BOM + XOR-obfuscated JSON (not protobuf). The XOR key 21398xa2 comes from SaveGameHelper.encryptString in FTK2.dll.
See decompiled/FORMAT.md for full schema documentation.
Install
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
ftk2-guiSave Location (Proton/Linux)
~/.local/share/Steam/steamapps/compatdata/1676840/pfx/drive_c/users/steamuser/AppData/LocalLow/IronOak Games/For The King II/User.ftk2
Warning: Quit the game before editing — it overwrites User.ftk2 on exit. Steam Cloud may overwrite local edits.