Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Is it possible to access the running game through the plugin? #505

Closed
free-storage opened this issue Jul 13, 2023 · 6 comments
Closed

Is it possible to access the running game through the plugin? #505

free-storage opened this issue Jul 13, 2023 · 6 comments
Labels
feature request a request for a feature, no guarantee of addition

Comments

@free-storage
Copy link

free-storage commented Jul 13, 2023

I want to develop my plugin. Is it possible to access the running game through the plugin? Access to the running container (process) with the game and run something inside the container with the game, for example, a game trainer.

@free-storage free-storage added the feature request a request for a feature, no guarantee of addition label Jul 13, 2023
@KP2048
Copy link
Contributor

KP2048 commented Jul 13, 2023

You can, but not from the frontend. You - would probably need to run something like a traditional memory trainer from the backend using the process id retrieved from the frontend. Look at memorydeck for examples

@KP2048
Copy link
Contributor

KP2048 commented Jul 13, 2023

Stuff that requires access to the filesystem, process structure and memory, and anything that requires interfacing with the kernel cannot be done from the frontend, otherwise websites could wipe your storage when you visit them etc. BrowserJS, not to be confused with NodeJS, cannot and will not be able to interface with the kernel in this way for the user's protection and as a result you don't have direct memory access. NodeJS technically can, but Chromium Embedded Framework, or CEF, which is what steam uses for the new big picture mode, is literally just a stripped down version of chrome, and as a result runs BrowserJS, because it is in fact a browser. So if you want to, you should probably just work with the dev that runs the Memory Deck plugin for adding trainer-like functionality as it is the closest to what you are looking for. Stuff like memory editing would need to be done from the python side and he already has memory editing there.

@free-storage
Copy link
Author

@Witherking25 Thanks for the answer.

At the moment I want to make the following functionality for the plugin: Button to start the trainer. The script will launch the exe file (this file will be located, for example, in the home folder) of the trainer inside the process, a second window with the trainer will appear in the container and you can switch between the game and the trainer.

Therefore, I need to figure out how to send a command to a process like "start Z:\home\trainer.exe" through the plugin

And in the future, I would like to make not only the launch of the trainer, but also the management of it through the plugin.

@KP2048
Copy link
Contributor

KP2048 commented Jul 14, 2023

If you want it as a second window for the game, you will probably have to mess with gamescope's window properties. I don't know enough about them to help you there, but a good place to look would be to dig through gamescope's code on their GitHub

@KP2048
Copy link
Contributor

KP2048 commented Jul 14, 2023

Also, you will have to do all this from the python side triggered by a button press from the frontend

@KP2048
Copy link
Contributor

KP2048 commented Jul 14, 2023

Also, last time I checked, stuff like trainers and dll injectors and stuff don't work with wine/proton unless both programs were started from the same wine call, otherwise it's impossible to get a valid process handle because of how they map memory addresses. On top of that, they generally have to be designed to run that way so one that was designed for windows won't work. Essentially every instance of wine/proton has its own virtual process list, and two separate wine programs can't communicate with each other like they can on windows

@SteamDeckHomebrew SteamDeckHomebrew locked and limited conversation to collaborators May 14, 2024
@AAGaming00 AAGaming00 converted this issue into discussion #626 May 14, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
feature request a request for a feature, no guarantee of addition
Projects
None yet
Development

No branches or pull requests

2 participants