Jordan Savant # Software Engineer

Steam

Integrating with Steam can have its challenges. These are notes I reference during the development cycle.

Official Steam API Documentation

Getting Started: App Setup, Depots, Builds

  • Look at the Steam Uploading Documentation
  • When an App is created a default Depot will be created, but no builds
  • Add a Launch Option under (Technical Tools, Edit Steamworks Settings) > App Admin > General Installation
  • Add a depot, but since the app has a default you can skip this step
  • From here you use the steamcmd to upload to a a designated depot, the command requires an app_build.vdf in its arguments
    • This means the depot is the file collection, eg for a specific build/os
    • Then the app_build.vdf also designates the Depot ID meaning you could have different app_build vdf files for each platform
      • (you can also designate depots as cross-platform which are shared within a branch, not sure, seems complex)
    • This can be done with the steambuild.sh wrapper below
  • Once the build is uploaded to the depot it should appear under SteamPipe > Builds
  • You then designate what branch the build belongs to
    • IIRC once you publish the changes any build associated with the branch the update goes live to any Steam Client
  • Note, there are steam Packages which are what are actually purchased, these must have ownership of (builds? depots?)
  • At this point I would move to integrating your game with the Steam API

Getting Started: Steam API Integration

  • See the Approval notes below on minimal integration requirements
  • For classic builds like C++ games built in Visual Studio, the API has its lib headers and dll file you need to include
    • Header files are in sdk/public/steam/
    • LIB and DLL files are in sdk/redistributable_bin/win64/ (other platform libs are in this parent folder as well)
  • For engine based builds, you must refer to a plugin or library for that tool
  • From there reference Official Steam API Documentation for integration specifics
  • Steam App ID
    • If you launch the game from the Steam Client it will automatically know your App ID when you initialize the API
      • Note, this would only work if you have added the build to a branch your Steam User has access to and downloaded
    • If you launch from your editor or OS and Steam is Initialized in the API you will need to have the steam_appid.txt file next to your exe

File: steam_appid.txt

  • this root file is used so the debug / local build version of your game is linked to your steam game in the steam library

File: steam_app_build.vdf

Inputs: Action Manifest File

  • action manifest files are like ingame action files but we can manage them in code
  • STEAM ALWAYS uses the ingame action file stored in the steam folder even if we load the local manifest file with our debug override in MEDUSA
    • /mnt/c/Program\ Files\ (x86)/Steam/controller_config/gameactions${APP_ID}.vdf
  • to get steam to recognize our changes delete the file above
  • for other players I think the answer lies in the major_revisions in the action manifest and the controller file
  • OLD METHOD:
    • I was able to update the controller config directly
    • otherwise i think we have to do some crappy overwrite with our steam big picture mode editor and find the vdf for the controller and bring it back over
      • that file is stored somewhere else in the steam folder, perhaps in the steamcommon folder for the game (i dont recall)
  • NEW METHOD to create steam controller configs:
    • plug in the controller you want to manage and ensure its checked in the Steam Settings > Controller > General Controller Settings
    • while it is on right click the game in the library and Manage > Controller Configuration
    • this should create a copy for this controller from the main controller one
    • Export this config and save it as a local copy
    • Look for it at steamapps\common\Steam Controller Configs\30653045\config\APPIDHERE-BRANCHHERE\controller_CONTROLLER.vdf
      • C:\Program Files (x86)\Steam\steamapps\common\Steam Controller Configs\30653045\config\1858920-alpha\controller_xbox360.vdf etc
    • save this to codebase and update Title and Description then include in Action Manifest file as a valid pathm UI

Inputs: Glyphs and Supplemental

  • I have used the steam glyph icons to add my own supplemental icons to the tut prompts
    • C:\Program Files (x86)\Steam\controller_base\images\api
  • This helps with no steam edition for controller inputs and mouse and keyboard
  • I would copy and paste them into the aseprite and scale them down
  • open the small version of the image in aseprite and copy over into glyph aseprite to keep it scaled properly

Approval Process

Their online documentation does not outline the rules the game must satisfy for release. With an attempted approval and some reading I believe the list is:

  • They upload your exe to virustotal.com to see how many antivirus softwares may affect a person's ability to play your game
  • The build should be the "final" game, which means never say "demo" anywhere in the game
  • When steam overlay is active, pause the game
  • When a controller disconnects, pause the game
  • Don't use cloud operations if either the Cloud settings on Account or the Game are disabled
  • Controllers need to work as both managed by Steam and non-managed by Steam (under steam settings)

Steam Soundtracks

You can create an MP3 and a Lossless version of your game soundtrack and add it as related content.

You create the Soundtrack under related DLC and Packages for the game in the admin site. Then it creates an App and a default Depot.

You can upload a zip directly (but windows likes to only zip folders whereas zip on command line can zip a bunch of files)

Something that had me stumped was that we have to Associate the Depot with the main Package for the content to be downloaded, even if the build is using the repot and is set to "default".

  • You also have to associate it with the developer comp packages...

Steam Debug Logs

I forgot how this works but you can launch steam with a debug mode (see scripts below) then there will be a new "Console" tab on the Steam GUI.

There are also log files that get put somewhere in the steam directory which give more details on various errors (I forgot location).

Scripts

Launch Steam with Debug Console launch-steam-debug.sh

#!/bin/bash
/mnt/c/Program\ Files\ \(x86\)/Steam/steam.exe -console -debug_steamapi

Run steamcmd.exe from WSL with this Bash wrapper steamcmd.sh

#!/bin/bash
/mnt/c/Users/[HOME]/Steamworks\ SDK\ 153a/tools/ContentBuilder/builder/steamcmd.exe "$@"

Steam Build App and Upload steam-upload.sh

#!/bin/bash

# clean out directory of crap and confirm before uploading
rm -f Release/*log
ls -1 Release
echo ""

I=""
while [[ "$I" != "y" && "$I" != "n" ]]; do
    echo "Ready to build? y/n"
    read I
done

if [[ $I = "y" ]]; then

    # if also sending to bugsplat
    cmd.exe /c bugsplat-send-pdbs-release.bat

    # remove the hardcoded steam app id for development
    bash steamcmd.sh \
      +login [STEAM-USER-ID] '[STEAM-USER-PASSWORD]' \
      +run_app_build C:/Users/[PATH-TO-SOURCE]/steam_app_build.vdf +quit

fi