Some kinds of messages are not printed directly to players; they are allowed to contain special characters marking places to include a contextually appropriate substitution on the fly for messages.
%% => `%' (just in case you actually want to talk about percentages). Names (accessible to players): %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 (builders only): %(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".
SEE ALSO: help pronouns help action-format *Last Updated: 04/11/22 by MirageGM*