kushulain
Recruit
MnB SaveGame Editor / Converter, is a tool which let you edit save game and convert from a mod's version to another. (Yes, you can now get your old character you stopped to play because of mod updates !)
I cannot guarantee 100% success of conversion though. It depends on the settings you choose via the program and how big the update.
So far it worked great with :
-A Clash Of Kings, converting saves from 1.0 to 1.11
-Anno Domini 1257, converting saves from 0.97 to 1.03 (without faction slots settings enabled)
Download Link
Sources
Screenshot
How the program works
Convert a save game to another mod's version
Modify a save game
Known Bugs :
-crashes if program exceed about 1.7 GB in RAM (so loading more than 2 save is not advised)
-loading progress not correct
-modifying "num_" variables corrupt save game
-modifying player troops / player_party_stack_additional_info may cause file to be corrupted.
If you find any bugs your are welcome to share them.
As same for any feedback, help needed etc.
Thanks to cmpxchg8b, he did a really good job finding out save game structure.
Enjoy,
and please, do not abuse this program
Kushulain.
Edit : I've just noticed there was already a save tool being developped here We should have worked together. >< This is sad, MnB will have to save tool now.
I cannot guarantee 100% success of conversion though. It depends on the settings you choose via the program and how big the update.
So far it worked great with :
-A Clash Of Kings, converting saves from 1.0 to 1.11
-Anno Domini 1257, converting saves from 0.97 to 1.03 (without faction slots settings enabled)
Download Link
Sources
Screenshot
How the program works
In order to display correct value stored in the save game, this program uses a "SaveGameStructure.txt" which describes save game structure and "SlotsNames.txt" which helps giving names to slots.
They also tell how the value should be converted, there are different possible behaviours :
DONTREPLACE = 0 e.g. num_triggers
REPLACE = 1 e.g. Player's Level
CLEAR = 2 e.g. game log
DONTREPLACE_EXCEPTPLAYERS = 3, e.g. troops faces
REPLACE_EXCEPTPLAYERS = 4, .
These next ones try to find new IDs. If the IDs number changed, but the name remains the same, the program will find and replace with new ID number.
If the new version's ID's name is missing (troop or faction is deleted by the update) then the value is not replaced.
REPLACE_BY_FACTION_ID
REPLACE_BY_GLOBALVAR_ID
REPLACE_BY_PARTY_ID
REPLACE_BY_PARTY_TEMPLATE_ID
REPLACE_BY_PARTY_RECORD_ID
REPLACE_BY_QUEST_ID
REPLACE_BY_SCENE_ID
REPLACE_BY_TROOP_ID
REPLACE_BY_ITEM_ID
IDs are gathered from Modules files while the save is loaded.
"SlotsNames" came from Warband module system's file "module_constants.py". This file may differ from mod to mod.
It often looks like Native's one, but having mod's "module_constants.py" would help a lot, and make things safer.
Editing "SaveGameStructure.txt" and "SlotsNames.txt" is really not recommended. But I admit I wasn't sure which behaviour to give to some entries sometimes.
They also tell how the value should be converted, there are different possible behaviours :
DONTREPLACE = 0 e.g. num_triggers
REPLACE = 1 e.g. Player's Level
CLEAR = 2 e.g. game log
DONTREPLACE_EXCEPTPLAYERS = 3, e.g. troops faces
REPLACE_EXCEPTPLAYERS = 4, .
These next ones try to find new IDs. If the IDs number changed, but the name remains the same, the program will find and replace with new ID number.
If the new version's ID's name is missing (troop or faction is deleted by the update) then the value is not replaced.
REPLACE_BY_FACTION_ID
REPLACE_BY_GLOBALVAR_ID
REPLACE_BY_PARTY_ID
REPLACE_BY_PARTY_TEMPLATE_ID
REPLACE_BY_PARTY_RECORD_ID
REPLACE_BY_QUEST_ID
REPLACE_BY_SCENE_ID
REPLACE_BY_TROOP_ID
REPLACE_BY_ITEM_ID
IDs are gathered from Modules files while the save is loaded.
"SlotsNames" came from Warband module system's file "module_constants.py". This file may differ from mod to mod.
It often looks like Native's one, but having mod's "module_constants.py" would help a lot, and make things safer.
Editing "SaveGameStructure.txt" and "SlotsNames.txt" is really not recommended. But I admit I wasn't sure which behaviour to give to some entries sometimes.
Convert a save game to another mod's version
You need the save and mod installed, and also the new version of the mod installed, with a random save game as example. (just start a new game and save it)
-Load the save you wish to convert.
-Load the example save from the recent mod version.
-Click 'Convert Save...'
-Select the two saves, and check all the data you wish to convert. The less is checked the less bugs you may encounter. But going with default settings should do it well.
-Click "Export Current Save" and choose a output file. (Please, watch out to not to override your current saves)
-Load the save you wish to convert.
-Load the example save from the recent mod version.
-Click 'Convert Save...'
-Select the two saves, and check all the data you wish to convert. The less is checked the less bugs you may encounter. But going with default settings should do it well.
-Click "Export Current Save" and choose a output file. (Please, watch out to not to override your current saves)
Modify a save game
-Click "Import new save..."
-Select Module directory and a savegame. Then click load.
-Modify some values
-Click "Export Current Save" and choose a output file.
You cannot add entries, only modify. And you may not modify variables with "num_" in the name.
Insure your values are coherents.
If you wish to modify player's party troop_ids, insure you replace heroes by heroes or non-heroes by non-heroes troops.
Otherwise the final file may be corrupted. I hope this limitation to be removed in later versions.
-Select Module directory and a savegame. Then click load.
-Modify some values
-Click "Export Current Save" and choose a output file.
You cannot add entries, only modify. And you may not modify variables with "num_" in the name.
Insure your values are coherents.
If you wish to modify player's party troop_ids, insure you replace heroes by heroes or non-heroes by non-heroes troops.
Otherwise the final file may be corrupted. I hope this limitation to be removed in later versions.
Known Bugs :
-crashes if program exceed about 1.7 GB in RAM (so loading more than 2 save is not advised)
-loading progress not correct
-modifying "num_" variables corrupt save game
-modifying player troops / player_party_stack_additional_info may cause file to be corrupted.
If you find any bugs your are welcome to share them.
As same for any feedback, help needed etc.
Thanks to cmpxchg8b, he did a really good job finding out save game structure.
Enjoy,
and please, do not abuse this program
Kushulain.
Edit : I've just noticed there was already a save tool being developped here We should have worked together. >< This is sad, MnB will have to save tool now.