Page 1 of 1
Newbie: Addons dir structure question
Posted: Mon Apr 21, 2008 5:52 pm
by bulrush
So when I make an OXP I would recreate the directory structure of Contents\ but do it under the Addons\ dir?
So under Addons\ I would have:
Contents\
*Resources\
**AIs
**Config
**Images
**Models
**Music
**Sounds
**Textures
Now if I change shipdata.plist I would place it under Addons\Contents\Resources\Config, right? And that would override the default shipdata.plist.
How do I know if my OXP was loaded from the Addons dir? Is there a way to print a message to the screen when Oolite starts up? Or is a log file the only way to know this?
I just want to start with something simple, like change the max speed of my cobra MK 3.
Thanks.
Posted: Mon Apr 21, 2008 6:01 pm
by LittleBear
For an OXP it needs to be in a folder called nameofoxp.oxp (the .oxp must be lower case). Inside this you put folders called Config, Models etc.
So to mod the Cobra Mk III, copy the shipdata and shipyard .plists to the Config folder of your OXP folder in AddOns. Then fiddle with the entries for the CobraIII. The shipyard.plist controls the player version of the ship in terms of price etc. The shipdata.plist controls its stats. You need to change the entry that ends -player though (otherwise only NPC versions would be affected.)
When you load up Oolite hold down the SHIFT key to refresh the cache (otherwise the changes you made are not updated). The stddr file logs the OXPs that have been loaded and reports errors (if any) in them.
Posted: Mon Apr 21, 2008 6:33 pm
by bulrush
Ok, so under the Addons\ dir it would look like this:
Myoxpname\
**AIs
**Config
**Images
**Models
**Music
**Sounds
**Textures
Is this right?
Posted: Mon Apr 21, 2008 7:12 pm
by LittleBear
Yep.
Posted: Tue Apr 22, 2008 7:53 am
by Commander McLane
My advice: Just open any of the OXPs you have (if you don't have any,
download some), and look what's inside.
To open an OXP you right-click on it and choose "Open Package" or something reasonably similar from the pop-up menu. Then it opens just like an ordinary folder (it
is just an ordinary folder, except it is treated as a package, because of its ".oxp" extension).
This is
so much easier than complicated explanations here on the board.
And for your second step you can open the plists in the AIs and Config folder of your sample OXP and study them. (If you're on a Mac, I'd recommend a plist-editor for that, but it's not necessary. A simple text editor will do.)
Posted: Tue Apr 22, 2008 2:21 pm
by bulrush
Are there any plist editors for Windows? Like for "customsounds.plist"? I know these are just XML files.
Posted: Tue Apr 22, 2008 3:48 pm
by Star Gazer
There's loads of suitable stuff available, many for free. You could try MetaPad, NotePad++, or jEdit. They are all text editors with the ability to output all the necessary characters for plists.
In the days when I was forced to use Windows PCs, I often used MetaPad for all sorts of purposes, including writing HTML documents and small batch files.
Posted: Tue Apr 22, 2008 4:44 pm
by LittleBear
Bog Standard Notepad does the trick. The only thing is as .plist is a Mac format its best to copy in an existing .plist. Then delete all the text after opening with Notepad and save. You then have a blank file in .plist format.
Posted: Wed Apr 23, 2008 5:36 am
by Commander McLane
Ah, that would explain why some plists, when I open them on my Mac, are full of ☐-characters. So they must have been created with a PC-editor.
They still work, anyhow.