Do we know how the game is generating battle maps from the campaign?
Is it something that can be modded?
Do we know how the game is generating battle maps from the campaign?
Is it something that can be modded?
Yes it is.
You have several maps for the camp map which define things like climate and groundtype (propably "physical" things like hills, oceans and cities, slots are also influencing the generation of a map). From here the game decides which Template (files in the battleterrain.pack) is loaded. There are several ones for fort battles, normal battles in flat country normal battles in mountain areas, for rivers etc)
Those define the rough layout, terrain features and "field" features of the map (there is a txt file in the empire/battleterrain pack which explains how those templates work).
The the game also loads terrain tiles, which are basicly height maps of single hills, rivers etc which get glued together acorrding to the "template".
Interesting about those tiles is that that they are technicaly the same as custom battle maps, so you could plant trees along a road or a river or placing buildings at road junctions.
And if the template also allows that buildings or fields are placed, the game also loads the farm_field_template_tiles where i already assemblied a partial ressource.
Interesting research objects for those files would be, that if you add the blue colour for the ocean in one of the "slot templates" if the game would load an ocean enviroment on the map, when attacking a harbour.
I thought there was just about 40 maps in the files, then the game engine just picks the best map for the encounter on the map.
Interesting. So, are the maps actually random by placing some tiles next to each others following a pattern defined in the templates, or is there a list of predefined maps to select from?
And if I want to increase the size of a random map for instance, what files do I need to edit?
Mostly the templates are looking rather similar in the Play area (rather flat land with some "foothills" of a mountain near the edges, some defining features like a near river often appear some dozens km abway so that the player usual doesn't notice them.I thought there was just about 40 maps in the files, then the game engine just picks the best map for the encounter on the map.
I've attached those explanations by ca for those who are interested, to increase the playable area you have to edit the attribute maps and make the deployment zones larger.Interesting. So, are the maps actually random by placing some tiles next to each others following a pattern defined in the templates, or is there a list of predefined maps to select from?
And if I want to increase the size of a random map for instance, what files do I need to edit?
I must be a little dumb, I don't understand everything...
In data.pack, there is "battleterrain", with several types of maps. Each one contains several tga files.
- attribute.tga
- deployement.tga
- terrain.tga
Do we have some documentation somewhere explaining the rules for the color code in these files?
Is changing some of these images sufficient to have bigger maps? I see a deployment zone, but how is the playable area defined?
Is there a table in the db linking with these batteterrain, or just having them there is sufficient?
Or is it something else?
How does it interact with the content of battleterrain.pack?
I'm lost with all these different places where terrain appears.
There are mods out there who already enlarged the battlemaps in campaign battles, you have to add some pixels to the depolyment.tga so the deployment zones are larger, this automaticly enlarges the battle map (same applies for custom battle maps).Is changing some of these images sufficient to have bigger maps? I see a deployment zone, but how is the playable area defined?
Oh and read the txt file i've added, thats an explanation by ca, how those files work. I assume they forgot to delete those from the final build.
I also added the colour code:
Attachment 176657
Thanks, these color keys are very helpful.
I think I understand now how to increase the size of the battle field.
So, in fact the attributes.tga and terrain.tga show a "large" map, with visual features beyond the actual battle map, which is limited by the deployment zone, right?
Can we increase the deployement zone a lot, or should it stay within some constrained area?
Also, if want to create my own battle map for campaign, can I just add a new folder with the proper attributes.tga, deployment.tga, and terrain.tga, or is it mandatory to add something in the script? Which by the way doesn't exist by default?
No need to add reference to the map somewhere in the db?
The inner 1/8 is the playable area, which is basicly a size of 2000x2000 Map Units (same as custom battlemaps).So, in fact the attributes.tga and terrain.tga show a "large" map, with visual features beyond the actual battle map, which is limited by the deployment zone, right?
Can we increase the deployement zone a lot, or should it stay within some constrained area?
Depends on what you mean with a battlemap... if you want a real custom battlemap with max. control how it should look it would be easier to do it via script, the same way as ca had done the forts in the RTI campaign.Also, if want to create my own battle map for campaign, can I just add a new folder with the proper attributes.tga, deployment.tga, and terrain.tga, or is it mandatory to add something in the script? Which by the way doesn't exist by default?
im pretty sure its in metadata.idx (what controls what files are loaded)
Anyway the height maps are pretty easy to edit (badly)
I mean just adding more random maps for the campaign. For instance, could I draw my own map using the tga , with the color codes you posted, and add it to battleterrain\templates, in for instance a nomarl\normal_15 folder (since we already hade 14 folder)?
Can it then be randomly selected when generating a battle in the campaign?
That's why I asked. I could create one to test, but the chance I can actually see it to check are not very high...
Is there a released mod which allows larger playable area on the battle map? IF i understand correctly the entire rendered landscape on a map is 64x64 (in battleterrain.pack) and the central 1/8th of this is the actual playable area. I would love to fight battles in an area double the size (1/4 instead of 1/8). Do any mods exist that only effect this (I'm running several other mods and would just like something that effects this)?
May you explain how to increase the size of battle field in detail?