|
Post by baaleos on Apr 30, 2008 8:31:34 GMT
Hi Funky, Just a quick question.
On my server, I have been roleplaying alot with my players, creating npcs, possessing and such.
On of the nifty things for making a good roleplay, is the ability to name the npcs on the fly. Eg !Setname Thomas the Baker
I checked, and it is possible via "SetName()" function. Currently, Simtools is setup so it is restricted to Setting the Name of Items.
Is there a reason for this. Is SetName in SIMTOOls a player command?
Do you know what area of the code I would need to alter to make it a dm command that is capable of renaming npcs, or perhaps you might want to consider adding this functionality in future releases?
Also discovered a nifty way of naming npcs randomly is to add into the onSpawn event script for them.
string sName = RandomName(NAME_FIRST_HUMAN_MALE); // Add a last name. sName = sName + " " + RandomName(NAME_LAST_HUMAN); SetName(OBJECT_SELF,sName); Originally I didnt think it would work, because nwnlexicon says in the RandomName() Function that there is currently no way to set names via script.... Obviously its bit dated. Lol
|
|
|
Post by FunkySwerve on Apr 30, 2008 17:47:44 GMT
Setname was added in 1.67. The lexicon hasn't been updated since 1.64. Yes, !setname is (optionally) a player command - look at the config script. To make a dm command, you would simply insert the script in the dm_ commands, under the appropriate letter in the sorting switch - in the fky_chat_dm_comm script, that'd be case 24, for s. If you try and have difficulty, feel free to post the script, and I'll happily help out.
Funky
|
|