1. Definition
In OMSI, it is possible to change or create AI humans who act as passers-by or passengers in the game. These are also known as "Humans". Passers-by move on created paths. Passengers spawn at stops, but only move on paths on the map after getting off. The AI humans can also interact with the player by greeting them when they board, buy tickets, complain about the driving style or the temperature on the bus.
2. File structure
2.1. Humans folder
The OMSI main folder contains the Humans directory, which contains a collection of different subfolders. Each of these subfolders contains configuration files, texture files and model files that are required to display the humans in the game.
2.2. *.hum-file
The file with the extension ".hum" contains configuration data for the AI human.
2.2.1. Model keyword
This section defines the path to the model configuration file.
2.2.2. Seating height keyword
This value sets the seating height (in the bus, at bus stops) of the human. However, it should be noted: The lower the value, the higher the person sits.
2.2.3. Humangeom keyword
The first value defines the distance between the feet of the human.
The second decimal number represents the absolute height of the human, which can be read off from for example Blender.
2.2.4. Left keyword
[links]
{decimal number – X hip}
{decimal number – Y hip}
{decimal number – Z hip}
{decimal number – X knee}
{decimal number – Y knee}
{decimal number – Z knee}
{decimal number – Y waist}
{decimal number – Z waist}
{decimal number – X shoulder}
{decimal number – Y shoulder}
{decimal number – Z shoulder}
{decimal number – X elbow}
{decimal number – Y elbow}
{decimal number – Z elbow}
{decimal number – Y neck}
{decimal number – Z neck}
{decimal number – X wrist}
{decimal number – Y wrist}
{decimal number – Z wrist}
{decimal number – X tip of the middle finger}
{decimal number – Y tip of the middle finger}
{decimal number – Z tip of the middle finger}
Alles anzeigen
Even if the section is labelled "left", the values for the right side of the body must be entered.
This section contains information about the positions of various parts of the model's body. These values should be read from for example Blender. In general, the x-axis moves the position of the respective body part forwards (negative value) and backwards (positive value). The y-axis also moves the body part to the right or left. The z-value sets the height of the body part.
Not all body parts require three values!
The following picture shows the positions of the body parts:
2.2.5. Voice keyword
This section sets the voice of the human being used. The value is a reference to the voice folder in which the audio files are stored. This voice folder is located in the main folder, under TicketPacks\{TicketPackOfTheMap}\{VoiceFolder}.
2.2.6. Walk_param keyword
[walk_param]
{decimal number - Step size in metres}
{decimal number - Angle of the upper arm in degrees}
{decimal number - Animation intensity hands}
{decimal number - Animation intensity hips}
{decimal number - Animation intensity waist}
The animation intensity of some body parts and other parameters for the human walking movement are defined here. The "angle of the upper arm" describes the movement of the upper arm towards the centre of the human. A larger value also increases the inclination of the upper arm towards the centre of the body.
2.2.7. Mass keyword
This section defines the mass of the human in tonnes.
2.2.8. Age keyword
This keyword defines the age of the human. This setting tells OMSI which tickets are for which human.
2.3. More keywords
OMSI ignores other keywords that are known from *.sco files, for example, and are entered in the *.hum file. It is therefore not possible to use sounds, scripts or similar.
2.4. *.cfg-file
The file with the extension ".cfg" contains configuration data for the AI human model. Although it is originally known as a model configuration file, a new keyword called [setbone] can be used in this context. All other commands can be used in this file as usual. he path to this file is specified in the *.hum file with the model keyword.
2.4.1. Setbone keyword
The setbone keyword is used to define a new bone for a human's mesh. The name can be chosen freely, but it must correspond to the name of the respective vertex group in Blender. Moreover, the negative integer is used as an internal value. This value should be a number between -2 and -14 (both inclusive), as an OMSI human has a total of 13 bones. The following table shows the internal value depending on the position of the bone:
3. Blender
This section briefly explains how to set up the human mesh in Blender for use in OMSI and then export it correctly.
3.1. Mesh
The mesh can have any shape. The only thing to note is that the human mesh forms a T-shape. The legs should therefore be in a row and the hands should be stretched out straight towards +x and -x. The person should be looking in the +y direction.
3.2. Vertex groups
So-called vertex groups are required so that the AI human is also animated in OMSI. If the mesh of the human is selected in Blender, the vertex groups can be viewed in the "Properties window" under the "Data" tab:
[attach=‘202714’,‘none’,‘true’][/attach]
An OMSI human only requires these vertex groups for the animations. An armature is not required
.
Two options are available for creating vertex groups and assigning the associated vertices to these groups:
- The manual way – "Weight Paint": This mode can be used to select the vertices belonging to the vertex group. This mode can also be combined with the second option and enables a high degree of accuracy in the selection.
- The automatic way – Using an armature: After creating the armature, the vertex groups are generated when connecting to the mesh using Ctrl + P and, for example, With Automatic Weights.
Explaining Blender is beyond the scope of this Wiki article. Further information on Blender can be found here:
3.3. O3D-Exporter
To export the mesh later with the vertex groups from Blender, the following Blender add-on is required: Blender OMSI-Exporter from Road-hog 123.
Only the exporter specified here supports the export of the vertex groups created with skin weights. It is important to note that this add-on currently works with Blender versions 3.3 and 3.5.
3.4. Export
When exporting, the mesh must be selected and exported via add-on with File > Export > OMSI Mesh (.o3d). When exporting, the "Skin Weights" checkbox must be ticked.