• We'll be making a number of structural changes to the forums on Wednesday, 06.12.2023. No downtime is expected. Read more here.

[SaveEditor] WarBender - savegame editor [released/1.0.4]

Users who are viewing this thread

This looks like a general UI issue rather than something module-specific, but I'll need some more information to properly diagnose it. If you go into Tools -> Options, there's a setting there named DebugConsole. Change it to True - you'll see the console appear at the bottom of the main window - and then copy/paste the contents of that console (note that it'll have some more paths that you might want to trim for privacy reasons).

If you don't want to go into details here, feel free to just open an issue on GitHub.
Okay, so I think I have found the issue that you were hitting - as expected, it wasn't so much about the savegame, as it was about my development box being Win10, and you trying to run it on Win7 :smile: I think I have fixed that problem now.

However, there was another issue with your save specifically, which exposed a bug in the app when dealing with more than 32 stacks in player's party. I fixed that as well. With that fix, I was able to load the save. Give this a try to see if it fixes all the issues for you:

What does it mean when you load up a save and it tells you that it expected something but found something else? It doesn't crash or anything though, just curious.

As for the editor itself, it is very nice and really easy to navigate! I like it a lot!  :mrgreen: The categories to the left are so easy to scroll through and I like the added touch that each folder has its own icon.
What does it mean when you load up a save and it tells you that it expected something but found something else?

Can you give the exact wording of the message? There are several different code paths that can complain about something like that.

So I need some advice on mod handling...

In order to load the save correctly, WarBender needs two things:

1. Module data (.txt and .ini) for the corresponding module.
2. Slots metadata (.wmmx) for that module.

The second one is nice to have, but not crucial, since it doesn't affect how the data is stored or accessed; only how it's displayed in UI. The first one is crucial, however, because there are some bits of data there that are necessary to even parse the save properly.

So, given a .sav file, how to figure out the module? The saves themselves don't appear to store that information. So, right now it's a heuristic that works like this:

1. Look at the folder where the save file is located, and check if there's a shortcut there named Module.lnk. If there is, it should point at another folder, and that folder is assumed to contain the module - we're done!

2. Look at the name of the folder, and assume that it is the module name, e.g. "...\Documents\Mount&Blade Warband Savegames\Native" -> "Native". Look for a matching folder under M&B install folder, e.g. "...\steam\steamapps\common\mountblade warband\Modules\Native". If it exists, then create Module.lnk in the save folder, and proceed to load.

3. If neither worked, then pop up the dialog asking the user to specify where module.ini for a given module is. Once specified, create Module.lnk in the save folder, so that we don't have to ask again, and proceed to load.

I was hoping that the final fallback wouldn't be triggered all that often. In practice, it usually gets triggered for all modules installed via Steam Workshop, because they end up in weird places like "...\steam\steamapps\workshop\content\48700\285119009". Now, the parent folder for those appears to be the same everywhere - I'm assuming that 48700 is some kind of Steam ID for M&B - the question is how to figure out which modules are which. There's module_name in module.ini, but that doesn't correspond to the name of the save folder in any way. What else is there? There's clearly some way to map module names to numbers, since M&B itself can display the list of all installed modules on startup. But I can't find where it is. And I'm not sure whether it'd help even if I did, because the names M&B shows do not match the names of the save folders! For example, for Diplomacy, the name in the list is just "Diplomacy", but the corresponding save folder is named "...\Documents\Mount&Blade Warband Savegames\Diplomacy (Steam Workshop)".

Also, for non-Steam modules, I'm not sure that the name of the folder containing the save actually matches the name of the module folder, either...

So, is there any way to do this automatically at all? Or at least to provide human-readable names for Workshop modules, so that I could give a list of those, rather than requiring you to find module.ini by yourself?

Either way, once we figure out the right module, there's a question of finding the corresponding .wmmx file. The current approach is to use the name of the save folder - so for "...\Documents\Mount&Blade Warband Savegames\Native", it loads Native.wmmx. But that assumes that the name of the folder is the canonical name of the module... is it, though?
48700 is Warband’s appid on Steam.

I don’t know about steam workshop mods, but a lot of non-workshop mods don’t bother to change the module name in module.ini.

Your proposal looks good.
Yep! You can modify that for any character in the game, including companions. They're all under Troops (or you can just use search):


Gender is in "flags" - you can see "tf_female" on the screenshot for Matheld here, and it can be unchecked to make her male. Haven't ever tried it myself, but I know people used this trick with other editors to marry her with a female character; since it's the same bit in the save, it should work just the same.

Inventory is, unsurprisingly, under "inventory", and you can edit equipped items as well as the actual inventory, although I don't think that last one is used by anyone other than player? You get drop-downs to pick the item that you want, and "modifier" is stuff like Masterwork, Reinforced or Champion.

You can also use multiple selection -> right-click -> "Open" to edit inventories (and skills, attributes etc) for several companions at once, if you want them to use identical stuff for some inventory slot - e.g. suppose you wanted Masterwork Full Plate for all:


Unfortunately, there's a bug whereby the drop-down that lets you pick an item doesn't work when multiple troops are selected - I'm going to fix that for the next release. But you can still type the numeric or symbolic ID directly if you know what it is (or look it up in the tree with search).

Well bless your soul..youve done the Lord's work here..

I guess I should reiterate thought..would changing mathelds gender to male physically change her body and face as well or just make her eligible for marriage? I'm trying to change a companion completely without having to start a new game. Thanks again for your response! P.s. the module in question is gekokujo daimyo edition

Hmm it seems I would need windows 10 to even install the 4.7 framework needed to run the exe
The aforementioned bug is now fixed. While I was at it, I overhauled the object selection in general, so now you can search within the drop-down in the same way as in the main object tree - very handy for items!


There's a bunch of minor bug fixes and improvements on top of that - see the full list & download here:

Unfortunately in order to run the exe its forcing me to install 4.7 framework..except 4.7.2 framework isnt supported for win 8. Any possible work around for this?
Unfortunately, no. There's too many dependencies in the source code on things that require .NET 4.7, because it was written targeting that from the get go. While it's possible to excise them, it would require a substantial amount of time and work. FWIW, it never even occurred to me that supported platform could be a problem, since .NET 4.7 works on Win7!

I would strongly recommend upgrading from Win8 to Win10 in general, or else downgrading to Win7 if you don't really care for all the changes since that. Win8 is a red-headed stepchild in the Windows family when it comes to update and support (as you've just discovered). In fact, it's already out of general support since January this year, so the only updates at this point are critical security patches - which is probably why .NET doesn't even try to support it anymore. Microsoft would rather everyone forget it ever existed, really, given how much of an embarrassment it was with the users.
Well I have a dual booted pc with win 7 and win 8..I guess technically i could download net framework 4.7 and warbender on win 7 and modify the save file, then send it back to my win 8 warband save folder.

Edit: after taking the above action I have to say your save editor is phenomenal. I'll be using it from this point forward.
I'm not quite sure how to edit the ownership of a fief. I assigned it to another faction but it's still owned by the previous guy.
I'm assuming you have edited faction_id. I think that just defines the overall faction, whereas the exact owner is defined separately via slots. I'm not sure which slot that is (this is something that's up to the specific module system), but looking at the available slots, I'd guess it's slot #7, "town_lord".

Unfortunately, the metadata doesn't mark it as referencing a troop, so you can't use a dropdown (I'll fix that in a bit). So, you'll need to edit the numeric ID manually. To find out the ID of any troop, just hover over their name in the tree - the number in the parentheses is the ID.
Great tool. Is there any way to edit a character to be your wife? That's something that's a pain to do even if the in-game cheat menu.
It should be possible, I just don't know enough about the higher level (module system and specific slots) to know exactly how. It should involve editing some slot for both husband and wife troops, such that they point at each other. There's a slot called troop_spouse, which sounds like it might be the one.

However, just editing the slot might not be sufficient to get everything. Since none of the marriage-related scripts are run when you directly edit slots like that, I suspect your wife might not end up in your fief until something happens that causes it to recompute (e.g. you gain or lose a fief, or move your court). Someone who's more familiar with the module system might be able to say.
Add the troop ID of your choice to the slot "slot_troop_spouse" of trp_player.
Add the trp_player ID (0) to the slot "slot_troop_spouse" of the previously selected troop. That's it.
Top Bottom