Service Mode - Door Close Event Starts Attract Mode

32 views
Skip to first unread message

Greg Sealby

unread,
Feb 21, 2020, 9:16:49 AM2/21/20
to MPF Users

Hi all,

In my current config when I open the coin door the game starts Service Mode and when I close the coin door it stops service Mode.  This is all good.  When the coin door is closed it kicks off the attract mode.  This is fine when a game has not yet been started, but if the game is in progress it causes a problem as MPF then won't let the player start a game as there is already one in progress.  The game is stuck.

Has anyone got a way that they can share to avoid starting (or even restarting) Attract Mode when the coin door is closed?

Greg

jabdoa

unread,
Feb 21, 2020, 11:56:19 AM2/21/20
to MPF Users
The service mode should stop the current game. You should be able to start a new one afterwards. If this does not work out is a bug. Would you mind to create a minimal test case for this? We can then fix it and prevent it from happening again.

Jan

Greg Sealby

unread,
Feb 21, 2020, 3:06:50 PM2/21/20
to MPF Users
OK, so I've been looking at the logs to see what MPF actually does here and my above comment is slightly incorrect.  

When you open the coin door it does not start attract mode.  It simply posts the service_door_opened event and shows the first Service Mode slide.

It's not until you press the enter button on the service mode buttons that the game resets.  Here are the events:
2020-02-22 06:36:04,440 : INFO : SwitchController : <<<<<<< 's_service_enter' active >>>>>>>
2020-02-22 06:36:04,440 : INFO : EventManager : Event: ======'sw_service_enter_active'====== Args={}
2020-02-22 06:36:04,441 : INFO : EventManager : Event: ======'machine_var_audits_switches_s_service_enter'====== Args={'value': 116, 'prev_value': 115, 'change': 1}
2020-02-22 06:36:04,846 : INFO : service : Entered service mode. Resetting game if running. Resetting hardware interface now.
2020-02-22 06:36:04,880 : INFO : EventManager : Event: ======'mode_game_will_stop'====== Args={}
2020-02-22 06:36:04,880 : INFO : EventManager : Event: ======'mode_game_stopping'====== Args={}
2020-02-22 06:36:04,880 : INFO : EventManager : Event: ======'service_mode_entered'====== Args={}
2020-02-22 06:36:04,880 : INFO : EventManager : Event: ======'service_main_menu'====== Args={}
2020-02-22 06:36:04,881 : INFO : EventManager : Event: ======'service_menu_deselected'====== Args={}
2020-02-22 06:36:04,881 : INFO : EventManager : Event: ======'service_menu_show'====== Args={}
2020-02-22 06:36:04,881 : INFO : EventManager : Event: ======'service_menu_selected_switch'====== Args={}
2020-02-22 06:36:04,900 : INFO : SwitchController : <<<<<<< 's_service_enter' inactive >>>>>>>


The next slide is displayed off the service_mode_entered event.

I checked my Stern and Bally games, neither of these will stop and reset a game when the service mode is entered.  They interrupt for sure, but if you are halfway through a game you are allowed to carry on with that game after making the setting adjustment within the service mode.

Is there a particular reason that MPF performs a reset on any running games when service mode is entered?  If a player is halfway through a game and wants to change a brightness setting, for example, and then gets their score wiped by entering service mode that would be frustrating.  
Is there a config setting to toggle this reset function off/on?

Greg Sealby

unread,
Feb 21, 2020, 3:17:13 PM2/21/20
to MPF Users
Do you mean create a test like this tutorial: http://developer.missionpinball.org/en/dev/testing/tutorial/2.html ?

jabdoa

unread,
Feb 21, 2020, 10:20:19 PM2/21/20
to MPF Users
Either that or a single file test case which can be run via "mpf test". However, as you found this works as designed. Currently, we stop the game in service mode. We could definitely change that behavior. I guess we would have to stop timers and such when starting service. I decided to stop the game because it is slightly easier than stopping and resuming parts of the game. We can definitely change that behavior.


Jan

Greg Sealby

unread,
Feb 23, 2020, 7:29:36 PM2/23/20
to MPF Users
Hi Jan,

I don't think it needs to be that sophisticated.  As long as you can start the service mode, edit the most likely properties that a player will want to adjust mid-game (sound, light, flipper power etc) that will be fine.  It is generally accepted that if you start service mode while the ball is in motion you will lose your ball or if the ball is in play you will lose your timers (perhaps that could be a future feature).  Most of the time a player wants to start service mode between balls, or when they have a ball trapped on one of the flippers - when they have a chance to adjust something.

How would MPF deal with any game framework settings (like balls per game) that are adjusted mid-game?  Will take immediate affect or at the start of the next game?   

Greg

jabdoa

unread,
Feb 24, 2020, 2:09:09 PM2/24/20
to MPF Users
Totally possible to change. Guess it would not be too hard.

The time when settings are evaluated depends a bit on where they are used. A lot of devices would pick them up instantly. For instance a multiball would evaluate timeouts everytime when it starts.

Jan

Reply all
Reply to author
Forward
0 new messages