View Issue Details

IDProjectCategoryView StatusLast Update
0002859The Dark ModAIpublic25.06.2013 21:37
Reportergrayman Assigned ToSpringheel  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 1.06 
Target VersionTDM 1.07Fixed in VersionTDM 1.07 
Summary0002859: If an AI opens a door marked ShouldBeClosed, he becomes suspicious
DescriptionSee summary
Steps To ReproduceSee attached map.

Additional InformationThe AI should take into consideration that he's the one who opened the frackin' door.
TagsNo tags attached.

Relationships

related to 0003462 resolvedgrayman AI should turn head to look at doors opening 
has duplicate 0002338 resolvedgrayman Expand m_LastTouchedBy to Movers (doors, elevators) 

Activities

grayman

grayman

14.09.2011 00:34

administrator  

doortest.map (8,352 bytes)   
Version 2
// entity 0
{
"classname" "worldspawn"
"editor_drLastCameraPos" "37.2049 26.4475 94.7015"
"editor_drLastCameraAngle" "-23.4001 23.4007 0"
"editor_drMapPos1" "1738.55 1171.14 -520.531"
"editor_drMapAngle1" "14.7001 87.8977 0"
"editor_drMapPos2" "414.798 255.441 -264.933"
"editor_drMapAngle2" "2.10002 84.5976 0"
"editor_drMapPos3" "-749.97 -1606.21 -470.066"
"editor_drMapAngle3" "-3.29998 6.59757 0"
"editor_drMapPos4" "1014.05 -953.679 -556.857"
"editor_drMapAngle4" "-10.2 355.498 0"
"editor_drMapPos5" "987.599 3513.79 -319.877"
"editor_drMapAngle5" "-61.1999 172.198 0"
"editor_drMapPos6" "-1032.5 -2840 739.5"
"editor_drMapAngle6" "-77.0999 175.798 0"
"editor_drMapPos7" "952.822 285.005 1366.04"
"editor_drMapAngle7" "-74.8 149.373 0"
"editor_drMapPos8" "976 424 320"
"editor_drMapAngle8" "-3 15.3467 0"
"editor_drMapPos9" "409.146 547.464 392.83"
"editor_drMapAngle9" "-16.8 284.947 0"
// primitive 0
{
brushDef3
{
( 0 0 1 -136 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 1 0 -128 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 1 0 0 -512 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 -1 0 0 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( -1 0 0 0 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 0 -1 128 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
}
}
// primitive 1
{
brushDef3
{
( 0 0 1 -128 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 1 0 -136 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 1 0 0 -512 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 0 -1 0 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( -1 0 0 0 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 -1 0 128 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
}
}
// primitive 2
{
brushDef3
{
( 0 0 1 -128 ) ( ( 1 0 0 ) ( 0 2 16 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 1 0 -128 ) ( ( 1 0 8 ) ( 0 2 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 1 0 0 -520 ) ( ( 1 0 0 ) ( 0 2 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 0 -1 0 ) ( ( 1 0 0 ) ( 0 2 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 -1 0 0 ) ( ( 1 0 8 ) ( 0 2 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( -1 0 0 512 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
}
}
// primitive 3
{
brushDef3
{
( 0 1 0 -128 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 1 0 0 -512 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 0 -1 -8 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 -1 0 0 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( -1 0 0 0 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 0 1 0 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
}
}
// primitive 4
{
brushDef3
{
( 0 0 1 -128 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 1 0 0 -512 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 0 -1 0 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 -1 0 -8 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( -1 0 0 0 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 1 0 0 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
}
}
// primitive 5
{
brushDef3
{
( 0 0 1 -128 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 1 0 -128 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 0 -1 0 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 -1 0 0 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( -1 0 0 -8 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 1 0 0 0 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
}
}
// primitive 6
{
brushDef3
{
( 0 0 1 -128 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 1 0 0 -264 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 0 -1 0 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 -1 0 0 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( -1 0 0 256 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 1 0 -38 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
}
}
// primitive 7
{
brushDef3
{
( 0 0 1 -128 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 1 0 -128 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 1 0 0 -264 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 0 -1 0 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( -1 0 0 256 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 -1 0 87 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
}
}
// primitive 8
{
brushDef3
{
( 0 0 1 -128 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 1 0 0 -264 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 0 -1 96 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( -1 0 0 256 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 1 0 -87 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
( 0 -1 0 38 ) ( ( 0.015625 0 0 ) ( 0 0.03125 0 ) ) "textures/darkmod/carpet/rugs/ornate_black_gold01" 0 0 0
}
}
}
// entity 1
{
"classname" "info_player_start"
"name" "info_player_start_1"
"origin" "24 104 8"
}
// entity 2
{
"classname" "atdm:ai_builder_guard"
"name" "atdm_ai_builder_guard_1"
"origin" "128 64 8"
"team" "0"
"target0" "path_corner_3"
}
// entity 3
{
"classname" "atdm:door_96x48_2hinge"
"name" "door_96x48x2hinge_1"
"lock_picktype" "-"
"lock_pins" "0"
"locked" "0"
"origin" "259.851 86.8415 0"
"rotate" "0 90 0"
"skin" "door_004"
"used_by" "-"
"rotation" "0 -1 0 1 0 0 0 0 1"
"shouldBeClosed" "1"
}
// entity 4
{
"classname" "atdm:handle_curved_rotate_double_right"
"name" "doorhandle_96x48x2hinge_1"
"bind" "door_96x48x2hinge_1"
"origin" "259.851 42.8415 50.5"
"rotation" "0 -1 0 1 0 0 0 0 1"
}
// entity 5
{
"classname" "path_corner"
"name" "path_corner_1"
"origin" "75 64 0"
"target0" "path_corner_3"
}
// entity 6
{
"classname" "path_corner"
"name" "path_corner_3"
"origin" "435 64 0"
"target0" "path_corner_1"
}
// entity 7
{
"classname" "light"
"name" "light_1"
"origin" "384 62 116"
"light_center" "0 0 0"
"light_radius" "320 320 320"
}
// entity 8
{
"classname" "light"
"name" "light_3"
"origin" "106 106 116"
"light_center" "0 0 0"
"light_radius" "320 320 320"
}
doortest.map (8,352 bytes)   
grayman

grayman

14.09.2011 04:11

administrator   ~0004020

I'm thinking that the solution is to mark the door with the player or the AI's name so that:

- an AI opening the door knows he's not to become suspicious if his name is on the door
- nearby AI alerted by the open door will also not react if they can see the door, see the name on the door, and can see that AI
- AI who come upon the open door later probably won't be able to see the AI that opened it, so they'll treat it as suspicious
- if the AI who opened the door comes upon the door later, and it's still open, and no one's touched it since he opened it, he'll see his name on the door and won't become suspicious. "Oh, crap. I forgot to close it earlier."
- if an AI comes upon an open door that should be closed, he should close it whether he becomes suspicious or not
Springheel

Springheel

14.09.2011 21:17

administrator   ~0004021

Probably stating the obvious here, but the AI should finish his search before closing the door.

Also might look odd if he closes the door, then opens it again to continue on his route...is there a way to check if his path will go through the door, and if so not close it until he is on the other side?
grayman

grayman

15.09.2011 00:50

administrator   ~0004030

AI won't close a door if they're searching.

And you're right. A patrolling AI who deviates from his route to close a door that should be closed should only do that if the door isn't on his route. If that door is on his route, he's going to close it anyway after he passes through it.

What's missing atm is getting an AI to go to a door and close it when he doesn't need to pass through it.

I'll need to check if a searching AI will close a suspicious door if he ends his search w/in sight of the door. He should be doing that now. I know there's a bug when he's dealing with double doors of this type, but I forget if the same bug occurs with single doors.
grayman

grayman

20.09.2011 00:45

administrator   ~0004036

The solution is to mark the door with the player or the AI's name so that:

- an AI opening the door knows he's not to become suspicious if his name is on the door
- nearby AI alerted by the open door will also not react if they can see the door, see the name on the door, and can see that AI
- AI who come upon the open door later probably won't be able to see the AI that opened it, so they'll treat it as suspicious
- if the AI who opened the door comes upon the door later, and it's still open, and no one's touched it since he opened it, he'll see his name on the door and won't become suspicious. "Oh, crap. I forgot to close it earlier."

If an AI comes upon an open door that should be closed, he should close it whether he becomes suspicious or not.

When determining if an AI can ‘see’ a door, use the center of the door’s bounds and not its origin. The AI will be more successful using the former than using the latter.

rev. 4974:

State.cpp
HandleDoorTask.cpp
ai.cpp
ai.h
BinaryFrobMover.cpp
BinaryFrobMover.h
FrobDoor.cpp
FrobDoor.h
player.cpp
entity.cpp

The only bit that's not implemented here is having AI make sure they close a suspicious door. That will be dealt with as part of 0002841.
Springheel

Springheel

19.06.2013 19:38

administrator   ~0005577

Last edited: 19.06.2013 19:40

View 3 revisions

" nearby AI alerted by the open door will also not react if they can see the door, and can see the AI that opened it "

I tested this in my update to Score to Settle, but I had guards starting to get worked up about a door that was being used regularly by another guard. How does the above check ("if they can see the AI") work? Do they have to see the AI at the moment the door opens? Is there any kind of grace period? It's quite possible an AI on the other side of a door could see the door open but not yet see the AI.

What about light levels? If the door is lit but the guard who opened it is coming out of a dark room, will that result in an alert?

Also, is the visual stim bound to the door, and thus moves with the door, or does it stay in the location it would be when the door is closed?

grayman

grayman

19.06.2013 20:37

administrator   ~0005579

Each door keeps track of who used it last. This is either an AI or NULL (if it hasn't been used yet by AI, or the player was the last one to use it).

Let's say Tom used the door last, and Bill sees that the door is open.

Bill checks if there's LOS from him to Tom. There's no grace period. FOV and light level don't matter. If so, no suspicion. If not, Bill checks whether Tom is w/in 150 units of the door origin. If so, no suspicion.

If this fails, Bill checks for ANY AI near the door. If he finds someone, no suspicion. If he finds no one, the door is suspicious.

If the player was the last to use the door, or the door doesn't know who used it last, it's considered suspicious.

The door's visual stim emanates from its origin.
Springheel

Springheel

19.06.2013 20:50

administrator   ~0005580

Last edited: 19.06.2013 20:52

View 2 revisions

Hmm, ok, that all sounds really good. I'm not sure how the door was causing alerts in my map then. I'll see if I can reproduce the behaviour in a testmap.

One other thing...how quickly do AI do register a door open? Is the check done the moment the door begins to open, if it's in the AI's LOS?

grayman

grayman

19.06.2013 23:22

administrator   ~0005581

As soon as the door begins to open, its visual stim is enabled.

The stim will be sent out either in the same frame or the next. After that, it fires every 2 seconds (on average) until the door is closed again.

If an AI has the door in his FOV when it starts opening, he'll be stimmed right away. The odds of his noticing the stim depend on his 'chanceNoticeDoor' spawnarg.
Springheel

Springheel

23.06.2013 14:45

administrator   ~0005588

For the record, I've made myself a testmap and have been doing some preliminary tests, but haven't been able to recreate a problem.
grayman

grayman

25.06.2013 17:46

administrator   ~0005590

I downloaded the test map and with 'alert debugging' turned on, I see no rise in the guard's alert level as he uses the door. I let him use it several times and his level never left 0.
Springheel

Springheel

25.06.2013 21:37

administrator   ~0005593

I'm going to close this then. I guess maybe it was something else that alerted the guards in my map.

Issue History

Date Modified Username Field Change
14.09.2011 00:34 grayman New Issue
14.09.2011 00:34 grayman File Added: doortest.map
14.09.2011 04:11 grayman Note Added: 0004020
14.09.2011 21:17 Springheel Note Added: 0004021
15.09.2011 00:50 grayman Note Added: 0004030
15.09.2011 22:11 grayman Assigned To => grayman
15.09.2011 22:11 grayman Status new => assigned
20.09.2011 00:45 grayman Note Added: 0004036
20.09.2011 00:45 grayman Status assigned => resolved
20.09.2011 00:45 grayman Resolution open => fixed
20.09.2011 00:45 grayman Fixed in Version => TDM 1.07
20.09.2011 00:45 grayman Target Version => TDM 1.07
18.10.2011 21:44 grayman Relationship added has duplicate 0002338
19.06.2013 19:38 Springheel Note Added: 0005577
19.06.2013 19:40 Springheel Note Edited: 0005577 View Revisions
19.06.2013 19:40 Springheel Note Edited: 0005577 View Revisions
19.06.2013 20:37 grayman Note Added: 0005579
19.06.2013 20:50 Springheel Note Added: 0005580
19.06.2013 20:52 Springheel Note Edited: 0005580 View Revisions
19.06.2013 21:02 Springheel Assigned To grayman => Springheel
19.06.2013 21:02 Springheel Status resolved => assigned
19.06.2013 21:08 Springheel Status assigned => feedback
19.06.2013 23:22 grayman Note Added: 0005581
19.06.2013 23:22 grayman Status feedback => assigned
23.06.2013 14:45 Springheel Note Added: 0005588
25.06.2013 00:11 Springheel Relationship added related to 0003462
25.06.2013 13:07 Springheel Status assigned => feedback
25.06.2013 17:46 grayman Note Added: 0005590
25.06.2013 17:46 grayman Status feedback => assigned
25.06.2013 21:37 Springheel Note Added: 0005593
25.06.2013 21:37 Springheel Status assigned => resolved