Jump to content



Photo
- - - - -

Riverboat Gambler VP9 1.0FS


  • Please log in to reply
37 replies to this topic

#21 destruk

destruk

    VPF Veteran

  • VPF Staff
  • 6,338 posts
  • Location:Colorado Springs, CO

  • Flag: United States of America

  • Favorite Pinball: Ultrapin!



Posted 18 January 2012 - 12:17 AM

QUOTE (Aaron James @ Jan 17 2012, 11:00 AM) <{POST_SNAPBACK}>
Any update yet? : Does anyone have an idea of how to script the red/black/pass/green buttons for the 2 flippers and 2 magnasaves for a cabinet?


Open the script, look at the keycode sections for keyup and keydown, and change the value to the button or keycode number your cabinet is using for the buttons you want.

Build a fire, vipers love the heat.


#22 Aaron James

Aaron James

    <<< Grand Champion >>>

  • VIP
  • 1,408 posts
  • Location:Shelby Township, Michigan

  • Flag: United States of America

  • Favorite Pinball: Docking Complete...Negative...You Must Redock...Redock Now!



Posted 18 January 2012 - 05:12 AM

QUOTE (destruk @ Jan 17 2012, 07:17 PM) <{POST_SNAPBACK}>
QUOTE (Aaron James @ Jan 17 2012, 11:00 AM) <{POST_SNAPBACK}>
Any update yet? : Does anyone have an idea of how to script the red/black/pass/green buttons for the 2 flippers and 2 magnasaves for a cabinet?


Open the script, look at the keycode sections for keyup and keydown, and change the value to the button or keycode number your cabinet is using for the buttons you want.


I've tried editing the script...all kinds of ways...but i guess im doing it wrong. I wish i was smarter sad.gif

vpsig.jpg


#23 destruk

destruk

    VPF Veteran

  • VPF Staff
  • 6,338 posts
  • Location:Colorado Springs, CO

  • Flag: United States of America

  • Favorite Pinball: Ultrapin!



Posted 18 January 2012 - 05:32 AM

CODE
Sub Table1_KeyDown(ByVal keycode)
     If keycode = RightFlipperKey Then Controller.Switch(57) = 1 'RIGHT FLIPPER SWITCH CLOSE ON KEYDOWN
     If keycode = LeftFlipperKey Then Controller.Switch(58) = 1 ' LEFT FLIPPER SWITCH CLOSE ON KEYDOWN
     If keycode = PlungerKey Then PlungerIM.Pullback:Pcount = 0:PTime.Enabled = 1 ' PULL BACK PLUNGER FOR PLUNGER KEY
     If keycode = "23" Then Rules 'it uses the i key for rules since the R is used for the red color ' I IS USED FOR THE RULECARD
     If keycode = LeftTiltKey Then LeftNudge 80, 1.2, 20:PlaySound "nudge_left" ' LEFT NUDGE
     If keycode = RightTiltKey Then RightNudge 280, 1.2, 20:PlaySound "nudge_right" 'RIGHT NUDGE
     If keycode = CenterTiltKey Then CenterNudge 0, 1.6, 25:PlaySound "nudge_forward" 'FORWARD NUDGE
     If keycode = 45 Then LeftNudge 80, 2, 30:PlaySound "nudge_left" 'SECONDARY LEFT NUDGE
     If keycode = 52 Then RightNudge 280, 2, 30:PlaySound "nudge_right" 'SECONDARY RIGHT NUDGE
     If KeyDownHandler(keycode) Then Exit Sub 'HANDLES ANY KEYCODES SPECIFIED BY S11.VBS
     If keycode = KeyGameSpecific1 Then Controller.Switch(60) = 1:Exit Sub 'switch 60 - manual says this is RED BUTTON
     If keycode = KeyGameSpecific2 Then Controller.Switch(61) = 1:Exit Sub 'switch 61 - manual says this is the PASS BUTTON
     If keycode = KeyGameSpecific3 Then Controller.Switch(62) = 1:Exit Sub 'switch 62 - manual says this is the GREEN BUTTON
     If keycode = KeyGameSpecific4 Then Controller.Switch(63) = 1 'switch 63 - manual says this is the BLACK BUTTON
End Sub

Sub Table1_KeyUp(byval Keycode) ' release and open relevant switches when the key is released
     If keycode = RightFlipperKey Then Controller.Switch(57) = 0
     If keycode = LeftFlipperKey Then Controller.Switch(58) = 0
     If KeyUpHandler(keycode) Then Exit Sub
     If keycode = PlungerKey Then PlungerIM.Fire:PTime.Enabled = 0:Pcount = 0:PTime2.Enabled = 1
     If keycode = KeyGameSpecific1 Then Controller.Switch(60) = 0:Exit Sub
     If keycode = KeyGameSpecific2 Then Controller.Switch(61) = 0:Exit Sub
     If keycode = KeyGameSpecific3 Then Controller.Switch(62) = 0:Exit Sub
     If keycode = KeyGameSpecific4 Then Controller.Switch(63) = 0
End Sub


What you should be able to do is to modify those routines to be something like this -

CODE
Sub Table1_KeyDown(ByVal keycode)
     If keycode = RightFlipperKey Then Controller.Switch(57) = 1 'RIGHT FLIPPER SWITCH CLOSE ON KEYDOWN
     If keycode = LeftFlipperKey Then Controller.Switch(58) = 1 ' LEFT FLIPPER SWITCH CLOSE ON KEYDOWN
     If keycode = PlungerKey Then PlungerIM.Pullback:Pcount = 0:PTime.Enabled = 1 ' PULL BACK PLUNGER FOR PLUNGER KEY
     If keycode = "23" Then Rules 'it uses the i key for rules since the R is used for the red color ' I IS USED FOR THE RULECARD
     If keycode = LeftTiltKey Then LeftNudge 80, 1.2, 20:PlaySound "nudge_left" ' LEFT NUDGE
     If keycode = RightTiltKey Then RightNudge 280, 1.2, 20:PlaySound "nudge_right" 'RIGHT NUDGE
     If keycode = CenterTiltKey Then CenterNudge 0, 1.6, 25:PlaySound "nudge_forward" 'FORWARD NUDGE
     If keycode = 45 Then LeftNudge 80, 2, 30:PlaySound "nudge_left" 'SECONDARY LEFT NUDGE
     If keycode = 52 Then RightNudge 280, 2, 30:PlaySound "nudge_right" 'SECONDARY RIGHT NUDGE
     If keycode = KeyGameSpecific1 Then Controller.Switch(60) = 1:Exit Sub 'switch 60 - manual says this is RED BUTTON
     If keycode = KeyGameSpecific2 Then Controller.Switch(61) = 1:Exit Sub 'switch 61 - manual says this is the PASS BUTTON
     If keycode = KeyGameSpecific3 Then Controller.Switch(62) = 1:Exit Sub 'switch 62 - manual says this is the GREEN BUTTON
     If keycode = KeyGameSpecific4 Then Controller.Switch(63) = 1 'switch 63 - manual says this is the BLACK BUTTON
     If KeyDownHandler(keycode) Then Exit Sub 'HANDLES ANY KEYCODES SPECIFIED BY S11.VBS
End Sub

Sub Table1_KeyUp(byval Keycode) ' release and open relevant switches when the key is released
     If keycode = RightFlipperKey Then Controller.Switch(57) = 0
     If keycode = LeftFlipperKey Then Controller.Switch(58) = 0
     If keycode = PlungerKey Then PlungerIM.Fire:PTime.Enabled = 0:Pcount = 0:PTime2.Enabled = 1
     If keycode = KeyGameSpecific1 Then Controller.Switch(60) = 0:Exit Sub
     If keycode = KeyGameSpecific2 Then Controller.Switch(61) = 0:Exit Sub
     If keycode = KeyGameSpecific3 Then Controller.Switch(62) = 0:Exit Sub
     If keycode = KeyGameSpecific4 Then Controller.Switch(63) = 0
     If KeyUpHandler(keycode) Then Exit Sub
End Sub



Move the KeyDownHandler and KeyUpHandler to the end of the routines so you can double up on switches if you like - having the flipper keys used for both a flipper and a choice/gamespecific option.
Then open and edit vpmkeys.vbs

keyGameSpecific1 = LeftFlipperKey
keyGameSpecific2 = RightFlipperKey
keyGameSpecific3 = LeftMagnaSave
keyGameSpecific4 = RightMagnaSave

Save both the new modified table, and the new/edited vpmkeys.vbs

See if that works for you on this game with your cabinet.

Build a fire, vipers love the heat.


#24 Aaron James

Aaron James

    <<< Grand Champion >>>

  • VIP
  • 1,408 posts
  • Location:Shelby Township, Michigan

  • Flag: United States of America

  • Favorite Pinball: Docking Complete...Negative...You Must Redock...Redock Now!



Posted 18 January 2012 - 06:27 AM

*With your help...i finally did it. I have a VirtuaPin (with pinball wizard)...and this is like the only way it works.. THANKS DESTRUK!

I'll share in case others have this problem.


'**********
' Keys
'**********

Sub Table1_KeyDown(ByVal keycode)
If keycode = RightFlipperKey Then Controller.Switch(57) = 1
If keycode = LeftFlipperKey Then Controller.Switch(58) = 1
If keycode = PlungerKey Then PlungerIM.Pullback:Pcount = 0:PTime.Enabled = 1
If keycode = "23" Then Rules 'it uses the i key for rules since the R is used for the red color
If keycode = LeftTiltKey Then LeftNudge 80, 1.2, 20:PlaySound "nudge_left"
If keycode = RightTiltKey Then RightNudge 280, 1.2, 20:PlaySound "nudge_right"
If keycode = CenterTiltKey Then CenterNudge 0, 1.6, 25:PlaySound "nudge_forward"
If keycode = 45 Then LeftNudge 80, 2, 30:PlaySound "nudge_left"
If keycode = 52 Then RightNudge 280, 2, 30:PlaySound "nudge_right"
If KeyDownHandler(keycode) Then Exit Sub
If keycode = 42 Then Controller.Switch(60) = 1:Exit Sub
If keycode = 54 Then Controller.Switch(61) = 1:Exit Sub
If keycode = 29 Then Controller.Switch(62) = 1:Exit Sub
If keycode = 157 Then Controller.Switch(63) = 1
End Sub

Sub Table1_KeyUp(byval Keycode)
If keycode = RightFlipperKey Then Controller.Switch(57) = 0
If keycode = LeftFlipperKey Then Controller.Switch(58) = 0
If KeyUpHandler(keycode) Then Exit Sub
If keycode = PlungerKey Then PlungerIM.Fire:PTime.Enabled = 0:Pcount = 0:PTime2.Enabled = 1
If keycode = 42 Then Controller.Switch(60) = 0:Exit Sub
If keycode = 54 Then Controller.Switch(61) = 0:Exit Sub
If keycode = 29 Then Controller.Switch(62) = 0:Exit Sub
If keycode = 157 Then Controller.Switch(63) = 0
End Sub

vpsig.jpg


#25 in2kiss

in2kiss

    Enthusiast

  • Platinum Supporter
  • 173 posts
  • Location:Long Island, NY

  • Flag: United States of America

  • Favorite Pinball: white water

Posted 28 January 2012 - 02:05 AM

I too have a virtuapin running pinball wizard. I already modified the game's script as per Destruk but I am unsure of what I need to change in my vpmkeys.vbs file.

My game specific keys are as follows:

keyGameSpecific1 = 16 '(Q)
keyGameSpecific2 = 17 '(W)
keyGameSpecific3 = 18 '(E)
keyGameSpecific4 = 19 '®

Aaron James, can you help?

#26 Aaron James

Aaron James

    <<< Grand Champion >>>

  • VIP
  • 1,408 posts
  • Location:Shelby Township, Michigan

  • Flag: United States of America

  • Favorite Pinball: Docking Complete...Negative...You Must Redock...Redock Now!



Posted 31 January 2012 - 09:44 PM

in 2 kiss...i sent u a pm.

vpsig.jpg


#27 JAM0

JAM0

    Pinball Fan

  • Members
  • PipPipPipPip
  • 1,146 posts
  • Location:Spain

  • Flag: Spain

  • Favorite Pinball: Fathom, Elvira

Posted 31 January 2012 - 11:07 PM

Great table. One question: when you shoot the roulette, how do you choose black or red? It keeps asking me to place my bet.

#28 bladexdsl

bladexdsl

    Joined the elite ranks

  • Banned
  • PipPipPipPip
  • 1,234 posts
  • Location:Queensland

  • Flag: Australia

  • Favorite Pinball: Scared stiff and Congo

Posted 01 February 2012 - 04:00 AM

QUOTE (JAM0 @ Jan 31 2012, 11:07 PM) <{POST_SNAPBACK}>
Great table. One question: when you shoot the roulette, how do you choose black or red? It keeps asking me to place my bet.

i'd like to know this also

#29 Bob5453

Bob5453

    I'm taking a nap

  • VIP
  • 3,896 posts
  • Location:Near Dayton, Ohio USA

  • Flag: United States of America

  • Favorite Pinball: Any table I can play while sitting in a rocking chair




  • Trophies:

Posted 01 February 2012 - 05:06 AM

QUOTE (bladexdsl @ Jan 31 2012, 11:00 PM) <{POST_SNAPBACK}>
QUOTE (JAM0 @ Jan 31 2012, 11:07 PM) <{POST_SNAPBACK}>
Great table. One question: when you shoot the roulette, how do you choose black or red? It keeps asking me to place my bet.

i'd like to know this also


According to the table info....

Special keys used:

"QWER" for choosing the colour on the Roulette

Might be hard to try with a cab. smile.gif

Posted Image

You have discovered an Easter egg. Pat yourself on the back.


#30 Aaron James

Aaron James

    <<< Grand Champion >>>

  • VIP
  • 1,408 posts
  • Location:Shelby Township, Michigan

  • Flag: United States of America

  • Favorite Pinball: Docking Complete...Negative...You Must Redock...Redock Now!



Posted 01 February 2012 - 05:13 AM

Hey guys...i've made it SIMPLE for ya! smile.gif
This will work with Noah Fentz's virtuapin
just copy and paste this into the table script file where it belongs :

'**********
' Keys
'**********

Sub Table1_KeyDown(ByVal keycode)
If keycode = RightFlipperKey Then Controller.Switch(57) = 1
If keycode = LeftFlipperKey Then Controller.Switch(58) = 1
If keycode = PlungerKey Then PlungerIM.Pullback:Pcount = 0:PTime.Enabled = 1
If keycode = "23" Then Rules 'it uses the i key for rules since the R is used for the red color
If keycode = LeftTiltKey Then LeftNudge 80, 1.2, 20:PlaySound "nudge_left"
If keycode = RightTiltKey Then RightNudge 280, 1.2, 20:PlaySound "nudge_right"
If keycode = CenterTiltKey Then CenterNudge 0, 1.6, 25:PlaySound "nudge_forward"
If keycode = 45 Then LeftNudge 80, 2, 30:PlaySound "nudge_left"
If keycode = 52 Then RightNudge 280, 2, 30:PlaySound "nudge_right"
If KeyDownHandler(keycode) Then Exit Sub
If keycode = 42 Then Controller.Switch(60) = 1:Exit Sub
If keycode = 54 Then Controller.Switch(61) = 1:Exit Sub
If keycode = 29 Then Controller.Switch(62) = 1:Exit Sub
If keycode = 157 Then Controller.Switch(63) = 1
End Sub

Sub Table1_KeyUp(byval Keycode)
If keycode = RightFlipperKey Then Controller.Switch(57) = 0
If keycode = LeftFlipperKey Then Controller.Switch(58) = 0
If KeyUpHandler(keycode) Then Exit Sub
If keycode = PlungerKey Then PlungerIM.Fire:PTime.Enabled = 0:Pcount = 0:PTime2.Enabled = 1
If keycode = 42 Then Controller.Switch(60) = 0:Exit Sub
If keycode = 54 Then Controller.Switch(61) = 0:Exit Sub
If keycode = 29 Then Controller.Switch(62) = 0:Exit Sub
If keycode = 157 Then Controller.Switch(63) = 0
End Sub

vpsig.jpg


#31 bladexdsl

bladexdsl

    Joined the elite ranks

  • Banned
  • PipPipPipPip
  • 1,234 posts
  • Location:Queensland

  • Flag: Australia

  • Favorite Pinball: Scared stiff and Congo

Posted 01 February 2012 - 05:26 AM

QUOTE (Aaron James @ Feb 1 2012, 05:13 AM) <{POST_SNAPBACK}>
Hey guys...i've made it SIMPLE for ya! smile.gif
This will work with Noah Fentz's virtuapin

what about other cabs?

#32 Bob5453

Bob5453

    I'm taking a nap

  • VIP
  • 3,896 posts
  • Location:Near Dayton, Ohio USA

  • Flag: United States of America

  • Favorite Pinball: Any table I can play while sitting in a rocking chair




  • Trophies:

Posted 01 February 2012 - 05:47 AM

QUOTE (bladexdsl @ Feb 1 2012, 12:26 AM) <{POST_SNAPBACK}>
QUOTE (Aaron James @ Feb 1 2012, 05:13 AM) <{POST_SNAPBACK}>
Hey guys...i've made it SIMPLE for ya! smile.gif
This will work with Noah Fentz's virtuapin

what about other cabs?


Should have bought a VirtuaPin

dblthumb.gif

.... or learn how to enter keycodes like Aaron did. smile.gif

Keycodes for all keys are in the VP Guide.

Posted Image

You have discovered an Easter egg. Pat yourself on the back.


#33 Aaron James

Aaron James

    <<< Grand Champion >>>

  • VIP
  • 1,408 posts
  • Location:Shelby Township, Michigan

  • Flag: United States of America

  • Favorite Pinball: Docking Complete...Negative...You Must Redock...Redock Now!



Posted 01 February 2012 - 05:50 AM

yeah...i only found a working solution based on trial and error.
The "formula"' is right...just depends on your keys...but the actual script i use works well.

controller switches 60, 61, 62, and 63 are q, w , e , r on your keyboard.

42 and 54 are my main flipper buttons on my cab...and 29 and 157 are my magnaflip buttons (just like on "the shadow" pinball...with the phurbas) ..........if that helps any .. sad.gif

Edited by Aaron James, 01 February 2012 - 05:53 AM.

vpsig.jpg


#34 bladexdsl

bladexdsl

    Joined the elite ranks

  • Banned
  • PipPipPipPip
  • 1,234 posts
  • Location:Queensland

  • Flag: Australia

  • Favorite Pinball: Scared stiff and Congo

Posted 01 February 2012 - 06:57 AM

QUOTE (Bob5453 @ Feb 1 2012, 05:47 AM) <{POST_SNAPBACK}>
QUOTE (bladexdsl @ Feb 1 2012, 12:26 AM) <{POST_SNAPBACK}>
QUOTE (Aaron James @ Feb 1 2012, 05:13 AM) <{POST_SNAPBACK}>
Hey guys...i've made it SIMPLE for ya! smile.gif
This will work with Noah Fentz's virtuapin

what about other cabs?


Should have bought a VirtuaPin


they dont work out here different voltage and the adapters are really huge and expensive tongue.gif

#35 destruk

destruk

    VPF Veteran

  • VPF Staff
  • 6,338 posts
  • Location:Colorado Springs, CO

  • Flag: United States of America

  • Favorite Pinball: Ultrapin!



Posted 01 February 2012 - 07:14 AM

I thought the entire world could run on either 110 or 220 - since most all power supplies have a toggle switch. How little I know I guess... smile.gif

Build a fire, vipers love the heat.


#36 Aaron James

Aaron James

    <<< Grand Champion >>>

  • VIP
  • 1,408 posts
  • Location:Shelby Township, Michigan

  • Flag: United States of America

  • Favorite Pinball: Docking Complete...Negative...You Must Redock...Redock Now!



Posted 01 February 2012 - 07:24 AM

QUOTE (destruk @ Feb 1 2012, 02:14 AM) <{POST_SNAPBACK}>
I thought the entire world could run on either 110 or 220 - since most all power supplies have a toggle switch. How little I know I guess... smile.gif



tongue3.gif

vpsig.jpg


#37 bladexdsl

bladexdsl

    Joined the elite ranks

  • Banned
  • PipPipPipPip
  • 1,234 posts
  • Location:Queensland

  • Flag: Australia

  • Favorite Pinball: Scared stiff and Congo

Posted 01 February 2012 - 09:32 AM

QUOTE (destruk @ Feb 1 2012, 07:14 AM) <{POST_SNAPBACK}>
I thought the entire world could run on either 110 or 220 - since most all power supplies have a toggle switch. How little I know I guess... smile.gif

the power supplies can do that but not the tv's

#38 CaptainNeo

CaptainNeo

    Pinball Fan

  • Platinum Supporter
  • 782 posts
  • Location:Burlington, WI

  • Flag: United States of America

  • Favorite Pinball: Cirqus Voltaire

Posted 08 May 2012 - 08:11 AM

QUOTE (Aaron James @ Feb 1 2012, 12:13 AM) <{POST_SNAPBACK}>
Hey guys...i've made it SIMPLE for ya! smile.gif
This will work with Noah Fentz's virtuapin
just copy and paste this into the table script file where it belongs :

'**********
' Keys
'**********

Sub Table1_KeyDown(ByVal keycode)
If keycode = RightFlipperKey Then Controller.Switch(57) = 1
If keycode = LeftFlipperKey Then Controller.Switch(58) = 1
If keycode = PlungerKey Then PlungerIM.Pullback:Pcount = 0:PTime.Enabled = 1
If keycode = "23" Then Rules 'it uses the i key for rules since the R is used for the red color
If keycode = LeftTiltKey Then LeftNudge 80, 1.2, 20:PlaySound "nudge_left"
If keycode = RightTiltKey Then RightNudge 280, 1.2, 20:PlaySound "nudge_right"
If keycode = CenterTiltKey Then CenterNudge 0, 1.6, 25:PlaySound "nudge_forward"
If keycode = 45 Then LeftNudge 80, 2, 30:PlaySound "nudge_left"
If keycode = 52 Then RightNudge 280, 2, 30:PlaySound "nudge_right"
If KeyDownHandler(keycode) Then Exit Sub
If keycode = 42 Then Controller.Switch(60) = 1:Exit Sub
If keycode = 54 Then Controller.Switch(61) = 1:Exit Sub
If keycode = 29 Then Controller.Switch(62) = 1:Exit Sub
If keycode = 157 Then Controller.Switch(63) = 1
End Sub

Sub Table1_KeyUp(byval Keycode)
If keycode = RightFlipperKey Then Controller.Switch(57) = 0
If keycode = LeftFlipperKey Then Controller.Switch(58) = 0
If KeyUpHandler(keycode) Then Exit Sub
If keycode = PlungerKey Then PlungerIM.Fire:PTime.Enabled = 0:Pcount = 0:PTime2.Enabled = 1
If keycode = 42 Then Controller.Switch(60) = 0:Exit Sub
If keycode = 54 Then Controller.Switch(61) = 0:Exit Sub
If keycode = 29 Then Controller.Switch(62) = 0:Exit Sub
If keycode = 157 Then Controller.Switch(63) = 0
End Sub



Thanks, this worked perfect. Glad someone made this easy for people like me, that don't know squat about scripting. Could you make another for baby pacman, so you can move the pac with the 4 flipper buttons as well? smile.gif
Visit my site, www.pinballrestorations.com for Pinball Playfield restoration services.
VP FS Wishlist {SafeCracker, Atlantis (redo), Defender, Arena, Champion Pub, Pinball Circus}