GodotSteam: setItemTitle not sending title when creating workshop item

Hi again. Apologies for another quick issue, but another issue I’ve been having is setItemTitle method not writting a title. The workshop item gets created and I can see it in Steam, but the title (and when I try to add description and preview image also) they’re missing. Is there any property I can access before calling submitItemUpdate to debug that these have been set… does my code below look OK? Or is this an issue with the plugin?

func _on_Steam_item_created(result: int, file_id: int, needs_to_accept_tos: bool):

	print("..result: ", result)
	print("..file_id: ", file_id)
	print("..needs_to_accept_tos: ", needs_to_accept_tos)

	# TODO file_id needs to be written to info.json perhaps so we can do an update in future
	
	var handler_id = Steam.startItemUpdate(_app_id, file_id)
	var item_id = _current_item_id
	var item_path = "user://mods/%s" % item_id

	print("handler_id: ", handler_id)
	print("item_id: ", item_id)

	var item_title = _current_item_name

	# Setting UGC item title - it will appear in the workshop
	# @see https://partner.steamgames.com/doc/api/ISteamUGC#SetItemTitle
	print("item_title: ", item_title) # ok
	Steam.setItemTitle(handler_id, item_title)

	# Setting the path to directory containing the item files
	# @see https://partner.steamgames.com/doc/api/ISteamUGC#SetItemContent
	Steam.setItemContent(handler_id, item_path)
	# Making item visible in the workshop
	# @see https://partner.steamgames.com/doc/api/ISteamUGC#SetItemVisibility
	Steam.setItemVisibility(handler_id, 0)

	# Submit item update - Steam will now upload the data
	# @see https://partner.steamgames.com/doc/api/ISteamUGC#SubmitItemUpdate
	Steam.submitItemUpdate(handler_id, "CHANGE NOTE")

Here’s what the created items look like in Steam:

empty_title

Here’s what they ought to look like (roll over the preview image and see the title/description)

https://steamcommunity.com/workshop/browse/?appid=1620540&browsesort=trend&section=readytouseitems

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

Actually, the docs does say:

The absolute path to a local folder containing the content for the item.

I’m passing the Godot path (e.g. user://mods/1234567890) so I tried this:

var item_path = "%s/mods/%s" % [OS.get_user_data_dir(), item_id]
# var item_path = "user://mods/%s" % item_id
Steam.setItemContent(handler_id, item_path)

…and it looks like that worked! The item update callback is being passed a Success result. OK maybe I have it working now. I can also see on Steam item webpage that the File size is 1.451 MB whereas with the previous ones (that don’t have content set) it is 0.00MB

Maybe we can close the ticket, if I have any issues related I’ll report back. Thank you so much for your help and time!

Uploading to the Workshop works in my game.

Take a look at my source code. Maybe it can help you figure it out.

https://github.com/gamebox-project/gamebox/blob/main/menu.gd

Aha! I’ve got title etc working, and it seems to be this part that is breaking the update (when I comment it out, the update item works)

var item_path = "user://mods/%s" % item_id
# ...
Steam.setItemContent(handler_id, item_path)

OK, I’m off to bed for now, but I’ll look more into this tomorrow. Btw the item_path is a path that points to a folder that contains a bunch of JSON files with the workshop item data that I want to include in the workshop item. Maybe I have this wrong(?)

user://mods/1234567890

  • teams.json
  • info.json
  • competitions.json
  • etc

Anyway, least I’m getting the workshop item created on Steam now with title, description, tags etc … just not contents, yet. Progress!

Hi. Here’s the response I got from Steam Support…

Checking here, your app is setup correctly to use the Workshop. And the IPC logs you sent over also look good. Are you able to listen for the call result https://partner.steamgames.com/doc/api/ISteamUGC#SubmitItemUpdateResult_t? That should report back if the update was successful or not, and hopefully report back why it failed.

Also check the file workshop_log.txt, found in the <Steam>\logs folder. This can also give more details on why something might be failing.

I haven’t looked more into these, but I’ll play around a little when I next have the chance and report back. Good to know everything is setup correctly though at the Steam end too. Strange it’s failing.