Duplicate store names using same block

Locked
User avatar
pango
Posts: 3359
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Duplicate store names using same block

Post by pango »

Got a temple quest to get some ingredients for free from the Arkcart Apothecary in Arkcart, Tulune.
To my surprise the town has two, not far from each other...
arkcart apothecary (dfu).jpg
arkcart apothecary (dfu).jpg (251.34 KiB) Viewed 1514 times
According to Daggerfall classic, the right one is the right one.
arkcart apothecary.jpg
arkcart apothecary.jpg (101.33 KiB) Viewed 1514 times
Attachments
SAVE563.zip
(452.3 KiB) Downloaded 89 times
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

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

Re: Arkcart Apothecary or Arkcart Apothecary?

Post by Hazelnut »

Could you remove your discovery data for this location and see if that fixes it? (unless this is definitely the first visit with this save)
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
pango
Posts: 3359
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Arkcart Apothecary or Arkcart Apothecary?

Post by pango »

First time in Arkcart; If I remove Arkcart entry from DiscoveryData, next time I identify the buildings they're both Arkcart Apothecary again.
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Re: Arkcart Apothecary or Arkcart Apothecary?

Post by BadLuckBurt »

I had a quick look, both RMB blocks are ALCHAL03 and when I use 'dumpbuilding' inside both apothecaries, it's the same building again.

The NPCs have different names so that bug was fixed but it seems the buildings still end up with the same NameSeed, that's where the issue comes from.
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

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

Re: Arkcart Apothecary or Arkcart Apothecary?

Post by Hazelnut »

They should be using the location building data to get different names... will need to look and see what is broken here.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Re: Arkcart Apothecary or Arkcart Apothecary?

Post by BadLuckBurt »

Hazelnut wrote: Sun Feb 16, 2020 7:39 pm They should be using the location building data to get different names... will need to look and see what is broken here.
I went and had a look in classic Daggerfall, they have different names there:

Image

If I had to take a wild guess, RMB caching?
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

User avatar
pango
Posts: 3359
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Arkcart Apothecary or Arkcart Apothecary?

Post by pango »

I think this should be moved to bug reports, as "town blocks using the same model get aliased" or something
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

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

Re: Arkcart Apothecary or Arkcart Apothecary?

Post by Hazelnut »

Yes, forgot all about this one. I'll try and investigate when I get the chance,
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: Duplicate store names using same block

Post by Hazelnut »

Right so I've looked into this one and there's good news and bad news. Good news is that the building pool matching code is working fine still since fixing it after the world data system was added. Unfortunately, the structs that are used to hold the data are being treated as pure value types but they contain arrays which are referenced. What is happening here is because the array of building data from the block is being modified with the building data from the location, it's using the same array because both copies of the block struct reference the same array object. So processing the second ALCHAL03 block ends up overwriting the first when it comes to the building array.

Now I just need to figure out where to replace the building array with a copy before it's updated with the building data and that should fix this bug. I do wish Visual Studio would show the memory addresses of variables - that would have made this a lot easier to track down!
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Locked