Road-hog123 Avatar - a white bus on orange background Road-hog123 Text Logo - large white 'Road-hog123' text with tagline 'I should come up with a tag line...'
Twitter: @Road_hog123 Twitch: /Roadhog123 Facebook: Road-hog123 Developments Flickr: Road-hog123

Quick Reference: Keywords

A list of [keywords] and their parameters.

[boundingbox]

Defines the cuboid used for collisions calculations.

Valid Files: Bus.bus

See also: [collision_mesh], [nocollision]

ParameterUnit
sizexmetres
y
z
centrexmetres, 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]

ParameterDescription
characterthe letter, number or symbol that this rectangle of pixels represents
leftthe x-coordinate of the left edge of the rectangle (inclusive)
rightthe x-coordinate of the right edge of the rectangle (inclusive)
topthe 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]

ParameterDescription
interior light slot #0zero-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]

ParameterDescription
brightness variablescript variable or value controlling the brightness of the light
brightness multipliermultiplier for brightness variable value
colourrthe colour of the light
g
b
positionxthe point that the light eminates from
y
z

[light_enh]

Defines a light bloom effect.

Valid Files: Object.sco, Model.cfg

Must follow: [mesh]

ParameterDescription
positionxLocation of the centre of the light source relative to the origin
y
z
colourrRed, Green and Blue channels of the light colour (0-255 integers)
g
b
sizediameter of the light effect (metres)
brightness variablescript variable or value controlling the brightness of the light
brightness multipliermultiplier for brightness variable value
z-offsetoffsets 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)
effectbloom edge effect, integer made by combining these options: +1 = star, +2 = no fog, +4 = effect only
on/off timetime (seconds) taken for the light to increase to 63% brightness, or decrease to 37% brightness
bitmapbloom 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]

ParameterDescription
positionxLocation of the centre of the light source relative to the origin
y
z
directionxVector in which the light points
y
z
rotation axisxVector defining the axis around which the bloom effect rotates when rotating is 1
y
z
omni0 = directional, 1 = omnidirectional
rotating0 = direction vector, 1 = rotate to user around rotation axis, 2 = rotate to user around all axes
colourrRed, Green and Blue channels of the light colour (0-255 integers)
g
b
sizediameter of the light effect (metres)
max brightness cone angleangle (°) away from direction vector at which light ceases to be at maximum brightness
min brightness cone angleangle (°) away from direction vector at which light ceases to be visible
brightness variablescript variable or value controlling the brightness of the light
brightness multipliermultiplier for brightness variable value
z-offsetoffsets 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)
effectbloom edge effect, integer made by combining these options: +1 = star, +2 = no fog, +4 = effect only
cone effectshould the light make a cone effect when it's foggy?
on/off timetime (seconds) taken for the light to increase to 63% brightness, or decrease to 37% brightness
bitmapbloom 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]

ParameterDescription
texture paththe material's texture path, as found in the O3D file
material indexzero-based index specifying which occurence of texture path to select

[mesh]

Adds a mesh.

Valid Files: Object.sco, Model.cfg

ParameterDescription
file paththe 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]

ParameterDescription
trigger nameThe 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]

ParameterDescription
font namethe name that will be used internally to utilise the font
colour bitmapthe path to the bitmap image that contains the colour channels of the font
alpha bitmapthe path to the bitmap image that contains the alpha channel of the font
heightthe height of the characters in the font
spacingthe number of spacing pixels between each character

[rendertype]

Sets the position in the render order for the sceneryobject.

Valid Files: Object.sco

ParameterDescription
typeA rendertype from these possibilities:
presurface
surface
on_surface
1
2
3
4

[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]

ParameterDescription
stringvarThe name of the string variable that contains the text that will appear on the texture
fontnameThe internal name of the font that will be used to write the text
widthThe width of the texture
heightThe height of the texture
fullcolourIf 1, the font's colour channels are used; if 0, the monochrome colour defined below is used
colourrThe 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]

ParameterDescription
stringvarThe name of the string variable that contains the text that will appear on the texture
fontnameThe internal name of the font that will be used to write the text
widthThe width of the texture
heightThe height of the texture
fullcolourIf 1, the font's colour channels are used; if 0, the monochrome colour defined below is used
colourrThe 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]

ParameterDescription
text texture indexThe 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

ParameterDescription
minimumxBounding box corner with minimum coordinates
y
z
maximumxBounding box corner with maximum coordinates
y
z

[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]

ParameterDescription
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

[visible]

Allows a variable to hide or show a mesh.

Valid Files: Object.sco, Model.cfg

Must follow: [mesh]

ParameterDescription
script variablethe script variable that specifies when this mesh is visible
valuethe mesh is only visible when script variable is equal to this value