Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
blob: b932f5262f56801a49e6ce3931c08ab199e74e3d (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
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
<!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="main.css">
	<TITLE>Project::OSiRiON - User manual</TITLE>
</head>

<body>
<div class="banner">
	<img src="images/banner.png" ALT="Project::OSiRiON">
	<br>
	User Manual
</div>
<div class="text">
<p>
	<i>Note: this document is undergoing major changes and is currently a mix of older and updated content.</i>
</p>
</div>
<div class="text">
<p>
	Most features of the engine can by used by typing text commands into the
	command console. Both the client and the dedicated have their own console: the one on
	the dedicated server is always visible, and is the only way to send commands to the server.
	The command console in the client is usually hidden and can be opened by pressing the <b>~</b> key.
</p><p>
	Some commands are only available on a server, other commands are only available while running 
	a client. If you are playing a local game, you are actually running your own local server
	and server commands will als be available through the client command console as well.
</p><p>
	Note: if your dedicated server has been build without curses support, the server console
	will be disabled.
</p>
</div>

<!-- =============================================================== -->

<div class="title">
	Basics
</div>

<div class="text">
<p>
	If you open the client console or look at the server console will see
	all messages the server has send to the console so far. You can scroll
	up and down using <b>page up</b> and <b>page down</b> to see older messages.
	The client console can also be scrolled using the mousewheel.
</p><p>
	Warning messages are usually printed in yellow, important error message in red.
	If you encounter problems, the console is usually the best place to look for information.
</p>

</div>

<div class="subtitle">
	Variables
</div>
<div class="text">
<p>
	The console can be used to change a number of configuration variables: these variables
	are used to store various settings and by changing these values the engine and the game
	can be customized to the user's preference.
</p>
<p>
	The <span class="fixed">list_var</span> functions will print a list of available variables: type
	<span class="fixed">list_var</span> on the console followed by <b>enter</b>.
</p>
<pre class="code">
>list_var 
 A   cl_color 1 1 .5 [r g b] player primary color
 A   cl_colorsecond 1 .5 0 [r g b] player secondary color
 .
 .
 .
 A   sv_name osirion server [string] server name
 A   sv_password  [string] server rcon password
     sv_private 0 [bool] enable or disable network server for a client
  Flags: A=Archive G=Game R=ReadOnly
  71 registered variables
</pre>
<p>
	For each available variable, the list_var function will print the variable's flags,
	name, its current value and a short description. To inspect the current value of
	a single variable, just type its name on the console followed by <b>enter</b>.
</p>
<pre class="code">
>sv_name
  sv_name osirion server [string] server name
</pre>
<p>
	To change the value of a variable, type its name and the new value on the console
	followed by <b>enter</b>. The console will show the new value:
</p>
<pre class="code">
>sv_name My Osirion Server
  sv_name My Osirion Server [string] server name
</pre>
<p>
	Some variables have special flags, as shown in the first column of the output
	of the <span class="fixed">list_var</span> function.
	<dl>
		<dt>Archive</dt>
		<dd>The value of this variable will automaticly be saved on exit</dd>
		<dt>Game</dt>
		<dd>This variable is a game setting</dd>
		<dt>ReadOnly<dt>
		<dd>The value of this variable can not be changed</dd>
	</dl>
</p><p>
	On exit, both the client and the server will save variables with
	the Archive flag to their config file, <span class="fixed">client.cfg</span> or <span class="fixed">server.cfg</span>.
	Variables with the Game flag set will be saved to the file <span class="fixed">game.cfg</span>.
	If you run into trouble, you can delete these files to restore the default values. 
<p>
	On Linux and other UNIX-like systems you can find these files in the directory <span class="fixed">~/.osirion/base</span>.
</p><p>
	On windows you can find these files in <span class="fixed">My Documents/My Games/Osirion/base</span>.
<p>
</div>

<div class="subtitle">
	Functions
</div>
<div class="text">
<p>
	Besides variables, the engine also support functions that can be executed. These are commands
	that can be typed into the console that will trigger some kind of response.
</p><p>
	In the previous section we had already met the <span class="fixed">list_var</span> function,
	which will print a list of available variables to the console. Similar, the 
	<span class="fixed">list_var</span> function, wich will print a list of available functions:
</p>
<pre class="code">
>list_func 
    bind [key] [str] bind a command to a key
    connect [ip] without ip, create a game
    disconnect leave the current game
 G  intro [int] view specified introduction
 .
 .
 .
    view_next switch to next view
    view_prev switch to previous view
  S who get a list of connected players
Flags: G=Game S=Shared
  61 registered functions
</pre>
<p>
	Type a function's name into the console followed by <b>enter</b> to execute it. Some functions
	require aditional parameters to work currectly.
</p><p>

	Like variables, functions can have special flags that indicates their type:
	<dl>
		<dt>Game</dt>
		<dd>This is a game function and can only be executed by players. These functions
		are used to interact with the game and includes commands like
		<span class="fixed">buy</span> and <span class="fixed">trade</span>.
		</dd>
		<dt>Shared</dt>
		<dd>These functions can be executed by both players and server administrators.</dd>
	</dl><dl>
		<dt></dt>
		<dd>Functions without flags can only be executed through the local console.</dd>
	</dl>
</p><p>
	To understand the flow of commands we illustrate three different situations:
	<dl>
		<dt>Playing a local game</dt>
		<dd>In this case you're not connected to a remote server but are, in fact,
		running your own, private server. You're both the player and the server administrator
		and you'll be able to execute any function.</dd>

		<dt>Playing on a remote server</dt>
		<dd>If you're connected to a remote server and you execute a function, the engine will
		first check if the function exists locally. The function you want to execute
		could be client releated, like <span class="fixed">screenshot</span>. Only functions
		without flags can be executed this way. If the function does not exist, the engine will
		send the command to the remote server. The remote server will check if the functions
		exists and has the game flag set. If this is the case, the function will get executed
		on the server.</dd>

		<dt>Running a dedicated server</dt>
		<dd>If you're using the dedicated server's command console, you can only execute
		functions with the <span class="fixed">Shared</span> flag set, and functions without the 
		<span class="fixed">Game</span> flag set. It doesn't make sense for server operators
		to execute game functions, since they do not participate as players in the game.</dd>
</p>
</div>

<div class="subtitle">
	Command line options
</div>
<div class="text">
	TODO Concerning command line options
</div>

<!-- =============================================================== -->
<div class="title">
	Client
</div>
<div class="text">
	<div class="rfloater">
		<img src="images/client_console.png" alt=""><br>
		Client console
	</div>
<p>
	Starting the client will show the loader screen and open 
	the client console. The console will stay open until you are connected
	to a game. Once connected you can close and open it again with the ESC key.
</p><p>
	Type <span class="fixed">connect</span> and press Enter. You will join the game as
	spectator, type <span class="fixed">join</span> in the console to join the game. 
	Type <span class="fixed">spectate</span> to spectate again.
	Type <span class="fixed">disconnect</span> to return to the loader screen.
</p>
<!--<p>
	The client is capable of acting as a networked server. You can enable
	the private server by setting <span class="fixed">sv_private 1</span> before you <span class="fixed">connect</span>.
	This wil allow remote players to connect to your client.
</p>-->
<p>
	To connect to a dedicated server, type <span class="fixed">connect address</span>, where
	adress is the hostname or IP address of the remote server.
</p><p>
	If you started a local game and want to have a quick look around you can enable
	cheats by setting the <span class="fixed">g_devel</span> variable. Once cheats are enabled,
	you can use the <span class="fixed">give ship</span> command to try out new ships
	ad the <span class="fixed">give cargo</span> command to fill up your cargo hold for free.
</p>
<p>
	This example will swap your current ship for the Micron Matrix model, and fill its cargo
	hold with 5 units of gold:
</p>
<pre class="code">
g_devel 1
give ship matrix
give cargo gold 5
</pre>
<p>
	You can also eject the cargo into space:
</p>

<pre class="code">
eject cargo gold 5
</pre>

<p>
	A particulary amusing way to test the engine is the following command combo (the double qoutes are mandatory):
</p>
<pre class="code">
bind k "give cargo gold 1; eject cargo gold 1"
</pre>
<p>
	This command combination will make the k key spit a cargo pod into space.
</p>
</div>

<!-- =============================================================== -->
<div class="subtitle">
	Keyboard
</div>
<div class="text">
<p>
	Keyboard controls can be configured with the <span class="fixed">bind</span> command.
	A key can be bound to an action or a console command. An action
	always starts with a plus or minus sign.
<p>
	To bind the keypad left key to the turn left action:
<pre>
bind kpleft +left
</pre>
<p>
	To bind the P key to the screenshot command:
<pre>
bind p screenshot
</pre>
<p>
	You can use the <span class="fixed">list_binds</span> command to get a list of currently
	bound keys. Use the <span class="fixed">list_keys</span> command to get a list of all
	available key names.
<p>
	The default configuration:
<table>
	<tr><td>ESC or ` 
	</td><td>toggle console
	</td></tr>
	
	<tr><td>v
	</td><td>next camera view
	</td></tr>

	<tr><td>shift+v
	</td><td>previous camera view
	</td></tr>

	<tr><td>left right up down 
	</td><td>rotate camera in free view
	</td></tr>	

	<tr><td>keypad left right
	</td><td>direction
	</td></tr>

	<tr><td>keypad up down
	</td><td>pitch
	</td></tr>

	<tr><td>keypad home pgup
	</td><td>roll
	</td></tr>


	<tr><td>keypad + -
	</td><td>increase/decrease forward thruster
	</td></tr>

	<tr><td>space bar
	</td><td>toggle mouse control on or off
	</td></tr>

	<tr><td>tab
	</td><td>kinetic impulse drive control
	</td></tr>

	<tr><td>a d
	</td><td>strafe
	</td></tr>

	<tr><td>q e
	</td><td>roll
	</td></tr>

	<tr><td>w s
	</td><td>afterburner/reverse
	</td></tr>

	<tr><td>n
	</td><td>select next target
	</td></tr>

	<tr><td>shift+n
	</td><td>select previous target
	</td></tr>

	<tr><td>ctrl+n
	</td><td>deselect current target
	</td></tr>

	<tr><td>t
	</td><td>chat box
	</td></tr>

	<tr><td>enter
	</td><td>chat window
	</td></tr>

	<tr><td>print screen
	</td><td>screenshot
	</td></tr>
</table>
</div>

<!-- =============================================================== -->
<div class="subtitle">
	Mouse
</div>
<div class="text">
<p>
	If you have choosen Track or cockpit view and mouse control is actived, 
	you can use it to steer your vessel. In Free view mode, the mouse will rotate
	the camera. If mouse control it is deactived, you can temporarily activate 
	it by pressing the left mouse button.
<p>
	Use the scroll wheel to increase/decrease thruster.
<p>
	Mouse buttons can also be configured through the <span class="fixed">bind</span> command.
</div>


<!-- =============================================================== -->
<div class="subtitle">
Joystick
</div>
<div class="text">
<p>
	Joystick support is only preliminary and disabled by default. A list of detected
	joysticks will apear in the startup messages. To use a joystick set the
	<span class="fixed">input_joystick</span> variable to the desired joystick number:
<pre>
input_joystick 1
</pre>
<p>
	The axes are hardcoded and can not be configured. Axis 0 controls pitch, axis
	1 controls direction, axis 2 control roll. There is no way to callibrate the
	joystick, you will have to use an external joystick calibration program.
<p>
	Up to 16 joystick buttons will be reckognized. They can be configured by assigning
	a command or action to keys <span class="fixed">joy0</span> through <span class="fixed">joy15</span>. For example, to configure
	the first button to activate or deactivate the kinetic impulse drive:
<pre>
bind joy0 impulse
</pre>
</div>

<!-- =============================================================== -->
<div class="subtitle">
Console functions
</div>
<div class="text">
<p>
	The following commands are always available on the console:
<table>
	<tr><td class="wide">connect</td><td>connect the client to the game module</td></tr>
	<tr><td class="wide">disconnect</td><td>disconnect the client from the game module</td></tr>
	<tr><td class="wide">list_ent</td><td>list registered entities</td></tr>
	<tr><td class="wide">list_func</td><td>list registered functions</td></tr>
	<tr><td class="wide">list_model</td><td>list registered models</td></tr>
	<tr><td class="wide">list_var</td><td>list registered variables</td></tr>
	<tr><td class="wide">quit</td><td>exit the application</td></tr>
	<tr><td class="wide">r_restart</td><td>restart the video subsystem</td></tr>
</table>
<p>
	The following commands are available when you are connected to a game:
<table>
	<tr><td class="wide">join</td><td>join the game</td></tr>
	<tr><td class="wide">spectate</td><td>spectate</td></tr>
	<tr><td class="wide">buy</td><td>purchase a new ship</td></tr>
	<tr><td class="wide">jump</td><td>active the hyperspace jump drive</td>
	<tr><td class="wide">impulse</td><td>active the kinetic impulse drive</td>
	<tr><td class="wide">who</td><td>list connected players</td></tr>
</table>
<p>
	This list is far from complete. The <span class="fixed">list_func</span> function will print
	all available functions with a short description.
</div>

<!-- =============================================================== -->
<div class="subtitle">
	Configuration variables
</div>
<div class="text">
<p>
	A lot of settings can be changed through configuration variables. 
	The <span class="fixed">list_var</span> function will print all available variables with
	a short discription. To change the value of a variable, type its name
	followed by the new value.
<p>
	e.g.: to disable rendering of the sky:
<pre>
r_sky 0
</pre>
<p>
	to enable it again:
<pre>
r_sky 1
</pre>
<p>
	To change the video resolution, set the r_width and r_height variables and execute r_restart.
	e.g.: to set the video mode to 1680x1050 type:
<pre>
r_width 1680
r_height 1050
r_restart
</pre>
<p>
	To switch to fullscreen mode, set the r_fullscreen 
	variable to 1:
<pre>
r_fullscreen 1
</pre>
<p>
	You can set your name and player color through the cl_color
	and cl_name variables. Note that your ship's colour won't 
	change until you buy a new one.
<pre>
cl_name SpaceCadet
cl_color 1.0 1.0 0.0
connect
</pre>
</div>

<!-- =============================================================== -->
<div class="subtitle">
Statistics
</div>
<div class="text">
<p>
	To activate statistics, set the draw_stats variable to 1:
<pre>
draw_stats 1
</pre>
<p>
	This will draw the following statistics on the right side
	of the screen:
<pre>
fps	average framerate, frames per second
tris	number of triangles
quads	number of quads
net	average network traffic, bytes per second
</pre>
<p>
	The framerate is limited to 1000 frames per second.
</div>

<!-- =============================================================== -->
<div class="subtitle">
	Configuration variables
</div>
<div class="text">
<p>
	Variables marked with the 'A' flag will be archived. Their values
	will be loaded from and saved to the configuration files. The dedicated server
	reads its configuration from <span class="fixed">server.cfg</span>, the client will use <span class="fixed">client.cfg</span>.
	Keyboard binds will be saved to <span class="fixed">binds.cfg</span>. Game settings will be saved to <span class="fixed">game.cfg</span>.
<p>
	On UNIX systems you can find these files in the directory <span class="fixed">~/.osirion/base</span>.
<p>
	If you delete these files, the default configuration will be restored.
</div>

<!-- =============================================================== -->
<div class="title">
	Dedicated server
</div>
<div class="text">
<div class="rfloater"><img src="images/server_console.png" alt=""></div>
<p>
	By default, the dedicated server will accept incoming connections 
	on UDP port 8042. The server console is available if ncurses
	support was enabled at compile time.
<p>
	If you have trouble connecting, try editing the server configuration
	file server.cfg and change the <span class="fixed">net_server</span> variable to
	the server's actual IP address. The default listening port can 
	be altered by changing the <span class="fixed">net_port</span> variable.
</div>

<!-- =============================================================== -->
<div class="title">
	Command line
</div>
<div class="text">
<p>
	Both the client and the dedicated server can parse command line 
	options. Any console command can be added to the command line with the + sign.
</p><p>
	To start a client and immediatly connect to a remote server:
</p>
<pre>
osirion +connect remote.server.org
</pre>
<p>
	To start a client and create a new network game:
</p>
<pre>
osirion +set sv_private 1 +connect +join
</pre>
<p>
	To start a dedicated server and set the server name to <span class="fixed">My Osirion Server</span>:
</p>
<pre>
osiriond +set sv_name My Osirion Server
</pre>
<p>	<b>Note:</b> setting variables from the command line can result in weird values being 
	written to client.cfg and server.cfg. If you run into problems, check those 
	files or delete them.
</p>
</div>

<!-- =============================================================== -->
<div class="title">
	Operating System specific notes
</div>
<div class="text">
<p>
	On windows32, the game uses the <span class="fixed">My Documents\My Games\Osirion</span> subdirectory as your personal
	directory. For example, the client.ini can be found as <span class="fixed">My Documents\My Games\Osirion\base\client.ini</span>.
</p>
</div>

</body>
</html>