Download

[Plugin] Steam Workshop Accessor - Blueprint wrapper with full access

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

  1. Create a Steam account and download Steam.
    https://steamcommunity.com/

  2. Sign up as developer on steam and get your App ID. (Or use AppId 480 for testing)
    partner.steamgames.com

  3. Configure your workshop. Don’t forget the cloud setup as preview images are stored in the steam cloud!
    Steam Workshop (Steamworks Documentation)

  4. Add the plugin to your games engine version.
    https://www.unrealengine.com/marketp…kshop-accessor

  5. Enable these plugins via the editor for your game.



- Steam Workshop Accessor
- OnlineSubsystem
- OnlineSubsystemUtils
- OnlineSubsystemSteam


  1. 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

  1. Start Steam.

  2. 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

Overlay.png

  1. Now you are able to write some code and test it.

  2. Enjoy. :smiley:

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]

There are lots of tooltips on functions, structures and properties that you should read if something is not clear on first sight.

Create item on the workshop


Get update progress

Query for items

Display a preview image

Download a WorkshopItem

2 Likes

I’m happy to announce the release of the plugin. It is now available for UE4.19+.

a question about this pluggin, does it allow to monetize content in steam, or it is only for free asset ?

Hello, I’ve just bought this, and I’ve tried to install it on my existing project, but I’ve run into some problems. My project is built using a custom engine built and it was running fine previous to installing this.
So, what I have done: Installed the plugin to a 4.21 engine using the epic market launcher.
Copied the plugin folder from the engine and then copied it to my custom engine folder, plugins.
On starting the project, the editor loaded and then asked to enable the plugin, and I have.
The editor restarted and asked me to build the project. I have tried and it failed.
I’ve opened the Engine in VS17, tried to build it and it failed. The strange part is the errors shown are referring to Victory Plugin and Loading screen plugin, but these worked before, even in published builds.
Next, I have tried to build the project itself in VS17 and that failed too.

Any thoughts on how to fix this?

Thanks!

Sorry for the late answer, but I was not notified about your post.
The plugins is only to interact with the workshop, e.g. Upload/Download/Query/Item Stats/… I did not yet get into paid workshop items. In case a workshop item is paid, I gues the user has to buy it first, otherwise the Workshop API (which is what this plugin connects to) should return an error when the user tries to download an item he did not buy.

Well, this is interesting, though not the first time strange things happen. As you have a custom build, it is difficult for me to make any tests on this. We have the plugin run aside multiple other plugins, though not the ones mentioned by you.
-First of some compile log would be nice. Maybe there are problems with duplicated class names or something similar.
-Also you can try to make a project with an official engine build and add the plugins there, see how it works out.

Hey, thanks for your reply. I have managed to make it work in the end…I’m not sure, but it seems that installing your plugin first, rebuild the project, install Victory, rebuild, Install Loading screen plugin, rebuild got it to work… it still throws some errors on build, but it works and I’ve checked a packed game and it works there too.
I can confirm, that on an empty project, custom or vanilla engine, it works fine. I’m using: https://github.com/AlienRenders/UnrealEngine

BTW, any chance you could whip up a short video tutorial, with the whole steps needed to connect, upload and download a mod to Steam Workshop?

Glad you could solve it. If I can help you with anything else, please let me know.

The code snippets above are everything you need. Dunno what else I could tell you in the video. Also I’m sick currently, so would not be nice to listen to. I also never did a video, which makes this a multiple hour project.

Ok, cool.
Quick one, though; How do I connect to steam? I’ve looked in your nodes, but could not find any that took an App ID or that would initiate the connection to steam… have I missed any?

See the steps in the first post (Step 6). By defining the OnlineSubsystem in the config file, unreal does the connection automatically.

Just to be clear, I have connected to steam(Shift+Tab ) displays the overlay, but I can’t find any checks in the nodes that confirms this…

Oh, NVM, I’ve found what I was looking for :smiley:
Thanks for your quick help :slight_smile:

As soon as you are connected to steam, just execute the nodes. There is no “connect to steam now” node. You need to call SteamApi_Init() from C++, but unreal does that already and my C++ code does that once the first time one of the nodes is called. If any of the nodes fail because of initialization issue, then because something went wrong when SteamApi_Init() was called from C++. But you can’t do much about that. Just start steam, do the config and you are good to go.

Edit: I provided the node **IsSteamInitialized **for checking.

How i can download items from workshop? Can you upload image?

Can’t right now, thought I did that.

You need to query for items. Use the returned ID with SteamWorkshopDownloadItem. The ID is unique for an item and you need that to do anything with an item.

Where will these items be downloaded to? How do I change the installation folder?

I added a pic to the second post for downloading. You can’t change the download folder.

Note that there is also OnWorkshopItemDownloaded that you can bind to. Though this is broken in the current version, as I just noticed. Will be fixed with the next update.

Edit: Also see the tooltips of functions, properties, they are all over the place.