targetSystem? undefined while ejecting

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

Moderators: another_commander, winston, Getafix

User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2275
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: SystemID? or targetSystem? undefined while ejecting

Post by Wildeblood »

CommonSenseOTB wrote:
Ahruman wrote:
CommonSenseOTB wrote:
The idea that the escape pod is not hyperspace capable and therefore the player cannot have the property player.targetSystem after they launch the escape pod is absolutely brilliant insight if it is true.
It isn’t.

The property is not player.targetSystem but player.ship.targetSystem. Most properties of player.ship become undefined when the player ejects, with the notable exception of isValid. This is normal behaviour for entities that have been destroyed.
I'm sorry Ahruman that is a typo. It IS correctly stated further down in the post as player.ship.targetSystem. The question still stands. Assuming the statement you made is correct, I have a possible explanation and it may be wrong. The player.ship entity hasn't been destroyed. When you eject you become the escape pod. Therefore the player.ship.properties still exist. Therefore the player.ship.targetSystem property becomes undefined because the pod has no hyperspace capability. Is that closer to what is happening here?
No. That's completely wrong. The player ship is always hyperspace capable, as Capt. Murphy discovered when he tried to script a "breakable witch drive" OXP. You can take a stick from the garden, replace its role set with 'player', and it will become hyperspace capable. There is no player escape pod, it is a myth. When the player ship is destroyed in the game play, the player ship entity is marked invalid temporarily, that's all. It is never really replaced with a player escape pod.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: SystemID? or targetSystem? undefined while ejecting

Post by JensAyton »

CommonSenseOTB wrote:
I have a possible explanation and it may be wrong. The player.ship entity hasn't been destroyed. When you eject you become the escape pod.
No. From a scripting perspective, player.ship represents the ship you ejected from, which is treated as a destroyed ship. There is no representation of the escape pod (or the player’s hulk) precisely because the player “is” the escape pod internally. This is deliberately not reflected to JavaScript.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2275
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: SystemID? or targetSystem? undefined while ejecting

Post by Wildeblood »

Wildeblood wrote:
There is no player escape pod, it is a myth. When the player ship is destroyed in the game play, the player ship entity is marked invalid temporarily, that's all. It is never really replaced with a player escape pod.
Ahruman wrote:
There is no representation of the escape pod (or the player’s hulk) precisely because the player “is” the escape pod internally. This is deliberately not reflected to JavaScript.
Now I'm not sure if I've got it right or not. Are you contradicting me or not?
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: SystemID? or targetSystem? undefined while ejecting

Post by CommonSenseOTB »

Wildeblood wrote:
No. That's completely wrong. The player ship is always hyperspace capable, as Capt. Murphy discovered when he tried to script a "breakable witch drive" OXP. You can take a stick from the garden, replace its role set with 'player', and it will become hyperspace capable. There is no player escape pod, it is a myth. When the player ship is destroyed in the game play, the player ship entity is marked invalid temporarily, that's all. It is never really replaced with a player escape pod.
No, YOU are completely wrong, Wildeblood!

From the changelog as of 1.75:
hyperspace_motor (all ships, including player): required to be able to
jump. Default: true.
If it doesn't work then file a bug. Stating your opinions as fact when they are clearly wrong doesn't help any of us on this board. Some might think you are trying to cause confusion deliberately.

Ahruman wrote:
CommonSenseOTB wrote:
I have a possible explanation and it may be wrong. The player.ship entity hasn't been destroyed. When you eject you become the escape pod.
No. From a scripting perspective, player.ship represents the ship you ejected from, which is treated as a destroyed ship. There is no representation of the escape pod (or the player’s hulk) precisely because the player “is” the escape pod internally. This is deliberately not reflected to JavaScript.
.

Ahruman, perhaps it is not quite operating the way it is supposed to. No harm done here. I can bypass around this and I'm just going to drop this issue. If any problems arise from this "behaviour" we will have a good starting point to work from. Cheers! :D
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2275
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: SystemID? or targetSystem? undefined while ejecting

Post by Wildeblood »

CommonSenseOTB wrote:
Wildeblood wrote:
No. That's completely wrong. The player ship is always hyperspace capable, as Capt. Murphy discovered when he tried to script a "breakable witch drive" OXP. You can take a stick from the garden, replace its role set with 'player', and it will become hyperspace capable. There is no player escape pod, it is a myth. When the player ship is destroyed in the game play, the player ship entity is marked invalid temporarily, that's all. It is never really replaced with a player escape pod.
No, YOU are completely wrong, Wildeblood!

From the changelog as of 1.75:
hyperspace_motor (all ships, including player): required to be able to
jump. Default: true.
If it doesn't work then file a bug. Stating your opinions as fact when they are clearly wrong doesn't help any of us on this board. Some might think you are trying to cause confusion deliberately.
Excuse you? I'm not stating my opinion, I'm stating my reading of what little documentation exists. My understanding might be wrong, but it is based on reading, not fantasy. You're the one who is just making nonsense up and claiming you've discovered a bug where there is none.

And as for that out of context snippet from the change log, what of it? Is it supposed to mean something relevant here?
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8501
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Re: targetSystem? undefined while ejecting

Post by DaddyHoggy »

Perhaps a modicum of decorum kind people? This is, after all, the friendliest board this side of Riedquat. This is the Oolite BB, so why resort to such petulance?
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: targetSystem? undefined while ejecting

Post by Capt. Murphy »

Calm down gentleman!

It should be quite possible to have a player ship that isn't hyper space capable by setting that key to NO in the shipdata.plist. If it's not defined at all (as per all the core ship player versions) it defaults to true as per the wiki documentation and the changelog.

But other than Griff's Illicit Unlock I don't think there exists any OXP player ships that have it set. - edit - it's not set there either so all of those are hyperspace capable.

But they don't have to be... :wink:

further edit - though I'd give this a test - New jameson - added "hyperspace_motor" = no; to shipdata.plist and hey presto with a full tank of fuel the range is 0 on the sort range chart.
Last edited by Capt. Murphy on Thu Jul 14, 2011 4:59 pm, edited 1 time in total.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: SystemID? or targetSystem? undefined while ejecting

Post by JensAyton »

Wildeblood wrote:
Now I'm not sure if I've got it right or not. Are you contradicting me or not?
I don’t think I am. :-)
CommonSenseOTB wrote:
Ahruman, perhaps it is not quite operating the way it is supposed to.
It’s working exactly as it’s supposed to: after ejecting, properties of the player ship (other than isValid) are not accessible.
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: SystemID? or targetSystem? undefined while ejecting

Post by CommonSenseOTB »

Wildeblood wrote:
CommonSenseOTB wrote:
Wildeblood wrote:
No. That's completely wrong. The player ship is always hyperspace capable, as Capt. Murphy discovered when he tried to script a "breakable witch drive" OXP. You can take a stick from the garden, replace its role set with 'player', and it will become hyperspace capable. There is no player escape pod, it is a myth. When the player ship is destroyed in the game play, the player ship entity is marked invalid temporarily, that's all. It is never really replaced with a player escape pod.
No, YOU are completely wrong, Wildeblood!

From the changelog as of 1.75:
hyperspace_motor (all ships, including player): required to be able to
jump. Default: true.
If it doesn't work then file a bug. Stating your opinions as fact when they are clearly wrong doesn't help any of us on this board. Some might think you are trying to cause confusion deliberately.
Excuse you? I'm not stating my opinion, I'm stating my reading of what little documentation exists. My understanding might be wrong, but it is based on reading, not fantasy. You're the one who is just making nonsense up and claiming you've discovered a bug where there is none.

And as for that out of context snippet from the change log, what of it? Is it supposed to mean something relevant here?

Who's opinion are you stating? Surely the changelog is more than just fantasy? :P

And why is it always the ones who do "things" point the finger at others so quickly for doing "things" even when it's not true. I guess you didn't actually make a post for Capt. Murphy's oxp claiming there is a bug when there was none. :P




Ahruman, I'm dropping this. The essence of what you say is true. However, only player.ship.targetSystem becomes undefined. Shouldn't the others? It would appear that those others are simply paused, the values remain but don't change. Why isn't player.ship.targetSystem paused as well? :?

Thanx for all the help. :|
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: SystemID? or targetSystem? undefined while ejecting

Post by JensAyton »

CommonSenseOTB wrote:
Ahruman, I'm dropping this. The essence of what you say is true. However, only player.ship.targetSystem becomes undefined. Shouldn't the others?
You know, life would be a lot easier if you edited your stream-of-conciousness posts so they actually contained all pertinent information, and perhaps less personal attacks and random opinions not directly relevant to the issue at hand.

I just tested to verify, and in 1.75.3 other properties are undefined, at least the several I tested. What values are you seeing that are not undefined?
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2275
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: targetSystem? undefined while ejecting

Post by Wildeblood »

Capt. Murphy wrote:
It should be quite possible to have a player ship that isn't hyper space capable by setting that key to NO in the shipdata.plist. If it's not defined at all (as per all the core ship player versions) it defaults to true as per the wiki documentation and the changelog.

But other than Griff's Illicit Unlock I don't think there exists any OXP player ships that have it set. - edit - it's not set there either so all of those are hyperspace capable.

But they don't have to be... :wink:

further edit - though I'd give this a test - New jameson - added "hyperspace_motor" = no; to shipdata.plist and hey presto with a full tank of fuel the range is 0 on the sort range chart.
Okay, but I repeat the question that CSOTB has run away from, how is it in any way relevant here? If you wanted to create a player-flyable escape capsule that was not hyperspace capable perhaps you could, but it's not relevant here because the game doesn't include a player-flyable escape capsule. You only need to peruse the shipdata file to know that. There is no such entity in the game as a player escape capsule - it doesn't exist. This is the simple point I was trying to make that resulted in CSOTB's outburst.

This is my understanding: when the player messes up and gets his ship "destroyed" and is supposedly in an escape capsule, what happens is the player ship entity is marked invalid temporarily, the player location is changed to docked at the main station, then the player ship entity is marked valid again. Voila! You don't really get a new ship, you get your old one back again. The cunning guys at Obnoxicorp Insurance delete the target system information from your long range chart to make it look like a new ship. If your old data were still showing on the chart, it wouldn't fool anyone into thinking it was a new ship. There is no player escape capsule.

If the player were really transferred from his usual ship to an escape capsule, then he could be just as easily transferred to any other player ship. So Dragonfire and others could have their wish for a "personal garage station" filled with more than one player ship. But they can't.
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: SystemID? or targetSystem? undefined while ejecting

Post by CommonSenseOTB »

Ahruman wrote:
CommonSenseOTB wrote:
Ahruman, I'm dropping this. The essence of what you say is true. However, only player.ship.targetSystem becomes undefined. Shouldn't the others?
You know, life would be a lot easier if you edited your stream-of-conciousness posts so they actually contained all pertinent information, and perhaps less personal attacks and random opinions not directly relevant to the issue at hand.

I just tested to verify, and in 1.75.3 other properties are undefined, at least the several I tested. What values are you seeing that are not undefined?
Ahruman, for some reason all the gauges in numeric hud hold the values even when reading variables that are supposed to be undefined. I can see what the values were when after ejecting you go through the docking tunnel effect and the hud is redrawn and the values prior to ejecting are there. I can't explain it. All gauges should be giving an undefined error but only player.ship.targetSystem does.
Maybe I'm misreading or misinterpretting what I see.

I'll use the patch you gave me and everything else works fine. Thanks for the help, I do appreciate it.
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: targetSystem? undefined while ejecting

Post by CommonSenseOTB »

In testing the bugfix I did on the SaveAnywhere3.1.oxp I realized that I had not yet installed your patch on the numerichud, Ahruman. I did so and everything works great. This will be in the next numerichud version.

Thanks Ahruman for helping me out, I do appreciate it. This patch will provide a solution to others with a similar problem in the future. :)
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
Post Reply