Most of my OXPs display in XML? Is it a Windows thing ?

News and discussion of the PC port of Oolite.

Moderators: winston, another_commander

Post Reply
Duggan
---- E L I T E ----
---- E L I T E ----
Posts: 496
Joined: Sat Dec 31, 2011 2:58 pm

Most of my OXPs display in XML? Is it a Windows thing ?

Post by Duggan »

Further to a recent remark
Hmmm, Duggan seems to have a shipdata.plist in XML and Leafy has one in openstep!
I note that the majority of my OXPs plists display as XML, I'm wondering if this a specific Windows thing .Can I convert XML to openstep at all (preferably via an app)?

I ask because I do like to tweak a little here and there. I also note that Mac OS X's primary programming environment is essentially OpenStep . Alternatively how do I adjust values in XML to increase speed or slow it down etc.?

Mayhap newer OXPs are in openstep anyway,,,

Thanks in advance for any wisdom imparted. :)
Flying Python Class Cruiser, Chapter & Verse IV
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: Most of my OXPs display in XML? Is it a Windows thing ?

Post by Commander McLane »

XML or OpenStep is just a different notation. They do the exact same thing.

Example in OpenStep:

Code: Select all

        "max_flight_speed" = 240;
Same thing in XML:

Code: Select all

		<key>max_flight_speed</key>
		<string>240</string>
The only difference is that in XML you always have <key></key> tags around the key and <string></string> tags (or <integer></integer> tags, or <real></real> tags) around the value. Note that you don't actually strictly need the integer and real tags. Every number can also be expressed as a string. Oolite converts it to the correct format automatically.

Changing a value always works in the same way: simply change the value (in the above example '240') to something else. If it's a speed, you obviously have to choose a smaller number in order to fly slower, and a bigger number in order to fly faster.
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: Most of my OXPs display in XML? Is it a Windows thing ?

Post by Eric Walch »

Duggan wrote:
I also note that Mac OS X's primary programming environment is essentially OpenStep .
No, on the mac it is mostly XML. open step misses the option to define the type of the entries. But because most users like to use texteditors for editing plists, we converted them all to open step. For a convertor you can use the one at the bottom of this link. Actually, the whole conversion is part of a python library function. The script takes only care of the last few steps.
Duggan
---- E L I T E ----
---- E L I T E ----
Posts: 496
Joined: Sat Dec 31, 2011 2:58 pm

Re: Most of my OXPs display in XML? Is it a Windows thing ?

Post by Duggan »

Thanks for the help guys... :)
Flying Python Class Cruiser, Chapter & Verse IV
Post Reply