Newbie: Addons dir structure question

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
bulrush
Competent
Competent
Posts: 55
Joined: Mon Apr 14, 2008 1:44 pm

Newbie: Addons dir structure question

Post 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.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2876
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post 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.) :wink:

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.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
bulrush
Competent
Competent
Posts: 55
Joined: Mon Apr 14, 2008 1:44 pm

Post by bulrush »

Ok, so under the Addons\ dir it would look like this:
Myoxpname\
**AIs
**Config
**Images
**Models
**Music
**Sounds
**Textures

Is this right?
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2876
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Yep.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
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 »

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.)
bulrush
Competent
Competent
Posts: 55
Joined: Mon Apr 14, 2008 1:44 pm

Post by bulrush »

Are there any plist editors for Windows? Like for "customsounds.plist"? I know these are just XML files.
User avatar
Star Gazer
---- E L I T E ----
---- E L I T E ----
Posts: 633
Joined: Sat Aug 14, 2004 4:55 pm
Location: North Norfolk, UK, (Average Agricultural, Feudal States,Tech Level 8)

Post 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.
Very funny, Scotty, now beam down my clothes...
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2876
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post 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.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
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 »

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.
Post Reply