dockEscorts executed too early?

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

dockEscorts executed too early?

Post by Commander McLane »

I met some escorts in the middle of the corridor once or twice, which were headed for a Salvage Gang and had dockingAI. Then I met their mother much closer to the planet, also in dockingAI, but headed for the main station. Quite strange.

I think what's happening is that the mother releases its escorts too early. And while the mother continues its journey to the main station, the escorts search for the nearest dockable station, find one which is located in the corridor behind them, turn around and dock with that station (could also be a Black Monks Monastary or a Rock Hermit). Which is kind of stupid.

Possible solution could be that the mother releases the escorts later, when the main station will the the nearest station anyway. Or to make sure that the escorts always choose the same station to dock as their mother.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: dockEscorts executed too early?

Post by Eric Walch »

Commander McLane wrote:
I met some escorts in the middle of the corridor once or twice, which were headed for a Salvage Gang and had dockingAI. Then I met their mother much closer to the planet, also in dockingAI, but headed for the main station. Quite strange.
This is an old bug that is present for long time. It is just the target inspector that makes it clear more easily. Working with the behemoth and the dredger script I often encountered that those ships were stopped by far away escorts. For the behemoth I changed the script so it will ignore those calls while in attack mode.

I think it is often a bug in custom AI's. For one I found this bug in Dictators.oxp. When returning from a waypontAI they receive a "DESIRED_RANGE_ACHIEVED" message that puts them to think they are close to the planet. I think this is solved in dictators now (At least I mailed the fix to the author). But as this is just a bug in the old traderAI there are probably more oxp's using that old traderAI. (from oolite 1.55). I have even seen new oxp's adding altered AI's based on that old AI instead of using the current traderAI as template for their changes.
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

Along a similar vein I often observe escorts crashing into the station at which their mother is attempting to dock. I haven't investigated, but it appears that the escorts are still in escort mode or something instead of waiting their turn to dock.
The glass is twice as big as it needs to be.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

|Might an easy win adjustment be to add "dockEscorts" at a suitable point within dockingAI.plist (either as a command or a step in the sequence)?

It sounds to me like potentially we've got ships with escorts running under AIs that just switch to dockingAI without recalling their escorts first (hence the splat).
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

To clarify what is exactly going wrong with some AI's:

When the AI on its way to the planet detects an obstacle on its path, it jumps into a waypoint subroutine. In that subroutine it sets very close by endpoints so it can find a free flight path. When it found its free path, it returns to its original routine. But the target destination is not the planet anymore but a much closer point.

At this moment there is no pause defined so the next update will be in about 0.1 seconds. When that update event re-sets the planet as destination, there is no problem. But, there are AI's that don't set the destination on every update. That's okay without using a waipointAI. But with using a waypointAI and not setting a new destination, it will reach it last known destination in very short time.
Post Reply