Can't find this typo: saies

I think this is a general setting, but I can't find it. When my player talks to someone that I don't have a response set up, that character responses "she saies nothing".

I converted my game to code and did a search for text, but it's not there. How do I fix this typo, please?


There was some discussion about this a while ago. (I can't find the thread at the moment) If I recall, it was something to do with the way QUEST creates plurals. Most English words that end in 'Y' are generally pluralised by changing the 'y' to 'i' and adding 'es'. Unfortunately Say is one of the exceptions. I don't remember if there was a way to override it or not. It may be in one of the core library files. Sorry I can't be more accurate than that but perhaps ThePixie can look into it. (that's if he is still around?)


I posted a fix for this a while back; but it's a little convoluted.

Replace the core function Conjugate with this one:

      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)

Then add a few stringdictionary attributes to the game object to contain the actual verbs:

    <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>mould</key><value>moulds</value></item>
      <item><key>*ould</key><value>ould</value></item>
      <item><key>must</key><value>must</value></item>
      <item><key>won't</key><value>won't</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>

This should make the Conjugate and WriteVerb functions work correctly in most cases, and you can easily add any special cases to the dictionary. Just note that the WriteVerb function shouldn't be used for "can" and "can't" (I would add them as special cases for the principle of least surprise, but there is also a verb "can". As in canning fruit or similar)


Thanks for this complete reply!


It is great if this fix works! Can you explain a bit Lee specifically how/where these pieces of code go?

What does it mean, or more specifically ‘where’ are you supposed to ‘’replace the core function Conjugate...’ - can this be done on the web version?


Unfortunately, replacing core functions is not possible on the web editor; you'd have to wait for a fix.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums