Page 2 of 8

Re: ExtraFuelTanks

Posted: Fri Apr 27, 2012 8:20 am
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.

Re: ExtraFuelTanks

Posted: Fri Apr 27, 2012 8:39 am
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 < >).

Re: ExtraFuelTanks

Posted: Fri Apr 27, 2012 8:57 am
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.

Re: ExtraFuelTanks

Posted: Fri Apr 27, 2012 9:05 am
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."

Re: ExtraFuelTanks

Posted: Fri Apr 27, 2012 9:08 am
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.

Re: ExtraFuelTanks

Posted: Fri Apr 27, 2012 9:31 am
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;
}
),
)

Re: ExtraFuelTanks

Posted: Fri Apr 27, 2012 9:59 am
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.

Re: ExtraFuelTanks

Posted: Fri Apr 27, 2012 11:14 am
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.

Re: ExtraFuelTanks

Posted: Fri Apr 27, 2012 1:02 pm
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.

Re: ExtraFuelTanks

Posted: Fri Apr 27, 2012 1:43 pm
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.

Re: ExtraFuelTanks

Posted: Fri Apr 27, 2012 2:08 pm
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.

Re: ExtraFuelTanks

Posted: Fri Apr 27, 2012 2:20 pm
by Smivs
OK, fixed I hope.
v1.4 is now available for download :)

Download

Re: ExtraFuelTanks

Posted: Fri Apr 27, 2012 3:28 pm
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)

Re: ExtraFuelTanks

Posted: Fri Apr 27, 2012 3:34 pm
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.

Re: ExtraFuelTanks

Posted: Fri Apr 27, 2012 4:34 pm
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? :(