AI Self Preservation
Posted: Thu Apr 19, 2018 6:00 pm
It's been a while since I played Kenshi, it's come along real nice.
I'm trying to make AI act in a non-suicidal way. This is hard in most games, because most games have only two states: KILL and DIE.
Some games offer a little more graduation. I modded most the guns out of Fallout New Vegas, gave all gun-toting NPCs very limited ammo, which they'd spend lazily taking potshots at one another from behind cover. Those who didn't have guns would throw their javelins before entering melee, where they would circle one another, taking jabs at random intervals - focusing more on dodging and blocking than wildly swinging.
When things went poorly, they'd run. Few fights ended in slaughter, unless one group surprised the other. Most fights were skirmishes instead - meaning less xp, less loot, and with a high cost of medical supplies and ammunition it made each one a decision:
Is what they've got worth the trouble to get it?
The Bethesda Fallout games actually had hugely powerful AI parameters for life-like behaviour - they were just never used.
Kenshi looks to have a lot of that too. What other game are you gonna see a guy patch up his friend, put him on his back and run back home? This is the behaviour I like. My issue is getting them to assess whether the fight's worth it - and the threshold for them determining they've lost the fight.
I talked about graduation before. Kenshi nails this in the graduation between life and death with starvation, limb loss, various states of being a cripple - I want to achieve the same graduation between aggression and self preservation.
--------------------------------------------------------------------------------
My understanding is that there is a relative strength value somewhere that AI looks to to determine whether to run or fight.
My question are: where can I find it, and can I change it?
I've seen there are 'BRAVE' and 'FEARFUL' personalities - do these relate to anything other than dialogue? If they do, how does one modify them?
What are the conditions for 'self preservation' behaviour to trigger, and can I alter its likelihood?
A character that has a higher attack value than his opponent's defense (as far as I understand) will attack more, and how much more he attacks can be set in the editor. This means that characters have varying levels of AGGRESSIVENESS in combat, which is excellent. Can it be tied to morale - or is morale a binary (fight/flee)?
Thanks for the great game.
I'm trying to make AI act in a non-suicidal way. This is hard in most games, because most games have only two states: KILL and DIE.
Some games offer a little more graduation. I modded most the guns out of Fallout New Vegas, gave all gun-toting NPCs very limited ammo, which they'd spend lazily taking potshots at one another from behind cover. Those who didn't have guns would throw their javelins before entering melee, where they would circle one another, taking jabs at random intervals - focusing more on dodging and blocking than wildly swinging.
When things went poorly, they'd run. Few fights ended in slaughter, unless one group surprised the other. Most fights were skirmishes instead - meaning less xp, less loot, and with a high cost of medical supplies and ammunition it made each one a decision:
Is what they've got worth the trouble to get it?
The Bethesda Fallout games actually had hugely powerful AI parameters for life-like behaviour - they were just never used.
Kenshi looks to have a lot of that too. What other game are you gonna see a guy patch up his friend, put him on his back and run back home? This is the behaviour I like. My issue is getting them to assess whether the fight's worth it - and the threshold for them determining they've lost the fight.
I talked about graduation before. Kenshi nails this in the graduation between life and death with starvation, limb loss, various states of being a cripple - I want to achieve the same graduation between aggression and self preservation.
--------------------------------------------------------------------------------
My understanding is that there is a relative strength value somewhere that AI looks to to determine whether to run or fight.
My question are: where can I find it, and can I change it?
I've seen there are 'BRAVE' and 'FEARFUL' personalities - do these relate to anything other than dialogue? If they do, how does one modify them?
What are the conditions for 'self preservation' behaviour to trigger, and can I alter its likelihood?
A character that has a higher attack value than his opponent's defense (as far as I understand) will attack more, and how much more he attacks can be set in the editor. This means that characters have varying levels of AGGRESSIVENESS in combat, which is excellent. Can it be tied to morale - or is morale a binary (fight/flee)?
Thanks for the great game.