The Godot Barn
Sign in
Sign in
Home
News & updates
Explore
Articles
Snippets
Shaders
Themes
Submit content
Sign in to submit content
Give or get help
Tutorials
Questions
Conversations
Coming soon!
GodotSteam Tutorials - Exporting And Shipping
0
Description
"Exporting and shipping is one of those things that tends to get a little confusing, especially on the Steamworks side. Once you have a good workflow sorted out, it should be easy sailing from there. You should also read through [Valve's documentation about uploading your game](https:\/\/partner.steamgames.com\/doc\/sdk\/updating) to Steam which goes into a lot of this more thoroughly and covers some things we don't.\r\n\r\nIn this tutorial we will cover exporting from Godot and setting things up in Steamworks so you can use your builds from the Steam client. So let's get into it!\r\n\r\n## Exporting Your Project{ .block }\r\n\r\n### From Modules \/ Pre-Compiles\r\n\r\nTo being our export process, first click on the \"Project\" button in the top menu then select \"Export...\" from the drop-down.\r\n\r\n\r\n\r\nIn this example, we are only using the release template which must be specified in the **Customer Templates > Release** field. If you need debugging as well, make sure to add it to the **Debug** field too.\r\n\r\n\r\n\r\n!!! warning \"Note\"\r\nIf you use a non-GodotSteam template or leave these fields blank, you will end up with an executable that crashes like so:\r\n\r\n```\r\nParse Error: The identifier \"Steam\" isn't declared in the current scope.\r\n```\r\n\r\nThis happens because the Steamworks API is not present without a GodotSteam-enabled template and the executable will not be able to find the object nor use the functions. \r\n!!!\r\n\r\nOn the last export screen, just before the process begins, make sure you turn the debugging option off if you are only using the release template.\r\n\r\n\r\n\r\nIf you are using a debug template you can actually leave this on but for our example we turn it off.\r\n\r\n### From GDNative \/ GDExtension\r\n\r\nWhen using the **GDNative or GDExtension** version of GodotSteam, you will need to use the **regular Godot templates** either installed through the regular Godot editor or [downloaded from their site](https:\/\/godotengine.org).\r\n\r\nBasically follow the usual steps for exporting a project from Godot, as shown above in the **modules \/ pre-compiles** section except **do not** use the GodotSteam templates. That will cause a lot of issues.\r\n\r\nAlso take note of any additional files Godot exports for you like the godotsteam.dll \/ libgodotsteam.so \/ libgodotsteam.dylib because these must also be shipped with your game. They create the bridge for the game and Steamworks.\r\n\r\n### Without Steam\r\n\r\nIf you followed our [guide about how to remove Steam from your game](https:\/\/godotsteam.com\/tutorials\/remove_steam) without maintaining multiple code-bases, you probably don't want the extra files either. Thankfully ***AdriaandeJongh*** shared the information with us and a handy image too:\r\n\r\n> I found that as long as you don't call any methods on the Steam class provided by this plugin, you can actually simply not export those binaries like so...\r\n\r\n\r\n\r\nWhile this may work with the plug-ins, you will still have to ship the Steam API shared libraries (steam_api64.dll, libsteam_api.so, libsteam.dylib) if using the pre-compiled editor \/ templates since Steam is always present. There is an upcoming patch that should remove this crashing behavior if they are missing though; no current ETA on that at this time. \r\n\r\n## Setting Up Steam Depots{ .block }\r\n\r\nBefore moving on to uploading our files, we need to set up our Steam depots to send them to. [You will have to log into the Steamworks partner site](https:\/\/partner.steamgames.com) then access your game's landing page. You will want to navigate down to the **Technical Tools** section then click on the **Edit Steamworks Settings** option.\r\n\r\n\r\n\r\nFrom this page, you will want to click on the **SteamPipe** section then click on the **Depots** drop-down to access the depots page. As you can see below, we have depots set up for our shared content and each major platform; Windows having two separate ones for 32-bit and 64-bit.\r\n\r\n\r\n\r\nJust click on the **Add New Depot** and give it whatever name you want then click on the **Edit** button for the new depot to set the operating system and architecture. You can do any manner of combinations based on how and what you want to ship.\r\n\r\nPlease write down or copy the depot IDs as we will be using them a lot in the next step.\r\n\r\n## Setting Up For SteamCMD{ .block }\r\n\r\nIf you want a more fine-tuned uploading process for Steam that can be integrated into build systems, we will want to set up SteamCMD. This is typically how I have mine set up.\r\n\r\nHowever, if you just want to skip all of this and directly upload zipped builds to the Steamworks partner site, you can navigate down to the[ Upload Through Website (optional) section.](#upload-through-website-(optional))\r\n\r\n### Gather Your Project Files\r\n\r\nBefore sending things over to Steam, we need to gather up all our files. For the most part this is just your game's executable, accompanying .pck file, GodotSteam shared libraries if you are using the plug-ins, and the Steamworks API file:\r\n\r\n- On Linux, make sure you use the **libsteam_api.so** file from the _correct_ folder. I am not sure why Valve did not differentiate in naming between 32 and 64-bit files for Linux, but they do not.\r\n- On Mac, the Steamworks redistributables are already included in your app directory so there's not thing else to add.\r\n- On Windows, use the **steam_api.dll** for 32-bit or **steam_api64.dll** for 64-bit.\r\n\r\n!!! warning Notes\r\nIf you are using a **steam_appid.txt** for setting your game's app ID instead of passing it to the initialization function or setting it as an environment variable, you will not want to include it with your upload files. This file is ***only*** used for running your game ***outside of the Steam client*** so that it knows which game you are playing. When running ***through the Steam client***, Steam is aware of what game you are playing, thus it is not necessary. Valve recommends that you do not ship this file with your game, as [it can potentially cause issues](https:\/\/partner.steamgames.com\/doc\/api\/steam_api#SteamAPI_RestartAppIfNecessary).\r\n\r\nAlso, if you are shipping on Mac, there are a few extra steps you may want to check out. Instead of repeating it here, you can [read more about the process in the Mac Exporting tutorial](https:\/\/godotsteam.com\/tutorials\/mac_export).\r\n!!!\r\n\r\n### Get SteamCMD Setup\r\n\r\nTo get SteamCMD, used to upload games to Steamworks, you can use one of two methods:\r\n\r\n- [Download the Steamworks SDK from the partner site](https:\/\/partner.steamgames.com)\r\n- [Follow Valve's guide to getting _just_ SteamCMD itself here.](https:\/\/developer.valvesoftware.com\/wiki\/SteamCMD#Downloading_SteamCMD)\r\n\r\nFor this step in the tutorial, we will be working with the Steamworks SDK download version. After unzipping it you will see a **tools** folder that contains a lot of different subfolders and zips. You can extract this folder where ever you want. You may noticed the **SteamPipeGUI.zip**, which is an [uploader for Windows that Valve created](#upload-through-gui-(optional)) and we will talk about later on.\r\n\r\n\r\n\r\nThe main folder here we will be working with is the **ContentBuilder** folder, specifically the **content** and **scripts** folders.\r\n\r\n\r\n\r\n### Placing Your Content In\r\n\r\nIn our **content** folder we will create a folder for your project. This tutorial is using the [files from Skillet, which is app ID 3013040,](https:\/\/store.steampowered.com\/app\/3013040\/Skillet\/) so we are naming our folder by this app ID and all sub-folders by their respective depot IDs.\r\n\r\n\r\n\r\nInside this new folder, we will create the following sub-folders [based on the individual depots](#setting-up-steam-depots) set up in the Steamworks back-end we did in the previous section. You will want to alter these to fit whatever setup you have for your project, but here is how ours is set up:\r\n\r\n- Shared content (3013041): anything all platforms share, primarily the .pck in this case\r\n- Linux (3013044)\r\n- Mac (3013045)\r\n- Windows 32-bit (3013043)\r\n- Windows 64-bit (3013042)\r\n\r\n\r\n\r\nFor a brief peek inside, here is what the shared content (3013041) folder and the Linux (3013044) folder look like:\r\n\r\n\r\n\r\n\r\n\r\n### Create VDF Files\r\n\r\nNow that everything is in place, we will move over to the VDF files which tell SteamCMD where everything is and how to upload it. You can read [Valve's documentation on how they are written](https:\/\/partner.steamgames.com\/doc\/sdk\/uploading#3) or you can [see how Skillet's are set up here.](https:\/\/github.com\/GodotSteam\/Skillet\/tree\/assets\/steamworks\/vdfs)\r\n\r\nThe VDF scripts are similar to JSON and require only a few things to be filled out. For the main app VDF:\r\n\r\n```\r\n\"AppBuild\"\r\n{\r\n\t\"AppID\" \"3013040\"\r\n\t\"Desc\" \"Skillet\"\r\n\t\"Preview\" \"0\"\r\n\t\"Local\" \"\"\r\n\t\"SetLive\" \"\"\r\n\t\"ContentRoot\" \"\"\r\n\t\"BuildOutput\" \"..\\output\"\r\n\t\"Depots\"\r\n\t{\r\n\t\t\"3013041\" \"..\\scripts\\3013041.vdf\"\r\n\t\t\"3013042\" \"..\\scripts\\3013042.vdf\"\r\n\t\t\"3013043\" \"..\\scripts\\3013043.vdf\"\r\n\t\t\"3013044\" \"..\\scripts\\3013044.vdf\"\r\n\t\t\"3013045\" \"..\\scripts\\3013045.vdf\"\r\n\t}\r\n}\r\n```\r\n\r\nThen for our Linux depot's VDF file:\r\n\r\n```\r\n\"DepotBuild\"\r\n{\r\n\t\"DepotID\" \"3013044\"\r\n\t\"ContentRoot\" \"..\\content\\3013040\\3013044\\\"\r\n\t\"FileMapping\"\r\n\t{\r\n\t\t\"LocalPath\" \"*\"\r\n\t\t\"DepotPath\" \".\"\r\n\t\t\"Recursive\" \"1\"\r\n }\r\n}\r\n```\r\n\r\nAll our VDF files will live inside the **scripts** folder. Typically I just dump these in here since they are all uniquely named files, but you could separate them into sub-folders per project if you like.\r\n\r\n\r\n\r\n### Uploading Files Through SteamCMD\r\n\r\nBack in our **ContentBuilder** folder, you will find three different folders that contain the SteamCMD executable and related .sh scripts if you are using Linux or Mac. Depending on your operating system:\r\n\r\n- Linux: give execution permissions to the steamcmd.sh file then run it\r\n- Mac: give execution permissions to the steamcmd.sh file then run it\r\n- Windows: run the steamcmd.exe file\r\n\r\n!!! warning \"Notes\"\r\nIn all cases, SteamCMD does not work like other command prompts \/ terminals in that you cannot press the arrow up key to cycle through previously entered commands. Anyone who works with command prompts \/ terminals may do this instinctively and find it a bit irritating. You must re-type commands if they fail or copy \/ paste them in.\r\n!!!\r\n\r\nTo start, you will need to log into the Steam account that has access to the Steamworks back-end; for most people this is probably your primary Steam account.\r\n\r\n```\r\nlogin
\r\n```\r\n\r\nIt will then prompt you for your password and probably your Steam Guard code if you have that enabled. Once you get logged in, you will just run this simple command to start the upload process:\r\n\r\n```\r\nrun_app_build ..\/scripts\/3013040.vdf\r\n```\r\n\r\nPlease note this is using the default locations for our scripts folder and Skillet's main app VDF. Once that starts running, you should see output similar to this:\r\n\r\n\r\n\r\nAt this point, all of your files should have been sent over to Steam and are ready to be enabled in the Steamworks back-end for testing, submission, and\/or distribution. If you get any errors about missing depots or such, double-check your depot VDF files.\r\n\r\n## Upload Through Website (Optional){ .block }\r\n\r\nIf you want to skip all that SteamCMD stuff and just directly upload each depot's files, you can do that through the Steamworks website itself. This process is clearly much simpler but does not allow for some more complicated setups that most developers probably aren't going to use anyway.\r\n\r\nYou will find this option in the SteamPipe builds section in the app's back-end.\r\n\r\n\r\n\r\nAs you can see below, this uses the depots we set up earlier; each depot has a field where you just upload a zip file and then Steamworks unzips these and places them appropriately.\r\n\r\n\r\n\r\nAfter you upload all your zips, we can move on to the last step which is enabling the game for testing, submission, and\/or distribution.\r\n\r\n## Upload Through GUI (optional){ .block }\r\n\r\nAs another alternative to uploading your project files through either SteamCMD or the Steamworks website, you can unzip and use Valve's long-abandoned-yet-functional SteamPipe GUI. This method still requires setting up a bunch of things as you would in the SteamCMD process but, instead of running the executable, you would use this GUI to effectively do the same thing.\r\n\r\nAs I do not use Windows, I do not have any screenshots of it but you fill out all the relevant data:\r\n\r\n- Add your depots\r\n- Point it to your content folders and VDF script folders\r\n- Enter your Steam credentials\r\n\r\nThen just run it and it should open up the SteamCMD command prompt and push everything to SteamPipe. From my perspective, the only thing this option does is save you logging in and running a command. Though there is an option to have it generate VDF files based on the content folders you point it to.\r\n\r\n## Shipping{ .block }\r\n\r\nBefore we can make this live for testing or users, we need to finish a few last steps: setting executables, checking packages, and setting up the builds. The first two could have happened long before we started pushing files to Steam but we'll just cover them now.\r\n\r\nWe will go back into the Steamworks back-end and, like earlier, navigate to the app's landing page.\r\n\r\n\r\n\r\n### Setting Executables\r\n\r\nYou will want to navigate over to the **Installation** tab then down to **General Installation**. As you see here, we have launch options set up for Linux and Windows. The most important part is setting the **executable** field to whatever your game's executable name is and the **operating system** field so Steam know what to run on what platform.\r\n\r\n\r\n\r\nAt the bottom of the page, click the **Add new launch option** to set up a new launch option then press the **Edit** button to set all the appropriate fields.\r\n\r\n### Checking Packages\r\n\r\nBack on the main app landing page, you will want go to the **View Associated Items** section then click the only option: **All Associated Packages, DLC, Demos, and Tools**.\r\n\r\n\r\n\r\nThis will bring us to the Associated Packages & DLC page which houses information about things like your game's demo, playtests, soundtracks, tools, and all related packages.\r\n\r\n\r\n\r\nAt the very bottom of this page is what we really are concerned with: **beta testing and devcomp packages**. These are required for you to get the game in your Steam library and for your testers to be able to try out the game prior to launch.\r\n\r\n\r\n\r\nWe will start with the beta testing package by clicking on the yellow bar which will open the follow page up. In here we will want to make sure all of our related depots are included in this package or it will not work correctly. If you do not see the right depots here, just click on the **Add\/Remove Depots** button and select the depots that should be present, one by one.\r\n\r\n\r\n\r\nWith everything set up for beta testing, go back to the previous page and click on the red bar to set up our dev comps. This follows basically the same process as beta testing, you want to make sure all your depots are listed and, if not, add them to the list.\r\n\r\n\r\n\r\nSo now we should be completely set up and ready to make all those uploaded depots live on Steam.\r\n\r\n### Setting Builds\r\n\r\nHead back to the game's landing page and navigate down to the **Technical Tools** section then click on the **Edit Steamworks Settings** option.\r\n\r\n\r\n\r\nFrom here we then go to **SteamPipe** again but this time select the **Builds** option. Here you should see the newly uploaded files with the new build ID and all the depot IDs you uploaded. All the way on the right, there is a drop-down to select which branch you want to push these changes to. By default, ironically, is the **default branch** which is your main public branch. You can set up as many branches as you want, like ones for betas, and even password protect them from this page.\r\n\r\n\r\n\r\nPressing **Preview Changes** will let you set any internal notes and then set your build as active. You used to have to publish these changes on a separate page but now they should become live once you do this.\r\n\r\nAfterwards, you should be able to install your game through the Steam client or, if your game is already on Steam, you should shortly see an update available notification on the Downloads page. And that's that for exporting and shipping!\r\n\r\n## Additional Resources{ .block }\r\n\r\n### Video Tutorials\r\n\r\nPrefer video tutorials? Feast your eyes and ears!\r\n\r\n[youtube: Godot + Steam tutorial | Export](https:\/\/www.youtube.com\/watch?v=J0GrG-AffCI&t=49s){ data-author=\"BluePhoenixGames\" }\r\n\r\n[youtube: How Do You Export Your Game](https:\/\/www.youtube.com\/watch?v=VCwNxfYZ8Cw&t=6538s){ data-author=\"FinePointCGI\" }\r\n\r\n[ youtube: GodotSteam - How It Works - Exporting and Shipping ](https:\/\/makertube.net\/w\/aExfBFQikyUsXJMCkKhSc5){ data-author=\"Gramps \/ GodotSteam\" }"
Comments
Log in to post a comment
Licensed under the CC-BY license
See the full license details
Submitted by
Gramps
Table of contents
Compatibility
Works in Godot
3.x / 4.x
Tags
GodotSteam
SteamĀ®
steamworks
Share this tutorial
Share on Bluesky
Share on X / Twitter
or share this direct link:
https://thegodotbarn.com/contributions/tutorial/249/godotsteam-tutorials-exporting-and-shipping
Please wait ...
Okay
Okay
No
Yes
Okay