Table of Contents

Class SteamWorkshopService

Namespace
GrindFest
Assembly
GrindFest.dll

Steam Workshop integration for GrindFest mods. Handles publishing, querying, subscribing, and installing Workshop items.

Uses Facepunch.Steamworks UGC API.

Well-known content folders included when publishing: UI/ (full source + dist/), Scripts/, Story/, Assets/, mod.json, preview.*

Excluded directories: node_modules, .git, .vs, .vscode, .idea, obj, bin

public class SteamWorkshopService : Singleton<SteamWorkshopService>
Inheritance
object
SteamWorkshopService
Inherited Members

Methods

DownloadItem(ulong, bool)

Download/update a specific Workshop item.

GetInstalledWorkshopModPaths()

Get all installed Workshop mod folders. Queries subscribed items and returns directories of installed ones.

LoadWorkshopMeta(string)

Load workshop metadata from .workshop.json. Returns null if not published.

PublishMod(string, ulong)

Publish or update a mod to Steam Workshop.

  1. Reads mod.json from modFolder
  2. Creates temp directory with only shippable content
  3. Creates/updates Workshop item
  4. Reports progress via OnPublishProgress
  5. Reports completion via OnPublishComplete
QueryItems(int, string, string, WorkshopSortOrder)

Query Workshop items for this game. Returns a page of results.

QuerySubscribed(int)

Get items the current user has subscribed to.

SaveWorkshopMeta(string, WorkshopMeta)

Save workshop metadata to .workshop.json in mod folder.

Subscribe(ulong)

Subscribe to a Workshop item by ID.

SubscribeAndWaitForDownload(ulong, int)

Subscribe, download, and wait until the Workshop item is fully installed. Returns true when the item is ready to use.

Unsubscribe(ulong)

Unsubscribe from a Workshop item by ID.

Vote(ulong, bool)

Vote up/down on a Workshop item.

Events

OnPublishComplete

Fired when a publish operation completes. (success, modName, workshopId or error)

OnPublishProgress

Fired during publish with progress 0..1.