RETROBAT Official Board
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Running a script before a specific game starts

4 posters

Go down

Running a script before a specific game starts Empty Running a script before a specific game starts

Post by Spulit 08/07/24, 12:29 pm

Hi,

Here's my challenge: I'm using Ryujinx to emulate Switch games. I do have a couple of PS4 controllers which I use for most of the games and Retrobat's auto-configuration works ok. However, I do also have a pair of joy-cons which I need to use for some other games. And that's the main problem here. Auto-configuration doesn't work with these controllers and Ryujinx does not support game specific settings.
So, do only solution here is to have a second Ryujinx configuration file, properly configured to work with the joy-cons, which I need to copy over the existing configuration file first, and then start the emulator and run the game.
Is there any way to do this as a script in Retrobat? Or is there any other better solution to get this working?

Thanks
Spulit
Spulit

Messages : 19
Date d'inscription : 2024-01-03

Back to top Go down

Running a script before a specific game starts Empty Re: Running a script before a specific game starts

Post by getupor 08/07/24, 12:55 pm

Hello

Can you first try to define controller orders from the corresponding menu, put joycon to position 1, and PS4 on 2 and more ?

While disconnected, the joycon can't be reached and ES should fallback to position 2 controller.

If you can confirm if it do the job or not


Running a script before a specific game starts Admin4
getupor
getupor
Admin

Messages : 1420
Date d'inscription : 2020-10-04

Back to top Go down

Running a script before a specific game starts Empty Re: Running a script before a specific game starts

Post by Spulit 08/07/24, 03:00 pm

Hi,

When you mention "corresponding menu", are you referring to the "Controller priority" in Retrobat's main menu?

Thanks

Spulit
Spulit

Messages : 19
Date d'inscription : 2024-01-03

Back to top Go down

Running a script before a specific game starts Empty Re: Running a script before a specific game starts

Post by getupor 08/07/24, 03:32 pm

Yes, where you can define controller 1, controller 2...


Running a script before a specific game starts Admin4
getupor
getupor
Admin

Messages : 1420
Date d'inscription : 2020-10-04

Back to top Go down

Running a script before a specific game starts Empty Re: Running a script before a specific game starts

Post by Spulit 08/07/24, 04:30 pm

I'll try that later and will let you know. Anyway, this would force me to always disconnect the joy-cons before using again the PS4 controllers, correct?
Spulit
Spulit

Messages : 19
Date d'inscription : 2024-01-03

Back to top Go down

Running a script before a specific game starts Empty Re: Running a script before a specific game starts

Post by tartifless 08/07/24, 05:03 pm

You could also disable autoconfiguration just for ryujinx and configure directly within ryujinx.


Running a script before a specific game starts Admin4
tartifless
tartifless
Admin

Messages : 1672
Date d'inscription : 2021-04-27

Back to top Go down

Running a script before a specific game starts Empty Re: Running a script before a specific game starts

Post by Spulit 08/07/24, 05:14 pm

tartifless wrote:You could also disable autoconfiguration just for ryujinx and configure directly within ryujinx.

Yes, that was my original intention, but then I would need to copy a pre-made configuration file to the right Ryujinx folder before Retrobat starts the emulator. But I don't know how to do that by using a script or even if Retrobat/EmulationStation supports that.

Spulit
Spulit

Messages : 19
Date d'inscription : 2024-01-03

Back to top Go down

Running a script before a specific game starts Empty Re: Running a script before a specific game starts

Post by getupor 08/07/24, 05:21 pm

If you disable auto-configuration, ES will not change it again and withdrawn your settings. It will remain as you have done in Ryu


Running a script before a specific game starts Admin4
getupor
getupor
Admin

Messages : 1420
Date d'inscription : 2020-10-04

Back to top Go down

Running a script before a specific game starts Empty Re: Running a script before a specific game starts

Post by tartifless 08/07/24, 06:05 pm

Spulit wrote:
tartifless wrote:You could also disable autoconfiguration just for ryujinx and configure directly within ryujinx.

Yes, that was my original intention, but then I would need to copy a pre-made configuration file to the right Ryujinx folder before Retrobat starts the emulator. But I don't know how to do that by using a script or even if Retrobat/EmulationStation supports that.


As getupor said : you just set it up once in ryujinx and don't touch it again, Retrobat will not overwrite.
tartifless
tartifless
Admin

Messages : 1672
Date d'inscription : 2021-04-27

Back to top Go down

Running a script before a specific game starts Empty Re: Running a script before a specific game starts

Post by Spulit 09/07/24, 09:38 am

Hi,

As I said, I need to have two different configurations: one that uses PS4 controllers and another one to use Joy-cons in a few motion based games. I can't simply configure Ryujinx once and not touch the configuration again.

I followed the suggestion from getupor and I tried to set the priority of the controllers but it doesn't work for me because the joycons are being identified by Retrobat as one single controller (combined joycons). Then, when starting a game where I would like to use the joycons separately, only player 1 is being configured (because for Retrobat we only have one controller anyway), despite I set the controller type for the two first players to "Left Joycon" and "Right Joycon".



Spulit
Spulit

Messages : 19
Date d'inscription : 2024-01-03

Back to top Go down

Running a script before a specific game starts Empty Re: Running a script before a specific game starts

Post by Aynshe 09/07/24, 10:58 am

Spulit wrote:Hi,

As I said, I need to have two different configurations: one that uses PS4 controllers and another one to use Joy-cons in a few motion based games. I can't simply configure Ryujinx once and not touch the configuration again.

I followed the suggestion from getupor and I tried to set the priority of the controllers but it doesn't work for me because the joycons are being identified by Retrobat as one single controller (combined joycons). Then, when starting a game where I would like to use the joycons separately, only player 1 is being configured (because for Retrobat we only have one controller anyway), despite I set the controller type for the two first players to "Left Joycon" and "Right Joycon".


In this case, the only thing I can think of right now is to create a custom system dedicated to joycons and a new folder in emulator. You need to use the necessary command line arguments to launch games for this new custom system.
Aynshe
Aynshe

Messages : 445
Date d'inscription : 2022-03-18

Back to top Go down

Running a script before a specific game starts Empty Re: Running a script before a specific game starts

Post by tartifless 09/07/24, 05:55 pm

Hello,

Can you share with me :
- es_input.cfg (with the joycons configured within RetroBat) - file is in retrobat\emulationstation\.emulationstation
- 2 versions of ryujinx settings file: one where joycons are configured as individual pads for P1 and P2, one where they are configured as combined gamepad on P1
   
- emulatorlauncher.log file (after launching a game with the joycons connected to RetroBat) - file is in retrobat\emulationstation


Running a script before a specific game starts Admin4
tartifless
tartifless
Admin

Messages : 1672
Date d'inscription : 2021-04-27

Back to top Go down

Running a script before a specific game starts Empty Re: Running a script before a specific game starts

Post by Spulit 10/07/24, 12:15 pm

Here are the files. Config.json is the configuration file that Retrobat generates, while Config_wanted.json is something I would like to have.
I'm now trying to use ReWASD and have both joycons mapped to Switch Pro Controllers. It works better, but I still need to map some buttons in Ryujinx (like SL and SR), and that can't be done with Retrobat, I believe. So I still think it would be the best solution here to be able to run a script before launching the emulator that would copy the wanted configuration to the final location.
Spulit
Spulit

Messages : 19
Date d'inscription : 2024-01-03

Back to top Go down

Running a script before a specific game starts Empty Re: Running a script before a specific game starts

Post by getupor 10/07/24, 02:36 pm

Missing the files ? (Specifically the one asks by Tartifless, giving others information isn't required ATM)


Running a script before a specific game starts Admin4
getupor
getupor
Admin

Messages : 1420
Date d'inscription : 2020-10-04

Back to top Go down

Running a script before a specific game starts Empty Re: Running a script before a specific game starts

Post by Spulit 10/07/24, 03:16 pm

Spulit
Spulit

Messages : 19
Date d'inscription : 2024-01-03

Back to top Go down

Running a script before a specific game starts Empty Re: Running a script before a specific game starts

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum