Page 65 of 115

Re: Scripters cove

Posted: Wed Feb 20, 2013 11:27 pm
by HAL
Thanks again for the help... this "log" whatjimacallit might come in useful :)

My trouble is, I'm used to the sort of game that has a million levels of security and copyright. I don't suppose I'll sleep much in the next few days/months/years/ever with all these new possibilities :D

Re: Scripters cove

Posted: Wed Feb 20, 2013 11:33 pm
by Smivs
HAL wrote:
My trouble is, I'm used to the sort of game that has a million levels of security and copyright. I don't suppose I'll sleep much in the next few days/months/years/ever with all these new possibilities :D
Ha, no. You have come over to the Dark Side and been seduced by OXPs. Your life will never be the same again - you are doomed I fear. :D

Re: Scripters cove

Posted: Wed Feb 20, 2013 11:42 pm
by HAL
Smivs wrote:
HAL wrote:
My trouble is, I'm used to the sort of game that has a million levels of security and copyright. I don't suppose I'll sleep much in the next few days/months/years/ever with all these new possibilities :D
Ha, no. You have come over to the Dark Side and been seduced by OXPs. Your life will never be the same again - you are doomed I fear. :D
That may be true, but I hear the cookies are good :lol:

Re: Scripters cove

Posted: Thu Feb 21, 2013 8:18 am
by Smivs
The Cookies are Wonderful :)

Re: Scripters cove

Posted: Thu Feb 21, 2013 3:17 pm
by HAL
Okay, I'm back :roll:

I decided to make something I can distribute without any risk of infringing copyright, so I copied the shipdata, demoships and shipyard plists from the main game. I deleted all but the adder and adder_player, and renamed them to gilgalad21213 and gilgalad21213-player and made a few tweaks. I also copied the interceptAI.plist, and changed a couple of responses to attack instead of flee, renamed that and tried it out. Even after finally remembering to add a requires plist (which I copied from another OXP just in case) I kept getting this in the log:

Code: Select all

15:05:35.795 [plist.parse.failed]: Failed to parse /Users/.../Documents/Oolite 1.77/AddOns/gilgalad_0_0_1.oxp/Config/shipyard.plist as a property list.
Unexpected character " at line 2
15:05:35.941 [plist.parse.failed]: Failed to parse /Users/.../Documents/Oolite 1.77/AddOns/gilgalad_0_0_1.oxp/Config/demoships.plist as a property list.
Unexpected character ( at line 1
demoships.plist looks like this:

Code: Select all

(
	"gilgalad21213"
	"gilgalad21213-player"
)
and shipyard.plist looks like this:

Code: Select all

	"gilgalad21213-player" =
	{
		chance = 1;
		"optional_equipment" =
		(
			"EQ_ECM",
			"EQ_FUEL_SCOOPS",
			"EQ_ESCAPE_POD",
			"EQ_ENERGY_BOMB",
			"EQ_ENERGY_UNIT",
			"EQ_NAVAL_ENERGY_UNIT",
			"EQ_DOCK_COMP",
			"EQ_WEAPON_PULSE_LASER",
			"EQ_WEAPON_BEAM_LASER",
			"EQ_WEAPON_MINING_LASER",
			"EQ_WEAPON_MILITARY_LASER",
			"EQ_FUEL_INJECTION",
			"EQ_SCANNER_SHOW_MISSILE_TARGET",
			"EQ_MULTI_TARGET",
			"EQ_GAL_DRIVE",
			"EQ_SHIELD_BOOSTER"
		       "EQ_NAVAL_SHIELD_BOOSTER"
		);
		price = 650;
		"standard_equipment" =
		{
			extras =
			(
				"EQ_HEAT_SHIELD"
			);
			"forward_weapon_type" = "EQ_WEAPON_PULSE_LASER";
			missiles = 1;
		};
		techlevel = 1;
		"weapon_facings" = 1;
	};
	
I have no idea what it wants, since the plists are basically the same as the core game ones. Any ideas? :?

Re: Scripters cove

Posted: Thu Feb 21, 2013 3:21 pm
by cim
HAL wrote:
demoships.plist looks like this:
You need a comma after the first entry in it, to separate the entries (though, unless the NPC and player versions are very visually distinct, you probably only need to put one of them into the demoships list anyway)
HAL wrote:
and shipyard.plist looks like this:
You deleted a little too much: the original list has a { at the start and a } at the end enclosing all the entries within the list. If you put those back it should work.

Re: Scripters cove

Posted: Thu Feb 21, 2013 3:33 pm
by HAL
Thanks,

now demoships is fine, but it says there's an unexpected { at line 1

Re: Scripters cove

Posted: Thu Feb 21, 2013 3:48 pm
by cim
Not sure - can you post the current shipyard.plist?

While it's not what's giving that error, you've got another comma missing here:

Code: Select all

    "EQ_SHIELD_BOOSTER"
             "EQ_NAVAL_SHIELD_BOOSTER"

Re: Scripters cove

Posted: Thu Feb 21, 2013 3:52 pm
by HAL
Here it is (with the added comma)

Code: Select all

{
	"gilgalad21213-player" =
	{
		chance = 1;
		"optional_equipment" =
		(
			"EQ_ECM",
			"EQ_FUEL_SCOOPS",
			"EQ_ESCAPE_POD",
			"EQ_ENERGY_BOMB",
			"EQ_ENERGY_UNIT",
			"EQ_NAVAL_ENERGY_UNIT",
			"EQ_DOCK_COMP",
			"EQ_WEAPON_PULSE_LASER",
			"EQ_WEAPON_BEAM_LASER",
			"EQ_WEAPON_MINING_LASER",
			"EQ_WEAPON_MILITARY_LASER",
			"EQ_FUEL_INJECTION",
			"EQ_SCANNER_SHOW_MISSILE_TARGET",
			"EQ_MULTI_TARGET",
			"EQ_GAL_DRIVE",
			"EQ_SHIELD_BOOSTER",
		       "EQ_NAVAL_SHIELD_BOOSTER"
		);
		price = 650;
		"standard_equipment" =
		{
			extras =
			(
				"EQ_HEAT_SHIELD"
			);
			"forward_weapon_type" = "EQ_WEAPON_PULSE_LASER";
			missiles = 1;
		};
		techlevel = 1;
		"weapon_facings" = 1;
	};
	};
I tried it without the semicolon at the end as well, with the same result.

Re: Scripters cove

Posted: Thu Feb 21, 2013 4:15 pm
by Eric Walch
HAL: you are on a mac. For editing plists, it is probably easier to use PlistEditPro. It won't allow to make syntax error. (But there is still room to make other errors :D )
When you are on OSX10.6 or older, you can also install the develloper package from the installation disk. That also contains a plist editor. Starting with Lion this is no longer on the installer disks. :(

Re: Scripters cove

Posted: Thu Feb 21, 2013 5:22 pm
by HAL
Thanks Eric, I've installed that now, which has helped. It seems to have a problem with the = sign after "gilgalad21213-player". It says "unexpected character at offset 26", and when I remove it, "token 'start of object' not expected after object key".

Re: Scripters cove

Posted: Thu Feb 21, 2013 6:03 pm
by Smivs
Shot in the dark, but I sometimes get a weird thing where the code looks fine but doesn't work. Strangely the solution is simply to delete the section causing the problem and writing it (or c&p-ing it) again.

Re: Scripters cove

Posted: Thu Feb 21, 2013 6:21 pm
by HAL
Nope, that didn't work. It was worth a try, though. Something similar happens to me, but with the cache flushing - I have to take an OXP out, start oolite, close it, then put the OXP back into the addons folder, just so that it sees any changes in my OXP. Does the same even with the "always flush cache" thing checked in the secret toolbar, AND while holding shift while restarting.

Re: Scripters cove

Posted: Thu Feb 21, 2013 9:04 pm
by Eric Walch
The problem is the last semicolon. It is a root directory that does not end with a semicolon. It also didn't start with: xxx =

But it could be that windows systems do accept a semicolon there.

Re: Scripters cove

Posted: Thu Feb 21, 2013 9:21 pm
by HAL
I have deleted the last semicolon, which has got rid of one error message, but it still has a problem with the = sign.
It also didn't start with: xxx =
Should it start with something else? It seems to be right, compared with another OXP's shipyard.plist, but PlistEditPro won't save it.