describe %Rychek as "insert usual description here"
//Will it work to name a new NPC the same thing as the old one? Or would I have to name him something different?
This is fine. Just remember to:
rename %Rychek "Rychek"
//Would you write the player's name instead of %avatar if you were doing this to someone specific?
If your doing this to someone specific, then it's only going to be run in the -IC- context of someone specific. However, we need to test our scripts before we run them IC. Therefore, you should always be doing you best to do things in the context of a %player. Not someone specific. Otherwise, we can't effectively test our scripts, because we are not that person. Were %player.
Ok, so you noticed it was necessary to sub the name of the %player, or more appropiately in your case the %avatar in your strings.
Great catch Tylissa. And when I was designing with Johnny, we almost did it exactly the way you did it.
But in the end we decided to go with the standard pronoun subs. They are as follows:
%n -> Name: Kevlar
%s -> Sex: he or she
%o -> Objective: him or her
%p -> Possessive: his or her
%q -> Possessive Plural: his or hers
%r -> Reflexive: himself or herself
%N, %S, %O, %P, %Q, %R -> The same as their lowercase counterparts, except the first letter is capitolized.
'help pronoun' if you still require assistance with this.
These work off the variable %avatar by default, or if it's not defined, %player. So if you encounter some situtation where you have an object other than the player/avatar that you need to sub, you can use the set command (check the reference) to set "%player" to the object to sub against.
So if you avatar Tylissa as "%avatar" you can then do something like:
force %razor "to %n You get your stupid ugly..."
force %razor "to babs Did you see that? %S didn't even flinch. The fucking bullets bounced right off %o!"
Which would force Razor to say to babs, "Did you see that? She didn't even flinch! The fucking bullets bounced right off her!"
Your other option (and I suggest you only do this with tells) is to use strings as your variable value, using the set command.
See, tell takes any ammount of strings as the argument, and just puts them together end to end.
For example: Let's say you have a name which get's used over and over again. You could do something like this:
create $npc "%max"
set "%max_name" "Maximillion Gangway"
rename %max %max_name
tell %player "The tall form of " %max_name " just glares at you."
Note that the %max_name is NOT in the string in the tell, because you want the script parser to substutite it, not tell.
This, and other advanced script concepts, will be discussed in The Scripting Manual, Part 3: Advanced Scripting.
For now, I suggest you stick to what's in help pronoun, and wait for Part 2: Context specific scripting.
(Edited by Kevlar at 3:24 pm on Sep. 15, 2002)