Eve-of-Darkness / db-public

Vanilla database for Dawn of Light
19 stars 19 forks source link

Cleanup : Improve data quality on Mobs with unknown NPCTemplateID #230

Closed DigitalBox98 closed 3 years ago

DigitalBox98 commented 3 years ago

NPCTemplateID is replaced by -1 to be consistent : it will reduce the number of errors entries in the log during the server's launch

Xanxicar commented 3 years ago

The message was put there to warn developers to add templates because there are functional drawbacks to not using NPCTemplate. The proper course of action would be to add the templates and loot lists.

LRFalk01 commented 3 years ago

The message was put there to warn developers to add templates because there are functional drawbacks to not using NPCTemplate. The proper course of action would be to add the templates and loot lists.

I would tend to agree that assigning an invalid key is not an actual fix, but this does appear to be what is being done in other existing records follow this paradigm. To be honest, there should be a DOL PR to allow this field to be nullable.

LRFalk01 commented 3 years ago

I think instead of wiping out these referenced template ids, we should instead create empty template ids for these referenced values .. this would keep the metadata that we'd be removing. Basically these mobs are somehow related being as they have the same template ids.

Xanxicar commented 3 years ago

The foreign key references to NPCTemplate have informational value. They are grouping 'mob' entities together that can be edited using a single template. Removing them is NOT improving data quality, quite the opposite. It leads to information loss in both the DB and the logs. Plus it is breaking existing mob editing functionality.

LRFalk01 commented 3 years ago

The foreign key references to NPCTemplate have informational value. They are grouping 'mob' entities together that can be edited using a single template. Removing them is NOT improving data quality, quite the opposite. It leads to information loss in both the DB and the logs. Plus it is breaking existing mob editing functionality.

Yeah, that's basically what I said. We're in agreement.

DigitalBox98 commented 3 years ago

I'm closing this PR as the correct behavior is to create the corresponding Templates : should be done on another PR