achievement (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.

#config_version=5

switches:
    test:
        number:

lights:
  led1:
    number:
  led2:
    number:
  led4:
    number:
  led5:
    number:
  led6:
    number:

modes:
  - base

shows:
  achievement1_enabled:
    - time: 1
  achievement1_started:
    - time: 1
  achievement1_completed:
    - time: 1
  achievement1_disabled:
    - time: 1
  achievement1_stopped:
    - time: 1

  achievement2_disabled:
    - time: 1
      lights:
        (led): off
  achievement2_enabled:
    - time: 1
      lights:
        (led): yellow
  achievement2_started:
    - time: 1
      lights:
        (led): green
  achievement2_stopped:
    - time: 1
      lights:
        (led): red
  achievement2_completed:
    - time: 1
      lights:
        (led): blue

Mode config examples

Here are some example mode config files that go along with the machine-wide config above.

#config_version=5
mode:
    start_events: ball_starting
    priority: 100

achievements:
  achievement1:
    start_events: achievement1_start
    stop_events: achievement1_stop
    enable_events: achievement1_enable
    disable_events: achievement1_disable
    complete_events: achievement1_complete
    reset_events: achievement1_reset
    show_when_disabled: achievement1_disabled
    show_when_enabled: achievement1_enabled
    show_when_started: achievement1_started
    show_when_stopped: achievement1_stopped
    show_when_completed: achievement1_completed
    restart_on_next_ball_when_started: True

  achievement2:
    start_events: achievement2_start
    stop_events: achievement2_stop
    enable_events: achievement2_enable
    disable_events: achievement2_disable
    complete_events: achievement2_complete
    reset_events: achievement2_reset
    events_when_started: test_event, test_event2
    show_when_enabled: achievement2_enabled
    show_when_started: achievement2_started
    show_when_completed: achievement2_completed
    restart_after_stop_possible: False
    enable_on_next_ball_when_enabled: False
    show_tokens:
      led: led1

  achievement3:
    start_events: achievement3_start
    stop_events: achievement3_stop
    enable_events: achievement3_enable
    disable_events: achievement3_disable
    complete_events: achievement3_complete
    reset_events: achievement3_reset
    events_when_started: test_event, test_event3
    show_when_disabled: achievement_disabled
    show_when_enabled: achievement_enabled
    show_when_started: achievement_started
    show_when_stopped: achievement_stopped
    show_when_completed: achievement_completed
    restart_after_stop_possible: False

  achievement4:
    start_events: achievement4_start
    stop_events: achievement4_stop
    enable_events: achievement4_enable
    disable_events: achievement4_disable
    complete_events: achievement4_complete
    reset_events: achievement4_reset
    show_when_disabled: achievement_disabled
    show_when_enabled: achievement_enabled
    show_when_started: achievement_started
    show_when_stopped: achievement_stopped
    show_when_completed: achievement_completed
    show_when_selected: achievement_selected
    show_tokens:
          led: led4

  achievement5:
    start_events: achievement5_start
    stop_events: achievement5_stop
    enable_events: achievement5_enable
    disable_events: achievement5_disable
    complete_events: achievement5_complete
    reset_events: achievement5_reset
    events_when_started: test_event, test_event5
    show_when_disabled: achievement_disabled
    show_when_enabled: achievement_enabled
    show_when_started: achievement_started
    show_when_stopped: achievement_stopped
    show_when_completed: achievement_completed
    show_when_selected: achievement_selected
    show_tokens:
          led: led5

  achievement6:
    start_events: achievement6_start
    stop_events: achievement6_stop
    enable_events: achievement6_enable
    disable_events: achievement6_disable
    complete_events: achievement6_complete
    reset_events: achievement6_reset
    events_when_started: test_event, test_event6
    show_when_disabled: achievement_disabled
    show_when_enabled: achievement_enabled
    show_when_started: achievement_started
    show_when_stopped: achievement_stopped
    show_when_completed: achievement_completed
    show_when_selected: achievement_selected
    show_tokens:
          led: led6

  achievement7: {}

  achievement8: {}

  achievement9: {}

  achievement10: {}

  achievement11: {}

  achievement12:
    enable_events: enable_achievements

  achievement13:
    enable_events: enable_achievements

achievement_groups:
    group1:
        achievements: achievement7, achievement8, achievement9
        auto_select: true

    group2:
        achievements: achievement4, achievement5, achievement6
        enable_events: group2_enable
        disable_events: group2_disable
        start_selected_events: group2_start
        select_random_achievement_events: group2_random
        rotate_right_events: group2_rotate_right
        rotate_left_events: group2_rotate_left

        disable_while_achievement_started: False
        enable_while_no_achievement_started: False

        events_when_all_completed: group2_complete
        events_when_no_more_enabled: group2_no_more
        events_when_enabled: group2_enabled

        show_when_enabled: group2_show
        show_tokens:
          led: led2

    group3:
        achievements:
          achievement10
          achievement11
          achievement12
          achievement13
        auto_select: yes

shows:
  group2_show:
    - duration: .1
      lights:
        (led): red
    - duration: .1
      lights:
        (led): blue
  achievement_enabled:
    - duration: 1
      lights:
        (led): yellow
  achievement_disabled:
    - duration: 1
      lights:
        (led): off
  achievement_completed:
    - duration: 1
      lights:
        (led): blue
  achievement_started:
    - duration: 1
      lights:
        (led): green
  achievement_stopped:
    - duration: 1
      lights:
        (led): red
  achievement_selected:
    - duration: 1
      lights:
        (led): orange