Steam Workshop file system??

R

RFGames

Guest
Hi all so at the moment I am having major issues with getting steam workshop to work with my game.
So I have everything setup how it should in Steamworks, I have looked on as much forums that I can find and I can't get my game to upload anything to the workshop.

So here is my code as it stands.

In Left Press Event (on button click)

Code:
case "Upload to Workshop":
    {
        
        app_id = steam_get_app_id();
        new_item = steam_ugc_create_item(app_id,ugc_filetype_community);
        scr_saveWalls(global.mapname);
        screen_save(working_directory+"\\UserMaps\\"+global.mapname+string(".png"));
        view_visible[1] = false;
        view_visible[0] = true;
        break;
    }
Async - Steam Event

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.mapname);
    steam_ugc_set_item_description(updateHandle,"");
    steam_ugc_set_item_visibility(updateHandle,ugc_visibility_public);
    var tagArray;
    if global.includeunits = 0 {tagArray[0]="Level";}
    else if global.includeunits = 1 {tagArray[0]="Battle";}
    steam_ugc_set_item_tags(updateHandle,tagArray);
    steam_ugc_set_item_preview(updateHandle,working_directory+"\\UserMaps\\"+global.mapname+string(".png"));
    steam_ugc_set_item_content(updateHandle,working_directory+"\\UserMaps\\"+global.mapname+string(".ini"));
    requestId = steam_ugc_submit_item_update(updateHandle,"");
  }
}
Please can someone help this is driving me insane and can't find help anywhere.
Thanks.
 
R

RFGames

Guest
I now have it going to an alarm so the screenshot doesn't capture the menu.

Code:
case "Upload":
    {
        scr_saveWalls(global.maptitle,"work");
        view_visible[5] = false;
        view_visible[0] = true;
        alarm[3]=3;
        break;
    }
Code:
screen_save(working_directory+"\\"+global.maptitle+"\\"+global.maptitle+".png");
app_id = steam_get_app_id();
new_item = steam_ugc_create_item(app_id,ugc_filetype_community);
global.appid = app_id;
global.newitem = new_item;
It now also grabs the contents of the folder rather then pathing direct to the file.

Code:
var event_id = async_load[? "id"];
if event_id == global.newitem
{
  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(global.appid,global.vPublish_ID);
    steam_ugc_set_item_title(updateHandle,global.maptitle);
    steam_ugc_set_item_description(updateHandle,global.mapdescrip);
    steam_ugc_set_item_visibility(updateHandle,ugc_visibility_public);
    var tagArray;
    if global.includeunits = 0 {tagArray[0]="Level";}
    else if global.includeunits = 1 {tagArray[0]="Battle";}
    steam_ugc_set_item_tags(updateHandle,tagArray);
    steam_ugc_set_item_preview(updateHandle,working_directory+"\\"+global.maptitle+"\\"+global.maptitle+".png");
    steam_ugc_set_item_content(updateHandle,working_directory+"\\"+global.maptitle+"\\");
    global.requestId = steam_ugc_submit_item_update(updateHandle,"");
  }
}
 
R

RFGames

Guest
Can you post the new code if you've changed it?
In the runner, it is showing that the code is finding the files fine.
But they are still uploading blank when uploading then ran from steam .

Code:
found preview file: C:\Users\Robert\AppData\Roaming\GOBS\Map Test\Map Test.png
SetItemPreview result=1
Found content directory: C:\Users\Robert\AppData\Roaming\GOBS\Map Test\
SetItemContent result=1
 
Top