Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Command-line Arguments when Launching Games via Protocol #4182

Open
Sewer56 opened this issue Dec 16, 2024 · 3 comments · May be fixed by #4186
Open

Feature Request: Command-line Arguments when Launching Games via Protocol #4182

Sewer56 opened this issue Dec 16, 2024 · 3 comments · May be fixed by #4186
Labels
feature-request New feature needs to be implemented.

Comments

@Sewer56
Copy link

Sewer56 commented Dec 16, 2024

Hey there, Heroic team! 👋

Some of you are familiar already; but for the others. I'm one of the folks working on
the Nexus Mods app (a Cross Platform, GPLv3 Mod Manager) funded by Nexus Mods.

And, a while back we've added support for GOG games by integrating with Heroic;
in the hopes to make modding on Linux more accessible to a typical user.

That said, thank you for all your work.

What's missing?

It seems there's currently no way to pass command line arguments when launching
games through Heroic.

Looking at src/backend/protocol.ts#L104,
which I believe is the entry point, it seems the heroic protocol doesn't support this yet.

Why we need this

When we launch games from within the App, we actually request the store / user's installation method to start the process
whenever possible. People hitting 'launch game' via the App actually request Heroic itself to launch it (heroic://launch/).

Launching via Heroic ensures the end user's preferences for things like WINEPREFIX, Wine/Proton version etc. are respected.

Some games however may need specific command line arguments to work properly with mods.
Some good examples:

  • Mount & Blade II: Bannerlord: We need to specify the mods to be loaded via commandline args; and whether to boot singleplayer/multiplayer.
    • If the user has BLSE installed, we need to pass /forcenetcore to be able to boot the game at all!!
  • Cyberpunk 2077: If the user is using REDmod (CDPR's 1st party mod loader/tool), we need to pass the set of mods to 'deploy' (compile) to their CLI.

What we're thinking

It would be helpful if it were possible to pass additional launch arguments when starting games through Heroic's protocol.

Currently the protocol uses the following form:

heroic://launch/{storeType}/{gameId}

It could be extended to something like:

heroic://launch/{storeType}/{gameId}/{commandLineArgs}

With the commandLineArgs section being optional.
Or alternatively:

heroic://launch/{storeType}/{gameId}?args={commandLineArgs}

We're happy to help out with this if you need any support from us - just let us know!
And of course, thanks for your time 🤞

@Sewer56 Sewer56 added the feature-request New feature needs to be implemented. label Dec 16, 2024
@CommandMC CommandMC linked a pull request Dec 19, 2024 that will close this issue
4 tasks
@CommandMC
Copy link
Collaborator

CommandMC commented Dec 19, 2024

Hey there, I've just opened a PR to resolve this issue. Please check it out, feel free to ask (either here or on Discord) if there are any questions.

I should note that if you want to pass multiple arguments, you will need multiple arg parameters. Splitting arguments automatically on whitespace is purposefully not done (to make it possible to specify /paths/with spaces/ as one argument for example)

@Sewer56
Copy link
Author

Sewer56 commented Dec 19, 2024

Acknowledged. Thank you.
Currently at the end of the day (on a yearly party), and will be travelling tomorrow.

I may have a quick look afterwards around Saturday or late Friday. But it sounds good to me 👍

@CommandMC
Copy link
Collaborator

Oh, no rush at all! Have a good one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature needs to be implemented.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants