Jump to content

Starting Pinball Fx2/bam/future Dmd And Farsight's Pinball Arcade With Hyperpin (Uses Modified Fplaunch1.295Wip10)


SirCheddar

Recommended Posts

I posted this mod on VPF quite a while ago. I always felt it should also be available on VPU, but I didn't post it here because I am a lazy bum.
I added support for BAM and Future DMD today and decided it is time to post it here, too.
 
Since the main issue (me being a lazy bum) hasn't been resolved yet I just c&p'd everything from VPF. Suggestions and bug reports are welcome on both sites :)
 
----------------------

Edit: Updated to v1.4
Changes:
v1.4
- Added support for the Steam version of The Pinball Arcade (FarSight Studios).
- Prepared for backglass on second screen support for Pinball Arcade. Install in Steam\Images directory like the Pinball FX2 version. Needs appkiller.exe to work. Thanks again, BigBoss!
v1.3
- Added support for Better Arcade Mode. Thanks to Rafal/ravarcade for this piece of awesomeness.
fpexetables.txt for different FP.exe names is supported. BAM executable must be [Future Pinball Directory]\BAM\FPLoader.exe
- Added support for Future DMD. Thanks to gauntletlover for creating it and to Marco for making it all possible by developing fp-intercept.
v1.2
- Removed the -silent parameter for steam.exe. It seems to make a few problems if steam thinks it's in offline mode.
- Beautified things a bit. Thanks, Zarquon!
- Added an PinballFX2.fpt file to the attachment.
v1.1
- Remapped 5 key to tab. Please change your key binding for ViewMode in the in-game keyboard settings to tab. This allows you to use your coin button to switch between camera modes and for menu navigation.
- Got rid of display changer. Pinball FX2 now supports screen rotation in the options, so we don't need this workaround anymore.
- Prepared for Backglass on 2nd screen support. For it to work you need appkiller.exe in your steam\images directory. Thanks, BigBoss!
 
Note: Installing 2nd screen support for Pinball FX2 and/or Pinball Arcade isn't required for this mod to work.
 
This mod is based on Bigboss's Slamit Bigscore support routine.
 
This mod supports the official/licensed versions of Pinball Arcade and Pinball FX2 only. As far as I know the Steam Store is currently the only legal source for both products. If you need help to run an unlicensed/pirated copy of those games feel free to ask in the thread but please don't expect me to answer. 
 
The following instructions were updated for installing v1.4. Added instructions for Pinball Arcade.
 
-----------
 
*****Pinball FX2*****
 
Pinball FX2's keyboard settings are pretty limited at the moment, but I got most of it to work on my pincab. For keyboard bindings I recommend, assuming your Pincab has two flpper buttons and two magnasave buttons:
 
Left flipper button: left arrow key
Right flipper button: right arrow key
Left magnasave button: arrow up
Right magnasave button: arrow down
 
Also, I'm assuming you are using an IPac in your cab. If you are using a Nanotech kit, you may need a program like xpadder to emulate a keyboard.
 
These bindings work flawlessly with FP and VP. SlamIt Pinball works too, but you need to remap a few keys in FPLaunch.afk
If you don't wan't to go with these bindings you can modify FPLaunch.ahk to your liking.
 
For Pinball FX2 I recommend:
Left Flipper - left arrow
Right Flipper - right arrow
ViewMode - Tab
Nudge Left -  arrow up
Nudge Right - arrow down
 
 
*****Pinball Arcade*****
 
Pinball Arcade is a lot friendlier for Cab use when it comes to key bindings. Unlike Pinball FX2 we can change the keys for menu navigation.
The following recommendation is for using Pinball Arcade together with Pinball FX2 if you have configured your flipper buttons like in my recommendation.
If you don't plan to install Pinball FX2 just set PA's bindings to whatever fits your Cab.
 
Left Flipper - left arrow
Right Flipper - right arrow
2nd Left Flipper - arrow up
2nd Right Flipper - arrow down
Plunger - enter
Plunger Button - enter
Change Camera - [coin button]
Toggle Camera Lock - 2 [extra ball button]
Pause - [exit button]
Menu Back - [exit button]
Menu Select - enter
Menu Left - arrow left
Menu Right - arrow right
Menu Up - arrow up
Menu Down - arrow down
 
 
Configuration:
 
1a) Pinball FX2
Copy the PinballFX2.fpt file from the attachment in your FP Tables directory - or create an empty file with that name there.
 
Import this in your Future Pinball.xml:
 
<game name="PinballFX2">
    <description>Pinball FX2</description>
    <manufacturer>Zen Pinball</manufacturer>
    <year>2013</year>
    <type>OG</type>
  </game>
1b) Pinball Arcade
- To automatically rotate the screen to portrait get either Display Changer or iRotate. Install to the default directory of the respective program. iRotate seems to work better with XP, I prefer Display Changer.
FPLaunch tries to start iRotate first, if it isn't available it tries to use Display Changer. Display Changer will also work if you have a copy of dccmd.exe (nothing more is needed) in c:\Hyperpin or in your file search path.
 
- After installing iRotate or Display Changer start PBA-config.exe to set the screen resolution in portrait mode.  PBA-config is included in the attached ZIP file together with the modded FPLaunch.exe.
 
- Copy the ThePinballArcade.fpt file from the attachment in your FP Tables directory - or create an empty file with that name there.
 
- Import this in your Future Pinball.xml:
 
 <game name="ThePinballArcade">
    <description>Pinball Arcade</description>
    <manufacturer>FarSight Studios</manufacturer>
    <year>2013</year>
    <type>OG</type>
  </game>
 
2)
Replace FPLaunch.exe and FPLaunch.ahk in your HyperPin directory with the attached version 1.4
 
If everything works correct you should be able to control Pinball FX2 and/or Pinball Arcade with your flipper buttons (left and right) and your magnasave buttons (up and down)
Both start button and launch ball button should work as Enter for selecting a table and using the plunger.
The Exit key (I'm assuming you set it to "e") is mapped to Escape for Pinball FX2 so you can use it to exit from settings. For Pinball Arcade you can configure the exit key.
For exiting Pinball FX2 use the arrow keys to go to "Exit Game" and use your Lauch Button to select it. Pinball Arcade needs to be exited by navigating to the exit button too.
 
 
 
Feel free to ignore the rest of this post if you don't plan to do any changes on the code yourself. (Code is also updated to v1.4)
 
 
If you want to edit FPLauch.afk manually, here are my changes
 
To compile FPLaunch.exe get AutoHotkey_L_Install.exe from http://www.autohotkey.com/
During installation select "Custom Installation" (not "Express Installation"), then ANSI 32-bit.
(@Blur: Feel free to rip anything and everything out that is of use for you)
 
 
Line 538
 
replace
;**********************************FUTURE PINBALL***********************************
if (systemName = "Future Pinball") {
if (tableName = "BigScore") { ; bigboss slamit bigscore support
GoSub SlamitBigScore
} else {
GoSub bigbossfp ; bigboss support for different exe
if (useExitScreen = "true")
exitmeth = ExitScreen
else if (useExitAsPause = "true")
exitmeth = PauseFP
else
exitmeth = CloseFP
; fp needs $ or it will not get the key
; * enables any modifier (shift, ctrl, alt)
; * breaks long press functionality - removed
Hotkey $%exitKey%, %exitmeth%
Hotkey, $%exitKey1%, %exitmeth%
Hotkey, $%editTableKey%, ShowFP
Hotkey, $%printScreenKey%, printScreen
Hotkey, $%printBGKey%, printBG
Hotkey, $%instructionsKey%, Instructions
Hotkey, $%flyerKey%, Flyer
if (saveFPTables = "true") {
Hotkey, $ScrollLock, SetSaveFPNeeded
Run, "%emuPath%\%executable%" /open "%tablePath%\%tableName%.fpt" /play /arcaderender,,Min UseErrorLevel
} else
Run, "%emuPath%\%executable%" /open "%tablePath%\%tableName%.fpt" /play /Exit /arcaderender,,Min UseErrorLevel
with
;**********************************FUTURE PINBALL***********************************
if (systemName = "Future Pinball") {
if (tableName = "BigScore") { ; bigboss slamit bigscore support
GoSub SlamitBigScore
} else if (tableName = "PinballFX2") { ; modified bigboss routine for Pinball FX2
GoSub PinballFX2
} else if (tableName = "ThePinballArcade") { ; modified bigboss routine for Pinball Arcade
GoSub PinballArcade
} else {
GoSub bigbossfp ; bigboss support for different exe
 
;Support for FuturedDMD. I didn't use the close=1 option since it didn't work with different FPexe names on my system - Sir Cheddar
IfExist %emupath%\FutureDMD.exe
Run, "%emupath%\FutureDMD.exe" table="%tableName%",%emuPath%,hide UseErrorLevel
 
if (useExitScreen = "true")
exitmeth = ExitScreen
else if (useExitAsPause = "true")
exitmeth = PauseFP
else
exitmeth = CloseFP
; fp needs $ or it will not get the key
; * enables any modifier (shift, ctrl, alt)
; * breaks long press functionality - removed
Hotkey $%exitKey%, %exitmeth%
Hotkey, $%exitKey1%, %exitmeth%
Hotkey, $%editTableKey%, ShowFP
Hotkey, $%printScreenKey%, printScreen
Hotkey, $%printBGKey%, printBG
Hotkey, $%instructionsKey%, Instructions
Hotkey, $%flyerKey%, Flyer
 
;Start Future Pinball using BAM\FPLoader.exe if available
IfExist %emupath%\BAM\FPLoader.exe
{
if (saveFPTables = "true") {
Hotkey, $ScrollLock, SetSaveFPNeeded
Run, "%emuPath%\bam\fploader.exe" /FPEXE:"%executable%" /STAYINRAM /open "%tablePath%\%tableName%.fpt" /play /arcaderender,,Min UseErrorLevel
} else
Run, "%emuPath%\bam\fploader.exe" /FPEXE:"%executable%" /STAYINRAM /open "%tablePath%\%tableName%.fpt" /play /Exit /arcaderender,,Min UseErrorLevel
} else {
if (saveFPTables = "true") {
Hotkey, $ScrollLock, SetSaveFPNeeded
Run, "%emuPath%\%executable%" /open "%tablePath%\%tableName%.fpt" /play /arcaderender,,Min UseErrorLevel
} else
Run, "%emuPath%\%executable%" /open "%tablePath%\%tableName%.fpt" /play /Exit /arcaderender,,Min UseErrorLevel
}
Search for "bigboss Slamit support remaps"
 
Paste this between #IfwinActive and "KILL COMMANDS"
 
;same for PinballFX2
;Remap your keys as needed, set your exitkey to Escape if it isn't e
#IfWinActive ahk_class PxWindowClass
1::Enter
;%exitKey%::Escape ;I couldn't figure out how to set %exitkey% to Escape - Sir Cheddar
;%exitKey1%::Escape
e::Escape
5::tab
#IfWinActive
 
;bindings for Pinball Arcade
;Remap your keys as needed, set your exitkey to Escape if it isn't e
#IfWinActive ahk_class Pinball Arcade
1::Enter
#IfWinActive
Search for "CloseFP:"
 
insert before WinClose, ahk_class FuturePinball
IfExist %emupath%\FutureDMD.exe
Process, close, FutureDMD.exe
 
Search for "CloseSlam:"
 
replace
 
CloseSlam:
toLog("CloseSlam Called")
WinClose, ahk_class SlamIt Pinball - Big Score
goto ExitScript
return
 
with
 
CloseSlam:
toLog("CloseSlam Called")
WinClose, ahk_class SlamIt Pinball - Big Score
goto ExitScript
return
 
; modified big boss bigscore routine for PinballFX2 - Sir Cheddar
PinballFX2:
RegRead, SteamDirPath, HKLM, Software\Valve\Steam, InstallPath
toLog("PinballFX2 Called")
;Hotkey, $%exitKey%, CloseFX2
;Hotkey, $%exitKey1%, CloseFX2
 
;- Modify your ShowBackGlass command line options for FX2 here
IfExist %steamdirpath%\images\ShowBackglass.exe
IfExist %steamdirpath%\images\gui2.pxp.bmp
Run, ShowBackglass.exe /left=1916 /top=-4 /width=1928 /height=1088 /picture=gui2.pxp.bmp ,%SteamDirPath%\images
 
Run, "%SteamDirPath%\Steam.exe" -applaunch 226980,,UseErrorLevel
Process, wait, Pinball FX2.exe
Gui, destroy
Process, WaitClose, Pinball FX2.exe
IfExist %steamdirpath%\images\appkiller.exe
Run, %SteamDirPath%\Images\appkiller.exe ShowBackglass.exe 0,,UseErrorLevel
goto ExitScript
return
 
CloseFX2:
toLog("CloseFX2 Called")
Process,Close,Pinball FX2.exe
Process, WaitClose, Pinball FX2.exe
IfExist %steamdirpath%\images\appkiller.exe
Run, %SteamDirPath%\Images\appkiller.exe ShowBackglass.exe 0,,UseErrorLevel
goto ExitScript
return
 
; modified big boss bigscore routine for The Pinball Arcade - Sir Cheddar
PinballArcade:
RegRead, SteamDirPath, HKLM, Software\Valve\Steam, InstallPath
toLog("TPA Called")
 
ProgFiles := ProgFiles32()
dcworkdir =
dcparamlandscape =
dcparamportrait =
dcexe =
 
IfExist, %ProgFiles%\iRotate\iRotate.exe
{
dcworkdir = %ProgFiles%\iRotate\
dcparamlandscape = /rotate=0
dcparamportrait = /rotate=90
dcexe = iRotate.exe
} Else {
IfExist, %ProgFiles%\12noon Display Changer\dccmd.exe
dcworkdir = %ProgFiles%\12noon Display Changer\
IfExist, c:\Hyperpin\dccmd.exe
dcworkdir = c:\Hyperpin\
dcparamlandscape = -rotate=up
dcparamportrait = -rotate=right
dcexe = dccmd.exe
}
 
run, "%dcworkdir%%dcexe%" %dcparamportrait%,,UseErrorLevel
 
;- Modify your ShowBackGlass command line options for Pinball Arcade here
If FileExist("%steamdirpath%\images\ShowBackglass.exe") && FileExist("%steamdirpath%\images\PinballArcade.bmp")
IfExist %steamdirpath%\images\ShowBackglass.exe
IfExist %steamdirpath%\images\PinballArcade.bmp
Run, ShowBackglass.exe /left=1916 /top=-4 /width=1928 /height=1088 /picture=PinballArcade.bmp ,%SteamDirPath%\images
Run, "%SteamDirPath%\Steam.exe" -applaunch 238260,,UseErrorLevel
Process, wait, PinballArcade.exe
Gui, destroy
Process, WaitClose, PinballArcade.exe
 
IfExist %steamdirpath%\images\appkiller.exe
Run, %SteamDirPath%\Images\appkiller.exe ShowBackglass.exe 0,,UseErrorLevel
 
run, "%dcworkdir%%dcexe%" %dcparamlandscape%,,UseErrorLevel
goto ExitScript
return
 
ClosePBA:
toLog("ClosePBA Called")
Process,Close,PinballArcade.exe
Process, WaitClose, PinballArcade.exe
 
IfExist %steamdirpath%\images\appkiller.exe
Run, %SteamDirPath%\Images\appkiller.exe ShowBackglass.exe 0,,UseErrorLevel
 
run, "%dcworkdir%%dcexe%" %dcparamlandscape%,,UseErrorLevel
goto ExitScript
return
 
Note: If you are still running FPLaunch1.295wip9 or earlier and haven't updated to wip10 yet please do that update first. You can find the update here. Thanks, LoadedWeapon!

FPLaunch1.295wip10 Pinball FX2 mod v1.3.zip

FPLaunch1.295wip10 Pinball FX2+Pinball Arcade mod v1.4.zip

Link to comment
Share on other sites

thanks - quick question - i dont use Steam to call Pinball FX2 - i use the executable directly in Pinballx and it works in PinballX.

 

How and where can i edit it in FPLaunch so i can try it with hyperpin?

 

Any help would be appreciated.

Link to comment
Share on other sites

Thank you very much SirCheddar.

 

Will give this a go when i get home a bit later.

 

Can you perhaps help me on another issue i have please please?

Using your FPLaunch every time i launch a VP table or even a FP table in hyperpin it shows the loading table screen but also brings up the launchers for VP and for FP? For the life of me i can't figure out how to start fixing this.

This is my first time using Hyperpin.

Link to comment
Share on other sites

You mean it brings up the editor for VP or FP before loading the table?

That's normal behavior, although FPLaunch should hide most of it - it manages to hide all of it for VP on my cab. For FP it doesn't hide anything anymore after installing BAM, but let's just say BAM is more then worth it.

 

I don't know why FPLaunch doesn't manage to hide the editors on your cab. My guess is that it could depend on the version of the graphic drivers.

Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...

I'm hoping somebody here may have a suggestion for my problem...

 

I've got a custom AHK script (based on these) to will load up Pinball FX2 from within PinballX without any issues. However, as soon as the keypresses start, the first one is acknowledged, then the focus switches back to PinballX and PinballFX2 gets minimized.

 

I've tested the key scripts just in notepad, and they are working, just not while the games are running?!?

 

Frustration much! Help anybody?

 

EDIT: FIXED.

Link to comment
Share on other sites

  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...