[0.11.0] Travel Map: Location names don't take WorldData overrides into account [RESOLVED 0.11.2]

User avatar
XJDHDR
Posts: 177
Joined: Thu Jan 10, 2019 5:15 pm
Location: New Zealand
Contact:

[0.11.0] Travel Map: Location names don't take WorldData overrides into account [RESOLVED 0.11.2]

Post by XJDHDR »

I was recently fixing a glitch I found for my mod where "The Crypts of Rhajom" in the Alik'r Desert was named "THe Crypts of Rhajom". I corrected the incorrect capitalisation of the H and loaded my fixed location file into the game. I found that the game's travel map doesn't take the fixed WorldData override into account whereas the other places I saw the name did use the fixed name:
Rhajom - Travel map.jpg
Rhajom - Travel map.jpg (73.34 KiB) Viewed 411 times
Rhajom - Correct.jpg
Rhajom - Correct.jpg (80.1 KiB) Viewed 411 times
Here is the WorldData override I'm using:
location-0-16.zip
(791 Bytes) Downloaded 19 times

User avatar
Hazelnut
Posts: 2698
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: [0.11.0] Travel Map: Location names don't take WorldData overrides into account

Post by Hazelnut »

Did the quest start after you added this change, because quests are saved after parsing including all the data - possibly that's what's happening? This feature I added uses the location name from the quests' place site details data.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
XJDHDR
Posts: 177
Joined: Thu Jan 10, 2019 5:15 pm
Location: New Zealand
Contact:

Re: [0.11.0] Travel Map: Location names don't take WorldData overrides into account

Post by XJDHDR »

I don't have a quest active for that location. I just opened the regular travel map and clicked on the crypt's pixel.

User avatar
Hazelnut
Posts: 2698
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: [0.11.0] Travel Map: Location names don't take WorldData overrides into account

Post by Hazelnut »

Well it's probably cached in discovery data then? Maybe search the savefile you're loading for the bad text and see where you find it?
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
XJDHDR
Posts: 177
Joined: Thu Jan 10, 2019 5:15 pm
Location: New Zealand
Contact:

Re: [0.11.0] Travel Map: Location names don't take WorldData overrides into account

Post by XJDHDR »

I just re-tested with a character that has never visited any location other than Privateer's Hold and the problem was still there. I think it's safe to say that this isn't discovery data related.

User avatar
Interkarma
Posts: 6285
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.11.0] Travel Map: Location names don't take WorldData overrides into account

Post by Interkarma »

Travel map is one of the oldest UIs, it predates a lot of the abstractions we put in later. It might be pulling name data direct from MAPS.BSA. Would need a quick to review to be sure.

I'm not so familiar with world data overrides though, so possible I'm missing something else in the mix too.

User avatar
XJDHDR
Posts: 177
Joined: Thu Jan 10, 2019 5:15 pm
Location: New Zealand
Contact:

Re: [0.11.0] Travel Map: Location names don't take WorldData overrides into account

Post by XJDHDR »

That's what I suspect as well.

I've also found that location names don't appear to be the only problem. I just found that "The Crypts of Rlertim" in Dragontail Mountains has it's discovery flag set to True. I tried changing the flag to False and yet, the dungeon is still revealed on my character's map even though he has never visited the place and there are no entries in the DiscoveryData file.
This seems to show that the Discovered flag in a WorldData override is also being ignored by the travel map (and maybe everything else in the MapTable).

User avatar
Interkarma
Posts: 6285
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.11.0] Travel Map: Location names don't take WorldData overrides into account

Post by Interkarma »

Most small crypts and graveyards are always visible from start of game, they don't need player to discover them. All discovery is handled through PlayerGPS methods. The world data from MAPS.BSA, such as MapTable, have no bearing on player discovery.

User avatar
Interkarma
Posts: 6285
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.11.0] Travel Map: Location names don't take WorldData overrides into account

Post by Interkarma »

There are three places in DaggerfallTravelMapWindow using the following code to get name, including "do you wish to travel to" prompt. This will be pulling from cached MapNames read direct from MAPS.BSA and predates even macro handling being in the game.

Code: Select all

currentDFRegion.MapNames[locationSummary.MapIndex]
I'm not overly familiar with world data overrides. What's the correct way to read name from replacement data using its arbitrary index? I note the "do you wish to access your wagon" prompt uses %cn, which is the current location name. But on the travel map, we need to resolve %tcn, which can be an arbitrary location anywhere on the map.

User avatar
XJDHDR
Posts: 177
Joined: Thu Jan 10, 2019 5:15 pm
Location: New Zealand
Contact:

Re: [0.11.0] Travel Map: Location names don't take WorldData overrides into account

Post by XJDHDR »

Interkarma wrote: Sun Jan 31, 2021 11:53 pm I'm not overly familiar with world data overrides. What's the correct way to read name from replacement data using its arbitrary index? I note the "do you wish to access your wagon" prompt uses %cn, which is the current location name. But on the travel map, we need to resolve %tcn, which can be an arbitrary location anywhere on the map.
I'm not the best person to ask as I'm still new to DFU's codebase and C#. That said, I see that the WorldDataReplacement script has the functions GetDFRegionAdditionalLocationData() and GetDFLocationReplacementData() which look like they might give you what you need.

Locked