Reusing Shots Across Modes With Different Profiles

16 views
Skip to first unread message

atum

unread,
May 21, 2020, 4:48:38 PM5/21/20
to MPF Users
All,

I want to ask a question early enough in the process before I regret it later on!  There are many places in the documentation that allude to the fact that you can use a shot in multiple different modes, with multiple different priorities.  e.g., http://docs.missionpinball.org/en/dev/config/shots.html under profile:. I want to make sure I am doing this optimally.

I have similar shots, like a left_orbit that I want to use in multiple cases, and depending on the mode, I might want it on/off/flash, etc.  I have it working so that my priority mode controls the light and hit events for that shot.  But in order to do this I am setting up the shot multiple times with prefixes and profiles in each mode to control that.  For example:

mode_base:
shots:
    left_orbit:
        profile: base_profile

mode_first_mode:
shots:
    first_mode_left_orbit:
        profile: first_mode_profile

mode_second_mode:
shots:
    second_mode_left_orbit:
        profile: second_mode_profile

Is there any way to define this better so that I am not constantly having to redefine the same shots and switches in ever mode for which I want to use this?  Can I define a shot one time, but apply a profile in different modes?  When I try this I get an error about that I cannot overload.  So I am guessing that answer is no, but want to make sure, so that I don't create excessive overhead if there is a better way.

Thanks!

Avery

jabdoa

unread,
May 21, 2020, 5:52:26 PM5/21/20
to MPF Users
We actually had this until MPF 0.33. Unfortunately it caused a lot of confusion and subtle bugs that we removed it in 0.50. This might come back in the form of prototype objects at some point.

Jan

atum

unread,
May 21, 2020, 6:03:14 PM5/21/20
to MPF Users
Jan,

Makes sense.  This way is very straight forward, just a lot of typing to make sure all of my shot sequences, etc. match everywhere when I recreate them.

I will continue as I have with creating new shots with a prefix for each mode, and then assign the profile for that mode.  Then toggle mode start and end events/priorities to make sure the right thing is posting and lights displaying at that point in time.

As always, thanks for the quick reply!

Avery
Reply all
Reply to author
Forward
0 new messages