[Bug] `#config automapper true` turns on mapper Record mode; in Genie 4 it only enabled the mapper (compatibility regression, breaks travel scripts)
Maintainers usually reply within 5 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start at GenieConfig.AutoMapper and MapperViewModel.SyncAutoMapperFromConfig, which copy the #config automapper value into the engine's Record state. Separate the two: #config automapper should only enable or disable the mapper, while Record stays under the toolbar button and #mapper record. Also turn Record off when a zone loads, and check that #mapper reset and #goto behave as the Genie 4 reference describes. Done when a script that runs put #config automapper true leaves Record off and #mapper reset switches zones.
Written by the indexing model from the issue text.
Description
What happened
Community scripts written for Genie 4 run #config automapper true at startup. uber.cmd does this in its "set proper Genie flags" block:
put #config automapper true
put #config automapperscript true
In Genie 4 that line just made sure the mapper was enabled (File ▸ AutoMapper Enabled). In Genie 5 it turns on Record mode, so the mapper starts editing the loaded zone in memory while the script walks.
Once Record mode has made changes the user never saved, the mapper can't recover. #mapper reset refuses to reload the zone:
[mapper] Record mode is on and the zone has unsaved changes — not reloaded. #mapper save, then #mapper load to reload from disk.
[mapper] Re-resolving current room…
In my case the character travelled from Hawstkaal Road (zone 126) into Boar Clan (zone 127), but the mapper stayed on the edited Hawstkaal Road zone. It matched [Boar Clan, Split-Log Path] to zone 126's room 24 (Hawstkaal Road, Through the Forest), so $roomid was 24 in the wrong zone. Then #goto 644 (a room in Map127_Boar_Clan) returned DESTINATION NOT FOUND. The script retried every few minutes and never got to its hunting area.
What you expected
#config automapper should do what it did in Genie 4. Scripts and settings imported from Genie 4 rely on it, and full backwards compatibility is expected.
Genie 4 behaviour (source at f41a5a8):
automapperis the master on/off switch for the mapper, defaulttrue(Lists/Config.cs:38,public bool bAutoMapper = true;). It is the File ▸ AutoMapper Enabled menu item (Forms/FormMain.cs,AutoMapperEnabledToolStripMenuItem_Click). When it is on, game text, input and variable changes are passed to the mapper, which tracks the current room. When it is off, none of that happens, and#mapper/#gotoreply "Mapper is currently disabled. Turn it back on in menu under [File/AutoMapper Enabled]" (FormMain.cs,ParsePluginText,Command_EventMapperCommand).- Record is a separate toggle: the Record button on the map window, or
#mapper record true|false(Mapper/AutoMapper.cs,case "record":). It is off by default. - Genie 4 turns Record off whenever a map is loaded (
Mapper/MapForm.cs, when a zone loads:ToolStripButtonRecord.Checked = false; // Turn off record. (Needs to be manually turned on when we are in a room on the map, or a clear map)). So a zone change never carries Record mode into the next map.
So in Genie 4, #config automapper true never started recording. A script could run it on every launch with no risk to the maps.
Genie 5 behaviour: GenieConfig.AutoMapper is documented as "record mode", and MapperViewModel.SyncAutoMapperFromConfig copies it into the engine's Record state. #274 wired #config automapper to Record mode on the assumption that automapper was the "auto-map as you walk" toggle, but in Genie 4 it never was. The session-only handling added since then (never persisted, so every launch starts with Record off) doesn't help, because the scripts set it again each time they start.
Suggested fix
#config automapper(and Configuration ▸ Mapper / AutoMapper Settings ▸ Enable) means "mapper enabled" as in Genie 4: room tracking,#gotoand#mapperon or off. Defaulttrue. It does not change Record mode.- Record mode is controlled only by the Record toolbar button, the Maps menu and
#mapper record on|off. Off by default and not persisted, as now. - Turn Record off when a zone loads, as Genie 4 does, so that if it's left on it can't carry edits from one map into the next.
- When Record mode is on with unsaved changes,
#mapper resetrefuses to reload. Consider making that refusal more visible, for example an echo that names the zone and the number of unsaved changes, since it silently leaves a running script stuck on the wrong map.
Steps to reproduce
- Run any script that does
put #config automapper true. - Walk or
#gotosomewhere that crosses into another zone, or where the room text doesn't exactly match the map, so that Record mode records an edit. - Run
#mapper reset. Genie replies "Record mode is on and the zone has unsaved changes — not reloaded", and the mapper stays on the old zone with a wrong$roomid. #gototo a room in the zone you're actually in returnsDESTINATION NOT FOUND.
Genie 4 with the same script: Record stays off, the mapper switches zones, and #goto works.
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
Logs / session capture
See the excerpts above. The script started with:
* Travel Script v5.6.2
* Start: Hawstkaal Road (MAP:126 | ROOM:102)
* Destination: BOAR
[mapper] Record mode is on and the zone has unsaved changes — not reloaded. #mapper save, then #mapper load to reload from disk.
[mapper] Re-resolving current room…
Anything else
Workaround: comment out put #config automapper true in the script. Room tracking and #goto work without it in Genie 5. If the mapper is already stuck: #config automapper false, #mapper load (discard, don't save), #mapper reset.
Related: #274 (wired #config automapper to Record mode), #391 (surfacing room-mismatch details), #398 (another automapper issue during fast 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