Editing Plist files

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
lave
Deadly
Deadly
Posts: 141
Joined: Thu Sep 09, 2010 12:21 am
Location: Deep in Leesti space mining asteroids for a living.
Contact:

Editing Plist files

Post by lave »

Hi.

I have tried to edit the equipment.plist file of the Extra Fuel Tank.oxp
I tried this to just see what happens.

When I edited the description...
<string>Extra fuel tank installed in a missile bay, containing 3ly of additional witchdrive fuel. NOTE: Fuel transfer may only be carried out once per tank - any excess fuel not transferred to the main tanks will be jettisoned.</string>

...it works fine and the changes show up in the game.

However, when I changed...

<integer>5</integer>
<integer>700</integer>
<string>Extra Fuel Tank</string>


...which is the tech level (5), the price (700=70Cr) and the item name, the changes did not show up on the game.

Any ideas?

Thanks.
User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 2028
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Post by maik »

You might need to restart Oolite and keep the shift key pressed until you see the spinning Cobra. This forces Oolite to reload OXPs, otherwise it might use cached copies.
User avatar
lave
Deadly
Deadly
Posts: 141
Joined: Thu Sep 09, 2010 12:21 am
Location: Deep in Leesti space mining asteroids for a living.
Contact:

Post by lave »

Thanks that worked.
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:

Post by Commander McLane »

Why would you, however, change the necessary techlevel and price of fuel tanks? Feel a little cheaty? 8)
User avatar
lave
Deadly
Deadly
Posts: 141
Joined: Thu Sep 09, 2010 12:21 am
Location: Deep in Leesti space mining asteroids for a living.
Contact:

Post by lave »

I only edited that one because it was the first one I clicked on.

I haven't actually changed it, I just wanted to see 'how' to edit it and make changed reflect in the game.

I haven't played this game for ages so I had forgot about holding shift down.
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:

Post by Commander McLane »

No need to justify yourself. :wink:

By the way, which OS are you on? If it's Mac OS, I can recommend PListEdit Pro for opening and editing plists. It works both as a text editor and an editor for the plist structure. It also can convert from XML to OpenStep and back with a single click. And it tells you if your creation is a valid plist in the first place.

Oh, and one general word of advice: You have done your experiment with an OXP-plist, which is good, because in case you accidentally broke something, you could simply re-download the OXP. If you feel the urge to play with Oolite's internal plists (which you may at some point want to do), you better c&p the whole plist into your AddOns-folder (you can create a Config-folder directly inside your AddOns-folder if it doesn't already exist, and paste it into the Config-folder), and then only edit this copy, leaving the original untouched. This way you make sure that you don't break anything in Oolite. If your edited plist becomes messed-up, you can simply throw it into the recycle bin and c&p the original again.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Commander McLane wrote:
By the way, which OS are you on? If it's Mac OS, I can recommend PListEdit Pro for opening and editing plists. It works both as a text editor and an editor for the plist structure.
There is also a fully free plist editor on a mac installation disk. You only have to install the developer package on your harddisk. This does not happen by a default system installation. It will be among the installed tools. Specially the plistEditor released with Leopard and newer are friendly because they no longer sort the keys alphabetically.
User avatar
lave
Deadly
Deadly
Posts: 141
Joined: Thu Sep 09, 2010 12:21 am
Location: Deep in Leesti space mining asteroids for a living.
Contact:

Post by lave »

I am using Windows Vista.

I am not making major changes but yes I will keep a copy of the files I do look at.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Post by Smivs »

I'm sure you've spotted the warnings elsewhere, but just in case you haven't, DON'T use Notepad for editing...it really screws-up Oolite files. Notepad ++ is OK, as are gedit and most other text editors.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
snork
---- E L I T E ----
---- E L I T E ----
Posts: 551
Joined: Sat Jan 30, 2010 4:21 am
Location: northern Germany

Post by snork »

For windows, PSPad is a nice, mighty-yet-still-easy-to-use-(basic-stuff), free-for-personal-use editor for all kinds of stuff (code, html, hex), including plain text files.

http://en.wikipedia.org/wiki/PSPad
User avatar
Pluisje
Dangerous
Dangerous
Posts: 93
Joined: Mon Jan 11, 2010 3:14 pm

Post by Pluisje »

Eric Walch wrote:
.. There is also a fully free plist editor on a mac installation disk. You only have to install the developer package on your harddisk. This does not happen by a default system installation. It will be among the installed tools. ...
(not for OP, but) This will also install Dashcode, with which you can edit plain text, but it displays colours in the code for better readability.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Pluisje wrote:
(not for OP, but) This will also install Dashcode, with which you can edit plain text, but it displays colours in the code for better readability.
Yes Dashcode also knows of the JS syntax, making JS scripts very readable by coloring the JS keywords.
Post Reply