About: Custom tokens   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

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:

AttributesValues
rdfs:label
  • Custom tokens
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:
dcterms:subject
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
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software