MPF config file reference: FAST Pinball autofire coils¶
MPF 0.57 Configuration Reference for FAST Pinball Hardware
This page is parrt of the reference material for users of the Mission Pinball Framework and FAST Pinball hardware. If you're new to MPF and FAST, read the MPF + FAST overview first. If you are a programmer writing your own software, see our Developer's Reference Guide.
Note that this guide only applies to MPF 0.57. If you're using MPF 0.56 or older, then the FAST Pinball configuration section of the Mission Pinball website has everything you need.
This guide explains how to configure autofire devices in MPF when using FAST Pinball hardware. (An autofire device is a hardware-activated switch+coil combination, like a slingshot or pop bumper.) The FAST Pinball hardware platform has the ability to automatically activate drivers (coils) when a switch is activated, meaning there is no lag time between the switch hit and the coil activation.
When MPF loads, it reads in the
autofire_coils: sections of your config file and automatically configures the FAST hardware autofire features. (MPF will subsequently enable and disable these rules as needed, activating them when the ball starts, deactivating them when the ball ends and during tilt, etc.)
Flippers are autofire devices too, but covered in their own guide
Flippers are also autofire devices, but they're covered in their own guide since they are more complicated than simple pop bumpers or slingshots.
Which switches can control which coils?¶
If you're using a FAST Pinball Neuron Controller, any switch in the machine can be configured to control any coil. They do not have to be on the same I/O board. (This is nice because you'll typically have your flipper buttons connected to the cabinet I/O board but the flipper coils and their EOS switches will be connected to a playfield I/O board.)
If you're using a FAST Nano Controller, only the first 8 switches (switch numbers 0-7 from the first I/O board in the loop) can control any coil. Otherwise the switch and coil combination must be on the same I/O board. (MPF will enforce this.)
For all FAST hardware, a single switch can be used to trigger multiple coils, which typically happens with flippers (both in cases where you have more than two flippers in a machine, and also for dual-wound flippers where the flipper button will enable both the main and hold windings.)
Configuring autofire coils in MPF¶
Let's start with autofire coils, which are simpler than flippers. An autofire coil would be something like a pop bumper or slingshot.
Here are the relevant sections of the MPF config file we'll use for this example:
This configuration should be pretty straightforward. If you have questions about anything you see above, refer to the FAST MPF config reference for switches or coils, or the Mission Pinball website documentation for autofire_coils.
Remember that MPF knows when to enable and disable the autofire devices based on what's happening in the machine and will handle all the details for you.
Dialing in your autofire performance¶
There's an art to dialing in the performance of your autofire devices, as there are several things you can tweak which will change the behavior of things. Here are the most relevant settings:
default_pulse_ms: setting is the pulse time for the coil which can be thought of as the "strength" of the coil. However there's an upper limit to this, as any amount of time the coil is active after it has traveled to its full position will not make it stronger or faster, rather it will just add heat. (e.g. if your coil fully activates in 14ms, then a setting of 15, 16, or 20ms won't make it any stronger or faster, it will just hold the coil on longer.) That said, sometimes the ball position will affect how long the coil needs to be active to get the desired result, so you'll ultimately end up playing a lot of pinball and adding or subtracting time in single ms increments until it feels right.
recycle_ms: setting is the amount of time the coil will be disabled after it has been activated. This setting is really more about protecting the coil from overheating. (Heat increases resistance which decreases the amount of power the coil receives and makes it weaker overall.)
Proper recycle times can help prevent cheating!
Classic Bally/Williams WPC machines don't use recycle time, meaning a coil can be activated over and over again with no gaps. Pro players know this, and are able to sort of "vibrate" the flipper buttons really quick to cause the flipper main windings to activate almost constantly while they're doing that. This is a technique that can be used to starve the machine of power (since those main windings take so much power but they're only meant to be on for very short periods). So if you have a situation where a VUK or some other device ejects the ball into a slingshot or SDTM, a player can quickly hit the flipper buttons to keep the main winding active which starves the machine of power, leading to a weak eject and a modified ball path. Adding a recycle time to your autofire coils can help prevent this.
We like a rule of thumb of 2x the pulse time as a starting point for your recycle time, and then again you can adjust from there based on feel.
debounce_open: & debounce_close:¶
Dialing in your debounce settings does a few things. First, it prevents "machine gunning" which is that situation where the device activates over and over, often because the vibration of the coil causes the switch to bounce. Second, debounce settings help prevent multiple activations from a single switch hit, like when the ball hits the slingshot and it registers 2 or 3 hits (and subsequent scoring).
A lot of people think about debounce as "lag", e.g. how long does the switch have to stay in the active state before the coil activates. While that's certainly true, don't sweat trying to minimize the lag too much. Average human reaction time to visual stimuli is 200-300ms, and even the most dialed in players are still around 100ms. So whether your debounce settings are 2ms or 4ms or 6ms isn't going to matter in a noticeable way.
What WILL matter is how much physical switch tuning you need to do! We've been to shows where pinball makers spent the whole weekend trying to adjust a problematic switch that wasn't working reliably, and it turned out that the switch was fine, it was just that the debounce settings were too low and the switch was bouncing. So if you're having switch issues, try increasing your debounce settings first before you start messing with the switch itself.
Opto switches bounce too
Some people believe that opto switches are "less bouncy" that mechanical leaf switches. This is simply not true. When the opto switch is being activated, there's a moment on the cusp of active / inactive where that switch will bounce just like a mechanical switch. So if you're having switch issues, don't forget that optos need to be tuned too.
Physical switch tuning¶
All that said, how well your physical switches are adjusted will absolutely affect the feel of the game. So if you can't get an autofire switch/coil combo dialed in, don't forget to take a peek at the actual switch and make sure it's adjusted properly.
Customizing autofire coil behavior¶
When configuring an autofire coil in MPF, you can add additional coil settings which will overwrite the defaults configured in the
coils: section of your config file. For example, you can add a
pulse_ms: setting to the autofire coil to change the pulse time for that coil when that autofire rule is enabled. (Maybe you want a mode where the slingshots are weak?)
Here's what that might look like:
In the above example, if you enable the regular slingshots, they'll pulse with their default 20 and 21ms pulse times. But if you disable those and enable the weak slings, they'll pulse with a 10ms pulse time. (See the MPF documentation for guidance on how to enable and disable autofire coils. You'd end up using
disable_events: entries and then tying those events into your game logic.)
N or > jump the next page, P or < for previous, search with S or ?