terrain mask not working
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
terrain mask not working
I don't get why my terrain mask replaces anything. I thought using a [rule] with old=list of terrain is supposed to stop it from replacing everything. Well here's my code of it, maybe someone can tell me what I did wrong:
ps: don't worry about the calculation of x and y. That works. It's just replacing stuff it shouldn't.
EDIT: found my mistake myself. Just for those wondering how: I needed to add a second rule like this:
Code: Select all
[terrain_mask]
x,y=$($i-1),$(if($i%2=0,$j-1,$j-2))
mask="border_size=0
usage=mask
_f, Gd^Fts, _f
Gd^Fts, _f, Gd^Fts
Gd^Fts, Gd^Fts, Gd^Fts"
[rule]
old=Gg,Gs,Gd,Gll,Ss,Hh,Hhd,Hd
new=Gd^Fts
[/rule]
[/terrain_mask]
EDIT: found my mistake myself. Just for those wondering how: I needed to add a second rule like this:
Code: Select all
[rule]
use_old=yes
[/rule]