Modding tools

Users who are viewing this thread

All scenes and the worldmap are held in scene.xscene files. I agree they can be read and understood in Notepad++, however, the scene.xscene file for Sandbox Main_map (i.e. Calradia's world map) runs to 364,837 lines of code. IMO mappers have little chance of creating alternative campaign maps for full conversion mods without a visual scene editor.
Meant to say just for the battle scenes and smaller stuff. An experience coder would add an visual interface. The only problem i see is time. They would have to go into every scene and get meshes and incorporate them in. As I made Thermopylae, Changban, and a few other smaller experimental maps, I already understood the concept of implementation.
 
Judging from their official statement on the modding forum these are the components that "may" be made available to the community:

  • Scene editor
  • Mesh editor
  • Material editor
  • Model/Animation viewer
  • Skeleton editor
  • Replay editor
  • Particle editor
  • Atmosphere Editor
  • Cloth editor
  • Path editor
  • Resource Browser
  • Runtime performance profile tools
Do you think they can deliver, and how important are these for modders?

Based on the dev comment above, we can say that we won't get easy scripts like, "Player 1, go retrieve book from NPC 1" without using C#.
-Scene, mesh, material, model, skeleton, replay editors should be no problem as its something they use for implementation. I understand that they use 3rd party 3d software, but the mod tool should at least have an import/export function so in case its not straight forward experience people can at least use their own 3d software.
-Definitely need the path editor. We don't need ai to not be able to move around.
-The rest I would say are extra icing on the cake.
 
Meant to say just for the battle scenes and smaller stuff. An experience coder would add an visual interface. The only problem i see is time. They would have to go into every scene and get meshes and incorporate them in. As I made Thermopylae, Changban, and a few other smaller experimental maps, I already understood the concept of implementation.
True, but even for less complicated scenes TW now layers all the different fortification levels, siege maps and civilian maps in the same settlement scene.xscene file. I'd prefer an official scene editor that has been used by TW inhouse during development as it should be less buggy than something built from the outside looking in.
 
When you say "Replay Editor", do you mean like in the Total War series where you can save and then rewatch a battle as a spectator? Because that would be much appreciated since we all probably miss out when wielding large armies but choosing to fight in the thick of it. :smile:
 
When you say "Replay Editor", do you mean like in the Total War series where you can save and then rewatch a battle as a spectator? Because that would be much appreciated since we all probably miss out when wielding large armies but choosing to fight in the thick of it. :smile:
That's exactly it. The video on this tool seem to show case the ability to make cool shots using the tools, but even in its most basic form it would be greatly appreciated. It's really annoying to play a battle. Try to take a shot and dislike the shot. Replay the battle and try again.
 
@Callum sorry for @-ing you, but i've just watched the new dev update video and I wonder... Will modders be allowed to create their own battlefields for SP and attach them to specific places on the world map? So players won't find themselves in the forest while they meet their enemy on the plain terrain with no trees on the world map?
 
@Callum sorry for @-ing you, but i've just watched the new dev update video and I wonder... Will modders be allowed to create their own battlefields for SP and attach them to specific places on the world map? So players won't find themselves in the forest while they meet their enemy on the plain terrain with no trees on the world map?

I'm not 100% sure but my first thought, and bear in mind that I am not a modder, is that we do this with scenes for settlements, so couldn't this be achieved by doing a hack job using invisible entities or something?

But that is just me sharing my thoughts out loud.

@cuce Maybe you could let us know? :smile:
 
I'm not 100% sure but my first thought, and bear in mind that I am not a modder, is that we do this with scenes for settlements, so couldn't this be achieved by doing a hack job using invisible entities or something?

But that is just me sharing my thoughts out loud.

@cuce Maybe you could let us know? :smile:
Bannerlord penalises movement through forests just like Warband. Accordingly, the terrain type can be (and probably is) used to filter the battle scene that is spawned for an encounter. Bear in mind the scale of a world map is too large to depict every copse or small wood in the plains. There will be wooded areas outside of forests, just as there may be streams that aren't worth depicting on the world map.
I'm sure it's included in some form - you don't get fir trees appearing in deserts. :smile:
 
Last edited:
Bannerlord penalises movement through forests just like Warband. Accordingly, the terrain type can be (and probably is) used to filter the battle scene that is spawned for an encounter. Bear in mind the scale of a world map is too large to depict every copse or small wood in the plains. There will be wooded areas outside of forests, just as there may be streams that aren't worth depicting on the world map.
I'm sure it's included in some form - you don't get fir trees appearing in deserts. :smile:
Well, ATM in Aserai area there are some places on the world map, that look like oases, but when you engage in a battle in that area, you get either a scene from Emperial area or a Khuzait one. But when you in a desert, you get a unique desert scenario. That itches me a bit :grin: Aserai area doesn't feel unique, though the game has all the necessary materials to make oases be oases :smile:
 
Last edited:
Well, ATM in Aserai area there are some places on the world map, that look like oases, but when you engage in a battle in that area, you get either a scene from Emperial area or a Khuzait one. But when you in a desert, you get a unique desert scenario. That itches me a bit :grin: Aserai area doesn't feel unique, though the game has all the necessary materials to make oases be oases :smile:
As TW abandoned random generation of battle scenes, preferring the quality of handmade ones (remember the awful mountains and near vertical inclines in Warband), there are a limited number of reused battle scenes. Hopefully, their sceners will add more before full release, but they're still trying to make unique scenes for each settlement.
 
I'm not 100% sure but my first thought, and bear in mind that I am not a modder, is that we do this with scenes for settlements, so couldn't this be achieved by doing a hack job using invisible entities or something?

But that is just me sharing my thoughts out loud.

@cuce Maybe you could let us know? :smile:
Well, in theory it should be possible, since the game takes into account your location on the world map and chooses more or less appropriate scene for a battle (I say 'more or less' because right now the amount of scenes is quite limited and the game is forced to choose from those presets). Enrolling a scene editor will fix the problem, but it is viable that modders will have an access to that system which chooses the appropriate scene. Maybe there are some tags or something, so the system recognises the scale of presets it should choose from. But, we won't find out until we'l get our hands on scene editor, I think :grin:


remember the awful mountains and near vertical inclines in Warband
Awww yeah, I remember those 90 degree mountains and underwater slow-mo battles :grin: That was terrible.
 
I'm not 100% sure but my first thought, and bear in mind that I am not a modder, is that we do this with scenes for settlements, so couldn't this be achieved by doing a hack job using invisible entities or something?

But that is just me sharing my thoughts out loud.

@cuce Maybe you could let us know? :smile:
There are some parameters that are tied to which scene is loaded. I made a few custom maps and dropped them in the sp folders and they show up on plain and ocean terrains. Love luring and fighting my opponents at thermopylae and guagamela.
 
But, we won't find out until we'l get our hands on scene editor, I think :grin:
The game already picks map based on location so just look at that code and we should be able to figure out how it works. TLDR, yes modders will be able to create scenes with specific terrain which should be prioritized when picking maps.
Worst case modders change the following code to change map selection.

Screenshot-28.png
GetPossibleBattleScenesForMapPosition() calls GetBattleSceneScoresForMapPosition() to get a list of scenes with a score and picks the highest scoring.

Screenshot-24.png
GetBattleSceneScoresForMapPosition() is the main function for map selection. It starts by getting terrains at the position by calling GetEnvironmentTerrainTypesCount() which samples the terrain at the position. Then GetTerrainByCount() is called which gets the most common terrain type based on the samples. Then GetSceneProperties() is called which determines forest density and filters out duplicates from the samples.

Then all scenes are scored.
If they are not of the correct terrain based on the samples they are discarded. If the scene has the correct forest density it is scored higher. The terrain types in the scene are checked and increases the score if it was in one of the samples, otherwise it reduces the score. The highest score is recorded and returned along with the possible scenes and scores.

So modders should be able to make scenes that are highly terrain specific, and possibly change terrain on world map, which will get prioritized when picking maps. Or someone could make a mod that changes scoring and sampling to ensure appropriate maps are picked, shouldn't be needed.

Terrain types currently are: Water, Mountain, Snow, Steppe, Plain, Desert, Swamp, Dune, Bridge, River, Forest, ShallowRiver, Lake, Canyon and RuralArea. Currently it doesn't look like custom terrain types are a thing but hopefully that wouldn't be too hard to add.

Screenshot-25.png
GetEnvironmentTerrainTypesCount() does 49 samples. It checks terrain at the exact position and 48 points around the position.

Screenshot-26.png
GetTerrainByCount() counts the terrain types in the samples and returns the one that occurs most.

Screenshot-27.png
GetSceneProperties() simply determines forest density and filters out duplicates from the samples.
 
The game already picks map based on location so just look at that code and we should be able to figure out how it works. TLDR, yes modders will be able to create scenes with specific terrain which should be prioritized when picking maps.
Worst case modders change the following code to change map selection.

Screenshot-28.png
GetPossibleBattleScenesForMapPosition() calls GetBattleSceneScoresForMapPosition() to get a list of scenes with a score and picks the highest scoring.

Screenshot-24.png
GetBattleSceneScoresForMapPosition() is the main function for map selection. It starts by getting terrains at the position by calling GetEnvironmentTerrainTypesCount() which samples the terrain at the position. Then GetTerrainByCount() is called which gets the most common terrain type based on the samples. Then GetSceneProperties() is called which determines forest density and filters out duplicates from the samples.

Then all scenes are scored.
If they are not of the correct terrain based on the samples they are discarded. If the scene has the correct forest density it is scored higher. The terrain types in the scene are checked and increases the score if it was in one of the samples, otherwise it reduces the score. The highest score is recorded and returned along with the possible scenes and scores.

So modders should be able to make scenes that are highly terrain specific, and possibly change terrain on world map, which will get prioritized when picking maps. Or someone could make a mod that changes scoring and sampling to ensure appropriate maps are picked, shouldn't be needed.

Terrain types currently are: Water, Mountain, Snow, Steppe, Plain, Desert, Swamp, Dune, Bridge, River, Forest, ShallowRiver, Lake, Canyon and RuralArea. Currently it doesn't look like custom terrain types are a thing but hopefully that wouldn't be too hard to add.

Screenshot-25.png
GetEnvironmentTerrainTypesCount() does 49 samples. It checks terrain at the exact position and 48 points around the position.

Screenshot-26.png
GetTerrainByCount() counts the terrain types in the samples and returns the one that occurs most.

Screenshot-27.png
GetSceneProperties() simply determines forest density and filters out duplicates from the samples.


As a new fan who isn't well-versed in code, I appreciate all you on these forums who look under the hood and dive into this level of detail. :smile:
 
@Callum sorry for @-ing you, but i've just watched the new dev update video and I wonder... Will modders be allowed to create their own battlefields for SP and attach them to specific places on the world map? So players won't find themselves in the forest while they meet their enemy on the plain terrain with no trees on the world map?

modden can make battle scenes and defined their terrain properties, and the campaign system will check what are the terrain features in the map is and will launch a matching map. There is no spesific scene for a spesific location in the map apart from settlements
 
Back
Top Bottom