mode_tests (example config files)¶
Machine config examples¶
Here are some example machine-wide config files that show real-world examples of how these configs are used.
Note that there are multiple machine config examples here. They’re just included to show different options. You wouldn’t actually use more than one.
#config_version=5
modes:
# empty mode section
#config_version=5
modes:
- invalid
- mode2
#config_version=5
modes:
- mode_restart_on_next_ball
#config_version=5
modes:
- mode1
- mode2
- mode3
- mode4
#config_version=5
modes:
- mode2
- broken_mode
#config_version=5
modes:
- mode_without_config
#config_version=5
modes:
- broken_mode2
- mode2
Mode config examples¶
Here are some example mode config files that go along with the machine-wide config above.
Note that there are multiple mode config examples here. You might not necessarily use more than one in your machine.
#config_version=5
mode:
start_events: start_mode4
use_wait_queue: True
game_mode: False
#config_version=5
event_player:
test: test2
#config_version=5
mode:
invalid_key: crap
#config_version=5
mode:
stop_events: stop_mode2
stop_priority: 2
restart_on_next_ball: true
#config_version=5
mode_settings:
test: 123
#config_version=5
mode:
start_events: start_mode1
stop_events: stop_mode1
priority: 200
start_priority: 1
stop_on_ball_end: false
game_mode: False
mode_settings:
this: true
config:
- test.yaml
#config_version=5
mode_settings:
test: 123
#config_version=5
mode:
start_events: start_mode5
stop_events: stop_mode5
priority: 200
start_priority: 1
stop_on_ball_end: false
game_mode: False
mode_settings:
this: true
config:
- test.yaml
#config_version=5
mode_settings:
test: 123
#config_version=5
mode:
start_events: start_mode8
stop_events: stop_mode8
priority: 200
start_priority: 1
stop_on_ball_end: false
game_mode: False
mode_settings:
this: true
config:
- test.yaml
#config_version=5
mode:
start_events: start_mode7
stop_events: stop_mode7
priority: 200
start_priority: 1
stop_on_ball_end: false
game_mode: False
mode_settings:
this: true
config:
- test.yaml
#config_version=5
mode_settings:
test: 123
#config_version=5
mode:
start_events: start_mode6
stop_events: stop_mode6
priority: 200
start_priority: 1
stop_on_ball_end: false
game_mode: False
mode_settings:
this: true
config:
- test.yaml
#config_version=5
mode_settings:
test: 123
your_machine_folder/mode_tests/modes/mode_restart_on_next_ball/config/mode_restart_on_next_ball.yaml¶
#config_version=5
mode:
start_events: start_mode_restart_on_next_ball
restart_on_next_ball: True
from mpf.core.mode import Mode
class Mode3(Mode):
def mode_init(self):
self.custom_code = True
def mode_start(self, **kwargs):
pass
def mode_stop(self, **kwargs):
pass
#config_version=5
mode:
code: mode3.Mode3