Made castles and keeps properly connect with adjacent walls

This allows almost all castles<->walls combinations to work together visually. The basic idea is to draw cavewalls onto castles, but not draw castle walls onto cavewalls except for specific castle tiles at castle<->wall<->other intersections to fill in the resulting gaps.
This commit is contained in:
ln-zookeeper 2016-11-03 13:16:49 +02:00
parent cf5f6bab36
commit f91cfef9cb
4 changed files with 360 additions and 53 deletions

View file

@ -46,6 +46,8 @@ Version 1.13.5+dev:
* New aquatic castles.
* Reworked stone walls so they take up less space and improved transitions.
* Added Wooden and Rusty Gates.
* Improved connections between castle and wall terrains, allowing castles and
keeps to be placed adjacent to walls without glitches in most cases.
* New sprite for Tentacle of the Deep.
* Tweaked colors for all time schedules.
* Units:

View file

@ -599,63 +599,63 @@
# Aquatic camp
{NEW:WALL (Kme,Cme) (!,C*,K*) castle/aquatic-camp/castle}
{AQUATIC:CAMPS Kme Cme castle/aquatic-camp}
{NEW:CASTLEWALL (Kme,Cme) (!,C*,K*,X*) X* castle/aquatic-camp/castle}
{AQUATIC:CAMPS Kme Cme castle/aquatic-camp}
# Aquatic castle
{NEW:WALL Cm (!,C*,K*) castle/aquatic-castle/castle}
{NEW:WALL2 Km !,Ket,!,C*,Ke* (!,C*,K*) castle/aquatic-castle/keep-castle}
{NEW:WALL Km (!,C*,K*) castle/aquatic-castle/keep}
{NEW:CASTLEWALL Cm (!,C*,K*,X*) X* castle/aquatic-castle/castle}
{NEW:CASTLEWALL2 Km !,Ket,!,C*,Ke* (!,C*,K*,X*) castle/aquatic-castle/keep-castle}
{NEW:CASTLEWALL Km (!,Km,X*) X* castle/aquatic-castle/keep}
# disable the next line to get the brown bank transition. It adds more images to the hex though.
{DISABLE_BASE_TRANSITIONS_F (Km,Cm) non_submerged}
{DISABLE_BASE_TRANSITIONS (Km,Cm)}
{AQUATIC:KEEP_CORNER_TRANSITION (Km) (Cm) (W*,Ss,Q*) (non_fading) (castle/aquatic-castle)}
{TRANSITION_COMPLETE_LF (Cm) (!,Km*,Cm*,W*,Ss,Q*) 0 non_fading castle/aquatic-castle/castle-to-ground}
{TRANSITION_COMPLETE_LF (Km) (!,Km*,Cm*,W*,Ss,Q*) 0 non_fading castle/aquatic-castle/keep-to-ground}
{TRANSITION_COMPLETE_LF (Km) (W*,Ss) 0 non_fading castle/aquatic-castle/keep-to-water}
{TRANSITION_COMPLETE_LF (Cm) (!,Km*,Cm*,W*,Ss,Q*,X*) 0 non_fading castle/aquatic-castle/castle-to-ground}
{TRANSITION_COMPLETE_LF (Km) (!,Km*,Cm*,W*,Ss,Q*,X*) 0 non_fading castle/aquatic-castle/keep-to-ground}
{TRANSITION_COMPLETE_LF (Km) (W*,Ss) 0 non_fading castle/aquatic-castle/keep-to-water}
# Elven castle
{NEW:WALL Cv (!,C*,K*) castle/elven/castle}
{NEW:WALL2 Kv !,Ket,!,C*,Ke* (!,C*,K*) castle/elven/keep-castle}
{NEW:WALL Kv (Ke,Kea,!,K*) castle/elven/keep}
{NEW:CASTLEWALL Cv (!,C*,K*,X*) X* castle/elven/castle}
{NEW:CASTLEWALL2 Kv !,Ket,!,C*,Ke* (!,C*,K*,X*) castle/elven/keep-castle}
{NEW:CASTLEWALL Kv (Ke,Kea,!,K*,X*) X* castle/elven/keep}
# Orcish castles
{NEW:WALL Co,Cv (!,C*,K*) castle/orcish/fort}
{NEW:WALL2 Ko,Kv !,Ket,!,C*,Ke* (!,C*,K*) castle/orcish/keep-fort}
{NEW:WALL Ko,Kv (!,K*) castle/orcish/keep}
{NEW:CASTLEWALL Co,Cv (!,C*,K*,X*) X* castle/orcish/fort}
{NEW:CASTLEWALL2 Ko,Kv !,Ket,!,C*,Ke* (!,C*,K*,X*) castle/orcish/keep-fort}
{NEW:CASTLEWALL Ko,Kv (!,K*,X*) X* castle/orcish/keep}
{NEW:WALL (Co*,Cv) (!,C*,K*) castle/winter-orcish/fort}
{NEW:WALL2 (Ko*,Kv) !,Ket,!,C*,Ke* (!,C*,K*) castle/winter-orcish/keep-fort}
{NEW:WALL (Ko*,Kv) (Ke,Kea,!,K*) castle/winter-orcish/keep}
{NEW:CASTLEWALL (Co*,Cv) (!,C*,K*,X*) X* castle/winter-orcish/fort}
{NEW:CASTLEWALL2 (Ko*,Kv) !,Ket,!,C*,Ke* (!,C*,K*,X*) castle/winter-orcish/keep-fort}
{NEW:CASTLEWALL (Ko*,Kv) (Ke,Kea,!,K*,X*) X* castle/winter-orcish/keep}
# Desert castles
{NEW:WALL Cd,Cv,Co* (!,C*,K*) castle/sand/castle}
{NEW:WALL2 Kd,Kv,Ko* !,Ket,!,C*,Ke* (!,C*,K*) castle/sand/keep-castle}
{NEW:WALL Kd,Ko*,Kv (!,K*) castle/sand/keep}
{NEW:CASTLEWALL Cd,Cv,Co* (!,C*,K*,X*) X* castle/sand/castle}
{NEW:CASTLEWALL2 Kd,Kv,Ko* !,Ket,!,C*,Ke* (!,C*,K*,X*) castle/sand/keep-castle}
{NEW:CASTLEWALL Kd,Ko*,Kv (!,K*,X*) X* castle/sand/keep}
{NEW:WALL Cd*,Cv,Co* (!,C*,K*) castle/sand/ruin-castle}
{NEW:WALL2 Kdr,Kv,Ko* !,Ket,!,C*,Ke* (!,C*,K*) castle/sand/ruin-keep-castle}
{NEW:WALL Kd*,Ko*,Kv (Ke,Kea,!,K*) castle/sand/ruin-keep}
{NEW:CASTLEWALL Cd*,Cv,Co* (!,C*,K*,X*) X* castle/sand/ruin-castle}
{NEW:CASTLEWALL2 Kdr,Kv,Ko* !,Ket,!,C*,Ke* (!,C*,K*,X*) castle/sand/ruin-keep-castle}
{NEW:CASTLEWALL Kd*,Ko*,Kv (Ke,Kea,!,K*,X*) X* castle/sand/ruin-keep}
#
# Human castles
#
{NEW:WALL Ch,Cv,Co,Cd (!,C*,K*) castle/castle}
{NEW:WALL2 Kh,Kv,Ko,Kd !,Ket,!,C*,Ke* (!,C*,K*) castle/keep-castle}
{NEW:WALL Kh,Kd*,Ko,Kv (!,K*) castle/keep}
{NEW:CASTLEWALL Ch,Cv,Co,Cd (!,C*,K*,X*) X* castle/castle}
{NEW:CASTLEWALL2 Kh,Kv,Ko,Kd !,Ket,!,C*,Ke* (!,C*,K*,X*) castle/keep-castle}
{NEW:CASTLEWALL Kh,Kd*,Ko,Kv (!,K*,X*) X* castle/keep}
{NEW:WALL Ch,Cha,Coa (!,C*,K*) castle/snowy/castle}
{NEW:WALL2 Kh,Kha,Koa !,Ket,!,C*,Ke* (!,C*,K*) castle/snowy/keep-castle}
{NEW:WALL Kh,Kha,Kd*,Ko*,Kv (Ke,Kea,!,K*) castle/snowy/keep}
{NEW:CASTLEWALL Ch,Cha,Coa (!,C*,K*,X*) X* castle/snowy/castle}
{NEW:CASTLEWALL2 Kh,Kha,Koa !,Ket,!,C*,Ke* (!,C*,K*,X*) castle/snowy/keep-castle}
{NEW:CASTLEWALL Kh,Kha,Kd*,Ko*,Kv (Ke,Kea,!,K*,X*) X* castle/snowy/keep}
# sunken/swamp ruins (submerged part)
@ -664,32 +664,32 @@
# (!,Chr,Chs,!,Ch*) is used to catch convex transitions between Chw and Ch*
# without lots of additional rules
{NEW:WALL (!,Chr,Chs,Ce*,Ke*,!,Ch*) (W*) castle/sunken-ruin}
{NEW:CASTLEWALL (!,Chr,Chs,Ce*,Ke*,!,Ch*) (W*) X* castle/sunken-ruin}
{NEW:WALL2_P Khw,Khs Ch* W*,Ss 75 castle/sunken-ruinkeep1-castle}
{NEW:WALL2 Khw,Khs Ch* W*,Ss castle/sunkenkeep-castle}
{NEW:CASTLEWALL2_P Khw,Khs Ch* W*,Ss 75 castle/sunken-ruinkeep1-castle}
{NEW:CASTLEWALL2 Khw,Khs Ch* W*,Ss castle/sunkenkeep-castle}
{NEW:WALL_P (!,Khr,!,Kh*) W*,Ss,Chw,Chs 75 castle/sunken-ruinkeep1}
{NEW:WALL (!,Khr,!,Kh*) W*,Ss,Chw,Chs castle/sunkenkeep}
{NEW:CASTLEWALL_P (!,Khr,!,Kh*) W*,Ss,Chw,Chs X* 75 castle/sunken-ruinkeep1}
{NEW:CASTLEWALL (!,Khr,!,Kh*) W*,Ss,Chw,Chs X* castle/sunkenkeep}
# ruined castle and non-submerged parts of sunken/swamp ruins
# There are no more human castles left, so we can just use Ch* here, which makes sure
# that all ruin<->non-ruin transitions are drawn
{NEW:WALL Ch*,Cd*,Cv,Co* (!,C*,K*) castle/ruin}
{NEW:CASTLEWALL Ch*,Cd*,Cv,Co* (!,C*,K*,X*) X* castle/ruin}
{NEW:WALL2_P (Khr,Khw,Khs) (C*) (!,Ch*,Kh*) 75 castle/ruinkeep1-castle}
{NEW:WALL2 (Khr,Khw,Khs) (C*) (!,Ch*,Kh*) castle/keep-castle}
{NEW:CASTLEWALL2_P (Khr,Khw,Khs) (C*) (!,Ch*,Kh*,X*) 75 castle/ruinkeep1-castle}
{NEW:CASTLEWALL2 (Khr,Khw,Khs) (C*) (!,Ch*,Kh*,X*) castle/keep-castle}
{NEW:WALL_P Kh*,Kd*,Ko*,Kv (Ke,Kea,!,K*) 75 castle/ruinkeep1}
{NEW:WALL Kh*,Kd*,Ko*,Kv (Ke,Kea,!,K*) castle/keep}
{NEW:CASTLEWALL_P Kh*,Kd*,Ko*,Kv (Ke,Kea,!,K*,X*) X* 75 castle/ruinkeep1}
{NEW:CASTLEWALL Kh*,Kd*,Ko*,Kv (Ke,Kea,!,K*,X*) X* castle/keep}
# Encampment
{NEW:WALL2 !,Ke,Kea,Kud,!,K* (Ke,Kea,C*) (!,C*,K*) castle/encampment/tall-keep-castle}
{NEW:WALL !,Ke,Kea,Kud,!,K* (Ke,Kea,!,K*) castle/encampment/tall-keep}
{NEW:WALL (!,Cud,Cea,Coa,Cha,Kud,Kea,Koa,Kha,!,C*,K*) (!,C*,K*) castle/encampment/regular}
{NEW:WALL (!,Cud,Kud,!,C*,K*) (!,C*,K*) castle/encampment/snow}
{NEW:CASTLEWALL2 !,Ke,Kea,Kud,Kme,!,K* (Ke,Kea,C*) (!,C*,K*,X*) castle/encampment/tall-keep-castle}
{NEW:CASTLEWALL !,Ke,Kea,Kud,Kme,!,K* (Ke,Kea,!,K*,X*) X* castle/encampment/tall-keep}
{NEW:CASTLEWALL (!,Cud,Cea,Coa,Cha,Kud,Kea,Koa,Kha,Kme,!,C*,K*) (!,C*,K*,X*) X* castle/encampment/regular}
{NEW:CASTLEWALL (!,Cud,Kud,Kme,!,C*,K*) (!,C*,K*,X*) X* castle/encampment/snow}
# Castle & Encampment Base Transtions

View file

@ -67,15 +67,6 @@
#define AQUATIC:CAMPS KEEP CAMP IMAGEPATH
[terrain_graphics]
[tile]
x=0
y=0
type={KEEP}
set_flag=wall-tl,wall-tr,wall-bl,wall-br,wall-r,wall-l
[/tile]
[/terrain_graphics]
{DISABLE_BASE_TRANSITIONS_F ({KEEP},{CAMP}) non_submerged}
[terrain_graphics]
map="
@ -152,7 +143,7 @@
rotations=n,ne,se,s,sw,nw
[/terrain_graphics]
{TRANSITION_COMPLETE_LF ({CAMP},{KEEP}) (!,{KEEP},{CAMP},W*,Ss,Q*) 0 non_fading {IMAGEPATH}/castle-to-ground}
{TRANSITION_COMPLETE_LF ({CAMP},{KEEP}) (!,{KEEP},{CAMP},W*,Ss,Q*,X*) 0 non_fading {IMAGEPATH}/castle-to-ground}
{TRANSITION_COMPLETE_LF ({CAMP}) ({KEEP}) -1 pool_edge {IMAGEPATH}/keep-rim}
# this macro was defined at the top of this file

View file

@ -1142,6 +1142,320 @@
{NEW:WALL2_P {TERRAINLIST} {ADJACENT1} {ADJACENT2} 100 {IMAGESTEM}}
#enddef
#define NEW:CASTLEWALL_INTERNAL_OPEN_ENDS TERRAINLIST ADJACENT ADJACENT_OPEN IMAGESTEM
# 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=castlewall1-@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=castlewall2-@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=castlewall3-@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=castlewall4-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=castlewall5-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=castlewall6-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: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}}
{NEW:CASTLEWALL_INTERNAL_OPEN_ENDS {TERRAINLIST} {ADJACENT} {ADJACENT_OPEN} {IMAGESTEM}}
#enddef
#define NEW:CASTLEWALL TERRAINLIST ADJACENT ADJACENT_OPEN IMAGESTEM
{NEW:CASTLEWALL_P {TERRAINLIST} {ADJACENT} {ADJACENT_OPEN} 100 {IMAGESTEM}}
#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="