Typos

Not wanting to be a pest, but it's an engine for text, so I feel like some things - especially templates that auto-fill - should probably be correct :> Sorry if this is the wrong forum section to post in!

Named female characters - possessive - should be "hers" (currently "her")
Player pronouns - possessive - should be "yours" (currently "its")
Speaking to an object - singular - auto-response should be "object.gender says nothing" (currently"saies")


Sorry if this is the wrong forum section to post in!

This is more for stuff about the website. Posts about Quest usually go in the Quest forum. But I think people will see it here.

Named female characters - possessive - should be "hers" (currently "her")

I disagree there.
The only place the possessive attribute is used in the core code is the function Possessive, which returns a string of the form "his lamp" or "her wallet". Changing that to "hers" would be introducing an error.

Given the existence of this function (although it doesn't seem to be used anywhere), I assume the possessive attribute is intended to represent the possessive adjective, rather than the possessive pronoun. This is supported by the fact that the default pov_possessive (for the player) is "your", not "yours".

I can think of a few cases where the former might be used in a game, but none for the latter. However, if you can think of one, it probably wouldn't be a problem to add an extra attribute for that.

Player pronouns - possessive - should be "yours" (currently "its")

In fact, pov_possessive is set to "your" by default (via the template SelfPossessive)

So this one isn't so much a typo as a bug: the InitPOV function which swaps out pov_ attributes for their external versions misses out pov_possessive.

A modified function Including this function should fix the issue; at least until these modifications are made in the core.
  <function name="InitPOV" parameters="oldPOV, newPOV">
    <![CDATA[
    if (oldPOV <> null) {
      oldPOV.alias = oldPOV.external_alias
      oldPOV.alt = oldPOV.external_alt
      oldPOV.look = oldPOV.external_look
      oldPOV.gender = oldPOV.external_gender
      oldPOV.article = oldPOV.external_article
      oldPOV.possessive = oldPOV.external_possessive
    }

    newPOV.external_alias = newPOV.alias
    newPOV.external_alt = newPOV.alt
    newPOV.external_look = newPOV.look
    newPOV.external_gender = newPOV.gender
    newPOV.external_article = newPOV.article
    newPOV.external_possessive = newPOV.possessive
   
    if (not GetBoolean(newPOV, "pov_used")) {
      if (newPOV.alt = null) {
        newPOV.pov_alt = newPOV.pov_alt  // ensure we have our own copy of the list
      }
      else {
        newPOV.pov_alt = ListCombine(newPOV.alt, newPOV.pov_alt)
      }
      if (newPOV.alias <> null) {
        list add (newPOV.pov_alt, newPOV.alias)
      }

      if (game.showmoney and not HasInt(newPOV, "money")) {
        newPOV.money = 0
      }

      if (game.showhealth) {
        newPOV.health = 100
        newPOV.changedhealth => {
          if (this.health > 100) {
            this.health = 100
          }
          else if (this.health = 0) {
            if (HasScript(game, "onhealthzero")) {
              do (game, "onhealthzero")
            }
          }
          else if (this.health < 0) {
            this.health = 0
            // changedhealth will be called again so the onhealthzero script will run
          }
        }
      }
      newPOV.pov_used = true
    }

    newPOV.alias = newPOV.pov_alias
    newPOV.alt = newPOV.pov_alt
    newPOV.look = newPOV.pov_look
    newPOV.gender = newPOV.pov_gender
    newPOV.article = newPOV.pov_article
    newPOV.possessive = newPOV.pov_possessive
    ]]>
  </function>

(I think the 'health' code probably needs a tweak too, but that's not the issue here)

Speaking to an object - singular - auto-response should be "object.gender says nothing" (currently"saies")

Again, that's a bug rather than a typo. There's a function Conjugate which attempts to automatically conjugate verbs in English. It's used by several of the templates in order to ensure that they adapt correctly for gender/plurality. However, Conjugate uses a fairly simple algorithm.

I've already posted an improved version of Conjugate, but it still isn't perfect.
I thought the current version was better than that… maybe it's still in the queue of things to fix in the next version.

Suggested `Conjugate` function

I've not tested this fully, but it should be better than the current version:

    <function name="Conjugate" type="string" parameters="obj, verb">
      genders = LCase(obj.gender)
      if (genders = "he" or genders = "she") {
          genders = genders + ";it"
      }
      cmd = GetObject (verb)
      foreach (gender, Split(genders)) {
          if (not cmd = null and HasString (cmd, "conjugate_"+gender)) {
              return (GetString (cmd, "conjugate_"+gender))
          }
          dict = GetAttribute (game, "conjugations_"+gender)
          if (not dict = null) {
              if (DictionaryContains (dict, verb)) {
                  return (DictionaryItem (dict, verb))
              }
              foreach (ending, game.conjugations) {
                  if (Left (ending, 1) = "@" and EndsWith (verb, Mid (ending, 2))) {
                    return (Conjugate (obj, Left (verb, LengthOf(verb) - LengthOf(ending) + 1)) + DictionaryItem (dict, ending))
                  }
                  else if (Left (ending, 1) = "*" and EndsWith (verb, Mid (ending, 2))) {
                      return (Left (verb, LengthOf(verb) - LengthOf(ending) + 1) + DictionaryItem (dict, ending))
                  }
              }
          }
      }
      return (verb)
    </function>

It goes with a couple of dictionaries, which are assumed to be attributes of the game element:

    <attr name="conjugations_i" type="stringdictionary">
      <item><key>be</key><value>am</value></item>
      <item><key>'be</key><value>'m</value></item>
    </attr>

    <attr name="conjugations_you" type="stringdictionary">
      <item><key>be</key><value>are</value></item>
      <item><key>'be</key><value>'re</value></item>
    </attr>

    <attr name="conjugations_we" type="stringdictionary">
      <item><key>be</key><value>are</value></item>
      <item><key>'be</key><value>'re</value></item>
    </attr>

    <attr name="conjugations_they" type="stringdictionary">
      <item><key>be</key><value>are</value></item>
      <item><key>'be</key><value>'re</value></item>
    </attr>

    <attr name="conjugations_it" type="stringdictionary">
      <item><key>be</key><value>is</value></item>
      <item><key>have</key><value>has</value></item>
      <item><key>@n't</key><value>n't</value></item>
      <item><key>'ve</key><value>'s</value></item>
      <item><key>'be</key><value>'s</value></item>
      <item><key>*ay</key><value>ays</value></item>
      <item><key>*oy</key><value>oys</value></item>
      <item><key>*ey</key><value>eys</value></item>
      <item><key>*y</key><value>ies</value></item>
      <item><key>*ss</key><value>sses</value></item>
      <item><key>*s</key><value>sses</value></item>
      <item><key>*sh</key><value>shes</value></item>
      <item><key>*ch</key><value>ches</value></item>
      <item><key>*o</key><value>oes</value></item>
      <item><key>*x</key><value>xes</value></item>
      <item><key>*z</key><value>zes</value></item>
      <item><key>*</key><value>s</value></item>
    </attr>

(I wrote this when I was trying to make a game where the player character adopts 1st person; though that would require changing a lot of the templates as well. Note that it shouldn't be used for the verbs "can", "must", "would", "should", because those aren't conjugated normally; and making the function ignore them would break when it comes to the verb "can" meaning to put something in a can)


If you don't like Quests use of possessive pronouns, then make your own...
That's the nice thing about programming, you can do that...
I've got a game, non-Quest, where I created one.
The message would be:
"You look at {pronoun(3)} and try to determine how well {pronoun(1)} knows how to fight."
pronoun is a function with a list of words like "he, she, it" and I select which one I need at the time.
(I think I had a "sex" value to determine which version I needed.)
If the sex was male then the list would be "he, his, him,..."
Female would be "she, hers, her,..."
other would be "it, its, its,..."
Mainly to get every word to line up right, I repeated each line with each pronoun to get each one to sound "right".
Quest does most of this already for you.
Also, you could just write everything out yourself and not use ANY of Quests possessive pronouns... Problem solved.


It should also be noted that the documentation is incomplete.

possessive isn't in the list of attributes.
It should be added, and made clear that it is the possessive adjective rather than the possessive pronoun.
While it isn't used by any of the built-in messages (at least in English), it would be good to have it documented for the benefit of any libraries that might use it, and so that people don't have to guess about what it is supposed to represent.

@DarkLizerd:
On the only project I'm using that requires such functions, I find it easier to name them things like hisher, hisher, himher, heshe etc. Then it's easy to remember the name of the one you want.

(maybe that would be a good thing to include as a text processor directive: {heshe:objectname} would be equivalent to {objectname.gender}, but for the less-common ones it would make them easier to remember)


@mrangel The fact that it's adjective as opposed to possessive pronoun explains it, and frankly I didn't think about that at all. Running "whose cat is that?" to "its her" made my brain scream. I'm not sure why my player's possessive was filled in with "its" then; checking in a new game file turned out to have "your", so all my points are now moot. (Which is good! No bugs I guess.)

@DarkLizerd Thankfully the ability to use/write your own pronouns in Quest is there, but the point I was trying to make was that these innate offers should be correct, to avoid mistakes when relying on them in order to not have to write them yourself every time. As it turns out they were, and my concerns unfounded.


Log in to post a reply.

Support

Forums