Water terrain code has undocumented WML-Code
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.
- pipapopinguin
- Posts: 35
- Joined: November 3rd, 2019, 10:36 am
Water terrain code has undocumented WML-Code
I am working on terrain-related add-ons and I've found code in a water-macro from the dev-team:
And the interesting part is:
is_water isn't documented on the TerrainGraphicsWML, so my question is, what exactly does it do and how does it function? Are there any other key words I can put in into [terrain_graphics] or [image]?
My game version is 1.16 and the macro is in new-macros.cfg inside the terrain-graphics folder.
Code: Select all
#define NEW:WAVES TERRAINLIST ADJACENT LAYER IMAGESTEM
[terrain_graphics]
map="
, 2
*, 2
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=waves_convex-@R0-@R5,waves_convex-@R0-@R1
[/tile]
[tile]
pos=2
type={ADJACENT}
[/tile]
rotations=tr,r,br,bl,l,tl
[image]
name={IMAGESTEM}-convex-A[01~13].png~MASK(terrain/masks/7hex-@R0.png):200
random_start=no
layer={LAYER}
center=90,144
base=90,144
is_water=yes
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, 2
*, 2
, 1
*, *
, *"
[tile]
pos=1
type={ADJACENT}
set_no_flag=waves_concave-@R0-@R5,waves_concave-@R0-@R1
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[image]
name={IMAGESTEM}-concave-A[01~13].png~MASK(terrain/masks/7hex-@R0.png):200
random_start=no
layer={LAYER}
center=90,144
base=90,144
is_water=yes
[/image]
[/terrain_graphics]
# These 4 rules draw very special convex-concave combination rules in 3-way
# sand-water-other corners
[terrain_graphics]
map="
, 2
*, 3
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
no_draw=yes
[/tile]
[tile]
pos=2
type={ADJACENT}
[/tile]
[tile]
pos=3
type=!,{TERRAINLIST},{ADJACENT}
no_draw=yes
[/tile]
rotations=tr,r,br,bl,l,tl
[image]
name={IMAGESTEM}-convex-A[01~13].png~MASK(terrain/masks/7hex-@R0.png):200
random_start=no
layer={LAYER}
center=90,144
base=90,144
is_water=yes
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, 2
*, 3
, 1
*, *
, *"
[tile]
pos=1
type={ADJACENT}
no_draw=yes
[/tile]
[tile]
pos=2
type=!,{TERRAINLIST},{ADJACENT}
no_draw=yes
[/tile]
[tile]
pos=3
type={TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[image]
name={IMAGESTEM}-concave-A[01~13].png~MASK(terrain/masks/7hex-@R0-@R1.png):200
random_start=no
layer={LAYER}
center=90,144
base=90,144
is_water=yes
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, 2
*, 3
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
no_draw=yes
[/tile]
[tile]
pos=2
type=!,{TERRAINLIST},{ADJACENT}
no_draw=yes
[/tile]
[tile]
pos=3
type={ADJACENT}
[/tile]
rotations=tr,r,br,bl,l,tl
[image]
name={IMAGESTEM}-convex-A[01~13].png~MASK(terrain/masks/7hex-@R0.png):200
random_start=no
layer={LAYER}
center=90,144
base=90,144
is_water=yes
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, 2
*, 3
, 1
*, *
, *"
[tile]
pos=1
type={ADJACENT}
no_draw=yes
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[tile]
pos=3
type=!,{TERRAINLIST},{ADJACENT}
no_draw=yes
[/tile]
rotations=tr,r,br,bl,l,tl
[image]
name={IMAGESTEM}-concave-A[01~13].png~MASK(terrain/masks/7hex-@R0-@R5.png):200
random_start=no
layer={LAYER}
center=90,144
base=90,144
is_water=yes
[/image]
[/terrain_graphics]
#enddef
Code: Select all
[image]
name={IMAGESTEM}-concave-A[01~13].png~MASK(terrain/masks/7hex-@R0-@R5.png):200
random_start=no
layer={LAYER}
center=90,144
base=90,144
is_water=yes
[/image]
My game version is 1.16 and the macro is in new-macros.cfg inside the terrain-graphics folder.
- Celtic_Minstrel
- Developer
- Posts: 2222
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Water terrain code has undocumented WML-Code
That relates to the preference to disable animated water. An image with that key will cease to animate if you turn off animated water.