Is there a bug with Automapping or did something change? Video inside


(James) #1

I’ve been using automapping for years now, but recently created a new tileset and can’t get anything with automapping to work with it.

Has something been inherently changed, or might there be a bug?

Here is a video of me making a new map, new rule, and trying to test it (and nothing happens).

The only major thing that seems to have changed since I created the automap rules for my last tileset is that the tilesets can now be saved as the .tsx files. For my video, I created a test_automap.tmx, and then re-saved the same one as my rule1.tmx so they should be looking at the same tileset (is that correct?).

Thanks for any help!!!

EDIT: I’m using the newest version 1.1.5. I learned how to make the automap rules back before version 1.0.0, so maaaybe something has changed? I scanned through this again and everything looked the same: http://docs.mapeditor.org/en/latest/manual/automapping/. I’ve been using “regions” and not “RuleRegion”, so must have been using 0.9 or later.

EDIT 2: If I fill in the rest of the Grass layer with another tile (paint bucket), the rule starts working. See video: https://youtu.be/p-Xp9c02uko

Why is that?

Looking at the “basic shoreline” in the automap documentation, the first example has an empty tile in the input_Ground layer.


(Thorbjørn Lindeijer) #2

Since your “regions” layer makes the “input_Grass” layer of your rule span over some empty tiles, those are effectively matched as “any tile that is not [empty, grass corner]” (that list is made up of all the tiles used in the input region).

There’s two ways to change this behavior, maybe it will help you:

  • You can define the in and out regions separately, and reduce the input to avoid this requirement on the input layer.

  • You can set a “StrictEmpty” boolean property to true on the “input_Grass” layer, in which case those empty tiles will require the input layer to be really empty there (option added in Tiled 1.1).

Note that if you’re going to add any meta-info to your tileset (and actually even when you don’t), I’d recommend not embedding the tileset in the map but saving it as a separate .tsx file. That way Tiled will only load the tileset definition once and will not need to do deep comparisons to determine whether a tileset definition embedded in the map and a tileset definition embedded in the rules map can be considered the same.


(James) #3

Bjorn, thanks a lot for the response! Your suggestion worked perfectly, I really appreciate it.