[tiles]


[tile_pattern]
image=tiles/forest.png
tiles=0a
reverse=no
pattern="
 .*, .*  ,(tnk),
   ,(tnk),(tnk),
 .*, .*  ,(tnk)"
[/tile_pattern]

[tile_pattern]
image=tiles/forest.png
tiles=0b
reverse=no
pattern="
(tnk), .*  , .* ,
(tnk),(tnk),    ,
(tnk), .*  , .* "
[/tile_pattern]



#single tile by itself
[tile_pattern]
image=tiles/forest.png
tiles=09

pattern="
 .*, .*  , .*,
 .*,(tnk), .*,
 .*, .*  , .*"
[/tile_pattern]




## tree trunk top transition into the crown

[multi_tile_pattern]
	chance=100
	pattern=" ->tile1 ,     ->tile2 ,    ->tile3 , ->tile4 
			  ->tile5 , tnk ->tile6 , tnk->tile7 , ->tile8 
			  ->tile9 , tnk ->tile10, tnk->tile11, ->tile12
			  ->tile13, tnk ->tile14, tnk->tile15, ->tile16"
    [tile1]
	image=tiles/forest.png
	tiles=0c
    [/tile1]
    [tile2]
	image=tiles/forest.png
	tiles=0d
    [/tile2]
    [tile3]
	image=tiles/forest.png
	tiles=0e
    [/tile3]
    [tile4]
	image=tiles/forest.png
	tiles=0f
    [/tile4]
    
    [tile5]
	image=tiles/forest.png
	tiles=1c
    [/tile5]
    [tile6]
	image=tiles/forest.png
	tiles=1d
    [/tile6]
    [tile7]
	image=tiles/forest.png
	tiles=1e
    [/tile7]
    [tile8]
	image=tiles/forest.png
	tiles=1f
    [/tile8]

    [tile9]
	image=tiles/forest.png
	tiles=2c
    [/tile9]
    [tile10]
	image=tiles/forest.png
	tiles=2d
    [/tile10]
    [tile11]
	image=tiles/forest.png
	tiles=2e
    [/tile11]
    [tile12]
	image=tiles/forest.png
	tiles=2f
    [/tile12]

    [tile13]
	image=tiles/forest.png
	tiles=3c
    [/tile13]
    [tile14]
	image=tiles/forest.png
	tiles=3d
    [/tile14]
    [tile15]
	image=tiles/forest.png
	tiles=3e
    [/tile15]
    [tile16]
	image=tiles/forest.png
	tiles=3f
    [/tile16]

[/multi_tile_pattern]

## tree trunk bottom transition into the ground

[multi_tile_pattern]
	chance=100
	pattern="         , tnk         , tnk        , 
			  ->tile1 , tnk ->tile2 , tnk->tile3 , ->tile4 
			  ->tile5 , tnk ->tile6 , tnk->tile7 , ->tile8 
			  ->tile9 , tnk ->tile10, tnk->tile11, ->tile12
			  ->tile13,     ->tile14,    ->tile15, ->tile16
			  ->tile17,     ->tile18,    ->tile19, ->tile20"
    [tile1]
	image=tiles/forest.png
	tiles=gc
    [/tile1]
    [tile2]
	image=tiles/forest.png
	tiles=gd
    [/tile2]
    [tile3]
	image=tiles/forest.png
	tiles=ge
    [/tile3]
    [tile4]
	image=tiles/forest.png
	tiles=gf
    [/tile4]
    
    [tile5]
	image=tiles/forest.png
	tiles=hc
    [/tile5]
    [tile6]
	image=tiles/forest.png
	tiles=hd
    [/tile6]
    [tile7]
	image=tiles/forest.png
	tiles=he
    [/tile7]
    [tile8]
	image=tiles/forest.png
	tiles=hf
    [/tile8]

    [tile9]
	image=tiles/forest.png
	tiles=ic
	zorder=-3
    [/tile9]
    [tile10]
	image=tiles/forest.png
	tiles=id
	zorder=-3
    [/tile10]
    [tile11]
	image=tiles/forest.png
	tiles=ie
	zorder=-3
    [/tile11]
    [tile12]
	image=tiles/forest.png
	tiles=if
	zorder=-3
    [/tile12]

    [tile13]
	image=tiles/forest.png
	tiles=jc
	zorder=10
    [/tile13]
    [tile14]
	image=tiles/forest.png
	tiles=jd
	zorder=10
    [/tile14]
    [tile15]
	image=tiles/forest.png
	tiles=je
	zorder=10
    [/tile15]
    [tile16]
	image=tiles/forest.png
	tiles=jf
	zorder=10
    [/tile16]

    [tile17]
	image=tiles/forest.png
	tiles=kc
	zorder=10
    [/tile17]
    [tile18]
	image=tiles/forest.png
	tiles=kd
	zorder=10
    [/tile18]
    [tile19]
	image=tiles/forest.png
	tiles=ke
	zorder=10
    [/tile19]
    [tile20]
	image=tiles/forest.png
	tiles=kf
	zorder=10
    [/tile20]
[/multi_tile_pattern]



##branches sticking out from the trunk
[multi_tile_pattern]
	chance=100
	pattern="tnk, , 
			 tnk ->root, tnk ->branch, .* 
			 tnk, ,"
    [branch]
	image=tiles/forest.png
	tiles=ad
	passthrough=yes
    solid=yes
    [/branch]
    [root]
	image=tiles/forest.png
	tiles=ac
	passthrough=yes
    solid=yes
    [/root]
[/multi_tile_pattern]

##branches sticking out from the trunk
[multi_tile_pattern]
	chance=100
	pattern=",             , tnk
			 .*, tnk ->branch, tnk ->root 
			 ,             , tnk"
    [branch]
	image=tiles/forest.png
	tiles=aa
	passthrough=yes
    solid=yes
    [/branch]
    [root]
	image=tiles/forest.png
	tiles=ab
	passthrough=yes
    solid=yes
    [/root]
[/multi_tile_pattern]

##angled tree branch
[multi_tile_pattern]
	chance=100
	pattern=" ->emptyUp, tnk ->upper
			 tnk->lower,->emptyLow"
    [emptyUp]
	image=tiles/forest.png
	tiles=9e
	passthrough=yes
    solid=quarter_diagonal_lower
    [/emptyUp]
    [upper]
	image=tiles/forest.png
	tiles=9f
	passthrough=yes
    solid=quarter_diagonal_upper
    [/upper]
    [lower]
	image=tiles/forest.png
	tiles=ae
    [/lower]
    [emptyLow]
	image=tiles/forest.png
	tiles=af
    [/emptyLow]
[/multi_tile_pattern]


##tapered end of branch
[multi_tile_pattern]
	chance=100
	pattern=" ,   ->up_right ,    ->up_left
			  ,tnk->right    , tnk->left   
			  ,              ,               "

    [up_right]
	image=tiles/forest.png
	tiles=7a
    [/up_right]
    [up_left]
	image=tiles/forest.png
	tiles=7b
    [/up_left]

    [right]
	image=tiles/forest.png
	tiles=8a
	passthrough=yes
    solid=yes
    [/right]
    [left]
	image=tiles/forest.png
	tiles=8b
	passthrough=yes
    solid=yes
    [/left]
[/multi_tile_pattern]


##tapered end of branch
[multi_tile_pattern]
	chance=100
	pattern="   ->up_right ,    ->up_left,
			 tnk->right    , tnk->left   ,
			               ,             ,  "

    [up_right]
	image=tiles/forest.png
	tiles=7e
    [/up_right]
    [up_left]
	image=tiles/forest.png
	tiles=7f
    [/up_left]

    [right]
	image=tiles/forest.png
	tiles=8e
	passthrough=yes
    solid=yes
    [/right]
    [left]
	image=tiles/forest.png
	tiles=8f
	passthrough=yes
    solid=yes
    [/left]
[/multi_tile_pattern]


##straight tree branch
[multi_tile_pattern]
	chance=100
	pattern="   ->up_right ,    ->up_left
			 tnk->right    , tnk->left
			               , "
    [up_right]
	image=tiles/forest.png
	tiles=7c
    [/up_right]
    [up_left]
	image=tiles/forest.png
	tiles=7d
    [/up_left]

    [right]
	image=tiles/forest.png
	tiles=8c
	passthrough=yes
    solid=yes
    [/right]
    [left]
	image=tiles/forest.png
	tiles=8d
	passthrough=yes
    solid=yes
    [/left]
[/multi_tile_pattern]


##2tile-thick branch sticking out from trunk.
[multi_tile_pattern]
	chance=100
	pattern=".*, tnk    ,         ,
			 .*, tnk->ul, tnk->uc ,tnk->ur 
			 .*, tnk->ll, tnk->lc ,tnk->lr 
			 .*, tnk    ,         , "
    [ul]
	image=tiles/forest.png
	tiles=ea
	passthrough=yes
    solid=yes
    [/ul]
    [uc]
	image=tiles/forest.png
	tiles=eb
	passthrough=yes
    solid=yes
    [/uc]
    [ur]
	image=tiles/forest.png
	tiles=ec
 	passthrough=yes
    solid=yes
   [/ur]

    [ll]
	image=tiles/forest.png
	tiles=fa
    [/ll]
    [lc]
	image=tiles/forest.png
	tiles=fb
    [/lc]
    [lr]
	image=tiles/forest.png
	tiles=fc
    [/lr]
[/multi_tile_pattern]



##2tile-thick branch 
[multi_tile_pattern]
	chance=100
	pattern="   ,    ->ul,    ->ur ,
			 tnk, tnk->ml, tnk->mr ,tnk  
			 tnk, tnk->ll, tnk->lr ,tnk  
			    ,        ,         , "
    [ul]
	image=tiles/forest.png
	tiles=dd
    [/ul]
    [ur]
	image=tiles/forest.png
	tiles=de
    [/ur]

    [ml]
	image=tiles/forest.png
	tiles=ed
	passthrough=yes
    solid=yes
    [/ml]
    [mr]
	image=tiles/forest.png
	tiles=ee
 	passthrough=yes
    solid=yes
    [/mr]

    [ll]
	image=tiles/forest.png
	tiles=fd
    [/ll]
    [lr]
	image=tiles/forest.png
	tiles=fe
    [/lr]
[/multi_tile_pattern]


##2tile-thick branch tapering to 1tile-thick
[multi_tile_pattern]
	chance=100
	pattern="   ,    ->ul,    ->ur ,
			 tnk, tnk->ml, tnk->mr ,tnk  
			 tnk, tnk->ll,    ->lr ,     
			    ,        ,         , "
    [ul]
	image=tiles/forest.png
	tiles=ga
    [/ul]
    [ur]
	image=tiles/forest.png
	tiles=gb
    [/ur]

    [ml]
	image=tiles/forest.png
	tiles=ha
	passthrough=yes
    solid=yes
    [/ml]
    [mr]
	image=tiles/forest.png
	tiles=hb
 	passthrough=yes
    solid=yes
    [/mr]

    [ll]
	image=tiles/forest.png
	tiles=ia
    [/ll]
    [lr]
	image=tiles/forest.png
	tiles=ib
    [/lr]
[/multi_tile_pattern]



##2tile wide tree trunk.
[multi_tile_pattern]
	chance=100
	pattern=".*->tile1 , tnk->tile2, tnk->tile3,.*->tile4
			 .*->tile5 , tnk->tile6, tnk->tile7,.*->tile8"
    [tile1]
	image=tiles/forest.png
	tiles=lc
    [/tile1]
    [tile2]
	image=tiles/forest.png
	tiles=ld
    [/tile2]
    [tile3]
	image=tiles/forest.png
	tiles=le
    [/tile3]
    [tile4]
	image=tiles/forest.png
	tiles=lf
    [/tile4]

    [tile5]
	image=tiles/forest.png
	tiles=mc
    [/tile5]
    [tile6]
	image=tiles/forest.png
	tiles=md
    [/tile6]
    [tile7]
	image=tiles/forest.png
	tiles=me
    [/tile7]
    [tile8]
	image=tiles/forest.png
	tiles=mf
    [/tile8]

	[alternative]
		[tile1]
		image=tiles/forest.png
		tiles=nc
		[/tile1]
		[tile2]
		image=tiles/forest.png
		tiles=nd
		[/tile2]
		[tile3]
		image=tiles/forest.png
		tiles=ne
		[/tile3]
		[tile4]
		image=tiles/forest.png
		tiles=nf
		[/tile4]
	
		[tile5]
		image=tiles/forest.png
		tiles=oc
		[/tile5]
		[tile6]
		image=tiles/forest.png
		tiles=od
		[/tile6]
		[tile7]
		image=tiles/forest.png
		tiles=oe
		[/tile7]
		[tile8]
		image=tiles/forest.png
		tiles=of
		[/tile8]
	[/alternative]
	[alternative]
		[tile1]
		image=tiles/forest.png
		tiles=pc
		[/tile1]
		[tile2]
		image=tiles/forest.png
		tiles=pd
		[/tile2]
		[tile3]
		image=tiles/forest.png
		tiles=pe
		[/tile3]
		[tile4]
		image=tiles/forest.png
		tiles=pf
		[/tile4]
	
		[tile5]
		image=tiles/forest.png
		tiles=qc
		[/tile5]
		[tile6]
		image=tiles/forest.png
		tiles=qd
		[/tile6]
		[tile7]
		image=tiles/forest.png
		tiles=qe
		[/tile7]
		[tile8]
		image=tiles/forest.png
		tiles=qf
		[/tile8]
	[/alternative]

[/multi_tile_pattern]




##2tile wide tree trunk, left half
[multi_tile_pattern]
	chance=100
	pattern=".*->tile1 , tnk->tile2, tnk ,.* 
			 .*->tile5 , tnk->tile6, tnk ,.* "

    [tile1]
	image=tiles/forest.png
	tiles=lc
    [/tile1]
    [tile2]
	image=tiles/forest.png
	tiles=ld
    [/tile2]
    [tile5]
	image=tiles/forest.png
	tiles=mc
    [/tile5]
    [tile6]
	image=tiles/forest.png
	tiles=md
    [/tile6]
    
	[alternative]
		[tile1]
		image=tiles/forest.png
		tiles=nc
		[/tile1]
		[tile2]
		image=tiles/forest.png
		tiles=nd
		[/tile2]
		[tile5]
		image=tiles/forest.png
		tiles=oc
		[/tile5]
		[tile6]
		image=tiles/forest.png
		tiles=od
		[/tile6]
	[/alternative]
	[alternative]
		[tile1]
		image=tiles/forest.png
		tiles=pc
		[/tile1]
		[tile2]
		image=tiles/forest.png
		tiles=pd
		[/tile2]
		[tile5]
		image=tiles/forest.png
		tiles=qc
		[/tile5]
		[tile6]
		image=tiles/forest.png
		tiles=qd
		[/tile6]
	[/alternative]
[/multi_tile_pattern]


##2tile wide tree trunk.
[multi_tile_pattern]
	chance=100
	pattern=".*  , tnk , tnk->tile3,.*->tile4
			 .*  , tnk , tnk->tile7,.*->tile8"
    [tile3]
	image=tiles/forest.png
	tiles=le
    [/tile3]
    [tile4]
	image=tiles/forest.png
	tiles=lf
    [/tile4]
    [tile7]
	image=tiles/forest.png
	tiles=me
    [/tile7]
    [tile8]
	image=tiles/forest.png
	tiles=mf
    [/tile8]

	[alternative]
		[tile3]
		image=tiles/forest.png
		tiles=ne
		[/tile3]
		[tile4]
		image=tiles/forest.png
		tiles=nf
		[/tile4]
		[tile7]
		image=tiles/forest.png
		tiles=oe
		[/tile7]
		[tile8]
		image=tiles/forest.png
		tiles=of
		[/tile8]
	[/alternative]
	[alternative]
		[tile3]
		image=tiles/forest.png
		tiles=pe
		[/tile3]
		[tile4]
		image=tiles/forest.png
		tiles=pf
		[/tile4]
		[tile7]
		image=tiles/forest.png
		tiles=qe
		[/tile7]
		[tile8]
		image=tiles/forest.png
		tiles=qf
		[/tile8]
	[/alternative]

[/multi_tile_pattern]



## special random variations for leaves.

#solid
[tile_pattern]
image=tiles/forest.png
tiles="11|50|50|11"

pattern="
(lef)?,(lef),(lef)?,
(lef),(lef),(lef),
(lef)?,(lef),(lef)?"
[/tile_pattern]


[/tiles]
