hdarren
Member
I am trying to get Steam Workshop supported so people can upload their own custom racetracks. It manages to successfully create the workshop item, adds tags, sets the title and description, but for some reason it will not upload the preview image and file. The file always says 0.000MB and the preview image is as if it doesn't exist.
This is my code.
Async - Steam
The file and preview image are being correctly created in the AppData folder on my hard drive. I know that cloud saving is working because I have that already set up for my other save files and is set to easily accommodate the file sizes. I have also ticked and published the ISteamUGC box as instructed in the guide. I tried removing the "working_directory" from the paths but that doesn't work.
Can anybody help?
This is my code.
Code:
app_id = steam_get_app_id();
new_item = steam_ugc_create_item(app_id,ugc_filetype_community);
pth = working_directory + "workshop\\";
if global.var_LevelGameType = 1 {pth+="race\\";}
else if global.var_LevelGameType = 2 {pth+="speed\\";}
vFile = pth+global.var_LevelName+".rt";
vPreview = screen_save(pth+global.var_LevelName+".png");
scr_CreateSaveLevelDataFile(vFile);
Code:
var event_id = async_load[? "id"];
if event_id == new_item
{
var type = async_load[? "event_type"];
if type == "ugc_create_item"
{
global.vPublish_ID = async_load[? "published_file_id"];
var updateHandle = steam_ugc_start_item_update(app_id,global.vPublish_ID);
steam_ugc_set_item_title(updateHandle,global.var_LevelName);
steam_ugc_set_item_description(updateHandle,"Test.");
steam_ugc_set_item_visibility(updateHandle,ugc_visibility_public);
var tagArray;
if global.var_LevelGameType = 1 {tagArray[0]="Race Track";}
else if global.var_LevelGameType = 2 {tagArray[0]="Speed Way";}
steam_ugc_set_item_tags(updateHandle,tagArray);
steam_ugc_set_item_preview(updateHandle,vPreview);
steam_ugc_set_item_content(updateHandle,vFile);
requestId = steam_ugc_submit_item_update(updateHandle,"");
}
}
Can anybody help?
Last edited: