Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Phanterm opened this issue Mar 14, 2024 · 3 comments
Labels
bug Broken behavior.

Comments

@Phanterm
Copy link

Phanterm commented Mar 14, 2024

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
@Phanterm Phanterm added the bug Broken behavior. label Mar 14, 2024
@eishiya
Copy link
Contributor

eishiya commented Mar 14, 2024

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.

@Phanterm
Copy link
Author

Phanterm commented Mar 14, 2024

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

@Phanterm Phanterm changed the title Automapping stops working intermittently Automapping stops working when a project's rules.txt is modified during runtime. Mar 14, 2024
@Phanterm
Copy link
Author

Phanterm commented Mar 14, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken behavior.
Projects
None yet
Development

No branches or pull requests

2 participants