Please participate in the MPF User Survey 2018.
Config file section
|Valid in machine config files||YES|
|Valid in mode config files||NO|
player_vars: section of your machine-wide config file lets you
specify the initial state of player variables that are set for a player
when the game starts.
#config_version=5 player_vars: some_var: initial_value: 4 some_float: initial_value: 4 value_type: float some_string: initial_value: 4 value_type: str some_other_string: initial_value: hello value_type: str # required for non-ints machine_vars: test1: initial_value: 4 value_type: int test2: initial_value: '5' value_type: str # below is the min config we need to be able to start a game game: balls_per_game: 3 coils: eject_coil1: number: eject_coil2: number: switches: s_start: number: tags: start s_ball_switch1: number: s_ball_switch2: number: s_ball_switch_launcher: number: playfields: playfield: default_source_device: bd_launcher tags: default ball_devices: bd_trough: eject_coil: eject_coil1 ball_switches: s_ball_switch1, s_ball_switch2 debug: true confirm_eject_type: target eject_targets: bd_launcher tags: trough, drain, home bd_launcher: eject_coil: eject_coil2 ball_switches: s_ball_switch_launcher debug: true confirm_eject_type: target eject_timeouts: 2s
Each subsection in the
player_vars: section is the name of a player
variable to set. Then there are two sub-settings under there:
The initial value of this player variable that you’re setting. This is set when the player is created.
Select one of the options from this list:
str (string). The default is “int”, and there is no intelligence to
try to detect which type of value you have, so if you have a floating
point number or a string, you also need to set the value_type.