I have packaged my (Windows) game and deployed to two separate computers, each with their own separate Steam accounts.
My game is not Greenlit, so I am using the Steam development game: Spacewar.
All of my in-game Steam integrations are setup and working to support direct Steam invitations and session joining. However, I wanted to test these areas, but wasn’t quite sure how. Searching the web, I could find little to no information on how to do so.
If I host my game on one computer, and send in invite to my other: when the other user clicks “Join” from the Steam invitation, they are prompted to download/install Spacewar.
Run Process Explorer and setup a Path filter for “Spacewar”.
Re-send invitation from host to the other user.
While Process Explorer is running on the client, click the Steam join request and let it launch Spacewar (don’t worry about it not launching your game).
Let Spacewar finish loading, then exit the game.
Bring up Process Explorer and research the list. Find the first entry where it actually invokes SteamworksExample.exe
Look at the Properties of the entry. The command line should show, at the end, something like: +connect_lobby 109775243872202570
Setup a batch file to launch your game, and add that to your command at the end: +connect_lobby 109775243872202570
Launch your game using that batch file. UE4 will then invoke the Steam join and you will be able to test out your game! (OnSessionUserInviteAccepted and OnJoinSessionCompleted should execute).
Didn’t work for me. The only real difference I notice when following the steps was my property entry read “+connect_lobby %llu”. After running the steps above I
Sent an invite from the server machine, where nothing was installed or changed.
I do get the invite message from steam while the game is running on the client, I accept but the client doesn’t execute OnSessionUserInviteAccepted.
“+connect_lobby %llu” doesn’t look right. It almost looks like a batch file parameter is not being set or passed in correctly. That might be the problem, or part of it.
Closer now. %llu was the issue. In this context it is looking for the STEAM_ID which I was able to get from the environment variables while spacewar was running. Replacing the %llu with the steam id gave better results!
All working now. Just for anyone else who comes across this thread, it isnt actually the steam id that you need to use in the batch file, just use the actual number posted in jvukovich’s answer “109775243872202570”.
Also be sure to have “bUsesPresence = true” when creating your session.