rdfs:comment
| - Creating a custom token is easier than one might think. A custom token is simply a number representation of a string, analogous to the Constants in nwscript. Here is a simple "follow along" tutorial for custom tokens.
* Make a conversation on a NPC like the following, +Root 1 - NPC: "Hello" 2 - ..PC: "What is your favorite Color?" 3 - ....NPC: "My Favorite Color is " Now, when Line 3 is spoken, either Red, Blue, Green, or Yellow will be spoken in place of the . Some points to remember:
- Easier than one might think. All a custom token is, is simply a number representation of a string, kinda like the Constants in nwscript. Here is a simple "follow along" tutorial for custom tokens.
* Make a conversation on a NPC like the following, +Root 1 - NPC: "Hello" 2 - ..PC: "What is your favorite Color?" 3 - ....NPC: "My Favorite Color is " Save the file and and attach it to a NPC. Now when Line 3 is spoken, either Red, Blue, Green, or Yellow will be spoken in place of the . Some points to remember:
|
abstract
| - Creating a custom token is easier than one might think. A custom token is simply a number representation of a string, analogous to the Constants in nwscript. Here is a simple "follow along" tutorial for custom tokens.
* Make a conversation on a NPC like the following, +Root 1 - NPC: "Hello" 2 - ..PC: "What is your favorite Color?" 3 - ....NPC: "My Favorite Color is "
* Save the file and and attach it to an NPC.
* Place the following script in the "Actions Taken" of Line 1. This will set up the custom token for you, choosing a random color. void main() { switch(d4()) { case 1: SetCustomToken(2000,"Red");break; case 2: SetCustomToken(2000,"Blue");break; case 3: SetCustomToken(2000,"Green");break; case 4: SetCustomToken(2000,"Yellow");break; } } Now, when Line 3 is spoken, either Red, Blue, Green, or Yellow will be spoken in place of the . Some points to remember:
* Custom tokens, once set, will remain set until changed, so be sure to set them up before you need them.
* Custom tokens will work in the names of placeables, but not NPC names, or item names.
* Custom tokens do not work in the descriptions of placables.
- Easier than one might think. All a custom token is, is simply a number representation of a string, kinda like the Constants in nwscript. Here is a simple "follow along" tutorial for custom tokens.
* Make a conversation on a NPC like the following, +Root 1 - NPC: "Hello" 2 - ..PC: "What is your favorite Color?" 3 - ....NPC: "My Favorite Color is " Save the file and and attach it to a NPC.
* Place this script in the "Actions Taken" of Line 1. This will set up the custom token for you, chooseing a random color. void main() { switch(d4()) { case 1: SetCustomToken(2000,"Red");break; case 2: SetCustomToken(2000,"Blue");break; case 3: SetCustomToken(2000,"Green");break; case 4: SetCustomToken(2000,"Yellow");break; } } Now when Line 3 is spoken, either Red, Blue, Green, or Yellow will be spoken in place of the . Some points to remember:
* Custom tokens, once set, will remain set until changed, so be sure to set them up before you need them.
* Custom Tokens will work in the names of placeables, but not NPC names, or Item names.
* They do not work in the descriptions of placeables.
* Custom tokens are global and thus if changed often in dialog, other characters can get the wrong value displayed
|