The Osirion Project - Editing the world

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, but to make a copy into your 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 Linux your personal osirion directory is ~/.osirion. On windows, your personal osirion directory is the home subdirectory of the main distribution.

File structure

A world description files uses 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 an iceworld:

; The iceworld, a very dark and cold place
[planet]
label=iceworld
name=The World of Ice
radius=32
texture=planets/iceworld

world.ini

The world.ini file describes the objects in the game world and their basic properties. In the context of the engine, an object is called an entity.

[entity]

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 regular 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

An entity with a model can be created by setting the model key. The radius of a model is automaticly calculated:

model = [string] filename of the model in the maps/ directory, without extension.

The color key sets the colour of the entity.This colour 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.

color = [float] [float] [float] entity colour with RGB values in the 0.0 - 1.0 or 0 - 255 range

The location sets the in-game position:

location = [float] [float] [float] x, y, z values of the entity location, z is up

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:

; The Galactic origin
[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:

; Alexandria outpost
[entity]
label=alexandria
name=Alexandria outpost
model=stations/alexandria
location=-116 -68 16
direction=315
; light brown
color=222 192 145

[planet]

A planet is spherical entity with a texture. and a default radius of 32. The planet globe will be rendered with lighting enabled.

; The iceworld, a very dark and cold place
[planet]
label=iceworld
name=The World of Ice
texture=planets/iceworld
; a grey-blue colour
color =0.5 0.5 0.8

[star]

A star is a spherical entity without texture and a default radius of 48. 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.

[star]
label=whitedwarf
name=White Dwarf
; a slightly yellow colour
color=1.0 1.0 0.9

ships.ini

Definition of the shopping list.