Item flags & artifact identification

Discuss coding questions, pull requests, and implementation details.
User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Item flags & artifact identification

Post by Hazelnut »

While doing some item naming code, including identified/unidentified magic items, I found that artifacts are not yet detected correctly. (unless I missed something)

Decided to do a little investigation so got a save with all artifacts (but Oghma) and wrote the flags word in binary. I know (pretty sure) that flag at bit position 6 (i.e. 0000 0000 0010 0000) indicates whether an item has been identified. All the artifacts from this save have this flag set, except for 3. So I identified them at mages guild and reimported the save. The flags changed to what I've put after "id =" below. Also did lords mail as a control which remained unchanged.

Code: Select all

    public enum ArtifactsSubTypes                   // Mapped to artifact definitions in MAGIC.DEF
    {
        Masque_of_Clavicus = 0, // 0000 1000 0010 0000
        Mehrunes_Razor = 1,     // 0000 1000 0010 0100
        Mace_of_Molag_Bal = 2,  // 0000 1000 0011 0100
        Hircine_Ring = 3,       // 0000 1000 0010 0000
        Sanguine_Rose = 4,      // 0000 1000 0010 0001
        Oghma_Infinium = 5,
        Wabbajack = 6,          // 0110 0100 0000 0000 id = 0000 1000 0011 0000
        Ring_of_Namira = 7,     // 0000 1000 0010 0000
        Skull_of_Corruption = 8,// 0000 1000 0010 0000
        Azuras_Star = 9,        // 0000 1000 0010 0000
        Volendrung = 10,        // 0000 1000 0011 0000
        Warlocks_Ring = 11,     // 0000 1000 0010 0000
        Auriels_Bow = 12,       // 0110 0100 0000 0000 id = 0000 1000 0010 0000
        Necromancers_Amulet = 13,//0000 1000 0010 0000
        Chrysamere = 14,        // 0000 1000 0010 0000
        Lords_Mail = 15,        // 0000 1000 0010 0000 id = 0000 1000 0010 0000
        Staff_of_Magnus = 16,   // 0000 1000 0011 0000
        Ring_of_Khajiit = 17,   // 0000 1000 0010 0000
        Ebony_Mail = 18,        // 0000 1000 0010 0000
        Auriels_Shield = 19,    // 0110 1110 0000 0000 id = 0000 1000 0010 0000
        Spell_Breaker = 20,     // 0000 1000 0010 0000
        Skeleton_Key = 21,      // 0000 1000 0010 0000
        Ebony_Blade = 22,       // 0000 1000 0010 0100
    }
I think this means that flags bit 12 indicates an item is an artifact if identified, and bit 11 if not. However the evidence above isn't conclusive and I'm jumping to conclusions a little. It would be great if someone else could take a look or provide a (classic) savefile with a lot of unidentified artifacts. Wierd thing is identification doesn't appear to make any difference ingame for artifacts.. for the savefile I downloaded all of the info was availiable on all of the artifacts. So all of my conclusions could be rubbish.

Anyway wanted to record my findings in case they helped someone else, or needs to have tomatoes thrown at them.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Jay_H
Posts: 4061
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: Item flags & artifact identification

Post by Jay_H »

I can help!

Here's a save file with three Daedric artifacts: http://drive.google.com/open?id=0BxjB9- ... Vd0UmFWUVk. If more than three will help, I can grab more.

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

Re: Item flags & artifact identification

Post by Hazelnut »

Thanks Jay.

From what I can see all 3 have been identified. They cost 0 gold to identify at mages guild and the flags don't change. Do you recall identifying them?
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Jay_H
Posts: 4061
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: Item flags & artifact identification

Post by Jay_H »

No, I just grabbed them off their respective quests right now. I haven't entered a Mages Guild at all.

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

Re: Item flags & artifact identification

Post by Hazelnut »

That's very interesting. It's quite possible then that the character I downloaded with all the items did not obtain them legitimately. That would also explain the highest nibble being 0110 for those 3 items. Thank you for the extra data! :)

It says to me quite strongly that flag bit 12 indicates artifacts. Of course I may be missing something about artifacts in daggerfall since I only ever got to level 2 all those 21 years ago. :D
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: Item flags & artifact identification

Post by Hazelnut »

Unless anyone has other info I will implement bit 12 as artifact indicator flag then.

Thank you Jay for the save you provided. Seriously, having someone fire up the classic game and go do the quests to get three artifacts just to provide me with a save - above and beyond man! Thoroughly appreciated. Thanks.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Jay_H
Posts: 4061
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: Item flags & artifact identification

Post by Jay_H »

No big deal, I'm glad I could help with something :)

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

Re: Item flags & artifact identification

Post by Interkarma »

I haven't done much past the basics with artifacts. Been holding this for the spell system implementation. But happy to have some original research and a head start, thanks. :)

Yeah, Jay's incredible with this stuff.

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

Re: Item flags & artifact identification

Post by Hazelnut »

Quick query regarding artifacts. The inventory window uses item groups for equipping items, however there's a group for artifacts that's currently unused. I had imagined your plan was to assign artifacts to this group once they had been identified, but if classic used this group then that would already be happening from what can see. I conclude that classic doesn't use this group, but instead uses a flag.

Using the group would require special cases in the code for artifacts that are weapons etc, so I'm thinking I would simply follow classic with the flag indicator - so the Artifact item group is basically redundant.

Does this seem right to you?
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: Item flags & artifact identification

Post by Hazelnut »

Took a look into this tonight and I wasn't quite right earlier. looks like you were planning to combine info from templates on creation of objects, and that is the only time that group 5 (artifacts) would be used. Is that correct?

Artifacts from saves (classic & DFU) would have the relevant group for the item rather than artifact group.

Just want to orient myself accurately before starting work. :-)
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Post Reply