voices_and_tenses.txt 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. The Inform Library version 6/12 introduces two fun new ways of
  2. storytelling. First, you can use first-person and third person
  3. narrative voices. Second, you can use past tense. The typical way to
  4. write interactive fiction has been for the game to talk about the player
  5. in the second-person narrative voice in the present tense. For example:
  6. > PUT COOKIE ON TABLE
  7. You put the cookie on the table.
  8. That's how Infocom usually did things and is Inform's default. Now
  9. suppose you, the author, want the story to read more like an
  10. autobiography. Consider this:
  11. > PUT COOKIE ON TABLE
  12. I put the cookie on the table.
  13. This is the first-person narrative voice. Third-person narrative voice
  14. looks like this:
  15. > PUT COOKIE ON TABLE
  16. George puts the cookie on the table.
  17. To cause these alternative narrative voices, the player object needs to
  18. have a narrative_voice property with a value of 1 or 3. Setting it to 2
  19. results in the old regular behavior. It's most convenient to do this in
  20. the Initialise() routine like this:
  21. [ Initialise;
  22. location = TheRoom;
  23. player.narrative_voice = 1;
  24. ];
  25. For third-person mode, some additional properties are necessary:
  26. [ Initialise;
  27. location = TheRoom;
  28. player.narrative_voice = 3;
  29. player.short_name = "George Jones";
  30. (player.&name)-->0 = 'George';
  31. (player.&name)-->1 = 'Jones';
  32. ];
  33. The name property must be specified like this. There are five slots to
  34. which you may add dictionary words.
  35. Using these modes may require a bit more discipline when it comes to
  36. writing your prose and dealing with the default responses from new verbs
  37. you introduce. If the player always controls the same character and/or
  38. the narrative voice never changes, you can write your verb subroutines
  39. to always talk about George. If the player changes characters or the
  40. narrative voice changes, things get a bit more complicated. Problems
  41. like that can be solved by careful use of the CSubject functions which
  42. are detailed at the end of this document.
  43. Previously if you changed the player-character to something other than
  44. selfobj, the former player-character would be described as "Your former
  45. self" when typing "LOOK". If you want to change bodies like this, you
  46. must set player.short_name even if you use the old regular second-person
  47. voice. Make sure the narrative_voice, short_name, and name properties
  48. are all sensibly set for all possible bodies the player might control.
  49. An interesting way of using the third-person voice is to give the PC a
  50. generic name like "detective" (put that in the short_name and name
  51. properties). Then take away the PC's proper attribute. This will cause
  52. the library to address the PC as "the detective" and correctly
  53. capitalize the word "the". For instance:
  54. [ Initialise;
  55. location = theroom;
  56. player.narrative_voice = 3;
  57. player.short_name = "detective";
  58. (player.&name)-->0 = 'detective';
  59. give player ~proper;
  60. ];
  61. This results in a room description like this:
  62. > PUT FOLDER ON TABLE
  63. The detective puts the folder on the table.
  64. > LOOK
  65. Squad Room
  66. This is the 13th Precinct's squad room.
  67. The detective can see a table (upon which is a folder).
  68. > INVENTORY
  69. The detective is carrying:
  70. a badge
  71. a revolver
  72. The default article used to describe a non-proper PC is "the". If you
  73. want to talk about "a detective", just set player.article to "a".
  74. There is another property for the player object: nameless. This has
  75. meaning only in the first-person or second-person narrative voices.
  76. Normally if you're using either of these voices and the PC switches
  77. bodies, the PC's former body is referred to as "My former self" or "Your
  78. former self". If you want the former body to be referred to some other
  79. way, set player.nameless to false and set the name and short_name
  80. properties to something appropriate. If third-person narrative voice is
  81. used, the nameless property is ignored. "The detective" isn't
  82. namelessness. It's just not a proper name.
  83. The Library uses the CSubject subroutines to figure out when to say "I",
  84. "You", or "George". You can use them too. The most important of these
  85. is CSubjectVerb(). It handles the conjugation of verbs used by the
  86. actor. These are its parameters:
  87. obj The actor who is doing something.
  88. reportage Boolean: causes the actor to "observe"[1]
  89. nocaps Boolean: Don't capitalise if "you" is used[2].
  90. v1 1st person "I" present verb.
  91. v2 2nd person "You" present verb[3].
  92. v3 3rd person "He", "she", or "it" present verb.
  93. past The past tense form of the verb[4].
  94. [1] In the Library itself, "reportage" is used in SubjectNotPlayer()
  95. which determines the correct conjugation for certain actions performed
  96. by NPCs. If this is "false", then this will happen:
  97. > SALLY, RUB LAMP
  98. Sally achieves nothing by this.
  99. If this is "true" then this happens:
  100. > SALLY, RUB LAMP
  101. Sally observes that she achieves nothing by this.
  102. This sort of thing can be important if you want to imply that the NPC is
  103. aware of the result of an action.
  104. [2] When the second-person voice is used, responses very often begin
  105. with "You". Suppose you want to put a conjunction like "but" in front
  106. of "you". For instance:
  107. > EAT PUDDING
  108. But you can't have any pudding if you don't eat your meat!
  109. See that "you" is not capitalised. If you omit this parameter, it will
  110. be false and therefore the game will capitalise "you". If you want to
  111. use a conjunction as in the above example, pass "true".
  112. [3] The v2 parameter is usually not necessary because the first and
  113. second person present forms of verbs are usually the same. Unless you
  114. have something special planned, pass 0 for v2.
  115. [4] Past tense can be useful for implementing a flashback. For
  116. instance:
  117. > EXAMINE VASE
  118. This vase was very expensive-looking.
  119. Here's an example of using CSubjectVerb():
  120. CSubjectVerb(actor,false,true,"close",0,"closes","closed"); " ",
  121. (the) x1, ".";
  122. The default is to use the present tense. If you want to change to the
  123. past tense, set player.narrative_tense to PAST_TENSE. To change back,
  124. change it to PRESENT_TENSE. If you're doing something more complicated,
  125. like going back and forth between the present and the past, it can be
  126. handy to create a "past PC" with its own posessions and properties.
  127. That one always has its narrative_tense set to PAST_TENSE. Then when
  128. you want to flash back, simply call ChangePlayer() appropriately.
  129. There are frequent situations where you need to select between present
  130. and past tense forms of phrases in ways that CSubjectVerb() is not
  131. appropriate. Use the Tense() function for that. The Library itself
  132. uses Tense() to keep things straight. Here's how to use it:
  133. print "After the storm, there still ";
  134. Tense("isn't", "wasn't");
  135. " enough rainfall.";
  136. There is a helper function called Tense() that doesn't quite fit in with the CSubject
  137. functions. This one takes two parameters: present and past. Its purpose is to keep the
  138. tense of various verbs straight. It's not meant for sorting out narrative voices, but
  139. instead is applied after that has been sorted out. In fact, Tense() is used extensively
  140. in the CSubject helper functions to do just that.
  141. Most of the rest of the CSubject functions are wrappers for commonly used verbs: "is",
  142. "isn't", "has", "will", "can", "can't", and "don't". These have only three parameters:
  143. obj, reportage, and nocaps. You can call these with two or one parameters if you like.
  144. The functions will receive 0 (also false) for missing trailing parameters.
  145. CSubjectVoice() is similar to CSubjectVerb() except that the name of the subject is not
  146. printed.
  147. Here they are
  148. along with sample calls:
  149. CSubjectIs()
  150. CSubjectIs(x1,true,true); " already closed.";
  151. CSubjectIsnt()
  152. print "But ";
  153. CSubjectIsnt(actor,true,false);
  154. " in anything at the moment.";
  155. CSubjectHas()
  156. CSubjectHas(actor,false,true); " better things to do.";
  157. CSubjectWill()
  158. CSubjectWill(actor,true,true); " first have to close ", (the) x1, ".";
  159. CSubjectCan()
  160. CSubjectCan(actor,true,true);
  161. " only get into something free-standing.";
  162. CSubjectCant()
  163. CSubjectCant(actor,true, true);
  164. " usefully blow ", (thatorthose) x1, ".";
  165. CSubjectDont()
  166. CSubjectDont(x1,true,true); " seem to fit the lock.";
  167. CSubjectVoice()
  168. print "What ";
  169. CSubjectVoice(player, "do", "do", "does", "did");
  170. print " ";
  171. CSubjectVerb(player, false, true, "want", "want", "want", "want");
  172. " to do?";