Oolite Unable To Identify A Property List

General discussion for players of Oolite.

Moderators: another_commander, winston

User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

Re: Oolite Unable To Identify A Property List

Post by mandoman »

Now I'm bummed. I got tired of the "sub-entities", and just removed them. Now the SunBat won't load. I keep getting an error that doesn't make sense to me at all. Here is the error message:

19:04:10.342 [plist.parse.failed]: Failed to parse /home/mandoman/.Oolite/AddOns/SunBat.oxp/Config/shipdata.plist as a property list.
Parse failed at line 41 (char 1262) - unexpected character (wanted '=')]

Here is my shipdata.plist:

{
"SunBat" = {
"aft_eject_position" = "2.3 -1.8 0.1";
"aft_weapon_type" = "WEAPON_BEAM_LASER";
"ai_type" = "SunBatAI.plist";
"bounty" = "20";
"cargo_type" = "CARGO_NOT_CARGO";
"death_actions" = (
"commsMessage: [SunBat-plea]",
);
"energy_recharge_rate" = 8.5;
"exhaust" = (
" 23.5 -1.4 10.8 1.2 1.2 2.0",
"12.4 -0.8 -0.2 1.0 1.2 1.2 2.0",
"30.0 -1.4 -10.8 1.2 1.2 2.0"
);
"forward_weapon_type" = "WEAPON_BEAM_LASER";
"has_ecm" = yes;
"has_energy_bomb" = yes;
"has_fuel_injection" = yes;
"has_fuel_scoop" = yes;
"has_heat_shield" = yes;
"has_hyperspace_motor" = yes;
"laser_color" = "whiteColor";
"likely_cargo" = 0;
"max_cargo" = "1";
"max_energy" = 550.0;
"max_flight_pitch" = 1.4;
"max_flight_roll" = 1.6;
"max_flight_speed" = 500.0;
"max_missiles" = 6;
"missile_launch_position" = "2.4 -3.8 0.0";
"missiles" = 2;
"model" = "sunbat.dat";
"name" = "SunBat";
"roles" = "hunter pirate escort";
"smooth" = yes;
"thrust" = 55.0;
"weapon_position_aft" = "0.1 22.8 15.6";
"weapon_position_forward" = "1.0 -11.6 -2.7";
);
};
"SunBat-player" = {
"aft_eject_position" = "2.3 -1.8 0.1";
"aft_weapon_type" = "WEAPON_BEAM_LASER";
"cargo_type" = "CARGO_NOT_CARGO";
"energy_recharge_rate" = 8.5;
"exhaust" = (
" 23.5 -1.4 10.8 1.2 1.2 2.0",
"12.4 -0.8 -0.2 1.0 1.2 1.2 2.0",
"30.0 -1.4 -10.8 1.2 1.2 2.0"
);
"forward_weapon_type" = "WEAPON_BEAM_LASER";
"has_ecm" = yes;
"has_energy_bomb" = yes;
"has_fuel_injection" = yes;
"has_fuel_scoop" = yes;
"has_heat_shield" = yes;
"has_hyperspace_motor" = yes;
"hud" = "hud.plist";
"laser_color" = "whiteColor";
"max_cargo" = "1";
"max_energy" = 550.0;
"max_flight_pitch" = 1.4;
"max_flight_roll" = 1.6;
"max_flight_speed" = 500.0;
"max_missiles" = 6;
"missile_launch_position" = "2.4 -3.8 0.0";
"model" = "sunbat.dat";
"name" = "SunBat";
"roles" = "player";
"smooth" = yes;
"thrust" = 55.0;
"view_position_aft" = "0.0 2.4 0.2";
"view_position_forward" = "-9.5 0.6 0.1";
"view_position_port" = "-3.7 1.2 2.4";
"view_position_starboard" = "-3.7 1.3 -2.2";
"weapon_position_aft" = "0.1 22.8 15.6";
"weapon_position_forward" = "-10.9 -1.4 1.0";
);
};
}

Would someone please help me figure out what went wrong? How could removing all sub-entities cause the error message above, and not load my ship oxp anymore? Shoot, I hadn't even got the exhaust problem fixed yet. :(
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Mauiby de Fug
---- E L I T E ----
---- E L I T E ----
Posts: 847
Joined: Tue Sep 07, 2010 2:23 pm

Re: Oolite Unable To Identify A Property List

Post by Mauiby de Fug »

It means that there's a syntax error somewhere, and so it's expecting something that isn't there. So start looking where it thinks the error is, eg line 41. This appears to be near the end of the first chunk. I can see a "):" underneath the weapon_position_forward line, and no obvious corresponding "(" earlier, so my first guess is that you something but that got left behind. So I'd try removing the line with that bracket on (and the matching one for the player version) and seeing if that loads up.
User avatar
RyanHoots
---- E L I T E ----
---- E L I T E ----
Posts: 958
Joined: Fri May 20, 2011 8:10 pm
Location: Nowhere
Contact:

Re: Oolite Unable To Identify A Property List

Post by RyanHoots »

Mauiby de Fug wrote:
It means that there's a syntax error somewhere, and so it's expecting something that isn't there. So start looking where it thinks the error is, eg line 41. This appears to be near the end of the first chunk. I can see a "):" underneath the weapon_position_forward line, and no obvious corresponding "(" earlier, so my first guess is that you something but that got left behind. So I'd try removing the line with that bracket on (and the matching one for the player version) and seeing if that loads up.
I saw lots of ");"s in the code where none should be. Could that be doing something? It's almost as if they were replacing the "};"
Image
User avatar
Mauiby de Fug
---- E L I T E ----
---- E L I T E ----
Posts: 847
Joined: Tue Sep 07, 2010 2:23 pm

Re: Oolite Unable To Identify A Property List

Post by Mauiby de Fug »

There's one for the death actions, and another for the exhausts, and they all seem to be correct. The only one that doesn't make sense to me is the one that I mentioned.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

Re: Oolite Unable To Identify A Property List

Post by mandoman »

Mauiby de Fug wrote:
There's one for the death actions, and another for the exhausts, and they all seem to be correct. The only one that doesn't make sense to me is the one that I mentioned.
Yeah, and that was it. I have GOT to get my brain wrapped around those brackets, and quotations. Sheesh, I went through the shipdata.plist HowTo so many times, I'm about cross eyed. I saw that thing in line 41, and I couldn't quite decide if it was the cause of the problem, or not. Why did the game keep insisting that a "=" was needed there? Whatever, that was it. You have bailed me out again, Mauiby de Fug. Man I was freaked out. I thought I was removing troublesome strings, and instead caused another problem by doing it. I need to get the exhaust orientation figured out, and that was what I was going to do next. Man, I'm so relieved. Thanks again. :D
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Oolite Unable To Identify A Property List

Post by Thargoid »

The round brackets are arrays in openStep, and are used to group information for a given key. Examples are the exhaust (where you have multiple ones for a given ship), the individual custom views and the sub-entities as you've already seen.

The curly brackets make up dictionaries, which tie together different keys on the same subject. The two main examples there are the overall entries themselves (each ship is made up of a dictionary of keys describing it) and the external views (a dictionary of individual views, each of which is defined as an array of keys describing that given view).

Here I would recommend using a programmer-friendly editor like notepad++ or an equivalent. On N++ if you select an open or closing bracket (of whichever flavour) it will automatically highlight the other part of the pair and link them. It's useful for quickly checking that you have your pairs correct - a good habit to get into. And in many cases the kind of log error you saw is indicative of missing brackets. Those and missing quotes and semi-colons are arguably the three most common errors in openStep plists if you exclude typo's.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Oolite Unable To Identify A Property List

Post by Smivs »

A few of other points, Mandoman.
Firstly, you do not have to specify has_hyperspace_motor. This is set to 'true' by default. A non-jump-capable ship would normally just have no 'fuel' specified in shipdata, and also of course these will not have 'fuel_injection'. I think this facility (hyperspace_motor) is to allow a special non-jump capable NPC to have fuel injection, when you would give it injectors but no hyprspace motor.
My second point is regarding Energy Bombs. NPCs cannot have these (which is why they are likely to be removed from future versions of Oolite - they are too player-centric). If you do give an NPC an energy_bomb, what it will actually get is a Q-bomb, but then only if it has fuel_injection (so it can get away!). So there is no point giving your NPC version one.
Also there is no point specifying an energy bomb for the player in shipdata as this will be ignored. You can give the player ship an energy bomb when it is bought via the shipyard.plist when it will come equipped with one, but the shipdata.plist entry is unlikely to do anything. If you already have one this information is stored in the save file so the game knows whether you have one on board or not.
Thirdly, I notice that you've given this ship three 'roles', hunter, pirate and escort, and also a custom AI. The problem here is that whatever role it is spawned with, it's going to be stuck with your customAI, so hunter, pirate and escort versions are going to behave the same, and this doesn't make any sense at all.
You should certainly add AutoAI switching so that the game can switch to an appropriate AI for the role the ship is spawned with, and if your custom AI is for a specific role, maybe make a new version, add it to shipdata as a like_ship and specify the custom AI for that ship only.
You might also want to look at the way roles are 'weighted', as you will end up with inappropriate numbers of these ships appearing as it stands. Probably too many escorts and hunters and not enough pirates, although to be honest for an OXP ship leaving the weighting at 1.0 (which is in effect what you've done) is probably not appropriate anyway. For example if you want the pirate version to be rare a weighting of 'roles = pirate(0.1); ' might be better.
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: Oolite Unable To Identify A Property List

Post by Eric Walch »

Smivs wrote:
Thirdly, I notice that you've given this ship three 'roles', hunter, pirate and escort, and also a custom AI. The problem here is that whatever role it is spawned with, it's going to be stuck with your customAI, so hunter, pirate and escort versions are going to behave the same, and this doesn't make any sense at all.
You should certainly add AutoAI switching so that the game can switch to an appropriate AI for the role the ship is spawned with, and if your custom AI is for a specific role, maybe make a new version, add it to shipdata as a like_ship and specify the custom AI for that ship only.
This will be no problem. When a ship is spawn as 'escort', 'hunter', 'pirate' or any other of the standard roles, it will ignore the defined AI completely and give the ship a standard AI fitting to that role. That is because auto_ai is true by default.
Only when you want the ships getting the custom AI for these roles, you must set auto_ai to false. And than you are right, as than you probably need three different entries with three different custom AIs.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Oolite Unable To Identify A Property List

Post by Smivs »

Eric Walch wrote:
When a ship is spawn as 'escort', 'hunter', 'pirate' or any other of the standard roles, it will ignore the defined AI completely and give the ship a standard AI fitting to that role. That is because auto_ai is true by default.
Only when you want the ships getting the custom AI for these roles, you must set auto_ai to false.
Thanks, Eric. I stand corrected. Just goes to show, how ever much you know, there are still gaps in your knowledge.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

Re: Oolite Unable To Identify A Property List

Post by mandoman »

Thanks to all. I've been taking notes. I don't think the SunBat will ever really make it as an oxp, though. I made the two gun emplacements in the nose, and aft near the wings, without realizing that it wasn't supported by the game. I was still only modeling then, and have since learned not to do that, but it's going to be a headache to fix. Also, I must have really been turning the model about when I was making it, because the ship orientation got waaaaay out of whack. I got it back to the point where Blender can show me top, bottom, front, and back, but when I select "right", it shows me left, and right to left. The game itself shows every angle perfectly, but I can't find the right coordinates to make the exhaust line up. I've even gone to flying it with only one exhaust plume, trying to get at least one to line up. Haven't been able to so far, and I'm not sure how much more time I want to put into it. It was a good learning exercise. The only thing that bugs me is now that I've flown it, I really like it. No way can I put it out for others. I can't even get the exhaust to line up, and I'm positive that it was because I screwed up the orientation.

All the advice is very much appreciated. Thanks to Killer Wolf, Smivs, Eric Walch, Thargoid, and especially to Mauiby de Fug, as he really helped me a lot in making this ship. Thanks guys. :)
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Oolite Unable To Identify A Property List

Post by Smivs »

Sometimes you get so wrapped up in these things you end up going round in circles. Why not put it aside for a week or so, think on it if you get the urge and then come back to it later. Sometimes this approach works really well, because you've gone past the frustration and you can attack it with a clear mind.
This is true for Oolite life and real life. To give you a RL example I'm currently fighting with my car, which is very old. A week ago I spent over two days trying to remove a small component and just ended up wound up and disheartened. Today, after a break I went back to it and it's nearly off. OK, maybe a week of soaking in oil helped a bit, but so did approaching it fresh.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2269
Joined: Tue Jan 02, 2007 12:38 pm

Re: Oolite Unable To Identify A Property List

Post by Killer Wolf »

echo Smivs, sometimes the more frustrated i get at something the blinder i get.
alternatively, stick the DAT or OBJ somewhere downloadable and i'll fire it through my modellers and see if i can work anything.

don't be put off about the lasers - most of my Vampires are multi-gunned but the player variants aren't, as far as i know, it doesn't affect playability; at least no one's really complained about it. it's a given in the Oolite universe that players can't have more than one laser so just make up some backstory plot that the NPC versions are illegal custom jobs or something.
User avatar
Okti
---- E L I T E ----
---- E L I T E ----
Posts: 700
Joined: Sun Sep 26, 2010 1:51 pm
Location: A GH shop, near witchpoint to Oresrati in Galaxy 8

Re: Oolite Unable To Identify A Property List

Post by Okti »

Killer Wolf wrote:
it's a given in the Oolite universe that players can't have more than one laser ...
Sure? :twisted:
My OXP's
And Latest Mission Coyote's Run
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

Re: Oolite Unable To Identify A Property List

Post by mandoman »

Killer Wolf wrote:
echo Smivs, sometimes the more frustrated i get at something the blinder i get.
alternatively, stick the DAT or OBJ somewhere downloadable and i'll fire it through my modellers and see if i can work anything.

don't be put off about the lasers - most of my Vampires are multi-gunned but the player variants aren't, as far as i know, it doesn't affect playability; at least no one's really complained about it. it's a given in the Oolite universe that players can't have more than one laser so just make up some backstory plot that the NPC versions are illegal custom jobs or something.
Yeah, I've been thinking about it, and I do believe I can fix the laser problem. Sometimes I forget how incredibly versatile Blender can be. It hit me today as I was working on another ship. I'll speak up if it works, and I might just take you up on that exhaust help. It's got me stumped, so far. :)
Okti wrote:
Killer Wolf wrote:
it's a given in the Oolite universe that players can't have more than one laser ...
Sure? :twisted:
It's suppose to be possible, IF you can define the extra laser under sub-entities. I wasn't able to pull it off.
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2269
Joined: Tue Jan 02, 2007 12:38 pm

Re: Oolite Unable To Identify A Property List

Post by Killer Wolf »

Okti wrote:
Killer Wolf wrote:
it's a given in the Oolite universe that players can't have more than one laser ...
Sure? :twisted:
prove otherwise.
Post Reply