Advancement Element (Data)

From HLKitWiki
Jump to: navigation, search

Context: HL KitKit Reference … Definition File Reference 

The "advancement" Element

Some game systems require that each new advancement of a character be performed in a rigid sequence. This is because the cost of increasing individual facets of the character go up as the character gets better. When a game system requires structured advancement, the "advancement" element can be defined to specify fundamental behaviors associated with the advancement. The complete list of attributes for an advancement element is below.

enable (Optional) Boolean – Indicates whether a serialized advancement mechanism is used for the game system. Default: "no".
creationterm (Optional) Text – Specifies the term presented to the user when referring to the initial mode where a new character is being created. Default: "creation".
advancementterm (Optional) Text – Specifies the term presented to the user when referring to the post-creation mode where a character's advancement is serialized. Default: "advancement".

The "advancement" element also possesses child elements that describe additional facets of the advancement behavior. 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.

canadvance An optional "canadvance" element may appear as defined by the given link. This element defines the CanAdvance Script. If omitted, default handling is performed.
transition An optional "transition" element may appear as defined by the given link. This element defines the Transition Script. If omitted, default handling is performed.

The "canadvance" Element

The "canadvance" element defines the CanAdvance script that determines whether a character satisfies the initial creation requirements for transitioning into serialized advancement. The complete list of attributes for this element is below.

PCDATA Script – Specifies the code comprising the CanAdvance script.

The "transition" Element

The "transition" element defines the Transition script that is invoked when a character transitions between creation and advancement modes. The complete list of attributes for this element is below.

PCDATA Script – Specifies the code comprising the Transition script.

Example

The following example demonstrates what an "advancement" element might look like. All default values are assumed for omitted optional attributes.

<advancement
  enable="yes"
  creationterm="starting"
  advancementterm="improving">
  <canadvance><![CDATA[
    if (#resleft[resCP] <> 0) then
      @message = "Character does not meet requirement."
      endif
    ]]></canadvance>

  <transition><![CDATA[
    if (#iscreate[@newmode] = 1) then
      @message = "Now Creating!"
    else
      @message = "Now Advancing!"
      endif
    ]]></transition>

  </advancement>