Item flags & artifact identification

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

Re: Item flags & artifact identification

Post by Interkarma »

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
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Item flags & artifact identification

Post by Hazelnut »

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
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Post Reply