View Issue Details

IDProjectCategoryView StatusLast Update
0003338The Dark ModAIpublic16.03.2013 19:48
ReporterSpringheel Assigned Tograyman  
PrioritynormalSeveritynormalReproducibilityhave not tried
Status resolvedResolutionfixed 
Product VersionTDM 2.00 
Target VersionTDM 2.00Fixed in VersionTDM 2.00 
Summary0003338: AI Greetings should have additional limits
Descriptionhttp://forums.thedarkmod.com/topic/14564-ai-greetings/page__pid__306754#entry306754

Now that AI are greeting each other more often, we may want to revisit some rules about when they do it. I've had a few cases of greetings that sound pretty inappropriate; for example, two AI finish searching for me, put away their swords, and one says to the other, "Quiet night, huh?" And he wasn't being sarcastic. :P

I'm pretty sure AI who are in alert mode don't give greetings already, but the following might worth considering:

1. AI probably should not give greetings to other AI who are alert (even if they aren't alert themselves...you wouldn't walk up to a guard with his sword out and chat).

2. AI shouldn't greet other AI within X minutes of ramping down from an alert. Maybe Level x .5 minutes.

3. AI should (IMO) greet the player if they are on the same team (or possibly neutral).
TagsNo tags attached.

Activities

grayman

grayman

15.03.2013 01:13

viewer   ~0005181

Last edited: 15.03.2013 01:22

For # 2, when an AI ramps down from an alert, I assume you mean the moment when he ramps down to Idle or Alert_Idle. That's the point where he emits his rampdown barks. If he goes back to Idle state, where he sheathes his weapon, do you still want him to delay greetings? It seems he's in a more relaxed place in Idle than in Idle_Alert, where he patrols with his weapon drawn.

grayman

grayman

15.03.2013 01:23

viewer   ~0005182

For # 3, should a passing friendly AI give the player a warning, the same way that AI would warn his other friends?
Springheel

Springheel

15.03.2013 01:33

administrator   ~0005184

Last edited: 15.03.2013 01:40

Re 2: My understanding is that AI do not do greetings at all when in alert_idle state; if this isn't the case now then it should be. AI with their swords out should not be saying, "Quiet night, huh?" to people as they pass...if anything, they should give warnings, not greetings.

So 2 would apply when the AI ramps down to regular idle mode. We don't want him greeting someone with a cheery, "Hello there," after just searching together.

3 .... hmmm, I guess so? I'm having a hard time imagining scenarios where this would happen.

grayman

grayman

15.03.2013 14:02

viewer   ~0005186

The code allows greetings in any state below Observant.

This means idle and alert idle both allow greetings, since both are Relaxed, the only state below Observant.

I'll change it so greetings are no longer exchanged when a weapon is drawn.
grayman

grayman

16.03.2013 00:15

viewer   ~0005192

Last edited: 16.03.2013 02:49

For # 3, you said "on the same team". That's different than "is a friend of mine".

Builders (team 1) and City Watch (team 2) are friendly to each other.

If I put the player on the Builder team, should City Watch guards exchange greetings with me?

I think they should, but I want to make sure.

Springheel

Springheel

16.03.2013 03:22

administrator   ~0005194

Yes, sorry, I meant friendly.
grayman

grayman

16.03.2013 03:42

viewer   ~0005195

Okay, thanks.

The code is all in place. It's strange walking around among friendly AI and having them greet me.

I'll probably spend tomorrow testing and commit it tomorrow night.
grayman

grayman

16.03.2013 19:35

viewer   ~0005196

Last edited: 16.03.2013 19:45

1. AI should not give greetings to other AI who are alert (even if they aren't alert themselves...you wouldn't walk up to a guard with his sword out and chat). FIXED by checking whether the receiving AI has a weapon drawn.
2. AI shouldn't greet other AI within X minutes of ramping down from an alert. Maybe Level x .5 minutes. FIXED by delaying the ability to greet others by highest alert index achieved divided by 2 minutes. So an AI coming down from combat would delay greetings by 5/2 = 2.5 minutes after he reaches the Alert Idle state.
3. AI should (IMO) greet the player if they are on the same team (or possibly neutral). FIXED by letting friendly or neutral AI greet the player. They can also warn the player about things that have alerted them.

rev. 5716:

IdleState.cpp
State.cpp
GreetingBarkTask.cpp
AI.cpp
AI.h
AI_events.cpp
Memory.cpp
Memory.h
Actor.cpp
Actor.h
Player.cpp
Player.h

Springheel

Springheel

16.03.2013 19:45

administrator   ~0005198

Last edited: 16.03.2013 19:48

"So an AI coming down from combat would delay greetings by 5/2 = 2.5 minutes after he reaches the Alert Idle state."

Earlier you said "I'll change it so greetings are no longer exchanged when a weapon is drawn." I'm a bit confused by that example. Wouldn't an AI coming down from combat have a weapon out and therefore not greet at all?

grayman

grayman

16.03.2013 19:46

viewer   ~0005199

SVN has a new windows DLL in tdm_game01.pk4.

Remember to delete darkmod/gamex86.dll before testing.
grayman

grayman

16.03.2013 19:48

viewer   ~0005200

"Greetings are different from warnings, correct? Shouldn't AI who have been in combat be warning other AI about an intruder, rather than saying, "Nice night, isn't it?" three minutes after fighting an intruder?"

Yes, and he will not wait three minutes to give a warning. He only waits three minutes to pass greetings, which he will never again do if he has a warning to pass along.

Warnings take precedent over greetings, and only greetings wait for the delay to expire.

Issue History

Date Modified Username Field Change
08.03.2013 01:21 Springheel New Issue
08.03.2013 04:51 grayman Assigned To => grayman
08.03.2013 04:51 grayman Status new => assigned
15.03.2013 01:13 grayman Note Added: 0005181
15.03.2013 01:22 grayman Note Edited: 0005181
15.03.2013 01:23 grayman Note Added: 0005182
15.03.2013 01:23 grayman Status assigned => feedback
15.03.2013 01:33 Springheel Note Added: 0005184
15.03.2013 01:33 Springheel Status feedback => assigned
15.03.2013 01:35 Springheel Note Edited: 0005184
15.03.2013 01:36 Springheel Note Edited: 0005184
15.03.2013 01:40 Springheel Note Edited: 0005184
15.03.2013 14:02 grayman Note Added: 0005186
16.03.2013 00:15 grayman Note Added: 0005192
16.03.2013 02:49 grayman Note Edited: 0005192
16.03.2013 03:22 Springheel Note Added: 0005194
16.03.2013 03:42 grayman Note Added: 0005195
16.03.2013 19:35 grayman Note Added: 0005196
16.03.2013 19:35 grayman Status assigned => resolved
16.03.2013 19:35 grayman Resolution open => fixed
16.03.2013 19:35 grayman Fixed in Version => TDM 2.00
16.03.2013 19:45 grayman Note Edited: 0005196
16.03.2013 19:45 Springheel Note Added: 0005198
16.03.2013 19:46 grayman Note Added: 0005199
16.03.2013 19:46 Springheel Note Edited: 0005198
16.03.2013 19:47 Springheel Note Edited: 0005198
16.03.2013 19:47 Springheel Note Edited: 0005198
16.03.2013 19:48 grayman Note Added: 0005200
16.03.2013 19:48 Springheel Note Edited: 0005198