# Automapping rules never apply

**URL:** <https://discourse.mapeditor.org/t/automapping-rules-never-apply/7278>\
**Category:** Questions\
**Created:** [February 11, 2025, 5:17am UTC](https://discourse.mapeditor.org/t/automapping-rules-never-apply/7278 "2025-02-11T05:17:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KaileyStardew](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@KaileyStardew](https://discourse.mapeditor.org/u/KaileyStardew)\
**Post date:** [February 11, 2025, 5:17am UTC](https://discourse.mapeditor.org/t/automapping-rules-never-apply/7278/1 "2025-02-11T05:17:36Z")

</div>

Hello,

I am attempting to update an old automapping rule from pre-1.4. I could not get anything to happen upon hitting AutoMap both before and after following the migration guide (the rule did work previously), so I decided to start from scratch:

All in the same folder, I have:  
`FoliageRules.tmx` (the rules file)  
`Test.tmx` (the file I’m trying to automap in)  
`rules.txt`

`rules.txt` contains only the text `FoliageRules.tmx`, as everything is in the same directory.

`FoliageRules.tmx` has only the layers “input\_AlwaysFront” and “output\_AlwaysFront”.  
`Test.tmx` has multiple layers, one of which is “AlwaysFront”.

As a simple test, I put an arbitrary red tile on input\_AlwaysFront and an arbitrary green tile in the same place on output\_AlwaysFront. I saved everything, popped the red tile on AlwaysFront in `test.tmx`, and… nothing. No errors, just a silent failure and a persistently red tile. Toggling Automap While Drawing/hitting CTRL+M does nothing. I’ve redone this from scratch three times, scrapped it and made the exact example from the docs to the letter, and then redone it again. No attempt has ever done anything.

The docs say to either add the rules via Project \> Project Properties or have `rules.txt` in the same directory as the map. `rules.txt` is in the same directory as the map.

I have tried:

- Making my input a different layer than output
- Deleting every layer on `test.tmx` except for AlwaysFront
- Toggling every single automapping map property on and off
- Moving `FoliageRules.tmx` to a subfolder (and updating `rules.txt` with its new directory)
- Giving the `rules.txt` the full directory (eg C:.…) of `FoliageRules.tmx`
- Renaming my input/output layers to input1\_AlwaysFront/output1\_AlwaysFront
- Deleting everything and starting completely from scratch
- Fully uninstalling and reinstalling Tiled

Can the rules file not actually just be in the same folder as the map? Is having a map be a part of a Project mandatory for automapping now? I am completely and utterly stuck, and with the failure completely silent there is nothing for me to go on to troubleshoot. I’m running Tiled 1.11.2 on Windows 10 (64bit), and I have reinstalled it fresh in the last hour.

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [February 11, 2025, 9:01am UTC](https://discourse.mapeditor.org/t/automapping-rules-never-apply/7278/2 "2025-02-11T09:01:51Z")

</div>

> [@KaileyStardew](#):
>
> Can the rules file not actually just be in the same folder as the map?

It’s fine for the rules to be in the same folder as the map.

> [@KaileyStardew](#):
>
> Is having a map be a part of a Project mandatory for automapping now?

No, it should work fine without a project as well.

Based on the information given, I’m not sure what the problem could be. The only thing you said nothing about seems to be the tileset you’re using.

Are you using an external or an embedded tileset? If embedded, it’s more difficult for Automapping to determine whether the tilesets in different maps should be considered the same. If the tileset is embedded in one map but external in another, they’re never seen as the same tileset. In general, it’s recommended to always use an external tileset, since it’s easier to make sure multiple maps use the same one.

Since you’re setting up a test folder anyway, consider also sharing this folder (maybe you can attach an archive to your post) so others can check what’s going on.

---

<div class="post-metadata">

**Author:** ![KaileyStardew](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@KaileyStardew](https://discourse.mapeditor.org/u/KaileyStardew)\
**Post date:** [February 11, 2025, 3:09pm UTC](https://discourse.mapeditor.org/t/automapping-rules-never-apply/7278/3 "2025-02-11T15:09:09Z")

</div>

You were right that it was an issue with the embedded tilesets, although I’m unable to recreate the issue now.

`Test.tmx` and `FoliageRules.tmx` both had `spring_outdoorsTileSheet.png` embedded (in the same folder as the maps), with the tileset named `outdoors` on both of them. Renaming it to `spring_outdoorsTileSheet` on both made the rules start working.

I attempted to rename one back to `outdoors` to recreate the issue, but the rule kept working no matter what the tileset name was on either map (I didn’t reselect the image when I did this, just changed the name). I re-did the setup from last night, and now it works right off the bat.

I’m incredibly confused, and I’ll come back with a detailed setup & affected files if I can ever get this to happen again. In the meantime for anyone with the same issue: try renaming the tileset in both files to the same thing, even if the names already matched.

Thank you for pointing me in the right direction!

---

<div class="post-metadata">

**Author:** ![Roman](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@Roman](https://discourse.mapeditor.org/u/Roman)\
**Post date:** [February 13, 2025, 2:32pm UTC](https://discourse.mapeditor.org/t/automapping-rules-never-apply/7278/4 "2025-02-13T14:32:12Z")

</div>

Hai, just a little note that tileset path names in .tmx files are case sensitive - I’ve had my share of frustration on that one with automapping
