5137 lines
109 KiB
INI

#textdomain wesnoth
# This file contains a WIP set of terrain graphics macros, intended to be as
# short and simple as possible.
# That intention may have drifted a bit over the years, but they should still be mostly intuitive
#define NEW:SET_FLAG TERRAIN FLAG
# Places a flag on a hex, no graphics
[terrain_graphics]
[tile]
x,y=0,0
type={TERRAIN}
set_no_flag={FLAG}
[/tile]
[/terrain_graphics]
#enddef
#define NEW:BASE TERRAIN IMAGESTEM
# Places {IMAGESTEM}[1-11].png as base tiles. Assumes 72x72 hex-shaped
# images.
#arg IPF
#endarg
#arg FLAG
base
#endarg
#arg LAYER
-1000
#endarg
[terrain_graphics]
[tile]
x,y=0,0
type={TERRAIN}
set_no_flag={FLAG}
[image]
name={IMAGESTEM}@V.png{IPF}
variations=";2;3;4;5;6;7;8;9;10;11"
layer={LAYER}
[/image]
[/tile]
[/terrain_graphics]
#enddef
#define NEW:BASE_P TERRAIN PROB IMAGESTEM
{NEW:BASE {TERRAIN} {IMAGESTEM}}
[+terrain_graphics]
probability={PROB}
# No need to look for variations here...
[+tile]
[+image]
name={IMAGESTEM}.png
variations=""
[/image]
[/tile]
[/terrain_graphics]
#enddef
#define NEW:OVERLAY TERRAIN IMAGESTEM
# Places {IMAGESTEM}[1-11].png as overlay tiles.
# default is not to care about adjacent tiles because rules filter for a fake terrain code,
# but ADJACENT= can be called to restrict (usually shrink) the overlay graphics
#arg LAYER
0#endarg
#arg BASE
90,160#endarg
#arg FLAG
overlay#endarg
#arg PROB
100#endarg
#arg ANIM
#endarg
#arg TIME
#endarg
#arg ADJACENT
_fak#endarg
#arg CENTER
90,144#endarg
[terrain_graphics]
map="
, *
* , 2
, 1
* , *
, *"
[tile]
pos=1
type={TERRAIN}
set_flag={FLAG}-@R0
[/tile]
[tile]
pos=2
type={ADJACENT}
[/tile]
rotations=ne,se,s,sw,nw,n
[/terrain_graphics]
# check if there is more than one adjacent flag set
[terrain_graphics]
[tile]
x=0
y=0
type={TERRAIN}
has_flag={FLAG}-@R0,{FLAG}-@R1
set_no_flag={FLAG}-small
[/tile]
rotations=ne,se,s,sw,nw,n
[/terrain_graphics]
[terrain_graphics]
[tile]
x=0
y=0
type={TERRAIN}
has_flag={FLAG}-@R0,{FLAG}-@R2
set_no_flag={FLAG}-small
[/tile]
rotations=ne,se,s,sw,nw,n
[/terrain_graphics]
[terrain_graphics]
[tile]
x=0
y=0
type={TERRAIN}
has_flag={FLAG}-@R0,{FLAG}-@R3
set_no_flag={FLAG}-small
[/tile]
rotations=ne,se,s,sw,nw,n
[/terrain_graphics]
[terrain_graphics]
[tile]
x=0
y=0
type={TERRAIN}
has_flag={FLAG}-@R0,{FLAG}-@R4
set_no_flag={FLAG}-small
[/tile]
rotations=ne,se,s,sw,nw,n
[/terrain_graphics]
[terrain_graphics]
[tile]
x=0
y=0
type={TERRAIN}
has_flag={FLAG}-@R0,{FLAG}-@R5
set_no_flag={FLAG}-small
[/tile]
rotations=ne,se,s,sw,nw,n
[/terrain_graphics]
# flag the one-adjacent case
# [terrain_graphics]
# [tile]
# x=0
# y=0
# type={TERRAIN}
# has_flag={FLAG}-@R0
# no_flag={FLAG}-small
# set_no_flag={FLAG}-draw-@R0
# [/tile]
# rotations=ne,se,s,sw,nw,n
# [/terrain_graphics]
# draw the small version
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
has_flag={FLAG}-small
[/tile]
probability={PROB}
[image]
name={IMAGESTEM}-small@V{ANIM}.png:{TIME}
variations=";2;3;4;5;6;7;8;9;10;11"
layer={LAYER}
base={BASE}
# base=90,160
center={CENTER}
[/image]
[/terrain_graphics]
# draw the one-side-smaller version
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
no_flag={FLAG}-small
has_flag={FLAG}-@R0
[/tile]
probability={PROB}
[image]
name={IMAGESTEM}-small@V{ANIM}-@R0.png:{TIME}
variations=";2;3;4;5;6;7;8;9;10;11"
layer={LAYER}
base={BASE}
# base=90,160
center={CENTER}
[/image]
rotations=ne,se,s,sw,nw,n
[/terrain_graphics]
# draw the small version if there was no side-specific version
# get the rotations out of the image because of base key,
# and we won't know this is needed until the previous image tag fails
[terrain_graphics]
[tile]
x=0
y=0
type={TERRAIN}
has_flag={FLAG}-@R0
set_no_flag={FLAG}-small
[/tile]
rotations=ne,se,s,sw,nw,n
[/terrain_graphics]
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
has_flag={FLAG}-small
[/tile]
probability={PROB}
[image]
name={IMAGESTEM}-small@V{ANIM}.png:{TIME}
variations=";2;3;4;5;6;7;8;9;10;11"
layer={LAYER}
base={BASE}
# base=90,160
center={CENTER}
[/image]
rotations=ne,se,s,sw,nw,n
[/terrain_graphics]
# draw the default
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type={TERRAIN}
set_no_flag={FLAG}
[/tile]
probability={PROB}
[image]
name={IMAGESTEM}@V{ANIM}.png:{TIME}
variations=";2;3;4;5;6;7;8;9;10;11"
layer={LAYER}
base={BASE}
# base=90,160
center={CENTER}
[/image]
[/terrain_graphics]
#enddef
# this macro is to deal with the awkward crowding caused by the transitions of the I* terrains
#define NEW:TRANSITION_CROWDED TERRAINLIST ADJACENT LAYER IMAGESTEM
#arg FLAG
transition#endarg
#arg PATCH_LAYER
-82#endarg
[terrain_graphics]
map="
, 3
2 , 4
, 1
. , .
, ."
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R5,{FLAG}-@R0,{FLAG}-@R1
set_flag=crowded-@R0
[image]
name={IMAGESTEM}-@R5-gap-@R1.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R2
[/tile]
[tile]
pos=3
type={ADJACENT}
[/tile]
[tile]
pos=4
type={TERRAINLIST}
set_no_flag={FLAG}-@R4
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
# this rule is a hack to cover up the bad transitions, possible for some combinations of I*,Q*, and a third terrain
[terrain_graphics]
map="
, 2
3 , 3
, 1
. , .
, ."
[tile]
pos=1
type={ADJACENT}
set_no_flag=crowded_drawn-@R0
has_flag=crowded-@R0
[image]
name={IMAGESTEM}-crowded-patch-@R0.png
layer={PATCH_LAYER}
[/image]
[/tile]
[tile]
pos=2
type={ADJACENT}
no_flag=crowded-@R3
[image]
name={IMAGESTEM}-crowded-patch-@R3.png
layer={PATCH_LAYER}
[/image]
[/tile]
[tile]
pos=3
type={TERRAINLIST}
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
#enddef
#define NEW:DISABLE_TRANSITION TERRAINLIST ADJACENT
#arg FLAG
transition#endarg
#arg FLAG1
dummy#endarg
#arg FLAG2
#endarg
[terrain_graphics]
map="
, 2
. , .
, 1
. , .
, ."
[tile]
pos=1
type={ADJACENT}
no_flag={FLAG1}
set_flag={FLAG}-@R0
[/tile]
[tile]
pos=2
type={TERRAINLIST}
has_flag={FLAG2}
set_flag={FLAG}-@R3
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
#enddef
# this macro is used for the carpet images
#define NEW:TRANSITION_INVERTED TERRAINLIST ADJACENT LAYER IMAGESTEM
#arg FLAG
transition_inverted#endarg
# special hack to keep the horizontal carpet edges out of castles
[terrain_graphics]
map="
, 3
2 , 4
, 1
* , *
, *"
[tile]
pos=1
type=C*,K*
set_no_flag={FLAG}-nw,{FLAG}-n,{FLAG}-ne
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-se
[/tile]
[tile]
pos=3
type={TERRAINLIST}
set_no_flag={FLAG}-s
[/tile]
[tile]
pos=4
type={TERRAINLIST}
set_no_flag={FLAG}-sw
[/tile]
[image]
name={IMAGESTEM}-nw-n-ne.png~MASK(terrain/interior/carpet_mask.png)
layer={LAYER}
base=161,161
center=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
* , *
, 1
4 , 2
, 3"
[tile]
pos=1
type=C*,K*
set_no_flag={FLAG}-se,{FLAG}-s,{FLAG}-sw
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-nw
[/tile]
[tile]
pos=3
type={TERRAINLIST}
set_no_flag={FLAG}-n
[/tile]
[tile]
pos=4
type={TERRAINLIST}
set_no_flag={FLAG}-ne
[/tile]
[image]
name={IMAGESTEM}-se-s-sw.png~MASK(terrain/interior/carpet_mask.png)
layer={LAYER}
base=161,161
center=90,144
[/image]
[/terrain_graphics]
# special big diagonal corner cases
# N/S pointing corners
[terrain_graphics]
map="
* , * , * , *
, * , * , *
* , 2 , 2 , *
, 6 , 1 , 6
* , 5 , 4 , *
, * , 3 , *
* , * , * , *"
[tile]
pos=1
type={TERRAINLIST}
no_flag={FLAG}-@R3
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={ADJACENT}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=4
type={ADJACENT}
set_no_flag={FLAG}-@R5
[/tile]
[tile]
pos=5
type={ADJACENT}
set_no_flag={FLAG}-@R1
[/tile]
[tile]
pos=6
type={ADJACENT}
[/tile]
[image]
name={IMAGESTEM}-corner-@R2-@R3-@R4.png
layer={LAYER}
base=90,161
center=198,144
[/image]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
# E/W pointing corners
[terrain_graphics]
map="
* , * , 6 , *
, * , 6 , *
* , 4 , 2 , *
, 3 , 1 , *
* , 5 , 2 , *
, * , 6 , *
* , * , 6 , *"
[tile]
pos=1
type={TERRAINLIST}
no_flag={FLAG}-@R5,{FLAG}-@R4
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R5,{FLAG}-@R4
[/tile]
[tile]
pos=3
type={ADJACENT}
set_no_flag={FLAG}-@R1,{FLAG}-@R2
[/tile]
[tile]
pos=4
type={ADJACENT}
set_no_flag={FLAG}-@R2
[/tile]
[tile]
pos=5
type={ADJACENT}
set_no_flag={FLAG}-@R1
[/tile]
[tile]
pos=6
type={ADJACENT}
[/tile]
[image]
name={IMAGESTEM}-corner-@R3-@R4-@R5-@R0.png
layer={LAYER}
base=90,161
center=198,144
[/image]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
# special narrow diagonal corner cases (four cases, the vertical strips are taken care of by default rules)
[terrain_graphics]
map="
, 2
3 , *
, 1
4 , 6
, 5"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-@R3,{FLAG}-@R4,{FLAG}-@R5
[image]
name={IMAGESTEM}-smallcorner-@R1.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={ADJACENT}
[/tile]
[tile]
pos=3
type={ADJACENT}
[/tile]
[tile]
pos=4
type={ADJACENT}
[/tile]
[tile]
pos=5
type={ADJACENT}
[/tile]
[tile]
pos=6
type={ADJACENT}
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
# end special cases
[terrain_graphics]
map="
, 2
7 , 3
, 1
6 , 4
, 5"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0,{FLAG}-@R1,{FLAG}-@R2,{FLAG}-@R3,{FLAG}-@R4,{FLAG}-@R5
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={TERRAINLIST}
set_no_flag={FLAG}-@R4
[/tile]
[tile]
pos=4
type={TERRAINLIST}
set_no_flag={FLAG}-@R5
[/tile]
[tile]
pos=5
type={TERRAINLIST}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=6
type={TERRAINLIST}
set_no_flag={FLAG}-@R1
[/tile]
[tile]
pos=7
type={TERRAINLIST}
set_no_flag={FLAG}-@R2
[/tile]
[image]
name={IMAGESTEM}-@R0-@R1-@R2-@R3-@R4-@R5.png
layer={LAYER}
base=90,161
center=90,144
[/image]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
* , 3
, 1
6 , 4
, 5"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0,{FLAG}-@R1,{FLAG}-@R2,{FLAG}-@R3,{FLAG}-@R4
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={TERRAINLIST}
set_no_flag={FLAG}-@R4
[/tile]
[tile]
pos=4
type={TERRAINLIST}
set_no_flag={FLAG}-@R5
[/tile]
[tile]
pos=5
type={TERRAINLIST}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=6
type={TERRAINLIST}
set_no_flag={FLAG}-@R1
[/tile]
[image]
name={IMAGESTEM}-@R0-@R1-@R2-@R3-@R4.png
layer={LAYER}
base=90,161
center=90,144
[/image]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
* , 3
, 1
* , 4
, 5"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0,{FLAG}-@R1,{FLAG}-@R2,{FLAG}-@R3
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={TERRAINLIST}
set_no_flag={FLAG}-@R4
[/tile]
[tile]
pos=4
type={TERRAINLIST}
set_no_flag={FLAG}-@R5
[/tile]
[tile]
pos=5
type={TERRAINLIST}
set_no_flag={FLAG}-@R0
[/tile]
[image]
name={IMAGESTEM}-@R0-@R1-@R2-@R3.png
layer={LAYER}
base=90,161
center=90,144
[/image]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
* , 3
, 1
* , 4
, *"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0,{FLAG}-@R1,{FLAG}-@R2
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={TERRAINLIST}
set_no_flag={FLAG}-@R4
[/tile]
[tile]
pos=4
type={TERRAINLIST}
set_no_flag={FLAG}-@R5
[/tile]
[image]
name={IMAGESTEM}-@R0-@R1-@R2.png
layer={LAYER}
base=161,161
center=90,144
[/image]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
* , 3
, 1
* , *
, *"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0,{FLAG}-@R1
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={TERRAINLIST}
set_no_flag={FLAG}-@R4
[/tile]
[image]
name={IMAGESTEM}-@R0-@R1.png
layer={LAYER}
base=90,161
center=90,144
[/image]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
* , *
, 1
* , *
, *"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R3
[/tile]
[image]
name={IMAGESTEM}-@R0.png
layer={LAYER}
base=90,161
center=90,144
[/image]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, .
2 , 2
, 1
2 , 2
, ."
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-hex-lower,{FLAG}-hex-upper
[image]
name={IMAGESTEM}-hex-full.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[/terrain_graphics]
[terrain_graphics]
map="
, .
. , .
, 1
2 , 2
, ."
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-hex-lower
[image]
name={IMAGESTEM}-hex-lower.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[/terrain_graphics]
[terrain_graphics]
map="
, .
2 , 2
, 1
. , .
, ."
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-hex-upper
[image]
name={IMAGESTEM}-hex-upper.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[/terrain_graphics]
[terrain_graphics]
map="
, .
. , .
, 1
. , 2
, 2"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-hex-se
no_flag={FLAG}-hex-lower
[image]
name={IMAGESTEM}-hex-se.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[/terrain_graphics]
[terrain_graphics]
map="
, .
. , .
, 1
2 , .
, 2"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-hex-sw
no_flag={FLAG}-hex-lower
[image]
name={IMAGESTEM}-hex-sw.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[/terrain_graphics]
[terrain_graphics]
map="
, 2
2 , .
, 1
. , .
, ."
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-hex-nw
no_flag={FLAG}-hex-upper
[image]
name={IMAGESTEM}-hex-nw.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[/terrain_graphics]
[terrain_graphics]
map="
, 2
. , 2
, 1
. , .
, ."
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-hex-ne
no_flag={FLAG}-hex-upper
[image]
name={IMAGESTEM}-hex-ne.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[/terrain_graphics]
[terrain_graphics]
map="
, .
2 , .
, 1
2 , .
, ."
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-hex-left
[image]
name={IMAGESTEM}-hex-left.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[/terrain_graphics]
[terrain_graphics]
map="
, .
. , 2
, 1
. , 2
, ."
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-hex-right
[image]
name={IMAGESTEM}-hex-right.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[/terrain_graphics]
#enddef
#define NEW:TRANSITION_INTRA TERRAINLIST LAYER IMAGESTEM
#arg ADJACENT
{TERRAINLIST}#endarg
#arg FLAG
transition#endarg
#arg BASE
98,98#endarg
#arg IPF
~NOP()#endarg
[terrain_graphics]
map="
, 2
* , *
, 1
* , *
, *"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=2
type={TERRAINLIST}
# set_no_flag={FLAG}-@R3
[/tile]
[image]
name={IMAGESTEM}@V-@R0.png{IPF}
layer={LAYER}
base={BASE}
center=90,144
variations=";2;3;4;5"
[/image]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
#enddef
#define NEW:TRANSITION TERRAINLIST ADJACENT LAYER IMAGESTEM
#arg LAYER2
{LAYER}#endarg
#arg ADJACENT2
_off^_usr#endarg
#arg FLAG
transition#endarg
#arg FILTER_FLAG
#endarg
#arg FILTER_PRIMARY_FLAG
#endarg
#arg IPF
~NOP()#endarg
# these next four rules are to help with three-terrain issues. This can probably be improved
# first is for crowded transitions
[terrain_graphics]
map="
, 2
3 , 3
, 1
. , .
, ."
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-trim-@R1,{FLAG}-trim-@R5
has_flag=crowded-@R0
[image]
name={IMAGESTEM}-Rccw-@R5.png~BLIT(terrain/{IMAGESTEM}-Rcw-@R1.png){IPF}
layer={LAYER2}
[/image]
[/tile]
[tile]
pos=3
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
[/tile]
[tile]
pos=2
type={ADJACENT},{ADJACENT2}
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
3 , 3
, 1
. , .
, ."
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-trim-@R0
[image]
name={IMAGESTEM}-R2-@R0.png{IPF}
layer={LAYER2}
[/image]
[/tile]
[tile]
pos=3
type={ADJACENT2}
[/tile]
[tile]
pos=2
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-trim-@R3
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
. , 3
, 1
. , .
, ."
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-trim-@R0
[image]
name={IMAGESTEM}-Rcw-@R0.png{IPF}
layer={LAYER2}
[/image]
[/tile]
[tile]
pos=3
type={ADJACENT2}
[/tile]
[tile]
pos=2
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-trim-@R3
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
3 , .
, 1
. , .
, ."
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-trim-@R0
[image]
name={IMAGESTEM}-Rccw-@R0.png{IPF}
layer={LAYER2}
[/image]
[/tile]
[tile]
pos=3
type={ADJACENT2}
[/tile]
[tile]
pos=2
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-trim-@R3
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
7 , 3
, 1
6 , 4
, 5"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0,{FLAG}-@R1,{FLAG}-@R2,{FLAG}-@R3,{FLAG}-@R4,{FLAG}-@R5
has_flag={FILTER_FLAG}
[image]
name={IMAGESTEM}-@R0-@R1-@R2-@R3-@R4-@R5.png{IPF}
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R4
[/tile]
[tile]
pos=4
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R5
[/tile]
[tile]
pos=5
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=6
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R1
[/tile]
[tile]
pos=7
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R2
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
. , 3
, 1
6 , 4
, 5"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0,{FLAG}-@R1,{FLAG}-@R2,{FLAG}-@R3,{FLAG}-@R4
has_flag={FILTER_FLAG}
[image]
name={IMAGESTEM}-@R0-@R1-@R2-@R3-@R4.png{IPF}
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R4
[/tile]
[tile]
pos=4
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R5
[/tile]
[tile]
pos=5
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=6
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R1
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
. , 3
, 1
. , 4
, 5"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0,{FLAG}-@R1,{FLAG}-@R2,{FLAG}-@R3
has_flag={FILTER_FLAG}
[image]
name={IMAGESTEM}-@R0-@R1-@R2-@R3.png{IPF}
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R4
[/tile]
[tile]
pos=4
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R5
[/tile]
[tile]
pos=5
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R0
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
. , 3
, 1
. , 4
, ."
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0,{FLAG}-@R1,{FLAG}-@R2
has_flag={FILTER_FLAG}
[image]
name={IMAGESTEM}-@R0-@R1-@R2.png{IPF}
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R4
[/tile]
[tile]
pos=4
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R5
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
. , 3
, 1
. , .
, ."
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0,{FLAG}-@R1
has_flag={FILTER_FLAG}
[image]
name={IMAGESTEM}-@R0-@R1.png{IPF}
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R4
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
. , .
, 1
. , .
, ."
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0
has_flag={FILTER_FLAG}
[image]
name={IMAGESTEM}-@R0.png{IPF}
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
{FILTER_PRIMARY_FLAG}
set_no_flag={FLAG}-@R3
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
#enddef
# This is added to deal with chasm-flat-interior transitions, but is probably useful for other cases.
# The cw/ccw were for interior-chasm with flanking flat. The offcw/offccw were for interior-flat with flanking chasm.
#define NEW:THREE_TERRAIN_TRANSITION TERRAINLIST ADJACENT ADJACENT2 LAYER IMAGESTEM
#arg FLAG
transition#endarg
[terrain_graphics]
map="
, 2
3 , 3
, 1
. , .
, ."
[tile]
pos=1
type={ADJACENT2}
set_no_flag={FLAG}-@R0
[image]
name={IMAGESTEM}-off2-@R0.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={ADJACENT}
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
. , 3
, 1
. , .
, ."
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0
[image]
name={IMAGESTEM}-cw-@R0.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={ADJACENT2}
[image]
name={IMAGESTEM}-assist-cw-@R0.png
layer={LAYER}
[/image]
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
3 , .
, 1
. , .
, ."
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0
[image]
name={IMAGESTEM}-ccw-@R0.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={ADJACENT2}
[image]
name={IMAGESTEM}-assist-ccw-@R0.png
layer={LAYER}
[/image]
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
. , 3
, 1
. , .
, ."
[tile]
pos=1
type={ADJACENT2}
set_no_flag={FLAG}-@R0
[image]
name={IMAGESTEM}-offcw-@R0.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={ADJACENT}
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
3 , .
, 1
. , .
, ."
[tile]
pos=1
type={ADJACENT2}
set_no_flag={FLAG}-@R0
[image]
name={IMAGESTEM}-offccw-@R0.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={ADJACENT}
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
#enddef
#define NEW:CARPET_OLD TERRAINLIST ADJACENT IMAGEPATH
#arg FLAG
carpet_overlay#endarg
#arg LAYER
-281#endarg
[terrain_graphics]
map="
, 2
3 , 3
, 1
. , .
, ."
[tile]
pos=1
type={TERRAINLIST}
set_flag={FLAG}-narrow-@R0
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_flag={FLAG}-narrow-@R3
[/tile]
[tile]
pos=3
type=!,{TERRAINLIST}
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
*, *
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
has_flag={FLAG}-@R0,{FLAG}-@R3
no_flag={FLAG}-drawn-@R3
set_no_flag={FLAG}-drawn-@R0-@R3
[/tile]
[tile]
pos=2
type={TERRAINLIST}
has_flag=
set_no_flag={FLAG}-drawn-@R3
[/tile]
[image]
name={IMAGEPATH}rug-@R0-@R3.png
layer={LAYER}
base=90,161
center=90,144
[/image]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
*, *
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
has_flag={FLAG}-@R0
no_flag={FLAG}-drawn-@R3,{FLAG}-@R3
set_no_flag={FLAG}-border-drawn-@R0
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-drawn-@R3
[/tile]
[image]
# wmlscope: start ignoring
name={IMAGEPATH}rug-@R0-end.png
# wmlscope: stop ignoring
layer={LAYER}
base=90,161
center=90,144
[/image]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
#enddef
#define NEW:GENERIC_CORNER_TRANSITION TERRAINLIST ADJACENT LAYER IMAGESTEM MASKSTEM MASKIPF
#arg FLAG
corner#endarg
[terrain_graphics]
map="
, 2
2, 2
, 1
2, 2
, 2"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-concave-@R0,{FLAG}-concave-@R1,{FLAG}-concave-@R2,{FLAG}-concave-@R3,{FLAG}-concave-@R4,{FLAG}-concave-@R5
[image]
name={IMAGESTEM}.png~MASK(terrain/{MASKSTEM}-concave-2-@R0.png~BLIT(terrain/{MASKSTEM}-concave-2-@R1.png)~BLIT(terrain/{MASKSTEM}-concave-2-@R2.png)~BLIT(terrain/{MASKSTEM}-concave-2-@R3.png)~BLIT(terrain/{MASKSTEM}-concave-2-@R4.png)~BLIT(terrain/{MASKSTEM}-concave-2-@R5.png){MASKIPF})
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., 2
, 1
2, 2
, 2"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-concave-@R0,{FLAG}-concave-@R1,{FLAG}-concave-@R2,{FLAG}-concave-@R3
[image]
name={IMAGESTEM}.png~MASK(terrain/{MASKSTEM}-concave-2-@R0.png~BLIT(terrain/{MASKSTEM}-concave-2-@R1.png)~BLIT(terrain/{MASKSTEM}-concave-2-@R2.png)~BLIT(terrain/{MASKSTEM}-concave-2-@R3.png){MASKIPF})
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., 2
, 1
., 2
, 2"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-concave-@R0,{FLAG}-concave-@R1,{FLAG}-concave-@R2
[image]
name={IMAGESTEM}.png~MASK(terrain/{MASKSTEM}-concave-2-@R0.png~BLIT(terrain/{MASKSTEM}-concave-2-@R1.png)~BLIT(terrain/{MASKSTEM}-concave-2-@R2.png){MASKIPF})
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., 2
, 1
., 2
, ."
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-concave-@R0,{FLAG}-concave-@R1
[image]
name={IMAGESTEM}.png~MASK(terrain/{MASKSTEM}-concave-2-@R0.png~BLIT(terrain/{MASKSTEM}-concave-2-@R1.png){MASKIPF})
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., 2
, 1
., .
, ."
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-concave-@R0
[image]
name={IMAGESTEM}.png~MASK(terrain/{MASKSTEM}-concave-2-@R0.png{MASKIPF})
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
3, 3
, 1
., .
, ."
[tile]
pos=1
type={TERRAINLIST}
[/tile]
[tile]
pos=2
type={ADJACENT}
set_no_flag={FLAG}-convex-@R0-@R5,{FLAG}-convex-@R5-@R0
[image]
name={IMAGESTEM}.png~MASK(terrain/{MASKSTEM}-convex-@R0-@R5.png~BLIT(terrain/{MASKSTEM}-convex-@R5-@R0.png){MASKIPF})
layer={LAYER}
[/image]
[/tile]
[tile]
pos=3
type=!,{TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., 3
, 1
., .
, ."
[tile]
pos=1
type={TERRAINLIST}
[/tile]
[tile]
pos=2
type={ADJACENT}
set_no_flag={FLAG}-convex-@R0-@R5
[image]
name={IMAGESTEM}.png~MASK(terrain/{MASKSTEM}-convex-@R0-@R5.png{MASKIPF})
layer={LAYER}
[/image]
[/tile]
[tile]
pos=3
type=!,{TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., 3
, 1
., .
, ."
[tile]
pos=1
type={TERRAINLIST}
[/tile]
[tile]
pos=2
type=!,{TERRAINLIST}
[/tile]
[tile]
pos=3
type={ADJACENT}
set_no_flag={FLAG}-convex-@R0-@R1
[image]
name={IMAGESTEM}.png~MASK(terrain/{MASKSTEM}-convex-@R0-@R1.png{MASKIPF})
layer={LAYER}
[/image]
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
#enddef
#define NEW:DISABLE_GENERIC_CORNER_TRANSITION TERRAINLIST ADJACENT
#arg FLAG
corner#endarg
[terrain_graphics]
map="
, 2
2, 2
, 1
2, 2
, 2"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-concave-@R0,{FLAG}-concave-@R1,{FLAG}-concave-@R2,{FLAG}-concave-@R3,{FLAG}-concave-@R4,{FLAG}-concave-@R5
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., 2
, 1
2, 2
, 2"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-concave-@R0,{FLAG}-concave-@R1,{FLAG}-concave-@R2,{FLAG}-concave-@R3
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., 2
, 1
., 2
, 2"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-concave-@R0,{FLAG}-concave-@R1,{FLAG}-concave-@R2
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., 2
, 1
., 2
, ."
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-concave-@R0,{FLAG}-concave-@R1
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., 2
, 1
., .
, ."
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-concave-@R0
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
3, 3
, 1
., .
, ."
[tile]
pos=1
type={TERRAINLIST}
[/tile]
[tile]
pos=2
type={ADJACENT}
set_no_flag={FLAG}-convex-@R0-@R5,{FLAG}-convex-@R5-@R0
[/tile]
[tile]
pos=3
type=!,{TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., 3
, 1
., .
, ."
[tile]
pos=1
type={TERRAINLIST}
[/tile]
[tile]
pos=2
type={ADJACENT}
set_no_flag={FLAG}-convex-@R0-@R5
[/tile]
[tile]
pos=3
type=!,{TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., 3
, 1
., .
, ."
[tile]
pos=1
type={TERRAINLIST}
[/tile]
[tile]
pos=2
type=!,{TERRAINLIST}
[/tile]
[tile]
pos=3
type={ADJACENT}
set_no_flag={FLAG}-convex-@R0-@R1
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
#enddef
#define NEW:FOREST TERRAINLIST ADJACENT IMAGESTEM
# This assumes centered images. Places the images named
# {IMAGESTEM}-small[1-11].png on all {TERRAIN} adjacent to {ADJACENT}, and
# {IMAGESTEM}[1-11].png on all others.
# Note: normally base= coordinates are affected by rotations, but here that
# causes problems; this is why the rules for setting the flag for a small
# forest and placing the actual image are separate.
# Note: adding another small-forest rule, so forests can spill over to
# other terrains if they have the right flag
#arg LAYER
0#endarg
#arg ANIM
#endarg
#arg TIME
#endarg
#arg ALT_TERRAINLIST
_dum#endarg # should always fail by default
[terrain_graphics]
map="
, 2
., .
, 1
., .
, ."
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=smallforest
[/tile]
[tile]
pos=2
type=!,{ALT_TERRAINLIST},!,{ADJACENT}
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., .
, 1
., .
, ."
[tile]
pos=1
type={ALT_TERRAINLIST}
has_flag=smallforest2
set_no_flag=smallforest
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, *
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST},{ALT_TERRAINLIST}
has_flag=smallforest
set_no_flag=overlay
[/tile]
[image]
name={IMAGESTEM}-small@V{ANIM}.png{TIME}
variations=";2;3;4;5;6;7;8;9;10;11"
layer={LAYER}
base=90,161
center=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, *
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=overlay
[/tile]
[image]
name={IMAGESTEM}@V{ANIM}.png{TIME}
variations=";2;3;4;5;6;7;8;9;10;11"
layer={LAYER}
base=90,161
center=90,144
[/image]
[/terrain_graphics]
#enddef
#define NEW:FENCE TERRAINLIST IMAGESTEM
#arg LAYER
-80#endarg
#arg BASE
90,144#endarg
#arg CENTER
90,144#endarg
#arg FLAG
fence#endarg
# leaving blank appears to mean all terrains
#arg ALTERNATE
_fak#endarg
# it doesn't usually look good for the fences to hang out over the chasms
#arg OTHER
Q*#endarg
#arg XHACK
X*,*^V*#endarg
[terrain_graphics]
map="
, *
2, 2
, 1
2, 2
, *"
[tile]
pos=1
type={TERRAINLIST}
no_flag={FLAG}
set_flag={FLAG},{FLAG}-[ne,se,sw,nw]
[/tile]
[tile]
pos=2
type={TERRAINLIST},{ALTERNATE}
[/tile]
[image]
name={IMAGESTEM}-ne-se-sw-nw.png
layer={LAYER}
base={BASE}
center={CENTER}
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
2, 2
, 1
*, 2
, *"
[tile]
pos=1
type={TERRAINLIST}
no_flag={FLAG}
set_flag={FLAG},{FLAG}-[ne,se,nw]
[/tile]
[tile]
pos=2
type={TERRAINLIST},{ALTERNATE}
[/tile]
[image]
name={IMAGESTEM}-ne-se-nw.png
layer={LAYER}
base={BASE}
center={CENTER}
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
2, *
, 1
2, 2
, *"
[tile]
pos=1
type={TERRAINLIST}
no_flag={FLAG}
set_flag={FLAG},{FLAG}-[se,sw,nw]
[/tile]
[tile]
pos=2
type={TERRAINLIST},{ALTERNATE}
[/tile]
[image]
name={IMAGESTEM}-se-sw-nw.png
layer={LAYER}
base={BASE}
center={CENTER}
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, 2
, 1
2, 2
, *"
[tile]
pos=1
type={TERRAINLIST}
no_flag={FLAG}
set_flag={FLAG},{FLAG}-[ne,se,sw]
[/tile]
[tile]
pos=2
type={TERRAINLIST},{ALTERNATE}
[/tile]
[image]
name={IMAGESTEM}-ne-se-sw.png
layer={LAYER}
base={BASE}
center={CENTER}
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
2, 2
, 1
2, *
, *"
[tile]
pos=1
type={TERRAINLIST}
no_flag={FLAG}
set_flag={FLAG},{FLAG}-[ne,sw,nw]
[/tile]
[tile]
pos=2
type={TERRAINLIST},{ALTERNATE}
[/tile]
[image]
name={IMAGESTEM}-ne-sw-nw.png
layer={LAYER}
base={BASE}
center={CENTER}
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, 2
, 1
*, 2
, *"
[tile]
pos=1
type={TERRAINLIST}
no_flag={FLAG}
set_flag={FLAG},{FLAG}-[ne,se]
[/tile]
[tile]
pos=2
type={TERRAINLIST},{ALTERNATE}
[/tile]
[image]
name={IMAGESTEM}-ne-se.png
layer={LAYER}
base={BASE}
center={CENTER}
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
2, *
, 1
2, *
, *"
[tile]
pos=1
type={TERRAINLIST}
no_flag={FLAG}
set_flag={FLAG},{FLAG}-[sw,nw]
[/tile]
[tile]
pos=2
type={TERRAINLIST},{ALTERNATE}
[/tile]
[image]
name={IMAGESTEM}-sw-nw.png
layer={LAYER}
base={BASE}
center={CENTER}
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, *
, 1
2, 2
, *"
[tile]
pos=1
type={TERRAINLIST}
no_flag={FLAG}
set_flag={FLAG},{FLAG}-[se,sw]
[/tile]
[tile]
pos=2
type={TERRAINLIST},{ALTERNATE}
[/tile]
[image]
name={IMAGESTEM}-se-sw.png
layer={LAYER}
base={BASE}
center={CENTER}
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
2, 2
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
no_flag={FLAG}
set_flag={FLAG},{FLAG}-[ne,nw]
[/tile]
[tile]
pos=2
type={TERRAINLIST},{ALTERNATE}
[/tile]
[image]
name={IMAGESTEM}-ne-nw.png
layer={LAYER}
base={BASE}
center={CENTER}
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, 2
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
no_flag={FLAG}
set_flag={FLAG},{FLAG}-@R4
[/tile]
[tile]
pos=2
type={TERRAINLIST}
has_flag={FLAG}-@R4
[/tile]
rotations=n,ne,se,s,sw,nw
[image]
# wmlscope: start ignoring
name={IMAGESTEM}-@R1-@R4-@V.png
# wmlscope: stop ignoring
variations="01;02"
layer={LAYER}
base={BASE}
center={CENTER}
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, 2
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
no_flag={FLAG}
set_flag={FLAG},{FLAG}-@R4
[/tile]
[tile]
pos=2
type={TERRAINLIST},{ALTERNATE}
[/tile]
rotations=n,ne,se,s,sw,nw
[image]
# wmlscope: start ignoring
name={IMAGESTEM}-@R1-@R4-@V.png
# wmlscope: stop ignoring
variations="01;02"
layer={LAYER}
base={BASE}
center={CENTER}
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
2, 2
, 1
2, 2
, *"
[tile]
pos=1
type={TERRAINLIST}
no_flag={FLAG}
set_flag={FLAG},{FLAG}-[ne,se,sw,nw]
[/tile]
[tile]
pos=2
type=!,{TERRAINLIST},{ALTERNATE}
[/tile]
[image]
name={IMAGESTEM}-ne-se-sw-nw.png
layer={LAYER}
base={BASE}
center={CENTER}
[/image]
[/terrain_graphics]
##########################
# the next few rules are hacks to make get the iron fence ^Eqf to play nice with walls X*, can't get the layering to work otherwise.
##########################
[terrain_graphics]
map="
, *
*, 2
, 1
*, *
, *"
[tile]
pos=1
type={XHACK}
set_flag={FLAG}-X-hack
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, 2
, 1
*, *
, *"
[tile]
pos=1
has_flag={FLAG}-X-hack
set_flag={FLAG}-X-hack-@R1
[/tile]
[tile]
pos=2
type={TERRAINLIST}
has_flag={FLAG}-@R4
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, 2
, 1
*, *
, *"
[tile]
pos=1
has_flag={FLAG}-X-hack
set_flag={FLAG}-X-hack-@R1
[/tile]
[tile]
pos=2
type={TERRAINLIST}
has_flag={FLAG}-@R1
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, *
, 1
*, *
, *"
[tile]
pos=1
has_flag={FLAG}-X-hack-ne
set_no_flag={FLAG}-X-hack-ne-drawn
[/tile]
[image]
# wmlscope: start ignoring
name={IMAGESTEM}-ne.png
# wmlscope: stop ignoring
layer={LAYER}
base=90,108
center={CENTER}
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, *
, 1
*, *
, *"
[tile]
pos=1
has_flag={FLAG}-X-hack-nw
set_no_flag={FLAG}-X-hack-nw-drawn
[/tile]
[image]
# wmlscope: start ignoring
name={IMAGESTEM}-nw.png
# wmlscope: stop ignoring
layer={LAYER}
base=90,108
center={CENTER}
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, *
, 1
*, *
, *"
[tile]
pos=1
has_flag={FLAG}-X-hack-sw
set_no_flag={FLAG}-X-hack-sw-drawn
[/tile]
[image]
# wmlscope: start ignoring
name={IMAGESTEM}-sw.png
# wmlscope: stop ignoring
layer={LAYER}
base=90,178
center={CENTER}
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, *
, 1
*, *
, *"
[tile]
pos=1
has_flag={FLAG}-X-hack-se
set_no_flag={FLAG}-X-hack-se-drawn
[/tile]
[image]
# wmlscope: start ignoring
name={IMAGESTEM}-se.png
# wmlscope: stop ignoring
layer={LAYER}
base=90,148
center={CENTER}
[/image]
[/terrain_graphics]
##########################
# end hack
##########################
##########################
# default end-posts
##########################
[terrain_graphics]
map="
, *
*, 2
, 1
*, *
, *"
[tile]
pos=1
type=!,{TERRAINLIST},{ALTERNATE},{OTHER}
no_flag={FLAG}-X-hack
[/tile]
[tile]
pos=2
type={TERRAINLIST}
has_flag={FLAG}-@R4
[/tile]
rotations=n,ne,se,s,sw,nw
[image]
# wmlscope: start ignoring
name={IMAGESTEM}-@R1.png
# wmlscope: stop ignoring
layer={LAYER}
base={BASE}
center={CENTER}
[/image]
[/terrain_graphics]
#enddef
# special fence transitions
#define NEW:FENCE_POST TERRAINLIST OTHER IMAGESTEM
#arg LAYER
-80#endarg
#arg BASE
90,144#endarg
#arg CENTER
90,144#endarg
#arg FLAG
fence#endarg
[terrain_graphics]
map="
, *
*, 2
, 1
*, *
, *"
[tile]
pos=1
type={OTHER}
no_flag={FLAG}-X-hack
[/tile]
[tile]
pos=2
type={TERRAINLIST}
has_flag={FLAG}-@R1
[/tile]
rotations=n,ne,se,s,sw,nw
[image]
# wmlscope: start ignoring
name={IMAGESTEM}-@R1.png
# wmlscope: stop ignoring
layer={LAYER}
base={BASE}
center={CENTER}
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, 2
, 1
*, *
, *"
[tile]
pos=1
type={OTHER}
no_flag={FLAG}-X-hack
[/tile]
[tile]
pos=2
type={TERRAINLIST}
has_flag={FLAG}-@R4
[/tile]
rotations=n,ne,se,s,sw,nw
[image]
# wmlscope: start ignoring
name={IMAGESTEM}-@R1.png
# wmlscope: stop ignoring
layer={LAYER}
base={BASE}
center={CENTER}
[/image]
[/terrain_graphics]
#enddef
#define NEW:WALL_CORNER TERRAINLIST ADJACENT IMAGESTEM
# default to some very unlikely terrain code, and not leaving empty in case that offends validation testing
#arg ALTERNATIVE
_off^Fp#endarg
#arg FLAG
wall#endarg
#arg BASE
125,105#endarg
[terrain_graphics]
map="
, 4
2, 3
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-[@R0,@R5]
[/tile]
[tile]
pos=2
type={TERRAINLIST},{ALTERNATIVE}
set_no_flag={FLAG}-@R1
[/tile]
[tile]
pos=3
type={TERRAINLIST},{ALTERNATIVE}
set_no_flag={FLAG}-@R4
[/tile]
[tile]
pos=4
type={ADJACENT}
# set_no_flag=wall-[@R4,@R1]
[/tile]
rotations=tr,r,br,bl,l,tl
probability=100
[image]
layer=0
center=90,148
base={BASE}
name={IMAGESTEM}@V-corner-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
#enddef
#define NEW:WALL2_CORNER TERRAINLIST ADJACENT1 ADJACENT2 IMAGESTEM
[terrain_graphics]
map="
, 4
2, 3
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=wall-[@R0,@R5]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag=wall-@R1
[/tile]
[tile]
pos=3
type={ADJACENT1}
set_no_flag=wall-@R4
[/tile]
[tile]
pos=4
type={ADJACENT2}
# set_no_flag=wall-[@R4,@R1]
[/tile]
rotations=tr,r,br,bl,l,tl
probability=100
[image]
layer=0
center=90,148
base=125,105
# base=54,72
name={IMAGESTEM}@V-corner-ccw-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, 4
2, 3
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=wall-[@R0,@R5]
[/tile]
[tile]
pos=2
type={ADJACENT1}
set_no_flag=wall-@R1
[/tile]
[tile]
pos=3
type={TERRAINLIST}
set_no_flag=wall-@R4
[/tile]
[tile]
pos=4
type={ADJACENT2}
# set_no_flag=wall-[@R4,@R1]
[/tile]
rotations=tr,r,br,bl,l,tl
probability=100
[image]
layer=0
center=90,148
base=125,105
# base=54,72
name={IMAGESTEM}@V-corner-cw-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
#enddef
# this macro may need revision
#define NEW:WALL_A10 TERRAINLIST ADJACENT IMAGESTEM
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=wall-@R0
[/tile]
[tile]
pos=2
type={ADJACENT}
set_no_flag=wall-@R2
[/tile]
[tile]
pos=3
type={ADJACENT}
set_no_flag=wall-@R4
[/tile]
rotations=tr,r,br,bl,l,tl
probability=100
[image]
layer=0
base=54,72
# wmlscope: start ignoring
name={IMAGESTEM}@V-A[01~10]-convex-@R0.png
# wmlscope: stop ignoring
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={ADJACENT}
set_no_flag=wall-@R0
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag=wall-@R2
[/tile]
[tile]
pos=3
type={TERRAINLIST}
set_no_flag=wall-@R4
[/tile]
rotations=tr,r,br,bl,l,tl
probability=100
[image]
layer=0
base=54,72
name={IMAGESTEM}@V-A[01~10]-concave-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
#enddef
#define NEW:WALL TERRAINLIST ADJACENT IMAGESTEM
#arg PROB
100#endarg
#arg ADJACENT2
{ADJACENT}#endarg
#arg LAYER
0#endarg
#arg FLAG
wall#endarg
#arg BASE
54,72#endarg
#arg TIME1
dawn,dawn1,dawn2,indoors,dusk,dusk1,dusk2#endarg
#arg TIME2
morning,morning1,morning2,midday,midday1,midday2,afternoon,afternoon1,afternoon2#endarg
# this is because I could not figure out how to get layering with base key to work for enough rotations in Xot^Edb
# there is a walls/dummy variation to suppress image-not-found errors
#arg OVERLAYIMAGE
terrain/walls/dummy/dummy#endarg
#arg OVERLAYIMAGE1
{OVERLAYIMAGE}#endarg
#arg OVERLAYIMAGE2
{OVERLAYIMAGE}#endarg
# Only the convex-bl and concave-tr/tl images really matter,
# these rules can be tightened up to get rid of the fake convex-br images
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=2
type={ADJACENT2}
set_no_flag={FLAG}-@R2
[/tile]
[tile]
pos=3
type={ADJACENT}
set_no_flag={FLAG}-@R4
[/tile]
rotations=dummy1,dummy2,br,bl,dummy4,dummy5
# rotations=tr,r,br,bl,l,tl
probability={PROB}
[image]
layer={LAYER}
base={BASE}
# no @V in the BLIT() because there may not be a matching overlay image for each base variation
# name={IMAGESTEM}@V-convex-@R0.png # only the -bl matters
name={IMAGESTEM}@V-convex-@R0.png~BLIT({OVERLAYIMAGE}-convex-@R0.png)
variations=";2;3;4;5;6"
[variant]
tod={TIME1}
name={IMAGESTEM}@V-convex-@R0.png~BLIT({OVERLAYIMAGE1}-convex-@R0.png)
[/variant]
[variant]
tod={TIME2}
name={IMAGESTEM}@V-convex-@R0.png~BLIT({OVERLAYIMAGE2}-convex-@R0.png)
[/variant]
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=2
type={ADJACENT}
set_no_flag={FLAG}-@R2
[/tile]
[tile]
pos=3
type={ADJACENT2}
set_no_flag={FLAG}-@R4
[/tile]
rotations=tr,r,br,bl,l,tl
probability={PROB}
[image]
layer={LAYER}
base={BASE}
name={IMAGESTEM}@V-convex-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R2
[/tile]
[tile]
pos=3
type={TERRAINLIST}
set_no_flag={FLAG}-@R4
[/tile]
rotations=tr,r,dummy,dummy,l,tl
probability={PROB}
[image]
layer={LAYER}
base={BASE}
name={IMAGESTEM}@V-concave-@R0.png~BLIT({OVERLAYIMAGE}-concave-@R0.png)
variations=";2;3;4;5;6"
[variant]
tod={TIME1}
name={IMAGESTEM}@V-concave-@R0.png~BLIT({OVERLAYIMAGE1}-concave-@R0.png)
[/variant]
[variant]
tod={TIME2}
name={IMAGESTEM}@V-concave-@R0.png~BLIT({OVERLAYIMAGE2}-concave-@R0.png)
[/variant]
[/image]
[/terrain_graphics]
# variations do not seem to work here, need to find out why...
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R2
[/tile]
[tile]
pos=3
type={TERRAINLIST}
set_no_flag={FLAG}-@R4
[/tile]
rotations=tr,r,br,bl,l,tl
probability={PROB}
[image]
layer={LAYER}
base={BASE}
name={IMAGESTEM}@V-concave-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
#enddef
# this macro is used to allow TERRAINLIST to be drawn in certain cases where current assets would fail to be drawn
# and VARIANT would take over
#define NEW:WALL_MINOR_VARIANTS TERRAINLIST VARIANT ADJACENT IMAGESTEM
#arg PROB
100#endarg
#arg LAYER
0#endarg
#arg FLAG
wall#endarg
#arg BASE
54,72#endarg
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={ADJACENT}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R2
[/tile]
[tile]
pos=3
type={VARIANT}
set_no_flag={FLAG}-@R4,{FLAG}-@R3
[/tile]
rotations=tr,r,br,null,l,tl
probability={PROB}
[image]
layer=0
base={BASE}
name={IMAGESTEM}@V-concave-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
#enddef
#define NEW:WALL_PL TERRAINLIST ADJACENT PROB LAYER IMAGESTEM
{NEW:WALL {TERRAINLIST} {ADJACENT} {IMAGESTEM} PROB={PROB} LAYER={LAYER}}
#enddef
#define NEW:WALL2 TERRAINLIST ADJACENT1 ADJACENT2 IMAGESTEM
#arg PROB
100#endarg
#arg LAYER
0#endarg
#arg FLAG
wall#endarg
{NEW:WALL {TERRAINLIST} {ADJACENT1} {IMAGESTEM} PROB={PROB} LAYER={LAYER}}
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=2
type={ADJACENT1}
set_no_flag={FLAG}-@R2
[/tile]
[tile]
pos=3
type={ADJACENT2}
set_no_flag={FLAG}-@R4
[/tile]
rotations=tr,r,br,bl,l,tl
probability={PROB}
[image]
layer={LAYER}
base=54,72
name={IMAGESTEM}@V-cw-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=2
type={ADJACENT2}
set_no_flag={FLAG}-@R2
[/tile]
[tile]
pos=3
type={ADJACENT1}
set_no_flag={FLAG}-@R4
[/tile]
rotations=tr,r,br,bl,l,tl
probability={PROB}
[image]
layer={LAYER}
base=54,72
name={IMAGESTEM}@V-ccw-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
#enddef
#define NEW:WALL2_P TERRAINLIST ADJACENT1 ADJACENT2 PROB LAYER IMAGESTEM
{NEW:WALL2 {TERRAINLIST} {ADJACENT1} {ADJACENT2} {IMAGESTEM} PROB={PROB} LAYER={LAYER}}
#enddef
#define NEW:WALL2_L TERRAINLIST ADJACENT1 ADJACENT2 LAYER IMAGESTEM
{NEW:WALL2 {TERRAINLIST} {ADJACENT1} {ADJACENT2} {IMAGESTEM} LAYER={LAYER}}
#enddef
#define NEW:CASTLEWALL_INTERNAL_P TERRAINLIST ADJACENT PROB IMAGESTEM
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=castlewall-@R0
[/tile]
[tile]
pos=2
type={ADJACENT}
set_no_flag=castlewall-@R2
[/tile]
[tile]
pos=3
type={ADJACENT}
set_no_flag=castlewall-@R4
[/tile]
rotations=tr,r,br,bl,l,tl
probability={PROB}
[image]
layer=0
base=54,72
name={IMAGESTEM}@V-convex-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={ADJACENT}
set_no_flag=castlewall-@R0
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag=castlewall-@R2
[/tile]
[tile]
pos=3
type={TERRAINLIST}
set_no_flag=castlewall-@R4
[/tile]
rotations=tr,r,br,bl,l,tl
probability={PROB}
[image]
layer=0
base=54,72
name={IMAGESTEM}@V-concave-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
#enddef
#define NEW:CASTLEWALL_P TERRAINLIST ADJACENT ADJACENT_OPEN PROB IMAGESTEM
{NEW:CASTLEWALL_INTERNAL_P {TERRAINLIST} {ADJACENT} {PROB} {IMAGESTEM}}
#enddef
#define NEW:CASTLEWALL TERRAINLIST ADJACENT ADJACENT_JOIN IMAGESTEM
#arg PROB
100#endarg
#arg FLAG
castlewall#endarg
#arg ADJACENT_OPEN
Xu*,Xo*#endarg
{NEW:CASTLEWALL_INTERNAL_P {TERRAINLIST} {ADJACENT} {PROB} {IMAGESTEM}}
# These two rules place suitable connecting tiles at corners where the wall
# meets another castle type's wall.
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=2
type={ADJACENT}
[/tile]
[tile]
pos=3
type=!,{TERRAINLIST},!,{ADJACENT_JOIN}
[/tile]
rotations=concave-br,skip,skip,concave-tl,skip,concave-r
[image]
layer=0
base=54,107
name={IMAGESTEM}@V-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=2
type=!,{TERRAINLIST},!,{ADJACENT_JOIN}
[/tile]
[tile]
pos=3
type={ADJACENT}
[/tile]
rotations=concave-l,skip,concave-tr,skip,skip,concave-bl
[image]
layer=0
base=54,107
name={IMAGESTEM}@V-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
# These rules place towers to fill gaps between the rest of the castle and
# ADJACENT_OPEN neighbours. It didn't seem to be possible to do this in a
# less hacky and verbose manner due to layering problems.
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-end-@R0
[/tile]
[tile]
pos=2
type={ADJACENT_OPEN}
[/tile]
[tile]
pos=3
type={ADJACENT}
[/tile]
rotations=concave-l,convex-r,skip,skip,concave-br,concave-bl
[image]
layer=0
base=54,107
name={IMAGESTEM}@V-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-end-@R0
[/tile]
[tile]
pos=2
type={ADJACENT}
[/tile]
[tile]
pos=3
type={ADJACENT_OPEN}
[/tile]
rotations=concave-br,skip,convex-br,skip,skip,concave-r
[image]
layer=0
base=54,107
name={IMAGESTEM}@V-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-end-@R0
[/tile]
[tile]
pos=2
type={ADJACENT}
[/tile]
[tile]
pos=3
type={ADJACENT_OPEN}
[/tile]
rotations=skip,concave-bl,skip,convex-bl,skip,skip
[image]
layer=0
base=26,26
name={IMAGESTEM}@V-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={ADJACENT}
[/tile]
[tile]
pos=2
type={ADJACENT_OPEN}
[/tile]
[tile]
pos=3
type={TERRAINLIST}
set_no_flag={FLAG}-end-convex-l
[/tile]
[image]
layer=0
base=54,107
name={IMAGESTEM}@V-convex-l.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={ADJACENT}
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-end-convex-br
[/tile]
[tile]
pos=3
type={ADJACENT_OPEN}
[/tile]
[image]
layer=0
base=54,107
name={IMAGESTEM}@V-convex-br.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, 2
1
, 3"
[tile]
pos=1
type={ADJACENT}
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-end-convex-bl
[/tile]
[tile]
pos=3
type={ADJACENT_OPEN}
[/tile]
[image]
layer=0
base=54,74
name={IMAGESTEM}@V-convex-bl.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
#enddef
#define NEW:CASTLEWALL2_P TERRAINLIST ADJACENT1 ADJACENT2 PROB IMAGESTEM
{NEW:CASTLEWALL_INTERNAL_P {TERRAINLIST} {ADJACENT1} {PROB} {IMAGESTEM}}
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=castlewall-@R0
[/tile]
[tile]
pos=2
type={ADJACENT1}
set_no_flag=castlewall-@R2
[/tile]
[tile]
pos=3
type={ADJACENT2}
set_no_flag=castlewall-@R4
[/tile]
rotations=tr,r,br,bl,l,tl
probability={PROB}
[image]
layer=0
base=54,72
name={IMAGESTEM}@V-cw-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=castlewall-@R0
[/tile]
[tile]
pos=2
type={ADJACENT2}
set_no_flag=castlewall-@R2
[/tile]
[tile]
pos=3
type={ADJACENT1}
set_no_flag=castlewall-@R4
[/tile]
rotations=tr,r,br,bl,l,tl
probability={PROB}
[image]
layer=0
base=54,72
name={IMAGESTEM}@V-ccw-@R0.png
variations=";2;3;4;5;6"
[/image]
[/terrain_graphics]
#enddef
#define NEW:CASTLEWALL2 TERRAINLIST ADJACENT1 ADJACENT2 IMAGESTEM
{NEW:CASTLEWALL2_P {TERRAINLIST} {ADJACENT1} {ADJACENT2} 100 {IMAGESTEM}}
#enddef
#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
#define NEW:BEACH TERRAINLIST ADJACENT IMAGESTEM
[terrain_graphics]
map="
, 2
*, 3
, 1
*, *
, *"
[tile]
pos=1
type={ADJACENT}
set_no_flag=beach-@R0-[@R5,@R1]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag=beach-@R2-@R3
[/tile]
[tile]
pos=3
type={TERRAINLIST}
set_no_flag=beach-@R4-@R3
[/tile]
rotations=tr,r,br,bl,l,tl
[image]
# wmlscope: start ignoring
name={IMAGESTEM}-concave-@R0-@R5.png
# wmlscope: stop ignoring
layer=-500
center=90,144
base=90,144
[/image]
[image]
# wmlscope: start ignoring
name={IMAGESTEM}-concave-@R0-@R1.png
# wmlscope: stop ignoring
layer=-500
center=90,144
base=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, 2
*, 3
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=beach-@R0-[@R5,@R1]
[/tile]
[tile]
pos=2
type={ADJACENT}
set_no_flag=beach-@R2-@R3
[/tile]
[tile]
pos=3
type={ADJACENT}
set_no_flag=beach-@R4-@R3
[/tile]
rotations=tr,r,br,bl,l,tl
[image]
# wmlscope: start ignoring
name={IMAGESTEM}-convex-@R0-@R5.png
# wmlscope: stop ignoring
layer=-500
center=90,144
base=90,144
[/image]
[image]
# wmlscope: start ignoring
name={IMAGESTEM}-convex-@R0-@R1.png
# wmlscope: stop ignoring
layer=-500
center=90,144
base=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, 2
*, 3
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=beach-@R0-@R5
[/tile]
[tile]
pos=2
type={ADJACENT}
set_no_flag=beach-@R2-@R3
[/tile]
[tile]
pos=3
type=!,{TERRAINLIST},{ADJACENT}
[/tile]
rotations=tr,r,br,bl,l,tl
[image]
# wmlscope: start ignoring
name={IMAGESTEM}-convex-@R0-@R5.png
# wmlscope: stop ignoring
layer=-500
center=90,144
base=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, 2
*, 3
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=beach-@R0-@R1
[/tile]
[tile]
pos=2
type=!,{TERRAINLIST},{ADJACENT}
[/tile]
[tile]
pos=3
type={ADJACENT}
set_no_flag=beach-@R4-@R3
[/tile]
rotations=tr,r,br,bl,l,tl
[image]
# wmlscope: start ignoring
name={IMAGESTEM}-convex-@R0-@R1.png
# wmlscope: stop ignoring
layer=-500
center=90,144
base=90,144
[/image]
[/terrain_graphics]
#enddef
########################
# villages - start
########################
#define NEW:VILLAGE TERRAINLIST IMAGESTEM
#arg PROB
100#endarg
#arg ANIM
#endarg
#arg TIME
#endarg
#arg FLAG
village#endarg
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}
[/tile]
probability={PROB}
[image]
name={IMAGESTEM}@V{ANIM}.png:{TIME}
variations=";2;3;4;5;6;7"
layer=0
base=90,144
center=90,144
[/image]
[/terrain_graphics]
#enddef
#define NEW:VILLAGE_A3 TERRAINLIST TIME IMAGESTEM
{NEW:VILLAGE {TERRAINLIST} {IMAGESTEM} (ANIM=[01~03]) (TIME={TIME})}
#enddef
#define NEW:VILLAGE_A4 TERRAINLIST TIME IMAGESTEM
{NEW:VILLAGE {TERRAINLIST} {IMAGESTEM} (ANIM=[01~04]) (TIME={TIME})}
#enddef
#define NEW:VILLAGE_TOD TERRAINLIST IMAGESTEM
#arg PROB
100#endarg
#arg VARIATIONS
;2;3;4;5;6;7#endarg
#arg TIME
first_watch,dusk,dusk1,dusk2,short_dark,long_dark1,underground#endarg
#arg FLAG
village#endarg
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}
[/tile]
probability={PROB}
[image]
name={IMAGESTEM}@V.png
variations={VARIATIONS}
layer=0
base=90,144
center=90,144
[variant]
tod={TIME}
name={IMAGESTEM}@V-night.png
[/variant]
[/image]
[/terrain_graphics]
#enddef
# This hacky macro will hopefully be replaced with a more elegant way of passing
# variation-specific probabilities sometime
#define VILLAGE_PROBABILITY PROB
[+terrain_graphics]
probability={PROB}
[/terrain_graphics]
#enddef
########################
# villages - end
########################
################## start of wall and torch flames ######################################
########################
# wall sconces
########################
#define FLAME_TORCH_IMAGE_INTERNAL IMAGESTEM X_POS Y_POS
{IMAGESTEM}/base.png~BLIT(terrain/{IMAGESTEM}/flames.png,{X_POS},{Y_POS})~MASK(terrain/{IMAGESTEM}/mask@V.png):50#enddef
#define NEW:TORCH_FLAMES_OVERLAY TERRAINLIST IMAGESTEM
#arg PROB
100#endarg
#arg LAYER
4#endarg
#arg LAYER2
2#endarg
#arg FLAG
flames#endarg
#arg ADJACENT
X*#endarg
# set the flags to mark where the torches are
[terrain_graphics]
map="
1
,
2"
[tile]
pos=1
type=!,{ADJACENT}
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}
[/tile]
probability={PROB}
[/terrain_graphics]
# choose the correct post type
[terrain_graphics]
map="
*
,
1"
[tile]
pos=1
type=W*
has_flag={FLAG}
set_no_flag=post_drawn
[/tile]
probability={PROB}
[image]
layer={LAYER2}
base=24,80
name={IMAGESTEM}/post-water.png
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
*
,
1"
[tile]
pos=1
type=Q*
has_flag={FLAG}
set_no_flag=post_drawn
[/tile]
probability={PROB}
[image]
layer={LAYER2}
base=24,80
name={IMAGESTEM}/post-chasm.png
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
*
,
1"
[tile]
pos=1
type=!,Q*,X*,W*
has_flag={FLAG}
set_no_flag=post_drawn
[/tile]
probability={PROB}
[image]
layer={LAYER2}
base=24,80
name={IMAGESTEM}/post.png
[/image]
[/terrain_graphics]
# draw the flames etc.
[terrain_graphics]
map="
*
,
1"
[tile]
pos=1
has_flag={FLAG}
set_no_flag={FLAG}_drawn
[/tile]
probability={PROB}
[image]
layer={LAYER}
base=24,80
name={IMAGESTEM}/glow[1,2,3,2].png:[200,160,140,170]
[/image]
[image]
layer={LAYER}
base=54,72
name="{FLAME_TORCH_IMAGE_INTERNAL {IMAGESTEM} 24 39},
{FLAME_TORCH_IMAGE_INTERNAL {IMAGESTEM} 24 38},
{FLAME_TORCH_IMAGE_INTERNAL {IMAGESTEM} 24 37},
{FLAME_TORCH_IMAGE_INTERNAL {IMAGESTEM} 24 36},
{FLAME_TORCH_IMAGE_INTERNAL {IMAGESTEM} 24 35},
{FLAME_TORCH_IMAGE_INTERNAL {IMAGESTEM} 24 34},
{FLAME_TORCH_IMAGE_INTERNAL {IMAGESTEM} 24 33},
{FLAME_TORCH_IMAGE_INTERNAL {IMAGESTEM} 24 32},
{FLAME_TORCH_IMAGE_INTERNAL {IMAGESTEM} 24 31},
{FLAME_TORCH_IMAGE_INTERNAL {IMAGESTEM} 24 30}"
variations=";2;3"
[/image]
[/terrain_graphics]
#enddef
########################
# wall sconces
########################
#define FLAME_WALL_IMAGE_INTERNAL_ CONCON ROT IMAGESTEM X_POS Y_POS
{IMAGESTEM}/base-{CONCON}-{ROT}.png~BLIT(terrain/{IMAGESTEM}/flames.png,{X_POS},{Y_POS})~MASK(terrain/{IMAGESTEM}/mask@V-{CONCON}-{ROT}.png):50#enddef
#define FLAME_WALL_IMAGE_INTERNAL CONCON IMAGESTEM X_POS Y_POS
{FLAME_WALL_IMAGE_INTERNAL_ {CONCON} @R0 {IMAGESTEM} {X_POS} {Y_POS}}#enddef
# simple rules for Xu*-style (vs Xo*-style further down), but keeping a lot of the same naming convention so they (Xu/Xo) are compatible
#define NEW:WALL_FLAMES_SIMPLE_OVERLAY TERRAINLIST IMAGESTEM
#arg PROB
100#endarg
#arg LAYER
4#endarg
#arg LAYER2
2#endarg
#arg FLAG
flame#endarg
#arg ADJACENT
X*#endarg
#arg POST
wall#endarg
[terrain_graphics]
map="
, 2
* , *
, 1
* , *
, *"
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-bl
[/tile]
[tile]
pos=1
type=!,{ADJACENT}
[/tile]
probability={PROB}
[image]
layer={LAYER2}
base=24,24
name={IMAGESTEM}/{POST}-post-convex-bl.png
[/image]
[image]
layer={LAYER}
base=24,24
name={IMAGESTEM}/glow[1,2,3,2]-convex-bl.png:[200,160,140,170]
[/image]
[image]
layer={LAYER}
base=54,72
name="{FLAME_WALL_IMAGE_INTERNAL_ convex bl {IMAGESTEM} 20 67},
{FLAME_WALL_IMAGE_INTERNAL_ convex bl {IMAGESTEM} 20 66},
{FLAME_WALL_IMAGE_INTERNAL_ convex bl {IMAGESTEM} 20 65},
{FLAME_WALL_IMAGE_INTERNAL_ convex bl {IMAGESTEM} 20 64},
{FLAME_WALL_IMAGE_INTERNAL_ convex bl {IMAGESTEM} 20 63},
{FLAME_WALL_IMAGE_INTERNAL_ convex bl {IMAGESTEM} 20 62},
{FLAME_WALL_IMAGE_INTERNAL_ convex bl {IMAGESTEM} 20 61},
{FLAME_WALL_IMAGE_INTERNAL_ convex bl {IMAGESTEM} 20 60},
{FLAME_WALL_IMAGE_INTERNAL_ convex bl {IMAGESTEM} 20 59},
{FLAME_WALL_IMAGE_INTERNAL_ convex bl {IMAGESTEM} 20 58}"
variations=";2;3"
[/image]
[/terrain_graphics]
#enddef
#define NEW:WALL_FLAMES_OVERLAY TERRAINLIST IMAGESTEM
#arg PROB
100#endarg
#arg LAYER
4#endarg
#arg LAYER2
2#endarg
#arg FLAG
flame#endarg
#arg ADJACENT
X*#endarg
#arg POST
wall#endarg
[terrain_graphics]
# this marks the all-flames corners for a non-rotating overlay later
map="
, *
* , *
, 1
3 , 3
, 2"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-bl
[/tile]
[tile]
pos=2
type=!,{ADJACENT}
set_no_flag={FLAG}-tl,{FLAG}-tr
[/tile]
[tile]
pos=3
type={TERRAINLIST},{ADJACENT}
[/tile]
[/terrain_graphics]
# these are the cases we know we want to quash, that are not covered by the rotations below
[terrain_graphics]
# this prevents the -convex-tr image from showing for south-facing corners
map="
, *
* , *
, 4
3 , 1
, 2"
[tile]
pos=1
type={TERRAINLIST}
[/tile]
[tile]
pos=2
type=!,{ADJACENT}
set_flag={FLAG}-tr
[/tile]
[tile]
pos=3
type=!,{TERRAINLIST},!,{ADJACENT}
[/tile]
[tile]
pos=4
type={TERRAINLIST},{ADJACENT}
[/tile]
[/terrain_graphics]
[terrain_graphics]
# this prevents the -convex-tl image from showing for south-facing corners
map="
, *
* , *
, 4
1 , 3
, 2"
[tile]
pos=1
type={TERRAINLIST}
[/tile]
[tile]
pos=2
type=!,{ADJACENT}
set_flag={FLAG}-tl
[/tile]
[tile]
pos=3
type=!,{TERRAINLIST},!,{ADJACENT}
[/tile]
[tile]
pos=4
type={TERRAINLIST},{ADJACENT}
[/tile]
[/terrain_graphics]
[terrain_graphics]
# this prevents the -convex-bl image from showing for Xo* SE of Xo*^Efs
map="
, *
1 , *
, 2
* , 3
, *"
[tile]
pos=1
type={TERRAINLIST}
[/tile]
[tile]
pos=2
type={ADJACENT}
set_flag={FLAG}-bl
[/tile]
[tile]
pos=3
type={TERRAINLIST},{ADJACENT}
[/tile]
[/terrain_graphics]
[terrain_graphics]
# this keeps the convex-bl image from showing up on all SW facing diagonal images
map="
, *
* , *
, 1
* , 2
, *"
[tile]
pos=1
type={TERRAINLIST}
set_flag={FLAG}-bl
[/tile]
[tile]
pos=2
type={TERRAINLIST},{ADJACENT}
[/tile]
[/terrain_graphics]
[terrain_graphics]
# this keeps the fire overlays from showing up everywhere
map="
, *
* , *
, 1
* , 2
, *"
[tile]
pos=1
type={TERRAINLIST}
set_flag={FLAG}-bl
[/tile]
[tile]
pos=2
type={TERRAINLIST},{ADJACENT}
[/tile]
[/terrain_graphics]
# these are the real rules
# this checks the already marked tiles for the south-facing corner case
[terrain_graphics]
map="
, 1
3 , 3
, 2
* , *
, *"
[tile]
pos=1
type={TERRAINLIST}
has_flag={FLAG}-bl
set_no_flag={FLAG}-bl-drawn
[/tile]
[tile]
pos=2
type=!,{ADJACENT}
has_flag={FLAG}-tl,{FLAG}-tr
[/tile]
[tile]
pos=3
type={TERRAINLIST},{ADJACENT}
[/tile]
# rotations=bl
probability={PROB}
[image]
layer={LAYER2}
base=24,24
center=62,110
name={IMAGESTEM}/{POST}-post-convex-bl.png
[/image]
[image]
layer={LAYER}
base=24,24
center=62,110
name={IMAGESTEM}/glow[1,2,3,2]-convex-bl.png:[200,160,140,170]
[/image]
[image]
layer={LAYER}
base=54,72
center=62,110
name="{IMAGESTEM}/base-convex-bl.png~BLIT(terrain/{IMAGESTEM}/flames.png,20,67)~MASK(terrain/{IMAGESTEM}/mask@V-convex-bl.png):50,
{IMAGESTEM}/base-convex-bl.png~BLIT(terrain/{IMAGESTEM}/flames.png,20,66)~MASK(terrain/{IMAGESTEM}/mask@V-convex-bl.png):50,
{IMAGESTEM}/base-convex-bl.png~BLIT(terrain/{IMAGESTEM}/flames.png,20,65)~MASK(terrain/{IMAGESTEM}/mask@V-convex-bl.png):50,
{IMAGESTEM}/base-convex-bl.png~BLIT(terrain/{IMAGESTEM}/flames.png,20,64)~MASK(terrain/{IMAGESTEM}/mask@V-convex-bl.png):50,
{IMAGESTEM}/base-convex-bl.png~BLIT(terrain/{IMAGESTEM}/flames.png,20,63)~MASK(terrain/{IMAGESTEM}/mask@V-convex-bl.png):50,
{IMAGESTEM}/base-convex-bl.png~BLIT(terrain/{IMAGESTEM}/flames.png,20,62)~MASK(terrain/{IMAGESTEM}/mask@V-convex-bl.png):50,
{IMAGESTEM}/base-convex-bl.png~BLIT(terrain/{IMAGESTEM}/flames.png,20,61)~MASK(terrain/{IMAGESTEM}/mask@V-convex-bl.png):50,
{IMAGESTEM}/base-convex-bl.png~BLIT(terrain/{IMAGESTEM}/flames.png,20,60)~MASK(terrain/{IMAGESTEM}/mask@V-convex-bl.png):50,
{IMAGESTEM}/base-convex-bl.png~BLIT(terrain/{IMAGESTEM}/flames.png,20,59)~MASK(terrain/{IMAGESTEM}/mask@V-convex-bl.png):50,
{IMAGESTEM}/base-convex-bl.png~BLIT(terrain/{IMAGESTEM}/flames.png,20,58)~MASK(terrain/{IMAGESTEM}/mask@V-convex-bl.png):50"
variations=";2;3"
[/image]
[/terrain_graphics]
# concave is currently (1.16) for the SE, SW facing sconces
# SW facing
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type=!,{ADJACENT}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[tile]
pos=3
type={TERRAINLIST},{ADJACENT}
[/tile]
rotations=tr,r,br,null,null,null
probability={PROB}
[image]
layer={LAYER2}
base=24,80
name={IMAGESTEM}/{POST}-post-concave-@R0.png
[/image]
[image]
layer={LAYER}
base=24,80
name={IMAGESTEM}/glow[1,2,3,2]-concave-@R0.png:[200,160,140,170]
[/image]
[image]
layer={LAYER}
base=54,72
name="{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 41},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 40},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 39},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 38},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 37},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 36},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 35},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 34},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 33},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 32}"
variations=";2;3"
[/image]
[/terrain_graphics]
#SE facing
[terrain_graphics]
map="
3
, 2
1"
[tile]
pos=1
type=!,{ADJACENT}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[tile]
pos=3
type={TERRAINLIST},{ADJACENT}
[/tile]
rotations=null,null,null,bl,l,tl
probability={PROB}
[image]
layer={LAYER2}
base=24,80
name={IMAGESTEM}/{POST}-post-concave-@R0.png
[/image]
[image]
layer={LAYER}
base=24,80
name={IMAGESTEM}/glow[1,2,3,2]-concave-@R0.png:[200,160,140,170]
[/image]
[image]
layer={LAYER}
base=54,72
name="{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 41},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 40},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 39},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 38},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 37},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 36},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 35},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 34},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 33},
{FLAME_WALL_IMAGE_INTERNAL concave {IMAGESTEM} 20 32}"
variations=";2;3"
[/image]
[/terrain_graphics]
# convex is currently (1.16) for the south-facing sconce
[terrain_graphics]
map="
2
, 3
1"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag={FLAG}-@R0
[/tile]
[tile]
pos=2
type=!,{ADJACENT}
set_no_flag={FLAG}-@R2
[/tile]
[tile]
pos=3
type=!,{ADJACENT}
set_no_flag={FLAG}-@R4
[/tile]
rotations=tr,r,br,bl,l,tl
probability={PROB}
[image]
layer={LAYER2}
base=24,24
name={IMAGESTEM}/{POST}-post-convex-@R0.png
[/image]
[image]
layer={LAYER}
base=24,24
name={IMAGESTEM}/glow[1,2,3,2]-convex-@R0.png:[200,160,140,170]
[/image]
[image]
layer={LAYER}
base=54,72
name="{FLAME_WALL_IMAGE_INTERNAL convex {IMAGESTEM} 20 67},
{FLAME_WALL_IMAGE_INTERNAL convex {IMAGESTEM} 20 66},
{FLAME_WALL_IMAGE_INTERNAL convex {IMAGESTEM} 20 65},
{FLAME_WALL_IMAGE_INTERNAL convex {IMAGESTEM} 20 64},
{FLAME_WALL_IMAGE_INTERNAL convex {IMAGESTEM} 20 63},
{FLAME_WALL_IMAGE_INTERNAL convex {IMAGESTEM} 20 62},
{FLAME_WALL_IMAGE_INTERNAL convex {IMAGESTEM} 20 61},
{FLAME_WALL_IMAGE_INTERNAL convex {IMAGESTEM} 20 60},
{FLAME_WALL_IMAGE_INTERNAL convex {IMAGESTEM} 20 59},
{FLAME_WALL_IMAGE_INTERNAL convex {IMAGESTEM} 20 58}"
variations=";2;3"
[/image]
[/terrain_graphics]
#enddef
################## end of flames ######################################
# This needs to be called only once, to set the flags used by all 12-hex 324x180
# water animations.
#define NEW:WATER_342_180_TILE_FLAGS
[terrain_graphics]
mod_x=6
mod_y=2
[tile]
x,y=0,0
set_no_flag=342x180_water01
[/tile]
[/terrain_graphics]
[terrain_graphics]
mod_x=6
mod_y=2
[tile]
x,y=1,0
set_no_flag=342x180_water02
[/tile]
[/terrain_graphics]
[terrain_graphics]
mod_x=6
mod_y=2
[tile]
x,y=2,0
set_no_flag=342x180_water03
[/tile]
[/terrain_graphics]
[terrain_graphics]
mod_x=6
mod_y=2
[tile]
x,y=3,0
set_no_flag=342x180_water04
[/tile]
[/terrain_graphics]
[terrain_graphics]
mod_x=6
mod_y=2
[tile]
x,y=4,0
set_no_flag=342x180_water05
[/tile]
[/terrain_graphics]
[terrain_graphics]
mod_x=6
mod_y=2
[tile]
x,y=5,0
set_no_flag=342x180_water06
[/tile]
[/terrain_graphics]
[terrain_graphics]
mod_x=6
mod_y=2
[tile]
x,y=0,1
set_no_flag=342x180_water07
[/tile]
[/terrain_graphics]
[terrain_graphics]
mod_x=6
mod_y=2
[tile]
x,y=1,1
set_no_flag=342x180_water08
[/tile]
[/terrain_graphics]
[terrain_graphics]
mod_x=6
mod_y=2
[tile]
x,y=2,1
set_no_flag=342x180_water09
[/tile]
[/terrain_graphics]
[terrain_graphics]
mod_x=6
mod_y=2
[tile]
x,y=3,1
set_no_flag=342x180_water10
[/tile]
[/terrain_graphics]
[terrain_graphics]
mod_x=6
mod_y=2
[tile]
x,y=4,1
set_no_flag=342x180_water11
[/tile]
[/terrain_graphics]
[terrain_graphics]
mod_x=6
mod_y=2
[tile]
x,y=5,1
set_no_flag=342x180_water12
[/tile]
[/terrain_graphics]
#enddef
#define WATER_342_180_TILE_VARIANTS MASKIPF LAYER IPF IMAGESTEM FRAMES
#arg DURATION
100#endarg
#arg RANDOM_START
no#endarg
# wmlscope: start ignoring
[image]
layer={LAYER}
name={IMAGESTEM}[01~{FRAMES}].png~CROP(0,0,72,72){MASKIPF}{IPF}:{DURATION}
random_start={RANDOM_START}
is_water=yes
[variant]
has_flag=342x180_water02
layer={LAYER}
name={IMAGESTEM}[01~{FRAMES}].png~CROP(54,36,72,72){MASKIPF}{IPF}:{DURATION}
random_start={RANDOM_START}
[/variant]
[variant]
has_flag=342x180_water03
layer={LAYER}
name={IMAGESTEM}[01~{FRAMES}].png~CROP(108,0,72,72){MASKIPF}{IPF}:{DURATION}
random_start={RANDOM_START}
[/variant]
[variant]
has_flag=342x180_water04
layer={LAYER}
name={IMAGESTEM}[01~{FRAMES}].png~CROP(162,36,72,72){MASKIPF}{IPF}:{DURATION}
random_start={RANDOM_START}
[/variant]
[variant]
has_flag=342x180_water05
layer={LAYER}
name={IMAGESTEM}[01~{FRAMES}].png~CROP(216,0,72,72){MASKIPF}{IPF}:{DURATION}
random_start={RANDOM_START}
[/variant]
[variant]
has_flag=342x180_water06
layer={LAYER}
name={IMAGESTEM}[01~{FRAMES}].png~CROP(270,36,72,72){MASKIPF}{IPF}:{DURATION}
random_start={RANDOM_START}
[/variant]
[variant]
has_flag=342x180_water07
layer={LAYER}
name={IMAGESTEM}[01~{FRAMES}].png~CROP(0,72,72,72){MASKIPF}{IPF}:{DURATION}
random_start={RANDOM_START}
[/variant]
[variant]
has_flag=342x180_water08
layer={LAYER}
name={IMAGESTEM}[01~{FRAMES}].png~CROP(54,108,72,72){MASKIPF}{IPF}:{DURATION}
random_start={RANDOM_START}
[/variant]
[variant]
has_flag=342x180_water09
layer={LAYER}
name={IMAGESTEM}[01~{FRAMES}].png~CROP(108,72,72,72){MASKIPF}{IPF}:{DURATION}
random_start={RANDOM_START}
[/variant]
[variant]
has_flag=342x180_water10
layer={LAYER}
name={IMAGESTEM}[01~{FRAMES}].png~CROP(162,108,72,72){MASKIPF}{IPF}:{DURATION}
random_start={RANDOM_START}
[/variant]
[variant]
has_flag=342x180_water11
layer={LAYER}
name={IMAGESTEM}[01~{FRAMES}].png~CROP(216,72,72,72){MASKIPF}{IPF}:{DURATION}
random_start={RANDOM_START}
[/variant]
[variant]
has_flag=342x180_water12
layer={LAYER}
name={IMAGESTEM}[01~{FRAMES}].png~CROP(270,108,72,72){MASKIPF}{IPF}:{DURATION}
random_start={RANDOM_START}
[/variant]
[/image]
# wmlscope: stop ignoring
#enddef
#define NEW:WATER_342_180 TERRAINLIST IMAGESTEM FRAMES
#arg LAYER
-999#endarg
#arg DURATION
100#endarg
#arg RANDOM_START
no#endarg
[terrain_graphics]
[tile]
x,y=0,0
type={TERRAINLIST}
set_no_flag=base
{WATER_342_180_TILE_VARIANTS "" {LAYER} "" {IMAGESTEM} {FRAMES} DURATION={DURATION} RANDOM_START={RANDOM_START}}
[/tile]
[/terrain_graphics]
#enddef
#define NEW:WATER_342_180_OVERLAY TERRAINLIST COLOROVERLAY LAYER
[terrain_graphics]
[tile]
x,y=0,0
type={TERRAINLIST}
[image]
name={COLOROVERLAY}.png
layer={LAYER}
[/image]
[/tile]
[/terrain_graphics]
#enddef
#define NEW:WATER_342_180_OVERLAY_TRANSITION TERRAINLIST ADJACENT LAYER IMAGESTEM OPACITY
{NEW:GENERIC_CORNER_TRANSITION {TERRAINLIST} {ADJACENT} {LAYER} {IMAGESTEM} "masks/long" "~O({OPACITY})"}
#enddef
#define NEW:WATER_342_180_TRANSITION TERRAINLIST ADJACENT LAYER IPF IMAGESTEM FRAMES
#arg DURATION
100#endarg
#arg RANDOM_START
no#endarg
[terrain_graphics]
map="
, 2
., 2
, 1
., .
, ."
[tile]
pos=1
type={ADJACENT}
set_no_flag=water_concave-@R0-@R5,water_concave-@R0-@R1
{WATER_342_180_TILE_VARIANTS "~MASK(terrain/masks/long-concave-2-@R0.png)" {LAYER} {IPF} {IMAGESTEM} {FRAMES} DURATION={DURATION} RANDOM_START={RANDOM_START}}
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., 3
, 1
., .
, ."
[tile]
pos=1
type={TERRAINLIST}
[/tile]
[tile]
pos=2
type={ADJACENT}
set_no_flag=water_convex-@R0-@R5
{WATER_342_180_TILE_VARIANTS "~MASK(terrain/masks/long-convex-@R0-@R5.png)" {LAYER} {IPF} {IMAGESTEM} {FRAMES} DURATION={DURATION} RANDOM_START={RANDOM_START}}
[/tile]
[tile]
pos=3
type=!,{TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., 3
, 1
., .
, ."
[tile]
pos=1
type={TERRAINLIST}
[/tile]
[tile]
pos=2
type=!,{TERRAINLIST}
[/tile]
[tile]
pos=3
type={ADJACENT}
set_no_flag=water_convex-@R0-@R1
{WATER_342_180_TILE_VARIANTS "~MASK(terrain/masks/long-convex-@R0-@R1.png)" {LAYER} {IPF} {IMAGESTEM} {FRAMES} DURATION={DURATION} RANDOM_START={RANDOM_START}}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
#enddef