Terrain Graphics

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.
Post Reply
Saizo-Luz
Posts: 20
Joined: June 14th, 2024, 12:50 pm
Location: High Heavens

Terrain Graphics

Post by Saizo-Luz »

Hello! I want to talk about [terrain_graphics] tag. I have no idea how it works! But I noticed that even when I use different types of images, the result is the same. (I'll put the images at the end)

Code: Select all

[terrain_graphics]
        map="
1

*"
        [tile]
            pos=1
            set_flag={FLAG}
            no_flag={FLAG}
        [/tile]

        [image]
            position=horizontal
            layer=1000
            name=weather/blank.png
            [variant]
                tod={SCHEDULES}
                name=weather/{IMAGE}.png:80
            [/variant]
        [/image]
    [/terrain_graphics]
With these graphics, any of the images are displayed normally (unless I'm going blind and didn't realize). Are these graphics universal?
I was looking at the 'The Legend Begins' campaign, and I saw that he (Lord-Knightmare) used different graphics for each type of image. However, using this graphic, the result is the same. Is there any issue? Is something missing?
***You can't see snow cause it's white! :? ***
Attachments
Stormwind
Stormwind
stormwind-east-1.png (1.94 KiB) Viewed 285 times
Snow
Snow
snow-1.png (437 Bytes) Viewed 285 times
Rain
Rain
rain-1.png (11.32 KiB) Viewed 285 times
Heavy Rain
Heavy Rain
rain-1.png (3.28 KiB) Viewed 285 times
white_haired_uncle
Posts: 1348
Joined: August 26th, 2018, 11:46 pm
Location: A country place, far outside the Wire

Re: Terrain Graphics

Post by white_haired_uncle »

https://wiki.wesnoth.org/TerrainGraphicsWML

What are FLAG, SCHEDULES, and IMAGE set to in your example?

Are your image files in add-ons/foo/images/weather ?
Speak softly, and carry Doombringer.
Saizo-Luz
Posts: 20
Joined: June 14th, 2024, 12:50 pm
Location: High Heavens

Re: Terrain Graphics

Post by Saizo-Luz »

It's just to define! Definitely not a macro!

Code: Select all

#define WEATHER_EFFECT FLAG IMAGE SCHEDULES
    blah blah blah
#enddef
It works just fine! It's just because I think it should change according to each image! I'm just being paranoid! :-P
Soliton
Site Administrator
Posts: 1695
Joined: April 5th, 2005, 3:25 pm
Location: #wesnoth-mp

Re: Terrain Graphics

Post by Soliton »

Difficult to understand what you're talking about.

You have some terrain graphics rules that you showed parts of and a map where those rules are used? And the map does not look like you expect it to?
"If gameplay requires it, they can be made to live on Venus." -- scott
Saizo-Luz
Posts: 20
Joined: June 14th, 2024, 12:50 pm
Location: High Heavens

Re: Terrain Graphics

Post by Saizo-Luz »

Soliton wrote: July 11th, 2024, 1:06 pm Difficult to understand what you're talking about.

You have some terrain graphics rules that you showed parts of and a map where those rules are used? And the map does not look like you expect it to?
Never mind! I was just curious to know why it worked using these same graphics when the images were different. In my head, something had to change - but it was the same result. It's just curiosity!
I had already looked at this link and didn't understand anything, so I asked. I will use graphics that other creators have already used. It was just my curiosity!
Soliton
Site Administrator
Posts: 1695
Joined: April 5th, 2005, 3:25 pm
Location: #wesnoth-mp

Re: Terrain Graphics

Post by Soliton »

Are you saying that you have two terrain graphics rules that specify two different images and when both match in a map they both show the same image? That sounds like a bug. If you can show the rules you used and the map maybe someone can look into it.
"If gameplay requires it, they can be made to live on Venus." -- scott
Saizo-Luz
Posts: 20
Joined: June 14th, 2024, 12:50 pm
Location: High Heavens

Re: Terrain Graphics

Post by Saizo-Luz »

Soliton wrote: July 11th, 2024, 7:27 pm Are you saying that you have two terrain graphics rules that specify two different images and when both match in a map they both show the same image? That sounds like a bug. If you can show the rules you used and the map maybe someone can look into it.
No! Everything works just fine! It's because those graphics work for all those images - and I thought: shouldn't the graphics change according to each type of image? :hmm: That was it! Just a question out of curiosity. I'll use the graphics from 'The Legend Begins' campaign. Just ignore it!
Post Reply