Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Prototype Docs Version 2.0.77

# SimulationDefinition - Prototype Docs

## SimulationDefinition :: struct

Used by tips and tricks and main menu simulations. Simulations can be controlled at runtime via LuaSimulation.

## Properties

- default
- sorted

planet optional | :: SpaceLocationID |
game_view_settings optional | :: GameViewSettings | Only applied to the simulation if a test player is created through LuaSimulation::create_test_player.
Only applied to the simulation if a test player is created through LuaSimulation::create_test_player.
save optional | :: FileName | The save file that is used for this simulation. [...]
The save file that is used for this simulation. [...]
init_file optional | :: FileName | This code is run as a (silent) console command inside the simulation when it is first initialized. [...]
This code is run as a (silent) console command inside the simulation when it is first initialized. [...]
init optional | :: string | Only loaded if `init_file` is not defined. [...]
Only loaded if `init_file` is not defined. [...]
update_file optional | :: FileName | This code is run as a (silent) console command inside the simulation every time the simulation is updated. [...]
This code is run as a (silent) console command inside the simulation every time the simulation is updated. [...]
update optional | :: string | Only loaded if `update_file` is not defined. [...]
Only loaded if `update_file` is not defined. [...]
mods optional | :: array[string] | An array of mods whose runtime scripts will be loaded for this simulation, if they are present and enabled.
An array of mods whose runtime scripts will be loaded for this simulation, if they are present and enabled.
init_update_count optional | :: uint32 | Amount of ticks that this simulation should run for before the simulation is shown to the player. [...]
Amount of ticks that this simulation should run for before the simulation is shown to the player. [...]
length optional | :: uint32 | How long this simulation takes. [...]
How long this simulation takes. [...]
generate_map optional | :: boolean | If `save` is not given and this is true, a map gets generated by the game for use in the simulation.
If `save` is not given and this is true, a map gets generated by the game for use in the simulation.
checkboard optional | :: boolean | If this is true, the map of the simulation is set to be a lab-tile checkerboard in the area of `{{-20, -15},{20, 15}}` when the scenario is first initialized (before init/init_file run).
If this is true, the map of the simulation is set to be a lab-tile checkerboard in the area of `{{-20, -15},{20, 15}}` when the scenario is first initialized (before init/init_file run).
hide_health_bars optional | :: boolean |
mute_technology_finished_sound optional | :: boolean |
mute_alert_sounds optional | :: boolean |
volume_modifier optional | :: float | Multiplier for the simulation volume set by the player in the sound settings.
Multiplier for the simulation volume set by the player in the sound settings.
override_volume optional | :: boolean | If true, overrides the simulation volume set by the player in the sound settings, simply setting the volume modifier to `1`.
If true, overrides the simulation volume set by the player in the sound settings, simply setting the volume modifier to `1`.
mute_wind_sounds optional | :: boolean | Overrides whether a simulation has its wind sounds muted. [...]
Overrides whether a simulation has its wind sounds muted. [...]
hide_factoriopedia_gradient optional | :: boolean |

checkboard optional | :: boolean | If this is true, the map of the simulation is set to be a lab-tile checkerboard in the area of `{{-20, -15},{20, 15}}` when the scenario is first initialized (before init/init_file run).
If this is true, the map of the simulation is set to be a lab-tile checkerboard in the area of `{{-20, -15},{20, 15}}` when the scenario is first initialized (before init/init_file run).
game_view_settings optional | :: GameViewSettings | Only applied to the simulation if a test player is created through LuaSimulation::create_test_player.
Only applied to the simulation if a test player is created through LuaSimulation::create_test_player.
generate_map optional | :: boolean | If `save` is not given and this is true, a map gets generated by the game for use in the simulation.
If `save` is not given and this is true, a map gets generated by the game for use in the simulation.
hide_factoriopedia_gradient optional | :: boolean |
hide_health_bars optional | :: boolean |
init optional | :: string | Only loaded if `init_file` is not defined. [...]
Only loaded if `init_file` is not defined. [...]
init_file optional | :: FileName | This code is run as a (silent) console command inside the simulation when it is first initialized. [...]
This code is run as a (silent) console command inside the simulation when it is first initialized. [...]
init_update_count optional | :: uint32 | Amount of ticks that this simulation should run for before the simulation is shown to the player. [...]
Amount of ticks that this simulation should run for before the simulation is shown to the player. [...]
length optional | :: uint32 | How long this simulation takes. [...]
How long this simulation takes. [...]
mods optional | :: array[string] | An array of mods whose runtime scripts will be loaded for this simulation, if they are present and enabled.
An array of mods whose runtime scripts will be loaded for this simulation, if they are present and enabled.
mute_alert_sounds optional | :: boolean |
mute_technology_finished_sound optional | :: boolean |
mute_wind_sounds optional | :: boolean | Overrides whether a simulation has its wind sounds muted. [...]
Overrides whether a simulation has its wind sounds muted. [...]
override_volume optional | :: boolean | If true, overrides the simulation volume set by the player in the sound settings, simply setting the volume modifier to `1`.
If true, overrides the simulation volume set by the player in the sound settings, simply setting the volume modifier to `1`.
planet optional | :: SpaceLocationID |
save optional | :: FileName | The save file that is used for this simulation. [...]
The save file that is used for this simulation. [...]
update optional | :: string | Only loaded if `update_file` is not defined. [...]
Only loaded if `update_file` is not defined. [...]
update_file optional | :: FileName | This code is run as a (silent) console command inside the simulation every time the simulation is updated. [...]
This code is run as a (silent) console command inside the simulation every time the simulation is updated. [...]
volume_modifier optional | :: float | Multiplier for the simulation volume set by the player in the sound settings.
Multiplier for the simulation volume set by the player in the sound settings.

## Properties

### planet :: SpaceLocationID optional

Default: `"nauvis"`

### game_view_settings :: GameViewSettings optional

Only applied to the simulation if a test player is created through LuaSimulation::create_test_player.

### save :: FileName optional

The save file that is used for this simulation. If not given and `generate_map` is `true`, a map is generated by the game.

### init_file :: FileName optional

This code is run as a (silent) console command inside the simulation when it is first initialized. Since this is run as a console command, the restrictions of console commands apply, e.g. `require` is not available, see here.

### init :: string optional

Default: `""`

Only loaded if `init_file` is not defined.

This code is run as a (silent) console command inside the simulation when it is first initialized. Since this is run as a console command, the restrictions of console commands apply, e.g. `require` is not available, see here.

### update_file :: FileName optional

This code is run as a (silent) console command inside the simulation every time the simulation is updated. Since this is run as a console command, the restrictions of console commands apply, e.g. `require` is not available, see here.

### update :: string optional

Default: `""`

Only loaded if `update_file` is not defined.

This code is run as a (silent) console command inside the simulation every time the simulation is updated. Since this is run as a console command, the restrictions of console commands apply, e.g. `require` is not available, see here.

### mods :: array[string] optional

An array of mods whose runtime scripts will be loaded for this simulation, if they are present and enabled.

### init_update_count :: uint32 optional

Default: `0`

Amount of ticks that this simulation should run for before the simulation is shown to the player. These updates happen after init/init_file has been run and at the highest possible rate (> 60 UPS).

### length :: uint32 optional

Default: `0`

How long this simulation takes. In the main menu simulations, another simulation will start after this simulation ends.

### generate_map :: boolean optional

Default: `false`

If `save` is not given and this is true, a map gets generated by the game for use in the simulation.

### checkboard :: boolean optional

Default: `true`

If this is true, the map of the simulation is set to be a lab-tile checkerboard in the area of `{{-20, -15},{20, 15}}` when the scenario is first initialized (before init/init_file run).

### hide_health_bars :: boolean optional

Default: `true`

### mute_technology_finished_sound :: boolean optional

Default: `true`

### mute_alert_sounds :: boolean optional

Default: `true`

### volume_modifier :: float optional

Multiplier for the simulation volume set by the player in the sound settings.

### override_volume :: boolean optional

If true, overrides the simulation volume set by the player in the sound settings, simply setting the volume modifier to `1`.

### mute_wind_sounds :: boolean optional

Overrides whether a simulation has its wind sounds muted.

Tips and Tricks simulations and Factoriopedia simulations have their wind sounds muted by default, other simulations don't.

### hide_factoriopedia_gradient :: boolean optional

Type used in

- PrototypeBase::factoriopedia_simulation
- TipsAndTricksItem::simulation
- UtilityConstants::main_menu_simulations