This is the documentation the latest work-in-progress 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. This is probably ok, and means you’ll be on the latest, cutting-edge version of MPF.
However, if you want a more stable version, select the
v:stableversion from the lower-left corner of this page, which is the most recent version that is not getting new updates.
If you are new to MPF, we have recently rewritten the installation process which only applies to this “latest” 0.56, so you probably want to stay here because the prior installation process doesn’t work on the latest OS and Python versions.
Most (potentially all) of your game logic can be configured in the MPF config files. For classical language programmers new to MPF, an introduction to how the framework handles logical decisions may be helpful. All game logic is tied to event posts. Mostly, this is achieved through config file programming of timers, shots, counters, multiballs, accruals, etc…. These prebuilt modules (listed below) listen for events to be posted then read the state of the hardware and/or perform manipulations on player or device variables. In turn these modules issue their own event posts which drive the behavior or other modules and devices to start and stop modes, control diverts, set bonus multipliers and everything else game related.
A question beginners may have is “How do I tell MPF to perform an action when two or more conditions are met simultaneously?” In an event driven framework this is not the correct way to conseptualize the logic. Again, nothing game related happens without being driven by a posted event. Because events only exist as a descrete moments in time, it does not work to attempt (pseudocode) logic such as IF event1 and event2 then post event3. Nevertheless, MPF provides a flexible and robust mechanism for performing logic on events. This is where Conditional Events come in.
In brief, the the way conditional events work is by telling MPF to process a particular event if and only if additional conditions are met. These conditions (listed inside curly brackets) can relate to player variables (such as score) machine variables (such as credit) or device variables (such as timer ticks or number of balls locked). See <conditional/index> for specific examples.
With this flexibility in mind, Here is a list of pre-built game logic modules containing the description, how to guides, links to tutorials, event listings, and configuration
Most of the “How To” guides for these sections still need to be written.
- Ball Holds
- Ball Locks
- Ball Saves
- Ball Search
- Ball Start and End Behaviour
- Ball Tracking
- Coins & Credits
- Combo Switches
- Extra Balls
- High Scores
- Logic Blocks
- Match Mode
- Player Variables
- Timed Switches
- Service Mode
- Skill Shot
- Video Modes