Download

Steam Setup Utility

UE4 <-> Steam Setup Utility

Here is a utility I built to ease the frustrations of configuring Steam with Unreal. Just point to the required directories on your computer and the files will get copied into their appropriate paths. If there are any questions or improvement suggestions please let me know.

Version 1.4 Downloads
Click Here -> Installer](UE4SteamCon_v1.4)
Click Here -> Visual Studio Project](UE4SteamConnection1.4Source)

Results

UE4 Source with Steamv130 - Fully working
Test overlay in editor: Works!
Test achievements in editor: Works!
Test host game on Steam: Works!
Test Join Game on Steam: Works!
Test shipping build overlay: Works!

UE4 Source with Steamv132 - Fully working
Test overlay in editor: Works!
Test achievements in editor: Works!
Test host game on Steam: Works!
Test Join Game on Steam: Works!
Test shipping build overlay: Works!

Features

  • Update game config file with Steam features
  • Copies Steam binaries to appropriate paths
  • Configures OnlineSubsystemSteam.cpp to enable steam in editor
  • Updated to include status text to guide through the process of enabling steam
  • Verify that changes have been made to settings so it doesn’t force requirement of a full source rebuild
  • Includes simple setup for game projects Build.cs and Target.cs to enable online features
  • Easy access to modified directories
  • Onscreen log of process

**Setup Procedure **

  1. Run the UE4 <> Steam utility and setup the paths to correct directories, press the setup button.
  2. Open the source for Unreal, right click project and select clean
  3. Right click unreal source project and select rebuild
  4. After UE4 source is rebuilt, delete the binaries from the game project folder
  5. Open the game’s .uproject and when it asks to rebuild modules, select yes.

Common Fix Procedures

  • After modifying the source code of unreal, do a clean then a rebuild. This will get rid of any scrap code from previous compiles.
  • When modifying the game project, do a build. You can also do a clean and rebuild to provide extra sense of security that problems will be resolved. By default the game project isn’t modified so a build isn’t necessary. Although config files
  • are modified and may require deleting the contents of the binary folder before starting the project
  • When modifying config files(Adding achievements) delete the contents of the binaries folder of the game project, then open the uproject and have it rebuild the binaries.

Tips

Make sure logged in to Steam before starting the editor(If set to load steam in the editor) otherwise you’ll get an error
The result of having steam loaded in editor, but not logged into steam:
a21059a413bbff31d3ab2213abdeef55e6b0205a.png

When enabling steam in the editor:

  • You can’t open game in ‘New Editor Window’, you have to use ‘Standalone Game’
  • You can open multiple standalone games with the steam overlay
  • Achievements must be published on Steam and require a full restart of the UE4 editor in order to appear in the overlay.

Quick Demonstration of creating a new project using the Binary UE4 build and automatically setting it up for Steam

Interesting tool; I’ve been doing it by hand, will take a look at this later.

I can’t get Overlay to work on Shipping mode too; Only on Debug mode.
But, Kitatus; make sure you are not running FRAPs or alike when testing, these programs may block Steam’s Overlay while your standalone is running.

Sorry to hear it didnt work straight out of the box, i’ll go over the steps today a few times and record the results then i’ll help to resolve the issues.

Thank you very much!

My objective has been to release my project Battle for Presidency on Steam and I’ve experienced many difficult problems over the years and just would like to share some of the solutions. I can’t accept a donation although I would be very happy if you would check out my project Battle for Presidency on Steam when it’s released and tell your friends about it. Information shouldn’t be behind a paywall, right?

I’m almost done testing and will upload the newer version and results shortly.

Thanks for the patience, please check out the new version and notes that I compiled. If there are still any issues let me know.

Another thing I have found that can mess with the steam overlay are other programs that attempt to add their own overlay such as MSI Afterburner.

Thanks a lot for this, I’m going to test it out asap and provide my feedbacks.

This seems to be a HUGE HELP for a lot of UE-4 pioneers like my team and me.

If you can get Epic to add yours or a similar implementation to the engine it would surely save many souls much work in the future! :slight_smile:

KitatusStudios, I’m going to take a look at these errors and upload a new package. Thank you for being patient and also the first to test this besides me.

SteamVRPrivatePCH.h also had a hardcoded Steam_SDK_Ver and some code to append with conflicting ARRAY_COUNT definition:

The fix has been made and the code compiles fine on my computer, I’m going to test it on a different computer here to make sure.

Sorry for the long delay it’s taken quite a while to figure out what was wrong. Steam would show up sometimes and sometimes it wouldn’t, but I have my fingers crossed for this fix.

The first issue you were having :

This has to do with the binary engine files being locked by default. They’re locked I’m sure because modifying them doesn’t do much good for changing the steam version since the engine has already been compiled with steam v130. WinAutomation is also not part of the binary build like you know but I hadn’t tested the binary build until today sorry about that. I adjusted the ‘is Binary UE4 Version’ button circumvent this problem and I tested that the steam overlay is working on a different computer.

I noticed a reference to a file on my drive:

so I created an installer of the utility that should solve that.

The compile issues you’re having seems to be due to compatibility issues with SteamVR and version 1.32 of steam. I activated the SteamVR plugin and I saw all the same compile errors you saw. Disabling the plugin doesn’t fix the compile issues but there was a fix on github which was to undefine steam’s ARRAY_COUNT and replace it with UE4’s version like this:

I added a checkbox in the plugin ‘Enable Steamworks 132 Clobber Fix’ which will append this fix to OnlineSubsystemSteamPrivatePCH and SteamVRPrivatePCH .Even though this fixes the compile errors, the overlay hasn’t shown up in the editor anymore since I activated the SteamVR plugin without the ‘Enable Steam in editor checkbox’ ticked.

I read here that UE4 version 4.8 should have more compatibility with steam 1.32.* https://answers.unrealengine.com/questions/171778/461-steam-the-online-subsystem-crashes-on-client.html*

Overall, the most reliable option(The one where steam worked most of the time) was to stick with steam version 1.30.
The binary version worked instantly as soon as the issues where resolved with the ‘use binary UE4’ button

I can’t explain why it works sometimes and not others with the overlay in the editor, it’s definitely irritating. Clicking the ‘enable steam in editor’ button should take care of this, but also causes issues when trying to test achievements and hosting games.

Utility Info:

I’ve divided the utility in 3 parts:

Step 1 is only necessary for the enabling of online features in the game project and in the config file DefaultEngine.ini
Step 2 is only necessary for copying the steam SDK and binaries to their appropriate folders
Step 3 is only necessary when configuring the source to use a different steam version than the one currently used(v1.30), or enabling steam in editor

*Step 3 can be disabled if using version 1.30 of steam


     private void btnSetupSteam_Click(object sender, EventArgs e)
        {
            //---------------------------------------------------------
            //  MAIN PROCESS
            //---------------------------------------------------------
            SaveDefaultSettings();
            LoadDefaultSettings();

            Debug.SetText(txtLogList, "---------------------");
            Debug.SetText(txtLogList, "Setting up Steam Now");
            Debug.SetText(txtLogList, "---------------------");


            //------------------------------------------------------
            // 1. Modify Game Project
            //------------------------------------------------------
            // Configure Game Project to enable online features
            if (chkSetupBuildFile.Checked)
            {
                GameModify.EnableOnlineFeatures(this.txtLogList);
            }

            // Update Game Config File
            ConfigModify.SetupConfigFile(this.txtLogList, this.chkEnableVoice, this.lstCurrentAchievements);


            //------------------------------------------------------
            // 2. COPY Steam SDK 
            //------------------------------------------------------
            // Copy SDK to game engine if it doesn't exist
            FileModify.CopySteamSDK(this.txtLogList);

            // Copy Steam Binaries
            FileModify.CopySteamBinaries(this.txtLogList);

            
            //------------------------------------------------------
            // 3. Configure UE4 to use Steam Version
            //------------------------------------------------------
            // Configure Steamworks.build.cs with Steam version 
            FileModify.SteamworksBuildCS(this.txtLogList);
            
            // Configure winplatform.automation.cs with Steam version 
            FileModify.WinPlatformAutomation(this.txtLogList);

            // Configure OnlineSubsystemSteamPrivatePCH.h with Steam version and ARRAY_COUNT Fix
            FileModify.OnlineSubsystemSteamPrivatePCH(this.txtLogList);

            // Configure SteamVRPrivatePCH.h with Steam version and ARRAY_COUNT Fix
            FileModify.SteamVRPrivatePCH(this.txtLogList);
            
            // Configure UE4BuildConfiguration.cs with Steam version
            FileModify.UE4BuildConfiguration(this.txtLogList);
            
            // Configure OnlineSubsystemSteam.cpp with Steam version and enable steam in editor
            FileModify.OnlineSubsystemSteam(this.txtLogList);  
            

            Debug.SetText(txtLogList, "----------------------");
            Debug.SetText(txtLogList, "Completed Steam Setup!");
            Debug.SetText(txtLogList, "----------------------");
        }

The last thing I’d want is for the tool to create more work than actually doing it by hand.KitatusStudios, Thanks a lot man I appreciate the kind gestures and any help with Battle for Presidency you can offer. I’m going to be out this weekend I’ll be back during the week. As far as where I left off, the program was tested against version 1.32 and 1.30 of Source and Binary and is working. Really crossing fingers this works out for everyone.

Darn this is so cool. Thanks.

I am definitely going to give this a whirl. 8-}

Cool thanks! Let me know how it goes

@Garner: I am actually looking forward to your game … it looks pretty cool. Keeping my eye on it … 8-}

qdelpeche: Thank you! I’ll let you know when it’s up

**KitatusStudios:**About this error:

This is generally the error you want to see. So long as the overlay is working in the standalone game and achievements can be added the the player then all is good usually.



bool FOnlineSubsystemSteam::IsEnabled()
{
	if (bSteamworksClientInitialized || bSteamworksGameServerInitialized)
	{
		return true;
	}

	// Check the ini for disabling Steam
	bool bEnableSteam = true;
	GConfig->GetBool(TEXT("OnlineSubsystemSteam"), TEXT("bEnabled"), bEnableSteam, GEngineIni);
	if (bEnableSteam)
	{
		// Steam doesn't support running both the server and client on the same machine
		bEnableSteam = !FParse::Param(FCommandLine::Get(),TEXT("MultiprocessOSS"));
#if UE_EDITOR
		if (bEnableSteam)
		{
			bEnableSteam = IsRunningDedicatedServer() || IsRunningGame();
		}
#endif
	}

	return bEnableSteam;
}


This code is part of OnlineSubsystemSteam.cpp. What it’s doing is shutting steam off in the editor between the #if UE_EDITOR and #endif if the game isn’t running or not running a dedicated server. The checkbox for ‘Enable steam in editor’ will comment this out and allow the error Steam API disabled! to disappear in the Source build(not binary) of UE4. Doing so will cause the steam overlay to popup on every single window in the Unreal editor and will also lead to several other issues (Steam Achievements won’t work and hosting games is slower). I noticed that things seem to go smoothly on a new project rather than one that’s been through upgrades and seen hell, have you tested a new c++ project with the tool?

Here is a test of a new c++ project with achievements:

You’re welcome man I’m glad you got it working! It’ll be a good a weekend then going to have to get a beer.

As far as cleaning a corrupt project that doesn’t seem to work with the overlay I do a full cleanup following these steps. It has worked for me, hope it works for others.

  1. Make a backup
  2. Delete the visual studio project .sln, .sdf, .suo
  3. Delete the contents of the Binaries folder
  4. Delete boot.ddc from the DerivedDataCache folder
  5. Delete the contents of the Intermediate folder
  6. Delete the contents of the Saved folder
  7. Replace DefaultEngine.ini with a file from a new project
  8. Open the .uproject in a text editor and remove all plugins(Use a new project’s .uproject as an example)
  9. Right click the game’s .uproject and generate visual studio project files
  10. Open the visual studio project and do a rebuild

*And reapply your custom gameInstance if you’re using one

This is great, saved me tons of time. Thanks!

Do you need to be a Steamworks developer for this to work?

VoIP, Multiplayer, VAC, and the like all work too?

Also, this would make a greate plugin for UE4. Having it integrated right into the engine might even make some of the process more automated.

Garner Thank you so much for this man, we’ve been really struggling with getting Steam to work, we’ve gotten the overlay to work at once time, but it stopped working and we couldn’t get any Multiplayer functions to actually work. We’ll be giving this a go on my project as well and report back to ya if everything goes smoothly.