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

fix: Make No NPC Needs set fatigue to 0 #2222

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KheirFerrum
Copy link
Collaborator

Summary

SUMMARY: Bugfixes "Make No NPC Needs set fatigue to 0"

Purpose of change

No NPC Needs currently sets NPC fatigue to "tired" when more than tired. This leads to NPCs complaining about needing sleep despite the mod being on, and making them randomly choose to sleep if the NPC settings has them on allow sleep.

Describe the solution

Refactors the code somewhat since it looked like some unnecessary code was firing despite No NPC Needs being turned on. Then made it so that it just directly sets the NPC's fatigue and sleep deprivation to 0

Describe alternatives you've considered

  • Leave as is and refactor NPC AI instead.
    Look, NPC AI needs a lot of work that much is true, but not on this.

Testing

Spawn in evac shelter, mind control companion, wait 24 hours, check needs.

Additional context

@github-actions github-actions bot added the src changes related to source code. label Dec 3, 2022
@Coolthulhu
Copy link
Member

The reason they were allowed to get just mildly tired was so that they can rest to heal.
Since they can't heal well while awake, the current hack is still useful.

Does regular tiredness add any penalties or do they start at "dead tired"? Maybe they just complain too early.

@KheirFerrum
Copy link
Collaborator Author

KheirFerrum commented Dec 12, 2022

The reason they were allowed to get just mildly tired was so that they can rest to heal. Since they can't heal well while awake, the current hack is still useful.

Does regular tiredness add any penalties or do they start at "dead tired"? Maybe they just complain too early.

Complain too early would be my outlook, I'll redo this and make them complain at dead tired then. Might be a good idea at some point to make a short article on how companions should be treated and their AI set, and the idiosyncrasies that come with it. Would need regular updates if we ever get around to reworking NPC AI...

The other thing with me was more that they would just randomly run off to sleep when I tell them to read books. I'll see if I can mitigate it without touching hardcode. It's unclear to me whether the morale cap from fatigue even affects them.

@KheirFerrum KheirFerrum marked this pull request as draft December 12, 2022 17:11
@Coolthulhu Coolthulhu removed their assignment Dec 15, 2022
@scarf005 scarf005 changed the title Make No NPC Needs set fatigue to 0 fix: Make No NPC Needs set fatigue to 0 Nov 13, 2023
@scarf005
Copy link
Member

scarf005 commented Dec 6, 2023

May i ask if this PR is still relevant? Or would there be a better solution?

@KheirFerrum
Copy link
Collaborator Author

May i ask if this PR is still relevant? Or would there be a better solution?

Just haven't gotten to it. It's not critical, more a pet peeve.

@Lamandus
Copy link
Contributor

Lamandus commented Apr 2, 2024

May i ask if this PR is still relevant? Or would there be a better solution?

Just haven't gotten to it. It's not critical, more a pet peeve.

Should we close it then? Or are you still interested

@KheirFerrum
Copy link
Collaborator Author

May i ask if this PR is still relevant? Or would there be a better solution?

Just haven't gotten to it. It's not critical, more a pet peeve.

Should we close it then? Or are you still interested

I'm still interested, but I haven't had time to figure out what a good way to deal with it is.

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

Successfully merging this pull request may close these issues.

4 participants