terrain mask not working

The place to post your WML questions and answers.

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.
Post Reply
white
Posts: 33
Joined: December 8th, 2012, 7:20 pm

terrain mask not working

Post by white »

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:

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]
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

[rule]
    use_old=yes
[/rule]
Post Reply