One of the goals of the project is to create a game world that is easy to adapt and extend. At the moment of writing, the game reads the world description from ini/world.ini and a list of buyable ships from ini/ships.ini. These ini-files are plain text files that can be edited with any text editor.
The world description files are server-side. This means that editing your local copies will not affect the world when you connect to a remote server. Someone connecting to your server will also receive your modified world.
I recommend you do not edit the original game data, copy the files you want to edit toyour personal osirion directory. The files found in this directory will get precedence over the original game data. Your modified files will be used and the original files can still be updated when a new version is available.
On Linx and other Unix-systems your personal osirion is a hidden directory called .osirion in your home directory. On windows, your personal osirion directory is My Documents\My Games\Osirion.
World description files use the windows ini-file syntax. These files contain one or more sections. Every section starts with a section name enclosed in square brackets and contains a list of value=key pairs to describe the properties for the current section. Lines starting with a semicolon are considered comments and are ignored.
For example, a section planet describing a planet called Seymour:
[planet] label=seymour name=planet Seymour location=-128 1024 -32 color=1 .9 .5 texture=planets/seymour radius=68
The engine supports textures in the TGA, PNG and JPG file formats, where required. The filename extension should be lowercase and in 24bit RGB or 32bit RGBA format.
The file world.ini contains a list of zone labels. A zone is a seperate compartment in the gameworld, like a solar system or a remote sector in space. It contains a single world section containting multiple zone keys.
zone = | [string] | the in-game label of a zone |
Note: a label can only contain letters, numbers and underscores. Any other character is deleted. This applies to any label in any .ini-file.
; a world.ini with two zones [world] zone=ghant zone=brogha
Each zone has its own zone description file. The actual name of the file depends on the zone label. If your world.ini contains the line zone=ghant, the content of the zone with the label ghant would be described in the file zones/ghant.ini.
The .ini-file containts a list of objects populating that zone, and the basic properties of those objects. In the context of the engine, such an object is called an entity.
Every zone description file has a zone section describing a few of its basic properties:
name = | [string] | the in-game name of the entity |
sky = | [string] | name of the sky texture in textures/env directory |
default = | [bool] | mark this zone as the default zone for the game, only one zone can have this key set to yes, can be omitted elsewhere |
; ghant.ini ; zone description file for the Ghant system [zone] name=Ghant system sky=sky12 default=yes
You can add several entity sections to define the objects occupying your zones. Entities come in two flavours: basic geometrical shapes and entities with models. Both have a similar definition and set of properties. A simple entity is considered decoration by the engine and won't change direction or location.
Every in-game entity should have a label key. If the entity in question is going to be used as a base, or any object the could be referenced in possible scripting, it should have a unique label. The label should be lowercase and not contain spaces. A player-friendly name can be provided through the name key.
label = | [string] | the in-game label of the entity |
name = | [string] | the in-game name of the entity |
Set the shape key to define a basic geometrical shape:
shape = | axis | a 3d-axis with X, Y and Z lines. |
cube | a cube | |
diamond | a rotating octahedron with an axis | |
sphere | a polyhedron approximation of a sphere |
The size of the entity can be set with the radius key:
radius = | [float] | the radius of the entity in game units |
1 game unit translates to 100m in-game, an entity with a radius of 0.5 would fit into a sphere with a diameter of 100m.
An entity with a model can be created by setting the model key. The radius is automaticly calculated. A model can be a .map file or a .ase model.
model = | [string] | filename of the model, without extension |
The color key sets the primary color of the entity. This color will be used to draw the entity in case of a geometrical shape, or to draw model faces that have the common/entity texture. The default entity colour is white. The colorsecond key can be used to set the secondary color of entities with a model.
color = | [float] [float] [float] | primary entity color RGB values with in the 0.0 - 1.0 or 0 - 255 range |
colorsecond = | [float] [float] [float] | secondary entity color |
The location sets the in-game position:
location = | [float] [float] [float] | x, y, z values of the entity location, z is up |
1 game unit on the x, y, or z-axis translates to 100m in-game.
Orientation can be set thought the direction, pitch, and roll keys:
direction = | [float] | direction angle the entity is pointing to. 0 degrees is north, 90 degrees is west, default is 0 | |
pitch = | [float] | pitch angle, default is 0 | |
roll = | [float] | roll angle, default is 0 |
An example of an entity with a basic shape:
[entity] label=origin name=Galactic origin shape=axis radius=1 location=0 0 0 ; yellow color=1 1 0
An example of an entity with a model:
[entity] label=ikarus name=Ikarus satellite model=maps/satellites/ikarus ; blue color=100 100 230 location=64 0 0 direction=120 pitch=15
A station section defines an entity that can be visited by a player. This section can contain the same keys as the entity section, but the entity will be marked as dockable and the player will be able to target it for docking.
The engine will load the stations menu descriptions from the file zones/zonelabel/entitylabel.ini. For example, if your zone has the label ghant and your entity has the label alexandria then the engine will try to read zones/ghant/alexandria.ini. Read the section on entity menus for more information.
[station] label=alexandria name=Alexandria outpost model=maps/stations/alexandria location=-192 -704 32 ; brown color=222 192 145 direction=45
Space is huge and barren wasteland. Navigation points are an easy way to provide players with landmarks. The default navigation point is a diamond-shaped entity.
[navpoint] label=navpoint_east name=Navigation point East location=716 -1008 20
Jumppoints are the key to interstellar travel. A ship equiped with a hyperspace jump drive can use it to travel to other starsystems. A jumppoint looks like a navigation point, but needs the target key to indicate where it is leading to.
target = | [string]:[string] | zone:entity the label of a the target zone and the target jumppoint. |
Jumpgates are build on top of jumppoints and can be docked by smaller ships to travel to other starsystems. Just like the jumppoint section, the jumpgate section needs a target to indicate where it is leading to.
Jumppoints and jumpgates can target each other and ships equiped with a hyperspace jumpdrive can still use the jumpgate to jump as usual.
[jumpgate] label=jumpgate_brogha name=Jumpgate Ghant -> Brogha model=maps/satellites/jumpgate target=brogha:jumpgate_ghant location=716 -1024 24 direction=90 color=222 192 145
A planet is spherical entity with a texture. and a default radius of 64. The planet globe will be rendered with lighting enabled. A planet can be marked as dockable. In this case it can be visited by a player and menu descriptions will be loaded.
texture = | [string] | name of the planet texture in textures directory |
rotationspeed = | [float] | rotation speed in degrees per second |
dock = | [bool] | set to true to create a planet the players can visit |
; The iceworld, a very dark and cold place [planet] label=iceworld name=The World of Ice texture=planets/iceworld rotationspeed=1 ; a grey-blue colour color =0.5 0.5 0.8
A star is a spherical entity with a default radius of 96. The star globe will be rendered fullbright and serve as the main source of light for the current system. At the moment only one system light source is supported. If you define multiple stars, the last one will serve as light source. Stars can have a texture.
; a yellow star [star] label=whitedwarf name=White Dwarf color=1.0 1.0 0.9 radius=96
Consult the wikipedia article on stellar classification and this image.
Some planets and stations have ship dealers where players can buy a new ship. [station] and [planet] sections can be followed by one or more [ship] sections to add ship models to the ship dealers inventory.
; station definition [station] label=alexendria . . more station definitions . ; the Micron Vector is sold here [ship] label=vector ; the P.O.D. is sold here [ship] label=pod
Indenting the [ship] sections like in the example above is not required, but it improves readability. The label key is mandatory and referes to a ship type as defined in ships.ini.
Cargo trade is defined similar to ship dealers. [station] and [planet] sections can be followed by one or more [cargo] section to add specific items to the trader's inventory. The label key is mandatory and referes to a cargo type as defined in cargo.ini. The price and amount keys> can be used to set the most important trading parameters.
price = | [float] | price this type of cargo is bought and sold at |
amount = | [float] | initial amount of available cargo. The default is -1 and means unlimited. 0 means this type of cargo can only be sold here. |
; station definition [station] label=alexendria . . more station definitions . ; this station buys and sells crates at 25 credits per unit [cargo] label=crates price=25 ; this station buys niobium at 200 credits per unit [cargo] label=niobium price=200 amount=0
The list of a available ship types is read from the file ships.ini.
The list of available cargo types is read from the file cargo.ini.