Docs / Reference / Content formats
Humans (.hum)
[model], [seatheight], [humangeom] feetdist height, [links] = 22 numbers: hip xyz,
knee xyz, waist yz, shoulder xyz, elbow xyz, neck yz, hand xyz, finger xyz (right side, model
frame x right / y forward / z up; the mesh is stored in a T-pose), [voice], [walk_param],
[mass].
The model's [setbone] name id binds o3d bones to engine ids: −2/−3 thighs L/R,
−4/−5 shins, −6/−7 upper arms, −8/−9 forearms, −10 hip, −11 torso, −12 head, −13/−14 hands. Left is −x in every stock and add-on mesh checked (20 stock, 3 GSPNS).
[links] values are
not always trustworthy: the GSPNS man04/man041 give the hip at x 0.6 and the knee at x 0.83
(the mesh's thigh is at 0.08) - harmless for rotations about x, fatal for a leg IK, so a
leg joint outside its limb's vertices is taken from the mesh.
A map's humans.txt (one Humans\<group>\<file>.hum per line) is the list its pedestrians
and passengers are drawn from; Berlin-Spandau and Grundorf name 15 stock types (not the DBC
staff in uniform, not aXYZ man01), so an add-on's people installed for another map never
walk there.
Clothing variants work like a bus's paint schemes: the human model's [CTC] Colorscheme <folder> 0 names a folder relative to the .hum file (Texture\man01 =
Humans/Other/texture/man01) whose .cti [item]s replace the [CTCTexture] farbschema <default> texture (stock people have one or two variants besides the default).
The body
texture of man02 and the women's hair carry [matl_alpha] 1 (alpha test).
The [passengercabin] file gives [passpos] x y z seat-height rot seats - x, y, z is the
hip ("Attachpunkt Arsch") when the seat height above the floor is greater than zero and
the foot when it is zero, which marks a standing place - plus [entry]/[exit]
path points, [ticket_sale], [stamper].
In openOMSI a [passpos] may go on with one or
two script variable names on the lines straight after its five values (see MODDING.md). [entry] may carry {noticketsale}: passengers
who use that door walk straight to a seat instead of past the cash desk.
It and {withbutton}
are lines of their own that mark the entry read last, wherever they stand between the blocks
(the stock cabins write a blank line before them), as Omsi.exe reads them.
The entries and exits are numbered in file order, and that number is how the engine and the bus script talk about the doors.
The engine writes PAX_Entry<i>_Req while somebody at the
kerb wants in through entry i and PAX_Exit<i>_Req while a rider wants out through exit
i; the script answers with PAX_Entry<i>_Open / PAX_Exit<i>_Open, and only then does
anybody move.
The stock SD202 door.osc sets PAX_Entry0_Open from door_0 > 0.9, keeps
the stop-request lamp lit while PAX_Exit0_Req or PAX_Exit1_Req is set, and sets
haltewunsch when the door release is on and somebody presses a rear outside opener
(PAX_Entry2_Req/PAX_Entry3_Req).
Writes to an index the cabin does not declare are
ignored, which is how one script serves the two-door and three-door variants of a bus. Pressing an outside opener also fires the engine trigger door_aussenoeffner.
The AI door scripts (door-3_X10_AI.osc, door_X10_AI.osc, ai.osc of the SD202) drop
the stop request as soon as the rear door is open and keep that door open only while a
PAX_Exit<i>_Req stands, so every rider on the way out (walking to the door, waiting at
it, stepping through it) keeps asking.
AI_Scheduled_AtStation is a handshake between the engine and an AI vehicle's script:
the engine writes 1 at a stop (the script opens the doors), -1 when the bus is to leave
(the script closes them, releases the stop brake and writes 0 back), and the bus pulls
away once it reads the 0.
Writing 0 straight away leaves the stock scripts with nothing to do: the doors stay open and the bus drives off with them. The EN92 script answers once its rear door is shut, while the front leaves may still be closing.
Weather and wear reach the model through engine-written vehicle variables. PrecipRate
is signed: rain.osc adds Timegap * PrecipRate to Rain_Window_Front_Wetness,
Rain_Window_Norm_Wetness and Rain_Window_Wiped_Wetness, so a positive rate soaks the
glass and a negative one dries it;
wiper.osc clears the wiped one as the blade sweeps,
which is why the arc in front of the driver stays clear while the rest of the window is
covered.
DirtRate is how fast the windscreen soils right now (dirt.osc accumulates it
into Dirt_Wiped), and Dirt_Norm is how dirty the body is; both are the [alphascale]
of a dirt overlay material. veh_wash clears them.
[matl_change] texture index variable followed by one [matl_item] block (every stock
file has exactly one): the block's [matl_nightmap], [matl_lightmap], [matl_allcolor] …
describe the material variant.
Omsi.exe (0x5fd6xx) rounds the variable to the nearest whole number (ties to even) and shows item n for 1 ≤ n ≤ the number of items, the plain material for anything else - a variable at 2 with one item is dark.
A variable no script
declares is registered by the model loader at 0 (the stock MANs' spare buttons are switched
by *Noch nicht belegt*, "not assigned yet", and stay dark).
The [matl_change] block
itself changes the plain material; each [matl_item] starts as a copy of the plain
material as it is at that point (openOMSI draws the first item).
The item's [matl_nightmap] glows at full strength while the
variable is on, by day as well - warning lamps (lights_blinkgeber, cockpit_light_*,
haltewunschlampe) and dashboard screens drawn only in the night map (the Procity's pressure
screen, switched by elec_busbar_main) depend on it.
A vehicle's plain [matl_nightmap] glows
the same way whenever its mesh is drawn, by day as well: dashboard lamps and the "stop
requested" sign are meshes switched by [visible] with a night map on a plain [matl] (#497);
a scenery object's fades in with the night.
Street lights use NightlightA, bus panels
elec_busbar_main, displays their light switches. The item inherits the plain [matl] of
the slot (alpha mode, transmap) and may replace them: [matl_transmap] + [matl_alpha] 2
items are washer water / condensation that only exist while the variable is on;
[matl_allcolor] items (diffuse rgba, ambient rgb, specular rgb, emissive rgb, power) tint
the variant and add texture × emissive self-illumination (lower-deck lighting). [matl_lightmap] is a light mask multiplied with the diffuse texture (the SD202 maps
D86_02_L1.bmp are grey masks of the lit atlas regions), scaled by its variable.
[matl_glow] <texture> <value> is an openOMSI extension (Omsi.exe's model unit has no
such keyword and skips it as it skips any unknown line; no stock content uses it): it makes the
slot its own light.
The named texture is a greyscale mask of how much shines where (white full, black none) and the light is the material's own colour - a destination panel's text keeps the colour its display draws.
value is its brightness on the scale of the
LED panels' Led glow setting (the shader's strength is value * 0.25, as that setting's
levels are): 6 is as bright as that setting's default, 20 brighter than its top. The setting
itself does not scale it.
Only the enhanced picture draws it, as an emission held against the metering as an LED panel's dots are, so it shows by day as well as by night; the glare round it comes from how bright it is, as any light's does. An unlit slot (a script's or a text texture, drawn at its own brightness already) does not take it.
The mask is bound in the light map's slot: a slot that also has a [matl_lightmap] keeps its
light map and has no glow, and the classic picture draws the slot as if the keyword were not
there.
A glow that is switched (a tail lamp) is a [matl_item] of a [matl_change] with the
keyword; an item without a light map or glow of its own keeps its base material's. The last
[matl_glow] of a slot counts.
[led_glow_effect] <value> is an openOMSI extension too (Omsi.exe skips it): value, 0 to
1, is how much of the Led glow setting the slot's lit dots burn with.
Without it the enhanced
picture guesses which slots are LED panels - a \S:n script mask (or a page's dot mask) under a
light map that is white all over - and gives them the whole of the setting;
with it the
modeller decides: 0 the slot is no LED panel (a flipdot or an LCD the guess would take for
one), anything over 0 it is one, glowing with that share. The dots are what the slot's alpha
lets through, in its texture's colour, as with the guessed panels. A value outside 0..1 is
taken to the nearer end.
It belongs to the slot like the other commands (the last one counts,
a [matl_item] takes it from the slot or gives its own); the classic picture does not use it.
Commands between [matl_change] and its first [matl_item] belong to the slot's plain
material, as Omsi.exe's reader has them (0x5efae8 keeps the slot's record current until the
item): an LED matrix that opens its change first and writes [matl_alpha] 2 and its
[useScriptTexture] after it gives them to the panel itself, lit or not.
Something wrong or missing? Fix it on GitHub or open an issue.