[Bug] Mapper compares a room only with its first stored description, then falls back to "any shared exit": rooms with day/night descriptions resolve to the wrong room (Genie 4 regression)
Maintainers usually reply within 5 days
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 28/100
Research direction
Start in src/Genie.Core/Mapper/AutoMapperEngine.cs at the tier (c) description match (around L877-L890), the tier (e) description tiebreaker (L911-L929) and the tier (f) title plus exit-overlap fallback (L931-L965), and in MapNode.cs where Description returns Descriptions[0]. Reproduce with a mapper unit test that uses a room stored with two descriptions, night first, and check that a day-text lookup resolves to the right room. Done means both description checks accept any stored variant and the fallback no longer picks the first title match on a shared exit alone.
Written by the indexing model from the issue text.
Description
What happened
On Himineldar Shel's ice road (Map123), where every room is called Himineldar Shel, Mountain Road, the mapper placed the character in the wrong room. Then:
- the route sent exits that don't exist ("You can't go there");
- automapper.cmd decided the character had left the ice and took the ice skates off halfway along the ice road;
- the character kept slipping and falling;
- travel.cmd restarted 5 times, always from the wrong room (
MAP: 123 | ROOM: 22,28or29), while the character was actually in rooms 50–52.
I checked each room the character entered against Map123_Himineldar_Shel.xml:
- It was daytime throughout. Rooms 22, 23, 37, 43 and 45–52 each store two
<description>elements, the night text first and the day text second. For example, room 51 stores"Nightfall covers the region…"then"Majestic snowcapped peaks…". Every visit showed description 2 of 2, and the game text matched the stored text exactly. - The first pass worked, because while a route is being walked the mapper follows the arc from the previous room (tier b), so descriptions aren't needed.
- It broke when the mapper had to identify the room from scratch in the middle of the road. The character was in room 47 (exits east and northwest) with
ice eastnext, and a fresh#gotorestarted automapper.cmd ([script] automapper reloaded). From then on, every recovery (#mapper reset,look, restarting the route) identified the room the same wrong way, so it never recovered.
Why (source at 4a6de10)
-
Only the first description is compared.
MapNode.DescriptionreturnsDescriptions[0](MapNode.cs#L8-L16). Both description checks inAutoMapperEngineuse it:- tier (c), "Disambiguation 2: description match", L877–L890;
- tier (e), "Description tiebreaker", L911–L929.
Genie4MapImporterreads every variant intoDescriptions, and theMapNodecomments say that preserving them matters, but matching never looks past the first. So a room whose current text is any variant other than the first can't be matched by description. With night-first maps like this one that's every multi-description room during the day; with day-first maps it would be every one at night. -
The fallback is too loose. Tier (f), "Title + exit-set OVERLAP" (L931–L965), takes the first room with the same title that shares any one exit with the live
Obvious paths. On a road of 40 rooms with the same name, that's nearly always the wrong one. Room 47 (east and northwest) resolved to room 22 (southeast and northwest) because both have northwest, and room 22 comes first.
What you expected
Match rooms the way Genie 4 did. Node.Compare (Mapper/NodeList.cs at f41a5a8, L807) requires:
- the same name;
- the same number of compass exits, with every compass exit present (
ContainsArc); - the room text to match any of the node's descriptions (
Descriptions.Contains(n.Descriptions)).
Suggested fix:
- In tiers (c) and (e), compare against every entry in
candidate.Descriptions, not justDescription/Descriptions[0]. - Make tier (f) stricter: require the same compass exit set (as Genie 4 did), or at least prefer an exact match over a partial one. When several candidates still qualify, treat it as ambiguous (report that the room is unknown or ambiguous, #391) rather than picking the first. A confident wrong room is worse than "unknown": scripts act on it (here, by taking the skates off).
Steps to reproduce
- During the day in game, start in Himineldar Shel past room 46 (the ice section of
Mountain Road). Wear skates or not; the wrong match happens either way. - Run
#mapper reset, or start a#goto(for example to Shard) from a room such as 47, 50 or 51. $roomidresolves to an earlierMountain Roadroom (for example 22) that shares one exit, and the route's first move fails with "You can't go there."- At night the same steps work, because the night text is stored first.
Environment
- OS + version: Ubuntu 24.04 arm64 (Oracle Cloud Ampere A1), GNOME on Xorg via xrdp
- Genie 5 version: 5.0.0-beta.9.10.1 +
4a6de10 - Install type: built from source (
dotnet publish -c Release -r linux-arm64) - .NET version (source builds only): 10.0.403
- Connection mode: Direct SGE
- Map:
Map123_Himineldar_Shel.xmlfrom the Genie Maps repository
Logs / session capture
The route restart in room 47 (exits east and northwest; the correct next move is ice east):
Obvious paths: east, northwest.
Next move: ice east
...
[script] automapper reloaded (previous instance stopped)
[script] automapper started (.../Scripts/automapper.cmd)
southeast <- route from room 22, not 47
<< MOVE FAILED - Type: REAL | Movement: east | Depth: 2
You can't go there.
...
<< Removing ice skates! >> <- mapper now thinks we're off the ice
remove my skates
Later, travel.cmd restarting repeatedly from the wrong room:
* STARTING AREA:
* [Himineldar Shel, Mountain Road]
* MAP: 123 | ROOM: 22 <- actually room 51
...
At the speed you are traveling, you are going to slip and fall sooner or later.
Your excessive speed causes you to lose your footing.
You end up falling down.
Some ice has hurt your chest in the fall.
Anything else
This was worked out from the session log and the map file, not from #config mapperdebug output. A mapperdebug trace showing the e: / f:title+exit-overlap tiers firing would confirm it, if a maintainer wants one.
Related: #391 (surface room-mismatch details), #398 and #401 (other automapper issues found during the same travel).
- Dominant language
- C#
- Stars
- 2
- Forks
- 5
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 22
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GenieClient/Genie5
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
GenieClient/Genie5#496 ·
Maintainers usually reply within 5 days
-
enhancement g4-regression
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
GenieClient/Genie5#494 ·
Maintainers usually reply within 5 days
-
area:ui-dock enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
GenieClient/Genie5#462 ·
Maintainers usually reply within 5 days
-
area:mapper bug est:<1d P2
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
GenieClient/Genie5#449 · 1 comment ·
Maintainers usually reply within 5 days
-
[Bug] Maps ▸ Update from Official Repo / Repair Maps give no notification of success or failurePossibly taken A pull request linked to this issue is open or already merged. Openarea:mapper area:updater bug est:<1d P3
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
GenieClient/Genie5#423 · 1 assignee ·
Maintainers usually reply within 5 days
All issues in GenieClient/Genie5
Similar issues
-
documentation good first issue kind:task level:starter size:s
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Arggon/ArggonStores#66 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
[Tool] MockAPIOpenhas-image has-license has-readme new-tool ready-to-approve repo-verified
Difficulty 1/5 Under an hour Newbie friendliness 72/100
shanselman/TinyToolTown#956 ·
Maintainers usually reply within 2 days
-
bug frontend
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
[Bug]: Native build script prints a traceback when Git is missing from PATHPossibly taken @Jaisuryan-web claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
KnifeLemon/Filee#1953 ·
Maintainers usually reply within 1 day