NPC wormholes not near NPC ships?
Moderators: winston, another_commander, Getafix
NPC wormholes not near NPC ships?
Using WIn XP SP3 with oolite-trunk-1.75.3.4555-dev.win32.exe
I'm seeing NPC ships disappear with the "entering wormhole" animation while the only actual wormholes visible (on radar as well!) are about 4-20 km away.
Note: These are NPC ships entering existing wormholes not making new wormholes.
Is there a very low limit to the max number of visible+properly working (for NPCs) wormholes that can be present in a system at a time?
Also, I am seeing traders enter the wormholes but leave their escorts behind. I'm pretty sure this is because the escort and/or trader's AI.plist files aren't fully coded for using existing wormholes.
I'm seeing NPC ships disappear with the "entering wormhole" animation while the only actual wormholes visible (on radar as well!) are about 4-20 km away.
Note: These are NPC ships entering existing wormholes not making new wormholes.
Is there a very low limit to the max number of visible+properly working (for NPCs) wormholes that can be present in a system at a time?
Also, I am seeing traders enter the wormholes but leave their escorts behind. I'm pretty sure this is because the escort and/or trader's AI.plist files aren't fully coded for using existing wormholes.
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Re: NPC wormholes not near NPC ships?
Is this with or without OXPs? I am pretty sure that the default AIs can handle existing wormholes, unless something was changed recently, which I don't recall being the case.
Re: NPC wormholes not near NPC ships?
This is with OXPs, which are creating the pre-existing wormholes for these NPC traders to use.
However I am testing both standard + modified exitingTraderAI.plist and escortAI.plist and the problems occur with both.
This is when an exiting-the-system trader is using the enterTargetWormhole command/Perform Action to find and enter an existing wormhole. They sometimes simply DISAPPEAR from in front of me (though briefly showing the "entering wormhole" ring/s around themselves.) Then their escorts...just remain there...and don't follow them into the existing wormhole.
While the standard exitingTraderAI.plist does not use or call enterTargetWormhole at any point, the standard escortAI.plist was refusing to follow its mother into the wormhole the mother used.
I'll try to package up my exact test OXPs over the next couple hours...this is painful to sort it down to the minimum to demonstrate only these problems.
However I am testing both standard + modified exitingTraderAI.plist and escortAI.plist and the problems occur with both.
This is when an exiting-the-system trader is using the enterTargetWormhole command/Perform Action to find and enter an existing wormhole. They sometimes simply DISAPPEAR from in front of me (though briefly showing the "entering wormhole" ring/s around themselves.) Then their escorts...just remain there...and don't follow them into the existing wormhole.
While the standard exitingTraderAI.plist does not use or call enterTargetWormhole at any point, the standard escortAI.plist was refusing to follow its mother into the wormhole the mother used.
I'll try to package up my exact test OXPs over the next couple hours...this is painful to sort it down to the minimum to demonstrate only these problems.
- 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:
Re: NPC wormholes not near NPC ships?
I guess Switeck is using his own mod, and has probably played with the AI method that makes NPCs follow the player wormhole.
As far as I see this method is only intended for "entering" the player wormhole, not for following NPC wormholes. Its background is that a system ceases to exist as soon as the player jumps out. Therefore it makes no sense for the NPCs to actually fly towards his wormhole, and they don't. If they are selected to "follow" the player they jump out on the spot. The only thing the engine does is to add a certain amount of time before re-spawning them in the next system, in order to simulate the time it would have taken them to reach the player wormhole.
This illusion breaks of course down, as soon as you apply it to NPCs "following" other NPCs.
In short:
Even shorter:
As far as I see this method is only intended for "entering" the player wormhole, not for following NPC wormholes. Its background is that a system ceases to exist as soon as the player jumps out. Therefore it makes no sense for the NPCs to actually fly towards his wormhole, and they don't. If they are selected to "follow" the player they jump out on the spot. The only thing the engine does is to add a certain amount of time before re-spawning them in the next system, in order to simulate the time it would have taken them to reach the player wormhole.
This illusion breaks of course down, as soon as you apply it to NPCs "following" other NPCs.
In short:
enterTargetWormhole
does not make the ship fly towards the wormhole, but instead removes it immediately. Only the more traditional wormholeEscorts
(and I guess wormholeGroup
and wormholeEntireGroup
) make the followers fly towards the wormhole and disappear there.Even shorter:
enterTargetWormhole
is not meant to work (and therefore does not work visually properly) if the target is something else than the player ship.
Last edited by Commander McLane on Thu May 26, 2011 12:35 pm, edited 1 time in total.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: NPC wormholes not near NPC ships?
A wormhole is nothing more than an object in space that is collidable. The trigger for entering the wormhole is collision detection with the wormhole. So ships entering one without any present seems strange. Did you make an entity dump to see if the wormhole is listed there?Switeck wrote:I'm seeing NPC ships disappear with the "entering wormhole" animation while the only actual wormholes visible (on radar as well!) are about 4-20 km away.
Note: These are NPC ships entering existing wormholes not making new wormholes.
Is there a very low limit to the max number of visible+properly working (for NPCs) wormholes that can be present in a system at a time?
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: NPC wormholes not near NPC ships?
When that command is used, such things also can happen. It immediately lets a ship jump. And yes, it is intended to be only used when the player jumps out of the system. And when there is no target wormhole, the ship looks just for the nearest wormhole and adds itself on that list.Commander McLane wrote:IIn short:enterTargetWormhole
does not make the ship fly towards the wormhole, but instead removes it immediately. Only the more traditionalwormholeEscorts
(and I guesswormholeGroup
andwormholeEntireGroup
) make the followers fly towards the wormhole and disappear there.
Even shorter:enterTargetWormhole
is not meant to work (and therefore does not work visually properly) if the target is something else than the player ship.
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:
Re: NPC wormholes not near NPC ships?
The question then becomes: Since 1.75 we also haveEric Walch wrote:When that command is used, such things also can happen. It immediately lets a ship jump. And yes, it is intended to be only used when the player jumps out of the system.Commander McLane wrote:IIn short:enterTargetWormhole
does not make the ship fly towards the wormhole, but instead removes it immediately. Only the more traditionalwormholeEscorts
(and I guesswormholeGroup
andwormholeEntireGroup
) make the followers fly towards the wormhole and disappear there.
Even shorter:enterTargetWormhole
is not meant to work (and therefore does not work visually properly) if the target is something else than the player ship.
enterPlayerWormhole
as a separate method, but they're doing the same (I think). Could enterTargetWormhole
be changed, so that it makes the issuing ship actually fly towards and into the wormhole? I think this can't be done with flyToRangeFromDestination
, because a wormhole can't become a destination, or can it?Re: NPC wormholes not near NPC ships?
Yes indeed I am doing this for my mod. I'm trying...and failing miserably...to make a "hitchhiker" AI.plist behavior for NPC ships to reuse existing wormholes instead of wasting their own fuel. Presumably, these wormholes are to where they want to go AND they have a wormhole scanner to detect such. Not all will be doing this, only a percentage.Commander McLane wrote:I guess Switeck is using his own mod, and has probably played with the AI method that makes NPCs follow the player wormhole.
As far as I see this method is only intended for "entering" the player wormhole, not for following NPC wormholes.
I'll try to get a couple screenshots as well of disappearing ships...this will make my uploads a LOT larger.
- 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:
Re: NPC wormholes not near NPC ships?
No need to post screenshots. I think we've understood the point.Switeck wrote:I'll try to get a couple screenshots as well of disappearing ships...this will make my uploads a LOT larger.
The problem is that
enterTargetWormhole
does not do (and isn't intended to do) what you thought it does (I have to admit that I was disappointed as well when I noticed that it doesn't make NPCs visibly enter wormholes of other NPCs; I would've liked that, too).It is simply working as designed. You were just expecting something different, which doesn't exist. That's why I in my above post proposed to re-design the method.
Again in short: NPCs hitchhiking wormholes of other independent NPCs is not currently possible in Oolite. It is only possible for ships within the same group, if they stand under the command of the ship that first jumped out.
Re: NPC wormholes not near NPC ships?
So enterTargetWormhole is supposed to only be used and only happen when the player isn't looking?
...and almost exactly duplicate the effects of enterPlayerWormhole?
...and almost exactly duplicate the effects of enterPlayerWormhole?
- 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:
Re: NPC wormholes not near NPC ships?
Indeed. As I wrote above, I think that it is supposed to only be used and only happen if the target is the player (by definition he won't be looking then).Switeck wrote:So enterTargetWormhole is supposed to only be used and only happen when the player isn't looking?
...and almost exactly duplicate the effects of enterPlayerWormhole?
And
enterPlayerWormhole
is basically only a new and more accurate name for the same thing.- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: NPC wormholes not near NPC ships?
Yes but the fist can go to any wormhole (e.g. one to another system that the player choose) and already existed with Oolite 1.65.Switeck wrote:So enterTargetWormhole is supposed to only be used and only happen when the player isn't looking?
...and almost exactly duplicate the effects of enterPlayerWormhole?
The whole AI to jump is set up around the following procedure:
A mother or a group menber that jumps out, sends a
wormholeEscorts
or wormholeGroup
message. Those ships receive the instruction and jump to the following state:
Code: Select all
"ENTER_WORMHOLE" = {
ENTER = (setDestinationToTarget,
"setDesiredRangeTo: 1.0",
"setSpeedFactorTo: 1.0",
performFlyToRangeFromDestination
);
"TARGET_LOST" = ("setStateTo: LURK");
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: LURK");
"PLAYER WITCHSPACE" = (enterTargetWormhole, wormholeEscorts);
};
enterTargetWormhole
ensures that those ships are added to the wormhole. And since 1.75 they are not released at the other side immediately, but with a delay, corresponding to their distance to the wormhole.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:
Re: NPC wormholes not near NPC ships?
Which AI command sets the wormhole as the ship's target?
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: NPC wormholes not near NPC ships?
TheCommander McLane wrote:Which AI command sets the wormhole as the ship's target?
wormholeEscorts
command. But npc ships are not allowed to target wormholes, so this target is lost in the next update. However, wormholeEscorts
is a reactToMessage that allows to set a destination in the current frame through above code.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:
Re: NPC wormholes not near NPC ships?
In other words: a self-owned NPC is not able to target and fly into another NPC's wormhole. Which tanks the hitchhikers-idea.