SP Other Custom settlements patcher

Users who are viewing this thread

NEW UPDATE - NOW WITHOUT MODIFIYNG SANDBOX MODULE AT ALL
Some new information has come to light. There is a way to override or add to the original settlements of the game. I added how here:
I'll try to find the time to update the patcher to work more cleanly, making it truly how you expect a mod to work (being able to load/unload the module without any caveats related to crashes). The reason why some C# code is still needed is to be able to generate a new distance cache, plus maintain update compatibility.
What this means for you is that for now you can keep working with this the way it is and later when I get around to updating the mod just use the new .dll file. No further changes will be needed. Alternatively you can of course just manually follow the steps described in the link above with your current xml files.

----
Original post:

Hey guys & gals. After much search and failed attempts at adding custom settlements (see my research here https://forums.taleworlds.com/index...ents-without-modifying-sandbox-module.414473/) I decided to create a workaround I call "SettlementPatcher".

It looks at your module's submodule.xml and reads every file corresponding to an xml node with the id "Settlements" and "prefabs". It then adds that content to the Sandbox module's settlements.xml and scene.xscene file. This essentially allows you to make as many modules, even multiple ones at the same time if they all use this patcher, that each add new settlements to the game. The patcher is extremely light on c# code you need to adopt (just a few lines) once, with no extra work no matter how many xml files you want to load or how many entries they have.

I've described the way it works and its caveats over at the github. You can also find the source code there.
I further created a Nexusmods mod that is just a module template that adds three settlements as an example. You can also add new settlements to that template if you want, it works all the same.

If you have questions, concerns, ideas or find bugs please reply here or shoot me a DM on discord Trucker#3350.

Nexusmods link

Github link
 
Last edited:
@Kommissar It will work just fine. Whatever one of the mods is run first will create a backup and whatever mod is shut down first will restore the original files from the backup. You can use as many mods as you want in parallel using this patcher.
 
@Kommissar It will work just fine. Whatever one of the mods is run first will create a backup and whatever mod is shut down first will restore the original files from the backup. You can use as many mods as you want in parallel using this patcher.

But which settlements will appear? Those of both mods, or only whichever is loaded last?
 
Back
Top Bottom