Customizing NPC Speech

Forum where anything UOX3-related goes - including, but not limited to: newbie-support, ideas, general questions, comments, etc and-so-forth.
Post Reply
dracuskaos
UOX3 Neophyte
Posts: 35
Joined: Sat Oct 25, 2008 3:54 am
Has thanked: 0
Been thanked: 0

Customizing NPC Speech

Post by dracuskaos »

--------edit-------
Thanks Xuri, I appreciate you giving me the answer so quickly.
----end-edit------

First, I appologize I am sure this is a repeat question but I cannot find it on the forums.

I want my story NPC's to have custom speech. at the moment they all say the same thing and being as far behind(i used .7x that's it) back when it was C++ and ini files. I need to know how to assign speech to a particular NPC. I know enough to be able to edit the scripts a little bit. I can copy the speech script and probably change them without breaking them to bad. but I have no idea how to make , say, Lord British , say Britishy things.

Oh, and any ideas on making it so if I say "Archimedes you are a gimp" the NPC archimedes will flag me as an attacker. I wanted to make pissed off drunks in the tavern.
Last edited by dracuskaos on Mon Oct 27, 2008 12:23 am, edited 1 time in total.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Make a copy of js\npc\speech\speech_001.js, give it a new name, assign it to a unique scriptID in jse_fileassociations.scp, then customize the heck out of the speech file. ;)

Then assign the script to NPCs using 'SETSCPTRIG <scriptID> ingame, or by adding a SCRIPT=<scriptID> tag to their DFN entry to make it a default setting for those NPCs. Note though that you can at the moment only assign one javascript to an object(item/char) in UOX3, so if you assign them a custom speech script and want to do other stuff with javascript and those NPCs, you'll need to include it all in the same script file. While you can only assign one script to an object, you can include any number of JS events, methods and functions in one and the same script.
-= Ho Eyo He Hum =-
Post Reply