otavepto / gbe_fork

Fork of https://gitlab.com/Mr_Goldberg/goldberg_emulator
https://gitlab.com/Mr_Goldberg/goldberg_emulator
GNU Lesser General Public License v3.0
191 stars 55 forks source link

lobby_connect and steamclient_loader improvements #132

Open M4RCK5 opened 2 months ago

M4RCK5 commented 2 months ago

For example i have a script that works kinda like a launcher, it detects multiple ini files and lets the user choose one, then copies it as ColdClientLoader.ini that way i can have diferent launch options for a game ¿what about having an option to load diferent ini files without the need to replace ColdClientLoader.ini each time? In Terraria for example i tried to pack the game with tmodloader and each one have diferent appids and to use them with lobby_connect i had to read ColdClientLoader.ini after selecting the launch option so i can retrieve the appid and then generate an lobby_connect_appid.txt with steamclient_loader.exe inside (i added this into my launcher that way i can use it with any game) ¿what about making lobby_connect call steamclient_loader by default (if they are next to each other) unless there is an lobby_connect_appid.txt file?

otavepto commented 2 months ago

You can just pass the game/app arguments to steamclient_loader.exe instead of modifying the ColdClient.ini, it's mentioned in the readme: https://github.com/otavepto/gbe_fork/blob/dev/post_build/README.experimental_steamclient.md

Note that any arguments passed to steamclient_loader.exe via command line will be passed to the target .exe

Example

steamclient_loader.exe -dx11 -windowed

Will pass -dx11 -windowed to your game.

Tying lobby_connect to ColdClientLoader doesn't make sense, they're completely different tools in totally different realms. I didn't fully understand the second scenario with lobby_connect, maybe you could simplify it a little with some steps ?

M4RCK5 commented 2 months ago

You can just pass the game/app arguments to steamclient_loader.exe instead of modifying the ColdClient.ini, it's mentioned in the readme: https://github.com/otavepto/gbe_fork/blob/dev/post_build/README.experimental_steamclient.md

I know about that, i mean what about when i want to run a diferent executable?? If i want to do that then i need to replace ColdClientLoader.ini each time, also for multiple launch options i preffer to have multiple ini files, that way i dont need to edit my scripts each time i pack the emu with a game.

Tying lobby_connect to ColdClientLoader doesn't make sense, they're completely different tools in totally different realms. I didn't fully understand the second scenario with lobby_connect, maybe you could simplify it a little with some steps ?

image

PD: sorry for the confusion, english isn't my first language, maybe if i show u part of my batch scripts it could be easier to understand.

otavepto commented 2 months ago

I still can't grasp the scenario fully 😄 but if you mean you don't want to launch steamclient_loader.exe directly, you can do this (assuming we have one game for now):

  1. Set the common parameters which are rarely changed inside ColdClient.ini, example: -dx11
  2. Assuming you want to use lobby_connect.exe now, browse for steamclient_loader.exe, not the original game .exe
  3. Now your game will be launched with 2 arguments:
    • -dx11
    • +connect_lobby 1122334466
  4. Since lobby_connect_my_app.txt is now saved in disk, it will always launch steamclient_loader.exe with the lobby connect argument, and steamclient_loader.exe will append its own argument -dx11 everytime

Regarding multiple games/apps, ColdClientLoader is really oriented towards a single app/game, even the registry modifications it does are really not suited for multiple instances. You have to create different setups/copies for each game, it cannot be used as a central hub like the original Steam.

I don't know if that helps. I'll try to understand the scenario better over time.

M4RCK5 commented 2 months ago

I still can't grasp the scenario fully 😄 but if you mean you don't want to launch steamclient_loader.exe directly, you can do this (assuming we have one game for now):

  1. Set the common parameters which are rarely changed inside ColdClient.ini, example: -dx11
  2. Assuming you want to use lobby_connect.exe now, browse for steamclient_loader.exe, not the original game .exe
  3. Now your game will be launched with 2 arguments:
  • -dx11
  • +connect_lobby 1122334466
  1. Since lobby_connect_my_app.txt is now saved in disk, it will always launch steamclient_loader.exe with the lobby connect argument, and steamclient_loader.exe will append its own argument -dx11 everytime

Regarding multiple games/apps, ColdClientLoader is really oriented towards a single app/game, even the registry modifications it does are really not suited for multiple instances. You have to create different setups/copies for each game, it cannot be used as a central hub like the original Steam.

I don't know if that helps. I'll try to understand the scenario better over time.

I guess that sending my scripts to u so u can see how they work could be better, do u have any email or something like that where i can send the files to?? I dont want to make them public yet, im still making a lot of changes.

Wanted to ask how "local_save_path" works, i always packed local_save.txt next to the emu dll so each game has his own instance, that way i can share the game with the emu already set up making the games almost fully portable.

Also if im using steamclient_loader.exe i need to generate [app::steam_interfaces] inside too?? The reason i always use steamclient_loader in the first place was that i didnt needed to generate those.

otavepto commented 2 months ago

For local saves, they work the exact same way as the old one, just placed inside ini file instead of a separate text file local_save.txt, so you should be all good. The new way:

  1. Create steam_settings\configs.user.ini
  2. Set local_save_path to your exact same path as before

The ini files inside steam_settings always override the global ones, and the emu will auto merge both, so you don't have to worry about whatever the user has set in their global settings 👍

For old interfaces, they're not that much of a hassle, just to be on the safe side.

M4RCK5 commented 2 months ago
  1. Create steam_settings\configs.user.ini
  2. Set local_save_path to your exact same path as before

Ok going to try it, thanks. Edit: no luck with it, still doesnt work.

For old interfaces, they're not that much of a hassle, just to be on the safe side.

Even using the experimental version?? I guess i could make an script that searchs for "steam_api.dll & steam_api64.dll" inside the game files and then runs the generate_interfaces tool on them, i usually avoid this because those files could be repeated or in weird paths from game to game.

otavepto commented 2 months ago

It's mentioned here: https://github.com/otavepto/gbe_fork/blob/dev/post_build/README.experimental_steamclient.md

You do not need to create the app::steam_interfaces section for the steamclient version of the emu

So not really, it's just a general rule of thumb when in doubt, but for automation, nope, skip it.

I just tested local save, and the ini was still being saved to the global dir, so I must've broke something. Will fix it. Thanks for reporting this actually.

otavepto commented 2 months ago

Hopefully it's fixed: https://github.com/otavepto/gbe_fork/actions/runs/8794332404 These are the changes: https://github.com/otavepto/gbe_fork/blob/dev/CHANGELOG.md

Let me know if it's still broken

M4RCK5 commented 2 months ago

Hopefully it's fixed: https://github.com/otavepto/gbe_fork/actions/runs/8794332404 These are the changes: https://github.com/otavepto/gbe_fork/blob/dev/CHANGELOG.md

Let me know if it's still broken

Works fine now, thanks a lot!!

otavepto commented 1 month ago

@M4RCK5 Check the build artifact from this PR #166 , instead of changing the .ini file of the loader, you can create multiple .ini files for each configuration, each one would be named as the loader itself. ex: loader_config_1.exe --- loader_config_1.ini loader_config_2.exe --- loader_config_2.ini I don't really know if it would help as I still don't understand the problem well. Apologies for that, I think as time moves on I become more stupid than before 😄

M4RCK5 commented 1 month ago

@M4RCK5 Check the build artifact from this PR #166 , instead of changing the .ini file of the loader, you can create multiple .ini files for each configuration, each one would be named as the loader itself. ex: loader_config_1.exe --- loader_config_1.ini loader_config_2.exe --- loader_config_2.ini I don't really know if it would help as I still don't understand the problem well. Apologies for that, I think as time moves on I become more stupid than before 😄

My idea was to have the option to tell the loader to load an specific config file, maybe doing "loader.exe config_name.ini" and add any custom parametter after that.

This solution could be usefull too but not the best one tbh bc u still will need multiple instances of the loader

What my script does is that it grabs an config file with an tag at the start "ez_*.ini" and replaces ColdClientLoader.ini before launching the loader, also it has a little menu that prints all the config names so the player can choose between them, that way i can have one loader for multiple config files.

Detanup01 commented 1 month ago

you can do is: have a normal ColdClientLoader.ini and something like: GameWithDX.ini GameWithVulkan.ini and others

and when you start it you rename the ColdClientLoader.exe to the selected config. and starting that exe.

also if we want to do "loader.exe config_name.ini" the old persistent mode will be unavailable. so we cannot change this (or I suggest not changing it)

M4RCK5 commented 1 month ago

you can do is: have a normal ColdClientLoader.ini and something like: GameWithDX.ini GameWithVulkan.ini and others

and when you start it you rename the ColdClientLoader.exe to the selected config. and starting that exe.

also if we want to do "loader.exe config_name.ini" the old persistent mode will be unavailable. so we cannot change this (or I suggest not changing it)

Yeah i yave something like that in my script, i decided to go with a tag at the start of the file so i can check wich ones are the config files even if the game has other ini files in the root folder, like i said before it searchs for files called "ez_.ini" and shows the name on a numbered list, that way the user can choose one, also i can change the order of the items on the list adding numbers after the tag "ez_1-.ini", "ez_2-*.ini", the menu its generated using loops, after the user selects one option it copies the ini file to ColdClientLoader.ini and then launches the loader. I dont think im going to rename the loader because my scripts also generates the file "lobby_connect_appid.txt" with the name of the loader inside wich i never change once its set up, that way i can connect using that if the overlay its giving issues. Anyways thanks for the sugestion.