doofus-01 d63fe4a96e stone tile floor terrain (#1939)
* stone tile floor, only very basic transitions so far, not finished

* better transitions for stone floor tiles

* various clean-ups to stone tiles

* chasm transitions for stone tiles

* some more work on stone_floor-chasm transition images

* some corrections to terrain rules, mostly related to one of the I* terrain codes

* work on transitions, introducing new macro dealing with the case of three adjacent terrains

* transition images that use the now existing rules

* using new macro and changing some filters and layering (mostly related to terrain code Irs)

* transitions

* deleted some place-holders that were uploaded by accident
2017-09-17 22:06:46 +03:00

2687 lines
56 KiB
INI

# This file contains a WIP set of terrain graphics macros, intended to be as
# short and simple as possible.
#define NEW:BASE TERRAIN IMAGESTEM
# Places {IMAGESTEM}[1-11].png as base tiles. Assumes 72x72 hex-shaped
# images.
#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
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.
#arg LAYER
0#endarg
#arg FLAG
overlay#endarg
#arg PROB
100#endarg
#arg ANIM
#endarg
#arg TIME
#endarg
#arg CENTER
90,144#endarg
[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=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
[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
[image]
name={IMAGESTEM}-crowded-patch-@R0.png
layer={PATCH_LAYER}
[/image]
[/tile]
[tile]
pos=2
type={ADJACENT}
no_flag=crowded
[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:TRANSITION TERRAINLIST ADJACENT LAYER IMAGESTEM
#arg FLAG
transition#endarg
[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
[image]
name={IMAGESTEM}-@R0-@R1-@R2-@R3-@R4-@R5.png
layer={LAYER}
[/image]
[/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]
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
[image]
name={IMAGESTEM}-@R0-@R1-@R2-@R3-@R4.png
layer={LAYER}
[/image]
[/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]
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
[image]
name={IMAGESTEM}-@R0-@R1-@R2-@R3.png
layer={LAYER}
[/image]
[/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]
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
[image]
name={IMAGESTEM}-@R0-@R1-@R2.png
layer={LAYER}
[/image]
[/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]
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
[image]
name={IMAGESTEM}-@R0-@R1.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
set_no_flag={FLAG}-@R3
[/tile]
[tile]
pos=3
type={TERRAINLIST}
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
[image]
name={IMAGESTEM}-@R0.png
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
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: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: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.
[terrain_graphics]
map="
, 2
., .
, 1
., .
, ."
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=smallforest
[/tile]
[tile]
pos=2
type={ADJACENT}
[/tile]
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, *
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
has_flag=smallforest
set_no_flag=overlay
[/tile]
[image]
name={IMAGESTEM}-small@V.png
variations=";2;3;4;5;6;7;8;9;10;11"
layer=0
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.png
variations=";2;3;4;5;6;7;8;9;10;11"
layer=0
base=90,161
center=90,144
[/image]
[/terrain_graphics]
#enddef
#define NEW:FENCE TERRAINLIST IMAGESTEM
[terrain_graphics]
map="
, .
2, 2
, 1
2, 2
, ."
[tile]
pos=1
type={TERRAINLIST}
no_flag=fence
set_flag=fence,fence-[ne,se,sw,nw]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[image]
name={IMAGESTEM}-ne-se-sw-nw.png
layer=-80
base=90,144
center=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, .
2, 2
, 1
., 2
, ."
[tile]
pos=1
type={TERRAINLIST}
no_flag=fence
set_flag=fence,fence-[ne,se,nw]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[image]
name={IMAGESTEM}-ne-se-nw.png
layer=-80
base=90,144
center=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, .
2, .
, 1
2, 2
, ."
[tile]
pos=1
type={TERRAINLIST}
no_flag=fence
set_flag=fence,fence-[se,sw,nw]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[image]
name={IMAGESTEM}-se-sw-nw.png
layer=-80
base=90,144
center=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, .
., 2
, 1
2, 2
, ."
[tile]
pos=1
type={TERRAINLIST}
no_flag=fence
set_flag=fence,fence-[ne,se,sw]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[image]
name={IMAGESTEM}-ne-se-sw.png
layer=-80
base=90,144
center=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, .
2, 2
, 1
2, .
, ."
[tile]
pos=1
type={TERRAINLIST}
no_flag=fence
set_flag=fence,fence-[ne,sw,nw]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[image]
name={IMAGESTEM}-ne-sw-nw.png
layer=-80
base=90,144
center=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, .
., 2
, 1
., 2
, ."
[tile]
pos=1
type={TERRAINLIST}
no_flag=fence
set_flag=fence,fence-[ne,se]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[image]
name={IMAGESTEM}-ne-se.png
layer=-80
base=90,144
center=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, .
2, .
, 1
2, .
, ."
[tile]
pos=1
type={TERRAINLIST}
no_flag=fence
set_flag=fence,fence-[sw,nw]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[image]
name={IMAGESTEM}-sw-nw.png
layer=-80
base=90,144
center=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, .
., .
, 1
2, 2
, ."
[tile]
pos=1
type={TERRAINLIST}
no_flag=fence
set_flag=fence,fence-[se,sw]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[image]
name={IMAGESTEM}-se-sw.png
layer=-80
base=90,144
center=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, .
2, 2
, 1
., .
, ."
[tile]
pos=1
type={TERRAINLIST}
no_flag=fence
set_flag=fence,fence-[ne,nw]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
[image]
name={IMAGESTEM}-ne-nw.png
layer=-80
base=90,144
center=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, 2
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
no_flag=fence
set_flag=fence,fence-@R4
[/tile]
[tile]
pos=2
type={TERRAINLIST}
has_flag=fence-@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=-80
base=90,144
center=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, 2
, 1
*, *
, *"
[tile]
pos=1
type={TERRAINLIST}
no_flag=fence
set_flag=fence,fence-@R4
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/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=-80
base=90,144
center=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
2, 2
, 1
2, 2
, *"
[tile]
pos=1
type={TERRAINLIST}
no_flag=fence
set_flag=fence,fence-[ne,se,sw,nw]
[/tile]
[tile]
pos=2
type=!,{TERRAINLIST}
[/tile]
[image]
name={IMAGESTEM}-ne-se-sw-nw.png
layer=-80
base=90,144
center=90,144
[/image]
[/terrain_graphics]
[terrain_graphics]
map="
, *
*, 2
, 1
*, *
, *"
[tile]
pos=1
type=!,{TERRAINLIST}
[/tile]
[tile]
pos=2
type={TERRAINLIST}
has_flag=fence-@R4
[/tile]
rotations=n,ne,se,s,sw,nw
[image]
# wmlscope: start ignoring
name={IMAGESTEM}-@R1.png
# wmlscope: stop ignoring
layer=-80
base=90,144
center=90,144
[/image]
[/terrain_graphics]
#enddef
#define NEW:WALL_CORNER TERRAINLIST ADJACENT 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={TERRAINLIST}
set_no_flag=wall-@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=125,120
# base=54,72
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,120
# 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,120
# 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
name={IMAGESTEM}@V-A[01~10]-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=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 LAYER
0#endarg
#arg FLAG
wall#endarg
[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={LAYER}
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={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=0
base=54,72
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} {ADJACENT1} {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
X*#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=54,71
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,107
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
#define NEW:VILLAGE TERRAINLIST IMAGESTEM
#arg PROB
100#endarg
#arg ANIM
#endarg
#arg TIME
#endarg
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=village
[/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_TOD_P TERRAINLIST PROB IMAGESTEM
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=village
[/tile]
probability={PROB}
[image]
name={IMAGESTEM}@V.png
variations=";2;3;4;5;6;7"
layer=0
base=90,144
center=90,144
[variant]
tod=first_watch,midnight,second_watch,dusk,dusk2,short_dark,long_dark1,long_dark2,long_dark3,long_dark4
name={IMAGESTEM}@V-night.png
[/variant]
[/image]
[/terrain_graphics]
#enddef
#define NEW:VILLAGE_A4 TERRAINLIST TIME IMAGESTEM
{NEW:VILLAGE {TERRAINLIST} {IMAGESTEM} (ANIM=[01~04]) (TIME={TIME})}
#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
# 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
[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]
#enddef
#define NEW:WATER_342_180 TERRAINLIST IMAGESTEM FRAMES
#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 "" -1000 "" {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