Jump to content

Mod Uploader version compare error


Tykvesh
  • Closed

So I have this mod with

  • version "9.4"
  • version_compatible "8.5"

And when I tried to push an update with

  • version "10.0" (also tried "11.0")
  • version_compatible "8.5" (same as before)

The uploader thought that version_compatible was greater than version:

Untitled.png.506b87a7550138f4fed2c3148e976cf3.png

I was able to push an update by picking a number above "9.4" and below "10.0", which was "9.9".


Steps to Reproduce




User Feedback


This is a side effect of the lexicographically sorted compare function from std::string. While it would be read by a person as major.minor and treat each section as its own there is no restriction on what is used for the version string itself for the mod uploader tool. To that it would be a burden on every mod author for us to add in an enforced convention for sort order. You can work around this sorting method by prepending a more valuable character to the sort before your version string. Some options use zero padded numbers to force this sort order to be logical to a person. You could opt to do this for future versions and force it by using a higher sort order character as a prefix. An example is "[0010.00]" which will be bigger than any string starting with a number.

Changed Status to Closed

  • Like 3
  • Thanks 1

Share this comment


Link to comment
Share on other sites

@JesseB_Klei I padded a zero-width space for the next update and everything seems to be fine, except that workshop page no longer has a version tag. Is it omitted if any special characters are used?

version = "10.1" --there's a zero-width space (U+200B) in front
version_compatible = "8.5"

image.png.6bc515e4427582e3bf193ccc9ee7e36a.png

Also, an unrelated issue: sometimes workshop images go missing after an update, not sure if this is tied to mod uploader. This has happened a few times with my V2 DST mods.

image.png.f6cea353959a0fcea5c188d0be795c40.png

Spoiler

image.thumb.png.616c45de376a0920ab208dd3c0f42628.png

 

Share this comment


Link to comment
Share on other sites

23 hours ago, Tykvesh said:

@JesseB_Klei I padded a zero-width space for the next update and everything seems to be fine, except that workshop page no longer has a version tag. Is it omitted if any special characters are used?


version = "10.1" --there's a zero-width space (U+200B) in front
version_compatible = "8.5"

Also, an unrelated issue: sometimes workshop images go missing after an update, not sure if this is tied to mod uploader. This has happened a few times with my V2 DST mods.

The mod uploader tool does some trimming of whitespace at the start and end of the string but it would not detect this unicode character. This is a Steam Workshop limitation for why the tag is not set. https://partner.steamgames.com/doc/api/ISteamUGC#SetItemTags From this you are limited to printable ASCII set of characters. I am not sure for the image.

  • Like 1
  • Thanks 2

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...