Transition Script: Difference between revisions
New page: {{context|Kit Reference|Script Types}} ==Technical Details== :{| class="scripttable" |class="leftnormal"|Initial Context: |Hero |- |Alternate Context: |None |- |Fields F... |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
|Fields Finalized? | |Fields Finalized? | ||
|Yes | |Yes | ||
|- | |||
|Where Used: | |||
|[[Advancement Element (Data)|Definition File]] | |||
|- | |||
|Procedure Use: | |||
|None | |||
|- | |- | ||
|} | |} | ||
Line 19: | Line 25: | ||
:{| class="infotable" | :{| class="infotable" | ||
|class="leftnormal"|message | |class="leftnormal"|message | ||
|Entry: The empty string to indicate that no transition message should be shown to the user.<br> | |(String) Entry: The empty string to indicate that no transition message should be shown to the user.<br> | ||
Exit: If non-empty, specifies the transition message to be shown to the user as a reminder. | Exit: If non-empty, specifies the transition message to be shown to the user as a reminder. The text may contain [[Encoded Text|encoding]]. | ||
|- | |- | ||
|} | |} |
Latest revision as of 09:05, 20 February 2009
Context: HL Kit … Kit Reference … Script Types
Technical Details
Initial Context: Hero Alternate Context: None Fields Finalized? Yes Where Used: Definition File Procedure Use: None
The Transition script utilizes the following special symbols:
message (String) Entry: The empty string to indicate that no transition message should be shown to the user.
Exit: If non-empty, specifies the transition message to be shown to the user as a reminder. The text may contain encoding.
Description
The Transition script is only utilized when the formalized advancement mechanism is enabled for the game system. This script allows the author to display a message to the user whenever the user successfully switches from creation mode to advancement mode, or vice versa. In general, the message is simply a reminder about the implications of the transition, as well as how to switch back. If you want to suppress the message, simply use an empty message string (or omit the script entirely). The message starts out centered, although you can change the behavior.
When invoked, a Transition script starts with the actor as its initial context. You are free to refer to any aspect of the character, although doing so is rarely necessary. The primary detail you'll want to check is whether the character is transitioning to creation mode or advancement mode, which can be determined via the "state" context.
Example
The Transition script below shows the standard behavior you'll want to include in your data files. Depending on the new mode, an appropriate message is displayed.
if (state.iscreate <> 0) then @message = "{b}{text ffff00}Creation Phase{text 010101}{/b}" @message &= "\n\n" @message &= "{align left}You have unlocked your character!" else @message = "{b}{text ffff00}Advancement Phase{text 010101}{/b}" @message &= "\n\n" @message &= "{align left}You have locked your character creation traits. " endif