Jump to content



Photo
- - - - -

Custom Nudging VBS for 3.37


  • Please log in to reply
85 replies to this topic

#41 chas

chas

    Pinball Fan

  • Banned
  • PipPipPipPip
  • 1,791 posts

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

  • Favorite Pinball: i played Timezone, quickdraw, triple action, frontier and a few more

Posted 23 March 2013 - 06:50 AM

ok, this is kind of a foreign language
i have my current settings in pinmame and VP:
Lnudge, 45, 1
Rnudge, 315, 1
Center nudge, 180, 1.25
i felt 355/5 will be the same as as a center nudge.
with the original nudge settings you would have to kick the table hard to get that nudge effect.
i remember when nudging a real table i would bump the corners with my palm.
 
could you explain each line for what it is and how for direction and strength to get the same.
will my current settings work if i change it and not get a "cannnot open core error?
the first line has the "if aDir<=5 while the other lines the arrows  (> <)  is reversed "if aDir>=5
please explain how you set it up for L/R and Centernudge direction and strength in the latest VBSscripts 3-39.
 
If aDir < 5 or aDir > 355 Then aDir = aDir + 0 : aForce = 1.2 : ReturnPercent = 50
If aDir >= 5 and aDir <= 175 Then aDir = 60 : aForce = 1 : ReturnPercent = 90
If aDir >= 185 and aDir <= 355 Then aDir = 300 : aForce = 1 : ReturnPercent = 90
aDir = aDir + (Rnd-0.5)*15*aForce : aForce = (0.6+Rnd*0.8)*aForce
Nudge aDir, aForce

Edited by chas, 23 March 2013 - 07:13 AM.


#42 rob046

rob046

    Often Emulated, Never Duplicated

  • Members
  • PipPipPipPipPip
  • 2,023 posts
  • Location:Central PA

  • Flag: United States of America

  • Favorite Pinball: 8 Ball Deluxe, ToM, & Funhouse



Posted 23 March 2013 - 06:28 PM

I'm a desktop user, and I remember VP8 nudging. I think VP8 nudging was perfect for desktop use. But for cabinet use it was good that's why the "VP9" nudging were invented.

Why not add both to the VP code? And simply selected from the script?

 

It really was about as perfect as you'll get for digital nudging, which is all the more disappointing that we no longer have it.

I also still fail to understand why it can't be incorporated in some way.  I can think of a couple ways.

I guess this is why some desktop users would get angry at this subject & think there was some conspiracy of certain people only caring if cab users are happy since that is what people spend money on.  I won't go so far as to say that. 

 

I can definitely see why some things turn off desktop users though.  & this nudging issue is certainly one of them, I know it is definitely wearing me down as a user.  If I don't use the above conservative settings on blur's code, I can keep a ball in play almost at will, which isn't very enjoyable.

I fired up some original VP9 tables last night, & on some of them they just can't even be played unless you forgo nudging altogether.  :(

I sure do hope something can be done, but I said that a couple years ago as well.  With VP being open source now, you just wouldn't think an issue like this would persist for so long.


Edited by rob046, 23 March 2013 - 06:38 PM.


#43 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 23 March 2013 - 09:06 PM

Alright, I have updated the core to v3.41 which includes the ablity to create a NudgePlugIn.vbs file to override the default nudging included in the core. Feel free to create one of your own, or use/modify the one I am attaching to this post...

Attached File  Custom Nudge.zip   47.98KB   115 downloads

The zip file contains a NudgePlugIn.vbs file, a nudge.mp3 and tilt.mp3 file based on Blur's 3.33 version of the core.vbs available in his signature. You can use it as is, or you can modify it to your liking. Any future update of the core will not overwrite your nudge settings and they should be autoloaded with newer versions.

#44 rob046

rob046

    Often Emulated, Never Duplicated

  • Members
  • PipPipPipPipPip
  • 2,023 posts
  • Location:Central PA

  • Flag: United States of America

  • Favorite Pinball: 8 Ball Deluxe, ToM, & Funhouse



Posted 24 March 2013 - 03:15 AM

Alright, I have updated the core to v3.41 which includes the ablity to create a NudgePlugIn.vbs file to override the default nudging included in the core. Feel free to create one of your own, or use/modify the one I am attaching to this post...

attachicon.gifCustom nudge.zip=Nudge.zip

The zip file contains a NudgePlugIn.vbs file, a nudge.mp3 and tilt.mp3 file based on Blur's 3.33 version of the core.vbs available in his signature. You can use it as is, or you can modify it to your liking. Any future update of the core will not overwrite your nudge settings and they should be autoloaded with newer versions.

 

Thank you!  Works fine with the new vbs.  The above is the old outdated code though, I went ahead & put in my latest version of blur's code, for those who don't mind a more realistic & challenging nudge.  But this version of the code is also a little easier to tweak for those who want to do their own thing, & with the individual return percentage settings as well.

Might be good to sticky this plugin now that this custom nudging has a permanent home & people don't have to worry about updating it with each vbs update.

Attached Files



#45 chas

chas

    Pinball Fan

  • Banned
  • PipPipPipPip
  • 1,791 posts

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

  • Favorite Pinball: i played Timezone, quickdraw, triple action, frontier and a few more

Posted 24 March 2013 - 05:00 AM

robo, you deleted the nudge sound in the script.

does it still play the tilt and nudge sounds?

and how do we change the L/R and Centernudge direction and strength?

if i tweak it to my own will it play the tilt/nudge sound?

 

koadic, if i tweak it custom do i need to keep the nudge sound in the script for it to work?.

 

some tables i have the script in the table folder.

it got a script error.

i took  the blue ball table out of the table folder into the vp9x folder with the scripts in the table folder and the scripts in the pinmame script folder.

it still got a script error.

i put it back into the folder.

then it worked.

why do some tables do this?


Edited by chas, 24 March 2013 - 05:41 AM.


#46 rob046

rob046

    Often Emulated, Never Duplicated

  • Members
  • PipPipPipPipPip
  • 2,023 posts
  • Location:Central PA

  • Flag: United States of America

  • Favorite Pinball: 8 Ball Deluxe, ToM, & Funhouse



Posted 24 March 2013 - 06:18 AM

robo, you deleted the nudge sound in the script.

does it still play the tilt and nudge sounds?

and how do we change the L/R and Centernudge direction and strength?

if i tweak it to my own will it play the tilt/nudge sound?

 

koadic, if i tweak it custom do i need to keep the nudge sound in the script for it to work?.

 

some tables i have the script in the table folder.

it got a script error.

i took  the blue ball table out of the table folder into the vp9x folder with the scripts in the table folder and the scripts in the pinmame script folder.

it still got a script error.

i put it back into the folder.

then it worked.

why do some tables do this?

 

I forget why I deleted those, probably because I just rely on rom's for tilt sounds, then nudge sounds are also usually built into the table, & so these sounds wouldn't really be needed.  I don't use that tilt sound at all, but adding the nudge sound can't hurt for tables that don't have it.  I went ahead & added those lines of code back in, it is attached.

 

To change direction, the value you want to change is aDir for each direction.  Currently on my tweaks the line with aDir at 0 is forward nudge, 300 is left nudge & 60 is right nudge.  For strength, that is the aForce value.  I just have this set to 1 on each direction.  That is the lowest you can go & still have some screen shake effect.  Also it is pretty close to realistic for me.

 

No idea what you are talking about with your error.  What is the "blue ball" table?

Attached Files


Edited by rob046, 24 March 2013 - 06:29 AM.


#47 chas

chas

    Pinball Fan

  • Banned
  • PipPipPipPip
  • 1,791 posts

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

  • Favorite Pinball: i played Timezone, quickdraw, triple action, frontier and a few more

Posted 24 March 2013 - 06:51 AM

robo, you deleted the nudge sound in the script.

does it still play the tilt and nudge sounds?

and how do we change the L/R and Centernudge direction and strength?

if i tweak it to my own will it play the tilt/nudge sound?

 

koadic, if i tweak it custom do i need to keep the nudge sound in the script for it to work?.

 

some tables i have the script in the table folder.

it got a script error.

i took  the blue ball table out of the table folder into the vp9x folder with the scripts in the table folder and the scripts in the pinmame script folder.

it still got a script error.

i put it back into the folder.

then it worked.

why do some tables do this?

 

I forget why I deleted those, probably because I just rely on rom's for tilt sounds, then nudge sounds are also usually built into the table, & so these sounds wouldn't really be needed.  I don't use that tilt sound at all, but adding the nudge sound can't hurt for tables that don't have it.  I went ahead & added those lines of code back in, it is attached.

 

To change direction, the value you want to change is aDir for each direction.  Currently on my tweaks the line with aDir at 0 is forward nudge, 300 is left nudge & 60 is right nudge.  For strength, that is the aForce value.  I just have this set to 1 on each direction.  That is the lowest you can go & still have some screen shake effect.  Also it is pretty close to realistic for me.

 

No idea what you are talking about with your error.  What is the "blue ball" table?

robo>>>>No idea what you are talking about with your error.  What is the "blue ball" table?>>>>

chas>>>>the table in the folder.....im pretty sure most zipped tables come in a folder.....RAR does not.....after unRARing a table the blue ball was not in a folder.....after extracting some zipped table folders it had a script error....loaded the script in the folder....then it loaded and played....most zipped tables play without the script in the folder....can the wizards give me an idea why some tables do this script error thing without the script in the table folder.

 

koadics tilt/nudge sound was pretty cool....i was just asking if i mod the tilt will the sound still work.

 

whats this on the last line?.....
aDir = aDir + (Rnd-0.5)*15*aForce : aForce = (0.6+Rnd*0.8)*aForce
 
what is percent return?
 
could you open a older script.....open bally.....in the script i was trying for something like this.
its a little more simple and straight forward....
this is from bally 3-36
maybe my mod did not work because i did not use the Donudge script.
i used a VP table.

' Keyboard handlers
Function vpmKeyDown(ByVal keycode)
    On Error Resume Next
    vpmKeyDown = True ' Assume we handle the key
    With Controller
        If keycode = RightFlipperKey Then .Switch(swLRFlip) = True
        If keycode = LeftFlipperKey  Then .Switch(swLLFlip) = True
        Select Case keycode
            Case keyInsertCoin1  vpmTimer.AddTimer 750,"vpmTimer.PulseSw swCoin1'" : Playsound SCoin
            Case keyInsertCoin2  vpmTimer.AddTimer 750,"vpmTimer.PulseSw swCoin2'" : Playsound SCoin
            Case keyInsertCoin3  vpmTimer.AddTimer 750,"vpmTimer.PulseSw swCoin3'" : Playsound SCoin
            Case StartGameKey    .Switch(swStartButton) = True
            Case keySelfTest     .Switch(swSelfTest)    = True
            Case keyCPUDiag      .Switch(swCPUDiag)     = True
            Case keySoundDiag    .Switch(swSoundDiag)   = True
            Case keySlamDoorHit  .Switch(swSlamTilt)    = True
            Case keyBangBack     vpmNudge.DoNudge  180, 1.25
            Case LeftTiltKey     vpmNudge.DoNudge  45, 1
            Case RightTiltKey    vpmNudge.DoNudge 315, 1
            Case CenterTiltKey   vpmNudge.DoNudge   180, 1.25
            Case Else            vpmKeyDown = False
        End Select
    End With

Edited by chas, 24 March 2013 - 07:10 AM.


#48 chas

chas

    Pinball Fan

  • Banned
  • PipPipPipPip
  • 1,791 posts

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

  • Favorite Pinball: i played Timezone, quickdraw, triple action, frontier and a few more

Posted 25 March 2013 - 06:57 AM

If aDir < 5 or aDir > 355 Then aDir = aDir + 0 : aForce = 1.2 : ReturnPercent = 50
If aDir >= 5 and aDir <= 175 Then aDir = 60 : aForce = 1 : ReturnPercent = 90
If aDir >= 185 and aDir <= 355 Then aDir = 300 : aForce = 1 : ReturnPercent = 90
aDir = aDir + (Rnd-0.5)*15*aForce : aForce = (0.6+Rnd*0.8)*aForce
Nudge aDir, aForce
 
what is Random(Rnd) and percent return?..... there is a force of 1 and 1.2...here it is again,,,,,just trying to understand what you did.
aDir = aDir + (Rnd-0.5)*15*aForce : aForce = (0.6+Rnd*0.8)*aForce
Nudge aDir, aForce
 

Edited by chas, 25 March 2013 - 07:09 AM.


#49 blur

blur

    Pinball Fan

  • VIP
  • 1,500 posts

  • Flag: Croatia

  • Favorite Pinball: Amazing Spiderman, Black Hole, Totem



Posted 25 March 2013 - 11:06 AM

rnd is randomizing angle and strength a little so that nudge is not always the same

you can safely remove that if you want

 

return percent is strength of counter kick on the ball (kick in opposite direction)



#50 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 25 March 2013 - 11:23 AM

Dumb question but how do I add this into VP?


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#51 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 25 March 2013 - 11:27 AM

Dumb question but how do I add this into VP?

Make sure you have the latest core.vbs file and download or create a NudgePlugIn.vbs file and move it into your tables/scripts folder.

#52 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 25 March 2013 - 11:40 AM

Thanks. I had allready done that but didn't really seem to make any difference. I'll try again.


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#53 blur

blur

    Pinball Fan

  • VIP
  • 1,500 posts

  • Flag: Croatia

  • Favorite Pinball: Amazing Spiderman, Black Hole, Totem



Posted 25 March 2013 - 12:19 PM

Here is my NudgePlugin.vbs with some bug fixes i made a long time ago on my rig.

This is hardcore version - return percent is 100% but you can change it to whatever you want.

This version uses preferred angles, preferred strenght, and even preferred sensitivity so you can override anything in any table.

For example you want to save ball easily so you never lose the ball - set aForce to 2 and returnpercent to 0.

You want to use tilt bob but you get lot's of nudges, instead of 1 - set tiempofiltro to 2000.

You want to nudge without pause between nudges - set tiempofiltro to 0

You want diagonal side nudge, instead of horizontal - set angles to 90+45 and 270-45

You want bigger counter force then force - no problem - set returnpercent to 150 or 200 (it is possible eventhough it is percent)

etc...

 

Spoiler


#54 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 25 March 2013 - 01:39 PM

Very good Blur , thanks alot!


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#55 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 25 March 2013 - 01:49 PM

I noticed a problem maybe with that. I knew Scared Stiff was one of the easiest tables to nudge your way to a high score, so I put it to the test with that table.

 

It will nudge the ball at least 3 times then it just stops working, I can then bash nudge L/R/C but won't do anything, ball doesn't move + no tilt on machine.


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#56 blur

blur

    Pinball Fan

  • VIP
  • 1,500 posts

  • Flag: Croatia

  • Favorite Pinball: Amazing Spiderman, Black Hole, Totem



Posted 25 March 2013 - 02:11 PM

only on scared stiff? which version of table?



#57 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 25 March 2013 - 02:14 PM

Yes. It only seems to be that table so far. Scared_Stiff_VP91x_1.4.4FS


Edited by chepas, 25 March 2013 - 02:27 PM.

Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#58 blur

blur

    Pinball Fan

  • VIP
  • 1,500 posts

  • Flag: Croatia

  • Favorite Pinball: Amazing Spiderman, Black Hole, Totem



Posted 25 March 2013 - 03:00 PM

yeah i see why it is so easy to nudge - force was 2 for sides and 3 for front, sensitivity is 1 (minimum sensitivity).

 

i'm getting some loops on nudge update - will have to check why



#59 blur

blur

    Pinball Fan

  • VIP
  • 1,500 posts

  • Flag: Croatia

  • Favorite Pinball: Amazing Spiderman, Black Hole, Totem



Posted 25 March 2013 - 03:58 PM

I've found two things - none of them is related to this scared stiff problem:

 

1. chas i found why you keep geting message - Can't open "core.vbs" - you get this message because you have some syntax error in your core scripts (doesn't have to be core) - i got this when i tried to debug nudge update function - i've put msgbox mcount mcount2 which is syntax error - it should be msgbox mcount & "  " & mcount2 (this is my error - yours is probably different)

so if you get Can't open "core.vbs" you have some syntax error somewhere - core file is probably in the right place

 

2. while debuging - i got hundreds of this msgbox messages one by one - since they are in a loop - you can't stop them except by closing editor - and when you close editor vp will crash - which means (my conclusion) - vp will crash if any dialog box is open while you are closing vp editor - when dialog box is open vp's main thread is dead - it cannot do anything - it cannot stop controller, pause controller, unpause controller, close player - nothing - just like word when you have open or save dialog box opened somewhere and none of the toolbar buttons or menus respond any more.

Why is this important - this is the reason why vp is crashing when it has resume game dialog box open and fplaunch closes editor - vp player will crash because it is dead - it cannot respond to close window peacefully windows request, vp player cannot respond to anything because it's main thread is stuck on dialog box.



#60 chas

chas

    Pinball Fan

  • Banned
  • PipPipPipPip
  • 1,791 posts

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

  • Favorite Pinball: i played Timezone, quickdraw, triple action, frontier and a few more

Posted 26 March 2013 - 06:11 AM

I've found two things - none of them is related to this scared stiff problem:

 

1. chas i found why you keep geting message - Can't open "core.vbs" - you get this message because you have some syntax error in your core scripts (doesn't have to be core) - i got this when i tried to debug nudge update function - i've put msgbox mcount mcount2 which is syntax error - it should be msgbox mcount & "  " & mcount2 (this is my error - yours is probably different)

so if you get Can't open "core.vbs" you have some syntax error somewhere - core file is probably in the right place

 

2. while debuging - i got hundreds of this msgbox messages one by one - since they are in a loop - you can't stop them except by closing editor - and when you close editor vp will crash - which means (my conclusion) - vp will crash if any dialog box is open while you are closing vp editor - when dialog box is open vp's main thread is dead - it cannot do anything - it cannot stop controller, pause controller, unpause controller, close player - nothing - just like word when you have open or save dialog box opened somewhere and none of the toolbar buttons or menus respond any more.

Why is this important - this is the reason why vp is crashing when it has resume game dialog box open and fplaunch closes editor - vp player will crash because it is dead - it cannot respond to close window peacefully windows request, vp player cannot respond to anything because it's main thread is stuck on dialog box.

thanks for your time to look this over.

if i remember correct i did get a "syntax" error when making changes in the script for kickers and tilt/nudge changes.

it was usually a keyboard typing error with a comma or period.

 

blur>>>>>return percent is strength of counter kick on the ball (kick in opposite direction)<<<< ,,,,,you mean "percent return" is a stronger nudge?.....i have not installed the updates yet.....my PC has no card and been feeling a little under the weather......thanks


Edited by chas, 26 March 2013 - 06:22 AM.