Interstellar_undocking = "yes" doesn't work for near systems

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

Moderators: winston, another_commander, Getafix

User avatar
Okti
---- E L I T E ----
---- E L I T E ----
Posts: 700
Joined: Sun Sep 26, 2010 1:51 pm
Location: A GH shop, near witchpoint to Oresrati in Galaxy 8

Interstellar_undocking = "yes" doesn't work for near systems

Post by Okti »

Hi,

For testing purposes I placed a station in interstellar space between Zaenza and Lazaso systems in G5, which are two zero LY systems.

The ship data for the station is below.

Code: Select all

	"InterstellarStation1" =
		{
		ai_type = "stationAI.plist";
		"allows_fast_docking" = yes;
		energy_recharge_rate = 5000;
		"equivalent_tech_level" = 14;
		"interstellar_undocking" = "yes";
		like_ship = "icosahedron-station";
		max_energy = 5000;
		name = "Interstellar Station";
		"scan_class" = "CLASS_STATION";
        smooth = "yes";
		roles = "Myinterstellarstation station(0)";
 	};
And when I launch from the station I am not in interstellar space any more, but in one of the above mentioned systems.
My OXP's
And Latest Mission Coyote's Run
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: Interstellar_undocking = "yes" doesn't work for near sys

Post by Commander McLane »

I guess this may be somehow related to the problem mentioned here, and the underlying cause has something to do with something not working when an interstellar location shares the same co-ordinates with a system (or in this case two systems).

I have no clue about the details, though.
User avatar
Okti
---- E L I T E ----
---- E L I T E ----
Posts: 700
Joined: Sun Sep 26, 2010 1:51 pm
Location: A GH shop, near witchpoint to Oresrati in Galaxy 8

Re: Interstellar_undocking = "yes" doesn't work for near sys

Post by Okti »

Hi,

Is there a chance to correct mentioned problem?
My OXP's
And Latest Mission Coyote's Run
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6634
Joined: Wed Feb 28, 2007 7:54 am

Re: Interstellar_undocking = "yes" doesn't work for near sys

Post by another_commander »

Please try this exe. Does it fix the problem? Make sure you test all interstellar undocking scenarios:
interstellar_undocking = no, normal systems
interstellar_undocking = no, zero distance systems
interstellar_undocking = yes, normal systems
interstellar_undocking = yes, zero distance systems
User avatar
Okti
---- E L I T E ----
---- E L I T E ----
Posts: 700
Joined: Sun Sep 26, 2010 1:51 pm
Location: A GH shop, near witchpoint to Oresrati in Galaxy 8

Re: Interstellar_undocking = "yes" doesn't work for near sys

Post by Okti »

It did work indeed. Thanks for the effort, you saved an OXP.

It is show time in IRC at 20 pm GMT, I will buy you a drink if you are about :D
My OXP's
And Latest Mission Coyote's Run
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Interstellar_undocking = "yes" doesn't work for near sys

Post by Smivs »

I believe that two Earth-type solar systems less than one light year apart would not actually have any interstellar space between them.
The furthest reaches of our solar system, the Oort cloud is around half a light year away from the sun, if I read Wikipedia right.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Okti
---- E L I T E ----
---- E L I T E ----
Posts: 700
Joined: Sun Sep 26, 2010 1:51 pm
Location: A GH shop, near witchpoint to Oresrati in Galaxy 8

Re: Interstellar_undocking = "yes" doesn't work for near sys

Post by Okti »

Smivs wrote:
I believe that two Earth-type solar systems less than one light year apart would not actually have any interstellar space between them.
The furthest reaches of our solar system, the Oort cloud is around half a light year away from the sun, if I read Wikipedia right.
But you still need to jump to them in oolite, and every jump has something to do with interstellar space.
My OXP's
And Latest Mission Coyote's Run
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Interstellar_undocking = "yes" doesn't work for near sys

Post by Switeck »

Even many typical REAL binary star systems have the stars separated by distances too great to be easily/quickly traveled without hyperspace jumping. 100+ astronomical units are not uncommon.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Interstellar_undocking = "yes" doesn't work for near sys

Post by Smivs »

Yeah, but it's not technically interstellar space. </mischief mode>
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Fatleaf
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 1988
Joined: Tue Jun 08, 2010 5:11 am
Location: In analysis mode on Phaelon
Contact:

Re: Interstellar_undocking = "yes" doesn't work for near sys

Post by Fatleaf »

And here we are trying to crowbar real life into Oolite :roll:
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
User avatar
Okti
---- E L I T E ----
---- E L I T E ----
Posts: 700
Joined: Sun Sep 26, 2010 1:51 pm
Location: A GH shop, near witchpoint to Oresrati in Galaxy 8

Re: Interstellar_undocking = "yes" doesn't work for near sys

Post by Okti »

Just a small problem is left, while testing the OXP today, I noticed player.ship.targetSystem returns wrong system number for one of the near systems.

The systems I am testing are Zaenza(55) and Lazaso(128) In G5.

I placed log statements to get the System.ID and player.ship.targetSystem.

The outcome is as follows.

In Lazaso select Zaenza in short range chart and during shipWillEnterWitchspace event handler the log shows System.ID = 128 and player.ship.targetSystem = 55 which is correct,

After the jump in Zaenza, Lazaso is selected in the short range chart both system.ID and player.ship.targetSystem are set to 55 which is wrong.

Fortunately it does not effect the WIP I am working on for the time being.

Thanks
My OXP's
And Latest Mission Coyote's Run
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6634
Joined: Wed Feb 28, 2007 7:54 am

Re: Interstellar_undocking = "yes" doesn't work for near sys

Post by another_commander »

Okti, I think that this particular last one is tricky to fix and may have chain reaction effects if an attempt is made to change the way it works at this stage. It's just that the program loops trhough the 256 systems of the galaxy looking for the ID based on player coordinates and returns the first match found. This works OK in general, but it returns inconsistent results when two (or more) systems share the same set of coodinates. I think (but could be wrong) that this happens in more than one spots in the code, which is why it may not be the best idea trying to tweak it during a freeze, even if it is to all intents and purposes a bug. But maybe this one is a bug that we can live with for now?
User avatar
Okti
---- E L I T E ----
---- E L I T E ----
Posts: 700
Joined: Sun Sep 26, 2010 1:51 pm
Location: A GH shop, near witchpoint to Oresrati in Galaxy 8

Re: Interstellar_undocking = "yes" doesn't work for near sys

Post by Okti »

another_commander wrote:
Okti, I think that this particular last one is tricky to fix and may have chain reaction effects if an attempt is made to change the way it works at this stage. It's just that the program loops trhough the 256 systems of the galaxy looking for the ID based on player coordinates and returns the first match found. This works OK in general, but it returns inconsistent results when two (or more) systems share the same set of coodinates. I think (but could be wrong) that this happens in more than one spots in the code, which is why it may not be the best idea trying to tweak it during a freeze, even if it is to all intents and purposes a bug. But maybe this one is a bug that we can live with for now?
Yes we can live with that one. I just added the the following condition and it works fine.

Code: Select all

this.shipWillEnterWitchspace = function(cause) {
if(galaxyNumber == 4 && ((system.ID == 55 && player.ship.targetSystem == 128) || (system.ID == 128 && player.ship.targetSystem == 55)  || (system.ID == 55 && player.ship.targetSystem == 55)))
Thanks for the effort again.
My OXP's
And Latest Mission Coyote's Run
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Interstellar_undocking = "yes" doesn't work for near sys

Post by Switeck »

If you can change the player.ship.targetSystem destination after a jump to the other 0 LY distance system...and that works ok, it's acceptable to me.
What's going to get really weird is if you misjump between the 2.
User avatar
Okti
---- E L I T E ----
---- E L I T E ----
Posts: 700
Joined: Sun Sep 26, 2010 1:51 pm
Location: A GH shop, near witchpoint to Oresrati in Galaxy 8

Re: Interstellar_undocking = "yes" doesn't work for near sys

Post by Okti »

Switeck wrote:
If you can change the player.ship.targetSystem destination after a jump to the other 0 LY distance system...and that works ok, it's acceptable to me.
What's going to get really weird is if you misjump between the 2.
No, I wont be bothered with that :mrgreen:
My OXP's
And Latest Mission Coyote's Run
Post Reply