Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#9975 NPCs Can Run Out of Stamina #35969

Closed
crp763 opened this issue Dec 8, 2019 · 8 comments · Fixed by #36252
Closed

#9975 NPCs Can Run Out of Stamina #35969

crp763 opened this issue Dec 8, 2019 · 8 comments · Fixed by #36252

Comments

@crp763
Copy link

crp763 commented Dec 8, 2019

Game version: Build #9975

Operating system: Windows 10

Tiles or curses:

Mods active: N/A

Expected behavior

NPC's should not ever use or run out of stamina; running out of stamina should have no effect

Actual behavior

Somehow my NPC companion reached 0 stamina (unsure of what activity caused this. I was looting a town, fighting zombies, and toggling between walk/crouch/run). Once he reached 0 stamina his speed dropped dramatically, and nothing would revert his speed back to normal (sleeping, waiting, etc.). Had to use debug menu to reset stamina to 10000. Once stamina was reset, speed returned to normal.

Steps to reproduce the behavior

Unsure of what happened to drain companion's stamina, but setting their stamina to 0 in the debug menu drastically reduces their speed.

@crp763
Copy link
Author

crp763 commented Dec 9, 2019

I believe this may be an issue with asthmatic NPC's. Asthma attacks drain stamina, and NPC's never recover that stamina, meaning they will eventually become winded. Could maybe be fixed by enabling NPC stamina regen.

@M-Real
Copy link

M-Real commented Dec 11, 2019

I had a similar experience with a stamina-related follower bug. My Follower had their speed slowed dramatically for days with no indication of the problem. I checked via debug after someone suggested it could be related to the stamina issue, and found that their stamina was stuck at 2112 for some reason. I set it to full and their speed returned to normal. The NPC does not have asthma or anything else that would affect stamina as far as I can tell.

@crp763
Copy link
Author

crp763 commented Dec 12, 2019

I went and looked at some backup saves, and saw my NPC companions stamina seems to have been dropping steadily over a few in game days. These backups spanned several experimental patches.

Also good to know it's not just the asthma trait, I was about to edit it away in the json.

@ghost
Copy link

ghost commented Dec 12, 2019

Hm. were your NPCs doing any activities? any jobs at camps? fighting?

They really shouldnt use any stamina... its weird.

@crp763
Copy link
Author

crp763 commented Dec 13, 2019

It's still happening on the latest build as of today, I set his stamina back to max and then it held steady, then I went mansion-diving and by the end of it his stamina was down at 8000. I reset it back to max, and it has stayed steady since.

While we were in the mansion he was fighting in melee with a katana, and I had him hold some loot for me (still well under his carry limit). He's decked out in light survivor gear and a firefighter PBA mask.

@CSHague
Copy link
Contributor

CSHague commented Dec 14, 2019

This seems to apply to all stamina-using actions. The NPCs will use stamina fighting in some manner and then never regenerate it. Spawning a new NPC and watching its stamina values as it fights a zombie shows it losing stamina. After the fight, the NPC has 0 stamina and it does not recover.

@crp763
Copy link
Author

crp763 commented Dec 14, 2019

Yes I can now confirm, it's being caused by melee combat. What's worse is because NPC do not regenerate stamina during their turns, the drain happens extremely quickly. A melee engagement with just a few regular Zeds will bring down the stamina level by several thousand.

This makes NPCs basically useless if they get swarmed, as their speed will dramatically drop. I'm constantly having to use the debug menu to reset NPC stamina to full.

@CSHague
Copy link
Contributor

CSHague commented Dec 15, 2019

I've temporarily gotten around this by using CheatEngine to lock the memory value for their Stamina.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants