All messages may contain %-substitutions. Some common ones return pronouns if the player's gender is set. They are:
|%s||subjective||Name, he, she, it, they.|
|%o||objective||Name, him, her, it, them.|
|%p||possessive||Name's, his, her, its, their.|
|%a||absolute possessive||Name's, his, hers, its, theirs.|
Other possible substitutions are:
|%#||player number||#<actor's number>. Equivalent to num(%N)|
|%@||caller number||#<caller's number>. No equivalent. Initially equal to %#, but changes when things like u() are called.|
|%!||object number||#<message holder's number>. Equivalent to num(me)|
|%l||location number||#<actor's location>. Like loc(%N). This works even if the LOC() function would normally not, since the enactor has "volunteered" his location by triggering another object.|
|%c||last command||Text of last command, before evaluation.|
|%r||newline||Carriage return and newline in output. Note that this counts as two characters, in functions like strlen(). (puts "\r\n")|
|%t||tab||Tab character in output.|
|%b||blank||Space in output.|
|%qN||r(N)||The equivalent of r(N), a register set by a setq() function.|
|%?||accounting||Current values of function invocation count and recursion depth count.|
If you need a '%', use %%. Case matters; for example, "%S" returns "His", "%s" returns "his".
@ofail teapot=burns %p hand on the hot teapot.
would, for a male, return "burns his hand on the hot teapot."
HALTed objects do not perform substitutions.
Other substitutions, such as %va-%vz, %wa-%wz, %xa-%xz, and %0-%9 may also be used and are equivalent to v(?) where ? is a-z or 0-9. In these substitutions and pronoun substitutions, if the first letter of the name is capitalized, the first letter of the substitution will also be capitalized.
Comments to Gammon Software support
Page updated on Wednesday, 15 December 2004