How to make custom terrains available in the map editor

The place to post your WML questions and answers.

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.
User avatar
Peter the Great
Posts: 296
Joined: August 9th, 2008, 5:08 pm

Re: How to make custom terrains available in the map editor

Post by Peter the Great »

Ken Oh wrote:I still don't know what @ means.
At

EDIT: O you meant like that? :oops: :oops:
Last edited by Peter the Great on September 3rd, 2008, 10:29 pm, edited 1 time in total.
Latin:LVDVMAMISI (pronounced Loo-dum amee-C)
French: J'ai perdu le jeu.
English: I lost the game.
Max
Posts: 1449
Joined: April 13th, 2008, 12:41 am

Re: How to make custom terrains available in the map editor

Post by Max »

if you're looking for details about @:
PreprocessorRef
User avatar
A Guy
Posts: 793
Joined: May 24th, 2008, 1:55 am

Re: How to make custom terrains available in the map editor

Post by A Guy »

Zachron wrote:So that means, I could now, theoretically create a cave terrain that consists of a crack with smoke coming out of it, and call it "Smoking Crack," then make it available in the map editor... Now I'm definitely getting 1.5.
Am I the only one that found this funny?
I'm just... a guy...
I'm back for now, I might get started on some work again.
AI
Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: How to make custom terrains available in the map editor

Post by AI »

User avatar
Ken_Oh
Moderator Emeritus
Posts: 2178
Joined: February 6th, 2006, 4:03 am
Location: Baltimore, Maryland, USA

Re: How to make custom terrains available in the map editor

Post by Ken_Oh »

Thanks guys. Hope I didn't give my newbness away too much.
opensourcejunkie
Posts: 547
Joined: August 11th, 2008, 3:19 pm

Re: How to make custom terrains available in the map editor

Post by opensourcejunkie »

A Guy wrote:
Zachron wrote:So that means, I could now, theoretically create a cave terrain that consists of a crack with smoke coming out of it, and call it "Smoking Crack," then make it available in the map editor... Now I'm definitely getting 1.5.
Am I the only one that found this funny?
Wait - that was a joke? And here I was already digging out my bong... ;-)
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...
User avatar
Gedankenschinder
Posts: 26
Joined: March 27th, 2007, 9:50 pm
Location: Hannover, Germany
Contact:

Re: How to make custom terrains available in the map editor

Post by Gedankenschinder »

Does someone knows this:

I just added some new terrain types to the editor. All this works in the editor, but when I try to load one of the maps in which i used the new terrain types, I get the error message "Illegal Character found in map. The sceanrio cannot be loaded."

I allready had this problem when I tried to use a terrain type from the UtbS-campaign...
opensourcejunkie
Posts: 547
Joined: August 11th, 2008, 3:19 pm

Re: How to make custom terrains available in the map editor

Post by opensourcejunkie »

yeah - basically, the problem (I think) is that the editor now recognizes the custom terrain, but the game does not. How are you loading the map? Are you editing a scenario file yourself? 'cause if you are, you can include the code for the terrain into the scenario file (before the [scenario] tag, mind you :-), which should clue the game in to the new terrain.
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...
User avatar
Cernunnos
Art Contributor
Posts: 292
Joined: August 12th, 2008, 11:47 am
Location: Bordeaux, France.

Re: How to make custom terrains available in the map editor

Post by Cernunnos »

talking for 1.4 so maybe i'm out of subject,

for a terrain to be available in the editor:

in terrain.cfg :

Code: Select all

[terrain]
    symbol_image=my_path/my_tile
    id=my_id
    name= _ "My_name"
    string=Ua
    editor_group=the_one_i_want
[/terrain]
(with string, id, name... different than existing tiles)
+ in _final.cfg :

Code: Select all

{TERRAIN_BASE       Ua                  my_path/my_tile}
bonus :

Code: Select all

{TERRAIN_BASE_PROB  Ua                  my_path/my_variation		       20}
excuse me if it's not about the subject.
edit: with this method, the tile is also available in game
"While portrait art may be where Wesnoth gets its glamour, and sprite art may be where Wesnoth gets its zest, it's the terrain art that's so crucial to Wesnoth's polish - it's the canvas that the rest goes on." Sangel
Tet
Posts: 391
Joined: February 18th, 2009, 5:11 am

Re: How to make custom terrains available in the map editor

Post by Tet »

Well I put my custom terrain directly in terrain and terrain-graphics and it works very well in 1.6.5
I did not want to do that. At first I put extra file in the same core directory. It did not work.
It is not the official solution, but it works even if you are not a programmer.
Make a full copy of wesnoth and keep one unaltered version ready.
My Temple Project: http://forums.wesnoth.org/viewtopic.php?f=23&t=29800
This is "must-play" campaign! Don´t read the thread, unless you need help. http://forums.wesnoth.org/viewtopic.php?f=8&t=31895
User avatar
Eleazar
Retired Terrain Art Director
Posts: 2481
Joined: July 16th, 2004, 1:47 am
Location: US Midwest
Contact:

Re: How to make custom terrains available in the map editor

Post by Eleazar »

Added some further info to zookeeper's first post.
Feel free to PM me if you start a new terrain oriented thread. It's easy for me to miss them among all the other art threads.
-> What i might be working on
Attempting Lucidity
rubberduck
Posts: 40
Joined: August 25th, 2013, 12:50 pm

Re: How to make custom terrains available in the map editor

Post by rubberduck »

Somthing about typical mistakes you can make when adding terrain would be helpful.
Also an easy-to-find wiki page about coding graphics with a link to some helpful pages.

for me these pages and files are very helpful
http://wiki.wesnoth.org/TerrainCodesWML

http://wiki.wesnoth.org/TerrainCodeTableWML
(when i want to know the aliasof of a special terrain-type, then i can go to terrain-graphics.cfg and check this file for this aliasof to know how this terrain works)

also a link to the original graphics-files and to terrain.cfg and terrain-graphics.cfg would be helpful


it should declare, what the most used code-segments in terrain-graphics.cfg are used to.

at the moment i have a problem with adding overlays:
i tried everything to solve this, but nothing works
see here: http://forums.wesnoth.org/viewtopic.php?f=21&t=39558
there could be something about possible reasons for such problems
Post Reply