mpf icon indicating copy to clipboard operation
mpf copied to clipboard

Physically compensate balls in multiball_locks on ball start

Open jabdoa2 opened this issue 5 years ago • 6 comments

If the device in the lock has a path to the trough compensate from it at player turn start time before ejecting a ball to the playfield.

jabdoa2 avatar Dec 31 '18 14:12 jabdoa2

I would really like to try and solve this issue. but let me make sure I understand it since I have a very casual knowledge of pinball. Once you hit all of the required ball locks for a multiball all of the paths to the trough will be blocked off for enough time to allow balls to get past the trough and then the paths will open again.

while looking at the multiball_lock.py and doing background research I have a few questions: The trough is the the part at the bottom of the machine that leads the ball out of play? What part of the Pin Ball machine would block the trough?

Sorry for the long post and thanks for your time

evilmopey avatar Oct 12 '19 06:10 evilmopey

Hi evilmopey,

Pinball machines are multiplayer machines. Every player has multiple ball (usually 3) and player take turns (player 1 ball 1, player 2 ball 1, player 1 ball 2 and so on). Consider a machine with a lock (called multiball_lock in MPF) which will give you some multiball. If you lock a ball on your first ball and then your loose your (new) ball before starting the multiball the ball will still be physically there for the next player. There are multiple strategies about what happens when the next player completes the lock and starts the multiball leaving you with an empty lock on your next ball (see http://docs.missionpinball.org/en/dev/game_logic/multiballs/multiball_locks.html for the four strategies in MPF). If you selected the "virtual_only" strategy MPF will give you a multiball nontheless and compensate the missing balls from the trough (where the balls which are not in play are stored below the apron: http://docs.missionpinball.org/en/dev/mechs/troughs/index.html). In some machines it is physically possible to "feed" a ball from the trough (via the launcher http://docs.missionpinball.org/en/dev/mechs/plungers/index.html) directly into the lock (often via a controllable diverter http://docs.missionpinball.org/en/dev/mechs/diverters/index.html). MPF knows how to route those balls (if there is a route). The lock has to request a ball in this case (via a ball_device.request_ball() call to the lock ball device). Makes sense? Let me know if anything is unclear.

jabdoa2 avatar Oct 14 '19 16:10 jabdoa2

Thank you for the detailed response it really helped me gain clarity. The one area I am still confused about is how min_virtual_physical differs from physical?

P.S. I am working on the solution and will submit a pull request this weekend.😄

evilmopey avatar Oct 17 '19 17:10 evilmopey

The four counting strategies are a bit tricky but each of them was used in a certain area of pinball machines. min_virtual_physical = locked ball are counted virtually. If another player steals a ball physically you have to relock them (mostly because the machine does not have an auto launcher). However, this does not allow stealing balls. Physical = physical balls are equivalent to locked balls. This allows ball stealing.

jabdoa2 avatar Oct 21 '19 05:10 jabdoa2

I submitted a pull request last night I look forward to any feed back.

evilmopey avatar Oct 22 '19 19:10 evilmopey

Can't find the PR. Can you post a link to the PR or to your branch?

jabdoa2 avatar Oct 22 '19 19:10 jabdoa2