mapeditor / tiled

Flexible level editor
https://www.mapeditor.org/
Other
11.16k stars 1.76k forks source link

Automap not working anymore #3817

Open Sm0k3Official opened 1 year ago

Sm0k3Official commented 1 year ago

Describe the bug Automap is not working at all when opening / reopening the Tiled app.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior When I open the Tiled app, the Automap feature should work. Yesterday, when I opened the app and tried to use the Automap, it worked perfect (I added some design to my map, not my rules map). Today, with no changes to the rules map, it doesnt do anything when pressing the CTRL+M shortcut, neither when pressing the button from the Map section from the top.

Media If applicable, add screenshots or videos to help explain your problem.

Specifications:

Sm0k3Official commented 1 year ago

I observed that when you recreate the layers (regions, input_default, output_terrain) from scratch, the Automap it starts working again.

eishiya commented 1 year ago

Did you perhaps accidentally name your working map's layers something different this time? That seems to be a common cause of automapping "not working".

Unrelated, but you don't need "regions" layers in Tiled 1.9+. They exist only for backwards compatibility purposes, and bring back some unintuitive behaviour from older versions of automapping. In most cases, just your input and output layers are all you should need and you can just delete the "regions" layer. As of 1.9, regions are calculated automatically, and you have access to MatchType tiles that do many of the other functions of regions layers in a more intuitive way.

Sm0k3Official commented 1 year ago

I didn't name anything in my working map (neither the layers). When I started the project that I'm currently working, I've created 1 layer in my working map called "default" and in my rule map, I've created 2 layers called "input_default" and "output_terrain". Right now, while I was working on my "default" layer to extend with the tilesets (that I've created a few days) and worked perfectly the days before, right now after I've added some new desing to my terrain and wanted to use Automap, all my map is filled with just 1 type of block (filled with the "construction block" that I used to gave the map a robust design) and my rules aren't aplied anymore. All the changes that I've done today compared to yesterday (when it worked perfectly) is to extend the actual "default" layer from the working map by using that "construction block".

Am I doing something wrong ?

Sm0k3Official commented 1 year ago

I've removed the "regions" layer and still nothing. So, I started again to make the rule map. I've deleted all the layers from both maps and started recreating them again. The problem is that in future my map will get bigger and it will be a problem if I will need to redo it a few times in a while.

eishiya commented 1 year ago

When you say you "didn't name anything", do you mean you kept the layers as "Tile Layer 1", etc? I'm guessing not, since you said you called them "default", etc xP That's what I mean by renaming them. A common mistake is to have e.g. "input_default", but expect it to work on newly created layers that aren't called e.g. "default". It sounds like that's not the problem in your case though, since you said you named the layer "default".

I'm not sure I follow your text description, but it sounds like you're not doing anything wrong.

Do any of your maps (working map, rule map, etc) use embedded tilesets? Sometimes those can mess Automapping up in odd ways. It's best to only use external tilesets.

Also, just to clarify: do the rules not work any more even on the parts of the map unchanged from when the rules did work?

Sm0k3Official commented 1 year ago

I understand now what you were referencing to. Sorry for taking so much to understand it. I'm new in this 2D map design domain and I'm trying to keep up with the all the basics things :P

To answer your questions, I did not keep the layers as "Tile Layer 1", etc., but renamed them as "default" in the working map and "input_default" and "output_terrain" in the rules map. As for maps (working map, rules map), I've created the tilesets in Tiled app by importing the PNG files, resulting in .tsx files (maybe it helps in a way or other, the steps that I've taken in creating the tilesets).

I made some research in this area of embeded and external tilesets and it seems that I used external tilesets, not embeded tilesets.

eishiya commented 1 year ago

If you have separate TSX files, those are indeed external tilesets; embedded tilesets are ones stored inside the map file. So, I guess embedded problems aren't the problem here.

When this bug happens, could you check whether you have multiple tabs for the same tileset open in your Tilesets panel? My hunch is that this might be related to another bug where sometimes, the same tileset will end up being open twice in Tiled, and Tiled fails to recognise it as being the same tileset.

Sm0k3Official commented 1 year ago

Sure, I'll check for multiple tabs of the same tileset when this bug occurs. Now I'm hoping to get the bug to show up again so I can test it. xD