Jump to content



Photo
- - - - -

Updating Fullscreen Tables to Use the Nanotech Plunger


  • Please log in to reply
67 replies to this topic

#61 rooter

rooter

    Enthusiast

  • Members
  • PipPipPip
  • 111 posts

  • Flag: United States of America

  • Favorite Pinball: Theater of Magic

  • 360 Gamer Tag: root88

Posted 25 June 2012 - 10:12 PM

QUOTE (koadic @ Jun 24 2012, 03:24 PM) <{POST_SNAPBACK}>
QUOTE (rooter @ Jun 24 2012, 01:37 PM) <{POST_SNAPBACK}>
Is there a way to make a plunger release acts as a launch button on VP tables that don't have a normal plunger? I just want a plunger pull and release to act as if the enter key has been tapped. Having one control to launch the ball in all games will keep things simple for my users.


Sure, but you will have to edit the script in the tables you want to change...

I assume you don't want to disable the analog features, just use the plunger as a launch button when the table requires....

Instructions:
Add a plunger object named 'Plunger' to the table you want to mod, and place it somewhere off of the table. Set the timer interval to 40 and make sure you enable it.
Open the script in the editor, scroll to the very bottom after the last 'End Sub', and add the following:
CODE
Dim PlungerPos, PlungerPos2

Sub Plunger_Timer
    If Plunger.Position = 0 and PlungerPos2 > 5 Then PlungerIM.AutoFire : PlungerPos = 0
    PlungerPos2 = PlungerPos : PlungerPos = Plunger.Position
End Sub


This will allow to not shoot the ball with a slow release of the plunger (in case it was pulled by mistake, say by the wrong player), but allow a fire if pulled back 20% and released quickly.

Of course, this is only theory as I have not tested it, but it is adapted from my version of the analog plunger utilizing an impulse plunger, so I have no reason to believe it won't work.

EDIT: Another option is to utilize the MagnaSave buttons if you have them and use those as a plunger button, then just go into the script and find the 'keydcode=plungerkey' in the keydown and keyup subs, and replace it with 'keycode=leftmagnasave or keycode=rightmagnasave'


That worked like a charm, thank you!

Now if I could only get the plunger to work correctly on some tables with a normal plunger, like Addams Family. Edit: solution is here.

Edited by rooter, 26 June 2012 - 12:17 AM.


#62 Noah Fentz

Noah Fentz

    'Rasslin' Fan

  • VPF Administrator
  • 12,271 posts
  • Location:South Lyon, MI

  • Flag: United States of America

  • Favorite Pinball: Whitewater

  • PS3 Gamer Tag: noahfentz


Contributor

Posted 26 June 2012 - 12:56 AM

Just a head's up ...

If you want a better range for skill shots, increase the Stroke Length (you will need to reposition the plunger object afterward) and adjust the Break Over Velocity.

Break Over Velocity is the minimum speed the plunger has to move after release for it to shoot at full power.

IdleReel.gif RumbleDMD.jpg HS2-DMD.jpg SBM.jpg ww_logo.jpg EK.jpg

 
T2.jpg Sorcerer.jpg Breakshot.jpg Firepower.jpg GorGar.jpg StarTrek.jpg


My Photobucket Resources
Whether You Believe You Can, Or You Can't, You Are Right." - Henry Ford
The future of pinball lives, it just needs to be nurtured!
If you're here to stab me in the back, you're going to have to get in line.


#63 rooter

rooter

    Enthusiast

  • Members
  • PipPipPip
  • 111 posts

  • Flag: United States of America

  • Favorite Pinball: Theater of Magic

  • 360 Gamer Tag: root88

Posted 28 June 2012 - 12:13 AM

QUOTE
QUOTE

Sure, but you will have to edit the script in the tables you want to change...

I assume you don't want to disable the analog features, just use the plunger as a launch button when the table requires....

Instructions:
Add a plunger object named 'Plunger' to the table you want to mod, and place it somewhere off of the table. Set the timer interval to 40 and make sure you enable it.
Open the script in the editor, scroll to the very bottom after the last 'End Sub', and add the following:
CODE
Dim PlungerPos, PlungerPos2

Sub Plunger_Timer
    If Plunger.Position = 0 and PlungerPos2 > 5 Then PlungerIM.AutoFire : PlungerPos = 0
    PlungerPos2 = PlungerPos : PlungerPos = Plunger.Position
End Sub


This will allow to not shoot the ball with a slow release of the plunger (in case it was pulled by mistake, say by the wrong player), but allow a fire if pulled back 20% and released quickly.

Of course, this is only theory as I have not tested it, but it is adapted from my version of the analog plunger utilizing an impulse plunger, so I have no reason to believe it won't work.


That worked like a charm, thank you!

Now if I could only get the plunger to work correctly on some tables with a normal plunger, like Addams Family. Edit: solution is here.


I already posted this, but it disappeared somehow, so I am readding...

I guess I spoke too soon. This code works for me most of the time and does not work for my friend most of the time. I'm not sure what we are doing differently, but it is pretty consistent. It is definitely not caused from pulling the plunger less than 20% of the way. It will sometime fail when the plunger has been pulled 100% of the way out. Here is a video of the plunger randomly working:



I'm going to give

If Plunger.Position = 0 and PlungerPos2 > 1 Then PlungerIM.AutoFire : PlungerPos = 0

a try and see if that gives better results.


Update: Changing to PlungerPos2 > 1 gave 99% accuracy. I don't think an accidental hit of the plunger would be a big problem anyway.

Thanks

Edited by rooter, 28 June 2012 - 12:24 AM.


#64 koadic

koadic

    Pinball Fan

  • VIP
  • 1,363 posts
  • Location:Omaha, NE, USA

  • Flag: United States of America

  • Favorite Pinball: Addams Family/Fish Tales/Medieval Madness



Contributor

Posted 28 June 2012 - 10:57 AM

QUOTE (rooter @ Jun 27 2012, 07:13 PM) <{POST_SNAPBACK}>
I already posted this, but it disappeared somehow, so I am readding...

I guess I spoke too soon. This code works for me most of the time and does not work for my friend most of the time. I'm not sure what we are doing differently, but it is pretty consistent. It is definitely not caused from pulling the plunger less than 20% of the way. It will sometime fail when the plunger has been pulled 100% of the way out. Here is a video of the plunger randomly working:



I'm going to give

If Plunger.Position = 0 and PlungerPos2 > 1 Then PlungerIM.AutoFire : PlungerPos = 0

a try and see if that gives better results.


Update: Changing to PlungerPos2 > 1 gave 99% accuracy. I don't think an accidental hit of the plunger would be a big problem anyway.

Thanks


It's probably more of an issue with the plunger reaching 0 than it not reading above 5... especially if the park position of the plunger is kept at the .1666667 (which translates to 4 of 25), although I don't know why changing PlungerPos2 would be of much help... If you continue having issues with that other 1% of the time, try changing the line to something like:
CODE
If Plunger.Position < 5 and PlungerPos2 > 10 Then PlungerIM.AutoFire : PlungerPos = 0


#65 ArcadiusMaximus

ArcadiusMaximus

    Quit throwing trash into my dimension !

  • Members
  • PipPipPip
  • 310 posts
  • Location:PITZBORG, PA

  • Flag: United States of America

  • Favorite Pinball: Attack from Mars, Scared Stiff, White Water

Posted 01 August 2012 - 07:24 PM

QUOTE (koadic @ May 13 2012, 06:04 PM) <{POST_SNAPBACK}>
More Consistency = More Enjoyment

This may be viewed as a step backwards by some, but I have found the Impulse Plunger to be better than the standard Plunger object implementation when controlled by the analog (nanotech or other) plunger. It is almost always more consistent, the strength will always match up with the digital plunger from the same position, and there are no issues if the 'Enable Mechanical Plunger' box remains unchecked as it works regardless. I came to this conclusion after about an hour or so getting the nanotech plunger working to control an impulse plunger (on Twilight Zone before I knew what the bugs were that were causing the issues) and have since tried it on a couple other tables reaching similar conclusions.

I am not trying to say that the plunger object doesn't have a place, I am just personally tired of messing around with all the settings (especially break over velocity) to try and get it to behave properly and consistently. When using a gamepad, sometimes if I don't release the stick cleanly, it completely fouls up the strength of the shot, other times it messes up all on its own, which diminishes my enjoyment. In a perfect world, everything would work perfectly, but this isn't the case, so in lieu of finding that perfect solution I have settled for a more consistent one.

I know opinions will differ, I am just putting this out there in case someone has the same opinion as me.

If the table already has an Impulse plunger defined, it is fairly easy to implement too with only a few additions. In addition to the code in the first post (quoted below), I will add my additions in RED

QUOTE
Wall Technique

1. Create collection called PlungerWalls (P1-P13)
CODE
Dim xx,PlungerPos,PlungerPos2,PlungerPos3,PowerSetting
Sub Plunger_Timer()
For Each xx in PlungerWalls
xx.Isdropped = 1
Next
PlungerPos=INT(Plunger.position/2)
If Plunger.Position = 0 and PlungerPos3 > 3 Then
PowerSetting = PlungerIM.Strength
PlungerIM.Strength = (PlungerPos3/25*PlungerIM.Strength)
PlungerIM.AutoFire
PlungerIM.Strength = PowerSetting
PlungerPos2 = 0
End If

Plungers(PlungerPos).IsDropped=0
PlungerPos3 = PlungerPos2 : PlungerPos2 = Plunger.Position
End Sub


3. Add :Plunger.TimerEnabled=0 to the end of the PlungerKey line in the KeyDown Sub
4. Add :Plunger.TimerEnabled=1 to the end of the PlungerKey line in the KeyUp Sub
5. Add Plunger object with a stroke length of 130 called Plunger, uncheck Visible, check Enable Mechanical Plunger, check Enable Timer, set Interval to 40. Be sure the plunger hits the ball!
5. Add Plunger object called Plunger, uncheck Visible, check Enable Timer, set Interval to 40. You can set it anywhere and leave Enable Mechanical Plunger unchecked.

-----------------------------------------------------------

Light Technique

1. Add the following in the appropriate section:

CODE
Dim PlungerPos2, PlungerPos3, PowerSetting, elapsed : elapsed=0

Sub Plunger_Timer()
Select Case INT(Plunger.Position/2)
Case 0,1:p1.state = 1
Case 2,3:p1.state = 0:p2.state = 1
Case 4,5:p3.state = 1:p2.state = 0
Case 6,7:p4.state = 1:p3.state = 0
Case 8,9:p5.state = 1:p4.state = 0
Case 10,11:p6.state = 1:p5.state = 0
Case 12:p6.state = 1:p6.state = 0
End Select
If Plunger.Position = 0 and PlungerPos3 > 3 Then
PowerSetting = PlungerIM.Strength
PlungerIM.Strength = (PlungerPos3/25*PlungerIM.Strength)
PlungerIM.AutoFire
PlungerIM.Strength = PowerSetting
PlungerPos2 = 0
End If
If (elapsed MOD 8) = 0 Then PlungerPos3 = PlungerPos2 : PlungerPos2 = Plunger.Position : elapsed = 0 : End If
elapsed=elapsed+1 'since timer is set to 5, only update in intervals of 40ms

End Sub


2. Add Plunger object with a stroke length of 130 called Plunger, uncheck Visible, check Enable Mechanical Plunger, check Enable Timer, set Interval to 5. Be sure the plunger hits the ball!
2. Add Plunger object called Plunger, uncheck Visible, check Enable Timer, set Interval to 5. You can set it anywhere and leave Enable Mechanical Plunger unchecked.

3. Add :Plunger.TimerEnabled=0 to the end of the PlungerKey line in the KeyDown Sub
4. Add :Plunger.TimerEnabled=1 to the end of the PlungerKey line in the KeyUp Sub

-----------------------------------------------------------

Kicker Technique

1. Add to the script the bolded parts in the following script excerpt.

Dim PTop, PBottom, PTopY, PBottomY,PlungerPos,oPlungerPos,PT,PB,PlungerPos2,PlungerPos3,PowerSetting
Set PTop = P1.CreateBall:PTop.Image = "pw0a":PTopY = PTop.Y: PT=PTopY
Set PBottom = P2.CreateBall:PBottom.Image = "p0b":PBottomY = PBottom.Y: PB=PBottomY

2. Add the following Sub in the appropriate section:

CODE
Sub Plunger_Timer()
PlungerPos=INT(Plunger.Position)
If Plunger.Position = 0 and PlungerPos3 > 3 Then
PowerSetting = PlungerIM.Strength
PlungerIM.Strength = (PlungerPos3/25*PlungerIM.Strength)
PlungerIM.AutoFire
PlungerIM.Strength = PowerSetting
PlungerPos2 = 0
End If

If PlungerPos=oPlungerPos Then Exit Sub
PTop.Y = PT+INT(PlungerPos)*3
PBottom.Y = PB+INT(PlungerPos)*3
oPlungerPos=PlungerPos : PlungerPos3 = PlungerPos2 : PlungerPos2 = Plunger.Position
End Sub


3. Add Plunger object with a stroke length of 130 called Plunger, uncheck Visible, check Enable Mechanical Plunger, check Enable Timer, set Interval to 40. Be sure the plunger hits the ball!
3. Add Plunger object called Plunger, uncheck Visible, check Enable Timer, set Interval to 40. You can set it anywhere and leave Enable Mechanical Plunger unchecked.

4. Add :Plunger.TimerEnabled=0 to the end of the PlungerKey line in the KeyDown Sub
5. Add :Plunger.TimerEnabled=1 to the end of the PlungerKey line in the KeyUp Sub



There are a few ways I can see to augment the implementation of the Impluse Plunger to allow for a little more customization from the editor without having to dig into the script, by grabbing some of the settings like strength and scatter velocity from the plunger object directly (since we are adding one anyway), but it isn't necessary.
CODE
' Impulse Plunger
Const IMPowerSetting = 52 Plunger.MechStrength ' Plunger Power
Const IMTime = 0.7 ' Time in seconds for Full Plunge
Set plungerIM = New cvpmImpulseP
With plungerIM
.InitImpulseP swplunger, IMPowerSetting, IMTime
.Random 0.3 (Plunger.ScatterVelocity / 100)
.InitExitSnd "plunger2", "plunger"
.CreateEvents "plungerIM"
End With




I'm interested in using this method for my tables with the nano tech plunger. I'm still pretty new to all this so I was wondering what the line in bold above means? Is there a way to tell if the table has an impulse plunger? How do you add it if not? Also I see there are a few different methods for launching the ball. Is there an easy way to tell which method a table uses so that the correct code is used in the script? Lastly, when I use the nano tech plunger on some tables the plunger animation is not very smooth. Is there a way to fix this? Can you add more frames to the animation or something. Thanks !
~ Mr. John E. Smith III Esq.

#66 koadic

koadic

    Pinball Fan

  • VIP
  • 1,363 posts
  • Location:Omaha, NE, USA

  • Flag: United States of America

  • Favorite Pinball: Addams Family/Fish Tales/Medieval Madness



Contributor

Posted 01 August 2012 - 08:49 PM

QUOTE (ArcadiusMaximus @ Aug 1 2012, 02:24 PM) <{POST_SNAPBACK}>
I'm interested in using this method for my tables with the nano tech plunger. I'm still pretty new to all this so I was wondering what the line in bold above means? Is there a way to tell if the table has an impulse plunger? How do you add it if not? Also I see there are a few different methods for launching the ball. Is there an easy way to tell which method a table uses so that the correct code is used in the script? Lastly, when I use the nano tech plunger on some tables the plunger animation is not very smooth. Is there a way to fix this? Can you add more frames to the animation or something. Thanks !


If a table doesn't already have an analog plunger built into it, it most likely has an impulse plunger already scripted in, but not necessarily.

As far as what method is used, it really depends on the table.

Currently, most use about a total of 12 to 13 frames, and this can be increased to a total of 26 frames, it is just a matter of getting the images together for a smooth animation.

If you would like help with converting a specific table, I have started a topic specifically for that purpose... Analog Plunger Help Desk. Just post the name of the table you would like to convert, whether it has no current analog plunger or if it does and you just want to add the impulse plunger method to it, and I can then walk you through what is necessary to modify it and list the script changes necessary along with any table additions/changes. You can then either try one on your own or post another for help with.

#67 ArcadiusMaximus

ArcadiusMaximus

    Quit throwing trash into my dimension !

  • Members
  • PipPipPip
  • 310 posts
  • Location:PITZBORG, PA

  • Flag: United States of America

  • Favorite Pinball: Attack from Mars, Scared Stiff, White Water

Posted 02 August 2012 - 12:40 PM

QUOTE (koadic @ Aug 1 2012, 04:49 PM) <{POST_SNAPBACK}>
QUOTE (ArcadiusMaximus @ Aug 1 2012, 02:24 PM) <{POST_SNAPBACK}>
I'm interested in using this method for my tables with the nano tech plunger. I'm still pretty new to all this so I was wondering what the line in bold above means? Is there a way to tell if the table has an impulse plunger? How do you add it if not? Also I see there are a few different methods for launching the ball. Is there an easy way to tell which method a table uses so that the correct code is used in the script? Lastly, when I use the nano tech plunger on some tables the plunger animation is not very smooth. Is there a way to fix this? Can you add more frames to the animation or something. Thanks !


If a table doesn't already have an analog plunger built into it, it most likely has an impulse plunger already scripted in, but not necessarily.

As far as what method is used, it really depends on the table.

Currently, most use about a total of 12 to 13 frames, and this can be increased to a total of 26 frames, it is just a matter of getting the images together for a smooth animation.

If you would like help with converting a specific table, I have started a topic specifically for that purpose... Analog Plunger Help Desk. Just post the name of the table you would like to convert, whether it has no current analog plunger or if it does and you just want to add the impulse plunger method to it, and I can then walk you through what is necessary to modify it and list the script changes necessary along with any table additions/changes. You can then either try one on your own or post another for help with.


Thanks koadic. I will check that topic out !
~ Mr. John E. Smith III Esq.

#68 Tulkstar

Tulkstar

    Hobbyist

  • Members
  • PipPip
  • 15 posts
  • Location:Perth Australia

  • Flag: ---------

  • Favorite Pinball: Medievil Madness

Posted 14 August 2012 - 07:56 AM

QUOTE (Noah Fentz @ Apr 12 2011, 01:50 AM) <{POST_SNAPBACK}>
Hey everyone,

I just spent the better part of nine hours modding 60+ Fullscreen tables to use the Nanotech plunger. Many of these tables are JP's, and he's given me permission to update his uploads with the new functionality. A few other authors' tables have also been modded.

So, I'd like to know who uses the Nanotech plunger who would like to test a few of these tables. Since JP uses three different methods, I'll send one of each for testing to ensure their optimal functionality before I edit the existing uploads.

Now, I can't spend hours sending the files, so I can only take a few volunteers. I don't want to just attach them here, in case they cause issues with others' setups. I don't like having content going out that isn't good.

So, that being said, who wants to try them out?

For those of you who are script-savvy, here's what I did ...

Wall Technique

1. Create collection called PlungerWalls (P1-P13)
CODE
    Dim xx,PlungerPos
    Sub Plunger_Timer()
        For Each xx in PlungerWalls
            xx.Isdropped = 1
        Next
        PlungerPos=INT(Plunger.position/2)
        Plungers(PlungerPos).IsDropped=0
    End Sub


3. Add :Plunger.TimerEnabled=0 to the end of the PlungerKey line in the KeyDown Sub
4. Add :Plunger.TimerEnabled=1 to the end of the PlungerKey line in the KeyUp Sub
5. Add Plunger object with a stroke length of 130 called Plunger, uncheck Visible, check Enable Mechanical Plunger, check Enable Timer, set Interval to 40. Be sure the plunger hits the ball!

-----------------------------------------------------------

Light Technique

1. Add the following in the appropriate section:

CODE
Sub Plunger_Timer()
    Select Case INT(Plunger.Position/2)
         Case 0,1:p1.state = 1
         Case 2,3:p1.state = 0:p2.state = 1
         Case 4,5:p3.state = 1:p2.state = 0
         Case 6,7:p4.state = 1:p3.state = 0
         Case 8,9:p5.state = 1:p4.state = 0
         Case 10,11:p6.state = 1:p5.state = 0
         Case 12:p6.state = 1:p6.state = 0
         End Select
End Sub


2. Add Plunger object with a stroke length of 130 called Plunger, uncheck Visible, check Enable Mechanical Plunger, check Enable Timer, set Interval to 5. Be sure the plunger hits the ball!

3. Add :Plunger.TimerEnabled=0 to the end of the PlungerKey line in the KeyDown Sub
4. Add :Plunger.TimerEnabled=1 to the end of the PlungerKey line in the KeyUp Sub

-----------------------------------------------------------

Kicker Technique

1. Add to the script the bolded parts in the following script excerpt.

Dim PTop, PBottom, PTopY, PBottomY,PlungerPos,oPlungerPos,PT,PB
Set PTop = P1.CreateBall:PTop.Image = "pw0a":PTopY = PTop.Y: PT=PTopY
Set PBottom = P2.CreateBall:PBottom.Image = "p0b":PBottomY = PBottom.Y: PB=PBottomY

2. Add the following Sub in the appropriate section:

CODE
Sub Plunger_Timer()
    PlungerPos=INT(Plunger.Position)
    If PlungerPos=oPlungerPos Then Exit Sub
        PTop.Y = PT+INT(PlungerPos)*3
        PBottom.Y = PB+INT(PlungerPos)*3
    oPlungerPos=PlungerPos
End Sub


3. Add Plunger object with a stroke length of 130 called Plunger, uncheck Visible, check Enable Mechanical Plunger, check Enable Timer, set Interval to 40. Be sure the plunger hits the ball!


Note: If there is a plunger present, simply MOD the existing plunger.

These instructions are pretty much from memory, but I believe they are accurate. They also don't remove the existing Impulse Plungers, which I'll do after the Expo when I have more time, before I upload the edited versions.

@ JP - The Lights Method doesn't work well with the Digital Plunger. If you'd be willing, perhaps you could MOD those tables to use the Kicker Method? That would be the best result for the least amount of effort. I can give you a list of games using the Light Method, if you don't recall.

Enjoy!

What do yyou mean by Create collection called PlungerWalls (P1-P13)? Can send me to a link of a game that you have modded sso I can get the idea?