Comment on page
Understanding Steam DLC and the Heathen Engineering tool kit
Steam Downloadable Content aka DLC allows you to sell expansions, seasons and other add-ons for your game through the Steam store and reliably and securely detect when a user owns that add-on
Log into your Steam Developer Portal and access your app's admin page. Look for the Technical Tools section and select the Edit Steamworks Settings option.
From there scroll down until you find the All DLC section and click Add New DLC button
Populate the form with the names of the DLC you would like to create making sure to start the name with the name of your game. For example, our game's name is Túatha Legends so we might a DLC something like Túatha Legends - The Iron King
You **MUST** publish your changes in the Steam Developer Portal before they will be accessible via Steam API. In the Steam Developer Portal when you have pending changes you will see a red banner at the top of the screen ... click it and follow the instructions.
The Downloadable Content Object helps you track the status of DLC. You can import the DLC you have defined in the Steam Developer Portal for this application by running the simulation such that Steam API can initialize and then clicking the Import button on the Steam Settings Downloadable Content list
Once completed all of the DLC registered to your application will be listed under your Steam Settings
Modern DLC are not actually content that you download, they are far more offten locked content that you unlock through a purchase.
In Steam you don't "own" a game or app, you are "subscribed" to it. So to check for ownership of a given DLC, use the Steam Is Subscribed App node.
Assuming app is a valid
AppId_tis a Steamworks
bool result = SteamApps()->BIsSubscribedApp(app);
It's often handy to iterate over all your DLC such as to list them in the game or open the Overlay to the store pages. We have provided a number of nodes to help you do just that.
You can get the count of all the DLC for the app via
int32 count = SteamApps()->GetDLCCount();
with that, you can iterate through each and fetch details about a DLC via
if (SteamApps()->BGetDLCDataByIndex(index, &appId, &available, name, 128))
//Use the results
Finally, if you are doing traditional DLC that is installed we provide you with node to check for installation, start the installation and uninstall. Note that install and uninstall is a request, Steam will attempt it if it can but if the user doesn't own the DLC, or the files are locked by the game running them, etc. then it may not complete.
To install DLC
Check if a DLC is installed
bool result = SteamApps()->BIsDlcInstalled(appId);
Uninstall a DLC