Behavior Element (Data): Difference between revisions
(2 intermediate revisions by the same user not shown) | |||
Line 192: | Line 192: | ||
:{| class="infotable" | :{| class="infotable" | ||
|class="leftnormal"|ratingterm | |class="leftnormal"|ratingterm | ||
|(Optional) Text | |(Optional) Text – Defines the term used for the rating or difficulty of a monster. This is used in the encounter builder form in the rating filter label. If there is no rating term defined then the rating filter controls are hidden. If there is a rating term defined then there must also be an encounterinfo element with type="ratingval" to define the location of the rating value in the portfolio. | ||
|- | |- | ||
|} | |} | ||
Line 209: | Line 209: | ||
:{| class="infotable" | :{| class="infotable" | ||
|class="leftnormal"|type | |class="leftnormal"|type | ||
|(Required) Text | |(Required) Text – indicates what the data is and should be one of the following: | ||
<ul class="sets"> | |||
<li>pointsval – The number of "points" for a character. e.g. 2000</li> | |||
<li>pointstext – The textual representation of the points value. e.g. "2,000 XP"</li> | |||
<li>ratingval – The difficulty for a character. e.g. 4</li> | |||
<li>ratingtext – The textual representation of the rating value. e.g. "CR 4"</li> | |||
<li>sourcebooks – The books where a character originates.</li> | |||
</ul> | |||
|- | |- | ||
|xpath | |xpath | ||
Line 220: | Line 223: | ||
|- | |- | ||
|attribute | |attribute | ||
|(Required) Text – | |(Required) Text – Specifies the attribute of the node given in xpath that contains the data. | ||
|- | |- | ||
|} | |} |
Latest revision as of 15:22, 15 April 2014
Context: HL Kit … Kit Reference … Definition File Reference
The "behavior" Element
Each game system has a variety of behaviors that will need to be defined. These behaviors are collectively specified within a "behavior" element. The complete list of attributes for a "behavior" element is below.
defaultname (Optional) Text – Default name to be used for all actor that have not been explicitly named by the user. Maximum length is 50 characters. Default: "Unnamed". secondaryphase (Optional) Id – Specifies the unique id of the phase to be used as the default for all Secondary tag expressions assigned by tables and choosers. If no explicit phase is assigned for a Secondary tag expression, this one is used. Default: "Setup". secondarypriority (Optional) Integer – Specifies the priority to be used as the default for all Secondary tag expressions assigned by tables and choosers. If no explicit priority is assigned for a Secondary tag expression, this one is used. Default: "5000". existencephase (Optional) Id – Specifies the unique id of the phase to be used as the default for all Existence tag expressions assigned by tables and choosers. If no explicit phase is assigned for an Existence tag expression, this one is used. Default: "Setup". existencepriority (Optional) Integer – Specifies the priority to be used as the default for all Existence tag expressions assigned by tables and choosers. If no explicit priority is assigned for an Existence tag expression, this one is used. Default: "5000". gearphase (Optional) Id – Specifies the unique id of the phase during which all built-in gear processing is performed. This includes the calculation of gear weights throughout all gear holders. Default: "Effects". gearpriority (Optional) Integer – Specifies the priority at which all built-in gear processing is performed. Default: "5000". mouseinfo (Optional) Id – Specifies the unique id of the procedure to automatically invoke as the MouseInfo script within portals. Default: "MouseInfo". description (Optional) Id – Specifies the unique id of the procedure to automatically invoke as the Description script within portals. Default: "Descript". initascend (Optional) Boolean – Indicates whether initiative order ascends or descends. When it ascends, lower numbers take their actions first, and vice versa. Default: "no". initperturn (Optional) Boolean – Indicates whether to re-generate new initiative values at the start of every turn instead of at the start of every combat. Default: "no". initsimultaneous (Optional) Boolean – Indicates whether it is valid for two actors to have identical initiatives and act simultaneously. If not, HL will automatically generate a tie-breaker value. Default: "no". initminimum (Optional) Boolean – Specifies the minimum value allowed for the initiative value when the user is adjusting the value on the Tactical Console. Default: "-99". initmaximum (Optional) Boolean – Specifies the maximum value allowed for the initiative value when the user is adjusting the value on the Tactical Console. Default: "99". interleave (Optional) Boolean – Indicates whether the evaluation cycles of all actors within the context of the same lead are interleaved, which governs the behavior of minions and masters. If enabled, masters can influence changes upon their minions and minions can also influence changes upon their masters. If not enabled, masters all fully evaluated before minions, so the influence can only occur in the downward direction. Default: "no".
The "behavior" element also possesses child elements that describe additional facets of the game system. The list of these child elements is below and must appear in the order shown. Click on the links to access the details for each element.
diceroller A single "diceroller" element must appear as defined by the given link. This element customizes the integrated Dice Roller. leadsummary An optional "leadsummary" element may appear as defined by the given link. This element defines the LeadSummary Script. If omitted, default handling is employed. newcombat An optional "newcombat" element may appear as defined by the given link. This element defines the NewCombat Script. If omitted, default handling is employed. newturn An optional "newturn" element may appear as defined by the given link. This element defines the NewTurn Script. If omitted, default handling is employed. integrate An optional "integrate" element may appear as defined by the given link. This element defines the Integrate Script. If omitted, default handling is employed. initiative An optional "initiative" element may appear as defined by the given link. This element defines the Initiative Script. If omitted, default handling is employed. initfinalize An optional "initfinalize" element may appear as defined by the given link. This element defines the InitFinalize Script. If omitted, default handling is employed. loaderror An optional "loaderror" element may appear as defined by the given link. This element defines the LoadError Script. If omitted, default handling is employed. encounter An optional "encounter" element may appear as defined by the given link. This element defines fields used by the encounter builder. If omitted, default values are used.
The "diceroller" Element
The "diceroller" element defines characteristics of the integrated Dice Roller mechanisms when used with the game system. The complete list of attributes for a "diceroller" element is below.
mode (Optional) Set – Specifies the initial dice rolling mode to start out in for the game system. Must be one of the following: - totals – The dice rolled are added and that total is displayed.
- successes – Each die rolled is compared against the threshold for declaring a success and the number of successes is displayed.
- Default: "totals".
dietype Integer – Specifies the default die type to be rolled. quantity (Optional) Integer – Specifies the default number of dice to be rolled. Default: "1". success (Optional) Integer – Specifies the threshold value at which a success result is achieved. Game systems like World of Darkness and Shadowrun utilizes successes instead of adding the dice results. Default: "1". explode (Optional) Integer – Specifies the threshold value at which a success result "explodes" by allowing a re-roll. If a value of zero is given, no explosion occurs. Default: "0". maxexplode (Optional) Integer – Specifies the maximum number of times that a single roll may explode. A value of zero indicates that explosion is unlimited. Default: "0".
The "leadsummary" Element
The "leadsummary" element defines the LeadSummary script that is used to synthesize summary information for each actor. This summary is displayed when the user previews the available actors for import into the current portfolio. The complete list of attributes for a "scriptmacro" element is below.
PCDATA Script – Specifies the code comprising the LeadSummary script.
The "newcombat" Element
The "newcombat" element defines the NewCombat script that is invoked whenever the user begins a new combat within the Tactical Console. The complete list of attributes for the element is below.
PCDATA Script – Specifies the code comprising the NewCombat script.
The "newturn" Element
The "newturn" element defines the NewTurn script that is invoked whenever the user starts a new turn of combat within the Tactical Console. The complete list of attributes for the element is below.
PCDATA Script – Specifies the code comprising the NewTurn script.
The "integrate" Element
The "integrate" element defines the Integrate script that is invoked whenever the user integrates pending actors into an existing combat within the Tactical Console. The complete list of attributes for the element is below.
PCDATA Script – Specifies the code comprising the Integrate script.
The "initiative" Element
The "initiative" element defines the Initiative script that is used to calculate the initiative score for each actor during combat. The complete list of attributes for the element is below.
PCDATA Script – Specifies the code comprising the Initiative script.
The "initfinalize" Element
The "initfinalize" element defines the InitFinalize script that is used to tailor the final displayed text for the initiative score of each actor during combat. The complete list of attributes for the element is below.
PCDATA Script – Specifies the code comprising the InitFinalize script.
The "loaderror" Element
The "loaderror" element defines the LoadError script that is used to provide helpful information to the user about changes across releases of your data files and errors that can be safely ignored. The complete list of attributes for the element is below.
PCDATA Script – Specifies the code comprising the LoadError script.
The "encounter" Element
The "encounter" element defines game specific information for use within the encounter builder. The encounter element contains one or more encounterinfo elements. The complete list of attributes for the element is below.
ratingterm (Optional) Text – Defines the term used for the rating or difficulty of a monster. This is used in the encounter builder form in the rating filter label. If there is no rating term defined then the rating filter controls are hidden. If there is a rating term defined then there must also be an encounterinfo element with type="ratingval" to define the location of the rating value in the portfolio.
The encounter element contains one or more encounterinfo elements. The list of these child elements is below. Click on the links to access the details for each element.
encounterinfo One or more "encounterinfo" elements must appear as defined by the given link. This element gives a location in a stock portfolio to find a specific piece of data
The "encounterinfo" Element
The encounterinfo element is a child of the encounter element and contains locations to data in stock portfolios. The complete list of attributes for the element is below.
type (Required) Text – indicates what the data is and should be one of the following: - pointsval – The number of "points" for a character. e.g. 2000
- pointstext – The textual representation of the points value. e.g. "2,000 XP"
- ratingval – The difficulty for a character. e.g. 4
- ratingtext – The textual representation of the rating value. e.g. "CR 4"
- sourcebooks – The books where a character originates.
xpath (Required) Text – The xpath should give a location of the element that contains a specific piece of data in the custom output XML for a stock portfolio. This should only be used in game systems with custom output XML. attribute (Required) Text – Specifies the attribute of the node given in xpath that contains the data.
Example
The following example demonstrates what a "behavior" element might look like. All default values are assumed for omitted optional attributes.
<behavior defaultname="Nobody" interleave="yes"> <diceroller mode="totals" dietype="6" quantity="1"/> <leadsummary><![CDATA[ ~start with the race var txt as string txt = hero.firstchild["Race.?"].field[name].text if (empty(txt) <> 0) then txt = "No Race" endif @text &= txt ~append the CP rating of the character @text &= " - CP: " & hero.child[resCP].field[resMax].value ]]></leadsummary> <initiative><![CDATA[ ~calculate the secondary initiative rating @secondary = 0 ~calculate the primary initiative rating @initiative = random(10) + 1 ]]></initiative> <encounter ratingterm="CR"> <encounterinfo type="pointsval" xpath="/document/public/character/xpaward" attribute="value"/> <encounterinfo type="pointstext" xpath="/document/public/character/xpaward" attribute="text"/> <encounterinfo type="ratingval" xpath="/document/public/character/challengerating" attribute="value"/> <encounterinfo type="ratingtext" xpath="/document/public/character/challengerating" attribute="text"/> <encounterinfo type="sourcebooks" xpath="/document/public/character/bookinfo" attribute="name"/> </encounter> </behavior>