Warning

This is the dev documentation for an unreleased version of MPF!

This is the documentation for MPF 0.56+, which is the “dev” (next) release of MPF that is a work-in-progress. Unless you’re specifically looking for this version, you probably want to use the version of documentation called “latest” which is for the latest released version of MPF. That documentation is at docs.missionpinball.org/en/latest.

ball_routing (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
modes:
    - mode1

playfields:
    playfield:
        default_source_device: test_trough
        tags: default

coils:
    c_trough:
        number:
    c_device1:
        number:
    c_device2:
        number:
    c_device3:
        number:
    c_device4:
        number:

switches:
    s_ball_switch1:
        number:
    s_ball_switch2:
        number:
    s_device1:
        number:
    s_device2:
        number:
    s_device3:
        number:
    s_device4:
        number:

ball_devices:
    test_trough:
        eject_coil: c_trough
        ball_switches: s_ball_switch1, s_ball_switch2
        eject_targets: playfield
        tags: trough, drain, home
    test_device1:
        eject_coil: c_device1
        ball_switches: s_device1
        debug: True
        eject_targets: test_device2, test_device3
    test_device2:
        eject_coil: c_device2
        ball_switches: s_device2
        debug: True
        eject_targets: playfield
    test_device3:
        eject_coil: c_device3
        ball_switches: s_device3
        debug: True
        eject_targets: test_device4
    test_device4:
        eject_coil: c_device4
        ball_switches: s_device4
        debug: True
        eject_targets: playfield

Mode config examples

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

#config_version=5
ball_routings:
    route_to_ball_device2:
      source_devices: test_device1
      target_device: test_device2
      debug: True
      enable_events: route_to_2
      disable_events: route_to_4, no_route
    route_to_ball_device4:
      source_devices: test_device1
      target_device: test_device4
      debug: True
      enable_events: route_to_4
      disable_events: route_to_2, no_route


multiball_locks:
   lock1:
      balls_to_lock: 1
      lock_devices: test_device4
      enable_events: lock_enable
      disable_events: lock_disable
      debug: true