Jump to content


Photo

AI don't care about violent deaths


  • Please log in to reply
84 replies to this topic

#1 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 26 January 2013 - 06:09 PM

To keep the thread about the arrow kills too easy to the point, I'm splitting this up:

Currently there are some odd situations when AI of different teams and neutral AI are involved:

Scenario A:

* A guard (hostile to the player) and a neutral AI are in the same room. Player shoots guard in the head. The neutral AI ignores this.

Shouldn't they worry about a killer on the loose? And should there be a difference whether they see the player/killer, or not? (If they don't see the shooter, they should be even more frightened)

Scenario B:

* Two guards (friends of the player) are in a room. If you kill one of them (or just hit him), the other one (or both) will search for the intruder - and ignore(s) you completely (except in the case where you throw something at them, I think in this case the do some remarks like "stop that" - but they still search).

Shouldn't the guards be a bit more concerned when you kill their friend?
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#2 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5713 posts

Posted 26 January 2013 - 06:15 PM

A: As said in the other thread even ai that is hostile to the just killed/attacked ai should react like friendly one, as long as the specific ai is not friendly to the player.

B: I think an appropiate behaviour would be that the ai warns you to stop it and if you don't become hostile to you.
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#3 lost_soul

lost_soul

    Advanced Member

  • Member
  • PipPipPip
  • 1456 posts

Posted 26 January 2013 - 06:27 PM

The easiest solution would be to have the civilians go into panic animations. This was what happened in e.g. No One Lives Forever, and many other games. I wouldn't have them run around because it would just chew up more CPU cycles, but to go into panic mode and play appropriate barks would be good.

Edited by lost_soul, 26 January 2013 - 06:28 PM.

--- War does not decide who is right, war decides who is left.


#4 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37450 posts

Posted 26 January 2013 - 09:21 PM

I agree with the general ideas above. But we would have to track how the AI was killed. If the player kills a citywatch next to some beggars, it makes sense for them to flee (if civilians) or go into search mode (if combatants). But if they're neutral to the player, what do they do when they discover him?

Also, what if it isn't the player that kills the AI? Suppose a builder kills a citywatch. Should nearby beggars draw their weapon and attack the builder?
TDM Missions:   A Score to Settle   *   A Reputation to Uphold   *   A New Job   *    A Matter of Hours
 
Video Series:   Springheel's Modules   *   Speedbuild Challenge   *   New Mappers Workshop  *   Building Traps

#5 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5415 posts

Posted 27 January 2013 - 12:47 AM

If you had a system for this, it's also a natural fit with a security level system. Neutral AI in a no-security area might not react (it's a bad neighborhood with a lot of gang violence, and as long as they aren't directly attacked they stay out of other people's business), and they would freak out in a high or medium security area.

It would also give the mapper spawnargs to control AI behavior directly (no-security AI never freak out, high-security AI always notice & attack (guards) or freak out (neutrals)).
Posted Image

#6 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 27 January 2013 - 04:17 AM

I agree with the general ideas above. But we would have to track how the AI was killed. If the player kills a citywatch next to some beggars, it makes sense for them to flee (if civilians) or go into search mode (if combatants). But if they're neutral to the player, what do they do when they discover him?

Also, what if it isn't the player that kills the AI? Suppose a builder kills a citywatch. Should nearby beggars draw their weapon and attack the builder?


No, but they should at least look in horror, and maybe even go in panic mode (if unarmed), or alert (if armed). They can relaxed a bit after they really don't want to atke action (because they don't care about guards, f.i.).

But just continiuing on like nothing happened feels just wrong.

If someone kills someone RIGHT NEXT TO YOU (e.g. where you can see it clearly), then adrenalin will be pumping through your body and make you jump up faster than a jumping spider. You won't be sitting around for another 10 minutes until that rush cools off unless you are an empathy-incapable psychopath, or an emotionless Spock :)
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#7 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1595 posts

Posted 27 January 2013 - 12:17 PM

Completely agreed. I always thought neutral AI were as is on purpose (= they havent had all the routines done yet). A close example (by no means the best) would be Thief3, when you kill someone, people get scared, start to run away from you and someone tags you as a murderer and go call the citywatch. There were several flaws to that system (I tried to explain them somewhere, cant remember which topic), in short, AI reactions are a bit too random, and the alarm feature is simplistic, you are tagged as a murderer by "everyone", not only by people who saw you. Also, certain actions are not seen as suspicious by witnesses, like pickpocketing, lockpicking, sneaking, following/stalking.

Since we are limiting the discussion to reactions from AI that witness murders, I also think they should:

1 - When unarmed, neutral to the player and other AI: become "hostile" to the player, which would turn him into a fleeing unarmed AI, getting into panic mode (we lack proper barks and maybe animations), running around and away from the player when cornered (because he would now be in another team, he might be able to alert armed AI from that team).

2 - When armed, neutral to the player and other AI: AI becomes like a fleeing unarmed AI, running around and away from the player, etc, but would draw weapon and defend himself if cornered or attacked.

#8 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5713 posts

Posted 27 January 2013 - 12:43 PM

In addition to the behaviour of unarmed AI I think it would certainly make sense if some of the AI would "decide" to pick up the weapon the just killed AI has dropped, at least if it was not too far away (and the weapon that was thrown isn't a 100 pound warhammer ;) ).

This could be also a nice addition to the AI behaviour when finding a dead body (without seeing the player). They get scared and decide if the run away or pick up the weapon and start searching the area (thus meaning the AI behaviour would change to armed).
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#9 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12727 posts

Posted 27 January 2013 - 12:47 PM

There are a lot of behavior changes suggested in this thread.

These changes would require code, sound, and animation support.

Would someone like to wrap everything up in a proposal that we can then assess for the amount of work required and who's going to do it?

Otherwise this just becomes an open-ended discussion that will eventually peter out.

Thanks.

#10 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5645 posts

Posted 27 January 2013 - 01:24 PM

Here is my take:

If an AI sees a friendly AI die suddenly: civilians play a sudden shock anim and scream and flee to their flee_point. Armed guards instantly look for the attacker. If nothing is found they check the body and continue their patrols.
If an AI sees a neutral AI die suddenly: civilians play a sudden shock anim and scream and flee to their flee_point. Armed guards instantly look for the attacker. If nothing is found they check the body and continue their patrols.
If an AI sees a hostile AI die suddenly: civilians play a sudden shock anim and scream and flee to their flee_point. Armed guards cheer and mock the fallen enemy. Make sure he is dead, maybe a one last stab with their weapon? Then carry on with patrols.

Civilians should always flee to their flee_point if they see any kind of violence.

If the attack is an arrow out of nowhere, any armed guard should play a "surprised, shocked, quickly crouch and look around" anim, then quickly move to the area where the arrow came.

If there are multiple armed guards around they should divide tasks: one checks the body, others look for the attacker. They should spread around to look.
Clipper
-The mapper's best friend.

#11 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12727 posts

Posted 27 January 2013 - 01:35 PM

Thanks, Sotha.

So now we have a starting point for a design proposal.

I'm going to restate it, with numbers added for ease of comment:

1. If an AI sees a friendly AI die suddenly: civilians play a sudden shock anim and scream and flee to their flee_point. Armed guards instantly look for the attacker. If nothing is found they check the body and continue their patrols.

2. If an AI sees a neutral AI die suddenly: civilians play a sudden shock anim and scream and flee to their flee_point. Armed guards instantly look for the attacker. If nothing is found they check the body and continue their patrols.

3. If an AI sees a hostile AI die suddenly: civilians play a sudden shock anim and scream and flee to their flee_point. Armed guards cheer and mock the fallen enemy. Make sure he is dead, maybe a one last stab with their weapon? Then carry on with patrols.

4. Civilians should always flee to their flee_point if they see any kind of violence.

5. If the attack is an arrow out of nowhere, any armed guard should play a "surprised, shocked, quickly crouch and look around" anim, then quickly move to the area where the arrow came.

6. If there are multiple armed guards around they should divide tasks: one checks the body, others look for the attacker. They should spread around to look.

#12 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5713 posts

Posted 27 January 2013 - 01:45 PM

Refering to point 3: I think the AI should not react that way if they don't saw the inflictor of the dead. How should they know they are not the next one?
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#13 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12727 posts

Posted 27 January 2013 - 01:54 PM

Refering to point 3: I think the AI should not react that way if they don't saw the inflictor of the dead. How should they know they are not the next one?


For clarification, I assume you're referring to armed AI, and agreeing that civilians should scream and flee.

#14 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 27 January 2013 - 01:55 PM

to point 3: The guard would attack the hostile AI next, anyway, and thus go into combat state. So I think the "and continue their patrols" refer to the existing behaviour, where when they kill something hostile, they consider the job done. If the hostile dies from someone else, it depends on whether it was a friend and they know it (relax), or if it came out of now-where - in this case either the AI can disregard it if they are with buddies (along the line "I think it was my buddy, but not sure, so I assume it"), or treat it as suspicious (if no buddy is around, or if they somehow know their buddy wasn't it).

So to recap:

* if AI is alone, and hostile dies from someone else - be alert, you could be next!
* if AI is not alone, and hostile dies, emit cry "heh, good work whoever was it" and then continue. (this is easier to implement). The rest like "heh, who was that?" "it wasn't me!" "me neither!" "Lolwoot, who was it then, stay sharp!" is probably a lot more complicated (needing possible new voice lines) and has little benefit for a lot of work.
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#15 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5713 posts

Posted 27 January 2013 - 02:49 PM

For clarification, I assume you're referring to armed AI, and agreeing that civilians should scream and flee.

Yes.

@Tels: What the hell is a "Lolwoot"?
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#16 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1595 posts

Posted 27 January 2013 - 03:08 PM

In this solution, what would happen:

A - If unarmed AI has no flee points to refer to?

B - If armed AI (refered to as guards) are stationary and do not have patrol to fall back to?

C - If the civilian is neutral to the player and is actually present when he kills another AI (not one he is hostile to), and IS armed? Would he flee or fight the murderer? Any confrontation would need a proper voice def (without any contradictory remarks in it).

Question: Is it possible for AI to calculate where a flying object came from? If so, I also made a suggestion here that would use this feature: http://forums.thedar...post__p__277872

#17 lost_soul

lost_soul

    Advanced Member

  • Member
  • PipPipPip
  • 1456 posts

Posted 27 January 2013 - 03:18 PM

Aren't there already "cowering" animations, where an NPC holds their hands up? It would be really awesome if an NPC could pick up weapons that were left laying around to defend themselves.

--- War does not decide who is right, war decides who is left.


#18 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 27 January 2013 - 03:52 PM

@Tels: What the hell is a "Lolwoot"?


http://knowyourmeme.com/memes/lolwut
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#19 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5645 posts

Posted 28 January 2013 - 01:39 AM

A - If unarmed AI has no flee points to refer to?


Technically, I think each team should always have a flee_point. Otherwise you get a warning when the AI is scared. IIRC, I think the AI does run away even without a flee_point but the activity isn't too smart. They run somewhere and cower there.

B - If armed AI (refered to as guards) are stationary and do not have patrol to fall back to?


I think they do the same thing what an armed guard does when it sees or hears the player, looks around and relaxes. Either they stand where they ended up or they walk back to the spot they stood. I'm not sure. Technically AIs ingame should always have a target, unless they are guards that receive new targets upon alerts or such.

C - If the civilian is neutral to the player and is actually present when he kills another AI (not one he is hostile to), and IS armed? Would he flee or fight the murderer? Any confrontation would need a proper voice def (without any contradictory remarks in it).


In this proposal, the civilians always flee if they witness death or violence. That's what unarmed civilians do. Run for help.
Clipper
-The mapper's best friend.

#20 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5415 posts

Posted 28 January 2013 - 06:45 AM

My ideal like I said in my first post is that this should be one part of a bigger "security level" system, so that you can capture all these things naturally & consistently with a "security level" spawnarg on locations & AI. (High and middle security: AI freak out. No security: AI don't react. Although the SL system allows mappers to modify that too.)

Also because it integrates right into that system. The whole "security level" idea is the AI go on alert or flee when they see specified things. "Seeing violence" is already in the design as a default thing on the list, along with lockpicking, stealing, etc... It just seems efficient to do it all together (all the spawnargs are together & work together), than having a separate system just for this, then later do a different system for the other stuff doing the same thing (although they could later be integrated together in a bigger "security level" system, I mean you'd have to because SL is meant as a way to micromanage all AI alert/flee cues, but then you'd have to deprecate all the old spawnargs and it's messy).

Since I know that's a much bigger task than the little job this is (although I think it's worth doing the whole thing now), but if we do just this behavior, then I'd say it would say I think we'd want to have a way to turn it off. AI & NPCs come in lots of situations, and sometimes you want scripted sequence where all the AI watching don't freak out, so the mapper should have the option to turn it off.

But yeah, I'd rather have a bigger Security Level system for mapper management of all AI alert/flee cues, and this just be a default part of that.
Posted Image

#21 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 28 January 2013 - 06:53 AM

My ideal like I said in my first post is that this should be one part of a bigger "security level" system, so that you can capture all these things naturally & consistently with a "security level" spawnarg on locations & AI. (High and middle security: AI freak out. No security: AI don't react.)

Also because it integrates right into that system. The whole "security level" idea is the AI go on alert or flee when they see specified things. Then "seeing violence" would just be a default thing the list, along with lockpicking, stealing, etc... It just seems efficient to do it all together, than having a separate system just for this, then later do a different system for the other stuff doing the same thing (although they could later be integrated together in a new system).


My opinion is that if we wait for the "perfect" system, we never get anything. Ideally, yeah, we'd have it. Practically there is no-one with a few weeks time to implement it. We stuggle to fix the existng bugs and go stand-alone.

Since I know that's a much bigger task than the little job this is (although I think it's worth doing the whole thing now), but if we do just this behavior, then I'd say it would say I think we'd want to have a way to turn it off. AI & NPCs come in lots of situations, and sometimes you want scripted sequence where all the AI watching don't freak out, so the mapper should have the option to turn it off. But yeah, I'd rather have a Security Level system and this just be part of it.


That is a good point. A spawnarg like "be_super_cool_bro" (just kidding on the name :D is useful and easily added.
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#22 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5415 posts

Posted 28 January 2013 - 10:59 PM

I guess I could rephrase my thinking. The core of a Security Level system is triggering AI to go on alert/flee on a cue, and the rest is details. That's what this feature request essentially does too.

So I thought, we could go ahead and just make this the start of a Security Level system for this feature, and then over time add other triggers ... the first one here is seeing violence... And then there are others like seeing the player lockpicking, seeing the player criminal frob, etc. I wrote out a whole list of them somewhere. We could use this opportunity to put in a core SL system and work on the details later. It doesn't have to be the perfect system now, just a broader foundation to build on for lots of triggers than just one ad hoc trigger, if we're already putting in the work for that one.

Edit: BTW, neutrals fleeing is understandable. But guards going on alert I think is a bad idea, because now they're looking for the player, when the player is trying to stay hidden and has nothing to do with the violence. It will feel very unfair, especially if they're trying hard to ghost & it counts against their stealth score. I know there's a knee-jerk intuition, yeah guards see violence so they'll be looking for any suspicious character, but that won't be true for every situation (the whole premise is other people are violent), and again it's very unfair to a player working hard to properly sneak. So for reasons of both mimesis & gameplay, guards shouldn't go on alert & start searching for the player. (The one case where they should go on alert or attack is if the perpetrator is on an enemy team, but they should do that on sight anyway.)
Posted Image

#23 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5713 posts

Posted 29 January 2013 - 05:55 AM

This could be fixed if the stealth score only counts alarms that are caused by the player.
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#24 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37450 posts

Posted 29 January 2013 - 03:07 PM

1. If an AI sees a friendly AI die suddenly: civilians play a sudden shock anim and scream and flee to their flee_point. Armed guards instantly look for the attacker. If nothing is found they check the body and continue their patrols.


This sounds reasonable, though you could get into some weird cascading brawls (archer accidently shoots friendly; friendly attacks and kills him; other nearby friendly sees this and attacks attacker, etc...)

2. If an AI sees a neutral AI die suddenly: civilians play a sudden shock anim and scream and flee to their flee_point. Armed guards instantly look for the attacker. If nothing is found they check the body and continue their patrols.


What happens if they find the attacker? For example, Criminals and Citywatch are neutral to each other. If a thief sees the player kill a citywatch, is he going to attack the player? That wouldn't seem right. What if the killer is actually on the same team? For example, a citywatch kills a criminal. Does the nearby citywatch draw his sword and attack?


3. Armed guards cheer and mock the fallen enemy. Make sure he is dead, maybe a one last stab with their weapon? Then carry on with patrols.


That's a lot of work for a rare case...if the hostile AI can see each other, they'll already be fighting.

4. Civilians should always flee to their flee_point if they see any kind of violence.


Agreed.

5&6 seem to be going beyond the scope of reacting to bodies.
TDM Missions:   A Score to Settle   *   A Reputation to Uphold   *   A New Job   *    A Matter of Hours
 
Video Series:   Springheel's Modules   *   Speedbuild Challenge   *   New Mappers Workshop  *   Building Traps

#25 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5713 posts

Posted 29 January 2013 - 03:29 PM

5&6 seem to be going beyond the scope of reacting to bodies.

What do you mean by that, I don't understood? That it has nothing to do with reacting to bodies? That it should not be part of the code handling the ai reactions? That this is impossible to implement?

Regarding possible implementation notes:
"arrow out of nowhere": if one retrieve the person who shot the arrow (for example the player) you get his position and depending on the shot distance "draw" a circle around the specific entity. Pick a point out of this circle and let the alerted ai run to it to search the location

"subdividing tasks": the ai is already chatting to each other, for example when the inform the others about evidence seen. The first ai reacting to the dead body could go into the "investigating corpse" state. The other ai would go to the corpse and receive the information by the first ai that he is already inspecting the corpse, what cause them to search the area instead. Letting ai spread out in different directions in a way that makes sense is a bit trickier though.
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users