The Bare Minimum
Moderators: winston, another_commander
-
- Above Average
- Posts: 19
- Joined: Fri Jul 22, 2016 3:55 am
The Bare Minimum
Can somebody tell me what the bare minimum is for a game-recognizable ship OXP? Please use Openstep.
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: The Bare Minimum
Code: Select all
like_ship = <insert template here>;
Not as facetious as it might sound. If you are looking to define all of the ship's attributes, you will need something like one of the core-game ship templates, plus extra stuff if it is a one-off with any sort of extra features.
If you are coding shipdata from scratch, you might be better off borrowing an existing shipdata.plist and just substituting your figures/data over.
If you are talking about a whole OXP then it will depend on what it does and what's included. Take a look at the wiki and here.
Commander Smivs, the friendliest Gourd this side of Riedquat.
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
Re: The Bare Minimum
My OXP'ing is really rusty, but I think for an OXP using a custom ship mesh and texture, you need:
1. In Oolite's AddOns folder, a new folder for your oxp with a filename ending in .oxp
2. Inside that, you need 3 Sub-Folders called Config, Models and Textures - These names are Case Sensitive
3. It's inside each of these subfolders that your put your ships 'stuff',
. The shipdata.plist that describes your ship to Oolite goes in the Config subfolder
. Your ship's mesh (in Oolite's dat format) goes in the Models subfolder
. Your ships texture(s) or 'skin', these go into the Textures folder - These need to be in PNG format
4. shipdata.plist - this is just a text file, if you're on a windows system it's best not to edit this using the default 'Notepad' app as it can add hidden formatting characters to the file which stop Oolite from reading it properly. A fantastic free text editor is Notepad ++ it's great as it can track and highlight 'bracket pairs' for you (forgetting to put in a closing bracket or quote is a popular syntax error I often do which stop my ships working)
For the actual contents of the shipdata.plist, I think at the very least you need to get a custom model and texture ship into the game is
I think that's all you need to get the ship in game, to make it fun to play against you need to include more shipdata keys (for roll, pitch, energy etc), or do as Smivs suggests and like_ship it to one of Oolite's built in ships, your oxp ship will then inherit all of the stats from that ship apart for any ones you've specified in your shipdata.plist
Oolite caches OXP data for faster loading, so if you go back and edit any stats in your shipdata.plist etc, you'll need to flush out Oolite's cache and get it to re-read in your OXP, the way to do this is to hold down your keyboards Shift key soon after launching Oolite and keep it held down until the spinning cobra title screen appears
1. In Oolite's AddOns folder, a new folder for your oxp with a filename ending in .oxp
2. Inside that, you need 3 Sub-Folders called Config, Models and Textures - These names are Case Sensitive
3. It's inside each of these subfolders that your put your ships 'stuff',
. The shipdata.plist that describes your ship to Oolite goes in the Config subfolder
. Your ship's mesh (in Oolite's dat format) goes in the Models subfolder
. Your ships texture(s) or 'skin', these go into the Textures folder - These need to be in PNG format
4. shipdata.plist - this is just a text file, if you're on a windows system it's best not to edit this using the default 'Notepad' app as it can add hidden formatting characters to the file which stop Oolite from reading it properly. A fantastic free text editor is Notepad ++ it's great as it can track and highlight 'bracket pairs' for you (forgetting to put in a closing bracket or quote is a popular syntax error I often do which stop my ships working)
For the actual contents of the shipdata.plist, I think at the very least you need to get a custom model and texture ship into the game is
Code: Select all
{ // <- Very important opening bracket, all openstep plists need to start with one of these
// ++++++ Eample Ship ++++++
// You can use two slashes followed by text to put comments in your file
"ExampleShip" = // Can be anything, but must be unique to avoid clashes when Oolite needs to load up ships for gameplay
{
auto_ai = yes; // Set to yes so Oolite picks an appropriate AI for your ship based on its 'Role' - see below
model = "ExampleShip.dat"; // The filename for your ship mesh from the Models folder in your OXP (Case Sensitive)
name = "Super Example Ship"; // How you want your ships name to appear, eg on the players HUD when they target it, or it sends out comms messages etc
roles = "trader"; // One of Oolite's standard roles, see the default shiplist at Resources\Config\Shipdata.plist for more examples
};
} // <- Very important closing bracket, all plists need to end with one of these, although you can put comments on line after
Oolite caches OXP data for faster loading, so if you go back and edit any stats in your shipdata.plist etc, you'll need to flush out Oolite's cache and get it to re-read in your OXP, the way to do this is to hold down your keyboards Shift key soon after launching Oolite and keep it held down until the spinning cobra title screen appears
Wiki homepage for my OXP: http://wiki.alioth.net/index.php/Griff_Industries