Docs / Reference / Content formats
Scenery objects (.sco)
A scenery object is anything placed on a map: a house, a sign, a crossing, a traffic light.
It lives under Sceneryobjects\<folder>\, with its meshes in model\ and textures in
texture\.
[friendlyname]
Bus stop pole
[groups]
1
Bus stops
[mesh]
pole.o3d
[collision_mesh]
pole_coll.o3d
[busstop]A .sco takes the whole model.cfg vocabulary inline (see Models),
or names a separate one with [model].
| Keyword | What it does |
|---|---|
[friendlyname], [groups] |
Name and editor groups |
[onlyeditor] |
Shown only in the editor (ambient sound objects, parking spaces) |
[complexity] |
Detail level the object needs |
[rendertype] |
presurface, surface or on_surface (below) |
[LightMapMapping], [nomaplighting], [NightMapMode] |
Light map behaviour |
[fixed], [absheight] |
Not movable; z is absolute |
[collision_mesh], [nocollision] |
Collision |
[crossing_heightdeformation] |
Junction plate meets the ground (see Maps) |
[terrainhole] |
Terrain cutter mesh |
[surface] |
The object is a road surface |
[splinehelper] |
Connector for splines (crossings, switches) |
[path], [path_2] |
A traffic path (below) |
[use_traffic_light] n, [blockpath], [crossingproblem] |
Path rules |
[switch], [switchdir] |
Rail switch |
[traffic_lights_group], [traffic_light], [phase], [approachdist], [traffic_light_stop], [traffic_light_jump] |
Traffic light programme |
[trafficlight], [signal] |
A lamp or rail signal |
[model] |
A separate model.cfg |
[script], [constfile], [varnamelist], [stringvarnamelist], [scriptshare] |
Scripts (see Scripts) |
[lua_script], [lua_range], [lua_rate] |
openOMSI object scripts (see Scripts of map objects) |
[sound], [sound_ai] |
A sound.cfg, driven by the object's variables and triggers |
[paths], [passengercabin] |
Walking paths and places |
[busstop], [entrypoint], [depot], [petrolstation] |
Function of the object |
[carpark_p] |
A parking space |
[helparrow] |
A route arrow placed on the map |
[tree] |
A tree |
[add_camera_reflexion], [add_camera_reflexion_2] |
Mirror camera |
[mass], [momentofintertia], [cog], [boundingbox], [crashmode_pole] |
Physics of a movable object |
[new_attachment] + attach_trans, attach_rot_x/y/z |
A point other objects hang on |
[maplight] x y z r g b radius |
A light on the ground at night |
[rail_enh], [third_rail] |
Rail data |
[triggerbox_new], [triggerbox_setreverb] |
Sound zones |
Render type#
[rendertype] presurface draws the object before the terrain and ordinary scenery, keeping its
mesh and material order. Alpha-blended materials still write depth at transparent texels, so an
invisible cover can keep the terrain from hiding an excavation drawn below it. Alpha-tested
materials keep their cut-outs, and [matl_noZwrite] turns off blended depth writes.
Traffic paths#
[path] has 12 lines, [path_2] 14 (two extra zero fields):
| Line | Meaning |
|---|---|
| 1-3 | Start x, y, z in the object frame (x right, y forward, z up) |
| 4 | Heading (degrees, clockwise, relative to the object) |
| 5 | Radius (0 straight, > 0 right turn) |
| 6 | Length |
| 7-8 | Gradient at start and end (rise per metre; the height is their integral along the path) |
| 9 | Kind: 0 street, 1 sidewalk, 2 rail |
| 10 | Width |
| 11 | Direction: 0 along, 1 backwards, 2 both |
| 12 | Turn indicator: 0 none, 2 left, 3 right (for AI blinkers) |
Lanes link by the proximity of end and start points (≤ 1.5 m, heading within 40°). This
reproduces the prev/next spline chains and the [splinehelper] connections of crossings.
Traffic lights#
[use_traffic_light] nafter a path binds that path to[traffic_light]index n.[traffic_light] name+[phase] state secondslines: 0 red, 3 red+yellow, 6 green, 8 yellow, 9 all-red. The last0 0phase is red until the[traffic_lights_group]cycle restarts.[trafficlight]lamp objects are placed with map flag 1, the extra label is the light index, and[varparent] idis the crossing. Their[visible] red|yellow|green 1meshes follow.[traffic_light_stop] light time ifAnfand[traffic_light_jump] light time ifAnf targetare points on the cycle clock.ifAnf1 means "nobody is asking atlight", 0 "somebody is asking".
How stops and jumps work:
- A stop holds the clock just before its time, so the phase that ends there stays shown.
- If the clock is already at the stop (within 1e-6 s), it holds there.
- A stop never holds in a red-and-yellow changeover: then the clock holds at the stop's own time. A stop whose own time is red-and-yellow is passed.
- A jump whose condition holds at the same time as a stop is taken first.
Changing textures by script#
[CTC] <variable> <folder> <value> reads the folder's .cti items. [CTCTexture] <name> <default-file> entries link each item to a material texture. The script's integer variable
selects an item by zero-based index; each [CTC] group has its own variable.
[texchanges] <file> names a chtex_*.cfg, relative to the vehicle's root folder (vehicles)
or the model's folder (scenery), for example texture\chtex_SD.cfg. It holds
[newtexchangemaster] blocks:
[newtexchangemaster]
rollband.bmp
rlbnd_ln1
[entries]
2
rollband_0.bmp
rollband_1.bmp- Line 1 is the texture name as it appears in the
.o3d. It usually does not exist on disk: the mesh carries it only as a key. - Line 2 is a script variable. Its integer value picks the entry, 0 first.
- Entry files live next to that cfg.
- The masters are model-wide, even though
[texchanges]is written inside a mesh block.
On scenery, both mechanisms drive adverts on shelters, building signs and other props. An out-of-range or negative value leaves the model's own texture.
Parking spaces#
[carpark_p] [onlyeditor] objects (Generic\car_park.sco) are parking spaces. The map's
parklist_p.txt lists parked-car objects (Vehicles\X\parked_*.sco, with [CTC] paint schemes
from the vehicle's .cti). One is placed per space at random; some spaces stay empty.
A numeric first label on a parking object or spline attachment picks an indexed list: 1 reads
parklist_p_1.txt, 2 reads parklist_p_2.txt. An empty or non-numeric label uses
parklist_p.txt.
Text on signs#
[texttexture] string-index font w h fullcolor r g b + [useTextTexture] n on a [matl]
draws text from the object's labels ([object] type flag 1). Text is centred and squeezed to
fit. A [texttexture] whose variable is one of the script's string variables (the stock
departure displays) is redrawn whenever the script calls Refresh_Strings.
[helparrow] objects show when Map-placed route arrows is on, independent of the arrows the
game makes from the driven route.
Something wrong or missing? Fix it on GitHub or open an issue.