DDD Replacing/Altering distributions for items with no distributions set.
yeelp opened this issue ยท 1 comments
DDD will sometimes change all items with no damage distribution set in the config all to the same thing. This bug has occurred a handful of times. This issue is to try to document everything I've learned about it until I find a solution or workaround.
First instance was in testing, but I couldn't troubleshoot or diagnose it. I'm pretty sure I was troubleshooting other crashes that were occurring during development and this bug subtly reared its head for the first time. When I noticed it, I knew immediately what happened, just not why it happened. I thought perhaps it was a remnant of the other troubleshooting I did. I think creating a new world passed the problem onto that new world as well as the change to undefined distributions was still in memory. Restarting and then creating a new world fixed the issue on that world. Old worlds were still affected.
Other subtle instances of the bug were found "in the wild", but no solid steps to reproduce exist. No issues exist in the repo (to my knowledge) as reference, but some comments on CF or in Discord I think reference this problem with no solid reproducible steps.
I have attempted to fix this by giving each item it's own damage distribution instance and have the game create a new instance for each item during runtime so they didn't have the same reference (If they don't have the same reference, then changes to one shouldn't affect the others), but it turns out that doesn't work because it still happens?
So far, I have only noticed this to be a problem with Damage Distributions. Armor Distributions, Shield Distributions and Mob Resistances don't seem to have this problem so far.