enterPlayerWormhole not working if wormhole in save-file

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

Moderators: winston, another_commander, Getafix

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:

enterPlayerWormhole not working if wormhole in save-file

Post by Commander McLane »

The new AI method enterPlayerWormhole seems to be not working.

The AI does attempt to perform the action:

Code: Select all

[ai.message.receive]: AI interstellarHelpAI.plist for Moray Medical Boat 780 in state 'FOLLOW_PLAYER' receives message 'PLAYER WITCHSPACE'. Context: global message, stack depth: 0
[ai.takeAction]: Moray Medical Boat 780 to take action enterPlayerWormhole
However, the ship gets never spawned on the other side.

In this situation the Moray was less than 200 meters from my ship, so I can't imagine he didn't make it in time.
Last edited by Commander McLane on Thu Feb 24, 2011 5:31 pm, edited 1 time in total.
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:

Re: enterPlayerWormhole not working

Post by Commander McLane »

Here's a small test AI. Just spawn a trader and give it this AI, then jump out. The trader becomes dead and doesn't follow you.

Code: Select all

{
    GLOBAL =     {
        ENTER =         (
            performIdle,
            "scanForNearestShipWithRole: player"
        );
        "PLAYER WITCHSPACE" =         (
            enterPlayerWormhole
        );
        "TARGET_FOUND" =         (
            setTargetToFoundTarget
        );
    };
}
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: enterPlayerWormhole not working

Post by another_commander »

It must be some OXP interference, as it seems to work here. See pictures below, I have ID'd a trader and exited to witchspace after assigning him your test AI. The second pic is showing the same trader in the target system shortly after having followed. You can also see that he has followed me from quite a distance.
ImageImage
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:

Re: enterPlayerWormhole not working

Post by Commander McLane »

What sort of OXP interference could that be? Does the player ship for instance need a new shipdata-key for it to work?
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:

Re: enterPlayerWormhole not working

Post by Commander McLane »

Hm. Removing all OXPs except Debug.oxp, impcourier2.oxp (my ship) and hud.oxp (my HUD) does not solve the problem. The ship still becomes dead instead of following me.

Can it be a platform-dependent issue?
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: enterPlayerWormhole not working

Post by Eric Walch »

Commander McLane wrote:
Can it be a platform-dependent issue?
No, I just did the same as A_C on the mac. With your AI the ship correctly followed me during several jumps.

The code looks at the live-time of the wormhole and if the ship can reach the wormhole at max speed. Only if that fails the ship won't follow. Maybe you have a player ship that for some reason creates a to small wormhole?

NB the ship does not follow immediately, but after the time he needs to fly to the wormhole at max speed.
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:

Re: enterPlayerWormhole not working

Post by Commander McLane »

Hm. I fly an Imperial Courier, and I've waited more than a minute on the other side. And, as said, in the first case the ship was less than 200 meters away and following me anyway.

Question: Should it become 'dead' in the target inspector? Because that's what happens as soon as I jump out.
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: enterPlayerWormhole not working

Post by Eric Walch »

Commander McLane wrote:
Question: Should it become 'dead' in the target inspector? Because that's what happens as soon as I jump out.
No, it should stay alive in the inspector. Only the status changes to "ENTERING_WITCHSPACE" and the ID is removed. All other readings stay unchanged.

After some time the ship reappears with a new ID and "STATUS_IN_FLIGHT".

I don't see what is different between you and me except the player ship. I tested it with a BCC as player ship and a python as jumping ship.( I did check it with the 1.75 release as well as latest trunk)
Last edited by Eric Walch on Thu Feb 24, 2011 9:19 am, edited 1 time in total.
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:

Re: enterPlayerWormhole not working

Post by Commander McLane »

Then something's definitely wrong. In all cases the ship becomes 'dead' immediately. I'll try without any OXP (except the one containing the AI, and a spawning script, as I'm going to remove Debug.oxp as well). Maybe it has something to do with my Imp? Although I haven't yet considered it a particularly small ship with a particularly short-time wormhole.
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:

Re: enterPlayerWormhole not working

Post by Commander McLane »

Okay, some more information:

If it's an OXP clash, it's with impcourier2.oxp. When I removed only that and started as a Jameson on Lave, I could make a ship follow me. If I try with my usual commander, the ship dies when I jump out.

For the first time now I got an error message when I jumped out. I can't be 100% sure that it's related, but it's all I got:

Code: Select all

[script.javaScript.exception.badXMLAttrName]: ***** JavaScript exception (oolite-default-ship-script.js.anon-script): TypeError: invalid XML attribute name 2.1234084096e-314
[script.javaScript.load.failed]: ***** Error loading JavaScript script /Applications/Spiele/Oolite beta 1.75/Oolite.app/Contents/Resources/Scripts/oolite-default-ship-script.js -- could not run script
I have now bought a new ship (SuperCobra, but I guess it doesn't matter; it's another OXP ship, though). impcourier2.oxp is still installed, but I don't fly the ship anymore. The trader follows me and is correctly spawned in the destination system.

So the culprit must be that I was flying an Imperial Courier. What can be wrong with the ship? Subents again?

I hope this gives someone an idea.

EDIT: No, it's not the IC as such. In older save-games with the same ship it's working. Just not in my current game. So it must be caused by something with my current ship configuration. Something in my save-game? An equipment item currently on my ship? I am completely at loss.
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:

Re: enterPlayerWormhole not working

Post by Commander McLane »

I am at wit's end. I have gone over the ICs shipdata and don't see anything. I have found some errors in its shipyard.plist (wrong forward weapon and some doublets between optional and standard equipment), but they can't be relevant. I have tried to remove equipment from my ship (but I had already tested without OXPs, so OXP equipment couldn't be the culprit; and you guys have all vanilla equipment as well (and other saved commanders of mine as well) and it's working, so that can't be the culprit).

I am now out of ideas what to do to make it work. I'm officially screwed.

The last thing I could do was to prepare a test case with impcourier2.oxp and my save file, and upload it to the box. For your convenience I have the above followPlayerAI.plist included in the impcourier2.oxp, so you only need to spawn a random ship, give it the AI, and jump. Could someone grab it and try it out, and at least confirm that it's indeed not working in this configuration? I'm beginning to feel soo stoopid for not seeing the problem. It's absolutely frustrating! :x :x :x
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: enterPlayerWormhole not working

Post by Svengali »

I've had this message when I've c&p'ed things between scripts and added by mistake two points instead of one. E.g. this..foo.

Edit: Just tried your example, spawned a ic-pirate and it followed me through the wormhole. Nothing in the log. But like a_c I'm on Windows too.
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: enterPlayerWormhole not working

Post by Eric Walch »

Commander McLane wrote:
The last thing I could do was to prepare a test case with impcourier2.oxp and my save file, and upload it to the box.
I got it and had the same problem. Looking in the file, I noticed it was one with a saved wormhole in it (the second last entry in the plist). So, I deleted the wormhole info and the problem was gone. There must be a problem here somehow.

As extra check I now targeted a wormhole with my normal commander and saved the game, so I also had a wormhole in my saved file. And indeed, the ship that should follow also went dead now. I tried a system closer by, the same system and a system further away than the saved wormhole.

When I target a wormhole in game and than jump out, the ship can follow me.
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:

Re: enterPlayerWormhole not working

Post by Commander McLane »

When I prepared the file for upload I had a suspicion about the wormhole entry, but I didn't know how to delete it. Can you delete the whole thing, including the key? Or do you have to replace it with an empty array or so?

EDIT: Okay, I deleted it completely, and when saving again it was replaced by an empty array. Come to think of it, that sounds logical, given that the number of keys in save-games has increased over time...
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: enterPlayerWormhole not working if wormhole in save-file

Post by Cody »

I notice that the wormhole array takes-up over 750 lines in my last save file, near doubling its normal size.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
Post Reply