Please upgrade your browser for the best possible experience.

Chrome Firefox Internet Explorer
×

Why Steam Overlay and SWTOR don't work, and how to fix it

STAR WARS: The Old Republic > English > Customer Service
Why Steam Overlay and SWTOR don't work, and how to fix it

renegadelink's Avatar


renegadelink
01.17.2012 , 09:04 PM | #1
So I've done some digging at why SWTOR and the steam overlay do not work together. The swtor mods didn't like my previous workaround so I figured I would help and explain what is wrong and how to fix it.

The steam overlay hooks SWTOR's launcher just fine. The problem comes right before the launcher starts SWTOR's client. The steam overlay is expecting the 'verb' argument to the windows api SHELL32 function ShellExecuteExW(http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx), to be the unicode string, "open". However, SWTOR's launcher uses an empty string, "", which gets defaulted to open. Since an empty string does not equal "open", the steam overlay exits out and does not hook into SWTOR's client.

I've tested editing memory making the empty string equal, open, and the steam overlay works just fine. Steam also has to be running in admin mode unfortunately because the launcher needs to escalate to admin.

To fix the steam overlay one of two things can happen. Valve can put in a check for the empty string, and if that means open is the default, then continue business as usual. Or Bioware can change how they start the client giving the ShellExecuteExW, the parameter verb as "open".

I've written a very small program showing how SWTOR's launcher is starting the client. I added a comment on what needs to change to fix. This may also be a problem with other games with a launcher not working with steam overlay.

Code:
#include <windows.h>
#include <stdio.h>
#include <conio.h>

int main()
{
	// Steam Overlay is expecting lpVerb to equal "open", but since lpVerb is an empty string, the Steam Overlay exits out
	// So for the Steam Overlay to work, the next line must read:
	// LPCWSTR lpVerb = L"open";
	LPCWSTR lpVerb = L"";

	LPCWSTR lpFile = L"C:\\Program Files (x86)\\Electronic Arts\\BioWare\\Star Wars - The Old Republic\\swtor\\retailclient\\swtor.exe";
	LPCWSTR lpParameters = L"-set username ...";
	LPCWSTR lpDirectory = L"C:\\Program Files (x86)\\Electronic Arts\\BioWare\\Star Wars - The Old Republic\\swtor\\retailclient";
	LPCWSTR lpClass = L"";

	SHELLEXECUTEINFOW exec;
	exec.cbSize = sizeof(exec);
	exec.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI;
	exec.hwnd = NULL;
	exec.lpVerb = lpVerb;
	exec.lpFile = lpFile;
	exec.lpParameters = lpParameters;
	exec.lpDirectory = lpDirectory;
	exec.nShow = SW_SCROLLCHILDREN;
	exec.hInstApp = NULL;
	exec.lpIDList = NULL;
	exec.lpClass = lpClass;
	exec.hkeyClass = NULL;
	exec.dwHotKey = 0;
	exec.hIcon = NULL;
	exec.hProcess = NULL;

	BOOL successful = ShellExecuteExW(&exec);
	if(successful)
		printf("Execute Succeeded.\n");
	else
		printf("Execute Failed.\n");

	printf("Press any key to exit...");
	_getch();
	return 0;
}
I've posted in the steam forums too.
http://forums.steampowered.com/forum...php?p=28585762

Be sure to comment to keep the thread visible enough for mods/devs to see!

Hamsterkill's Avatar


Hamsterkill
01.20.2012 , 04:27 PM | #2
Interesting. I wonder if that's how Origin's overlay still manages to work is that they look for the empty string, too.

Trinine's Avatar


Trinine
01.21.2012 , 10:06 AM | #3
Fantastic. Thanks.

Grammarye's Avatar


Grammarye
01.21.2012 , 10:56 AM | #4
Nicely done. Given that it's most unlikely anyone would ever remap the default verb for an exe to be anything other than open, I can see why this might arise. Here's hoping one or other of the codebases is updated. Arguably both should be fixed: Valve should check the default, and TOR should reliably use open rather than rely upon the default.
For 2000 Cartel Coins, a year-old game breaking bug may get fixed.
For $20, an epic death scene for your character is unlocked to end your overly expensive class story. Subscribers pay $10.

TMRSentinel's Avatar


TMRSentinel
01.21.2012 , 01:30 PM | #5
Thanks to Renegade for the effort, sadly it doesn't work for me. I did exactly as described, but it start my Need for Speed Launcher (which has a launcher.exe) too.
Don't know why, as I'm not VBS pro, so I can't get SWTOR Launcher to start.
My Game resides on D:\Star Wars\launcher.exe so maybe that is the reason.

Dear Devs,

please in one of your next updates, make sure it is possible to start the Game as "non steam" game. You should have an interest in this, as people will see their friends playing SWTOR - being motivated to join in as well.

Of course Steam will not have the main interest in implementing this, as it is not published by them, but as I see it, they are agnostic as long as you allow swtor to be started as a non steam game. Actually when I link the loader (launcher.exe) to my friends it seems I play for a sec swtor, then the launcher closes and I'm apparently not playing anything for the reasons stated by others already here. So please dear Devs, solve this for us

Thanks!

renegadelink's Avatar


renegadelink
01.22.2012 , 09:48 AM | #6
Quote: Originally Posted by TMRSentinel View Post
Thanks to Renegade for the effort, sadly it doesn't work for me. I did exactly as described, but it start my Need for Speed Launcher (which has a launcher.exe) too.
Don't know why, as I'm not VBS pro, so I can't get SWTOR Launcher to start.
My Game resides on D:\Star Wars\launcher.exe so maybe that is the reason.

Dear Devs,

please in one of your next updates, make sure it is possible to start the Game as "non steam" game. You should have an interest in this, as people will see their friends playing SWTOR - being motivated to join in as well.

Of course Steam will not have the main interest in implementing this, as it is not published by them, but as I see it, they are agnostic as long as you allow swtor to be started as a non steam game. Actually when I link the loader (launcher.exe) to my friends it seems I play for a sec swtor, then the launcher closes and I'm apparently not playing anything for the reasons stated by others already here. So please dear Devs, solve this for us

Thanks!
The mods didn't like my better solution so they deleted that thread. My Visual basic program wasn't the greatest. I spent most of my time fighting visual basic to do what I wanted it to do instead of figuring out the actual workaround haha.

But this thread isn't about my previous workarounds. This thread shows the devs exactly what is wrong and how simple the fix is.

renegadeimp's Avatar


renegadeimp
01.22.2012 , 09:49 AM | #7
I wouldn't be surprised if the game was coded in such a way that it was almost impossible to get steam overlay working with the game. Mainly because valve and EA do not get along together.
Streamline - A guide to speeding up low - mid range Computer systems.
Latency Thread - Latency issue gathering thread..
Have a tech issue you need help with? You can nomally find me on the Customer Support forum.

Phinter's Avatar


Phinter
01.23.2012 , 12:25 AM | #8
More than likely they know what's wrong and it's deliberate. They don't want you on Steam while playing an origin game. They want you using origin overlay.

Latorn's Avatar


Latorn
01.30.2012 , 02:57 PM | #9
Over a month since game launch and still no fix?

EA just doesn't want the game to work with steam? >.<

mpen's Avatar


mpen
03.30.2012 , 02:07 PM | #10
I have to say I'm in favour of getting the SWTOR client and the Steam client talking to one another. I use Steam as a launcher for ALL my games (whether I bought them on Steam or not), and I want to be able to access steam chat and be able to take screenshots through steam.