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

Bat Beacon Limit Bug #87

Closed jpw1991 closed 1 year ago

jpw1991 commented 1 year ago

Describe the bug

A user reported that the Bat Beacon wasn't respecting limits and spawning endless bats. This needs to be investigated.

Snowz — Today at 10:15 AM Cheb Gonaz I apologize for the ping, but it appears limiting the bats spawn isn't working properly. I have it set to 5 and they still spawn 20+ bats, even after server restart and its causing some lag. Would you happen to know a workaround/fix? MY guess is the max bats is, max bats per enemy presence. Going to lower the time they last and bring up how many spawns Cheb Gonaz — Today at 10:30 AM it's ok, thanks for telling me. I'll take a look Snowz it's supposed to work like you describe. But the limit is per Bat Beacon. So if the limit is set to 5, but you have 4 beacons, you'll get 20 bats. If you have the limit set to 5 and you've only got one beacon and it's making endless bats, that's a bug unfortunately Snowz — Today at 10:37 AM I see, yeah lowering the time they stick around definitely helped, I might lower their sight as well because they seem to be spawning even with no enemies around. I have it at default, going to halve it to see if they still just keep respawning. Cheb Gonaz — Today at 10:37 AM Ok good. I'll double check the Bat Beacon later to see if it's working properly and get back to you

jpw1991 commented 1 year ago

Bug confirmed

jpw1991 commented 1 year ago

This actually affects all pylons with enumerators. They get added twice for some reason. I don't really know how that happens because we check if the component is there in the awake patch, but somehow it happens anyway. Maybe we gotta replace it with a TryGetComponent. But for now I just removed adding it to the prefab on loading and leave it only in the Awake patch