Jump to content
The Dark Mod Forums

AI don't care about violent deaths


Recommended Posts

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...)

 

If an archer accidentally shoots a friendly, the AIs are likely already in combat. Seeing kills in combat should not stop the combat and ensue the "look for killer" activity. Also, I wasn't thinking about any team changes. If an archer hits a friendly, they should still be friends, otherwise the player could machinate evil "Citywatch squad massacres itself" -kind of sillyness in combat.

 

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?

 

Again, no team switches. A thief and a guard (who are neutral towards each other) are chatting. The player shoots the guard from the shadows. The thief goes "WTF!" crouches in surprise and shock, looks around, pulls out his weapon, starts actively looking around for threats and checks the corpse (gladly palming the coinpurse). The thief sees the player in the shadows, says "hi" and then goes about his business. He is certainly going to have his weapon in his hand for the remainer of the evening. (so he gets to alerted state, but does not mind the player.)

 

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

 

True that! And the AIs already have a line when they kill an enemy.

Clipper

-The mapper's best friend.

Link to post
Share on other sites
  • Replies 84
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I didn't find much consensus here, other than AI reacting better when they witness a death or KO in front of them (issue #3317).   There are a lot of suggestions that would require considerable change

Ok, I've created a new soundshader called "snd_to_flee_event" for all human vocal sets. It's appropriate for civilians finding an alarming 'event' yet not necessarily seeing who is responsible.   The

Thief meets the player in the shadows, says "hi" and then goes about his business. He is certainly going to have his weapon in his hand for the remainer of the evening.

This should only happen if enough time has elapsed. If not, the behaviour may depend on the team relation of the thief and the player or on the behaviour of the player. If, for example, the player still has his weapon drawn several seconds after the kill, the thief should consider the player as a threat (if he were not he would already put away his weapon, wouldn't he?).

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to post
Share on other sites
What do you mean by that, I don't understood? That it has nothing to do with reacting to bodies?

 

Yes, that. Both of those are worthy things to look at and they've been discussed before, but we should keep them separate from reacting to dead bodies.

 

 

If an archer hits a friendly, they should still be friends

 

That's not the way the code currently works. If a friendly does damage to another friendly, the victim turns hostile.

 

The player shoots the guard from the shadows. The thief goes "WTF!" crouches in surprise and shock, looks around, pulls out his weapon, starts actively looking around for threats and checks the corpse (gladly palming the coinpurse). The thief sees the player in the shadows, says "hi" and then goes about his business.

 

So they search, but only attack if they're already hostile? I guess that would work.

Link to post
Share on other sites

I really thought I've seen guards clump up & hit each other and not fight each other. (But it might have been they were too preoccupied running after me.)

 

Again, no team switches. A thief and a guard (who are neutral towards each other) are chatting. The player shoots the guard from the shadows. The thief goes "WTF!" crouches in surprise and shock, looks around, pulls out his weapon, starts actively looking around for threats and checks the corpse (gladly palming the coinpurse). The thief sees the player in the shadows, says "hi" and then goes about his business. He is certainly going to have his weapon in his hand for the remainer of the evening. (so he gets to alerted state, but does not mind the player.)

 

In gameplay terms, this is a bit confusing signal. The AI states are in part about giving alert signals to the player, green / yellow / red states. So an AI going into a agitated search state but not after the player kind of tosses out the whole clear signaling function of alert barks. How does the player know when an agitated search barks & behavior are against him or not, short of exposing himself to the guard? I suppose it would work if it's very clear from the story the AI is a visible ally of the player and going on alert against a mutual enemy. But all of this should not determined by the mapper whether the behavior is "on" or "off".

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to post
Share on other sites

I really thought I've seen guards clump up & hit each other and not fight each other. (But it might have been they were too preoccupied running after me.)

 

I have this as well. I think an AI in melee with me was shot in the back by an archer. The AI got hurt but did not attack his friend. Of course it might have been that the melee AI was closer to me and facing me so I was still the prime target.

 

I agree the whole system should be spawnarg controllable.

 

Gameplay indicators or not, a neutral AI should react *somehow* to AI getting gruesomely killed in front of them and the behavior should be something that we already have code for (fleeing and searching). Is it feasable to make unique behavior for such a rare case?

 

The 'arrow from nowhere' feature is important because it would prevent the player from sniping an entire squad of guards from the shadows, one by one as the poor buggers stupidly look around their fallen friend.

 

There should be a high risk shooting an AI that is in view of another AI. Get the monster position that fired a killing arrow and make a search around that area, like obst proposed.

Clipper

-The mapper's best friend.

Link to post
Share on other sites
Gameplay indicators or not, a neutral AI should react *somehow* to AI getting gruesomely killed in front of them

 

Another thought...I don't believe the code cares when the AI died. As far as I can tell AI react the same way if they see someone killed in front of them or if they stumble on a dead body while patrolling.

 

Maybe what we need is separate behaviour for AI who see people killed in front of them.

 

I think the one thing we've agreed on is that all civilian AI should run to their flee points if they spot a dead body. So I'll add that to the tracker. Though even there some questions still need to be answered: does this include animals? do civilians run away every time they spot the same body? (flee, calm down, resume patrol, see body, flee, repeat) how far away should this behaviour kick in?

Link to post
Share on other sites

Actually running to a flee point would only make sense if the specific flee points are guarded. Running to an area that is supposed to be not guarded when seeing a dead body seems silly to me.

 

On the second note: Yes, it would be strange if the AI would do this

(flee, calm down, resume patrol, see body, flee, repeat)

The question is what else the civilians should do in such a case. As there are some thoughts behind the patrol routes it may have some negative effects on gameplay to just force them to avoid the area or set them on a patrol that does not go through the specific area (not mentioning the implementation effort).

 

I guess the easiest effort would be to let them flee once to a flee point that is set to guarded or, if such a flee point doesn't exist, just let it run to a nearby guard (yeah, it's cheating). The civilian should do this only once per body.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to post
Share on other sites

It's up to mappers to set flee points and whether they're guarded. If they don't set believable ones we can't do much about it.

Link to post
Share on other sites

Fleeing could be appropriate if a friendly is killed right next to an AI, but I'm not sure about fleeing just when they see a body... Because in many cases the danger has long gone, so it would be odd for the AI to just flee. I think a civilian might try to tell someone (a city watch) about it, so definitely barks about it. And maybe even go into a "wary state" or "scared state" where they bark about being scared and freak out more than usual if they see the player or an enemy. That would be kind of cool actually. But in real life, if you saw a body on the street, I don't think our first reaction is to run away on the spot. I think the first reaction is to actually stay put where you are & very still, rather than running into danger.

 

So yeah, I'm not for fleeing when seeing bodies, aside from even the problems you mention. But I do like the idea of entering an extended "scared state" until they ramp down. Or maybe just that the suspicious state should be more "scared state"-like for civilians.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to post
Share on other sites

What would a "scared state" look like?

 

Running to a guarded flee point would look very much like a civilian running to get help, which seems reasonable to me if you stumble on an obviously murdered body.

Link to post
Share on other sites

A scared state on reflection is just the suspicious state for civilians. He or she looks around and worries if the danger is still nearby, ready to strike, and has barks to that effect. Since they don't know where the danger is coming from, or if it's even still around, they don't quite know what to do.

 

My aversion comes from past games where civilians are quite cry-and-flee prone, where at the drop of a hat they all freak out and start running. For those games it can break immersion a little to have perpetually freaked civilians when you're trying to sneak around. It's appropriate when they see the player (& they deserve the annoyance for not sneaking better), but static things that just stay around like bodies, where the context is always different, seemed like too much in some situations (although they shouldn't have left out a body too).

 

They should notice it and bark, I agree on that, but I thought it was too context sensitive if they actually freak out and flee to have it a general feature. In some contexts it's make sense (they go to the nearest police station or the house guards to let them know something is up), in other contexts (out in the forest or some back streets late at night) it would less. I guess it's the "running for their lives" part of it that seemed an exaggerated response. I don't think it'd be the worst thing if it were in though.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to post
Share on other sites

Another thought...I don't believe the code cares when the AI died. As far as I can tell AI react the same way if they see someone killed in front of them or if they stumble on a dead body while patrolling.

 

Maybe what we need is separate behaviour for AI who see people killed in front of them.

 

These two observations where he whole intention of this thread.... :rolleyes: But glad we have finally arrived on the same page :D

 

I think the one thing we've agreed on is that all civilian AI should run to their flee points if they spot a dead body. So I'll add that to the tracker. Though even there some questions still need to be answered: does this include animals? do civilians run away every time they spot the same body? (flee, calm down, resume patrol, see body, flee, repeat) how far away should this behaviour kick in?

 

I'm not that sure about flee points, I'd rather say there should be a "panic mode". Either run like hell somewhere (even into a wall), or shriek and cover and sob intears (female), or kneel down and start praying or other random irrational behaviours. Running towards a flee point is actually more of a rational, sane, planned decision, which I think an unarmed civilian might not make when faced with half a brain laying on the street from an arrow impact. :ph34r:

"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

Link to post
Share on other sites

What would a "scared state" look like?

 

Running to a guarded flee point would look very much like a civilian running to get help, which seems reasonable to me if you stumble on an obviously murdered body.

 

We are getting a bit off-track here, I wasn't talking about "what happens when a civilian stumbles on a body". Not sure what the current behaviour is, but it might already work. Optins like flee, or ignore (seen already) come to mind.

 

But in any event, this thread is about an AI seeing (or hearing) someone die right in front of them, possible in a violent way. This should be a different reaction, alert for armed, and either panic mode or "pick up weapon and be alert" for civilians. What exactly is for discussion, but lets please not stray too much :)

"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

Link to post
Share on other sites

So regarding seeing an AI been killed:

AI type, relationship to player, relationship to dead AI: reaction

  • unarmed, hostile or neutral, hostile or neutral: flee
  • unarmed, friendly, neutral: some sort of reaction ("What are you doing?", flee if player don't put away his weapon (maybe switch to neutral relationship)
  • unarmed, friendly, hostile: stay + some sort of reaction ("kill that bastard")
  • unarmed, friendly, friendly: set to neutral, if player don't stops it set to hostile+ flee
  • armed, hostile, all cases: search and attack
  • armed, neutral, hostile: he will attack anyway (no changes)
  • armed, neutral, neutral: this should depend on the kind of AI, if it is a city watch or a builder he should not tolerate murder, else the AI should tolerate it as long as the player puts away his weapon afterwards
  • armed, neutral, friendly: attack the player + set to hostile
  • armed, friendly, neutral or hostile: assist the player
  • armed, friendly, friendly: set to neutral, if player don't stops it set to hostile+ flee

These are my ideas. :smile:

 

Regarding the other topic (unarmed AI finds body): In terms of gameplay I would say that the AI should flee the first time he saw the body if and only if there is a guarded flee point nearby (thus meaning within a certain range). If it is not it may investigate the corpse ("Is he really dead?") and look around nervously. I guess this is a good compromise. In both cases the AI should use a bark that alerts nearby AI, but in the latter case the bark may be not as "loud".

 

Sorry Tels, just had to say this :smile:

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to post
Share on other sites

Phew. A lot of stuff has been said and it is starting to be difficult to remember everything.

 

Some simplified mid-way conclusions, from my perspective to help keeping this simple.

 

AI should be able to discern a AI dying in their view from just seeing a corpse.

 

 

The discussion has been about "AI seeing another AI die"

Maybe "AI seeing another AI die" should actually be "AI seeing another AI collapse." Due to arrow, blackjack, gas arrow, mine, backstab and tachyon blaster.

 

"AI finding a corpse" should have different behavior from "AI seeing another AI collapse."

 

"AI finding a corpse" behavior is already there, but it has been suggested civilians flee to guarded flee_point when they first see the body. Afterwards they don't care about the corpse anymore.

 

"AI seeing another AI collapse" behavior needs some shock anims/barks to be effective. In this behavior, the AI should be more efficient: they just witnessed a kill and should act quickly in order to get the assailant. In a stealth game killing an AI so that someone sees it should be a bad move, from which a difficult situation should emerge.

 

The stuff above are the starting issues.

After these, come then the what AIs of different disposition (friend, hostile, neutral) should do. These should be divided into "corpse discovery" and "AI seeing another AI collapse."

 

The list Obst just gave looks difficult.

Big question. Stop and think. Is "AI seeing another AI collapse" useful enough that the trouble implementing it is worth it? Could we just manage by tuning "AI finds a corpse" behavior we already have?

 

What if the AI simply had a shock anim when they discover a corpse?

 

A and B are armed:

1) A is chatting with another B. A is killed or KOd from the shadows. B plays shock anim, checks the body and searches.

2) A is killed alone. B arrives. B plays shock anim, checks the body and searches.

 

A and B are civilian:

1) A is chatting with another B. A is killed or KOd from the shadows. B plays shock anim, and runs to the nearest guarded flee_point.

2) A is killed alone. B arrives. B plays shock anim, and runs to the nearest guarded flee_point.

 

These might work just fine.

 

The "AI seeing another AI collapse" behavior is only useful if the behavior makes the AI more effective in getting the culprit. Otherwise it might not be needed at all!

 

In this scenario, now comes the question whether which corpses (neutral,friendly) should cause panic in the AI. I feel that friendly and neutral corpses should both be unnerving.

Clipper

-The mapper's best friend.

Link to post
Share on other sites

A specific reaction to an AI dying (seeing them collapse, or just a simple "having a visStim on the AI within 5 seconds after they go ragdoll" is what the actual algorithm might look like) would be a nice reaction that does differ from just seeing a corpse, so definitely worth implementing to anyone wanting to take on the task IMO.

 

In my understanding, an AI would want to flee or seriously react, like shouting, when a teammate dies/KOs because they realize they're in the crosshairs too and feel the imminent danger, but when they run into a body it's just unnerving and they'd bark about it, but not immanent risk, not fleeing, not insane shouting.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to post
Share on other sites
  • 3 weeks later...

I didn't find much consensus here, other than AI reacting better when they witness a death or KO in front of them (issue #3317).

 

There are a lot of suggestions that would require considerable changes to what happens now, as well as barks and animations that would need to be created.

 

So I kept it rather simple while responding to the issue, and here are the behaviors at this point ...

 

1 - "Event" is a murder or knockout of someone.

 

2 - "Seeing an event" means the stim from the body reaches the observer less than 4 seconds after the event.

 

3 - "Witness" is somebody who sees an event, regardless of whether they are friendly or neutral toward the victim.

 

4 - "Finder" is somebody who doesn't see the event, but discovers the body after 4 seconds have passed since the event.

 

5 - Once stimmed, all witnesses and finders delay their reaction randomly from 0.5 to 1.5 seconds.

 

6 - An armed witness will draw his weapon and begin searching. He will not bark about the event, or kneel by the body.

 

7 - If a finder is neutral to the body, there's a 50% chance he will ignore it.

 

8 - If he does react to it, an armed finder will bark that he found a body, draw his weapon, kneel by the body, and start searching.

 

9 - Unarmed or civilian witnesses flee.

 

10 - If unarmed or civilian finders react to a dead body, they'll bark, then flee.

 

11 - If unarmed or civilian finders react to an unconscious body, they'll bark, kneel by the body, and start searching.

 

12 - A fleeing AI won't join an ongoing search.

 

None of this is checked in yet.

 

Comments welcome.

  • Like 2
Link to post
Share on other sites

These sound really good. Maybe give the AI a random chance to kneel at the body in items #6, #8 and #11? A little bit randomness and variety.

Could #6 have a bark? I think we have "murder!" "Man down!" barks already for the AI?

Clipper

-The mapper's best friend.

Link to post
Share on other sites

These sound really good. Maybe give the AI a random chance to kneel at the body in items #6, #8 and #11? A little bit randomness and variety.

Could #6 have a bark? I think we have "murder!" "Man down!" barks already for the AI?

 

I agree with this. It makes perfect sense. In the eventually there's some sort of alarm thing nearby, they should also reach for it.

Link to post
Share on other sites

Maybe give the AI a random chance to kneel at the body in items #6, #8 and #11? A little bit randomness and variety.

Could #6 have a bark? I think we have "murder!" "Man down!" barks already for the AI?

 

6 - Springheel requested that witnesses not kneel at the body. It makes sense to me that a witness would be more concerned with looking around to see who might have committed the crime than going to the body and checking it.

 

The barks we have for finding a body are more relevant to finding than witnessing, thus the suggestion not to bark. If Spring wants to put together a new snd_* for witnesses, I'll be happy to add it.

 

8, 11 - I could add some randomness for finders kneeling. 50%?

Link to post
Share on other sites

I agree with this. It makes perfect sense. In the eventually there's some sort of alarm thing nearby, they should also reach for it.

 

Since we don't have standard alarm things, I won't be following up on this. Mappers could set something up if they needed it, and when we get the whole security zone thingy working, creating behavior like this should be easier.

Link to post
Share on other sites

Yes, but the mapper has to create the triggers and buttons and whatever for the alarm, and the AI isn't going to be able to recognize the design on his own, in order to know where to go or how to operate it. And there's no way to keep 10 AI from rushing to the same button at the same time.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...