terrain graphics file
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.
-
- Posts: 32
- Joined: September 24th, 2020, 2:57 am
terrain graphics file
I am trying to make a new type of terrain, I have succeeded but I can't seem to add a graphic to it, I only wan't to add one image. please help me, thank you in advance.
Re: terrain graphics file
This post and the following thread might be useful to you.
https://forums.wesnoth.org/viewtopic.ph ... 13#p493613
https://forums.wesnoth.org/viewtopic.ph ... 13#p493613
-
- Posts: 32
- Joined: September 24th, 2020, 2:57 am
Re: terrain graphics file
I tried copy/pasting the code, but it said that the BASE_TERRAIN macro was not defined
Re: terrain graphics file
Innnteresting...
Wait, I don't see anything about a BASE_TERRAIN macro in the thread I linked to. What code do you have? Could you have meant TERRAIN_BASE instead of BASE_TERRAIN?
I think I was probably thinking of Alarantalara's second post, where "Complete code for example" says this:
I am not any great expert. Or am I? I once managed to make some terrain where the graphics mostly worked, but it was for 1.10. Let me just do a quick-and-dirty copy-paste job... It works!
It looks like I made my overlays like this:
I also used transitions for the road, so when it transitions to itself, it draws more road, but the base image is a single overlaid dot. You can see an example to the left of the village in this image.
I hope some of this helps, somehow!
Wait, I don't see anything about a BASE_TERRAIN macro in the thread I linked to. What code do you have? Could you have meant TERRAIN_BASE instead of BASE_TERRAIN?
I think I was probably thinking of Alarantalara's second post, where "Complete code for example" says this:
Which means if you already have the terrain type defined, you would just need the OVERLAY part. Probably.Alarantalara wrote: ↑June 22nd, 2011, 6:01 pmCode: Select all
#ifdef EDITOR [editor_group] id=terrain_tutorial name= _ "Terrain Tutorial" icon="group_custom3" [/editor_group] #endif # A simple signpost [terrain_type] symbol_image=../scenery/signpost editor_name= _ "Signpost" editor_group=terrain_tutorial id=tutorial_signpost string=^Esz aliasof=_bas [/terrain_type] {OVERLAY *^Esz (../scenery/signpost)}
I am not any great expert. Or am I? I once managed to make some terrain where the graphics mostly worked, but it was for 1.10. Let me just do a quick-and-dirty copy-paste job... It works!
It looks like I made my overlays like this:
Code: Select all
{OVERLAY *^Ryp paper/road}
I was going to make a campaign where a storybook was bleeding into the real world, so you had a bunch of paper monsters running around and you could have patches of paper terrain:
-
- Posts: 32
- Joined: September 24th, 2020, 2:57 am
Re: terrain graphics file
just so you know, I wan't it to be a base terrain, not an overlay.
Re: terrain graphics file
Ah, I see. Sorry.
It looks like you should use TERRAIN_BASE (not quite the same as BASE_TERRAIN ) if you just have one image.
If you have multiple image variants, you can use TERRAIN_BASE_RANDOM. For example, my paper terrain has several variations - one is plain paper, another has some sort of dark blot or smudge, and so on. Image files are named paper.png, paper2.png, paper3.png, and so on. (NOTE: the first image is paper.png, NOT paper1.png. I don't know why it works like that, but it does.)
If you only have one image, but you plan to add more variations later, you can still use TERRAIN_BASE_RANDOM. It will randomly choose one image from your set of one image, but you can easily add another variation by dropping an image in the folder.
It looks like you should use TERRAIN_BASE (not quite the same as BASE_TERRAIN ) if you just have one image.
If you have multiple image variants, you can use TERRAIN_BASE_RANDOM. For example, my paper terrain has several variations - one is plain paper, another has some sort of dark blot or smudge, and so on. Image files are named paper.png, paper2.png, paper3.png, and so on. (NOTE: the first image is paper.png, NOT paper1.png. I don't know why it works like that, but it does.)
Code: Select all
{TERRAIN_BASE_RANDOM Gyp paper/paper}