DOS76 Posted January 6, 2020 Share Posted January 6, 2020 The core splitter predates directory remap options in RA so while it would probably still work using the directory remaps is probably the easiest solution. Quote Link to comment Share on other sites More sharing options...
SGAN Posted March 21 Share Posted March 21 (edited) Are you using Windows, GNU/Linux or what? For Windows, I'm creating my own Batch files (.bat) with my own scripts, for loading different things (loading JoyToKey for example (or Antimicro), for closing the emulator/game from the controller, or remapping some particular buttons that RetroArch, or any other emulator or game, don't let me to remap). Futhermore, Im using the scripts following a "similar structure", so it is easy for me to "adapt" the script to another case, and I always load PC games, and others emulators/games using a script, so I can call the script/.bat from any frontend (like Playnite, for example). You could create a backup of your different controller configuration files calling them "whatever".bak (for example) and using the "Xcopy" or "Copy" command (in Windows) for copying and overwriting the original retroarch config file, each time you launch the game from the script. With your problem, for example, for Yuzu, I have different versions of the emulator (different directories for each version, inside my Yuzu directory, I need some kind of organization). But most of the configuration are stores together in another directory (most of times, 1 directory for each game)... What I do, is to move the directory and renaming it before launching a game, and after the game/emulator close, I return it to its original place and rename it back again. For example, Candece of Hyrule (which have no PC version), I emulate it on my PC in my living room (when I not use the Switch for gaming, wich I use exclusively in the portable mode for some games) I save the user/config directory as "user-CadenceOfHyrule_Switch_WORLD", in the script it says move /Y .\yuzu-configs\user-%Juego% .\%Version-Emulador% ren .\%Version-Emulador%\user-%Juego% user cls (It moves the directory when the emulator needs it to be, and rename it to the name the emulator needs too) Previously I have set the "Version-Emulador" (emulator version), and the "Juego" (game) variables like this: set Version-Emulador=Yuzu-msvc-1734_2024-03-05 set Juego=CadenceOfHyrule_Switch_WORLD The game is launching using the "command line" commands, like this: cd %Version-Emulador% %Emulador%.exe -f -g ..\ROMS\%Juego-ROM%.%File-Extension% cd.. (Of course, previously, I set the variables "Juego-ROM" and "File-Extension" When the emulator/game closes, the script do the following thing: ren .\%Version-Emulador%\user user-%Juego% move /Y .\%Version-Emulador%\user-%Juego% .\yuzu-configs cls So the full directory is moved to anohter directory (and renamed), saving the game save files, the controllers configurations, etc ... if I need to use the game with another version of the emulator, I copy/paste the script, and change the variable "Version-Emulador" for another one (being "Version-Emulador" the name of the directory where I have the other version of the emulator). You don't need to set variables for doing the same, I set them because it is easier for me to make changes for each game, emulators versions, config files, needed directories, etc... so I don't have to write and rewrite the same things, or looking for each value and copy/paste it in the whole script But You could simply use somethng like this ren .\Yuzu-msvc-1734_2024-03-05\user user-CadenceOfHyrule_Switch_WORLD move /Y .\Yuzu-msvc-1734_2024-03-05\user-CadenceOfHyrule_Switch_WORLD .\yuzu-configs cls The same way, I use to store configs and other things in different directories for "safety" (for not deleting them by error, for example), but you don't need to do it neither for a "simple" script. For example, in your case you can do the following: - Open your retroarch loading your game. - Remap your controller as you please and save the game controller config (or the plataform if you want or whatever, I recomend doing it for each game). - Go to the RetroArch directory, and there, go to "\config\remaps\" - Go to the emulator/core remap directory (for example, for Saturn, if you use the mednafen core, you need to go to "Beetle Saturn") - Look for your stored game controller config. For example, in my case, for the game "Bulk Slash", it is BulkSlash_Saturn_JAP-ENG.rmp (my game file is called BulkSlash_Saturn_JAP-ENG.chd). Rename it to BulkSlash_Saturn_JAP-ENG.bak (for example, .bak is usually used for file backups). - Open your retroarch loading your game again and you controller mapping will be by defult again, remap it again with a different controller configuration (for example) - Look for the new config/remap file (it is in "\config\remaps\Beetle Saturn" again - Rename ir to BulkSlash_Saturn_JAP-ENG-Alternative.bak (for example) Now you can create 2 different scripts to load the first one or the second one remaps like this (I'm gonna type a complete simple script for doing that): - Open your Notepad, and copy/paste the following: @echo off Title " -<< Bulk Slash >>- " ren .\config\remaps\"Beetle Saturn"\BulkSlash_Saturn_JAP-ENG.bak BulkSlash_Saturn_JAP-ENG.rmp .\retroarch.exe -f -L .\cores\mednafen_saturn_libretro.dll .\Games\Saturn\BulkSlash_Saturn_JAP-ENG.chd cls ren .\config\remaps\"Beetle Saturn"\BulkSlash_Saturn_JAP-ENG.rmp BulkSlash_Saturn_JAP-ENG.bak exit I save the script/.bat with same name of the rom/image, in this case, for example "BulkSlash_Saturn_JAP-ENG.bat" In that example, the script is stored in the RetroArch directory (that's why the paths starts with ".\" (so the script works wherever I move/copy the whole emulator directory, but you can use the full path inside the script, for example: F:\Games\RetroArch\config\remaps\"Beetle Saturn"\BulkSlash_Saturn_JAP-ENG.bak If you wanna Load the second (alternative) controller remap, the script must be: @echo off Title ==" -<< Bulk Slash >>- " ren .\config\remaps\"Beetle Saturn"\BulkSlash_Saturn_JAP-ENG-Alternative.bak BulkSlash_Saturn_JAP-ENG.rmp .\retroarch.exe -f -L .\cores\mednafen_saturn_libretro.dll .\Games\Saturn\BulkSlash_Saturn_JAP-ENG.chd ren .\config\remaps\"Beetle Saturn"\BulkSlash_Saturn_JAP-ENG.rmp BulkSlash_Saturn_JAP-ENG-Alternative.bak exit So you can load your alternative configuration, just double clicking on one of the to ".bat" files (or you could call them from a fronend, like Playnite or whatever), or you could call it from another script using CALL CALL "path-of-the-script"\BulkSlash_Saturn_JAP-ENG.bat My scripts started being things as simple as those ones loading some things or aplications (like JoyToKey)... but... nowaday, the are really big, and they call others "generic" scripts/.bat (for doing some repetitive things each time I load a game/emulator), some autohotkey scripts for doing somethings when launching the game, loading some aplications, etc (like FART -Find and Replace Text-, for example)... those scripts can, maybe, kill some task before of after launching/closing a game, execute some commands a few seconds after a game is started, edit some config files before launching a game (or after closing it), for a emulator restart if I press some button combination in the controller, etc... and of course, for close any aplication after closing the game/emulator, and dicard o revert any change made before launching the game. Regards. Edited March 21 by SGAN Quote Link to comment Share on other sites More sharing options...
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.