event_players (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:
    - mode1

queue_event_player:
    play:
      queue_event: queue_event1
      events_when_finished: queue_event1_finished

queue_relay_player:
    relay.1:
      post: relay_start
      wait_for: relay_done
    relay:
      post: relay2_start
      wait_for: relay2_done
    relay_with_args:
      post: relay_with_args_start
      wait_for: relay_with_args_done
      pass_args: True
#config_version=5

modes:
  - mode2

game:
  balls_per_game: 1

switches:
  s_ball:
    number:

coils:
  c_eject:
    number:

playfields:
  playfield:
    default_source_device: s_trough
    tags: default

ball_devices:
  s_trough:
    ball_switches: s_ball
    eject_coil: c_eject
    tags: trough, drain, home

random_event_player:
  test_machine_force_different:
    scope: machine
    force_different: true
    events:
      - event1
      - event2
      - event3
      - event4
  test_machine_force_all:
    scope: machine
    force_all: true
    events:
      - event1
      - event2
      - event3
      - event4
  test_machine_disable_random:
    scope: machine
    disable_random: true
    events:
      - event1
      - event2
      - event3
      - event4
#config_version=5

modes:
  - mode1

event_player:
    play_express_single: event1
    play_express_multiple: event1, event2
    play_single_list:
        - event1
    play_single_string:
        event1
    play_multiple_list:
        - event1
        - event2
        - event3
    play_multiple_string:
        event1
        event2
        event3
    play_multiple_args2:
        event1:
          a: b
          c: d
    play_multiple_args:
        event1: {"a": "b"}
        event2: {}
        event3: {"a": 1, "b": 2}
    test_conditional{arg.abc==1}: condition_ok
    test_conditional.2{arg.abc==1}: condition_ok2
    test_conditional.3: priority_ok
    test_time_delay1: td1|1500ms
    test_time_delay2: td2|1.5s
    test_conditional_mode{mode.mode1.active}: mode1_active
    test_conditional_mode{not mode.mode1.active}: mode1_not_active
    test_conditional_handlers:
        - event_always
        - event_if_modeactive{mode.mode1.active}
        - event_if_modestopping{mode.mode1.stopping}
    play_placeholder_event:
      - my_event_(machine.test)_123
    play_placeholder_args:
      loaded_event_int:
        foo:
          value: machine.testint
          type: int
      loaded_event_float:
        foo:
          value: machine.testfloat
          type: float
      loaded_event_bool:
        foo:
          value: machine.testbool
          type: bool
      loaded_event_string:
        foo:
          value: machine.teststring
          type: string
      loaded_event_notype:
        foo:
          value: machine.testnotype
    play_event_with_kwargs:
      - event_always
      - event_(name)
    play_event_with_param_kwargs:
      event_with_param_kwargs:
        foo:
          value: (result)
          type: string
        maths:
          value: 5 * (initial)
          type: int

shows:
  test_event_show:
    - events:
      - event1
      - event2
      - event3

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:
  game_mode: False

queue_relay_player:
    relay3:
      post: relay3_start
      wait_for: relay3_done
#config_version=5
mode:
  start_events: start_mode2
  stop_events: stop_mode2

random_event_player:
  test_player_force_different:
    force_different: true
    events:
      - event1
      - event2
      - event3
      - event4
  test_player_force_all:
    force_all: true
    events:
      - event1
      - event2
      - event3
      - event4
  test_player_disable_random:
    disable_random: true
    events:
      - event1
      - event2
      - event3
      - event4