So I was taking another look at the Tiled plugin and think I found a potential bug. I think the " and \ characters both need to be escaped in Lua when not inside the double square brackets, and currently that is not robust. I want to change the multiple character handling to use the square brackets, for example:
Code: Select all
defineTile("\"\"", "GRASS", nil, nil, {random_filter={add_levels=5}})
...
return {
...
{[[$]],[[,]],[[,]],[[""]],[[""]],[[""]],[[""]],[[,]],[[,]],[[$]],},
{[[$]],[[$]],[[$]],[[$]],[[%]],[[$]],[[$]],[[$]],[[$]],[[$]],},}
The single character handling will be handled like this:
Code: Select all
defineTile("\"", "GRASS", nil, nil, {random_filter={add_levels=5}})
...
return [[
...
$,,"""",,$
$$$$&$$$$$]]
Does that seem ok?