View Issue Details

IDProjectCategoryView StatusLast Update
0005268The Dark ModAIpublic03.12.2020 19:06
Reportergrayman Assigned Tograyman  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 2.07 
Target VersionTDM 2.08Fixed in VersionTDM 2.08 
Summary0005268: AI in King of Diamonds gets stuck on a chair, mission fails
DescriptionParkins, a main character in King of Diamonds, sits down in a chair in his attic.

When he goes to leave, he gets stuck treadmilling, and can't leave the attic.

This fails the mission, because Parkins is carrying the only key to the attic door, and it's important that the player be able to get into the room.
TagsNo tags attached.

Activities

grayman

grayman

29.05.2020 11:34

viewer   ~0012577

When an AI gets stuck on an object that’s behind him, there’s no reason he shouldn’t be able to move forward. Temporarily make the object non-solid so it loses its grip on the AI, until the AI leaves. Then make the object solid again.

Fixed in rev. 8743:

State.cpp
Entity.cpp
Entity.h
grayman

grayman

01.06.2020 12:43

viewer   ~0012582

Additional in rev. 8745:

Actor.cpp
Actor.h
AI.h
State.cpp
Entity.cpp
Entity.h

Rev. 15943:

tdm_ai_base.script
grayman

grayman

02.06.2020 14:55

viewer   ~0012584

Additional in rev 8749:

Entity.cpp
nbohr1more

nbohr1more

04.06.2020 04:10

developer   ~0012585

Last edited: 04.06.2020 15:19

Rev 8750 before the door
KODR1.save (2,615,171 bytes)
nbohr1more

nbohr1more

04.06.2020 04:10

developer   ~0012586

After noclipping
nbohr1more

nbohr1more

04.06.2020 04:11

developer   ~0012587

KODR2.save (2,616,894 bytes)
nbohr1more

nbohr1more

04.06.2020 04:11

developer   ~0012588

After alerting the AI
KODR3.save (2,614,253 bytes)
nbohr1more

nbohr1more

04.06.2020 04:12

developer   ~0012589

Parkins is treadmilling but alerting him will release him from the situation.
nbohr1more

nbohr1more

04.06.2020 04:55

developer   ~0012590

Hmm. This was replicated with capped FPS ( com_fixedTix 0 ).

Uncapping FPS restored the fix...
grayman

grayman

04.06.2020 15:19

viewer   ~0012591

I can't use KODR2 or KODR3.

I need a failure savegame prior to Parkins reaching the chair.
nbohr1more

nbohr1more

04.06.2020 16:34

developer   ~0012592

Hmm...

I again played with TDM on all "safe" settings (capped FPS, no multi-core) and noclipped right to the attic
then waited for Parkins. On attempting to save as he was approaching the desk, the game crashed to desktop.
nbohr1more

nbohr1more

05.06.2020 03:07

developer   ~0012593

SVN Rev 8752

The above "noclip" replication now saves with no error or crash.
After saving, Parkins had no trouble leaving his seat and exiting the room.

I will try a full replication to verify further.
nbohr1more

nbohr1more

05.06.2020 04:06

developer   ~0012594

I cannot replicate the problem on rev 8752 with either safe or experimental settings.
grayman

grayman

05.06.2020 04:07

viewer   ~0012595

Note to self:

Rather than checking sit/sleep completion flag once, try checking it until the AI is free of the chair/bed. Then clear it. There could be a timing issue between the setting and checking of the flag, and multiple checks should be able to deal with it.
nbohr1more

nbohr1more

06.06.2020 22:19

developer   ~0012599

Last edited: 07.06.2020 02:23

A thought:

This seems to only happen when the AI is far out of sight.... "Interleaved Thinking" at play here?

Edit:

tdm_ai_opt_disable 0

seems to cure this issue in 2.08 Beta 7...

Edit 2:

More testing.
I was able to reproduce it with this setting. Sorry
grayman

grayman

07.06.2020 18:49

viewer   ~0012602

Revs 8758, 8768, and 15950 round out the addition of checking AI who don't run into an obstacle after sitting/sleeping.
grayman

grayman

07.06.2020 19:02

viewer   ~0012603

Interleaved thinking won't be in play.

The sitting/standing/sleeping anims need to stay in sync, so the AI gets to think every frame.
nbohr1more

nbohr1more

08.06.2020 01:52

developer   ~0012604

Rev 8768 before door
KODWOW.save (2,616,698 bytes)
nbohr1more

nbohr1more

08.06.2020 01:52

developer   ~0012605

Noclip past door
nbohr1more

nbohr1more

08.06.2020 01:52

developer   ~0012606

KODWOW2.save (2,616,649 bytes)
grayman

grayman

08.06.2020 05:37

viewer   ~0012607

At this point, since we have an OK from Spooks to correct the map, I'm going to stop working on the problem. Apparently it's way more complex (as is usually the case with pathfinding) than I originally imagined, and spending more and more time on it seems pointless.
stgatilov

stgatilov

08.06.2020 07:53

administrator   ~0012608

Do you think the code you implemented should be removed/commented/disabled/frozen or left in working state?
grayman

grayman

08.06.2020 08:28

viewer   ~0012609

Removed.

My ability to solve the continuous "one more example of failure" for this problem has been exhausted.

I just wish I was able to reproduce the problem; that would have prevented the "spec" nature of the solution.
Dragofer

Dragofer

13.06.2020 17:58

developer   ~0012614

I can't start TDM SVN anymore, getting a crash with a blue window containing the following message:

Error: file script\tdm_ai_base.script, line 1666: Unknown value "setGetUpTime"
AluminumHaste

AluminumHaste

13.06.2020 18:34

developer   ~0012615

Last edited: 13.06.2020 19:44

Yeah, same here, looks like it was left in by accident when the other fixes were removed.

Commenting out those 2 lines in the script file gets the game to load. Seeing as they are tagged with this bug report, fairly confident they can go.
nbohr1more

nbohr1more

17.06.2020 03:05

developer   ~0012617

A repaired version of this mission is up on the repo.

The state of SVN can be discussed in internal forums or (if we really need to) in another bug tracker.

Closing.

Issue History

Date Modified Username Field Change
29.05.2020 10:36 grayman New Issue
29.05.2020 10:36 grayman Status new => assigned
29.05.2020 10:36 grayman Assigned To => grayman
29.05.2020 11:34 grayman Note Added: 0012577
29.05.2020 11:34 grayman Status assigned => resolved
29.05.2020 11:34 grayman Resolution open => fixed
29.05.2020 11:34 grayman Fixed in Version => TDM 2.08
01.06.2020 12:43 grayman Note Added: 0012582
02.06.2020 14:55 grayman Note Added: 0012584
04.06.2020 04:10 nbohr1more Note Added: 0012585
04.06.2020 04:10 nbohr1more File Added: KODR1.save
04.06.2020 04:10 nbohr1more Note Added: 0012586
04.06.2020 04:11 nbohr1more Note Added: 0012587
04.06.2020 04:11 nbohr1more File Added: KODR2.save
04.06.2020 04:11 nbohr1more Note Added: 0012588
04.06.2020 04:11 nbohr1more File Added: KODR3.save
04.06.2020 04:12 nbohr1more Note Added: 0012589
04.06.2020 04:13 nbohr1more Status resolved => feedback
04.06.2020 04:13 nbohr1more Resolution fixed => reopened
04.06.2020 04:55 nbohr1more Note Added: 0012590
04.06.2020 15:14 grayman Note Edited: 0012585
04.06.2020 15:19 grayman Note Added: 0012591
04.06.2020 15:19 grayman Note Edited: 0012585
04.06.2020 16:34 nbohr1more Note Added: 0012592
05.06.2020 03:07 nbohr1more Note Added: 0012593
05.06.2020 04:06 nbohr1more Note Added: 0012594
05.06.2020 04:07 grayman Note Added: 0012595
06.06.2020 22:19 nbohr1more Note Added: 0012599
06.06.2020 23:28 nbohr1more Note Edited: 0012599
07.06.2020 02:23 nbohr1more Note Edited: 0012599
07.06.2020 18:49 grayman Note Added: 0012602
07.06.2020 19:02 grayman Note Added: 0012603
08.06.2020 01:52 nbohr1more Note Added: 0012604
08.06.2020 01:52 nbohr1more File Added: KODWOW.save
08.06.2020 01:52 nbohr1more Note Added: 0012605
08.06.2020 01:52 nbohr1more Note Added: 0012606
08.06.2020 01:52 nbohr1more File Added: KODWOW2.save
08.06.2020 05:37 grayman Note Added: 0012607
08.06.2020 07:53 stgatilov Note Added: 0012608
08.06.2020 08:28 grayman Note Added: 0012609
13.06.2020 17:58 Dragofer Note Added: 0012614
13.06.2020 18:34 AluminumHaste Note Added: 0012615
13.06.2020 19:44 AluminumHaste Note Edited: 0012615
17.06.2020 03:05 nbohr1more Note Added: 0012617
17.06.2020 03:06 nbohr1more Status feedback => resolved
17.06.2020 03:06 nbohr1more Resolution reopened => fixed
17.06.2020 03:06 nbohr1more Product Version TDM 2.08 => TDM 2.07