Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
blob: 82908dd5f3c2944a8ea12e39076ab976aa7e272a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
	<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="style.css">
	<TITLE>The Osirion Project - Editing the world</TITLE>
</head>
<body>
<H1>
	The Osirion Project - Editing the world
</H1>
<p>
	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 <i>ini/world.ini</i> and a list of buyable ships 
	from <i>ini/ships.ini</i>. These ini-files are plain text files that can be
	edited with any text editor.
</p><p>
	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.
</p><p>
	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.
</p><p>
	On Linx and other Unix-systems your personal osirion is a hidden directory called
	<i>.osirion</i> in your home directory.	On windows, your personal osirion directory
	is <i>My Documents\My Games\Osirion</i>.
</p>
<h2>
	File structure
</h2>
<p>
	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 
	<i>value=key</i> pairs to describe the properties for the current section. 
	Lines starting with a semicolon are considered comments and are ignored.
</p><p>	
	For example, a section <i>planet</i> describing a planet called Seymour:
</p>

<pre>
[planet]
label=seymour
name=planet Seymour
location=-128 1024 -32
color=1 .9 .5
texture=planets/seymour
radius=68
</pre>

<h2>
	World
</h2>

<p>
	The file <i>world.ini</i> 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 <i>world</i> section containting multiple
	<i>zone</i> keys.
</p>
<h3>
    [world]
</h3>
<table>
	<tr>
		<td class="wide"><i>zone =</i></td>
		<td class="narrow"><strong>[string]</strong></td>
		<td>the in-game label of a zone</td>
	</tr>
</table>
<p>
	<i>Note:</i> a label can only contain letters, numbers and underscores. Any other character is deleted. This applies to any label in any .ini-file.
</p>
<pre>
; a world.ini with two zones
[world]
zone=ghant
zone=brogha
</pre>

<h2>
	Zones
</h2>
<p>
	Each zone has its own zone description file. The actual name of the file depends on the zone label. 
	If your <i>world.ini</i> contains the line <i>zone=ghant</i>, the content of the zone with 
	the label <i>ghant</i> would be described in the file <i>zones/ghant.ini</i>.
</p><p>
	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 <i>entity</i>.
</p>
<h3>
    [zone]
</h3>
<p>
	Every zone description file has a <i>zone</i> section describing a few of its basic properties:
</p>
<table>
	<tr>
		<td class="wide"><i>name =</i></td>
		<td class="narrow"><strong>[string]</strong></td>
		<td>the in-game name of the entity</td>
	</tr>
	<tr>
		<td class="wide"><i>sky =</i></td>
		<td class="narrow"><strong>[string]</strong></td>
		<td>name of the sky texture in <i>textures/env</i> directory</td>
	</tr>
	<tr>
		<td class="wide"><i>default =</i></td>
		<td class="narrow"><strong>[bool]</strong></td>
		<td>mark this zone as the default zone for the game, only one zone can have this key set to yes, can be omitted elsewhere</td>
	</tr>
</table>

<pre>
; ghant.ini
; zone description file for the Ghant system
[zone]
name=Ghant system
sky=sky12
default=yes
</pre>

<h3>
	[entity]
</h3>
<p>
	You can add several <i>entity</i> 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 <i>entity</i> is considered decoration by the engine and won't change direction or location.
</p><p>
	Every in-game entity should have a <i>label</i> 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 <i>name</i> key.
</p>
<table>
	<tr>
		<td class="wide"><i>label =</i></td>
		<td class="narrow"><strong>[string]</strong></td>
		<td>the in-game label of the entity</td>
	</tr>
	<tr>
		<td class="wide"><i>name =</i></td>
		<td class="narrow"><strong>[string]</strong></td>
		<td>the in-game name of the entity</td>
	</tr>
</table>

<p>
	Set the <i>shape</i> key to define a basic geometrical shape:
</p>
<table>
	<tr>
		<td class="wide"><i>shape =</i></td>
		<td class="narrow"><strong>axis</strong></td>
		<td>a 3d-axis with X, Y and Z lines.
	</tr>
	<tr>
		<td class="wide"></td>
		<td class="narrow"><strong>cube</strong></td>
		<td>a cube</td>
	</tr>
	<tr>
		<td class="wide"></td>
		<td class="narrow"><strong>diamond</strong></td>
		<td>a rotating octahedron with an axis</td>
	</tr>
	<tr>
		<td class="wide"></td>
		<td class="narrow"><strong>sphere</strong></td>
		<td>a polyhedron approximation of a sphere</td>
	</tr>
</table>
<p>
	The size of the entity can be set with the <i>radius</i> key:
</p>
<table>
	<tr>
		<td class="wide"><i>radius =</i></td>
		<td class="narrow"><strong>[float]</strong></td>
		<td>the radius of the entity in game units</td>
	</tr>
</table>
<p>
	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.
<p>

<p>
	An entity with a model can be created by setting the <i>model</i> key. The radius of a model is automaticly	calculated:
</p>
<table>
	<tr>
		<td class="wide"><i>model =</i></td>
		<td class="narrow"><strong>[string]</strong></td>
		<td>filename of the model in the <i>maps/</i> directory, without extension.</td>
	</tr>
</table>

<p>
	The <i>color</i> 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 <i>common/entity</i> texture. The default entity colour is white.
	The <i>colorsecond </i> key can be used to set the secondary color of entities with a model.
</p>
<table>
	<tr>
		<td class="wide"><i>color =</i></td>
		<td><strong>[float] [float] [float]</strong></td>
		<td>primary entity color RGB values with in the 0.0 - 1.0 or 0 - 255 range</td>
	</tr>
	<tr>
		<td class="wide"><i>colorsecond =</i></td>
		<td><strong>[float] [float] [float]</strong></td>
		<td>secondary entity color</td>
</table>
<p>
	The <i>location</i> sets the in-game position:
</p>

<table>
	<tr>
		<td class="wide"><i>location =</i></td>
		<td><strong>[float] [float] [float]</strong></td>
		<td>x, y, z values of the entity location, z is up</td>
	</tr>
</table>
<p>
	1 game unit on the x, y, or z-axis translates to 100m in-game.
</p><p>
	Orientation can be set thought the <i>direction</i>, <i>pitch</i>, and <i>roll</i> keys:
</p>
<table>
	<tr>
		<td class="wide"><i>direction =</i></td>
		<td class="narrow"><strong>[float]</strong></td>
		<td>direction angle the entity is pointing to. 0 degrees is north, 90 degrees is west, default is 0
	</tr>
	<tr>
		<td class="wide"><i>pitch =</i></td>
		<td class="narrow"><strong>[float]</strong></td>
		<td>pitch angle, default is 0<td>
	</tr>
	<tr>
		<td class="wide"><i>roll =</i></td>
		<td class="narrow"><strong>[float]</strong></td>
		<td>roll angle, default is 0<td>
	</tr>
</table>
<p>
	An example of an entity with a basic shape:
</p>

<pre>
[entity]
label=origin
name=Galactic origin
shape=axis
radius=1
location=0 0 0
; yellow
color=1 1 0
</pre>

<p>
	An example of an entity with a model:
</p>
<pre>
[entity]
label=ikarus
name=Ikarus satellite
model=satellites/ikarus
; blue
color=100 100 230
location=64 0 0
direction=120
pitch=15
</pre>

<h3>
	[station]
</h3>
<p>
    A <i>station</i> section defines an entity that can be visited by a player. This section
	can contain the same keys as the <i>entity</i> section, but the entity will be marked as 
	dockable and the player will be able to target it for docking.
</p>
<p>
    The engine will load the stations menu descriptions from the file <i>zones/zonelabel/entitylabel.ini</i>.
	For example, if your zone has the label <i>ghant</i> and your entity has the label <i>alexandria</i> then
	the engine will try to read <i>zones/ghant/alexandria.ini</i>. Read the section on entity menus for more
	information.
</p>

<pre>
[station]
label=alexandria
name=Alexandria outpost
model=stations/alexandria
location=-192 -704 32
; brown
color=222 192 145
direction=45
</pre>

<h3>
	[jumpgate]
</h3>
<p>
		TODO
</p>
<h3>
	[jumppoint]
</h3>
<p>
		TODO
</p>
<h3>
	[navpoint]
</h3>
<p>
	Space is huge and barren wastland.  Navigation points are an easy way to provide players
	with landmarks. The default navigation point is a diamond-shaped entity.
</p>
<pre>
[navpoint]
label=navpoint_east
name=Navigation point East
location=716 -1008 20
</pre>

<h3>
	[planet]
</h3>
<p>
	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.
</p>
<table>
	<tr>
		<td class="wide"><i>texture =</i></td>
		<td class="narrow"><strong>[string]</strong></td>
		<td>name of the planet texture in <i>textures</i> directory</td>
	</tr>
	<tr>
		<td class="wide"><i>rotationspeed =</i></td>
		<td class="narrow"><strong>[float]</strong></td>
		<td>rotation speed in degrees per second</td>
	</tr>
	<tr>
		<td class="wide"><i>dock =</i></td>
		<td class="narrow"><strong>[bool]</strong></td>
		<td>set to true to create a planet the players can visit</td>
	</tr>
</table>

<pre>
; 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
</pre>

<h3>
	[star]
</h3>
<p>
	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.
</p>

<pre>
; a yellow star
[star]
label=whitedwarf
name=White Dwarf
color=1.0 1.0 0.9
radius=96
</pre>

<h2>
	Ships
</h2>
<p>
	TODO Definition of the shopping list.
</p>
<h2>
    Entity menus
</h2>
<p>
	TODO
</p>
<h2>
	Textures
</h2>
<p>
	The engine supports textures in the TGA, PNG and JPG file formats. The filename extension
	should be lowercase and the texture should be in 24bit RGB or 32bit RGBA format.
</p>
</body>
</html>