Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Planetfall OXP

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Chaky
Deadly
Deadly
Posts: 213
Joined: Sat Aug 15, 2009 6:15 am

Post by Chaky »

Oh, OK.

It looks like it's missing {}, judging from the formatting, but looks can decieve...
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Chaky wrote:
Oh, OK.

It looks like it's missing {}, judging from the formatting, but looks can decieve...
As I said, for my normal coding style they are missing (as I normally put them in even for single-lines).

But strictly they're only necessary if you want to put multiple code lines in the if/else statement. But as Eric says in this case there is only one code line (the next nested if statement), it's just that it's a very long one :)
Chaky
Deadly
Deadly
Posts: 213
Joined: Sat Aug 15, 2009 6:15 am

Post by Chaky »

Got it.

It doesn't matter if the brackets are there or not if the following statement is a single line... or a single line that spawns over 100 lines, like in this case.

I should pay more attention...


BTW, I'm trying to run it with trunk, and I'm getting this error logged:

Code: Select all

[script.javaScript.warning.undefinedProp]: ----- JavaScript warning ("PlanetFall" 1.2): reference to undefined property this.rangeCheckTimer
[script.javaScript.warning.undefinedProp]:       ../AddOns/PlanetFall v1.2.oxp/Config/script.js, line 447.
[script.javaScript.exception.noProperties]: ***** JavaScript exception ("PlanetFall" 1.2): TypeError: this.rangeCheckTimer has no properties
[script.javaScript.exception.noProperties]:       ../AddOns/PlanetFall v1.2.oxp/Config/script.js, line 447.
[script.javaScript.warning.undefinedProp]: ----- JavaScript warning ("PlanetFall" 1.2): reference to undefined property this.rangeCheckTimer
[script.javaScript.warning.undefinedProp]:       ../AddOns/PlanetFall v1.2.oxp/Config/script.js, line 384.
[script.javaScript.exception.noProperties]: ***** JavaScript exception ("PlanetFall" 1.2): TypeError: this.rangeCheckTimer has no properties
[script.javaScript.exception.noProperties]:       ../AddOns/PlanetFall v1.2.oxp/Config/script.js, line 384.
Any ideas how to make it trunk-compatible?
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Due to the identified problem some people are having with ship-crashes (space bar moments) on launch, and after some discussion with Eric and A_C (and with Kak's help too), it's time for a quick update.

We think we've got a good idea of what's causing it, so I've adjusted the scripting to work around it. Launching should now be somewhat safer, although there is a minor change in the view after launch after launch which doesn't look as good as it used to. But that's the cost of the new script method.

Download from the thread first post, or the links below (as usual).
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

As the above fix didn't cure the bug fully, I've re-re-tweaked the code to hopefully finally do away with the planet splat bug.

Download v1.22 from the first post of this thread, or via the links below.
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Post by pmw57 »

Some of the commodity lists have Gold, Platinum and Gem Stones listed as type 0 for tons, when they really should be type 1 for Kg or type 2 for grams.

Leaving them like this currently can crash the game.
https://bb.oolite.space/viewtopic.php?p=88684#88684

This has been affecting other OXPs as well, which I suspect is a result of copy/paste code techniques.

Would you kindly update the commodity file so that this issue is fixed.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

All three location entries with this "problem" also have the available amounts of those commodities set at zero, so you can never actually buy them at those locations.

But for consistency with other OXPs I'll change the units anyway, it can come out when I next update the OXP.
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Post by pmw57 »

Thanks., for even though they're zero, they can still be sold off.

Aside from that, the screen display "Load 16 of 10 t." is affected too, again, thanks.
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:

Post by Commander McLane »

@ Thargoid: As pmw57 already painfully found out with Taranis.oxp, the wrong definition in commodities.plist alone will crash the game, regardless whether the valuables are actually for sale on the station or not. So it has to be corrected anyway.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

OK, Planetfall v1.23 now on box.net with a fixed commodities.plist.

Alternatively if you just want the new plist file, download it here and over-write the existing one in v1.22 or below with it.
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Post by pmw57 »

Thargoid wrote:
OK, Planetfall v1.23 now on box.net with a fixed commodities.plist.

Alternatively if you just want the new plist file, download it here and over-write the existing one in v1.22 or below with it.
Thank you for the speedy work!
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Re: Planetfall OXP

Post by JazHaz »

Does Planetfall work with 1.75?

It has a requires.plist file:

Code: Select all

{ version = "1.74";  }
Would that mean it wouldn't work? The wiki states "Y" on the compatibility column though.
JazHaz

Gimi wrote:
drew wrote:
£4,500 though! :shock: <Faints>
Cheers,
Drew.
Maybe you could start a Kickstarter Campaign to found your £4500 pledge. 8)
Thanks to Gimi, I got an eBook in my inbox tonight (31st May 2014 - Release of Elite Reclamation)!
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Planetfall OXP

Post by Thargoid »

It works fine. The code you list is the minimum version requirement. So it'll work with 1.75, but not 1.73.

The one that limits things that way is the max_version key, which none of my current OXPs now have.
Greyth
---- E L I T E ----
---- E L I T E ----
Posts: 286
Joined: Wed Feb 08, 2012 1:57 am

Re: Planetfall OXP

Post by Greyth »

Hi Thargoid, thanks for this great OXP! 8) I have had a couple of problems. A few times when taking off from a planet, ground control hail me with 'Do not attempt landing - your ship will be destroyed' and when I look at the ship status the 'Planetary Landing Capability' is damaged - although it was just fine when I landed there. I'm running OXP v1.41 on Oolite v1.76.

Interestingly the ship activates the self repair system but that does not repair the planetary landing capability. Just once, so far, it wasn't the only piece of equipment damaged. All in all I've got 90 OXP's loaded so I guess it may be nothing to do with your OXP whatsoever!
Oolite 1.76
Debian 6 : Ubuntu 12.04
NVidia 6200 : Radeon/AMD thang
Abit AN7 : Packard Bell TJ74
User avatar
fronclynne
Deadly
Deadly
Posts: 149
Joined: Sun Mar 01, 2009 5:36 am
Location: ::1

Re: Planetfall OXP

Post by fronclynne »

Greyth wrote:
A few times when taking off from a planet, ground control hail me with 'Do not attempt landing - your ship will be destroyed' and when I look at the ship status the 'Planetary Landing Capability' is damaged - although it was just fine when I landed there.
I believe it's a feature, not a bug.

Code: Select all

 missionVariables.planetFallBreak += 0.02; // 2% cumulative chance of 
equipment failure 
Post Reply