Playnite Forums
Using {PlayniteDir} in emulator config fields - Printable Version

+- Playnite Forums (https://playnite.link/forum)
+-- Forum: Playnite (https://playnite.link/forum/forum-1.html)
+--- Forum: Support and Troubleshooting (https://playnite.link/forum/forum-4.html)
+--- Thread: Using {PlayniteDir} in emulator config fields (/thread-956.html)



Using {PlayniteDir} in emulator config fields - whoozwah - 11-12-2021

I would like to make my Playnite install completely portable so that I can use it from a flash drive and have made an emulators folder inside of playnite with subfolders for my emulators. However when I edit the installation path of my emulators to read, for example:

{PlayniteDir}\Emulators\Retroarch

That doesn't work. I get an error that the emulator cannot be found. Is there a way to define emulator exe locations using relative paths?

Edit: I discovered the solution. Instead of using {PlayniteDir} variable, I used a period. So the correct relative path is

.\Emulators\Retroarch

I didn't realize Playnite respects windows relative path arguments as well as it's own internally defined variables. I will leave this thread up for others that may find it useful.


RE: Using {PlayniteDir} in emulator config fields - Crow - 11-13-2021

Looks like a bug, it should be working, I'll look into it. It's just emulator installation folder that didn't work with it?

Using {PlayniteDir} is definitely preferable because .\ will break if something starts Playnite with different working directory.


RE: Using {PlayniteDir} in emulator config fields - Mitsie - 03-07-2022

I use Playnite on a portable Hard drive and use it alongside emulators for portability. It is flawless in every other respect, apart from not being able to use {PlayniteDir} in the emulator auto configurator.
Using .\ works as whoozwah points out in his OP.

But then comes another problem, if you use a standard directory on the drive like C:/Games and not a relative path everything works as intended.

Using static drive paths is fine when not using playnite for portability, as a USB hard drive could be E:/ on one machine, then G:/ on another so will break the library and break the portability.

If you use the relative path .\ when playnite does a library update for the Emulator, it looks at the path and never matches the already existing games, so it duplicates the same games, even if nothing has changed.

The only way around this, for example, if you want to add one game to your collection. You must delete all the games for that platform and then let Playnite find them all again. This can turn a 2 minute library update into a 8 hour job of re-editing all of your titles, artwork and correcting "how long to beat" mismatches etc.

Is there any chance the {PlayniteDir} can be added to work in the emulator auto-configuration tab, or alternatively, playnite to detect already existing games for using a relative path .\ so it doesn't create duplicates of every game on every emulator library update. Either or would be good.

It's great,because I can pick up my portable hard drive and take my massive game collection and library with me.


RE: Using {PlayniteDir} in emulator config fields - Crow - 03-08-2022

{PlayniteDir} and {EmulatorDir} variables not working properly in emulation related fields is being fixed in Pplaynite 10.


RE: Using {PlayniteDir} in emulator config fields - Mitsie - 03-08-2022

(03-08-2022, 07:25 AM)Crow Wrote: {PlayniteDir} and {EmulatorDir} variables not working properly in emulation related fields is being fixed in Pplaynite 10.

Good Stuff..  Big Grin