Until 1.71 there was a bug in Escort-Role that made that those ships didn't escort. (Only Escort-ship did work.). This is corrected in 1.71. However, I have sometimes extremely long hangs on hyperspace jumps since introduction of 1.71. What actually is happening, is that the system keeps adding ships near the entrance point. This forces me to quit Oolite.
When I look into the logfile it starts logging when it reaches the maximum amount of ships for the system. After this I get messages that ship "xxx" can't be added because the maximum amount of entities is reached. When looking at the names, it always were escort ships of the military Leviathan from Military Fiasco. I once waited very long and than it started moving with an enormous amount of purple blibs at the entry point. (Movement was to slow to be able to target one ship but it must have been a few hundreds of his escorts.)
Last week I renamed the escort role from military-escort to militaryEscort. I haven't seen a hang since, but have to play longer to be sure the name triggers this effect.
My question to other players is: Have others seen this behaviour also? And if yes, had they military Fiasco installed or not?
Bug with Escort-Role?
Moderators: winston, another_commander, Getafix
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Bug with Escort-Role?
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Commander McLane
- ---- 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:
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
I forgot the most easiest test: Just add the "leviathan" by script. This also lets the system hang. The name of the role has nothing to do with it.
The military version is just a plain ship, even without ant script that could cause it to bug. Ill look further into it now I know to look in which direction.
The military version is just a plain ship, even without ant script that could cause it to bug. Ill look further into it now I know to look in which direction.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Captain Tylor
- Dangerous
- Posts: 90
- Joined: Fri Sep 26, 2008 11:44 am
- Location: London
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
I narrowed it down. It probably happens since Military Fiasco 2.4 In that version I changed the handler this.shipSpawned into this.spawnedAsEscort
And the culprit is the line were I change the AI of the escort ships. By doing it with the new handler, the code is executed in the middle of oolites setUpEscorts function. Somehow this AI change is messing things up with the code and the escort counter. Although I don't see how.
Code: Select all
this.shipSpawned = function()
{
this.ship.switchAI("militaryFiascoEscortAI.plist")
}
this.spawnedAsEscort = function()
{
this.ship.switchAI("militaryFiascoEscortAI.plist")
}
UPS-Courier & DeepSpacePirates & others at the box and some older versions
During the writing of the original Rock Hermit Locator with the legacy scripting for 1.65 and 1.68. It was reported to me that ever since it was installed, Tesco Stations and Con stores spawned 3 times at witchspace exit...Eric Walch wrote:I narrowed it down. It probably happens since Military Fiasco 2.4 In that version I changed the handler this.shipSpawned into this.spawnedAsEscort
And the culprit is the line were I change the AI of the escort ships. By doing it with the new handler, the code is executed in the middle of oolites setUpEscorts function. Somehow this AI change is messing things up with the code and the escort counter. Although I don't see how.Code: Select all
this.shipSpawned = function() { this.ship.switchAI("militaryFiascoEscortAI.plist") } this.spawnedAsEscort = function() { this.ship.switchAI("militaryFiascoEscortAI.plist") }
What i narrowed that down to back then was that the spawning of rock hermit bouys, from inside the AI.plist file somehow got "mixed" up with script.plist. this was the only possible scenario as the tesco stations and con stores was spawned from the script.plist file..
I presume, something similar is happening to your script, and to avoid it in a similar way to what i did, would be to add a timer that fires after 5 seconds and only once, after the this.spawnAsEscort. has triggerd, as i back then added a pauseAI: 5 to solve the problem...
Cheers Frame...
Bounty Scanner
Number 935
Number 935
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
The solution for me is to use the shipSpawned handler again. That one fires at the first update event after spawning. The spawnedAsEscort is fired already inside the while loop of setUpEscort as shown below:Frame wrote:I presume, something similar is happening to your script, and to avoid it in a similar way to what i did, would be to add a timer that fires after 5 seconds and only once, after the this.spawnAsEscort. has triggerd, as i back then added a pauseAI: 5 to solve the problem...
Code: Select all
while (escortCount > 0)
{
....... (deletion)
[escortAI setState:@"FLYING_ESCORT"]; // Begin escort flight. (If the AI doesn't define FLYING_ESCORT, this has no effect.)
[escorter doScriptEvent:@"spawnedAsEscort" withArgument:self];
if (bounty)
{
int extra = 1 | (ranrot_rand() & 15);
bounty += extra; // obviously we're dodgier than we thought!
[escorter setBounty: extra];
}
else
{
[escorter setBounty:0];
}
[escorter release];
escortCount--;
}
UPS-Courier & DeepSpacePirates & others at the box and some older versions