Tutorial FP Analogue nudge in FP

Future Pinball

AnonTet

Pinball Master
Site Supporters
Joined
Jun 21, 2020
Messages
2,010
Solutions
1
Reaction score
1,171
Points
125
Favorite Pinball Machine
Indiana Jones
Since I did not find information anywhere else, I'm posting this here.

This tutorial wouldn't be possible without @ravarcade help and mjr's Pinscape software. Thank you both.

Note: There are other boards on the market, specifically other KL's. Make sure you're buying KL25Z for Pinscape. (there may be other options in the future).

Without further ado, 1st you'll have to install and eventually upgrade your KL25Z board and thanks to mjr, this is quite easy but out of scope for this tutorial. Check this and this and you should be set. It's more or less straight forward but let me know if you have any problems.

I'm going to quote ravarcade's email but i'll be using images from my own registry for the sake of being specific to this board. I'm guessing this would work with gamepads like xbox or ps3 controllers that have motion sensors. If you can make it work, let us know please.

This can be done relatively easy... but is not necessary.

There is other way. You can use regedit to change all needed values.
Just go to:
Computer\HKEY_CURRENT_USER\Software\Future Pinball\GamePlayer\Joypads

open node for your device (joystick, mouse or whatever you see).

You can recognize all 5 "gainmax" values to edit.
More.... one line above you can see entered value. This value is multiplied by 1000 and stored as 32 integers (with sign). Negative values are tricky to enter... but this can be done with a windows calculator.

In the image below you can see the the needed entries for this tutorial (NudgeGain). The other "gainmax" follow the same logic so it should be easy to setup in case you need them. I do use my Player2 (ultra-sticks are analog) for plunger and it also needs a higher gain. The process is exactly he same for any analog device detected by FP.

In yellow you can see I've set a value of 10 (way more than really needed) which means FP will get you to +16 gain.
Underlined in red, you can see the set value (multiplied by 1000) in FP (see FP settings below).

1599657569380.png

I recommend you exit and start FP again if you had it open when editing the registry.

As far as FP settings go the procedure is:
- enable the Pinscape controller (after installing the fw to the kl25z board)
- set the values for X-Y axis
- find a gain value and test
- You may/may not need to adjust the Deadzone. Start with 0 and go from there.

Note: every time you make a change press "Set as Defaults" Button before going to test and just to be safe, exit and load FP again.

1599657878577.png

NOTE: As @TerryRed pointed out to me and it is also all over google thanks to him :D (just kidding, your tutorials are very welcome), FP disables TILT when using analog nudge so you'll have to live with that or find another way to do it.

If you need help or find something is missing feel free to post here or PM me. Enjoy.

/EDIT
I was recently made aware by @JLou5641 that if your pc is NOT in english you'll probably need the *english* dinput8.dll file. So i'll leave the zip file here, just in case, and if you need it, just extract it to your FP install folder.

/EDIT2
It was brought to my attention by @Turnbull here that if you use the DLL the Pinscape entry is gone from controls options. I've now tested this (didn't before because I use english Windows) and noticed that any controller except the mouse was gone so I can't recommend its use.
 

Attachments

  • dinput8.zip
    89 KB · Views: 129
Last edited:
Excellent stuff!

I would also recommend the user set all their other controls used first, like buttons, and make sure they are good to go before doing this (to be sure they won't get lost when making other changes).


Here is my solution for analogue nudge users to get a working tilt warning...


TILT solution for analogue nudge (FP won't trigger TILT warnings with analogue nudge):

@ravarcade If you can think of a better solution (preferably one that doesn't involve editing each table script) ...please let me know :)

- use a real tilt bob in your cabinet, and wire it to your controller for a dedicated tilt warning key
- change FP controller settings if needed to remove any conflicts with your tilt warning key of choice.
- as an example, T key is used in VP. If you want to use T (but T by default is TEST in FP), you can change TEST to another key.
- save FP controller settings, then exit and restart FP first!
- edit each table's script to use the tilt bob function


Edit Table Script for Analogue TILT BOB function:

For the example below, I am using keycode 20 (T), but you can use whatever key you want. (See the FP manual for all the keycodes you can use).


Somewhere in the script, you need to add this tilt bob variable. We need to do this because we can't change the TiltWarning value in script (its READ ONLY). So this will be a way to track tilt warnings specifically only for analogue nudge users.

Code:
Dim tilt_warnings_tilt_bob: tilt_warnings_tilt_bob=0


Then add this code to the top of Sub FuturePinball_KeyPressed. This is what will trigger the Tilt Warning if your Tilt Bob key is pressed during gameplay.

Code:
Sub FuturePinball_KeyPressed(ByVal KeyCode)

    If (KeyCode = 20) and (fpGameInPlay = TRUE) Then FuturePinball_TiltWarning(1)


Add this code to Sub FuturePinball_TiltWarning. This will add to the TILT Warning count (for tilt bob only).

NOTE: the value of 5 warnings is used here! You need to specify this (to how many warnings you want) as I don't know how to retrieve the table settings for max Tilt Warnings.

Code:
Sub FuturePinball_TiltWarning(ByVal Warnings)

    tilt_warnings_tilt_bob = tilt_warnings_tilt_bob + 1
    if tilt_warnings_tilt_bob >= 5 then fpTilted = true : FuturePinball_Tilted: Exit Sub


Then you will want to add this the the Sub FuturePinball_Tilted()


Code:
Sub FuturePinball_Tilted()

    tilt_warnings_tilt_bob = 0


...and then you need to add tilt_warnings_tilt_bob = 0 in any part of the script that changes fpTilted = FALSE to be sure our tilt warnings are reset.

The way this is used will vary by each table so pay attention.


Code:
fpTilted = FALSE
tilt_warnings_tilt_bob = 0


....and that's it!

It may seem like a pain...but it's the only solution I know of that works.


For those without a real Tilt Bob, but still use a KL25Z (pinscape):

You could always use a program to map a "range" of your nudge axis to trigger the Tilt Bob key.

So the idea being that if your X axis reaches -80% or less, or more than 80% then the T key would be triggered.

I used to use PGP (Pinnacle Game Profiler).... but sadly the author passed away...and the official site has been hacked (and may install malware). So you need to find another program that does similar.

I know DOFLinx also has a similar function for adding a nudge key triggered from pinscape.

Good luck!
 
Last edited:
I expected nothing less from you @TerryRed
Perfect post to complete the tutorial.
Problem is that I now have to build a mini tilt bob... :)
 
Great stuff but even at 16 i really got to shake my table hard would I then adjust deadzone?
 
Guys,

Someone on a different forum found that he could not change the NudgeX checkbox from -none- to "X-Axis". It was determined that your OS native language must be set to US English. For some reason, FP only works to pick an axis in native English.

George
 
THANK YOU!! I had to try this twice, and it was user error on my behalf. Once I copied the registry values exactly for the highighted and underlined....then went to FP and copied your screenshot by turning off the other buttons and such...Finally I set deadzone to 0...relaunched FP and loaded Superman. Based on @outhere 's advice I caught the ball with my flipper and nudged my cabinet and I could see it working! Thanks again!!
 
This worked great, but the left and right nudge seem to be reversed? I can flip vpx and fx3 around but I would rather fix in fp.
Forward nudge is working fine.
 
This worked great, but the left and right nudge seem to be reversed? I can flip vpx and fx3 around but I would rather fix in fp.
Forward nudge is working fine.
Try switching you nudgex and nudgey X and Y axis
 
Sorry I’m not at home to try. What other options are there on the drop down? -X ?
 
There are no other options, this is why I am asking?
 
@lafester I'm not sure that this will help, but have you read through the recent Future Pinball Nudge/Tilt Tutorial thread where the update/amendment of BAM left/right nudge xml angle settings could possibly give you your end result..? Assuming that BAM is installed.

I was thinking of swapping the values from:

leftAngle="60" upAngle="0" rightAngle="320"

to:

leftAngle="320" upAngle="0" rightAngle="60"

Although I may have missed interpreted your query.... this happens a lot ...
 
This worked great, but the left and right nudge seem to be reversed? I can flip vpx and fx3 around but I would rather fix in fp.
Forward nudge is working fine.
I think the problem is that FP has the incorrect keys assigned for nudge. The left and right are reversed. I fixed it in the FP editor by exchanging the 2 keys on my keyboard. Of course, that does not work on a cabinet. @TerryRed posted a way of fixing it on another forum but I couldn't find the posting. It was on Discord which has a terrible search engine. All I remember is that he changed the setting in a front end program in some way and it seemed he flipped vpx and fx3 as you said but not sure. Hopefully, he will read this and post the answer.
 
The default "Tilt" of Fp, is another bug, which could not be updated .... because even if you put your ideal number of "tilt" in the editor of fp, it doesn't work well, you put for example 2 , as in this image below,

Cattura2.JPG
and you will notice that sometimes more than two shots are needed to activate the "tilt" so you have to act, in two new ways:

1) Use BAM, via XML, and modify the "nudge" parameter,like this:
' <nudge impulse="240.0" impulseRandomness="25.0" warningLevel="100" leftAngle="60" upAngle="0" rightAngle="320"
' vectorRandomness="4" visualDistance="2" waitPeriod="300" maxBallVelocity="1000.0"></nudge>>

2) Create a new code(if you want) like this:
Dim NudgeShot

Sub FuturePinball_TiltWarning(ByVal Warnings)
' your light effect and sound
TiltLights.Play SeqBlinking, , 6, 100: PlaySound "fx-tilt warning": PlaySound "fx-nudge"
NudgeShot = NudgeShot + 1
Select Case (NudgeShot)
Case 1:
Case 2: TimerWarningRecovery.Set False: TimerWarningRecovery.Set True, 5000
End Select
End Sub

Sub TimerWarningRecovery_Expired()
If NudgeShot > 1 and fpTilted = FALSE then
Playsound"fx-recharge"
NudgeShot = 0
End if
End Sub


Sub FuturePinball_Tilted()
If NudgeShot < 2then fpTilted = FALSE: Exit Sub
PlaySound "Tilt": PlaySound "fx-nudge"
NudgeShot = 0
'your game reset here
LeftFlipper.SolenoidOff
RightFlipper.SolenoidOff
TiltRecoveryTimer.Interval = 2000
TiltRecoveryTimer.Enabled = TRUE
End Sub

In this way, you have a "Tilt" functioning well, which responds to the blows, but also that you have the possibility of recovering the previous blow given before, in a period of time to be defined, if instead you give two blows one after the other you have the tilt.
I set it to two, but if you prefer more than two, you can change it.

this way was devised by @Gimli .
 
@lafester I'm not sure that this will help, but have you read through the recent Future Pinball Nudge/Tilt Tutorial thread where the update/amendment of BAM left/right nudge xml angle settings could possibly give you your end result..? Assuming that BAM is installed.

I was thinking of swapping the values from:

leftAngle="60" upAngle="0" rightAngle="320"

to:

leftAngle="320" upAngle="0" rightAngle="60"

Although I may have missed interpreted your query.... this happens a lot ...
Yes, I read through that and it seems to be focused on tilt settings. The short section on physics xml implies that I have to do this for each table? I have the xml and see the values you want to change but am not sure what to do with it.
 
I think the problem is that FP has the incorrect keys assigned for nudge. The left and right are reversed. I fixed it in the FP editor by exchanging the 2 keys on my keyboard. Of course, that does not work on a cabinet. @TerryRed posted a way of fixing it on another forum but I couldn't find the posting. It was on Discord which has a terrible search engine. All I remember is that he changed the setting in a front end program in some way and it seemed he flipped vpx and fx3 as you said but not sure. Hopefully, he will read this and post the answer.
Well I can flip the board in pinscape, reversing the direction of the nudge. vpx has a simple reverse checkbox in settings and fx3 just uses keys that I can map how I want. This seems to be the easiest option at the moment.
 
I Know this is old but I haven't found an answer on how to get nudge working with the AtGames Pinball Machine. Anyone have ideas on that one ?
 
I Know this is old but I haven't found an answer on how to get nudge working with the AtGames Pinball Machine. Anyone have ideas on that one ?
IIRC, @shiva has one. If he's not too busy, he may see this, drop in and offer a suggestion.

You will probably want to provide as much details as possible to help give context to the issue. What things you've read, what you've tried...
 
No idea. Sorry. Don't have a unit anyway (1200+ up here, plus all sorts of taxes, so not worth it by my book)

As far as I know, AtGames hasn't shared the code needed to enable their nudge system with us.
 
No idea. Sorry. Don't have a unit anyway (1200+ up here, plus all sorts of taxes, so not worth it by my book)
Ah damn, totally misremembered that. :/
 
IIRC, @shiva has one. If he's not too busy, he may see this, drop in and offer a suggestion.

You will probably want to provide as much details as possible to help give context to the issue. What things you've read, what you've tried...
Thanks. I have tried setting up the keys and stuff in preferences. Maxed out the haptics in the ALP settings. In VPX I can get side nudge with keys tho I don't believe it really does anything. Ball still goes straight down the drain. No forward nudge at all.
Don't know if the ALP would need bigger/better accelometers (is that right word/term for it), or different hardware hooked up or just not seeing it in the software.
Thanks for the help and time.
 
The ALP doesn't use the correct axis needed for FP to work using Analogue nudge, if I recall.

For the buttons.... only D-PAD works for digital nudge with game controllers.... and you can't reassign it. Keys however can be changed to whatever you want in FP settings.
 
Guys,

Someone on a different forum found that he could not change the NudgeX checkbox from -none- to "X-Axis". It was determined that your OS native language must be set to US English. For some reason, FP only works to pick an axis in native English.

George

No fix for this? I don't want to reinstall everything on my cab just to have analoge nudge on FP...
Does FP maybe use the registry entries anyway? Could someone with an US english Windows and a KL25Z post his registry entries, so I could copy-paste (or actually import) them to try out?
Thank you.
 
No fix for this? I don't want to reinstall everything on my cab just to have analoge nudge on FP...
Does FP maybe use the registry entries anyway? Could someone with an US english Windows and a KL25Z post his registry entries, so I could copy-paste (or actually import) them to try out?
Thank you.

No fix that I know of... as FP is closed source and the main exe hasn't changed in over 13 years.
 
@ravarcade

Can you fix it so we can pick an axis in languages other than native English?
 
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
      Chat Bot Mibs Chat Bot Mibs: roachie has left the room.
      Back
      Top