Difference between revisions of "OXP howto"

From Elite Wiki
(Textures)
m
Line 1: Line 1:
 
[[Image:oolite-oxp-icon.png|100px|right|OXP icon]]
 
[[Image:oolite-oxp-icon.png|100px|right|OXP icon]]
An '''Oolite Expansion Pack''' can cause many big changes or additions to Oolite's gameplay, or it may represent just a small, subtle alteration. By appearances, there is no way to tell what is inside, as it's merely a folder with the added extention '''.oxp'''. Inside, it will at least contain a folder named ''Config'', and possibly other folders such as ''AIs'', ''Models'', ''Textures'', ''Sounds'', etc. It is down to the goal of the OXP, which ways to combine elements to the OXP's contents.
+
=== Overview ===
 +
An '''Oolite Expansion Pack''' can cause many big changes or additions to Oolite's gameplay, or it may represent just a small, subtle alteration. By appearances, there is no way to tell what is inside, as it's merely a folder with the added extention '''.oxp'''.
 +
 
 +
Inside, it will at least contain a folder (Config, AIs, Models, Textures, etc...) that holds scripts, plists or other things like textures or models. It is down to the goal of the [[OXP]], which ways to combine elements to the OXP's contents. To get a feeling for it, simply take a look in other oxps.
  
 
=== AIs ===
 
=== AIs ===
Line 10: Line 13:
 
=== Config===
 
=== Config===
  
 +
All plist files except for those introducing new AI, belong in Config.
 +
 +
In its simplest form, an OXP could contain only a Config with an altering ''script.plist'' or ''planetinfo.plist''.  An OXP that adds a new ship needs a ''shipdata.plist'' entry, and unless it is based entirely on existing Oolite data, would include a model and texture.
 +
 +
* [[OXP howto plist|Making Oolite plists]]
 +
<br>
 
This folder contains [[Property lists]] such as:
 
This folder contains [[Property lists]] such as:
  
* ''[[shipdata.plist]]'' that introduces any new entity (ships, stations, objects etc.) to Oolite.
+
* ''[[characters.plist]]'' that adds non-player characters to Oolite.
* ''[[shipdata-overrides.plist]]'' that selectively can replace shipentries in other shipdata.plists
 
* ''[[shipyard.plist]]'' that introduces new ships available for player purchase.
 
* ''[[shipyard-overrides.plist]]'' that selectively can replace shipentries in other shipyard.plists
 
* ''[[script.plist]]'' to handle conditional ''script actions''. Note that [[script.js]] will be loaded in preference to script.plist if both exist. ([[script.oos]] was briefly introduced during 1.70 development but is now depracated in favour of JS.)
 
* ''[[planetinfo.plist]]'' that plots system specific changes from the default. May also contain ''script actions''.
 
 
* ''[[commodities.plist]]'' that contains information for each commodity in a market.
 
* ''[[commodities.plist]]'' that contains information for each commodity in a market.
 +
* ''[[crosshairs.plist]]'' that contains the look for your weapons (v1.73).
 +
* ''[[customsounds.plist]]'' that contains references to ingame used sounds.
 
* ''[[misc plists|demoships.plist]]'' that selects demoships to show on startup.
 
* ''[[misc plists|demoships.plist]]'' that selects demoships to show on startup.
 
* ''[[misc plists|descriptions.plist]]'' that adds vocabulary to Oolite texts.
 
* ''[[misc plists|descriptions.plist]]'' that adds vocabulary to Oolite texts.
* ''[[hud.plist]]'' that allows for changes or a radically new ''Head-Up Display''.
 
* ''[[characters.plist]]'' that adds non-player characters to Oolite.
 
 
* ''[[equipment.plist]]'' lists upgrades available from the Shipyard.
 
* ''[[equipment.plist]]'' lists upgrades available from the Shipyard.
 +
* ''[[hud.plist]]'' and ''[[hud-small.plist]]'' that allows for changes or a radically new ''Head-Up Display''.
 +
* ''[[illegal_goods.plist]]'' that contains a list of banned/forbidden items. GalCop has an eye on that.
 +
* ''[[missiontext.plist]]'' contains texts for the mission screens.
 
* ''[[misc plists|pirate-victim-roles.plist]]'' that defines which roles should act as traders.
 
* ''[[misc plists|pirate-victim-roles.plist]]'' that defines which roles should act as traders.
* ''[[missiontext.plist]]'', ''[[speech_pronunciation_guide.plist]]'' are some of the other custom methods.
+
* ''[[planetinfo.plist]]'' that plots system specific changes from the default. May also contain ''script actions''.
 
+
* ''[[screenbackgrounds.plist]]'' that contains references to background images (v1.74).
All plist files except for those introducing new AI, belong in Config.
+
* ''[[script.plist]]'' to handle conditional ''script actions''. [[script.js]] will be loaded in preference to script.plist if both exist.
 
+
* ''[[shipdata.plist]]'' that introduces any new entity (ships, stations, objects etc.) to Oolite.
In its simplest form, an OXP could contain only a Config with an altering ''script.plist'' or ''planetinfo.plist''. An OXP that adds a new ship needs a ''shipdata.plist'' entry, and unless it is based entirely on existing Oolite data, would include a model and texture.  
+
* ''[[shipdata-overrides.plist]]'' that selectively can replace shipentries in other shipdata.plists
 +
* ''[[shipyard.plist]]'' that introduces new ships available for player purchase.
 +
* ''[[shipyard-overrides.plist]]'' that selectively can replace shipentries in other shipyard.plists
 +
* ''[[speech_pronunciation_guide.plist]]'' is another of the other custom methods.
 +
* ''[[world-scripts.plist]]'' that contains a list of JS-scripts (if more than one worldScript should be used).
  
* [[OXP howto plist|Making Oolite plists]]
+
Deprecated:
 +
* ''[[script.oos]]'' was briefly introduced during 1.70 development but is now depracated in favour of JS.)
  
 
=== Models===
 
=== Models===
  
Oolite models need to be in the '''.dat''' format. There are utilities available that convert models made in Wings 3D (.obj) and Meshwork (.mesh) into this. A .dat file can be opened in a plain text editor to view the object's assigned texture names and see that they correspond with the actual file names in the Textures folder. The .dat file must be named exactly as it is referenced in the shipdata ''model'' entry.
+
Oolite models need to be in the '''.dat''' format. There are utilities available that convert models made in Wings 3D (.obj) and Meshwork (.mesh) into this. A .dat file can be opened in a plain text editor to view the object's assigned texture names and see that they correspond with the actual file names in the Textures folder. The .dat file must be named exactly as it is referenced in the shipdata ''model'' entry - case sensitive!!!
  
 
* [[OXP howto model|Making Oolite models]]
 
* [[OXP howto model|Making Oolite models]]
Line 41: Line 53:
 
=== Textures===
 
=== Textures===
  
Oolite's textures are in the '''.png''' format, usually at a standard 1024x1024 size, and must be named exactly as they are named in the .dat file.  
+
Oolite's textures are in the '''.png''' format, usually at a standard 512x512 size, and must be named exactly as they are named in the .dat file.  
  
 
* [[OXP howto texture|Making Oolite textures]]
 
* [[OXP howto texture|Making Oolite textures]]
Line 53: Line 65:
  
 
Every oxp should contain a [[Property lists]] with the name ''requires.plist'' that is placed at the main level of the oxp folder. It contains just a dictionary with two entries: ''version'' and ''max_version''. ''version'' is the lowest Oolite version the code can run on. This ensures that older Oolite versions don't behave bad or crash because they load an oxp that does contain unknown stuff. The max_version is only needed when you want an oxp to not run with newer Oolite  versions. Very useful for adding in test versions of an oxp to ensure this test version is not used forever.
 
Every oxp should contain a [[Property lists]] with the name ''requires.plist'' that is placed at the main level of the oxp folder. It contains just a dictionary with two entries: ''version'' and ''max_version''. ''version'' is the lowest Oolite version the code can run on. This ensures that older Oolite versions don't behave bad or crash because they load an oxp that does contain unknown stuff. The max_version is only needed when you want an oxp to not run with newer Oolite  versions. Very useful for adding in test versions of an oxp to ensure this test version is not used forever.
 +
 +
The structure for OXPs:
 +
AddOns (folder)
 +
-.oxp (folder) - Holds requires.plist and the other folders
 +
--> AIs (folder) - Holds AI.plists
 +
--> Config (folder) - Holds all other plists
 +
--> Images (folder) - Holds background images
 +
--> Models (folder) - Holds the .dat files
 +
--> Music (folder) - Surprise - holds music files
 +
--> Scripts (folder) - Holds JS-scripts (worldScripts and shipScripts)
 +
--> Shaders (folder) - Holds Vertex and Fragment shaders
 +
--> Sounds (folder) - Holds sound files
 +
--> Textures (folder) - Holds models textures
  
 
=== A preview of things to come ===
 
=== A preview of things to come ===

Revision as of 19:36, 5 May 2010

OXP icon

Overview

An Oolite Expansion Pack can cause many big changes or additions to Oolite's gameplay, or it may represent just a small, subtle alteration. By appearances, there is no way to tell what is inside, as it's merely a folder with the added extention .oxp.

Inside, it will at least contain a folder (Config, AIs, Models, Textures, etc...) that holds scripts, plists or other things like textures or models. It is down to the goal of the OXP, which ways to combine elements to the OXP's contents. To get a feeling for it, simply take a look in other oxps.

AIs

The folder named AIs contains any AI.plist additions the OXP might use.

Config

All plist files except for those introducing new AI, belong in Config.

In its simplest form, an OXP could contain only a Config with an altering script.plist or planetinfo.plist. An OXP that adds a new ship needs a shipdata.plist entry, and unless it is based entirely on existing Oolite data, would include a model and texture.


This folder contains Property lists such as:

Deprecated:

  • script.oos was briefly introduced during 1.70 development but is now depracated in favour of JS.)

Models

Oolite models need to be in the .dat format. There are utilities available that convert models made in Wings 3D (.obj) and Meshwork (.mesh) into this. A .dat file can be opened in a plain text editor to view the object's assigned texture names and see that they correspond with the actual file names in the Textures folder. The .dat file must be named exactly as it is referenced in the shipdata model entry - case sensitive!!!

Textures

Oolite's textures are in the .png format, usually at a standard 512x512 size, and must be named exactly as they are named in the .dat file.

Viewing a specific texture and / or model in Oolite. "I made one. How do I proof it?"

Requires

Every oxp should contain a Property lists with the name requires.plist that is placed at the main level of the oxp folder. It contains just a dictionary with two entries: version and max_version. version is the lowest Oolite version the code can run on. This ensures that older Oolite versions don't behave bad or crash because they load an oxp that does contain unknown stuff. The max_version is only needed when you want an oxp to not run with newer Oolite versions. Very useful for adding in test versions of an oxp to ensure this test version is not used forever.

The structure for OXPs:

AddOns (folder)
-.oxp (folder) - Holds requires.plist and the other folders
--> AIs (folder) - Holds AI.plists
--> Config (folder) - Holds all other plists
--> Images (folder) - Holds background images
--> Models (folder) - Holds the .dat files
--> Music (folder) - Surprise - holds music files
--> Scripts (folder) - Holds JS-scripts (worldScripts and shipScripts)
--> Shaders (folder) - Holds Vertex and Fragment shaders
--> Sounds (folder) - Holds sound files
--> Textures (folder) - Holds models textures

A preview of things to come

The scripting environment is being reworked to use JavaScript as the core scripting language. See Scripting Oolite with JavaScript for more information.

External links