jpw1991 / chebs-necromancy

Cheb's Necromancy adds Necromancy to Valheim via craftable wands and structures. Minions will follow you, guard your base, and perform menial tasks.
The Unlicense
10 stars 4 forks source link

skeleton mage projectiles pass through certain objects #167

Closed subsanity closed 1 year ago

subsanity commented 1 year ago

Describe the bug

Skeleton mage projectiles pass through certain objects/structures, producing errors.

To Reproduce (if applicable)

I've had this happen with mages in dungeons, but it is most easily reproduced at fuling villages. spawn some mages, go to a village, and they will be unable to hit fulings up in towers.

Expected behavior (if applicable)

in this case, explosions are desireable

Screenshots (if applicable)

video of the bug in action: https://youtu.be/TbruH68egXk pastebin of errors being thrown as this happens: https://pastebin.com/raw/QYnF68KT the errors are flying past a mile a minute, seemingly with every attack made by the skeletons; this is just one out of hundreds from the log.

Desktop

jpw1991 commented 1 year ago

Thanks for the detailed report with video & log. Yeah the reason why the projectiles aren't working properly is the error in the log.

Are you running other mods?

jpw1991 commented 1 year ago

Ahh, ok I figured it out. So, I have code that checks structures for a Piece script that attempts to determine whether a structure was placed by the player or not. If it is placed by the player, then the damage is cancelled out so that minions don't demolish your base.

However, these basic NPC structures like fuling bases (and probably stuff in the dungeons) don't have a Piece script at all - something I failed to consider - and so it tries to check something that's not there and you get the error, which throws a spanner in the works and derails the whole train.

Thank you, it will be fixed in the next version.

jpw1991 commented 1 year ago

@subsanity I fixed that and more in version 2.5.9. You can test it here, if you want. In any case, it fixes some of the issues you recently reported so you'll have a nicer playthrough on this verison.

Thanks again for all the bug reports and your time testing. I will also test it on my own and see how I go before I release