Quick Reference: Keywords
A list of [keywords] and their parameters.
[add_camera_driver]
-
Defines a camera for the driver view.
The right arrow key scrolls through cameras in the order they occur in the file, the left arrow key scrolls through them in reverse.
rotation centre offset is used to rotate the camera around a point in front or behind the camera position - default buses move the rotation point by -6 cm to simulate the neck being behind the eyes.
Valid Files: Bus.bus
See also: [add_camera_pax], [set_camera_std], [view_schedule], [view_ticketselling]
Parameter Unit position x metres, relative to origin y z rotation centre offset metres, relative to position - positive is in front of the camera field of view degrees (°) rotation horizontal degrees (°), positive right vertical degrees (°), positive up
[add_camera_pax]
-
Defines a camera for the passenger view.
The right arrow key scrolls through cameras in the order they occur in the file, the left arrow key scrolls through them in reverse.
rotation centre offset is used to rotate the camera around a point in front or behind the camera position - default buses move the rotation point by -6 cm to simulate the neck being behind the eyes.
Valid Files: Bus.bus
See also: [add_camera_pax], [set_camera_std], [view_schedule], [view_ticketselling]
Parameter Unit position x metres, relative to origin y z rotation centre offset metres, relative to position - positive is in front of the camera field of view degrees (°) rotation horizontal degrees (°), positive right vertical degrees (°), positive up
[boundingbox]
-
Defines the cuboid used for collisions calculations.
Valid Files: Bus.bus
See also: [collision_mesh], [nocollision]
Parameter Unit size x metres y z centre x metres, relative to origin y z
[char]
-
Defines a character in an OMSI-font.
A character is simply a rectangle of pixels that's mapped to a single-byte text character. The content of the rectangle can be anything, so you can map letters to symbols if you want.
Valid Files: Font.oft
Must follow: [newfont]
Parameter Description character the letter, number or symbol that this rectangle of pixels represents left the x-coordinate of the left edge of the rectangle (inclusive) right the x-coordinate of the right edge of the rectangle (inclusive) top the y-coordinate of the top edge of the rectangle (inclusive)
[illumination_interior]
-
Sets which [interiorlight]s illuminate a mesh, up to a maximum of four.
A value must be provided for all four parameters. If an index is invalid, no error is thrown and the mesh is still lit by the other lights. -1 is the standard invalid index used when a mesh is lit by less than four lights.
It is possible to have a mesh be lit by the same [interiorlight] more than once. The appearance is identical to increasing a single light's brightness by the same factor.
Meshes without this keyword inherit the lighting from the previous mesh that does have this keyword. If no previous meshes have this keyword, the default lighting is 0, 1, 2, 3.
Valid Files: Model.cfg
Must follow: [mesh]
Parameter Description interior light slot #0 zero-based index of [interiorlight] entries that should be used to light this mesh interior light slot #1 interior light slot #2 interior light slot #3
[interiorlight]
-
Defines a point light source (used for vertex lighting a mesh and/or preventing passengers complaining it's too dark in the bus).
The light source is attached to the mesh - if the mesh is animated, the light source will move with it.
The light source won't illuminate any mesh unless told to using [illumination_interior].
Valid Files: Model.cfg
Must follow: [mesh]
Parameter Description brightness variable script variable or value controlling the brightness of the light brightness multiplier multiplier for brightness variable value colour r the colour of the light g b position x the point that the light eminates from y z
[light_enh]
-
Defines a light bloom effect.
Valid Files: Object.sco, Model.cfg
Must follow: [mesh]
Parameter Description position x Location of the centre of the light source relative to the origin y z colour r Red, Green and Blue channels of the light colour (0-255 integers) g b size diameter of the light effect (metres) brightness variable script variable or value controlling the brightness of the light brightness multiplier multiplier for brightness variable value z-offset offsets the bloom effect from the centre point this many metres towards the camera (useful to prevent a bloom effect clipping into a globe light source for example) effect bloom edge effect, integer made by combining these options: +1 = star, +2 = no fog, +4 = effect only on/off time time (seconds) taken for the light to increase to 63% brightness, or decrease to 37% brightness bitmap bloom effect texture (if left blank, the standard circle (/Texture/licht.bmp) will be used instead)
[light_enh_2]
-
Defines a light bloom effect. Enhanced version of [light_enh].
Valid Files: Object.sco, Model.cfg
Must follow: [mesh]
Parameter Description position x Location of the centre of the light source relative to the origin y z direction x Vector in which the light points y z rotation axis x Vector defining the axis around which the bloom effect rotates when rotating is 1 y z omni 0 = directional, 1 = omnidirectional rotating 0 = direction vector, 1 = rotate to user around rotation axis, 2 = rotate to user around all axes colour r Red, Green and Blue channels of the light colour (0-255 integers) g b size diameter of the light effect (metres) max brightness cone angle angle (°) away from direction vector at which light ceases to be at maximum brightness min brightness cone angle angle (°) away from direction vector at which light ceases to be visible brightness variable script variable or value controlling the brightness of the light brightness multiplier multiplier for brightness variable value z-offset offsets the bloom effect from the centre point this many metres towards the camera (useful to prevent a bloom effect clipping into a globe light source for example) effect bloom edge effect, integer made by combining these options: +1 = star, +2 = no fog, +4 = effect only cone effect should the light make a cone effect when it's foggy? on/off time time (seconds) taken for the light to increase to 63% brightness, or decrease to 37% brightness bitmap bloom effect texture (if left blank, the standard circle (/Texture/licht.bmp) will be used instead)
[matl]
-
Selects a material from a mesh for applying effects to.
Valid Files: Object.sco, Model.cfg
Must follow: [mesh]
Parameter Description texture path the material's texture path, as found in the O3D file material index zero-based index specifying which occurence of texture path to select
[mesh]
-
Adds a mesh.
Valid Files: Object.sco, Model.cfg
Parameter Description file path the path to the O3D file, relative to the model directory
[mouseevent]
-
Makes a mesh clickable, and defines what trigger is fired when the mesh is clicked.
Valid Files: Object.sco, Model.cfg
Must follow: [mesh]
Parameter Description trigger name The name of the trigger that will be fired when the mesh is clicked.
[newfont]
-
Defines an OMSI-font.
All characters in a font have the same rectangle height - the height value should include the gap to the line below.
A note on text-encoding: OMSI's font implementation is quite crude - a string is an array of bytes, and each character is the representation of a particular byte value. If the text encoding of the source (e.g. a script file) and the font file are different, the characters may end up mapped wrong. The 127 ASCII characters are safe, but the extended section can lead to issues. OMSI is a German program, so the default encoding is Windows-1250. With Unicode, UTF-8 is fine but UTF-16, UTF-32, etc., are all more than a byte and so won't work.
Valid Files: Font.oft
See also: [char]
Parameter Description font name the name that will be used internally to utilise the font colour bitmap the path to the bitmap image that contains the colour channels of the font alpha bitmap the path to the bitmap image that contains the alpha channel of the font height the height of the characters in the font spacing the number of spacing pixels between each character
[rendertype]
-
Sets the position in the render order for the sceneryobject.
Valid Files: Object.sco
Parameter Description type A rendertype from these possibilities:
presurface
surface
on_surface
1
2
3
4
[set_camera_std]
-
Sets which of the driver cameras is the normal driving view.
Valid Files: Bus.bus
Parameter Description driver camera index zero-based index of the [add_camera_driver] entry to set as default
[texttexture]
-
Defines a texture to which text is written.
For objects, stringvar can be a zero-based index of the label that should be used as the text input.
Valid Files: Object.sco, Model.cfg
See also: [texttexture_enh], [useTextTexture]
Parameter Description stringvar The name of the string variable that contains the text that will appear on the texture fontname The internal name of the font that will be used to write the text width The width of the texture height The height of the texture fullcolour If 1, the font's colour channels are used; if 0, the monochrome colour defined below is used colour r The colour of the text if fullcolour is 0 g b
[texttexture_enh]
-
Defines a texture to which text is written. Enhanced version of [texttexture].
For objects, stringvar can be a zero-based index of the label that should be used as the text input.
Valid Files: Object.sco, Model.cfg
See also: [texttexture], [useTextTexture]
Parameter Description stringvar The name of the string variable that contains the text that will appear on the texture fontname The internal name of the font that will be used to write the text width The width of the texture height The height of the texture fullcolour If 1, the font's colour channels are used; if 0, the monochrome colour defined below is used colour r The colour of the text if fullcolour is 0 g b orientation Sets the alignment of the text:
0: Centred
1: Left
2: Right
3: "best centered over spacing"
4: "best centered over spacing, case of doubt left"
5: "best centered over spacing, case of doubt right"
grid "everytime aligned to grid with pixels grid. Else use 1 or 0."
[useTextTexture]
-
Replaces the selected material's texture with the specified text texture.
Valid Files: Object.sco, Model.cfg
Must follow: [matl]
See also: [texttexture], [texttexture_enh]
Parameter Description text texture index The zero-based index of the [texttexture] or [texttexture_enh] entry to use
[VFDmaxmin]
-
Defines a visual bounding box for the bus - if no part of the box is on screen, the bus is not rendered, even if parts of the mesh would be on screen.
Valid Files: Model.cfg
Parameter Description minimum x Bounding box corner with minimum coordinates y z maximum x Bounding box corner with maximum coordinates y z
[view_schedule]
-
Sets which camera is switched to with the "View - Time Table" key.
Valid Files: Bus.bus
Must follow: [add_camera_driver]
See also: [view_ticketselling]
This keyword takes no parameters.
[view_ticketselling]
-
Sets which camera is switched to with the "View - Cash Desk" key.
Valid Files: Bus.bus
Must follow: [add_camera_driver]
See also: [view_schedule]
This keyword takes no parameters.
[viewpoint]
-
Sets from which viewpoints a mesh is rendered, for optimisation purposes.
By default a mesh is rendered from all viewpoints (all flag bits set).
Although a value of 0 should result in a mesh never being rendered, instead it is functionally identical to a value of 7.
Valid Files: Model.cfg
Must follow: [mesh]
Parameter Description viewpoint flag A 3-bit flag with the following bits:
1: Rendered on the user vehicle when viewed from the outside (exterior view or freeroam)
2: Rendered on the user vehicle when viewed from the inside (driver or passenger views)
4: Rendered on an AI vehicle