Page cover

Workshop Item Data

Like what you're seeing?

Introduction

using HeathenEngineering.SteamworksIntegration;
public struct WorkshopItemData

A helper tool that allows you to pre-define all of the typical fields of a Steam User Generated Content item (aka a Workshop Item) for quick and easy creation or update. see the method for details.

Definition

Used with the User Generated Content interface for 1 line creation of workshop items.

Fields and Attributes

Published File Id

public PublishedFileId_t? publishedFileId

The published file ID is to be updated. This can be null and would be in the case of a create, if you are however updating an item this should be populated with the ID of the file to be updated

Note the ? at the end of the data type, this is a C# feature and indicates that this is a "Nullable" attribute e.g. Nullable<PublishedFileId_t> in this case.

App Id

The consume and creating app ID of the item.

Title

The title of the item.

Description

The description of the item.

Content

The folder where the content is located is used when creating and updating an item.

Preview

The file to be used as the preview image should be a .jpg or .png file and its size must be smaller than that defined in the app's remote storage settings.

Metadata

The metadata associated with the file if any.

Tags

The set of tags associated or to be associated with the item.

Visibility

The visibility setting to apply to the file when created or updated.

Is Valid

Returns true if all required fields are set and conform to Valve's basic requirements.

  • App ID is set to a valid app

  • title is not null or empty

  • title length is less than the max allowed by Valve (8000)

  • description is not null or empty

  • description length is less than the max allowed by Valve (8000)

  • metadata if populated length is less than the max allowed by Valve (5000)

  • preview is not null and file exists

  • content is not null and folder exists

  • no tag length is greater than 255

Methods

Create

or

Creates a workshop item with the fields defined in the structure, optionally with additional preview images, videos and key value tags.

Update

or

Assuming the publishedFileId is a valid file that the user owns this will update that file

Get

Gets the WorkshopItem for the indicated file.

Get Subscribed

Gets the subscribed items with the additional arguments requested.

Last updated