MPF 0.80 changes (GMC pre-release)
Last updated May 25, 2024
The upcoming release of MPF is 0.80, which includes support for the Godot Media Controller (GMC) and drops support for the 0.57 Kivy-based Media Controller (MC).
While there are not many functional changes in MPF between 0.57 and 0.80, there are some config file migrations necessary and this document will help you through that.
See also: Installing MPF 0.80 and the GMC
List of Required Changes
Bonus
The bonus config spec has changed to use the keyword entry
instead of event
when defining bonus entries, because Bonus events have changed to use a consolidated bonus_entry event instead of unique events for each bonus item (including subtotal, multiplier, and total).
In your bonus.yaml config section, change each entry from event: bonus_item_name
to entry: bonus_item_name
.
With this change, given a bonus entry named "completed_ramps" that was hit 3 times for a score of 3000:
MPF 0.57 Event:
completed_ramps{hits=3, score=3000}
MPF 0.80 Event:
bonus_entry{entry="completed_ramps", hits=3, score=3000}
Carousel
Carousel events have changed to use a consolidated item_highlighted event instead of unique events for each item.
Given a carousel mode "missionselect" and an item "garrus":
MPF 0.57 Event:
missionselect_garrus_highlighted{direction="forwards"}
MPF 0.80 Event:
item_highlighted{carousel="missionselect", item="garrus", direction="forwards"}
The new item_highlighted event is incorporated into GMC, but if you have other custom event handlers for carousel item selection those will need to be updated.
Slides and Widgets
The GMC manages all slides and widgets, so the slides:
and widgets:
config sections are deprecated.
Sound Player
The GMC manages all sound assets, so the sound_system:
and sounds:
config sections are deprecated. You can still reference sounds by filename directly, but if you want to specify specific settings for a sound or sound pool, use the MPFSoundAsset
resource type in GMC.
Audio channel groups have been renamed from "tracks" to "buses", so in your sound_player:
config sections change track: music
to bus: music
.
Sound Pools
The GMC includes support for sound pools using the AudioStreamRandomizer
resource type. You can combine this sound pool with MPF-specific sound properties by creating an MPFSoundAsset
resource and using an AudioStreamRandomizer
as the stream.
Using MPF Sound Pools
If you have a large project with many sound_pools:
defined in MPF configs, it is possible to continue using them until you migrate them to GMC. This hack is not officially supported, and may have unintended side-effects, so use with caution.
To enable sound pools in config files, you will need to install the legacy MPF-MC in your virtual environment with pip install mpf-mc
. This will cause the MC to inject the sound pool configurations into MPF 0.80
Note: While MPF will manage the sound pools, it will not be able to map sound pool sound names to files configured in a sounds:
config section (which is no longer supported). Your sound pools *must use the name of the sound file as the sound name or GMC will not be able to find the correct file.
Something missing or wrong? You can fix it!
This website is edited by people like you! Is something wrong or missing? Is something out of date, or can you explain it better?
Please help us! You can fix it yourself and be an official "open source" contributor!
It's easy! See our Beginner's guide to editing the docs.
Page navigation via the keyboard: < >
You can navigate this site via the keyboard. There are two modes:
General navigation, when search is not focused:
- F , S , / : open search dialog
- P , , : go to previous page
- N , . : go to next page
While using the search function:
- Down , Up : select next / previous result
- Esc , Tab : close search
- Enter : go to highlighted page in the results