How to add custom terrains
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
How to add custom terrains
I'm currently making a custom map and would like to use terrains from a campaign I liked.
In the map editor, I am told that the terrains I want to use are non-core and will not work without extra care. Is there a way to use a set of terrains globally?
I am just creating a custom map to then set up a local game. I currently have both a terrain.cfg and a terrain_graphics.cfg file.
In the map editor, I am told that the terrains I want to use are non-core and will not work without extra care. Is there a way to use a set of terrains globally?
I am just creating a custom map to then set up a local game. I currently have both a terrain.cfg and a terrain_graphics.cfg file.
- Pentarctagon
- Project Manager
- Posts: 5564
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: How to add custom terrains
Moved to the WML Workshop.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: How to add custom terrains
Okay, I've tested some things, and it looks like you can use any terrain that you include in an
The logical extension of this is to simply create a folder which contains a _main.cfg file, and make the _main.cfg file be almost empty except for notes that say "in multiplayer games, make sure you load up this terrain". All it should need is something like this:
Adapt that to the campaign(s) that you actually want to use terrain from and see if it works.
#ifdef MULTIPLAYER
section in any multiplayer game. (I'm not sure whether that's only required for the host, or whether it's required for everyone playing, but if you are playing a local game, then it won't matter, because everyone will be on the same computer anyway, right?)The logical extension of this is to simply create a folder which contains a _main.cfg file, and make the _main.cfg file be almost empty except for notes that say "in multiplayer games, make sure you load up this terrain". All it should need is something like this:
Code: Select all
#ifdef MULTIPLAYER
# Let's include terrain from an unfinished add-on I made...
[binary_path]
path=data/add-ons/Papermap/
[/binary_path]
{~add-ons/Papermap/utils/terrain.cfg}
# And the terrain from UtBS that you can't usually use in multiplayer games...
[binary_path]
path=data/campaigns/Under_the_Burning_Suns/
[/binary_path]
{campaigns/Under_the_Burning_Suns/utils/terrain.cfg}
{campaigns/Under_the_Burning_Suns/utils/terrain_graphics.cfg}
#endif
- MoonyDragon
- Posts: 149
- Joined: November 29th, 2017, 5:46 pm
Re: How to add custom terrains
Here is my step-by-step answer to almost the same question a while ago.
Default L0 Era - Level 1 leaders with level 0 recruits!
- Celtic_Minstrel
- Developer
- Posts: 2214
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: How to add custom terrains
Just to clear this up: terrain needs to be accessible to everyone playing the game. Otherwise how would the remote computers know how to draw those custom terrains, or what gameplay properties they have?
Of course, with a local hotseat game, there are no remote computers involved, so you don't need to worry about this if that's all you want to support.