Problem with moons?

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

Moderators: winston, another_commander, Getafix

User avatar
lave
Deadly
Deadly
Posts: 141
Joined: Thu Sep 09, 2010 12:21 am
Location: Deep in Leesti space mining asteroids for a living.
Contact:

Problem with moons?

Post by lave »

I seem to have a small bug with moons.

It seems that when I land on a moon (without atmosphere), on the F5 screen it is listed as Minor instead of moon.

I have looked at some of the JS files and when on a moon your location should say Moon of Lave (or whatever planet) - (some colony name).

Instead it says Lave Minor - (some colony name).

According the the scrips in PlanetFall, the term Minor (sub) relates to other planets in the system, whereas the term Moon is for moons.

I have done some taxi work and took someone to a moon, but because the moon is being seen as a planet (Minor) it does not give me the credits.

I have taken someone to a planet and that worked fine.

It just when someone wants to go to a moon, it does not work due to it being listed as a planet.

I have limited JS experience, but I can't seem to find an error in any script files.

Any ideas?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6681
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Moving this to Expansion Pack. We try to keep Testing and Bug Reports for core game bugs only. If we determine that it is a core game issue causing this, we can bring the topic back to the T&BR forum.
User avatar
lave
Deadly
Deadly
Posts: 141
Joined: Thu Sep 09, 2010 12:21 am
Location: Deep in Leesti space mining asteroids for a living.
Contact:

Post by lave »

Hi.

OK to add planets and moons I have...
Deep Horizons - System Redux 2.oxp

I also have (which affect planets, moons, ect)...
Deep Horizons - Gas Giant Skimming.oxp
Lave.oxp (adds a moon)
Orbits.oxp
Farsun.oxp

It's not a real major problem, because I usally play this game as an asteriod miner and I am only doing taxi work in Lave to get myself money to buy what I need to mine.
Yeah I know I can trade like normal people do, but I am not normal lol.

It's just that when I see a minor bug like this, and I can't see what is causing it, it does my head in.


EDIT.... Erm? where did the reply go above? :?
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

I've done some testing with DH SR2, and I'm getting some weird results. If I jump to the Onrira system it adds 4 moons. So in the JS console I get:
JS Console wrote:
S.planets
S.planets
[Planet ID: 826 position: (0, 0, 801360) type: STELLAR_TYPE_NORMAL_PLANET radius: 66.780km],[Moon ID: 901 position: (171386, 18095.8, 621054) type: STELLAR_TYPE_MOON radius: 7.000km],[Moon ID: 902 position: (-16964.1, 190241, 654444) type: STELLAR_TYPE_MOON radius: 9.000km],[Moon ID: 903 position: (276.984, -231814, 988344) type: STELLAR_TYPE_MOON radius: 10.000km],[Moon ID: 904 position: (221255, -18011.5, 701190) type: STELLAR_TYPE_MOON radius: 7.000km]
If I check the script's variables, this.Num_Moons returns 4 and this.Num_Planets returns 0, which is correct. However if I test S.Planets[x].hasAtmosphere on the above (x being 0-4), they all return true, where the moons (x 1-4) should return false.

Even more strangely if I call the DH SR2 function to add moons directly (worldScripts["System Redux 2"].addMoons()) it correctly adds 4 more moons (so 9 planet entities in total):

JS Console wrote:
S.planets
[Planet ID: 826 position: (0, 0, 801360) type: STELLAR_TYPE_NORMAL_PLANET radius: 66.780km],[Moon ID: 901 position: (171386, 18095.8, 621054) type: STELLAR_TYPE_MOON radius: 7.000km],[Moon ID: 902 position: (-16964.1, 190241, 654444) type: STELLAR_TYPE_MOON radius: 9.000km],[Moon ID: 903 position: (276.984, -231814, 988344) type: STELLAR_TYPE_MOON radius: 10.000km],[Moon ID: 904 position: (221255, -18011.5, 701190) type: STELLAR_TYPE_MOON radius: 7.000km],[Moon ID: 940 position: (171386, 18095.8, 621054) type: STELLAR_TYPE_MOON radius: 7.000km],[Moon ID: 941 position: (-16964.1, 190241, 654444) type: STELLAR_TYPE_MOON radius: 9.000km],[Moon ID: 942 position: (276.984, -231814, 988344) type: STELLAR_TYPE_MOON radius: 10.000km],[Moon ID: 943 position: (221255, -18011.5, 701190) type: STELLAR_TYPE_MOON radius: 7.000km]
but this time if I repeat the hasAtmosphere test, the new entities (x=5-8) correctly return false?

I cannot see why I'm getting something different if I manually call the function from the JS console compared to the script doing it itself during this.shipWillExitWitchspace. But something is clearly going weird somewhere (and I don't think it's in DH SR2 - I cannot see anything odd in the script plus S.planets[x].hasAtmosphere is read-only anyway from the JS console so also presumably from script).

PF Taxi uses .hasAtmosphere to differentiate moons from sub-planets, so if that is set wrongly in the generation of the entity then it will screw up.
Last edited by Thargoid on Wed Sep 15, 2010 5:31 pm, edited 2 times in total.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

lave wrote:
EDIT.... Erm? where did the reply go above? :?
Sorry, did some tests, typed the reply, then did some other tests which more clearly showed the problem. So I deleted my first reply and posted a new one (just above).

So just pretend you're psychic and answered my question before I asked it ;)
User avatar
lave
Deadly
Deadly
Posts: 141
Joined: Thu Sep 09, 2010 12:21 am
Location: Deep in Leesti space mining asteroids for a living.
Contact:

Post by lave »

Thargoid wrote:
If I check the script's variables, this.Num_Moons returns 4 and this.Num_Planets returns 0, which is correct. However if I test S.Planets[x].hasAtmosphere on the above (x being 0-4), they all return true, where the moons (x 1-4) should return false.
That must by why moons are being listed as planets in the F5 screen then because it is thinking that they have atmospheres.
Thargoid wrote:

PF Taxi uses .hasAtmosphere to differentiate moons from sub-planets, so if that is set wrongly in the generation of the entity then it will screw up.
Yes I have noticed that but as far as I know the PF Taxi script seems fine.
However my JS is limited. I could be missing something obvious.
Last edited by lave on Wed Sep 15, 2010 6:03 pm, edited 1 time in total.
User avatar
Cmd. Cheyd
---- E L I T E ----
---- E L I T E ----
Posts: 934
Joined: Tue Dec 16, 2008 2:52 pm
Location: Deep Horizon Industries Manufacturing & Research Site somewhere in G8...

Post by Cmd. Cheyd »

Deep Horizon - Systems (new name for DH_SR2 in an attempt to avoid confusion with CaptKev's upcoming SR2) is not fully compatible with the Taxi OXP AFAIK.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Cmd. Cheyd wrote:
Deep Horizon - Systems (new name for DH_SR2 in an attempt to avoid confusion with CaptKev's upcoming SR2) is not fully compatible with the Taxi OXP AFAIK.
This is PF Taxi showing up I think an underlying problem with system.addMoons, via DH-S's use of it.

My test documented above just repeats the function call within your script and seems to give a different result. I can't see anything wrong in your script, it seems to be in the trunk function itself.
User avatar
lave
Deadly
Deadly
Posts: 141
Joined: Thu Sep 09, 2010 12:21 am
Location: Deep in Leesti space mining asteroids for a living.
Contact:

Post by lave »

I'm sure someone will sort it out.

For now, if someone needs a lift to a moon, they can just bloody walk :lol:
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Thargoid wrote:
I've done some testing with DH SR2, and I'm getting some weird results. If I jump to the Onrira system it adds 4 moons. So in the JS console I get:
JS Console wrote:
S.planets
S.planets
[Planet ID: 826 position: (0, 0, 801360) type: STELLAR_TYPE_NORMAL_PLANET radius: 66.780km],[Moon ID: 901 position: (171386, 18095.8, 621054) type: STELLAR_TYPE_MOON radius: 7.000km],[Moon ID: 902 position: (-16964.1, 190241, 654444) type: STELLAR_TYPE_MOON radius: 9.000km],[Moon ID: 903 position: (276.984, -231814, 988344) type: STELLAR_TYPE_MOON radius: 10.000km],[Moon ID: 904 position: (221255, -18011.5, 701190) type: STELLAR_TYPE_MOON radius: 7.000km]
If I check the script's variables, this.Num_Moons returns 4 and this.Num_Planets returns 0, which is correct. However if I test S.Planets[x].hasAtmosphere on the above (x being 0-4), they all return true, where the moons (x 1-4) should return false.
To add to the confusion:

I recently flew to a far away gas-planet from system redux. To speed things up, I used 16x time acceleration. Looking at the planet at that acceleration, you clearly see clouds moving over the surface. That is completely wrong as with those banded planets, the bands already are the clouds.
To keep the illusion of band of clouds covering the planet, those gas planets better should be defined as moons! (no additional created atmosphere)
User avatar
Cmd. Cheyd
---- E L I T E ----
---- E L I T E ----
Posts: 934
Joined: Tue Dec 16, 2008 2:52 pm
Location: Deep Horizon Industries Manufacturing & Research Site somewhere in G8...

Post by Cmd. Cheyd »

Eric-
At least for my stuff, I deliberately left that 'bug' in place because I wanted the planet to properly have '.hasAtmosphere = true'. If I'd set it to false, I figured someone would complain that I was using a moon as a planet and would break someone's OXP. I figured it's be better to have the visual 'bug' than to have a coding 'incompatibility'.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Wouldn't a gas giant have multiple levels of cloud which could move over one another independently anyway?

It does just seem to be DH-S's script which is generating moons with atmosphere. I just wrote a quick test script to add a couple of moons at shipWillExitWitchspace and then again at shipExitedWitchspace (using the planetinfo.plist from DH-S) and they all added without atmosphere.

As to why we're getting moons with atmosphere I have no idea, as the DH-S scripts for me are too complex and intertwined to allow debugging. Especially as they do seem to appear properly labelled in the system.planets list.

So as Cmd Cheyd said above, sadly PlanetFall Taxi is at least partially incompatible with DH-S for the moment.

However I've just checked both System Redux v1.2 and also System Demux (both available via the wiki). PF Taxi works correctly with both of those for moon landings. So at least there are other options until this is resolved.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

About gas giants & clouds: well, the ones we know about don't really have that quick an atmosphere: the great red spot on jupiter is actually a hurricane which has been temporarily disrupting its atmosphere for a few hundred years or so.

As far as .hasAtmosphere is concerned, Oolite does assign it properly after a planet is created, as far as I know...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Kaks wrote:
..the great red spot on jupiter is actually a hurricane which has been temporarily disrupting its atmosphere for a few hundred years or so
Or even a few thousand years, nobody knows. The only thing we know that the hurricane was first spotted 300 years ago by Cassini or Hooke around the year of 1665.
User avatar
Cmd. Cheyd
---- E L I T E ----
---- E L I T E ----
Posts: 934
Joined: Tue Dec 16, 2008 2:52 pm
Location: Deep Horizon Industries Manufacturing & Research Site somewhere in G8...

Post by Cmd. Cheyd »

I'll jump into the code on the old script and see if I can find a cause...
Post Reply