Documentation World Map World-mapping for Bannerlord

Users who are viewing this thread

Thank you so much for this, you've been incredibly helpful. I've been following along with the document and mostly everything has been going smoothly. One part I'm having a bit of difficulty with is the settlements section. I'd like to rearrange all the floating towns and castles, but I didn't see anywhere in physics to disable terrain snapping, and some villages are attached to parent towns. Is there any easy way to simply grab one whole town or village and align it where I want to?
 
Thank you so much for this, you've been incredibly helpful. I've been following along with the document and mostly everything has been going smoothly. One part I'm having a bit of difficulty with is the settlements section. I'd like to rearrange all the floating towns and castles, but I didn't see anywhere in physics to disable terrain snapping, and some villages are attached to parent towns. Is there any easy way to simply grab one whole town or village and align it where I want to?
Recent patches reorganised settlements into campaign icon capsules and added Town Entity Manager scripts to each settlement. They were added to Main_map to improve performance via faster hierarchical culling of objects/icons not in view. I'm advised they will only function this way after they are registered and we will need to wait for documentation for that process. In any event, such capsules need to contain settlements in proximity to each other, so, the organisation in Main_map wouldn't work on an alternative worldmap where settlements are differently distributed. Accordingly, for now, I've deleted all the campaign icon capsules (by editing the scene.xscene file - don't do it in the editor or you'll lose all their children unless you detach them first) as they clutter up the entity search panel in the scene editor.

That said, settlement placement on a new worldmap is a grind. Terrain snapping is enabled on some settlement components and not others. Mainly because it works sometimes and is a problem in other instances. Bannerlord's settlements have been customised to the terrain contours at their location in Calradia. This won't match yours.

For Towns/Castles:

Select the whole entity (i.e. town_K1) in the editor's entity search panel. Then use the editors transform widget to move it into approximately the correct position. Ensure the x and y rotations remain zero as slanting a town generally looks bad and doesn't resolve underlying component misalignments. I prefer to do this using the level 3 fortification icons, but each fortification level needs to be customised to your terrain.
Gatehouses are a problem. They generally mount siege engines and banner positions and are often flanked by wall breach sets. So, best to get the front as best vertically aligned as possible to minimise changes there. Equally, you need to check the attacking siege engines and volume boxes sit on passible navmesh and are correctly snapping to your new terrain.
Next for each level in turn, check and realign heights of walls/towers/etc. to ensure they're grounded or stagger reasonably up or down slopes. Make sure siege engines and banner positions volume boxes are moved with the related meshes. For example shift click lets you select an individual tower then shift control click lets you select a second item to be moved with it. You can group several items this way to move them in concert. Be careful with this as keyboard slips can spawn unwanted duplicate entities.
Houses etc. inside towns were treated differently by different Devs. Most set them up as a parent child group separate from fortification levels allowing you to place them once. However, other Devs place them inside fortification levels requiring you to redo it each level. Most houses can just be snapped to terrain using that house's visibility flags. You can select all the same type of house in the editors search panel together and collectively set their flags. However, be careful, some particularly Aserai houses are stacked for terraced visuals or markets/arenas may be mounted on platforms, which will be destroyed by terrain snapping.
Obviously, there's lots of other stuff to customise such as adding walls to the backs of towns that were backed by a mountain/river/sea in Calradia etc.

For villages:

Unlike towns, the core village icons are single composite meshes, which can't be individually customised. Accordingly, they need to be rotated/slanted into the terrain. Just focus on getting the level 3 buildings as well grounded as possible. Then check the other levels. Next, select all the production icons (you need to be in level 3 to see them all - even here some may be underground) and set their positions and snapping flags to suit your terrain.



I hope that helps. Unfortunately, learning is a trial and error grind.
 
Last edited:
I think it was version 1.6.0 or 1.6.2 where Taleworlds introduced campaign_icon_capsules and Town Entity Manager scripts into Sandbox Main_map to provide a faster hierarchical method of culling occluded settlements and hideouts. Prior to version 1.6.5 modders building worldmaps could ignore them. However, with 1.6.5 if your settlements or hideouts have Town Entity Manager scripts attached to them without being contained in campaign_icon_capsules the game will crash at 'Ticking map scene for first initialization' in the RGL log. Conversely, settlements without Town Entity Manager scripts and campaign_icon_capsules in 1.6.5 will now be invisible in game apart from their decals and name labels - they continue to function in other respects.

Provided each settlement or hideout has a Town Entity Manager script attached and an empty entity is added containing the new Town Scene Manager script, they can be made visible by making them all children of campaign_icon_capsule_1. However, this is not recommended as it results in sluggish loading times and will thwart any optimisation via hierarchical culling. I was advised in August : 'In the future, we would probably create a documentation for how to register your new settlement icons to this system for better CPU performance'.

While there has been no documentation to date, I hope that the new Town Scene Manager script automatically registers campaign_icon_capsules containing settlements/hideouts with Town Entity Manager scripts. These scripts don't appear in C#, suggesting they are C++ engine code.

Capsules just need to be empty entities which are named campaign_icon_capsule_1 to some sequentially higher number, which parent settlements and hideouts in geographical boxes. I split my map up into 86 capsules and Main_map uses 90ish.
 
Last edited:
Campaign map battle terrain system: https://forums.taleworlds.com/index...-access-modifiers-changes.443896/post-9771511
I uploaded a template for cutting and pasting green channel areas on TW's modding discord https://discordapp.com/channels/411286129317249035/761302555308720148/932371097721122816
Warning: TW's current code interprets the worldmap_battle_scene_grid texture using a fixed value divisor of 848 for terrainSize. This is 16 nodes x 53 metres per node = 848. TW hardcoded the conversion for Calradia's dimensions. Needs to be patched for custom campaign maps. Hopefully, this will be corrected in due course.
 
Last edited:
The campaign map atmosphere in game is very different from that seen in the editor as it uses 24 hourly cube and scatter maps. I had previously considered these inaccessible. However, I was wrong.

Procedure to export and reimport Native cubemaps as an override:

1. Export an individual cubemap texture from TpacTool in DDS format. Even though the cubemap is invisible in TpacTool, it exports six 256x256 textures representing the individual cube faces (numbered 0 to 5). These need to imported into paint_net as my gimp plug-in can't cope with them.

2. Create a 1024x768 alpha texture with the downloaded faces reassembled as shown here:
ym9qz.png

3. Export from paint_net in DDS format with these settings:
Olu8D.jpg

4. Import into your mod's asset folder to override the original:
mROhi.jpg

Clearly, this is only a test exercise. However, it can be used to correct a some problem cube maps without recreating a full set. I for example have problems with the night cubemaps.

BTW for a custom set of cubemaps, the editor has a save cubemap option at the bottom of the scene options window. This saves a single cross texture in C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_wEditor which can be loaded by paint_net.
 
Last edited:
Back
Top Bottom