Jump to content



Photo
* * * * * 5 votes

Call for testing


  • Please log in to reply
1630 replies to this topic

#1221 SandraMe

SandraMe

    Neophyte

  • Members
  • Pip
  • 6 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 11 October 2020 - 06:16 PM

Thank you!  I will give that a try and let you know how it works out!

 

Thanks again!!

 

-Sandy



#1222 wiesshund

wiesshund

    VPF Legend

  • Members
  • PipPipPipPipPipPipPip
  • 11,871 posts

  • Flag: United States of America

  • Favorite Pinball: How many can i have?

Posted 11 October 2020 - 06:25 PM

1) disable hibernation on the PC
(admin command prompt,enter    powercfg -hibernate off)

 

2) See if you can have pup execute this command

 

powershell.exe -C "$m='[DllImport(\"Powrprof.dll\",SetLastError=true)]static extern bool SetSuspendState(bool hibernate,bool forceCritical,bool disableWakeEvent);public static void PowerSleep(){SetSuspendState(false,false,false); }';add-type -name Import -member $m -namespace Dll; [Dll.Import]::PowerSleep();"

that will send the PC to sleep


If you feel the need to empty your wallet in my direction, i don't have any way to receive it anyways

Spend it on Hookers and Blow


#1223 SandraMe

SandraMe

    Neophyte

  • Members
  • Pip
  • 6 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 11 October 2020 - 07:31 PM

Sleep rather than power-down isn't one of the built-in options, but that's a good idea for something to add.  If you're up for a little Javascript programming, though, I think you could adapt one of the worked examples to do this pretty easily.  Take a look in the help at Javascript scripting > Worked Examples > Log Off at Shutdown. The thing you have to change is to take out the part that logs off via User32.ExitWindowsEx(), and instead use a different Windows API that sets sleep mode, SetSuspendState().

 

Untested, but here's roughly what's needed, replacing the corresponding sections in the example:

// bind the system sleep API [use this to replace the User32 binding in the example]
let PowrProf = dllImport.bind("PowrProf.dll", `
    BOOL WINAPI SetSuspendState(BOOL bHibernate, BOOL bForce, BOOL bWakeupEventsDisabled);
`);

// set sleep mode [use this to replace the "log off Windows" section in the example]
SetSuspendState(0, 0, 0);

[EDIT] On second thought, this isn't quite sufficient; SetSuspendState() is one of those protected APIs that requires you to mess with the process token to enable it.  That's doable, but it takes some extra code, and I don't have a ready-made js example to point you to.  If you want to try adapting it from C++, you can find the code in PinballY/PlayfieldView.cpp in the github repository - look for the PlayfieldView::PowerOff() routine; you need all the stuff there from the call to OpenThreadToken() to the call to AdjustTokenPrivileges() (inclusive).

I'm looking at the code now.  That's a little more involved.  I kind of like a challenge.  I'll keep you posted!

 

Thanks!


1) disable hibernation on the PC
(admin command prompt,enter    powercfg -hibernate off)

 

2) See if you can have pup execute this command

powershell.exe -C "$m='[DllImport(\"Powrprof.dll\",SetLastError=true)]static extern bool SetSuspendState(bool hibernate,bool forceCritical,bool disableWakeEvent);public static void PowerSleep(){SetSuspendState(false,false,false); }';add-type -name Import -member $m -namespace Dll; [Dll.Import]::PowerSleep();"

that will send the PC to sleep

I've done things like this before and it does work.  However when you run it as a script, it runs with your authority.  It needs to run with PBY's authority, and as alluded to in the discussion, is a little more involved.

 

Thanks!


Edited by SandraMe, 11 October 2020 - 07:29 PM.


#1224 Samuel Villena

Samuel Villena

    Enthusiast

  • Platinum Supporter
  • 65 posts
  • Location:Brussels

  • Flag: Spain

  • Favorite Pinball: All of them!

  • PS3 Gamer Tag: Tatsel1982

Posted 11 October 2020 - 09:27 PM

Good morning!

I don’t know if this one is the place to make a suggestion about pinballY...

I would like a new functionality, but I know nothing about programming, so I’ll ask to add it in a new version:

When I setup a system (I’m talking specially about PunballFX3) I have the possibility to add parameters to the setup to make it star in hot seat, single player, no powers, etc. It’s really good, but I would like to choose each time. I think perhaps it would be posible to add the different parameters in the start menu. When you press the button “Start”, in the menu, would be nice to see “play solo” “hot seat 2 players”, “hot seat three players”, etc., but keeping the launch ball button as your usual way to play.

Than you and have a great day!


Enviado desde mi iPad utilizando Tapatalk


Good night!

[mention]mjr [/mention] could you take a look at this? Thank you!


Enviado desde mi iPad utilizando Tapatalk

Pinball Cabinet: i5-10400, Gforce gtx 1650, 3 displays (32" 720p tv playfield, 19" backglass, 15" dmd), controller: KL25z standalone, no leds, no solenoids (yet), frontend: pinballY, pinball software: visual pinball and pinball fx3.

 

Website: pinballvirtualparanovatos.com YouTube: https://youtube.com/...9G3H-DSOv-CksJA Twitch: twitch.tv/pinballvirtualparanovatos Telegram: T.me/pinballvirtualparanovatos


#1225 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 11 October 2020 - 10:50 PM

 

When you press the button “Start”, in the menu, would be nice to see “play solo” “hot seat 2 players”, “hot seat three players”, etc., but keeping the launch ball button as your usual way to 

 

Take a look at Javascript scripting > Worked Examples > Custom Play Modes in the help.  It covers exactly this situation.



#1226 Samuel Villena

Samuel Villena

    Enthusiast

  • Platinum Supporter
  • 65 posts
  • Location:Brussels

  • Flag: Spain

  • Favorite Pinball: All of them!

  • PS3 Gamer Tag: Tatsel1982

Posted 12 October 2020 - 07:00 AM

 

When you press the button “Start”, in the menu, would be nice to see “play solo” “hot seat 2 players”, “hot seat three players”, etc., but keeping the launch ball button as your usual way to 

 
Take a look at Javascript scripting > Worked Examples > Custom Play Modes in the help.  It covers exactly this situation.

Ok, perfect! I’ll take a look. Your user manuals are excellent, but are really big and I didn’t read everything. Sorry. I’ll tell you later the result. :)


Enviado desde mi iPad utilizando Tapatalk

Pinball Cabinet: i5-10400, Gforce gtx 1650, 3 displays (32" 720p tv playfield, 19" backglass, 15" dmd), controller: KL25z standalone, no leds, no solenoids (yet), frontend: pinballY, pinball software: visual pinball and pinball fx3.

 

Website: pinballvirtualparanovatos.com YouTube: https://youtube.com/...9G3H-DSOv-CksJA Twitch: twitch.tv/pinballvirtualparanovatos Telegram: T.me/pinballvirtualparanovatos


#1227 SandraMe

SandraMe

    Neophyte

  • Members
  • Pip
  • 6 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 13 October 2020 - 08:38 PM

Ok, I think I've got it.  And interestingly enough, the sleep function is available without having to get the process token enabled, at least on my machine.

 

I've got to say, I've been coding since the days of the coal-fired computers and I've seen a lot of code.  And in all my years as a professional, I would rate PinballY as some of the BEST code I have ever seen!  AND the documentation is equally as good!  Rarely have I seen both documentation and code be so well put together in a system that wasn't written by a team of coders and writers.  I would hire you in an instant for any project!

 

So anyway, enough gushing.  Well, maybe later...   :wub:  :wub:

 

Here is my Main.js:

import "AddUserSleepCMD.js";
import "UserSleepCMD.js";
command.allocate("UserSleepCMD");
 
I put the command.allocate in main because I wasn't sure of the best place to do the allocation.  If there is a better place for it let me know.  I wanted to make sure the allocation only happened once and not every time a menu was opened.
 
Here is the AddUserSleepCMD.js:
mainWindow.on("menuopen", ev => {
    if (ev.id == "exit")
        ev.addMenuItem(command.PowerOff, { title: "SleepComputer", cmd: command.UserSleepCMD });
});
 
I wanted the sleep command to appear above the Power Off command on the Exit menu.
 
And here is the UserSleepCMD.js:
mainWindow.on("command", ev => {
    if (command.name(ev.id) == "UserSleepCMD") {
        let PowrProf = dllImport.bind("PowrProf.dll", `
        BOOL WINAPI SetSuspendState(BOOL bHibernate, BOOL bForce, BOOL bWakeupEventsDisabled);
         `);
        if (optionSettings.isDirty())
           optionSettings.save();
        // set sleep mode [use this to replace the "log off Windows" section in the example]
        PowrProf.SetSuspendState(0, 0, 0);
     }
});

 

As I mentioned above, when I tested the suspend function, it did sleep my machine.  I did look at the MS documentation and it clearly says that SetSuspendState is protected.  I'm not running PinballY in admin mode or anything special, so I'm not sure how I got away with it.  If you get different results, please let me know.

 

Thanks again for pointing me in the right direction, it helped quite a lot!  And thank you for PinballY and the wonderful build document.  And probably for everything else you've done for virtual pinball, but I haven't actually laid eyes on it yet!  :wub:  :wub:  :wub:

 

-Sandy



#1228 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 14 October 2020 - 02:56 AM

Ok, I think I've got it.  And interestingly enough, the sleep function is available without having to get the process token enabled, at least on my machine.

 

I did look at the MS documentation and it clearly says that SetSuspendState is protected.  I'm not running PinballY in admin mode or anything special, so I'm not sure how I got away with it.  If you get different results, please let me know.

 

That's great!  It makes it a lot simpler that you don't need to mess with the privilege bit.  I didn't actually test that - I just took the SDK page at face value.  Maybe that's just wrong, or there's some nuance about which Windows versions it applies to, or something like that.

 

 

I put the command.allocate in main because I wasn't sure of the best place to do the allocation.  If there is a better place for it let me know.  I wanted to make sure the allocation only happened once and not every time a menu was opened.

 

That's exactly the right idea.  I'd probably put it in one or the other of your imported .js files myself (outside of any functions, just like you have it), just for the sake of grouping it with the code that uses it, but functionally it's the same either way.



#1229 apophis

apophis

    Enthusiast

  • Members
  • PipPipPip
  • 99 posts
  • Location:Mission Viejo, California

  • Flag: United States of America

  • Favorite Pinball: The Getaway

Posted 16 October 2020 - 04:53 PM

Hello!

 

I have a question about "Batch Capture". I would like to add all my games to batch capture so that I can stop the capture mid-way through the list, and then come back later and continue where I left off. I believe this is how it would work. However, I can't find a way to automatically add all tables to my batch list. Is this possible?

 

Thank you!



#1230 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 16 October 2020 - 06:43 PM

I have a question about "Batch Capture". I would like to add all my games to batch capture so that I can stop the capture mid-way through the list, and then come back later and continue where I left off. I believe this is how it would work. However, I can't find a way to automatically add all tables to my batch list. Is this possible?

 

There are two features here that might be relevant, so let me make sure we're talking about the same thing.  The first is the "Mark for Batch Capture" command (in the game setup menu).  Is that the one you have in mind?  What I'm getting from your question is that you'd like to do the same thing, but apply it to all games at once - maybe a command (that doesn't exist) called "Mark All Games For Batch Capture".  Am I on the right track here?

 

The second feature is the Batch Capture command itself, which actually initiates the capture process on a batch.  That's in the operator menu (press the digit "0" button to bring that up).  If you step through the menus for that command, I think you might find what you're looking for.  The first step in that command lets you select which games you want to include, and one of the options is "All Games".  Another option is "Games Marked for Batch Capture", which goes back to the "Mark" command of the first feature above.  If you just want to capture all games, there's no need to "Mark" any of them - just select "All" in the first step of the batch capture process..

 

Does that address what you're trying to do, or am I missing your point?



#1231 apophis

apophis

    Enthusiast

  • Members
  • PipPipPip
  • 99 posts
  • Location:Mission Viejo, California

  • Flag: United States of America

  • Favorite Pinball: The Getaway

Posted 16 October 2020 - 06:57 PM

 

What I'm getting from your question is that you'd like to do the same thing, but apply it to all games at once - maybe a command (that doesn't exist) called "Mark All Games For Batch Capture".  Am I on the right track here?

 

 

Hi, mjr. Yes that is correct. I'd like to "Mark All Games for Batch Capture" so that when I initiate the batch capture using "Games Marked for Batch Capture" then all the games get checked off that list. The benefit over simply selecting "All Games" is that one could stop the batch and then later come pick up where it was interrupted.

 

I took a peak  in the database XML hoping that the batch capture parameter was available there, but it doesn't seem to be. Is there another work around?

 

Thank you!


Edited by apophis, 16 October 2020 - 06:58 PM.


#1232 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 16 October 2020 - 08:42 PM

I'd like to "Mark All Games for Batch Capture" so that when I initiate the batch capture using "Games Marked for Batch Capture" then all the games get checked off that list. The benefit over simply selecting "All Games" is that one could stop the batch and then later come pick up where it was interrupted.

 

Oh, I get it - it's more the un-marking as the capture proceeds that you're really after.  Well, one easy way would be to use the "missing media only" options when setting up the capture, but that might not fit your use case (e.g., if you intend to do a fresh rebuild of all of the media).  The "marked for batch capture" status is in the GameStats.csv file if you wanted to do it manually, but that's certainly not ideal.  The better way would be through Javascript, since you can access and manipulate a game's "marked" flag (along with most other properties) there.  Not tested, but here's how roughly (modulo any typos) how you'd create your own "Mark All Games" command:

let markAllCommand = command.allocate("MarkAllGamesForBatchCapture");

mainWindow.on("menuopen", ev => {
    if (ev.id == "game setup") {
        ev.addMenuItem(
            { after: command.MarkForBatchCapture },
            { title: "Mark All Games for Capture", cmd: markAllCommand });
    }
});

mainWindow.on("command", ev => {
    if (ev.id == markAllCommand) {
        gameList.getAllGames().forEach(game => game.update({ isMarkedForCapture: true }));
    }
});



#1233 apophis

apophis

    Enthusiast

  • Members
  • PipPipPip
  • 99 posts
  • Location:Mission Viejo, California

  • Flag: United States of America

  • Favorite Pinball: The Getaway

Posted 16 October 2020 - 08:46 PM

Thanks a bunch! This will give me a good reason to delve into the JavaScript interface. Cheers!

#1234 Samuel Villena

Samuel Villena

    Enthusiast

  • Platinum Supporter
  • 65 posts
  • Location:Brussels

  • Flag: Spain

  • Favorite Pinball: All of them!

  • PS3 Gamer Tag: Tatsel1982

Posted 19 October 2020 - 06:59 PM

 

 

When you press the button “Start”, in the menu, would be nice to see “play solo” “hot seat 2 players”, “hot seat three players”, etc., but keeping the launch ball button as your usual way to 

 

Take a look at Javascript scripting > Worked Examples > Custom Play Modes in the help.  It covers exactly this situation.

 

 

Hey Mjr!

 

Finally i could try it... without success. I now nothing about programming, so it was really difficult for me to understand all the things you explain there (and i have a second handicap: i'm not really good at english language). So i'll expose the problem, i hope you could help me.

 

I create the js file triying to make a secundary menu. Ok, some tries, but it's working. Yey! Onlly one thing here: I think there is an error in the code at the webpage, a ")" missing after "command.Playgame". Fotunately, the pinbally log gived me the clue:

 

"mainWindow.on("command", ev => {

if (ev.id == command.PlayGame {

// it's the Play command "

 

Now i have a second problem, and i don't see how to solve it: It always enter un "normal" mode, no matter what option i press... So the menu exist, but does nothing. :_(

 

Here is the code:

 

/*
Submenú personalizado para añadir selección de hotseat a pinballfx3
*/
 
let playClassicPhysicsModeCommand = command.allocate("PlayClassicPhysicsMode");
let playHotseat2PlayerModeCommand = command.allocate("playHotseat2PlayerMode");
let playHotseat3PlayerModeCommand = command.allocate("playHotseat3PlayerMode");
let playHotseat4PlayerModeCommand = command.allocate("playHotseat4PlayerMode");
 
 
mainWindow.on("command", ev => {
    if (ev.id == command.PlayGame) {
        // it's the Play command - check the current game's system
        let game = gameList.getWheelGame(0) || { };
        let sys = game.system || { };
        if (/pinball fx3\.exe$/i.test(sys.processName)) {
            // it's FX3 - show our custom submenu
            mainWindow.showMenu("custom.play.fx3", [
                { title: "Un jugador", cmd: playClassicPhysicsModeCommand },
                { title: "Dos jugadores", cmd: playHotseat2PlayerModeCommand },
{ title: "Tres jugadores", cmd: playHotseat3PlayerModeCommand },
{ title: "Cuatro jugadores", cmd: playHotseat4PlayerModeCommand },
                { cmd: -1 },  // separator
                { title: "Cancel", cmd: command.MenuReturn }
            ]);
 
            // tell the system not to launch the game yet
            ev.preventDefault();
        }
    }
});
 
mainWindow.on("command", ev => {
    // check for a launch command
    let extra = undefined;
    if (ev.id == playClassicPhysicsModeCommand) {
        extra = "-class ";  // add the classic physics option code
    }
    else if (ev.id == playHotseat2PlayerModeCommand) {
        extra = "-hotseat_2 "; // define el comando para dos jugadores
    }
else if (ev.id == playHotseat3PlayerModeCommand) {
        extra = "-hotseat_3 "; // define el comando para tres jugadores
    }
else if (ev.id == playHotseat4PlayerModeCommand) {
        extra = "-hotseat_4 "; // define el comando para cuatro jugadores
    }
 
 
    // if we found a launch command, do the launch!
    if (extra !== undefined) {
        // get the game and system information
        let game = gameList.getWheelGame(0) || { };
        let sys = game.system || { };
 
        // launch it with the extra options
        mainWindow.playGame(game, {
            command: ev.id,
            overrides: { params: extra + sys.params }
        });
    }
});

 

And here is the pinballY log:

 

High score retrieval: getting high scores for Secrets of the Deep
NVRAM file search: determining NVRAM path for Secrets of the Deep
High score retrieval: looking for ad hoc scores file C:\Program Files (x86)\Steam\steamapps\common\Pinball FX3\data\steam\Atlantis.pinballyHighScores
+ ad hoc scores file C:\Program Files (x86)\Steam\steamapps\common\Pinball FX3\data\steam\Atlantis.pinballyHighScores doesn't exist
+ No high score source found for Secrets of the Deep
 
Table launch: Secrets of the Deep, table file Atlantis, system Pinball FX3
 
DOF: shutting down DOF client
+ launch: full table path C:\Program Files (x86)\Steam\steamapps\common\Pinball FX3\data\steam\Atlantis
+ table launch: table file C:\Program Files (x86)\Steam\steamapps\common\Pinball FX3\data\steam\Atlantis doesn't exist; try adding extension -> C:\Program Files (x86)\Steam\steamapps\common\Pinball FX3\data\steam\Atlantis.pxp
+ table launch: file + extension (C:\Program Files (x86)\Steam\steamapps\common\Pinball FX3\data\steam\Atlantis.pxp) exists, using it
+ table launch: executable: C:\Program Files (x86)\Steam\steam.exe
+ table launch: applying command line variable substitutions:
+ Original> -hotseat_2 -applaunch 442120 "-table_[TABLEFILEBASE]"
+ Final   > -hotseat_2 -applaunch 442120 "-table_Atlantis"
+ table launch: waiting for secondary process Pinball FX3.exe to start
+ table launch: found matching process 8052
+ using this process
+ table launch: process launch succeeded
+ table launch: Close Game command received
+ table launch: trying to close the game process
+ table launch: game exited normally
+ table launch finished successfully
High score retrieval: getting high scores for Secrets of the Deep
NVRAM file search: determining NVRAM path for Secrets of the Deep
High score retrieval: looking for ad hoc scores file C:\Program Files (x86)\Steam\steamapps\common\Pinball FX3\data\steam\Atlantis.pinballyHighScores
+ ad hoc scores file C:\Program Files (x86)\Steam\steamapps\common\Pinball FX3\data\steam\Atlantis.pinballyHighScores doesn't exist
+ No high score source found for Secrets of the Deep
 
Table launch: Secrets of the Deep, table file Atlantis, system Pinball FX3
 
DOF: shutting down DOF client
+ launch: full table path C:\Program Files (x86)\Steam\steamapps\common\Pinball FX3\data\steam\Atlantis
+ table launch: table file C:\Program Files (x86)\Steam\steamapps\common\Pinball FX3\data\steam\Atlantis doesn't exist; try adding extension -> C:\Program Files (x86)\Steam\steamapps\common\Pinball FX3\data\steam\Atlantis.pxp
+ table launch: file + extension (C:\Program Files (x86)\Steam\steamapps\common\Pinball FX3\data\steam\Atlantis.pxp) exists, using it
+ table launch: executable: C:\Program Files (x86)\Steam\steam.exe
+ table launch: applying command line variable substitutions:
+ Original> -class -applaunch 442120 "-table_[TABLEFILEBASE]"
+ Final   > -class -applaunch 442120 "-table_Atlantis"
+ table launch: waiting for secondary process Pinball FX3.exe to start
+ table launch: found matching process 8844
+ using this process
+ table launch: process launch succeeded
+ table launch: Close Game command received
+ table launch: trying to close the game process
+ table launch: game exited normally
+ table launch finished successfully
High score retrieval: getting high scores for Secrets of the Deep
NVRAM file search: determining NVRAM path for Secrets of the Deep
High score retrieval: looking for ad hoc scores file C:\Program Files (x86)\Steam\steamapps\common\Pinball FX3\data\steam\Atlantis.pinballyHighScores
+ ad hoc scores file C:\Program Files (x86)\Steam\steamapps\common\Pinball FX3\data\steam\Atlantis.pinballyHighScores doesn't exist
+ No high score source found for Secrets of the Deep
 

I think the problem is that PinballY send the parameter before the launch command, not after. So where it says in the log:

 

+ Original> -hotseat_2 -applaunch 442120 "-table_[TABLEFILEBASE]"

+ Final   > -hotseat_2 -applaunch 442120 "-table_Atlantis"
 
It should say:
 
+ Original>  -applaunch 442120 "-table_[TABLEFILEBASE]" -hotseat_2
+ Final   >  -applaunch 442120 "-table_Atlantis" -hotseat_2

 

Am I right? How can i solve it?

 

Thank you and have a great week!


Pinball Cabinet: i5-10400, Gforce gtx 1650, 3 displays (32" 720p tv playfield, 19" backglass, 15" dmd), controller: KL25z standalone, no leds, no solenoids (yet), frontend: pinballY, pinball software: visual pinball and pinball fx3.

 

Website: pinballvirtualparanovatos.com YouTube: https://youtube.com/...9G3H-DSOv-CksJA Twitch: twitch.tv/pinballvirtualparanovatos Telegram: T.me/pinballvirtualparanovatos


#1235 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 19 October 2020 - 07:20 PM

+ Original> -hotseat_2 -applaunch 442120 "-table_[TABLEFILEBASE]"

+ Final   > -hotseat_2 -applaunch 442120 "-table_Atlantis"
 
It should say:
 
+ Original>  -applaunch 442120 "-table_[TABLEFILEBASE]" -hotseat_2
+ Final   >  -applaunch 442120 "-table_Atlantis" -hotseat_2

 

I'm not sure how FX3 parses the options, but I could easily believe that you're right about the order needing to change.  In that case, all you'd need to do is change the way you construct the override parameters, like so:

 

overrides: { params: sys.params + extras }

 

That would put the added "hotseat" flags at the end of the option list rather than at the beginning.  If it turns out that the order dependency is even worse and you have to insert the "hotseat" flags in the middle somewhere, you could do that with a Javascript regular expression "replace" operation (I can help you out with that if that's what needed).


One little added note: if you move the "+ extras" to the end like that, you should also change the text in the "extras" assignments so that the added space is at the beginning of the string rather than at the end, so that it adds a space at the right place when combining the strings.


E.g., change extras = "-hotseat_4 " to extras = " -hotseat_4".



#1236 Samuel Villena

Samuel Villena

    Enthusiast

  • Platinum Supporter
  • 65 posts
  • Location:Brussels

  • Flag: Spain

  • Favorite Pinball: All of them!

  • PS3 Gamer Tag: Tatsel1982

Posted 20 October 2020 - 03:58 PM

 

I'm not sure how FX3 parses the options, but I could easily believe that you're right about the order needing to change.  In that case, all you'd need to do is change the way you construct the override parameters, like so:

 

overrides: { params: sys.params + extras }

 

That would put the added "hotseat" flags at the end of the option list rather than at the beginning.  

 

[...]


E.g., change extras = "-hotseat_4 " to extras = " -hotseat_4".

 

 

It works! Thank you so much!

 

I share the script here just in case anyones need it, and of course you can share it in your webpage (it's your code, bur everything together, haha).

 

playmodefx3.js

 

If anyone need it: you only have to put it inside the scripts folder in pinballY, and insert inside the main.js script this line:

 

import "playmodefx3.js";

 

Thank you again mjr! You and JPSalas, mainly, are my pinball heroes! hahaha.


Pinball Cabinet: i5-10400, Gforce gtx 1650, 3 displays (32" 720p tv playfield, 19" backglass, 15" dmd), controller: KL25z standalone, no leds, no solenoids (yet), frontend: pinballY, pinball software: visual pinball and pinball fx3.

 

Website: pinballvirtualparanovatos.com YouTube: https://youtube.com/...9G3H-DSOv-CksJA Twitch: twitch.tv/pinballvirtualparanovatos Telegram: T.me/pinballvirtualparanovatos


#1237 vogliadicane

vogliadicane

    Pinball Fan

  • Members
  • PipPipPipPip
  • 517 posts
  • Location:Velbert

  • Flag: Germany

  • Favorite Pinball: The Addams Family

Posted 27 October 2020 - 07:24 PM

An option to show the Info Box in Attract Mode would be nice.



#1238 tsolyankee

tsolyankee

    Neophyte

  • Members
  • Pip
  • 9 posts

  • Flag: United States of America

  • Favorite Pinball: Adam's Family

Posted 02 December 2020 - 10:35 PM

Hi,

 

I'm having an issue getting DOF to run with PinballY.

DOF is working when a table loads, but not in the front-end. 

I have read and tried all solutions I found for similar issues.

 

Any assistance is appreciated!

 

Permissions:
Primary user account is member of Administrators group.
 
G:\
Owner: System
user account has full permissions.
 
G:\DirectOutput
Owner: user account
user account has full permissions
 
G:\PinballY
Owner: user account
user account has full permissions
 
 
UAC is enable at default setting.
VPx.exe's are NOT set to RUNASADMIN
PinballY.exe is NOT set to RUNASADMIN
Dof3264Surrogate.exe is set to RUNASADMIN
 
B2SBackglassServerEXE.exe (in VP/Tables) is NOT set to RUNASADMIN

 

PinballY Log:

Wednesday, December 02, 2020, 3:21:35 PM: Session started
PinballY 1.0.0 (Release), build 9375 (x64, 20200723-1914)

DOF (DirectOutput): initializing DOF client
+ Launching DOF surrogate process.  This is required because PinballY is running
  in 64-bit, and DOF is a 32-bit COM object.  Surrogate command line:
  >"G:\PinballY\Dof3264Surrogate.exe"  -parent_pid=5116 -clsid=fd6707e5-03a1-4951-bf90-49b2ef556b36

DOF surrogate launch failed:
  Command line: "G:\PinballY\Dof3264Surrogate.exe"  -parent_pid=5116 -clsid=fd6707e5-03a1-4951-bf90-49b2ef556b36
  CreateProcess Error: The requested operation requires elevation.

DOF: creating DOF COM object (a23bfdbc-9a8a-46c0-8672-60f23d54ffb6)
DOF: DOF COM object (a23bfdbc-9a8a-46c0-8672-60f23d54ffb6) is not registered on this system; DOF will not be used for this session

DOF (DirectOutput): initializing DOF client

DOF: creating DOF COM object (a23bfdbc-9a8a-46c0-8672-60f23d54ffb6)
DOF: DOF COM object (a23bfdbc-9a8a-46c0-8672-60f23d54ffb6) is not registered on this system; DOF will not be used for this session

Here are the relevant registry entries:

 

Key Name:          HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{A23BFDBC-9A8A-46C0-8672-60F23D54FFB6}
Class Name:        <NO CLASS>
Value 0
  Name:            <NO NAME>
  Type:            REG_SZ
  Data:            DirectOutputCom.ComObject
Value 1
  Name:            AppID
  Type:            REG_SZ
  Data:            {A23BFDBC-9A8A-46C0-8672-60F23D54FFB6}
 
 
Key Name:          HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{A23BFDBC-9A8A-46C0-8672-60F23D54FFB6}\Implemented Categories
Class Name:        <NO CLASS>
 
Key Name:          HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{A23BFDBC-9A8A-46C0-8672-60F23D54FFB6}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}
Class Name:        <NO CLASS>
Value 0
  Name:            <NO NAME>
  Type:            REG_SZ
  Data:            
 
 
Key Name:          HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{A23BFDBC-9A8A-46C0-8672-60F23D54FFB6}\InprocServer32
Class Name:        <NO CLASS>
Value 0
  Name:            <NO NAME>
  Type:            REG_SZ
  Data:            mscoree.dll
Value 1
  Name:            ThreadingModel
  Type:            REG_SZ
  Data:            Both
Value 2
  Name:            Class
  Type:            REG_SZ
  Data:            DirectOutputCom.ComObject
Value 3
  Name:            Assembly
  Type:            REG_SZ
  Data:            DirectOutputComObject, Version=3.1.7527.20769, Culture=neutral, PublicKeyToken=null
Value 4
  Name:            RuntimeVersion
  Type:            REG_SZ
  Data:            v4.0.30319
Value 5
  Name:            CodeBase
  Type:            REG_SZ
 
 
Key Name:          HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{A23BFDBC-9A8A-46C0-8672-60F23D54FFB6}\InprocServer32\3.1.7527.20769
Class Name:        <NO CLASS>
Value 0
  Name:            Class
  Type:            REG_SZ
  Data:            DirectOutputCom.ComObject
Value 1
  Name:            Assembly
  Type:            REG_SZ
  Data:            DirectOutputComObject, Version=3.1.7527.20769, Culture=neutral, PublicKeyToken=null
Value 2
  Name:            RuntimeVersion
  Type:            REG_SZ
  Data:            v4.0.30319
Value 3
  Name:            CodeBase
  Type:            REG_SZ
Value 4
  Name:            <NO NAME>
  Type:            REG_SZ
  Data:            mscoree.dll
Value 5
  Name:            ThreadingModel
  Type:            REG_SZ
  Data:            Both
 
 
Key Name:          HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{A23BFDBC-9A8A-46C0-8672-60F23D54FFB6}\ProgID
Class Name:        <NO CLASS>
Value 0
  Name:            <NO NAME>
  Type:            REG_SZ
  Data:            DirectOutput.ComObject
 
 
Key Name:          HKEY_CLASSES_ROOT\Wow6432Node\AppID\{A23BFDBC-9A8A-46C0-8672-60F23D54FFB6}
Class Name:        <NO CLASS>
Value 0
  Name:            DllSurrogate
  Type:            REG_SZ
  Data:            
 
 
Key Name:          HKEY_CLASSES_ROOT\DirectOutput.ComObject
Class Name:        <NO CLASS>
Value 0
  Name:            <NO NAME>
  Type:            REG_SZ
  Data:            DirectOutputCom.ComObject
 
 
Key Name:          HKEY_CLASSES_ROOT\DirectOutput.ComObject\CLSID
Class Name:        <NO CLASS>
Value 0
  Name:            <NO NAME>
  Type:            REG_SZ
  Data:            {A23BFDBC-9A8A-46C0-8672-60F23D54FFB6}

Edited by tsolyankee, 02 December 2020 - 10:37 PM.


#1239 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 03 December 2020 - 03:41 AM

> Dof3264Surrogate.exe is set to RUNASADMIN

 

That's your problem.  Just remove that and check the log again, hopefully it'll load this time.



#1240 tsolyankee

tsolyankee

    Neophyte

  • Members
  • Pip
  • 9 posts

  • Flag: United States of America

  • Favorite Pinball: Adam's Family

Posted 03 December 2020 - 06:49 AM

Hot damn, that did it, was driving me crazy!

Thanks so much for all you've done for the community man, it is greatly appreciated!

Happy holidays.