Hero Target References
Context: HL Kit … Kit Reference … Target References
See Also: Hero Context Transitions
Heroes are a special type of container. As such, they share all of the same target references as normal containers. However, they also have quite a few additional target references that are unique to heroes. The complete list of these special target references is presented in the table below.
IMPORTANT! For the purposes of data file authoring, the "hero" context applies to all actors, whether they be leads, masters, or minions.
IMPORTANT! Actors also support all general container target references.
NOTE! When an actor is accessed from within a visual script, all operations are restricted to read-only behavior. Any attempts to modify a container from within a visual script will fail.
setactor (Right, Number) Memorizes the current actor context as the "actor focus", allowing it to be instantly accessed thereafter via the "actor." initial script context. Always returns a value of zero.
Example: perform this.setactor
miniontext (Right, String) Returns the name of the thing that attaches the current minion. This makes it possible to retrieve the nature of the minion for display to the user. If invoked on a lead, an empty string is returned.
Example: result = this.miniontext
sourcetree (Right, String) Returns a summary of the various user-selected sources that have chosen for the current actor. This is intended for inclusion within character sheet output. The summary is synthesized solely from sources that are user-selected, although the entire chain of sources down to each selected source is included so that context is provided in case similar names are used in different contexts. Any source that is designated as not reportable is omitted from the summary, allowing sources governing printout and interface behaviors to be omitted. If a source specifies an alternate "reportname", that name is used instead.
Example: result = this.sourcetree
errorcount (Right, Number) Returns the total number of validation errors that were reported within the hero over the course of evaluation. This is intended for use within character sheet output. If accessed during evaluation processing, a run-time error is reported.
Example: result = this.errorcount
errorlist (Right, String) Returns a string containing all validation errors for the hero, based on the most recent evaluation cycle. This is intended for use within character sheet output. If accessed during evaluation processing, a run-time error is reported.
Example: result = this.errorlist
combatant (Right, Left, Number) Indicates whether the actor is managed as a combatant or not within the Tactical Console, with a non-zero value indicating a combatant. If a new value is assigned, the combatant state of the actor is changed.
Example: result = this.combatant
Example: this.combatant = 0initchange (Right, Number) Returns non-zero if the actor's current initiative value has been modified by the user.
Example: result = this.initchange
ismoveup (Right, Number) Returns non-zero if the actor can be moved upwards within the Tactical Console, thereby adjusting its initiative value.
Example: result = this.ismoveup
ismovedown (Right, Number) Returns non-zero if the actor can be moved downwards within the Tactical Console, thereby adjusting its initiative value.
Example: result = this.ismovedown
combatmove[expr] (Right, Number) Moves the actor upwards or downwards within the Tactical Console, thereby adjusting its initiative position. The number of slots to move is given by the numeric expression expr, with a positive value moving the actor later in the initiative sequence and a negative value earlier. To move an actor down in the order (i.e. later in combat), use "+1", and use "-1" to move the actor upwards. To move an actor to the top or bottom of the initiative order, simply use a very large value, as the engine will safely bound all adjustments. Always returns a value of zero.
Example: perform this.combatmove[-1]
combatact (Right, Number) Designates the actor as having acted this combat turn and triggers an update to determine the next "ready" actor(s). Always returns a value of zero.
Example: perform this.combatact
combatdefer (Right, Number) Designates the actor as having deferred its action this combat turn and triggers an update to determine the next "ready" actor(s). Always returns a value of zero.
Example: perform this.combatdefer
combatmovenow (Right, Number) Moves the actor within the initiative sequence such that it is positioned immediately before the first actor that is currently designated as "ready". This is intended for use when a deferred actor finally acts, as its initiative position is moved to the current slot in the queue. Always returns a value of zero.
Example: perform this.combatmovenow