-
Notifications
You must be signed in to change notification settings - Fork 4.3k
NPC AI: Fleeing optimizations #81866
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
base: master
Are you sure you want to change the base?
NPC AI: Fleeing optimizations #81866
Conversation
Making this a multiplier keeps it from skewing results too far at low combat levels, but it should still be important
medium range is closer, but close range is farther.
would be nice if raising their opinion also made them "suicidaly braver" Because your best friend got your back and won't run away even against the worst odds unless they are alone ofc |
Yes, thought thr same thing last night. I'm going to make the "player is nearby" effects cue of the NPCs trust of the player a lot more. |
Summary
Features "NPC AI fixes to improve fleeing in bad situations, reduce it in good ones"
Purpose of change
NPCs still run away wrong. I worked hard on it, but it needed playtests, it's had almost two years and now I have the reports back.
Describe the solution
This will not solve all the problems but I wanna get some easy ones. Will update as I go through.
Describe alternatives you've considered
I've also been thinking of ways to apply this outside the player faction NPCs and that could help here, but I think I'll save that for later.
Many people want the ability to call a retreat. Including me, I really want that. However, I feel it's vitally important to avoid adding that until the NPCs can already do a pretty OK job of assessing it themselves... otherwise, I won't get this vital playtest data, because we'll all get used to micromanaging the dumb little dudes, and it'll never be fixed. Don't worry, once we're happy with their fleeing ability, there will absolutely be both "Run away!" and "Hold the line!" commands to help bolster their AI. I would also like these commands to be available to NPCs who have a party leader amongst themselves, so that the AI running the bandits can also call a retreat.
My threat assessment code is still mostly for melee npcs. I have some ideas for ranged NPCs but that's for another PR, I really want to get melee NPCs to a point that we're all happy with first.
Testing
Compiles, and the game runs, but a completely unrelated error about vehicle parts crashed it before i could get decent playtest data. Will try again tomorrow, taking it out of draft though since at least I can see it runs.
Additional context
My kid is helping me with this, it's amazing. If you ever feel like you can't code, remember, my 13 year old is helping me with this. You can do it! I believe in you.