APRIL OXP

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

Moderators: winston, another_commander

Post Reply
Jorge van den Poem
Competent
Competent
Posts: 57
Joined: Sun Nov 29, 2009 4:33 pm

APRIL OXP

Post by Jorge van den Poem »

Hallo All,

I bought an APRIL system and I would like to upgrade it to militairy specifications but I do not be able to do this I can not find a Planet where I can upgrade the system to militairy specifications I would like to tripple my amount of missiles :D
by the way I am flying a super Cobra at the moment has this somewhat to do with my problem????
can anyone tell me how I can upgrade the system? please :D

Thanks,

Jorge
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: APRIL OXP

Post by Thargoid »

It should be available at a tech 13+ system if you have 5t cargo space available and an APRIL system already fitted. If it's not appearing under those conditions then something has gone wrong.

BTW this should have probably been asked in the APRIL OXP thread, or at least in the OXP section - all fixed now by request ;)
Jorge van den Poem
Competent
Competent
Posts: 57
Joined: Sun Nov 29, 2009 4:33 pm

Re: APRIL OXP

Post by Jorge van den Poem »

Sorry but the militairy upgrade does not appear at a TL 15 system I could try at other high level systems I downloaded de OXP again and put it in my addons folder again but no effect yet, maybe I am to inpatience, I wil inform you of my progress though :D
User avatar
Shipbuilder
---- E L I T E ----
---- E L I T E ----
Posts: 877
Joined: Thu May 10, 2012 9:41 pm
Location: Derby

Re: APRIL OXP

Post by Shipbuilder »

Does the file you have placed in your AddOns folder finish .oxp ?

If not you need to place the folder ending .oxp which will be within the OXP folder you will have downloaded within your AddOns folder.
The GalTech Industries Corporation - Building ships to populate the galaxies.

Increase the variety of ships within your Ooniverse by downloading my OXPs

Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: APRIL OXP

Post by Thargoid »

If he's got the basic APRIL, then the OXP is loading.

Simplest way is to back up your save game, then open it in a decent text editor and look for the line <key>mission_aprilExpanded</key>.

If you don't have the expansion then the line following that should say <string>false</string> - if it doesn't then change it to do so and save it (make sure you don't add a .txt suffix -or any other one - to the file by mistake too, it must end .oolite-save). Then reload the commander and try again.
Jorge van den Poem
Competent
Competent
Posts: 57
Joined: Sun Nov 29, 2009 4:33 pm

Re: APRIL OXP

Post by Jorge van den Poem »

In my saved commander file it says:

<key>mission_aprilExpanded</key>
<string>FALSE</string>

Is this okay then? I will go to a TL 13+ planet and wait and see what happens I already want to thank you for the help you are giving :D
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: APRIL OXP

Post by Thargoid »

The one in my example save game file says it in lower case - I'm not sure if the case will have an influence or not. If the expansion continues to be absent then maybe try adjusting it?

The equipment condition is "conditions" = ( "mission_aprilExpanded equal false" ); which may or may not be sensitive.
Jorge van den Poem
Competent
Competent
Posts: 57
Joined: Sun Nov 29, 2009 4:33 pm

Re: APRIL OXP

Post by Jorge van den Poem »

I changed FALSE in false and that did the trick I do not know how it came in uppercase but nevermind it works fine now :D Thanks for the help :D
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: APRIL OXP

Post by Thargoid »

You're welcome, although I wonder if this has perhaps exposed a case-sense bug in trunk.

I checked all through the OXP and nowhere is the variable set to "FALSE" as a string, but only to false as a boolean state (which is also how it is checked in equipment.plist and in the script). But iirc the save game file saves things as a string, so perhaps it's a potential mismatch problem (or I maybe need to use something other than Booleans for that flag, or use JSON).

Anyway I'm away for the weekend, so will look at it next week.
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: APRIL OXP

Post by Commander McLane »

Thargoid wrote:
You're welcome, although I wonder if this has perhaps exposed a case-sense bug in trunk.

I checked all through the OXP and nowhere is the variable set to "FALSE" as a string, but only to false as a boolean state (which is also how it is checked in equipment.plist and in the script). But iirc the save game file saves things as a string, so perhaps it's a potential mismatch problem (or I maybe need to use something other than Booleans for that flag, or use JSON).
I have no experience with booleans in mission variables. Probably I have always assumed that only strings and numbers are possible (I think the early script examples used only strings anyway; and we were learning by copying).

It should be no problem to convert the boolean into a string, just to be on the safe side.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: APRIL OXP

Post by Eric Walch »

Mission variables are strings. When you assign a boolean to it, it is immediately converted to a string. It is always tricky when using them as boolean as it gives 'unpredictable' results. Any string in JS is true. You see it easy when explicit convert a "FALSE" sting to a boolean with:

Code: Select all

Boolean("FALSE")
To your surprise it will return 'true'. Okay the results are predictable but not what you might expect.

So in general it is more safe to avoid booleans in combination with mission variables altogether and only do string comparisons with "FALSE" or "NO" etc.
Post Reply