Sbaby Posted December 18, 2024 Posted December 18, 2024 Hi š½ I've been using LaunchBox for years to run my pinball games (Future Pinball, Visual Pinball, Pinball FX (2023), Pinball M, Pinball FX3, Pinball Arcade, and Zaccaria Pinball) on a single screen in desktop mode, and everything was working perfectly. Recently, I wanted to try the PinUp Popper frontend to explore the 3-screen setup, including a vertical screen, temporarily excluding the fourth screen (my TV, which I usually use for desktop mode). Everything worked fine with the new setup. (For now, Iād like to focus only on the first 4 games listed above.) I had installed the emulators in separate folders thinking that I could keep both the LaunchBox desktop mode and the PinUp Popper 3-screen mode active. However, Iāve realized that these simulators are likely writing configuration files or even modifying system registries. As a result, even when launching from separate folders, I end up with rotated screens or incorrect configurations when launching from LaunchBox. I'm forced to adjust the configuration every time to return to desktop mode, which is not very convenient. I know that using separate computers or setting up a dual boot would be a better solution, but unfortunately, I'm working on the same Windows 11 setup. To be honest, I'd love to have two different ways to launch the pinball games based on how I feel for the evening. For example, if I want to stand in front of three screens, Iād use PinUp Popper, but if I want to relax on the couch, Iād prefer BigBox with a single screen and desktop mode. Maybe someone has already encountered this issue and can help me solve it with a script or other solution. For example, I'd like to create a script to run at the launch of the pinball games from LaunchBox that would activate desktop mode, and another script to switch to cabinet mode when I play with PinUp Popper. Iāve seen some registry files in the VisualPinball and Future Pinball folders, but Iām a bit scared to run themāwho knows what could happen? Ahahah! Iāve also come across some settings files for Pinball FX that I could maybe use, perhaps overwriting the file every time I launch, but Iām not sure. Iād prefer to ask first to see if anyone has already done this and can help me without me going through too many trial and error attempts. Thanks in advance! āŗļø Quote
JoeViking245 Posted December 20, 2024 Posted December 20, 2024 On 12/18/2024 at 3:09 PM, Sbaby said: I'm forced to adjust the configuration every time to return to desktop mode, which is not very convenient. I can only [possibly] help with Visual Pinball.Ā Ā First thing is to make note of exactly which settings are changed and what those settings are for the 2 configurations, respectively.Ā Next, find where those settings are saved to.Ā VPX had started going to saving certain settings to .ini(?) files (haven't taken the time [yet] to fully look into it).Ā These files can be per-table (which you don't need for what you're asking about) or global.Ā Other settings are still saved to registry.Ā Once you know the what's and where's, then you can start creating your scripts. One setting you'll need is for the ForceDisableB2S.Ā Which (at least used to be [via old notes]) is located in the registry underĀ [HKEY_CURRENT_USER\SOFTWARE\Visual Pinball\Controller].Ā To change that, (one way is to) create a .reg file (i.e. B2Son.reg) that contains: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\SOFTWARE\Visual Pinball\Controller] "ForceDisableB2S"=dword:00000001 Create a 2nd file (i.e. B2Soff.reg) with the same text and change the last "1" to a "0".Ā Then just double click one or the other of the files to change it.Ā Once you've confirmed that works, then it's just a matter of transposing that into AHK (or batch file) lingo. Then there's theĀ ScreenRes.txt file in which you set the screen number(s), screen positions etc.Ā This [can be] a global settings file in which you could have 2 copies of (one for each configuration) and then your script could copy and rename for the one to be used/loaded. It's been a while since I messed with this, and it may even be an easier process.Ā (i.e. command-line parameters to load certain configs?)Ā But noting exactly what needs changed between the 2 (for your setup) needs to be spelled out 1st. Quote
Sbaby Posted December 21, 2024 Author Posted December 21, 2024 (edited) I thank you for the path you have set me on Iāve realized that with three screens in cabinet mode, I prefer using the 32-bit version of VisualPinballX.exe, while in desktop mode, I find the 64-bit version VisualPinballX64.exe works better. This is mainly because the 32-bit version is far more compatible with all the tables I have, both old and new, whereas the 64-bit version performs very well in desktop mode. For the 32-bit version, switching between desktop and cabinet modes is simple. I save the entire registry folder HKEY_CURRENT_USER\Software\Visual Pinball into two .reg files: one configured for cabinet mode and the other for desktop mode. When launching the game, I just run the appropriate .reg file to apply the desired settings. However, Iāve noticed an issue: disabling the B2S doesnāt work properly. Although the .reg file saves all the other settings, it doesnāt save the one related to B2S, so the backglass ends up overlapping the screen. Renaming the backglass every time I launch a game would be too cumbersome and time-consuming. The solution I found is to use the 64-bit version for desktop mode. This version saves configurations not in the registry but in a configuration file: C:\Users\"user"\AppData\Roaming\VPinballX\VPinballX.ini. By adding the line ForceDisableB2S = 1 to this file, the issue is resolved perfectly. Another important configuration is for the DMD, either internal or external. Unfortunately, I have a small number of tables that wonāt show the internal DMD in desktop mode alongside the external one, unless I press F1 and set it there. This is inconvenient because it breaks my streamlined startup process. I've tried tweaking things a bit, but I can't figure out the problem. Basically, when everything is set to external DMD (without selecting āshow internal DMDā), all tables show it indifferently and correctly even in desktop mode. Ā ... well, that's exactly what I want. . this allows me to not even edit the screenres config . It seems like thereās a variable in the code that says, "if youāre in desktop mode, enable the internal DMD as well," but some tables still donāt display it. These tables are few, but itās annoying, and Iām forced to press F1 to enable it.do you have any ideas? Edited January 3 by Sbaby Quote
JoeViking245 Posted December 21, 2024 Posted December 21, 2024 1 hour ago, Sbaby said: It seems like thereās a variable in the code that says, "if youāre in desktop mode, enable the internal DMD as well," but some tables still donāt display it. These tables are few, but itās annoying, and Iām forced to press F1 to enable it. When you edit the table then open the Script Editor, you'll see something like If Table1.ShowDT = true then UseVPMColoredDMD = true VarHidden = 1 Else UseVPMColoredDMD = False VarHidden = 0 End If or Dim DesktopMode: DesktopMode = Table1.ShowDT .... .... If not DesktopMode then l23bg.visible=0 l36bg.visible=0 l48bg.visible=0 l67bg.visible=0 l71bg.visible=0 l72bg.visible=0 l82bg.visible=0 End If In the 2nd one, 123bg through 182bg are the elements that comprise the tables built-in DMD. (shown for reference) Ā In either case (and those are just examples), you can force set the show-desktop("ShowDT")/desktop-mode to True.Ā Ā i.e.Ā change to DesktopMode = True. Quote
JoeViking245 Posted December 22, 2024 Posted December 22, 2024 On 12/21/2024 at 2:40 PM, Sbaby said: It seems like thereās a variable in the code that says, "if youāre in desktop mode, enable the internal DMD as well," but some tables still donāt display it. These tables are few, but itās annoying, and Iām forced to press F1 to enable it. Update... Looks like you may be able to a table override from the tablesĀ configuration file.Ā Didn't test it.Ā But looks feasible.Ā If the table doesn't have a configuration file, just create a text file with the same name as the tables .vpx filename, and give it the file extension .ini Quote
Sbaby Posted December 23, 2024 Author Posted December 23, 2024 (edited) Summary of the situation I want to provide a quick summary to clarify the situation. I have installed Pinup Popper Baller, which automatically configures my three screens and the display settings for Visual Pinball and Future Pinball, including the positions of the DMD and FlexDMD. In cabinet mode, I have no issues with any ROMs or tables; everything displays correctly. The default system registry for the DMD related to the ROMs is configured as shown in the attached image. HKEY_CURRENT_USER\Software\Freeware\Visual PinMAME\ In this mode, I use the 32-bit executable VPinballX.exe, which records changes in: HKEY_CURRENT_USER\Software\Visual Pinball There are no issues with any of the 20 tables Iām currently testing. I believe the DMD on the third screen is managed by FlexDMD and the dmdevice.ini file, which defines the position and display settings for the external DMD. (Perfect) Ā Switching to desktop mode To quickly switch to desktop mode and make it easier to use without making too many changes, I prefer using the 64-bit version, VPinballX64.exe. Unlike the 32-bit version, this one saves changes in an .ini file located here: C:\Users\"user"\AppData\Roaming\VPinballX\VPinballX.ini. For 15 out of the 20 tables, when launched in desktop mode, the internal DMD automatically activates (even though itās disabled in the system registry for both the ROMs and the default setting). This likely happens because itās configured in the table script to activate in desktop mode. This functionality works perfectly for me because it avoids using the FlexDMD and doesnāt require me to move it manually inside the playfield. Additionally, in desktop mode, the FlexDMD is still activated but remains in the background beneath the playfield screen. This works perfectly for me since itās not visible. WinDMD active and visible FlexDMD active but not visible I am aware of the dmdevice.ini file, where the position of FlexDMD can be configured, but I prefer not to move it because I already have custom coordinate settings based on the background image for cabinet mode (3screen) Ā Ā Problem with 5 tables The issue lies with the other 5 tables, which do not automatically display the internal DMD. Iāve tried the methods you suggested, but each script is different, and even after adjusting settings, I still couldnāt get it to work. I also wasnāt able to get it working by modifying the associated .ini file for the table. The only solution I found was to create a .reg file for each table that activates the internal DMD by modifying the registry under the ROM entry: HKEY_CURRENT_USER\Software\Freeware\Visual PinMAME\romname. This method works: Iāve set up an additional app (Additional Apps) in LaunchBox to trigger the registry and set ShowWinDMD to 1 at launch and return it to 0 upon exit. While this system works, I have to admit Iām not thrilled with it because it modifies the entire ROM configuration, not just that one parameter. If I change any ROM settings, I need to recreate the .reg files. For now, this works, but Iād like to know: Is there a command line that can change only that registry parameter? Or, can it be set directly in the .ini file in some way? With this method, Iāve solved the issue for 3 of the 5 tables. Ā Remaining tables There are two remaining tables that I don't know how to fix: Star Trek 25th Anniversary (Data East 1991) Secret Agent (Original 2024) v1.0 For Secret Agent, I understand the problem since it doesnāt use MAME ROMs. But for Star Trek, which uses VPinMAME ROMs, I donāt understand why the internal DMD isnāt showing. Iām attaching the link for the tables that are having issues. There are no ROMs, of course.Ā https://we.tl/t-Q93b376MxS Iām looking forward to your suggestions, thank you! Ā --------------------------------------------------------------------------------------------------------------- Update 03-01-2025 Ā I decided to update all my Visual Pinball X tables to make them compatible with the latest 64-bit version. At this point, switching between modes becomes very straightforward: you just need to load a different INI file via the command line, one for desktop mode and one for cabinet mode. The two INI files can be easily placed in the emulatorās folder, and the command line looks like this: Ā Ā For desktop mode: VPinballX64.exe -ini VPinballX_DESKTOP.ini -minimized -exit -play For cabinet mode: VPinballX64.exe -ini VPinballX_CABINET.ini -minimized -exit -play The only parameters that differ between the two files are: ForceDisableB2S BGSet This makes switching between the two modes simple and efficient! Ā As for the DMD, letās continue the discussion below: Edited January 3 by Sbaby Quote
JoeViking245 Posted December 23, 2024 Posted December 23, 2024 11 hours ago, Sbaby said: Iāve set up an additional app (Additional Apps) in LaunchBox to trigger the registry and set ShowWinDMD to 1 at launch and return it to 0 upon exit. While this system works, I have to admit Iām not thrilled with it because it modifies the entire ROM configuration, not just that one parameter ItĀ willĀ only change the entries/parameters you have listed in the .reg file (like the example shown in my 1st response only has one entry).Ā If you saved/backed-up the entire reg section, yes, it will adjust all the ones listed. 11 hours ago, Sbaby said: For now, this works, but Iād like to know: Is there a command line that can change only that registry parameter? Indirectly, yes.Ā This is where we get 'creative'.Ā There aren't any command-line parameters specifically forĀ showwindmdĀ (DMD/Display Window) orĀ showpindmdĀ (external DMD (dll)).Ā But you can set/reset those in the tables script.Ā (SeeĀ When all else failsĀ below) Ā There're (up to 9)Ā Custom ParametersĀ you can pass to the tables script using -c1 [Value].Ā 'Value' is any word you want it to be, placed after -cxĀ (where x is a number 1 thru 9). i.e.Ā To pass the Value "joewashere" as parameter "1", your [LaunchBox] command-line parameters would be: -c1 joewashere -minimized -exit -play To get the parameters' Value from inside the script, useĀ GetCustomParam(1)Ā (where "1" is a number 1 thru 9, corresponding to the "x" in -cx) Ā Star Trek:Ā For this table, I don't think you need to change the 2 'show...dmd' registry entries. "I donāt understand why the internal DMD isnāt showing."Ā Ā The internal DMD for Star Trek is forced-hidden by default in the script.Ā It uses the same variable as shown in my 2nd post,Ā VarHidden.Ā And is hardcoded to "1" (line 47). To override this variable, check for the Value of the parameterĀ -c1, then reset the variable. (if the command-line parameters do not contain -c1 joewashere, this won't trigger nor error.) Ā Alternately: (Because I always love to give options) You can simply change the "1" to a "0" on line 47Ā inĀ a copy of the script.Ā No command line parameters required.Ā If VPX was setup correctly, you should be able to right-click the .vpx table (file) and select Extract VBS.Ā Or from the Windows Command Prompt, you can run VPinballx.exe -ExtractVBS "Star Trek 25th Anniversary (Data East 1991).vpx" This will create a new file "Star Trek 25th Anniversary (Data East 1991).vbs".Ā Edit that file (with any text editor), change theĀ "1" to a "0", and save. If a vbs file named the exact same as the table exists in the same folder as the table, it will override the tables internal script.Ā Rename the vbs file to something likeĀ "NO-Star Trek 25th Anniversary (Data East 1991).vbs" (anything that's not the exact same name as the table) if you wish the use the internal script.Ā Rename it back to the same name as the table to override the internal script. This method is nice because you can change all sorts of stuff in the extracted script file, then just rename the file to use the original table-script. From here, you can create a batch file / AHK script / whatever, that when ran will rename the file with/without "NO-" at the beginning, before launching the table. Ā Ā So....: Look for the variableĀ VarHiddenĀ in the script(s) and see what they're doing with it. Adjust accordingly.Ā "VarHidden" is commonly used, but someone may use a different word for it. If you don't see that particular variable 'name', you can [usually] see what they used inside the sub routineĀ Sub Table1_Init, for .hidden.Ā (The routine may just be called Sub Table_InitĀ [without the "1"].)Ā Either way, all tables will have aĀ something-something_Init Ā Ā When all else fails: If the above isn't working (i.e. Simpsons), and you do have to changeĀ showwindmdĀ and/orĀ showpindmd, you can add those into the above _Init routine. (Setting "True" or "False" to whatever they need to be.) ThisĀ WILLĀ change the Registry.Ā So you'll want to change them back when exiting the table.Ā Look forĀ Sub Table1_exit() (orĀ Sub Table_exit() [without the "1"]) and reset them. (Re-Setting "True" or "False" to whatever they need to be.)Ā These MUST be placed BEFORE Controller.Stop! Ā You can hard code this in theĀ extractedĀ script by removing theĀ IfĀ line andĀ End If.Ā Again, with this method, no command-line parameters are required.Ā But youĀ DOĀ still need the parts the "_exit()" sub routine. Ā Note: thisĀ When all else failsĀ section does the exact same thing as executing your .reg files.Ā Provided the .reg files only contain the 2 entries. Quote
Sbaby Posted December 24, 2024 Author Posted December 24, 2024 8 hours ago, JoeViking245 said: ... Thank you so much for everything! With your help, a lot of study, and a bit of AI, I was able to create VBS scripts that activate the DMD in desktop mode and hide it in cabinet mode. With Star Trek, it was quite simple: Dim DesktopMode: DesktopMode = Table1.ShowDT If DesktopMode = True Then Ā Ā VarHidden = 0 Ā Ā Ramp16.visible = 1 Ā Ā Ramp15.visible = 1 Ā Ā Primitive13.visible = 1 Ā Ā TransReel.visible = 1 Else Ā Ā VarHidden = 1 Ā Ā Ramp16.visible = 0 Ā Ā Ramp15.visible = 0 Ā Ā Primitive13.visible = 0 Ā Ā TransReel.visible = 0 End If Ā However, with other Bigus tables, I had to declare Dim WshShell and call the ROM's system registry, but in the end, it works great. For example, with Batman: Ā Sub Table1_Init Ā Ā ' Initialize the game Ā Ā vpmInit Me Ā Ā ' Declare the WshShell variable at the beginning Ā Ā Dim WshShell Ā Ā Set WshShell = CreateObject("WScript.Shell") Ā Ā Ā Ā Ā With Controller Ā Ā Ā Ā .GameName = cGameName Ā Ā Ā Ā If Err Then MsgBox "Can't start Game " & cGameName & vbNewLine & Err.Description: Exit Sub Ā Ā Ā Ā .SplashInfoLine = "Batman - The Dark Knight (Stern 2008)" Ā Ā Ā Ā .HandleKeyboard = 0 Ā Ā Ā Ā .ShowTitle = 0 Ā Ā Ā Ā .ShowDMDOnly = 1 Ā Ā Ā Ā .ShowFrame = 0 Ā Ā Ā Ā .HandleMechanics = 0 Ā Ā Ā Ā ' Detect the mode and set DMD visibility Ā Ā Ā Ā Dim DesktopMode: DesktopMode = Table1.ShowDT Ā Ā Ā Ā If DesktopMode = True Then Ā Ā Ā Ā Ā Ā ' Desktop Mode - Show the DMD Ā Ā Ā Ā Ā Ā .Hidden = 0 Ā Ā Ā Ā Ā Ā WshShell.RegWrite "HKEY_CURRENT_USER\Software\Freeware\Visual PinMame\bdk_294\showwindmd", 1, "REG_DWORD" Ā Ā Ā Ā Ā Ā If Err.Number <> 0 Then Ā Ā Ā Ā Ā Ā Ā Ā MsgBox "Error modifying the registry: " & Err.Description Ā Ā Ā Ā Ā Ā Ā Ā Exit Sub Ā Ā Ā Ā Ā Ā End If Ā Ā Ā Ā Else Ā Ā Ā Ā Ā Ā ' Cabinet Mode - Hide the DMD Ā Ā Ā Ā Ā Ā .Hidden = 1 Ā Ā Ā Ā Ā Ā WshShell.RegWrite "HKEY_CURRENT_USER\Software\Freeware\Visual PinMame\bdk_294\showwindmd", 0, "REG_DWORD" Ā Ā Ā Ā Ā Ā If Err.Number <> 0 Then Ā Ā Ā Ā Ā Ā Ā Ā MsgBox "Error modifying the registry: " & Err.Description Ā Ā Ā Ā Ā Ā Ā Ā Exit Sub Ā Ā Ā Ā Ā Ā End If Ā Ā Ā Ā End If Ā Ā Ā Ā ' Start the game Ā Ā Ā Ā On Error Resume Next Ā Ā Ā Ā .Run GetPlayerHWnd Ā Ā Ā Ā If Err Then MsgBox Err.Description Ā Ā Ā Ā On Error Goto 0 Ā Ā End With Ā Ā Ā It works perfectly! Ā -------------------------------------------- Ā I would still have one last question regarding VisualPinball: how can I make the internal DMD slightly larger by default? I manage fine with FlexDMD, but it seems the same approach doesn't work for the VPINMAME DMD. If I change it with the mouse, it doesn't maintain the size. Ā Ā 1 Quote
JoeViking245 Posted December 24, 2024 Posted December 24, 2024 10 hours ago, Sbaby said: However, with other Bigus tables, I had to declare Dim WshShell and call the ROM's system registry, but in the end, it works great. For example, with Batman: UsingĀ Ā Set WshShell = CreateObject("WScript.Shell") adds another layer to things.Ā I tested withĀ .Games(cGameName).Settings.Value("showwindmd")=FalseĀ [or True] and it worked fine.Ā AlsoĀ DesktopMode is already declared up on line 75 (Batman).Ā Though adding WshShell doesn't really hurt anything, it is one more 'layer'. To an external call (where an internal one already exists). Ā 10 hours ago, Sbaby said: how can I make the internal DMD slightly larger by default? I manage fine with FlexDMD, but it seems the same approach doesn't work for the VPINMAME DMD. If I change it with the mouse, it doesn't maintain the size. Right click the DMD Click Show Window Border Mouse to the lower right corner until you see the double arrow Click and drag to resize Click the window to drag/move to where you want it Click and hold.. wiggle/shake it a little (weird, I know) Right click and click Show Window Border (to hide the border) Click the playfield then exit/restart the table Ā Ā Quote
Sbaby Posted December 24, 2024 Author Posted December 24, 2024 2 hours ago, JoeViking245 said: UsingĀ Ā Set WshShell = CreateObject("WScript.Shell") adds another layer to things.Ā I tested withĀ .Games(cGameName).Settings.Value("showwindmd")=FalseĀ [or True] and it worked fine.Ā AlsoĀ DesktopMode is already declared up on line 75 (Batman).Ā Though adding WshShell doesn't really hurt anything, it is one more 'layer'. To an external call (where an internal one already exists). I tried adding what you suggested, but unfortunately, I canāt make it work in my script. I added WshShell because I was getting an error when trying to use vpmInit Me. Maybe my VPX configuration is different from yours; Iām not sure. Iām attaching my original VPX file in VBS format so you can take a look and perhaps figure out whatās wrong. If yĀ ou have any other suggestions or maybe a practical example, Iād be happy to try again. Thanks! Batman Dark Knight (Stern 2008)_Bigus(MOD)2.0.vbs Ā 2 hours ago, JoeViking245 said: Right click the DMD Click Show Window Border Mouse to the lower right corner until you see the double arrow Click and drag to resize Click the window to drag/move to where you want it Click and hold.. wiggle/shake it a little (weird, I know) Right click and click Show Window Border (to hide the border) Click the playfield then exit/restart the table That's exactly what I was doing! The only thing I hadn't tried was 'Click and hold... wiggle/shake it a little (weird, I know)'. Since I did it once, it works every time now. Incredible! How do you know all this stuff? Haha! Quote
JoeViking245 Posted December 24, 2024 Posted December 24, 2024 41 minutes ago, Sbaby said: Iām attaching my original VPX file in VBS format so you can take a look and perhaps figure out whatās wrong. Sounds like more work for me. lolĀ That was the only thing I had changed in the script when it worked. So if you had changed anything else in the script or maybe transposed my change... Ā 49 minutes ago, Sbaby said: That's exactly what I was doing! The only thing I hadn't tried was 'Click and hold... wiggle/shake it a little (weird, I know)'. Since I did it once, it works every time now. Incredible! How do you know all this stuff? Haha! "a lot of study". Ā But no AI stuff.Ā Glad you got it working! Quote
Sbaby Posted January 1 Author Posted January 1 (edited) On 12/24/2024 at 4:24 PM, JoeViking245 said: "a lot of study". Ā But no AI stuff.Ā Glad you got it working! Thank you for the clarification! Now that Iāve resolved the switch for Visual Pinball, Iām moving on to Future Pinball. After doing some research, I discovered a quick and effective way to make it work, and Iād like to share it with you. Ā FUTURE PINBALL Ā To summarize, I will not describe all the configurations of Future Pinball for Desktop and for Cabinet. In summary, the .reg file covers everything that is configurable through the program options, such as displays, graphics, and screen rotations. The three zipped files, on the other hand, concern the BAM configurations. I created two separate launchers for the Future Pinball frontend with BAM, one for Desktop Mode and one for Cabinet Mode. Both launchers perform similar operations, but with specific configurations for each mode. Ā The operation is as follows Ā : Enter the registry with regedit here HKEY_CURRENT_USER\Software\Future Pinball and export future pinball configurations for desktop mode and then save another one for cabinet mode Run the registry file : For Desktop mode: BAM_reg_for_desktop_SBABY.reg For Cabinet mode: BAM_reg_for_cabinet_SBABY.reg Ā Extraction of BAM configuration files from a ZIP file: For Desktop mode: BAM_settings_for_desktop_SBABY.zip For Cabinet mode: BAM_settings_for_cabinet_SBABY.zip The extracted files are: bam.cfg default.cfg reality.dat These are overwritten in the BAM folder to ensure proper startup of the selected mode. I put 7z.exe and 7z.dll for convenience in the same folder as the script. Ā Starting the game via FPLoader.exe with the necessary parameters to automatically start the *.fpt table Below is an image with the DESKTOP MODE configuration for Launchbox Ā Script for the Launcher (Fake Emulator ahk to exe) in Desktop Mode ; Set the working directory to the one containing the .ahk file SetWorkingDir, %A_ScriptDir% ; Extract ZIP file RunWait, .\7z.exe x "BAM_settings_for_desktop_SBABY.zip" -o%A_ScriptDir% -y Sleep 300 ; Run the registry file RunWait, C:\Windows\regedit.exe /s "%A_ScriptDir%\BAM_reg_for_desktop_SBABY.reg" Sleep 100 ; Launch the game (FPLoader.exe) without blocking the script Run, "FPLoader.exe" /open "%1%" /play /exit Ā Script for the LauncherĀ (Fake Emulator ahk to exe) in Cabinet Mode ; Set the working directory to the one containing the .ahk file SetWorkingDir, %A_ScriptDir% ; Extract ZIP file RunWait, .\7z.exe x "BAM_settings_for_cabinet_SBABY.zip" -o%A_ScriptDir% -y Sleep 300 ; Run the registry file RunWait, C:\Windows\regedit.exe /s "%A_ScriptDir%\BAM_reg_for_cabinet_SBABY.reg" Sleep 100 ; Launch the game (FPLoader.exe) without blocking the script Run, "FPLoader.exe" /open "%1%" /play /exit Ā Ā Note : Some users also consider the \plugins\iCom.cfg file in addition to these three. I am currently using only the three files mentioned, and everything is functioning correctly. Ā Edited January 1 by Sbaby 1 Quote
Sbaby Posted January 7 Author Posted January 7 (edited) PINBALL FX (2023-2024) I don't want to go through the entire installation process for the cabinet and desktop modes step by step, because the PinballFX website explains very well how to copy the backglass images into the correct folders and activate the various cabinet mode functions. I just want to share what I've discovered regarding PinballFX configuration for quickly switching between the two modes. Ā PinballFX saves resolution and screen rotation settings in the file C:\Users\*USER*\AppData\Local\PinballFX\Saved\PersistentDownloadDir\Steam\LocalSettings.cfg (if the LocalSettings.cfg file is not present, see the note at the end of this post). Additionally, the information related to enabling cabinet mode (such as the position of the backglass and DMD on other displays) is stored in the file GAMEINSTALLDIR\PinballFX\Mods\Cabinet\Settings.ini Ā To simplify switching between modes, I created four separate files with distinct names: Ā LocalSettings_CABINET_MODE.cfg LocalSettings_DESKTOP_MODE.cfg Settings_CABINET_ON.ini Settings_CABINET_OFF.ini For the LocalSettings.cfg file, the only change I made was to the forcedDisplayRotation line. I set "forcedDisplayRotation": "Default" for desktop mode and "forcedDisplayRotation": "Rot_270" for cabinet mode. There's no need to use different resolutions for each file; just set the highest resolution of your best monitor (e.g., 3840x2160), as PinballFX automatically adjusts when switching monitors, such as from 4K to FullHD , and keeps the highest resolution supported by the monitor, never exceeding the one you set. For the Settings.ini file, simply set CabinetEnabled=False for desktop mode and CabinetEnabled=True for cabinet mode. Ā As for setting up the emulator in LaunchBox, I won't describe my script here since everyone can create their own as they prefer. In summary, you need to create a script that overwrites these files in the respective folders before launching the game. This way, you can quickly switch between desktop and cabinet mode directly from BigBox or LaunchBox. š Ā --------- Note : In some installations or versions of the software, some save files may not exist. If that's the case, youāll need to use the file: C:\Users\*USER*\AppData\Local\PinballFX\Saved\SaveGames\76561197960267366\settings.sav. However, in this case, you cannot manually edit the file with a text editor. Instead, follow these steps: Launch the game and save the settings for desktop mode (e.g., with the default screen rotation); Exit the game and copy the settings.sav file to another location with a different name; Launch the game again, save the settings for cabinet mode (e.g., with screen rotation set to 270 degrees); Exit the game and copy the settings.sav file again with another name.From this point on, the process is identical to the one described for the LocalSettings.cfg file, except that you will use the settings.sav file and its respective path instead. Edited January 10 by Sbaby 1 Quote
Sbaby Posted January 10 Author Posted January 10 PINBALL M For the other game Pinball M, the operations to perform are identical to those for Pinball FX, so I won't repeat them here: you can refer to the instructions above. The only difference, of course, is the folder paths, which are the same but with the path changed from \PinballFX to \PinballM. For the configuration files, the first path to use is: C:\Users\*USER*\AppData\Local\PinballM\Saved\PersistentDownloadDir\Steam\LocalSettings.cfg Or, depending on the game version: C:\Users\*USER*\AppData\Local\PinballM\Saved\SaveGames\76561197960267366\settings.sav For the cabinet elements, the path is: GAMEINSTALLDIR\PinballM\Mods\Cabinet\Settings.ini Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.