Advertisement
Shadowolf3400

Possession and Ownership, for Inform7

Jun 12th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.83 KB | None | 0 0
  1. Version 2/130613 of Possession and Ownership by Shadow Wolf begins here.
  2.  
  3. [NOTE: Superceded by version 3 here: http://pastebin.com/QA2wxC5g ]
  4.  
  5. Section 1 - Possessions
  6.  
  7. [Option - ignore physical possession]
  8. Use legal possession translates as (- Constant ONLY_LEGAL_POSSESSION; -).
  9.  
  10. Definition: A thing is possessed if a person is holding it.
  11. To decide which person is the possessor of (T - a thing):
  12. if T is held by a person (called the holder), decide on the holder;
  13. decide on nothing;
  14.  
  15. Understand "my" as a thing when the player is holding the item described. Understand "your" as a thing when the person asked is holding the item described.
  16.  
  17. Every thing has an indexed text called the possessive name. The possessive name of a thing is usually "". Understand the possessive name property as referring to a thing.
  18.  
  19. The last when play begins rule: if the legal possession option is inactive, update possessions.
  20. Every turn: if the legal possession option is inactive, update possessions.
  21.  
  22. To update possessions:
  23. repeat with item running through possessed things:
  24. now the possessive name of the item is "[possessive form of the possessor of the item]";
  25.  
  26. To say possessive form of (X - a thing):
  27. if X is the player:
  28. say "your";
  29. otherwise if X is plural-named:
  30. say "[X][apostrophe]";
  31. otherwise:
  32. say "[X][apostrophe]s".
  33.  
  34.  
  35.  
  36. Section 2 - Ownership
  37.  
  38. [Sometimes items are permanently associated with a person, even if they are currently held by someone else, or not held at all (a building, for example). Ownership handles this.]
  39.  
  40. Ownership relates one person (called the owner) to various things. The verb to own (he owns, they own, he owned, he is owned) implies the ownership relation.
  41. Understand "my" as a thing when the player owns the item described. Understand "your" as a thing when the person asked owns the item described.
  42.  
  43. Every thing has an indexed text called the owners name. The owners name of a thing is usually "". Understand the owners name property as referring to a thing.
  44.  
  45. The last when play begins rule: update ownership.
  46. Every turn: update ownership.
  47.  
  48. To update ownership:
  49. repeat with item running through things owned by a person:
  50. now the owners name of the item is "[possessive form of the owner of the item]";
  51.  
  52.  
  53. Possession and Ownership ends here.
  54.  
  55. ---- DOCUMENTATION ----
  56.  
  57. "Possession and Ownership" allows the player to use possessives to refer to items which are either physically held by a particular individual, or notionally owned by an individual.
  58.  
  59. The original idea, which only covered physical possession, originated on a r.a.i.f thread, archived here: http://rec.arts.int-fiction.narkive.com/dBgGlsLL/possessives-in-inform-7
  60.  
  61. With this extension, a player can automatically use commands like "EXAMINE BOB'S PANTS" or "DROP MY PENCIL" or "ALICE, GIVE ME YOUR NECKLACE" - as long as the appropriate person (Bob, the player, and Alice respectively) is holding the item in question. Possession in this case lasts until another person picks up the item - so "ALICE, DROP YOUR NECKLACE" can be followed by "TAKE ALICE'S NECKLACE". (Of course, once the player picks it up, it no longer belongs to Alice by this rule, so "X ALICE'S NECKLACE" would subsequently fail.
  62.  
  63. Some items may be notionally owned by a particular individual, even if they are currently held by someone else, or are fixed in place (and thus not holdable at all.) The ownership relation handles this.
  64.  
  65. Bob carries a gun. The gun is owned by Annie. [or "Annie owns the gun."]
  66.  
  67. This allows:
  68.  
  69. > EXAMINE ANNIE'S GUN [even though it's held by Bob]
  70. > BOB, DROP ANNIE'S GUN
  71. > ANNIE, GET YOUR GUN
  72.  
  73. (Who didn't see that last line coming?)
  74.  
  75. Naturally, ownership of an item can change during play:
  76.  
  77. Oak Street is a room. The red house is scenery on Oak Street. The house is owned by Bob.
  78.  
  79. Signing the Deed is a scene. When Signing the Deed ends: Now the house is owned by the player.
  80.  
  81. If you want to ignore physical possession, and only use the ownership relation, set the option "Use legal possession."
  82.  
  83. Section - Caveats and Issues
  84.  
  85. If a person's name has multiple words, the player has to spell it in full. (e.g. "Red Riding Hood is a person. She wears a cloak." requires "X RED RIDING HOOD'S CLOAK".) There isn't really any way around this that I can see. (Even with assemblies, this can be an issue - see 4.15 of the Documentation). So if possible use only single names.
  86.  
  87. The format for possessives is simple: "[name][apostrophe]s" for singular nouns, and "[name][apostrophe]" for plural ones. This is the same rule used in Plurality. To override it for particular nouns (e.g. "children"), write a more specific "To say possessive form of (X - a thing)". Note that "possessive form" is used in order to avoid conflict with Plurality's "To say the possessive of X" (which has side effects that mean I cannot simply use that phrase directly).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement