Description
This plugin exposes the full Steam UGC API to blueprint, which allows you to access the Steam Workshop. Steam Workshop allows you to upload and download any arbitrary content for your game that can be shared between users.
Easily create, update, download, delete your workshop items. Subscribe, add items to your favorites and query all day long.
Here is an overview of the availabe functions: [TABLE=“border: 0, cellpadding: 1, width: 500”]
Examples
https://forums.unrealengine.com/unre…69#post1526669
Known issues :eek:
-None
First things first
-
Create a Steam account and download Steam.
https://steamcommunity.com/ -
Sign up as developer on steam and get your App ID. (Or use AppId 480 for testing)
partner.steamgames.com -
Configure your workshop. Don’t forget the cloud setup as preview images are stored in the steam cloud!
Steam Workshop (Steamworks Documentation) -
Add the plugin to your games engine version.
https://www.unrealengine.com/marketp…kshop-accessor -
Enable these plugins via the editor for your game.
- Steam Workshop Accessor
- OnlineSubsystem
- OnlineSubsystemUtils
- OnlineSubsystemSteam
- Add this to your …/YourGame/Config/DefaultEngine.ini
[OnlineSubsystem]
DefaultPlatformService=Steam
[OnlineSubsystemSteam]
bEnabled=true
SteamAppId=480
SteamDevAppId=480
You can also have a look here:
https://docs.unrealengine.com/en-us/…g/Online/Steam
https://wiki.unrealengine.com/Steam,…ng_Development
-
Start Steam.
-
Start your game in standalone (Steam must be running!)
-Do this by either right click your .uproject file and select** Launch Game**
-Within the editor from the play drop-down select Standalone Game
-Do it via commandline
-
Now you are able to write some code and test it.
-
Enjoy.
Workshop Legal Agreement
Every user that uploads to the workshop needs to accept the Steam Workshop Legal Agreement.
In the result of **Creating **or **Updating **a workshop item, you can find a boolean that tells you if the agreement is accepted or not.
If the user has not agreed yet, items he published will be hidden. See the link below.
https://partner.steamgames.com/doc/f…entation#Legal
To open the overlay to the created item, use ActivateGameOverlayToWorkshopItem
Download/Purchase
https://www.unrealengine.com/marketp…kshop-accessor
Config
Copy past into **game ini **file
…/YourProject/Config/DefaultGame.ini
[PluginSteamWorkshop]
bCuratedWorkshop=false
ItemUpdate_TitleLength_Min=0
ItemUpdate_DescriptionLength_Min=0
Result Codes
https://partner.steamgames.com/doc/a…am_api#EResult
Debugging (If you have the need to)
As you need to start your game in standalone, you can’t use breakpoints from the editor.
If you are a pure blueprint user: PrintString is your friend (or create widgets).
If you have C++ access, attach to the process of the standalone window. VisualStudio -> Debug -> AttachToProcess (if you are attached to the editor, you need to detach first).
When attached, you can follow the output log in visual studio.
Changelog
[SPOILER]
Version 1.3
-Fixed compile issues for Linux
Version 1.2
-Added Unicode support
[/SPOILER]
FAQ
[SPOILER]
AHHHH, help me, I don’t know whats going on!
AHHHH, I’m sorry, I don’t know either!
I have trouble with creating a workshop item
-Check your output log of Unreal and search for “steam”. If you have trouble with it, let me know.
-Make sure Steam is running and it is NOT in offline mode.
-Make sure SteamCMD is closed (if you are using it)! It is another application that connects with an account and causes trouble when uploading via the Unreal application.
-Tripple check your used Steam ID.
How do I create a Mod for my game?
This question has now come up multiple times and yeah, its not that straight forward.
This plugin only focuses on managing workshop content, but how do you create content that you upload with the plugin?
First of, a SteamWorkshop Item is just a folder that is synchronized using steam. What you put into that folder is entirely up to you/your modders (with restriction to what Steam allows).
Second, a Mod can be anything and is dependend on your game. It can be a simple ASCII file the game uses to generate a level, may contain audio that the game loads, or other assets. This is entirely dependend on what you want to support, as the workshop content is placed in a folder seperated from your game, so the game needs to check what mods the user has subscribed to and scan the mods for content. You might also have some code going that copies files from the mod folders into the game directory for what ever reason. Again, this is entirely up to you.
As a Mod is entirely dependend on the game, it is also up to you what tools you provide for your modders. It can be a custom map editor that is a separate programm or an addition to the Unreal Engine Editor. If it is just about an ASCII file, modders can use any text editor to create that file.
While Blueprint is great for non programmers, it is actually horrible for modding. A simple script (Python, JavaScript, LUA, Ruby…) can be written with any text editor, even without owning the game. In order to create a Blueprint, the entire dependend binaries and other Blueprints must be available to the modders, e.g. your entire project.
If you have a custom Editor, you are not allowed to just ship it to others. As of writing this, the current solution to ship a custom Editor seems to be via Unreals Github that can only be accessed by users that have a Unreal account and thus accepted the EULA.
If mods are create with the Unreal Editor, users should create a folder with the mod name in …/Content/Mods/MYMODNAME and place everything needed in there. You as developer might give the user a folder structure they have to stick to. E.g. if your game loads music from a mod, you might define a specific folder for music you look in, as the mod might contain lots of audio files, but only some of these are actual music (e.g. no hit/effect sounds). Or you define a file naming convention, e.g. Music_BlaBlaBla.uasset and you look for all files starting with ‘Music_’. I personally recommend the folder structure approach.
In order to create a Mod with Unreals Editor, you need to package it manually using Unreals pak tool. See the Youtube video about how you can do that. #UnrealEngine - UE4 GEMS - Unpack, modify & Pack the *.Pak files - YouTube
Basically you would need to package the entire …/Content/Mods/MYMODNAME folder.
In order to upload the mod, you can use this plugin. Though you will need to remove the source files from the plugin when adding it to your modkit and sharing it with thirdparty.
Packaging a Mod that contains assets with Unreals Editor will result in one or more .pak files that the game needs to load: Pak Loader Plugin in Code Plugins - UE Marketplace
There are now multiple games out there that were created with UnrealEngine and support modding. I recommend you to have a look at how they deal with it to get a feeling what needs to be done.
E.g. Ark Survival Evolved, Hello Neighbour
IMPORTANT
Mods must be create (packaged) with (at least) the same render settings as the main game, otherwise materials might have display issues.
[/SPOILER]