Page 1 of 1
Editing Plist files
Posted: Fri Sep 10, 2010 12:35 am
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.
Posted: Fri Sep 10, 2010 12:37 am
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.
Posted: Fri Sep 10, 2010 12:42 am
by lave
Thanks that worked.
Posted: Fri Sep 10, 2010 11:35 am
by Commander McLane
Why would you, however, change the necessary techlevel and price of fuel tanks? Feel a little cheaty?
Posted: Fri Sep 10, 2010 11:45 am
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.
Posted: Fri Sep 10, 2010 11:53 am
by Commander McLane
No need to justify yourself.
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.
Posted: Fri Sep 10, 2010 1:57 pm
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.
Posted: Fri Sep 10, 2010 2:00 pm
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.
Posted: Fri Sep 10, 2010 2:11 pm
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.
Posted: Fri Sep 10, 2010 2:12 pm
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
Posted: Tue Sep 14, 2010 8:13 pm
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.
Posted: Tue Sep 14, 2010 9:57 pm
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.