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


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.

#config_version=5
mode:
  game_mode: False

queue_relay_player:
    relay3:
      post: relay3_start
      wait_for: relay3_done