Submit (or update) an item.


steam_ugc_submit_item_update(ugc_update_handle, change_note);

Argument Description
ugc_update_handle The unique handle for the UGC to be updated.
change_note The change notes (a string) to be used for the item.

Returns: Async ID


This function will submit the UGC item inexed by the given handle to the Steam Workshop servers, adding the change notes to be used for the given item. The change notes should be a string and the update handle is the value returned when you called the function steam_ugc_start_item_update. When using this function it will return an async ID value which can then be parsed when the Steam Asynchronous event is triggered to report the creation of the item. The event will contain the following key/map values in the async_load ds_map:

  1. "id" - The async ID returned by the calling function

  2. "result" - The result of the operation (a real value). This will either be the GML constant ugc_result_success or some other real number. So you should check for this constant to ensure that the call was successful, and if otherwise somthing has not worked correctly. The rest of the possible values returned are shown as the result of the Steam "EResult" value and you should see steamclientpublic.h in the SDK headers for all 89 possible values.

  3. "event_type" - This key will hold the value "ugc_update_item"

  4. "legal_agreement_required" - Will be true or false (see the Steam docs for more details)


var app_id = steam_get_app_id();
var updateHandle = steam_ugc_start_item_update(app_id, global.Publish_ID);
steam_ugc_set_item_title(updateHandle, "My workshop item(3)!");
steam_ugc_set_item_description( updateHandle, "testing workshop...");
steam_ugc_set_item_visibility(updateHandle, ugc_visibility_public);
var tagArray;
tagArray[0] = "Test";
tagArray[1] = "New";
steam_ugc_set_item_tags(updateHandle, tagArray);
steam_ugc_set_item_preview(updateHandle, "promo.jpg");
steam_ugc_set_item_content(updateHandle, "WorkshopContent1");
requestId = steam_ugc_submit_item_update(updateHandle, "Version 1.2");

The above code gets the game ID, then uses that along with a previously stored published file ID to generate an update handle for the item. This handle is then used to update various pieces of information before the update is pushed to the Workshop servers.

Back: Steam API - User Generated Content
Next: steam_ugc_get_item_update_progress
© Copyright YoYo Games Ltd. 2018 All Rights Reserved