ExtraFuelTanks OXZ

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

Moderators: another_commander, winston

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6554
Joined: Wed Feb 28, 2007 7:54 am

Re: ExtraFuelTanks

Post by another_commander »

And there is the problem, swiftly reported in the log:

09:05:52.346 [plist.parse.failed]: Failed to parse /Users/Albee/Library/Application Support/Oolite/AddOns/ExtraFuelTanksV1.3.oxp/Config/equipment.plist as a property list. Unexpected character ( at line 1

There is a problem in the FuelTanksV1.3.oxp shipdataequipment.plist. We'll need to see this plist to find out what's wrong.

Edit: Gah! It's equipment, not shipdata.
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6881
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Re: ExtraFuelTanks

Post by Disembodied »

Albee wrote:
I checked out the Oolite-Mac forum and discovered that the screenshots are right there on my desktop (doh!). Still don't know how to attach them to a post, mind you. :(
You need to upload the images to a photo sharing site like Photobucket or Imageshack, then link to them using <img></img> tags (except with [ ] instead of < >).
Albee
Deadly
Deadly
Posts: 154
Joined: Wed Apr 25, 2012 9:49 am
Location: Derby

Re: ExtraFuelTanks

Post by Albee »

another_commander wrote:
There is a problem in the FuelTanksV1.3.oxp shipdata.plist. We'll need to see this plist to find out what's wrong.
I can't see a shipdata.plist in Config -- is that where it should be? There are only 2 files: equipment.plist and world-scripts.plist.
Albee
Deadly
Deadly
Posts: 154
Joined: Wed Apr 25, 2012 9:49 am
Location: Derby

Re: ExtraFuelTanks

Post by Albee »

Disembodied wrote:
You need to upload the images to a photo sharing site like Photobucket or Imageshack, then link to them using <img></img> tags (except with [ ] instead of < >).
Okay, here goes...

Bugger! Preview is telling me "It was not possible to determine the dimensions of the image."
User avatar
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: ExtraFuelTanks

Post by Gimi »

another_commander wrote:
And there is the problem, swiftly reported in the log:
09:05:52.346 [plist.parse.failed]: Failed to parse /Users/Albee/Library/Application Support/Oolite/AddOns/ExtraFuelTanksV1.3.oxp/Config/equipment.plist as a property list. Unexpected character ( at line 1
There is a problem in the FuelTanksV1.3.oxp shipdata.plist. We'll need to see this plist to find out what's wrong.
Albee wrote:
another_commander wrote:
There is a problem in the FuelTanksV1.3.oxp shipdata.plist. We'll need to see this plist to find out what's wrong.
I can't see a shipdata.plist in Config -- is that where it should be? There are only 2 files: equipment.plist and world-scripts.plist.
It's equipment.plist. Just a small typo from AC.
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
Albee
Deadly
Deadly
Posts: 154
Joined: Wed Apr 25, 2012 9:49 am
Location: Derby

Re: ExtraFuelTanks

Post by Albee »

Gimi wrote:
It's equipment.plist.
Okay, here it is...

(
(
0,
100,
"Refill Reserve Fuel Tank",
"EQ_1LY_CHARGE",
"1LY Liquified Quirium Gas refill for reserve fuel tank.",
{
"available_to_all" = yes;
"requires_equipment" = "EQ_RESERVE_TANK_EMPTY";
"visible" = no; // not listed on the F5F5 screen.
}
),
(
9,
100000,
"Reserve Fuel Tank - Full",
"EQ_RESERVE_TANK",
"Pre-filled reserve fuel tank. Contains 1LY of Liquified Quirium Gas",
{
"available_to_all" = yes;
"incompatible_with_equipment" =
(
"EQ_LQG_TANK",
"EQ_LQG_TANK_EMPTY",
"EQ_LQG_TANK_DAMAGED",
"EQ_LQG_TANK_EMPTY_DAMAGED",
"EQ_RESERVE_TANK_EMPTY",
"EQ_RESERVE_TANK_DAMAGED",
"EQ_RESERVE_TANK_EMPTY_DAMAGED",
"EQ_AUX_TANK",
"EQ_AUX_TANK_EMPTY",
"EQ_AUX_TANK_DAMAGED",
"EQ_AUX_TANK_EMPTY_DAMAGED"
);
script = "LQG_RESERVE_TANK_script.js"
}
),
(
0,
300,
"Refill Auxiliary Fuel Tank",
"EQ_3LY_CHARGE",
"3LY Liquified Quirium Gas refill for auxiliary fuel tanks",
{
"available_to_all" = yes;
"requires_equipment" = "EQ_AUX_TANK_EMPTY";
"visible" = no; // not listed on the F5F5 screen.
}
),
(
9,
500000,
"Auxiliary Fuel Tank -Full",
"EQ_AUX_TANK",
"Pre-filled auxiliary fuel tank. Contains 3LY of Liquified Quirium Gas",
{
"available_to_all" = yes;
"incompatible_with_equipment" =
(
"EQ_LQG_TANK",
"EQ_LQG_TANK_EMPTY",
"EQ_LQG_TANK_DAMAGED",
"EQ_LQG_TANK_EMPTY_DAMAGED",
"EQ_AUX_TANK_EMPTY",
"EQ_AUX_TANK_DAMAGED",
"EQ_AUX_TANK_EMPTY_DAMAGED",
"EQ_RESERVE_TANK",
"EQ_RESERVE_TANK_EMPTY",
"EQ_RESERVE_TANK_DAMAGED",
"EQ_RESERVE_TANK_EMPTY_DAMAGED"
);
script = "LQG_AUX_TANK_script.js"
}
),
(
9,
400000,
"Upgrade Reserve Fuel Tank to Auxiliary Fuel Tank",
"EQ_UPGRADE_TANK",
"Allows you to upgrade your Reserve Fuel Tank to an Auxiliary Fuel Tank. Reserve Fuel Tank must be full to allow upgrade.",
{
"available_to_all" = yes;
"requires_equipment" = "EQ_RESERVE_TANK";
"incompatible_with_equipment" =
(
"EQ_LQG_TANK",
"EQ_LQG_TANK_EMPTY",
"EQ_LQG_TANK_DAMAGED",
"EQ_LQG_TANK_EMPTY_DAMAGED",
"EQ_RESERVE_TANK_EMPTY",
"EQ_RESERVE_TANK_DAMAGED",
"EQ_RESERVE_TANK_EMPTY_DAMAGED",
"EQ_AUX_TANK",
"EQ_AUX_TANK_EMPTY",
"EQ_AUX_TANK_DAMAGED",
"EQ_AUX_TANK_EMPTY_DAMAGED"
);
"visible" = no; // not listed on the F5F5 screen.
}
),
(
99,
100000,
"Reserve Fuel Tank - Empty",
"EQ_RESERVE_TANK_EMPTY",
"Empty reserve fuel tank.",
{
"available_to_all" = yes;
}
),
(
99,
500000,
"Auxiliary Fuel Tank - Empty",
"EQ_AUX_TANK_EMPTY",
"Empty auxiliary fuel tank.",
{
"available_to_all" = yes;
}
),
)
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6554
Joined: Wed Feb 28, 2007 7:54 am

Re: ExtraFuelTanks

Post by another_commander »

Interesting. I copied / pasted the equipment.plist posted above to a text file, named it equipment.plist and saved it inside a Config folder under my AddOns, then run the game. Result: It worked. I could see the two items in the F3 screen without changing anything on the file and the only errors in the log I got were about missing equipment scripts for the fuel tanks, which were expected since the scripts were, well, missing. Nothing about invalid plists.

Albee, can you open the file equipment.plist with a text editor and just save it again? It may be a text encoding glitch and re-saving from a text editor could result in a working file. You will have to Shift-restart Oolite for the change to take effect.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: ExtraFuelTanks

Post by Smivs »

Ha, interesting.
Yes the equipment.plist is OK, but your computer doesn' seem to like it. As Another_Commander suggested it may have somehow got corrupted. This has been known to happen on rare occassions-things just break during download or un-zipping. Either follow A_C's advice and re-save it using a text editor (but NOT notepad - hopefully as you are using a Mac that's not likely :) ) or alternatively just start from scratch. Remove the OXP completely (just bin it) and re-download and re-install.
Hopefully that will do the trick.
Commander Smivs, the friendliest Gourd this side of Riedquat.
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: ExtraFuelTanks

Post by Eric Walch »

another_commander wrote:
Interesting. I copied / pasted the equipment.plist posted above to a text file, named it equipment.plist and saved it inside a Config folder under my AddOns, then run the game. Result: It worked. I could see the two items in the F3 screen without changing anything on the file and the only errors in the log I got were about missing equipment scripts for the fuel tanks, which were expected since the scripts were, well, missing. Nothing about invalid plists.
He is using a Mac. There the syntax is a bit more strict. When I copy the above script, I get the same error that its a wrong plist.

The problem are several missing semicolons like in the line:

Code: Select all

script = "LQG_AUX_TANK_script.js"
EDIT: I think it are only two in the script = ... lines

ps, on a mac you can already see that a plist is wrong by looking at its icon when browsing through the folders in the finder while showing the bigger icons. Wrong plists are just white icons, while correct plist contain a shrunk down version of the files content on the icon.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: ExtraFuelTanks

Post by Smivs »

Ah!
Thanks Eric. That would explain it. And I'll refrain from any 'fussy Macs!' comments :D Also, do I also need a semi-colon after the curly bracket? Currently the code is

Code: Select all

        script = "LQG_RESERVE_TANK_script.js"
	}
so should it be

Code: Select all

        script = "LQG_AUX_TANK_script.js";
	};
?
While attempting to correct this I have stumbled upon an inconsistancy.
The 'core' equipment.plist starts and ends with a regular bracket pair - '(' at the head of the plist and ')' at the end, wheras the example on the wiki here has braces/curly brackets at the top and bottom. :?: Could somebody clear this up, please?

Apologies for cluttering the board, but this is the full 'corrected' equipment.plist.

Removed as it is now pointless clutter.
Last edited by Smivs on Fri Apr 27, 2012 2:22 pm, edited 1 time in total.
Commander Smivs, the friendliest Gourd this side of Riedquat.
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: ExtraFuelTanks

Post by Eric Walch »

Smivs wrote:
Also, do I also need a semi-colon after the curly bracket? .
No, only adding the two semicolons in the 'script' line is enough.

The semicolon is a terminator of a dictionary entry. After the } is would be a terminator of an array at the location you give.

It looks sometimes confusing when brackets are terminated in one place with a comma and an other place with a semicolon. So always look at its meaning.

And with the comma in arrays its even more complicated as there are two definitions. In one the comma is used as divider between array elements (no comma after the last entry) in the other definition the comma is a terminator for array elements (also a comma after the last entry). Lucky enough most parsers accept both syntaxes. The only exception I know are mac computers running os tiger and older. But those will fade out as Oolite 1.76 is the last version that runs on them. Trunk already wont run on that 'old' os.
I still remember buying the tiger os for my old computer as being yesterday. For taxes we got a program that needed at least tiger, I bought it and when it came it was a single dvd instead of several installation cds I was used to. And we didn't have a dvd player so had to buy one to be able to install tiger. The dvd player/writer was even cheaper than the tiger disks.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: ExtraFuelTanks

Post by Smivs »

OK, fixed I hope.
v1.4 is now available for download :)

Download
Commander Smivs, the friendliest Gourd this side of Riedquat.
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: ExtraFuelTanks

Post by Commander McLane »

Smivs wrote:
And I'll refrain from any 'fussy Macs!' comments :D
And in exchange, we'll refrain from any 'sloppy OXP writers!' comments 8)
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: ExtraFuelTanks

Post by Eric Walch »

Smivs wrote:
While attempting to correct this I have stumbled upon an inconsistancy.
The 'core' equipment.plist starts and ends with a regular bracket pair - '(' at the head of the plist and ')' at the end, wheras the example on the wiki here has braces/curly brackets at the top and bottom. :?: Could somebody clear this up, please?
It is correct on the wiki. The part enclosed in {} on the wiki is just an enlargement of one of the array elements in the example higher up on that page to show all the possible keys.
Albee
Deadly
Deadly
Posts: 154
Joined: Wed Apr 25, 2012 9:49 am
Location: Derby

Re: ExtraFuelTanks

Post by Albee »

v1.4 works fine -- I can now see the 2 items! Thanks for that, Smivs, and thanks to everyone else who contributed.
Albee wrote:
Incidentally, Smivs, if and when we do get this working, is there any chance of a discount? 50k sounds awfully expensive when compared with a 70 cred plastic jerrycan! :wink:
Smivs, I can't help noticing you didn't respond to my pathetic grovelling. No chance at all, eh? :(
Post Reply