Dialogue texts can make use of so-called "custom" tokens, which act much like placeholders that will be substituted with arbitrary content that a script can fill on-the-fly. If you are used to C or a C-like language this is the closest thing to a printf().
Look up the function
SetCustomToken() in the Lexicon to learn more.
[edit]
Technically you can use any token number in the range [0 to 2147483647], but I advice you to avoid the tokens in the range [0 to 9] as they are used by the engine. Any content you place in them is liable to be overwritten as soon as the game sends you a console message.
Before you ask: No, there is no function to *query* the current content of a given token. Either you know it already or you are in the dark. Know that any script anywhere can modify any token number at any time. Meaning that you have no guarantee that your tokens will retain your last entered values for the time being. Best practice when using custom tokens is to constantly *refresh* their content right before making use of them.
-fox
Modifié par the.gray.fox, 24 mars 2013 - 02:25 .