Project

General

Profile

Bug #4010

AiWander: "return to the spawn position" feature does not work properly

Added by Demid Doroginin 2 months ago. Updated 25 days ago.

Status:
Closed
Priority:
Normal
Category:
AI
Target version:
Start date:
08/08/2017
% Done:

100%

Reproducibility:
Always
Operating system:
Other
Severity:
Normal

Description

In the East Empire Company quest where you are supposed to deliver a report to Carnius Magius (Race Against the Clock), when you enter Carnius' cell, he choses direction of moving and just walks forward. This results in bad things, such as him swimming far into the ocean or walking to the opposite side of Solstheim. I hope it's not Data Files again.

Out_Of_The_Cell.omwsave (16.2 MB) Demid Doroginin, 08/08/2017 05:36 PM

Walking.omwsave (16.3 MB) Demid Doroginin, 08/08/2017 05:36 PM

Carnius Stuck on a Rock.png View (738 KB) Will Herrmann, 09/10/2017 04:45 AM


Related issues

Related to OpenMW - Bug #3997: Almalexia doesn't pace Resolved 08/06/2017

Associated revisions

Revision 91adfc9f (diff)
Added by Andrei Kortunov 25 days ago

AiWander: reset spawn position, if an actor was moved to another cell (bug #4010)

History

#1 Updated by Andrei Kortunov 2 months ago

Can you attach a save file?

#2 Updated by Demid Doroginin 2 months ago

Sure. One where he is already walking, one out of his cell (go north). Also it seems that he always goes towards one direction, not a random one.

#3 Updated by Will Herrmann about 1 month ago

I loaded up the save outside of the cell and went NNW (there is a snow mound that is a good landmark). Three times that I tried it, Carnius Magius went straight southeast toward the sea, then when he hit a rock, moved northeast for a bit before returning to a southeast direction. Twice I followed him during his whole trip, and both times he wound up stuck on a rock just north of Fort Frostmoth (screenshot attached).

I've confirmed that he picks a direction and sticks with it (unless he runs into a building or something), but I can't confirm whether the initial direction is random, nor can I confirm whether it's a data file related issue. However, the UESP page for the quest does not note that there are any bugs regarding walking directions, and instead says that he's supposed to be hanging out in one of three locations (he starts in location #2), so I'm inclined to think that him walking all over the map is an OpenMW issue.

#4 Updated by scrawl . about 1 month ago

  • Target version deleted (openmw-0.43)

#5 Updated by scrawl . about 1 month ago

  • Category changed from 8 to AI

#6 Updated by Andrei Kortunov 26 days ago

Canius Magius has an AiWander package with 0 Disatance. It seems he just tries to move to his spawn position.

An easy way to reproduce this bug:

"Carnius Magius"->PositionCell -182810.047 170592.203 999.986 0 "Solstheim, Brodir Grove" 
player->PositionCell -182810.047 170592.203 999.986 0 "Solstheim, Brodir Grove" ; Carnius Magius stays
"Carnius Magius"->PositionCell -215704.859 178240.875 455.276 90 "Solstheim, Hirstaang Forest" 
player->PositionCell -215704.859 178240.875 455.276 90 "Solstheim, Hirstaang Forest"; Carnius Magius moves to the Brodir Grove

But if you will modify his wander distance, he will not try to return to the spawn position:

aiwander 512 0 0 0

#7 Updated by Andrei Kortunov 26 days ago

Looks like this code causes this bug.
We do not handle a case, when the actor position was changed by a script command.

As a possible solution, we can update mInitialActorPosition, if the actor was teleported. Any other ideas?

#8 Updated by Andrei Kortunov 26 days ago

Also I am not sure how "return to the spawn position" feature supposed to work, if a destination is in other cell (e.g. in interior, as in this case).

#9 Updated by Andrei Kortunov 26 days ago

  • Subject changed from Carnius Magius choses direction and walks away to AiWander: "return to the spawn position" feature does not work properly

#10 Updated by Andrei Kortunov 25 days ago

Also I am not sure how "return to the spawn position" feature supposed to work, if a destination is in other cell (e.g. in interior, as in this case).

Ok, in this case returnToStartLocation should not be triggered. But why an engine triggers it?

#11 Updated by Andrei Kortunov 25 days ago

  • Status changed from Confirmed to Resolved
  • Assignee set to Andrei Kortunov
  • Target version set to openmw-0.43
  • % Done changed from 0 to 100

#12 Updated by Andrei Kortunov 25 days ago

  • Related to Bug #3997: Almalexia doesn't pace added

#13 Updated by Andrei Kortunov 25 days ago

Looks like this code causes this bug.

Also this code breaks Almalexia idle animation (bug #3997).

#14 Updated by Andrei Kortunov 25 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF