Crash when any form of clans xml is loaded from my mod

Users who are viewing this thread

So whenever I run the game with my mod it will crash about 30 seconds of letting in game time pass. Either walking around the overworld map or waiting in a town.
My mod only touches xmls, and specifically, whenever there is a clans xml loading from my mod this crash will happen. It doesn't matter what's changed, even a native spclans.xml copied directly from the game will have this crash occur.

These are all the .xml files my mod loads:
spclans.xml
comment_strings.xml
sandboxcore_equipment_sets.xml
heroes.xml
spkingdoms.xml
lords.xml
module_strings.xml
settlements.xml
spnpccharacters.xml
story_mode_characters.xml

and custom .xslt files for lords,heroes,module strings, clans, and kingdoms


I designed the mod on a 1.8.1 build of the game but reworked all the xmls I touch to be up to date with 1.0.1 and the port worked good, but the issue persists.
I've tried removing special characters from the clan names, tried removing all the custom banners I'd made but to no avail.

The crash log is always a call stack of unknown stuff, and the crash always occurs in the middle of the game assigning AI governors to fiefs. I tried a "OnGovernorAssignedWorkaround" mod that circumvents a similar problem, but this didn't work. The crash also doesn't get caught by BetterExceptionWindow. I loaded the crash dump.dmp in DebugDiag but that didn't give me much information.

I seriously have no idea why this crash is occuring, although I suspect it must be something with AI assigning governors to fiefs at the beginning of the game, as the crash always happens in the middle of that but it's strange that even a native spclans.xml simply being loaded from my mod and not the actual game is enough to crash.
 
Solution
Sounds like good progress to me. You could use the settlements.xslt from TW’s documentation to erase the settlements.xml in Lemmy’s mod and substitute your own edited version of his settlements.xml, ensuring all the settlement cultures and clan owners are supported by your mod.
The error report in your rgl.log isn’t very informative. If you are certain the crash is clan related, I suggest you go through all the governor changed entries in your rgl and mark those towns/castles off vs your settlements.xml to determine which towns/castles haven’t been given an initial governor. IDK what order the game works through them but that may become obvious. One of those unprocessed towns/castles must be next in line after Château de Quélennec. So, I’d assume that the clan assigned to own that next town/castle might be the one causing your crash. If so, that might narrow the focus to resolve the problem.
If not, I suggest you go back to basics and check all the steps required to create custom kingdoms from a guide https://www.nexusmods.com/mountandblade2bannerlord/mods/3185
 
Upvote 1
The error report in your rgl.log isn’t very informative. If you are certain the crash is clan related, I suggest you go through all the governor changed entries in your rgl and mark those towns/castles off vs your settlements.xml to determine which towns/castles haven’t been given an initial governor. IDK what order the game works through them but that may become obvious. One of those unprocessed towns/castles must be next in line after Château de Quélennec. So, I’d assume that the clan assigned to own that next town/castle might be the one causing your crash. If so, that might narrow the focus to resolve the problem.
If not, I suggest you go back to basics and check all the steps required to create custom kingdoms from a guide https://www.nexusmods.com/mountandblade2bannerlord/mods/3185
Hi,

I had thought of going through every governor change and checking in settlements.xml. I noticed pretty early on the crash logs usually ended with either the same governor assignment or at least one away from it. I'll try to determine a pattern and find out which settlement it never reaches. I'll post an update when I'm done with that

However, I don't actually see anything regarding governor assignment in settlements.xml, only which clan is set to own the settlement. From what I can tell the assignment of governor isn't random though so it must be deciding that somewhere.

Also, I'd like to note again that this crash doesn't occur when there is no xml file that touches clans in my mod. That is the strange part, I can copy a clean vanilla spclans.xml from Modules\Sandbox\ModuleData and the crash will still persist. That is why I am not fully convinced something is actually wrong with my own clans file. What do you think?
 
Upvote 0
The error report in your rgl.log isn’t very informative. If you are certain the crash is clan related, I suggest you go through all the governor changed entries in your rgl and mark those towns/castles off vs your settlements.xml to determine which towns/castles haven’t been given an initial governor. IDK what order the game works through them but that may become obvious. One of those unprocessed towns/castles must be next in line after Château de Quélennec. So, I’d assume that the clan assigned to own that next town/castle might be the one causing your crash. If so, that might narrow the focus to resolve the problem.
If not, I suggest you go back to basics and check all the steps required to create custom kingdoms from a guide https://www.nexusmods.com/mountandblade2bannerlord/mods/3185
Alright I did some testing.

In two different crashes, the 10 last governor assignments were identical. It assigned from vlandia clan 1 all the way to clan 5. The order in which governors were assigned seemed to be based on family status, from old to young. So usually the first governor was the clan ruler's spouse, and then oldest child and so on. Unless there was another lord in the clan that isn't direct family but older than the ruler's wife. Regardless, it never reached clan 6. Clan 6 happens to be one of only 2 with the special character 'â' in the name, so I replaced it with a normal 'a'. The next try it seemed to work, it loaded that clan's governors (although suddenly favoring the rulers wife instead of older non family member lord, so now I'm unsure of the actual order the governors are chosen) and a couple other houses after but still crashed.

This time though it crashed before reaching battania clan 7, which has no special characters in its name nor in any of the clan members' names. I let the game crash again to check the crash log, and to my surprise it again failed to reach the same governor assignment as it did the first two times so removing the 'â' seemed to not do anything anyway.

Now I'm not so sure what is still causing the crash. I double checked the related clans' entries in the xml, the settlements, the lords of the clans and everything is correct, no misspellings or anything although I don't think the game would even launch properly if there were.
 
Upvote 0
Strange find... so my mod runs off of Lemmy's Europe campaign map. I have a settlements.xml and xslt which are currently unedited but just the same files from that mod. Not loading them by tagging them out in SubModule.xml never fixed this crash, but this time I decided to replace them entirely with the settlements.xml and .xslt from Eagle Rising. Crash is gone with my clans still loading and working. Annoying is that I need the lemmy settlements because they have the right positions set up.
 
Upvote 0
Sounds like good progress to me. You could use the settlements.xslt from TW’s documentation to erase the settlements.xml in Lemmy’s mod and substitute your own edited version of his settlements.xml, ensuring all the settlement cultures and clan owners are supported by your mod.
Well I've finally fixed it it seems. I took eagle rising's settlements.xml and replaced it's code with that from Lemmy's map mod settlements.xml. It ended up working. But just having a copy of the file itself loading from my mom never worked. Strange.
 
Upvote 0
Back
Top Bottom