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

How can i apply thprac to game WITHOUT a confirmation prompt? - - - (Please actually read) #192

Open
dawnbomb opened this issue Oct 18, 2024 · 14 comments

Comments

@dawnbomb
Copy link

dawnbomb commented Oct 18, 2024

I know it's something you think is minor, but it's actually extremely irritating to have to wait after a game already launches for a do you want to apply, and a FURTHER "successfully applied" popup.

I would like it to just apply, and only have a popup if an error happened (like failed to apply or nothing happened).
At most, maybe play a sound to verify it applied, altho really it would be obvious because you can test it.

Ideally, i'm looking for a command argument i can use. I want to run thprac programmatically and give some argument that says "start in silent mode" or something.

Alternatively, a setting would be nice, altho you don't keep your settings in portable mode, so thats quite annoying.

Anyway, is there any kind of "Just apply, don't ask, don't tell" mode?
If not, can you please explicitly add one for me? It would be very apricated.

@sere3925sere
Copy link

And I have to alt-tab to desktop to apply thprac. How do you start your game?

@dawnbomb
Copy link
Author

dawnbomb commented Oct 27, 2024

uh, i launch the game.
Anyway, while i'm trying to run thprac programically, but really,
the exact same behaviour happens if i have thprac open and click apply thprac to ongoing game.

again, i would very much like a "just apply, don't ask, don't tell" mode.
I'm not sure how to better contact anyone working on this, but it would be silly to make my own branch version with this when this main one is constantly updated. Instead, if that kind of feature could be added to thprac, i would be very very happy.

Please add this!
and no, i'm not gonna stop wishing for it in 1-4 weeks.

@sere3925sere
Copy link

How do you launch the game, what exe do you run? 東方紅魔郷.exe, vpatch.exe, do you use thcrap, do you use thprac launcher?

@32th-System
Copy link
Member

If you place thprac.exe right next to a Touhou game exe, it will just run the game with thprac applied, no confirmation prompt. But I do agree that there should be more than that. CLI flags for specifying a game exe, or a PID to attach to that doesn't bring up a confirmation prompt would be really good

@sere3925sere
Copy link

Ah. I barely used that, because thprac launches 東方紅魔郷.exe instead of vpatch.exe in that case.

@dawnbomb
Copy link
Author

dawnbomb commented Oct 27, 2024

if you must know, this is how i'm launching the game. (C#)

image

and this is how i run touhou practise tool.

image

now, im unaware of anyway to programically apply touhou practise to a game without any popups. running it standardly makes it search for a running game and ask if you wanna apply, but im unaware of anyway to tell it to "just do it".

considering i'm doing this programically, i would be able to pass arguments to thprac, but again, i'm unaware of anyway to do any kind of silent apply. What i want is a smoothe process where a user for my program presses launch, and the game just launches*, with all user settings happening automatically. And while they do, the extra popups from thprac are unnecessary and bothersome, and COULD be fixed is someone was willing to do something (and so, i hope i get some devs attention, to actually do something).

@KaleiAlma
Copy link

i second this for completely different reasons (i'm on linux, and for whatever reason the confirmation dialog is broken when launching from steam using thcrap_proton... a setting would be greatly appreciated at least. hell, i could even make the change myself and open a pull request)

@32th-System
Copy link
Member

i second this for completely different reasons (i'm on linux, and for whatever reason the confirmation dialog is broken when launching from steam using thcrap_proton... a setting would be greatly appreciated at least. hell, i could even make the change myself and open a pull request)

I have added command line flags to thprac.exe in this commit: 0b8d25e. The commit description describes how these command line flags work

@KaleiAlma
Copy link

oh that was quick!

@dawnbomb
Copy link
Author

Ruh-roh, I'm github illiterate X-X

idk how to download that. current releases are an exe, so i'm relatively sure i can't just replace some files.
second, can i see an example? it says command line, so i guess... i programmatically, open cmd, target thprac, then use that as some extension. Or i probably do my second pic but add an argument.

you have what is that? Is that... the ID of the game? i would think it would assume / already know what game as it usually does. Or maybe thats something else?

you have a with and without V patch version, i think, but oddly not using similar names (attach-with-vpatch and attach-without-vpatch) altho, why does it even need to specify, running thprac normally doesn't need us to specify?

In my head, rather then a with or without vpatch, i rather expected the argument name to be something like "NoAsk" or something (as the point is that it's not asking the players permission, it just applies thprac to whatever it detects as the ongoing game)

This is to simplify an actual touhou game launcher, so people'd be very happy if it all worked out. Removing that friction layer between clicking launch game, and all these popups.

@32th-System
Copy link
Member

this link should work https://nightly.link/touhouworldcup/thprac/workflows/main/master/thprac.zip. As for examples

thprac.exe --attach 1234 # attempts to attach thprac to a process with ID 1234
thprac.exe C:\\Users\\thc\\Desktop\\Games\\Windows\\th17\\th17.exe # Launches th17.exe and automatically applies thprac
thprac.exe --without-vpatch C:\\Users\\thc\\Desktop\\Games\\Windows\\th11\\th11.exe # Launches th11.exe and does NOT attach vpatch_th11.dll, even if it is present. Note that launching vpatch.exe with thprac does not work, you need to launch the game exe, and thprac will inject vpatch on it's own

@dawnbomb
Copy link
Author

dawnbomb commented Dec 27, 2024

The link "worked", but...

now it's not attaching at all. Even at a basic level, running even the untranslated original th07 and then running this thprac, i get failed to apply thprac. The old one (2.2.1.9) applys correctly.

IE, i didn't even bother trying to do anything pragmatically, because it already broke thprac's most basic function (standard execution) and i doubt you would pull that into a recent release if it breaks the entire program :p

However that aside, why would a end user need to attach to a process with a specific ID#? Why not just use auto detect like all previous versions use?

IE: i wanted it to attach like before, but for some argument to "silent attach", and only make some noise or popup or something if it fails.

But also thank you for trying, and please keep trying! <3

@KaleiAlma
Copy link

i second the "silent attach" because as it turns out getting a windows PID with the proton wrapper is hell.

@dawnbomb
Copy link
Author

dawnbomb commented Jan 6, 2025

Bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants