Page 1 of 1
APRIL OXP
Posted: Fri Nov 23, 2012 10:29 am
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
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
Thanks,
Jorge
Re: APRIL OXP
Posted: Fri Nov 23, 2012 11:12 am
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
Re: APRIL OXP
Posted: Fri Nov 23, 2012 11:53 am
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
Re: APRIL OXP
Posted: Fri Nov 23, 2012 12:37 pm
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.
Re: APRIL OXP
Posted: Fri Nov 23, 2012 12:44 pm
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.
Re: APRIL OXP
Posted: Fri Nov 23, 2012 2:33 pm
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
Re: APRIL OXP
Posted: Fri Nov 23, 2012 2:38 pm
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.
Re: APRIL OXP
Posted: Fri Nov 23, 2012 3:29 pm
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
Thanks for the help
Re: APRIL OXP
Posted: Fri Nov 23, 2012 3:57 pm
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.
Re: APRIL OXP
Posted: Fri Nov 23, 2012 4:01 pm
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.
Re: APRIL OXP
Posted: Fri Nov 23, 2012 4:48 pm
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:
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.