1) Is it possible create npc specific speech?
2) If so do I create a speech_002 then 3 and so on?
3) Also would the entry npc.dfn require a tag such as SPEECH 2?
Any help is appreciated.
Questions about npc speech
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
1) Yes, it's possible to create NPC-specific speech.
2 & 3)
-Create a new JS file for your NPC-specific stuff then assign the new script to the NPC through the SCRIPT=# (I think? maybe SCRIPTTRIGGER= instead. Unsure, don't have the files handy to check =) DFN tag, or
-Include it in the original speech-script and assign that script to your NPC, or
-Add it to your existing custom script for the NPC if one exists (Any NPC/Item can only have a single script assigned)
2 & 3)
-Create a new JS file for your NPC-specific stuff then assign the new script to the NPC through the SCRIPT=# (I think? maybe SCRIPTTRIGGER= instead. Unsure, don't have the files handy to check =) DFN tag, or
-Include it in the original speech-script and assign that script to your NPC, or
-Add it to your existing custom script for the NPC if one exists (Any NPC/Item can only have a single script assigned)
-= Ho Eyo He Hum =-
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
Ah, no. If you look inside UOX3/JS/jse_fileassociations.scp, you'll find the following entry:
SCRIPT=3000
'SETSCPTRIG 3000
So if you're making a custom .js file, say... speech_002.js, then you need to add a new entry to the jse_fileassociations.scp file and assign the file a unique scriptID, like this:
3000 is the "scriptID" for that script, and is what you'll need to use in the DFN-tag or with the ingame command. Examples:3000=npc/speech/speech_001.js
SCRIPT=3000
'SETSCPTRIG 3000
So if you're making a custom .js file, say... speech_002.js, then you need to add a new entry to the jse_fileassociations.scp file and assign the file a unique scriptID, like this:
Both speech_002 and speech_001 are bad names, btw, they don't really give any indication what they're for. In the end you'll end up with files like speech_471.js, and it will be impossible to find anything3001=npc/speech/speech_002.js
-= Ho Eyo He Hum =-
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
Ah, don't worry too much about the ID-ranges specified in the file, they are mostly there as "guidelines".
What you might want to worry about though, is setting up your custom scripts in a way that they'll never get "overwritten" by any updates to UOX3. Find a custom-range of IDs, like 10000+ for instance, and use those for all your custom scripts. That way you won't have to re-order script IDs and stuff if there's ever an update that adds scripts in the ranges that already exist.
Likewise with file/folder-structure, make it a habit to have all your custom scripts and additions in a "custom"-folder or similar, for easier merging with any future UOX3 updates.
What you might want to worry about though, is setting up your custom scripts in a way that they'll never get "overwritten" by any updates to UOX3. Find a custom-range of IDs, like 10000+ for instance, and use those for all your custom scripts. That way you won't have to re-order script IDs and stuff if there's ever an update that adds scripts in the ranges that already exist.
Likewise with file/folder-structure, make it a habit to have all your custom scripts and additions in a "custom"-folder or similar, for easier merging with any future UOX3 updates.
-= Ho Eyo He Hum =-