Module kalast::cfg

source ·
Expand description

Configuration

To configure your scenarios.

A scenario configuration is a cfg/ folder containing the configuration files using yaml format. You can use an existing configuration from the examples or write your own configuration. The cfg/ folder must be located next to the executable.

The configuration can be a single file or split in different files.

Using a single file cfg.yaml

The name of the file must be cfg.yaml, inside the configuration folder (i.e., cfg/cfg.yaml). The configuration can be customised with the optional fields of the main Cfg structure.

Split the configuration into multiple files

Each field of the main Cfg structure can written in a separate file. It leads to the following folder strcture:

General Preferences

If you install an executable of kalast, you can see that a file preferences.yaml is also shipped, next to the executable. This serves as general preferences across your different configs. Local preferences will overwrite general preferences.

Also

If you try to run kalast without config (i.e., no cfg/ folder with no config inside), the default config will be used, defaulting each field of each structure.

Variant of Enums for options are in CamelCase but corresponding values in yaml config files are snake_case. For example, see ColorMode.

What Next?

Now you should read the documentation of the different config structures: Cfg, CfgBody, CfgScene, CfgSimulation, CfgWindow, CfgPreferences.

Structs

Enums

Constants

Traits

Functions

Type Aliases