T3kla / ValMods

Valheim mods I have developed. Completely open source. You have my permision to modify and redistribute.
https://valheim.thunderstore.io/package/Tekla/
4 stars 6 forks source link

[Bug][Dungeon Reset] "Duping" on Resets #18

Open illutian opened 2 years ago

illutian commented 2 years ago

Mod Version: 5.4.1605 Game Version: 0.210.6

Note: This was also reported on the Nexus Mod page by a Rakorath. But the actions they performed differ from mine. But resulted in the same outcome; dupes.

I noticed that the locations are not "destroyed" by the mod before regenerating them. This is causing item duplication; the items are 'clipped' into each other.

I tested this out with a Draugr Village (MeadowVillage in the mod settings). What I did was killed all the mobs in a couple of buildings that were "sealed" (mobs could not get out). I destroyed one entire building and a part of another.

I did a dungeonreset command and noticed that the mobs that were in the sealed buildings respawned, the mobs still alive appear to have been left alone, the totally destroyed building was restored (albeit with 'full health' structure pieces), and the partially destroyed building was duped. ...as in the parts I destroyed were restored (again with full health structures) but, also, the pieces that weren't destroyed had new pieces created inside them (you could see the clipping and the Work Hammer on Repair would flip between the two pieces on hover over).

This was following running a dungeon that I had a second run-through. I noticed I was "E-ing" the yellow mushrooms twice..every single time. Then I came upon a Surtling Core, "E-ed" it; looted. But then saw the core still in one of those stands. "E-ed" again and got a second one. ...That's what prompted the above test.

I've also noticed the dungeon layout isn't randomized, even though the code appears to call for the "Destroy"-ing of the area. Not sure if this is intended or part of the bug, so I'll include it.