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

Missing text fields in advanced game default settings for scripts to run before and after a game is launched feature #4044

Open
casasfernando opened this issue Oct 7, 2024 · 6 comments · May be fixed by #4093
Labels
bug:unconfirmed Someone works on identifying the issue

Comments

@casasfernando
Copy link
Contributor

casasfernando commented Oct 7, 2024

Describe the bug

need to use a pre-launch/post-exit scripts (#3565 - #2507) with my games to be able to do some work for the games to run correctly in my environment and then clean up after the game exits.

Currently is not possible to configure default scripts to run before and after a game is launched because the script path text fields are missing in the 'Advanced' tab of the 'Game Defaults' settings page.
There is a 'Scripts:' label though, but the text fields to enter the scripts paths are missing so it's not possible to configure them.

Not sure if current behavior is intended or not but it if intended, the 'Scripts:' label should be removed to avoid confusion or otherwise the scripts path text fields should be added so the user is able to configure defaults settings for this feature.

Add logs

(21:49:51) INFO:    [Legendary]:        Legendary location: /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/legendary
(21:49:51) INFO:    [Gog]:              GOGDL location: /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/gogdl
(21:49:51) INFO:    [Connection]:       Connectivity: check-online
(21:49:51) INFO:    [Connection]:       Pinging external endpoints
(21:49:51) INFO:    [Gog]:              Checking for existing gog manifests
(21:49:52) WARNING: [Backend]:          Failed to register protocol with OS.
(21:49:52) INFO:    [Legendary]:        Running command: LEGENDARY_CONFIG_PATH=/home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/legendaryConfig/legendary /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/legendary --version
(21:49:52) INFO:    [Gog]:              Running command: GOGDL_CONFIG_PATH=/home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/gogdlConfig /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/gogdl --auth-config-path /home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/gog_store/auth.json --version
(21:49:52) INFO:    [Nile]:             Running command: NILE_CONFIG_PATH=/home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/nile_config /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/nile --version
(21:49:52) INFO:    [Connection]:       Connectivity: online
(21:49:52) INFO:    [Backend]:          User Not Found, removing it from Store
(21:49:52) ERROR:   [Gog]:              Unable to syncQueued playtime, userData not present
(21:49:52) INFO:    [Gog]:              Running command: GOGDL_CONFIG_PATH=/home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/gogdlConfig /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/gogdl --auth-config-path /home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/gog_store/auth.json auth
(21:49:52) INFO:    [Backend]:          Frontend Ready
(21:49:52) INFO:    [Backend]:          
System Information:
CPU: 8x AMD Custom APU 0932
Memory: 15.53 GB (used: 4.93 GB)
GPUs:
  GPU 0:
    Name: Advanced Micro Devices, Inc. [AMD/ATI] Sephiroth [AMD Custom GPU 0405]
    IDs: D=1435 V=1002 SD=0123 SV=1002
    Driver: amdgpu
OS: SteamOS 3.5.19 holo (linux)

The current system is a Steam Deck (model: OLED) in desktop mode
We are running inside a Flatpak container

Software Versions:
  Heroic: 2.15.2 Emeth
  Legendary: 0.20.36 Urban Flight (Heroic)
  gogdl: 1.1.2
  comet: comet 0.1.2

  Nile: 1.1.2 Will A. Zeppeli

(21:49:52) INFO:    [Backend]:          AreWeAntiCheatYet data downloaded
(21:49:52) INFO:    [Backend]:          Checking for current version changelog
(21:49:54) INFO:    [Winetricks]:       Downloading Winetricks
(21:49:57) INFO:    [WineDownloader]:   Updating wine versions info
(21:49:57) INFO:    [WineDownloader]:   Fetching upstream information...
(21:49:57) INFO:    [WineDownloader]:   wine versions updated
(21:49:57) INFO:    [Backend]:          Starting the Download Queue
(22:09:22) INFO:    [Legendary]:        Running command: LEGENDARY_CONFIG_PATH=/home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/legendaryConfig/legendary /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/legendary --version
(22:09:22) INFO:    [Gog]:              Running command: GOGDL_CONFIG_PATH=/home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/gogdlConfig /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/gogdl --auth-config-path /home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/gog_store/auth.json --version
(22:09:22) INFO:    [Nile]:             Running command: NILE_CONFIG_PATH=/home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/nile_config /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/nile --version

Steps to reproduce

  1. Go to the settings page of any game in the library
  2. Go to 'Advanced'
  3. There is a 'Scripts:' label and right below to text fields to configure the script paths
  4. Go to 'Settings => Game Defaults => Advanced'
  5. There is a 'Scripts:' label but the text fields to enter the scripts paths are missing

Expected behavior

User should be able to configure default game scripts to run before and after a game is launched like it's possible to do on each individual game advanced settings page.

Screenshots

  • Individual game advanced settings page displaying the scripts path text fields:

Screenshot_20241007_215813

  • Default game advanced settings page missing the scripts path text fields:

game_defaults_missing_text_fields

Heroic Version

Latest Stable

System Information

CPU: 8x AMD Custom APU 0932
Memory: 15.53 GB (used: 6.49 GB)
GPUs:
GPU 0:
Name: Advanced Micro Devices, Inc. [AMD/ATI] Sephiroth [AMD Custom GPU 0405]
IDs: D=1435 V=1002 SD=0123 SV=1002
Driver: amdgpu
OS: SteamOS 3.5.19 holo (linux)

The current system is a Steam Deck (model: OLED) in desktop mode
We are running inside a Flatpak container

Software Versions:
Heroic: 2.15.2 Emeth
Legendary: 0.20.36 Urban Flight (Heroic)
gogdl: 1.1.2
comet: comet 0.1.2

Nile: 1.1.2 Will A. Zeppeli

Additional information

The issue is not specific to one system or configuration.

@casasfernando casasfernando added the bug:unconfirmed Someone works on identifying the issue label Oct 7, 2024
@casasfernando
Copy link
Contributor Author

casasfernando commented Nov 2, 2024

After going through the code, it seems this is/was the intended behavior:

I'm curious about the reason(s) behind this decision.
@arielj , @CommandMC why users shouldn't be able to set default scripts for all games?
Would the project be interested in a PR to change this? I can work on it. If that's not the case feel free to close this issue.

Thanks

@CommandMC
Copy link
Collaborator

I imagine the idea was that these scripts are going to be situational and specialized to the few games you add them to

Out of curiosity, what is it that you need to configure/clean up?

@casasfernando
Copy link
Contributor Author

Thanks for your reply @CommandMC .

I wrote a custom script that mainly takes care of synchronizing player profiles/savedgames for my sideloaded games with my different gaming devices through my Nextcloud server.
This way I can jump between devices and continue playing where I left. Sort of private “Steam/GOG cloud”.
This script will run before launching the game to make sure everything is synchronized and to start a continuous sync process in the background. Then once again after the game stops to stop the background sync process.
It may sound more complex than it actually is, but it is really cool and game/platform independent.

@CommandMC
Copy link
Collaborator

CommandMC commented Nov 2, 2024

Ah, I see. I did actually have something like this planned for Heroic (basically you'd tell it where your save files are, and it'd then move & symlink that folder to a central directory, which might be on a different mount point / network share). Alas, the todo list is too long

Well, regardless of what you use them for, we can definitely make the scripts show up globally. As with all global settings, they'll of course only apply for newly installed games

@casasfernando
Copy link
Contributor Author

That would be awesome.
Should I go ahead with the PR then?
I think it should be as simple as removing the code blocks mentioned above.

@casasfernando
Copy link
Contributor Author

Just created a PR to address this.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:unconfirmed Someone works on identifying the issue
Projects
None yet
2 participants