Some kinds of messages are not printed directly to players; they are allowed to contain special characters marking places to include the appropriate pronoun for some player. Your @nakeds and @describe and clothing can contain pronouns which will be automatically substituted based on your characters gender, or the gender your character is currently appearing to be. Here is an example from @nakeds:
%P hands are scarred.
This would be translated as (assuming male gender):
His hands are scarred.
The '%p' in the message will be replaced by either 'his', 'her', or 'its', depending upon the gender of the player. The fact that it is capitalized in the example means that the H in his will be capitalized. To have it not be capitalized, simply do not capitalize the pronoun.
GENERAL INFORMATION FOR PLAYERS
Pronouns: %s => subject pronoun: either `he', `she', or `it' %o => object pronoun: either `him', `her', or `it' %p => possessive pronoun (adj): either `his', `her', or `its' %q => possessive pronoun (noun): either `his', `hers', or `its' %r => reflexive pronoun: either `himself', `herself', or `itself'
Note: there is a special exception for player .name's which are assumed to already be capitalized as desired.
ADVANCED INFORMATION FOR BUILDERS
The complete set of substitutions is as follows:
%% => `%' (just in case you actually want to talk about percentages). Names: %n => the player %t => this object (i.e., the object issuing the message,... usually) %d => the direct object from the command line %i => the indirect object from the command line %l => the location of the player
General properties: %(foo) => player.foo %[tfoo], %[dfoo], %[ifoo], %[lfoo] => this.foo, dobj.foo, iobj.foo, and player.location.foo Object numbers: %# => player's object number %[#t], %[#d], %[#i], %[#l] => object numbers for this, direct obj, indirect obj, and location.
In addition there is a set of capitalized substitutions for use at the beginning of sentences. These are, respectively,
%N, %T, %D, %I, %L for object names, %S, %O, %P, %Q, %R for pronouns, and %(Foo), %[dFoo] (== %[Dfoo] == %[DFoo]),... for general properties There may be situations where the standard algorithm, i.e., upcasing the first letter, yields something incorrect, in which case a "capitalization" for a particular string property can be specified explicitly. If your object has a ".foo" property that is like this, you need merely add a ".fooc" (in general .(propertyname+"c")) specifying the correct capitalization. This will also work for player .name's if you want to specify a capitalization that is different from your usual .name
Example: Rog makes a hand-grenade with a customizable explode message. Suppose someone sets grenade.explode_msg to:
"%N(%#) drops %t on %p foot. %T explodes. %L is engulfed in flames."
If the current location happens to be #3443 ("yduJ's Hairdressing Salon"), the resulting substitution may produce, eg.,
"Rog(#4292) drops grenade on his foot. Grenade explodes. YduJ's Hairdressing Salon is engulfed in flames."
which contains an incorrect capitalization. yduJ may remedy this by setting #3443.namec="yduJ's Hairdressing Salon".
Note for programmers: In programs, use $string_utils:pronoun_sub(). %n actually calls player:title() while %(name) refers to player.name directly.
SEE ALSO: help prog-cloth help tailoring help appear help @nakeds *Last Updated: 02/09/20 by Fengshui*