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

Skeletons become inactive while on Follow (on player teleport or on critical damage) #176

Closed Zudakas closed 1 year ago

Zudakas commented 1 year ago

Describe the bug

https://www.nexusmods.com/valheim/mods/2040?tab=posts&BH=2 As in the post, Melee skeletons seem to become unresponsive if they move beyond a certain distance of the owner, either because of the owner teleporting, or the skeleton chasing a mob beyond a certain range (possibly due to target despawning due to distance, or the game trying to unload the skeleton due to distance, and the follow command causes it to hang?)

Archer skeletons seem to not have the same issue with becoming unresponsive, at least in my experience. They seem to lose their target and return before hanging.

A clear and concise description of what the bug is. If a skeleton chases a mob too far from the owner, they become unresponsive to player commands, and do not attack mobs. Possibly the same bug as when the owner teleports away and returns to find all skeletons unresponsive to commands/mobs. I have not experienced this with archer skeletons.

To Reproduce (if applicable)

1) Summon several skeletons, set them to follow you. Find a mob (eg. deer or other mob that runs away) and when the skeletons aggro, move in the opposite direction. It -should- cause the skeletons to become unresponsive when they get a certain distance from you.

2) The other way, summon several skeletons, set them to follow you, and teleport/portal away for a few minutes and return. Skeletons may become unresponsive (not archers in my experience, for either case)

Expected behavior (if applicable)

1) When the target moves beyond their max distance (possibly view distance?) the skeletons should return to the player.

2) Skeletons should be ready to accept commands upon the owners return.

Screenshots (if applicable)

If applicable, add screenshots to help explain your problem.

Desktop

If you can, please complete the following information:

Possible fixes: Max Range setting in config for melee skeletons, at which point they teleport back towards owner (20-30m from owner). I think part of the unresponsive behavior possibly is due to the mob they are chasing despawning, or the game trying to despawn the skeleton.

Configure skeletons to switch to a wait/roam command (or clear their command status back to default) when they go beyond a certain range of the owner (such as the owner teleporting/using a portal). I am not sure how you would go about this without adding an OnUse action to the portals to swap commands/unsummon the skeletons.

Zudakas commented 1 year ago

So, my theory on distance is out. I had a melee skeleton go unresponsive right in front of me, while killing a grey dwarf. It died, and the skeleton immediately became unresponsive. I still haven't been able to repeat this with ranged skeletons. Could possibly have something to do with targeting?

Zudakas commented 1 year ago

Easily Repeatable (Ranged AND Melee)

Summon skeletons. Set them to Follow, Find Stone Golem in Mountains. Watch the skeletons, they will get hit once, -maybe- twice, before they become unresponsive. I did this several times and each time they were hit hard enough they became unresponsive.

The exception that I saw was 1 skeleton out of 4 did not become unresponsive, and I believe it was because the other 3 were in front of him, and they took the hit, got launched, and took the 4th one with them. The 3 were unresponsive before or instantly upon hitting the ground.

I think there are 2 bugs here. 1) When you teleport while having them on follow. On wait, they don't have you set as their follow target, thus they don't care if you leave or stay.

2) When they take excessive damage while on follow. On wait, they are destroyed instantly when they take enough damage.

Both issues stem from the follow command so they are related, but not 100% the same issue.

Changed the title of this issue because it has become unclear whether distance actually has anything to do with it.

Zudakas commented 1 year ago

I still have not been able to recreate the teleport bug, in spite of teleporting all over the map with a group of skeletons on follow. Each time I return (sometimes over an hour later) they accept commands still.

jpw1991 commented 1 year ago

Thanks for testing. It's a tough problem. But, I don't think I've ever experienced what you're experiencing and I can't reproduce the problems you describe.

Zudakas commented 1 year ago

really? that is kinda weird; I can't get the teleport bug to show up no matter what I do.

jpw1991 commented 1 year ago

Would you mind letting me know what your current mod setup is for testing with?

Zudakas commented 1 year ago

Sorry, had some RL stuff going on. I figured out what part of the issue was. I stressed my network (difficult, considering its fibre gigabit) and caused the desync which was at least part of my issue. Their deaths weren't happening correctly, so the body would stay and not drop the crate with resources. I am still looking at possible fixes for this, considering it is happening on a lan server.... I am still testing out the other non-responsive issue, or at least trying to force it to happen.

Mod List (Output from a cmd window dir command, then cleaned up)

AdventureBackpacks
Advize_PlantEasily.dll
Advize_PlantEverything.dll
AmmoCount.dll
AutomaticFermenters.dll
AutomaticFuel.dll
AzuAutoStore.dll
AzuClock
AzuContainerSizes.dll
AzuMiscPatches
AzuWearNTearPatches
AzuWorkbenchTweaks
BetterCarts.dll
BetterTrader.dll
Biome Anouncements.dll
BoneAppetit.dll
CastleStructures
ChebsNecromancy
ComfortTweaks.dll
Compass
ConfigurationManager
CraftableJute.dll
CraftFromContainers.dll
CreatureLevelControl
DeathTweaks
Digitalroot.Valheim.SlopeCombatAssistance
DropMoreLoot.dll
DualWield.dll
EpicLoot
Epicmmosystem
ExtendedPlayerInventory.dll
FantasyCreatures.dll
FascinatingCarryWeight.dll
FoodStaminaRegen.dll
Foraging.dll
Groups.dll
Jotunn
Kits_Bitz.Under_The_Radar.dll
Mining.dll
MMHOOK
MoreCrossbows
MoreCrossbows.dll
MountUp.dll
MovableInventoryWindows.dll
NoFogBruh
NoSmokeStayLit.dll
OdinHorse
PetProtection
ProfitablePieces
Queue_Me_Maybe
RepeatActions.dll
Sailing.dll
SearsCatalog.dll
ServerDevcommands.dll
ShieldMeBruh
ShowContainerContents.dll
SkillsOverhaul.dll
SNEAKer.dll
SpawnerTweaks.dll
SpawnThat
Spearfishing.dll
TreesReborn.dll
TripleBronzeJVL
Valheim.DisplayBepInExInfo.dll
Valheim.DropThat.dll
VNEI.dll
WackysDatabase.dll
WardIsLove
Wildlife.dll
XPortal
jpw1991 commented 1 year ago

When @CW-Jesse updates their networking mod, I recommend you use it. It helps a lot. Unfortunately I don't think there's much I can really do about the whole network situation in Valheim.

Zudakas commented 1 year ago

Iron Gate is the only one that can do it lol... They need to go over the whole thing and do some optimizations. It runs pretty choppy on a lot of people's rigs. And servers in general lag pretty bad. Mine's an old gaming pc, 24gb ram, I5 cpu, and it runs this of an ssd, so there isn't really any noticeable lag going on. So, I am assuming it's just the network settings built into Valheim.

jpw1991 commented 1 year ago

Yes. Plus the whole way the client has a lot of influence over the server complicates things

jpw1991 commented 1 year ago

@Zudakas can you please test this again using the new 3.1.0? I made some changes that hopefully make issues like this one rarer.

jpw1991 commented 1 year ago

I'm 90% sure this is fixed in new versions. Closing. (please reopen if still a problem)