mapeditor/tiled

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Automapping stops working when a project's rules.txt is modified during runtime. #3907

Phanterm posted onGitHub

Describe the bug My project will occasionally prevent me from using Automap. Restarting Tiled does not work, nor does closing or reopening maps. The only fix for this is going to Project Properties and pointing the Automapping rules to the same file and saving it. Then, automapping works again.

To Reproduce

Expected behavior I can apply Automapping by using Ctrl+M or going to Map->Automap.

Specifications:

  • OS: Win11
  • Tiled Version: 1.10.2

Does this only happen when you set the Automapping rules file via the Project properties? Does it ever happen when using rules.txt within the working map's directory instead?

And just to eliminate a different issue: Does your working map have a (possibly non-working or undesired) rules.txt in its directory? This should normally take precedence over the rules file set in the Project Properties. If this is what's getting in the way of your automapping working, then your "fix" actually reveals a potential bug in Tiled where the priority of the two files is incorrect.

posted by eishiya about 1 year ago

Does this only happen when you set the Automapping rules file via the Project properties? Does it ever happen when using rules.txt within the working map's directory instead?

To date, I have only ever used Automapping by setting the rules in this window, and not by having the rules.txt file share a folder with their respective maps.

And just to eliminate a different issue: Does your working map have a (possibly non-working or undesired) rules.txt in its directory? This should normally take precedence over the rules file set in the Project Properties.

In my entire project I only have the one rules.txt file, and it lives in its own folder, with the rules maps it points to being in another folder, i.e.

./data/rules.txt

then in the file itself, rulemaps/rules-wall.tmx rulemaps/rules-roof.tmx

posted by Phanterm about 1 year ago

Update: I thought I figured it out, but I can't seem to get this to reproduce reliably. It looked like whenever I made a change to rules.txt by adding a new .tmx map to it, the rules.txt needed to be re-set within the Project Settings, but I'm not certain.

posted by Phanterm about 1 year ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests