Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Scripters cove

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

Moderators: winston, another_commander

User avatar
HAL
Competent
Competent
Posts: 49
Joined: Wed Aug 29, 2012 2:05 pm

Re: Scripters cove

Post 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
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Scripters cove

Post 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
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
HAL
Competent
Competent
Posts: 49
Joined: Wed Aug 29, 2012 2:05 pm

Re: Scripters cove

Post 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:
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Scripters cove

Post by Smivs »

The Cookies are Wonderful :)
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
HAL
Competent
Competent
Posts: 49
Joined: Wed Aug 29, 2012 2:05 pm

Re: Scripters cove

Post 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? :?
Last edited by HAL on Thu Feb 21, 2013 3:30 pm, edited 1 time in total.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Scripters cove

Post 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.
User avatar
HAL
Competent
Competent
Posts: 49
Joined: Wed Aug 29, 2012 2:05 pm

Re: Scripters cove

Post by HAL »

Thanks,

now demoships is fine, but it says there's an unexpected { at line 1
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Scripters cove

Post 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"
User avatar
HAL
Competent
Competent
Posts: 49
Joined: Wed Aug 29, 2012 2:05 pm

Re: Scripters cove

Post 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.
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: Scripters cove

Post 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. :(
User avatar
HAL
Competent
Competent
Posts: 49
Joined: Wed Aug 29, 2012 2:05 pm

Re: Scripters cove

Post 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".
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Scripters cove

Post 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.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
HAL
Competent
Competent
Posts: 49
Joined: Wed Aug 29, 2012 2:05 pm

Re: Scripters cove

Post 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.
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: Scripters cove

Post 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.
User avatar
HAL
Competent
Competent
Posts: 49
Joined: Wed Aug 29, 2012 2:05 pm

Re: Scripters cove

Post 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.
Post Reply