User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Quest version and required version

  1. #1
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,047
    Level
    31
    vBActivity - Bars
    Lv. Percent
    10.69%

    Quest version and required version

    War Lord asked me to look into a quest that was causing a mysterious error to appear whenever anybody tried to play it. Turns out the author had set the required quest version number higher than the quest version itself. Oops.

    I've added code to ZQ that will stop you from setting a required version greater than the current quest version. I think this is safe? (Usually when you set a different version and required version, it would be because you are releasing some bugfixes to your quest and want to allow old savegames to still work, in which case you would be setting the required version *lower* than the current version).

    There is a second problem with the way version/required version is currently handled: they are compared using strcmp(), so that, for example, if you set the quest version to 10 and the required version to 2, you will get a strange error about the version being too old. I didn't change this since (1) it's not clear what the right behavior should be (is 1.1 the same version, or older, than 1.10?) and (2) changes might break old quests.

  2. #2
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,781
    Level
    21
    vBActivity - Bars
    Lv. Percent
    73.04%
    This is reasonable, and logical. I would change the string 'Required Version' to 'Minimum Quest Version', as the common issue is when a user sets the 'required version' to the ZC version, rather than the quest version number; and I have seen this many times.

    Why is strcmp() ignoring the decimal place when comparing 10 to 2? I'll need to look at that code, but clearly ignoring the place is a bad idea. 1.0.1 versus 1.01 versus 1.10.1 and similar .... ugh. It's very much decided by the personality of the person in charge f versioning.

    I dislike using a single dot for sub-subversioning. e.g., I prefer 1.1.2 to 1.12, as the latter to me suggests twelve subversions. Does the editor even permit a second dot? I seem to recall that breaking.

    In my experience, questmakers use quest versioning poorly, if at all. A rare few use it properly.

  3. #3
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,047
    Level
    31
    vBActivity - Bars
    Lv. Percent
    10.69%
    Does the editor even permit a second dot?
    It permits anything, including quest versions like "foxtrot".

    Why is strcmp() ignoring the decimal place when comparing 10 to 2?
    strcmp() does a lexicographic comparison, rather than trying to parse the meaning of the strings. So it checks the first character first, and since '1' < '2', it returns that the first string is less than the second. So you have
    "02" < "10" < "2".

  4. #4
    Here lies mero. Died by his own dumbassitude.
    Join Date
    May 2011
    Posts
    929
    Mentioned
    102 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,527
    Level
    23
    vBActivity - Bars
    Lv. Percent
    13.96%
    why not use both,
    that's what we've done before.
    There's no reason to make it work the way it should and check zquest version.
    Several things do that already because of backwards compatibiliy.

  5. #5
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,047
    Level
    31
    vBActivity - Bars
    Lv. Percent
    10.69%
    Quote Originally Posted by Tamamo View Post
    why not use both,
    that's what we've done before.
    There's no reason to make it work the way it should and check zquest version.
    Several things do that already because of backwards compatibiliy.
    Right, it's just a question of whether it's something worth the effort of fixing (vs leaving the check as-is).

  6. #6
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,827
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,978
    Level
    33
    vBActivity - Bars
    Lv. Percent
    28.3%
    No idea--doesn't seem to have a good solution. Maybe just a hack-y sanity check when users are editing the version?

    Code:
    if req_ver > ver //read as: 1.2.0 > 1.10.0
      MessageBox("error setting version");
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  7. #7
    Here lies mero. Died by his own dumbassitude.
    Join Date
    May 2011
    Posts
    929
    Mentioned
    102 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,527
    Level
    23
    vBActivity - Bars
    Lv. Percent
    13.96%
    @DarkDragon
    please tell me your joking

  8. #8
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,047
    Level
    31
    vBActivity - Bars
    Lv. Percent
    10.69%
    Quote Originally Posted by Gleeok View Post
    No idea--doesn't seem to have a good solution. Maybe just a hack-y sanity check when users are editing the version?

    Code:
    if req_ver > ver //read as: 1.2.0 > 1.10.0
      MessageBox("error setting version");
    Agreed, this is what I've put into the code.

  9. #9
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,047
    Level
    31
    vBActivity - Bars
    Lv. Percent
    10.69%
    Quote Originally Posted by Tamamo View Post
    @DarkDragon
    please tell me your joking
    No, why? Do you feel that intelligent parsing of the quest version is an important enhancement (relative to other open features and issues)?

  10. #10
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,781
    Level
    21
    vBActivity - Bars
    Lv. Percent
    73.04%
    Probably not worth fixing at this time, other than preventing the user from setting a version string that is lower than ''min version'. I could come up with a routine to check for decimals and do an integer compare in stages, but it would be horrific overkill for a feature that is poorly used by the userbase, and oft ignored.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social