Bug since mid aug - existing letters of credit are treated like soul gems [RESOLVED]

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

Bug since mid aug - existing letters of credit are treated like soul gems [RESOLVED]

Post by Hazelnut »

This is because of Allofich uncommenting the Ruby = 0 entry in the MiscItems enum which shifts the position of the enums for saving groupIndex.

New LoC work fine, but any older ones are broken and simply have to be discarded, or edited in the save file changing groupIndex from 2 to 3.

Just wanted to:

1) Let players know that this would explain what happened to older saved LoC.

2) Ask other devs if we want to switch back or continue with the new index for LoC...? I don't really understand why it was changed, so I have no idea. It may explain a few of the banking bugs that we could not reproduce. Before it was a dummy entry like this:

Code: Select all

UNKNOWN_MISC_ITEM, // modified order to ensure Potion_recipe is index 4 -IC112016
If we change it back then new LoC will become useless so I'm unsure how to proceed.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

R.D.
Posts: 379
Joined: Fri Oct 07, 2016 10:41 am

Re: Bug since mid aug - existing letters of credit are treated like soul gems

Post by R.D. »

While I was working on a fix to allow books from classic saves to be correctly imported I changed all the discrepancies I noticed between Daggerfall Unity's item enums and those in classic to match classic.

Personally, for me, editing the save file seems fine as a solution for anyone who wants to salvage an old save. We're pre-alpha after all.

I don't understand, though, why replacing UNKNOWN_MISC_ITEM with Ruby (which is what it technically is in classic data, although I doubt anything uses it) would shift the enums, though. Seems like Letter_of_Credit would be index 2 before and after the change.

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

Re: Bug since mid aug - existing letters of credit are treated like soul gems

Post by Hazelnut »

Yeah that puzzled me for a while, but it's because the Ruby entry is defined as value 0. (i.e. Ruby = 0)

This means it comes before LoC entry in the mapping of int values to enum, pushing it to #3 instead of #2.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

R.D.
Posts: 379
Joined: Fri Oct 07, 2016 10:41 am

Re: Bug since mid aug - existing letters of credit are treated like soul gems [TRANSIENT ALPHA ISSUE]

Post by R.D. »

Yeah that puzzled me for a while, but it's because the Ruby entry is defined as value 0. (i.e. Ruby = 0)

This means it comes before LoC entry in the mapping of int values to enum, pushing it to #3 instead of #2.


Well that's not good. That means that LoCs aren't imported correctly from classic, either. (Just checked, and indeed they being treated like Soul Traps)

So even though the entry there in classic is 00, why don't we use 276 or 277 there. New saves' LoCs will be instead be the ones that have to be manually fixed. Sorry, I didn't realize the enum order would change.

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

Re: Bug since mid aug - existing letters of credit are treated like soul gems [TRANSIENT ALPHA ISSUE]

Post by Hazelnut »

That's what the dummy entry IC put in did - it got allocated next int in sequence. I don't care what it's called but I think the UNKNOWN_MISC_ITEM was more obvious than a duplicate Ruby entry. However you want to fix this is fine by me though since you understand the classic side. :)

Moving back to bugs since this affects imports.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

R.D.
Posts: 379
Joined: Fri Oct 07, 2016 10:41 am

Re: Bug since mid aug - existing letters of credit are treated like soul gems

Post by R.D. »

Yeah I'll fix it, and just call it "Unused" or something.

R.D.
Posts: 379
Joined: Fri Oct 07, 2016 10:41 am

Re: Bug since mid aug - existing letters of credit are treated like soul gems

Post by R.D. »

Resolved now. To fix newer saves with letters of credit they will need to be manually fixed.

Locked