Item flags & artifact identification

Discuss coding questions, pull requests, and implementation details.
User avatar
Posts: 2893
Joined: Sun Mar 22, 2015 1:51 am

Re: Item flags & artifact identification

Post by Interkarma » Wed Sep 06, 2017 10:09 pm

I'll try to outline artifact handling as best as I can. This is inherited from classic's design.

An artifact item is a combination of two sets of data. The base item template defines how item is worn and what base item groups it belongs to. The artifact data defines name, spell effects, and appearance based on class and order in data.

All artifact data is stored in MAGIC.DEF in classic and MagicItemTemplates.txt in DFU (which is a JSON export of MAGIC.DEF). This references the base template (group and groupIndex) for purposes of instantiating initial item. Then artifact-specific data is merged to create the final item. When spell system is in place, there will also need to be an effect migration step to translate legacy enchant indices into their equivalent in DFU.

The artifact group (#5) in ItemGroups is there for instantiating an artifact while the subGroup references the artifact itself inside MAGIC.DEF/MagicItemTemplates. This data then references the base item template. All put together, they make an artifact.

Artifacts are working insofar as they can be generated by the quest system, equipped to the correct slot, display correct icon in inventory and while held, and show correct name on tooltip. Everything else is (was) out of scope until magic system underway.

User avatar
Posts: 577
Joined: Sat Aug 26, 2017 2:46 pm

Re: Item flags & artifact identification

Post by Hazelnut » Wed Sep 06, 2017 10:16 pm

Thanks, that lines up with my understanding. I can work on it now.

No point blundering about if you don't understand how things are meant to be working! :D

Post Reply