tf2-rich-presence icon indicating copy to clipboard operation
tf2-rich-presence copied to clipboard

Launching Rich Presence when TF2 is launched on Steam

Open Keanu73 opened this issue 5 years ago • 14 comments

Would it be possible to replace the main TF2 executable with a shell executable that launches the wrapper and then the game?

Keanu73 avatar Aug 11 '19 15:08 Keanu73

That's a good suggestion, and it may also be possible. I'll look into it.

Kataiser avatar Aug 11 '19 18:08 Kataiser

Although a downside to this is that if the exe is updated when a new TF2 update hits, you'll have to do the same process again of copying the main TF2 executable somewhere else, then pasting the wrapper executable.

Keanu73 avatar Aug 11 '19 19:08 Keanu73

Any progress on this?

Keanu73 avatar Aug 21 '19 14:08 Keanu73

I began to implement it a while ago, but it occurred to me that "modifying" hl2.exe could trigger VAC, so I stopped development.

Kataiser avatar Aug 21 '19 15:08 Kataiser

Yes, I know that modifying hl2.exe can trigger VAC, which is why I suggested instead of hooking it with some arbitrary DLL, just replace it with another executable. But if Valve doesn't like you replacing the executable in any way, shape or form then I guess this isn't possible.

On a side note, though, if you do launch the hl2 executable directly, does Steam recognise that you're playing it?

Keanu73 avatar Aug 22 '19 13:08 Keanu73

i made that bat code to make it happend.

how to do it in steps

step 1: add that bat file wherever you want, just make sure u know the file path, the file path should look like C:\home\sally\run.bat.

step 2: after that, click the properties button on the team fortress 2 on the cd "%appdata%..\Local\Programs\steam" path, image then change the URL to your bat file path and click apply and ok image

now if u run tf2, it will open rich presence no matter what

` cd "%appdata%..\Local\Programs\TF2 Rich Presence"

call "%appdata%..\Local\Programs\TF2 Rich Presence\TF2 Rich Presence.bat"

timeout 2

call explorer steam://rungameid/440

exit `

barrulik avatar Sep 10 '21 20:09 barrulik

btw @Keanu73 its my first time trying that program out

barrulik avatar Sep 10 '21 20:09 barrulik

Oh cool! This still won't affect launching the game via Steam, but I'll consider adding a feature to let you either create a shortcut like this automatically, or modify your start menu shortcut like you've done. Probably should also add a launch parameter to automatically open TF2 with -condebug.

Kataiser avatar Sep 12 '21 05:09 Kataiser

I guess i just need to add that after the "call" that calls ur program

barrulik avatar Sep 12 '21 05:09 barrulik

No I'm saying I need to add that parameter to my program

Kataiser avatar Sep 12 '21 05:09 Kataiser

Oh, i will try making that, keep in mind im not so good in python...

barrulik avatar Sep 12 '21 05:09 barrulik

I appreciate the initiative, but... I literally just said I'd do it...

Kataiser avatar Sep 12 '21 05:09 Kataiser

I missread it oops, maybe i shouldnt look in github while class in phisical school

barrulik avatar Sep 12 '21 05:09 barrulik

Probably lol

Kataiser avatar Sep 12 '21 05:09 Kataiser