Jump to content



Photo
- - - - -

Custom Nudging VBS for 3.37


  • Please log in to reply
85 replies to this topic

#61 blur

blur

    Pinball Fan

  • VIP
  • 1,500 posts

  • Flag: Croatia

  • Favorite Pinball: Amazing Spiderman, Black Hole, Totem



Posted 26 March 2013 - 01:13 PM

chas return percent is not really stronger nudge - it is another nudge in opposite direction

for example if percent is 100 and you have right nudge with force 2 ball will go right, few milliseconds later ball will go left also with force 2, if return percent is 50 ball will go left with force 1, and if percent is 0 ball will not go left

 

here is a new debugged version of NudgePlugin.vbs, just copy all commands to your nudgeplugin.vbs file and they will work with latest core vbs files.

I've debugged counting a little, there are three counters, mcount for tilting, mfiltercount for filtering nudges for tiempofiltro time, and mreturncounter for coutnerforce

you can see how they go down nicely if you uncomment msgbox in update function

when all counters drop to 0 update is disabled

 

on scarred stiff when all counters drop to 0 update still goes every few milliseconds - but i think there is some bug in table that doesn't allow any timer to be disabled - will try to find out why

still nudge should work much better now even on scarred stiff.

 

Spoiler

Edited by blur, 29 March 2013 - 09:16 AM.


#62 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 26 March 2013 - 05:25 PM

Excellent, cheers Blur!


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


#63 chas

chas

    Pinball Fan

  • Banned
  • PipPipPipPip
  • 1,791 posts

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

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

Posted 28 March 2013 - 07:17 AM

xllnt gentlemen,

thank you.....

i did make a change to "percent return"

changed it to 0

it was more closer to my settings in VP for Lnudge 45, 1,  Rnudge315, 1 and Cnudge 180, 1.25.

Centernudge seems to be backwards on 0 instead of 180.

it should be 0 for forward center bump.

i tested the new core with table slope on 1/1.

started the table and let the ball float around a little on the PF and used the L/R and Cnudge.

centernudge on 0 seemed to be down instead of forward.

 

what is "mcount =" in the core nudge section of the scrip?

 

there is a sensitivity=5 or maybe another number and another  with "sensitivity +10" in the nudge section of the "core" script?

is sensitivity needed in core if the pinmame table has a sensitivity=x in the table script?


Edited by chas, 28 March 2013 - 07:22 AM.


#64 blur

blur

    Pinball Fan

  • VIP
  • 1,500 posts

  • Flag: Croatia

  • Favorite Pinball: Amazing Spiderman, Black Hole, Totem



Posted 28 March 2013 - 08:20 AM

on nudge ball never goes up - when you nudge real pinball ball goes down and bumps into something - some bumper or sling - and then goes up with bigger force, cause shot in the sling was stronger then it would be without nudge - that's why you always nudge real pinball when ball is close to something - to make it recoil stronger

 

but as any directions is easy to change - so preferred front nudge direction can also be easily changed from 180 (down) to 0 (up) but i don't recommend it

 

mcount is actually a tilt count - on every nudge it gets bigger and if it goes over sensitivity tilt occurs - some tables will not "tilt" on first tilt but on third, fourth tilt - it depends

every nudge interval (one second) mcount is reduced by one so after two seconds you can nudge again and avoid tilt

 

sensitivity from the table is actually same one as in core - only in table it is opposite - smaller sensitivity harder to tilt, while in core it is harder to tilt with bigger sensitivity (core sens = 10 - table sense)


Edited by blur, 28 March 2013 - 09:59 AM.


#65 chas

chas

    Pinball Fan

  • Banned
  • PipPipPipPip
  • 1,791 posts

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

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

Posted 29 March 2013 - 07:59 AM

Blur>>>>but as any directions is easy to change - so preferred front nudge direction can also be easily changed from 180 (down) to 0 (up) but i don't recommend it<<<<<

its not a problem but i think the Cnudge is backwards....

it should be 0 for forward.

started the table with slope on 1/1/GDL on 0 and let the ball float around on the PF using both 0 and 180  to check the settings direction and strength for L/R and Cnudge.

im pretty sure Centernudge on the original setting of 0 the ball went up.

the ball should bump down when bumping the table forward on a Centernudge/bump.

 

i think i saw in the thread 1 is the lowest bump it will go.

i have L/R nudge on 0.9 and Cnudge on 1.25.

works fine in the new update.


Edited by chas, 29 March 2013 - 08:00 AM.


#66 blur

blur

    Pinball Fan

  • VIP
  • 1,500 posts

  • Flag: Croatia

  • Favorite Pinball: Amazing Spiderman, Black Hole, Totem



Posted 29 March 2013 - 09:33 AM

Instead of testing nudging with VP table and checking how it was before in old core - you should put the ball on real kitchen table and see if you can nudge the ball up - or just down

you can do this with leveled table

 

let me know what did you find out

actually any body can try it just for fun - not just chas - put some metal ball (or rubber ball - but metal is better since rubber has bigger friction) on the kitchen table - and let me know where it goes when you nudge

and does it go back and how much?

 

small video would be great



#67 unclewilly

unclewilly

    sofa king.....

  • VIP
  • 5,083 posts
  • Location:Baltimore, Maryland

  • Flag: United States of America

  • Favorite Pinball: tz, tom, big hurt, who dunnit



Posted 29 March 2013 - 12:13 PM

So with this core and plugin I dont need any kind of custom nudge routine? Also to apply this to an em or original you need to load the core in the script? Might be a good idea to maybe have an example of the nudge script for a vpm and original table so new authors know how to implement the nudging in their tables. I know a lot of authors simply copy the custom routines from other tables. Or will this override scripted nudge routines?

"it will all be ok in the end, if it's not ok, it's not the end"
 
Monster Bash VP10 WIP https://dl.dropboxus... (vpx)WIP15.vpx

uw2.gif


#68 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 29 March 2013 - 12:44 PM

New core with 'plugin' = modified old core, difference being that the new core will automatically load the 'plugin' even if it gets updated so there is no need to modify future versions just to achieve custom nudging. :)

#69 blur

blur

    Pinball Fan

  • VIP
  • 1,500 posts

  • Flag: Croatia

  • Favorite Pinball: Amazing Spiderman, Black Hole, Totem



Posted 29 March 2013 - 03:29 PM

table script routines are not overwritten

 

noah's routines for example keep many timers and after one nudge allow only small percent of stregth on next nudge - this percent grows with time

this script on the other hand just blocks all nudges for some time, though noah script could also be inserted in core

 

any way the way it is now - they can coexist and will work like this:

 

first nudge - because of my script your preferef angle and strength and counter force is applied

second nudge again after 100 miliseconds - noah's routine will alow you only 1/10 of the strength - this will come to my script which will not do any nudge since tiempo filtro is 200 miliseconds - so not even 1/10 of force will be applied - nothing

you nudge again - 300 miliseconds after first nudge - noah's script will apply only 3/10 of the normal strength - this will come to my script and it will allow nudge and again apply preffered angle, strength and counter force - so not much use of noah's table script

 

i see in core.vbs that first authors planned to implement real pendulum logic, too bad that authors are away now - cause counter force is actually same as pendulum, and they will surely make acceptance of this in mainstream core much easier.

 

what would pendulum do - you nudge table - pendulum goes to the front, then to the back - counter force - maybe even swings several times - so to make nudge more like pendulum we could even add counter-counter-nuddge and counter-counter-counter-nuddge

 

have to go test nudging on kitchen table



#70 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 29 March 2013 - 10:24 PM

The custom nudge you've done is really good, have played alot of tables today. Makes all the difference for more difficulty, cheers again!


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


#71 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 29 March 2013 - 11:32 PM

Blur>>>>but as any directions is easy to change - so preferred front nudge direction can also be easily changed from 180 (down) to 0 (up) but i don't recommend it<<<<<

its not a problem but i think the Cnudge is backwards....

it should be 0 for forward.

started the table with slope on 1/1/GDL on 0 and let the ball float around on the PF using both 0 and 180  to check the settings direction and strength for L/R and Cnudge.

im pretty sure Centernudge on the original setting of 0 the ball went up.

the ball should bump down when bumping the table forward on a Centernudge/bump.

 

i think i saw in the thread 1 is the lowest bump it will go.

i have L/R nudge on 0.9 and Cnudge on 1.25.

works fine in the new update.

 

I also prefer 0 (up).  I know what blur is saying, & I know using 0 is kind of backwards & counter intuitive, but so is VP's default nudging!

Two reasons I choose to use 0.  1 reason is so that the screen shake matches the nudge direction.  When using 180, the screen shakes downward on a forward nudge.

The more important reason is to avoid the "double bump".

 

Since I use almost full returnpercentage (counterforce), when using 180 for forward nudge the ball makes an extra jerky movement in mid air that looks pretty unnatural to me.  Meanwhile, using 0 for forward nudge, you can basically get the same result but without the backwards screen shake & without that extra jerky movement.  I also use 50 returnpercent on forward nudge, which also helps when using the 0 value.  Of course nothing about VP's nudging is perfect, even with this code which helps a lot.  Devs really need to get in there & fix this.  I fired up an original table the other day & I could of played for 24 hours without ever losing a ball due to VP's default nudging.  Its a shame to see so many great tables get ruined & become less fun to play because nudging doesn't work properly with them.

Here are my current nudge plugin settings that I use...

 

        If aDir < 5 or aDir > 355 Then aDir = 0 : aForce = 1 : ReturnPercent = 50
        If aDir >= 5 and aDir <= 175 Then aDir = 90 : aForce = 1 : ReturnPercent = 90
        If aDir >= 185 and aDir <= 355 Then aDir = 270 : aForce = 1 : ReturnPercent = 90



#72 chas

chas

    Pinball Fan

  • Banned
  • PipPipPipPip
  • 1,791 posts

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

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

Posted 30 March 2013 - 06:36 AM

here is my settings in robos nudge plug in.

so far its fine.


the numbers after "return percent" = 0 are the original.

i used "percent return" on 0.....i just want to nudge one direction.

line 7 is 0/  '100
      

1..... If aDir < 5 or aDir > 355 Then aDir = aDir + 180 : aForce = 0.9 : ReturnPercent = 0   'c nudge 5, 355,  0, 1, rp50
                If aDir >= 5 and aDir <= 175 Then aDir = 45 : aForce = 0.9 : ReturnPercent = 0    'l nudge 5, 175, 60, 1, 85
                If aDir >= 185 and aDir <= 355 Then aDir = 315 : aForce = 0.9 : ReturnPercent = 0   'r nudge 185, 355, 300, 1, 85
        aDir = aDir + (Rnd-0.5)*15*aForce : aForce = (0.6+Rnd*0.8)*aForce
        Nudge aDir, aForce
        mReturnDir = aDir + 180
7..... mReturnForce = aForce * ReturnPercent / 0   '100
        If TiltSwitch = 0 Then Exit Sub ' If no switch why care
9......mCount = mCount + aForce * 1.2
        If mCount > mSensitivity + 10 Then mCount = mSensitivity + 10
        If mCount >= mSensitivity Then vpmTimer.PulseSw TiltSwitch
        NeedUpdate = True
    End sub

 

btw, why does the core need a sensitivity if pinmame table script has it?

if mcount is + 10 does that mean 10 millaseconds?

what is this on line 9?...... mCount = mCount + aForce * 1.2

 

Robo>>>>I also prefer 0 (up).  I know what blur is saying, & I know using 0 is kind of backwards & counter intuitive, but so is VP's default nudging!>>>>>>>>>>>>>>

 

i started the table with table slope on 1/1 or 0/0.

i let the ball float around the PF using the L/R and Cnudge.

im pretty sure Cnudge on 0 was down.

the ball bumped up.

its ok, not a problem.

i reversed the Cnudge in VP and PinMame to 180.


Edited by chas, 30 March 2013 - 07:19 AM.


#73 chas

chas

    Pinball Fan

  • Banned
  • PipPipPipPip
  • 1,791 posts

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

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

Posted 03 April 2013 - 07:13 AM

Koadic, could you please explain the direction and strength for the L/R/center nudge in the new core 3-37 to 3_42 scripts update.

i dont see anything to give me an idea for the L/R and Cnudge.

i had to use Robos nudgeplugin.

it had the direction and strength.

 

Public Sub DoNudge(ByVal aDir, ByVal aForce)
        If mCount2 > 0 and mCount2 < TiempoFiltro\conTimerPulse then exit sub
        mcount2 = 1
        mReturnCount = 1
        If aDir < 20 or aDir > 340 Then aDir = aDir + 180
        aDir = aDir + (Rnd-0.5)*15*aForce : aForce = (0.6+Rnd*0.8)*aForce
        Nudge aDir, aForce
        If NudgeSound <> "" Then PlaySound NudgeSound Else PlayMusic NudgeMusic
        mReturnDir = aDir + 180
        mReturnForce = aForce * ReturnPercent / 100
        If TiltSwitch = 0 Then Exit Sub ' If no switch why care
        mCount = mCount + aForce * 1.2
        If mCount > mSensitivity + 10 Then mCount = mSensitivity + 10
        If mCount >= mSensitivity Then vpmTimer.PulseSw TiltSwitch : If TiltSound <> "" Then PlaySound TiltSound Else PlayMusic TiltMusic
        NeedUpdate = True
    End sub


Edited by chas, 03 April 2013 - 07:17 AM.


#74 blur

blur

    Pinball Fan

  • VIP
  • 1,500 posts

  • Flag: Croatia

  • Favorite Pinball: Amazing Spiderman, Black Hole, Totem



Posted 03 April 2013 - 08:08 AM

here is my settings in robos nudge plug in.

so far its fine.

 

7..... mReturnForce = aForce * ReturnPercent / 0   '100

 

you should not divide with zero



#75 chas

chas

    Pinball Fan

  • Banned
  • PipPipPipPip
  • 1,791 posts

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

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

Posted 03 April 2013 - 11:04 AM

here is my settings in robos nudge plug in.

so far its fine.

 

7..... mReturnForce = aForce * ReturnPercent / 0   '100

 

you should not divide with zero

thanks B,,,,it's a typo error...... i fixed it to = 0  '100....works ok. 

i moded Robos "nudgeplugin" then started the table to see what "Percent Return = xx" does.....i found it very interesting.....in a real table the nudge does not do that.

VP9FS knockout2011b 1monitor had an error of ( "line 0 variable undefined "nudge sound") with the new scripts....this table is a VP,  not pinmame......in the top of the script there is (execute globalfile (core.vbs)..... loaded the new core 3-41 into the table folder....still had an error.....i loaded the old core script from 3-32.....it worked....i did not need to load "core" into the table folder.....why would a VP table do this with the new scripts?

 

still interested in how Koadic set up the L/R and Cnudge for the new core in 3_41 and 3-42.


Edited by chas, 03 April 2013 - 11:15 AM.


#76 blur

blur

    Pinball Fan

  • VIP
  • 1,500 posts

  • Flag: Croatia

  • Favorite Pinball: Amazing Spiderman, Black Hole, Totem



Posted 03 April 2013 - 11:50 AM

script on top of this page (v2) has nudgesound defined:

 

Public NudgeSound, TiltSound, NudgeMusic, TiltMusic
...
NudgeSound = ""

 

you can get error nudge sound not defined only if you copy only some parts of the script, for example part where nudge sound is called but not the one where it is defined


Edited by blur, 04 April 2013 - 06:41 AM.


#77 chas

chas

    Pinball Fan

  • Banned
  • PipPipPipPip
  • 1,791 posts

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

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

Posted 04 April 2013 - 06:02 AM

script on top of the page (v2) has nudgesound defined:

 

Public NudgeSound, TiltSound, NudgeMusic, TiltMusic
...
NudgeSound = ""

 

you can get error nudge sound not defined only if you copy only some parts of the script, for example part where nudge sound is called but not the one where it is defined

 

i used the edit search in the script.

knockout vp9FS 2011b has none of the above in the script.

very few problems with VP.

this is the first VP(nonpinmame) table with an error using the new scripts update.

 

btw, i tried to DL some new stuff.

the forum data base does not work.



#78 uberpinball

uberpinball

    Enthusiast

  • Platinum Supporter
  • 449 posts

  • Flag: United States of America

  • Favorite Pinball: Gorgar, Attack from Mars, MM, MB, Pinbot...

Posted 12 April 2013 - 06:25 PM


script on top of the page (v2) has nudgesound defined:
 

Public NudgeSound, TiltSound, NudgeMusic, TiltMusic...NudgeSound = ""
 
you can get error nudge sound not defined only if you copy only some parts of the script, for example part where nudge sound is called but not the one where it is defined
 
i used the edit search in the script.
knockout vp9FS 2011b has none of the above in the script.
very few problems with VP.
this is the first VP(nonpinmame) table with an error using the new scripts update.
 
btw, i tried to DL some new stuff.
the forum data base does not work.
 
How can you just have Blur's custom nudge script use the default rom sounds for nudge and tilt?
 
Can you just add a space to the variable assignments? Because the if statement later looks for a empty string and then plays the mp3.
NudgeSound = "  " ' sound has to be in table
TiltSound = "  " ' sound has to be in table
If NudgeSound <> "" Then PlaySound NudgeSound Else PlayMusic NudgeMusic
 

Edited by uberpinball, 12 April 2013 - 06:26 PM.

Seeds of War, Piles of Skulls

<OO>  Pinball Cab  <OO>  ArcadeX Mame Cab  <OO>


#79 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 April 2013 - 09:33 AM

getting a "Nudgesound must be in the table" error kicking back to the script in the older 'Triple Strike 1.42FS" and "StrangeWorldFS" from awhile back with the new scripts update.....these are VP(nonpinmame) table with the tilt/nudge in the 91x editor script window......did a search for "nudgesound" in the forum.....4 threads came up.....1 was the latest script update ....the others were from 2011.....i went back to the table and copied an old "core" script from 3-32 annd 3-36 to the folder....still getting an error.....suggestions on how to fix it.......


Edited by chas, 23 April 2013 - 09:36 AM.


#80 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,060 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 20 May 2013 - 03:51 AM

Hi Just setup a plumb bob for nudge. I have it working but I get rebound when I nudge left or right. For example, if I nudge left, I get left right left right. How do I adjust the nudge plugin to register the first nudge and ignore subsequent nudges for let's say 500 msec? Based on this, what should I do with the tilt related setting? I looked at the comments for each parameter, but I think I need some overview to understand the overall logic... Thanks for any help.