Skip to content

QuestIniEvent

Quantumrunner edited this page May 24, 2021 · 9 revisions

Event<name>

Information on an event that will happen in a dialog box. This can be triggered from other events or game states.

Functional

xposition

Optional, if provided will move the camera to the horizontal position in squares.

yposition

Optional, if provided will move the camera to the vertical position in squares.

display

Boolean to indicate if the event is displayed or automatically confirmed as if the first button which has conditions met was pressed, defaults to true.

buttons

The number of buttons to display.

event<num>

A space separated list of events to call if the associated button is pressed. The first event which is not disabled due to flags will be triggered, the rest will be ignored (see randomevents for alternate opertaion).

If the entry is a relative path to a quest.ini file, the quest will be started. This will reset the round an hero state and clear all monsters, UI and board components.

event<num>Condition

A condition to place the button under. If this condition is not met event<num>ConditionAction is used to determine results. Format is the same as VarTests. If no buttons have conditions met an additional 'Continue' button will be added.

event<num>ConditionAction

If the button condition is not met take this action:

  • "NONE": No action
  • "DISABLE": Button becomes gray (buttoncolor is not used) and cannot be selected
  • "HIDE": Button is not listed for player

buttoncolor<num>

The color of the associated button number. If not provided defaults to white. Colors can be HTML names or #RRGGBB format.

quota

An optional number that must be reached for event1 to trigger. If this is not 0 only button1 will be displaced along with controls to enter a number. If the number is greater than or equal to the quota event1 will trigger. If the number is less than quota the input number will be saved and event2 will trigger. If a saved number exists when this event is called the input number will be added to the number saved prevously.

If quota is set to a var name that variable will be used for the initial number setting and will be written to on completion. In this situation event1 will always trigger.

maxhero

Maximum number of Heroes that can be selected during this event. Set to 0 to disable selection (default).

minhero

The minimum number of Heroes required to be selected during this event.

hero

Optional event name in which Heroes were selected to highlight during this event. If maxhero is also set this selection can be changed. If the event has {rnd:hero} text this will highlight the randomly chosen hero.

Example: Create an event with name EventRandomHeroSelectionand add {rnd:hero} to the text of this event.

Now create another event called EventPrintSelectHeroName and add {c:EventRandomHeroSelection} to reuse the name of the hero that has been selected in EventRandomHeroSelection.

highlight

Can be set to true to trigger a highlight on the target location, defaults to false.

add

An optional space separated list of names of tokens, tiles, UIs and doors. These will be added to the map at the start of the event. components already added will not be affected. If a QItem is added it will be shown next to the event dialog (highlight false) or on the board (highlight true).

remove

An optional space separated list of names of tokens, tiles, UIs and doors. These will be removed from the map at the start of the event. Items not added will not be affected. If a Spawn component is removed then all monsters of that type which are present will be removed (even if they weren't from that spawn event) and the defeated trigger will not occur.

If a QItem is removed and the associated item has been provided to the party it will be removed.

If #boardcomponents is used all tokens doors, UIs and tiles will be removed. If #monsters is used all monsters will be removed (without causing the defeated triggers). If #shop is used the item shop will be removed.

trigger

An optional trigger for this event. See list of supported triggers.

A trigger can also be "Var<name>" where name is the name of a var that starts with '@' (with the '@' removed). In this case the event will trigger at the end of an event that sets the associated var to 1. The var will be reset to 0 before this even occurs. After this event and it's following events have been resolved any events following the calling event will be resolved. Note that if vars have changed the possible outcomes from the calling event will NOT be redone, so this method of calling events is not recommended in most circumstances.

audio

Name of audio content to play when this event occurs, or relative path to an ogg file to play.

music

A space separated list of audio content or relative paths to ogg files. If more than 1 is specified the existing music track will fade out and this will be the new music play list. If one is specified the existing track will fade out, this track will play and then the previous play list will start again at the first track. To loop a single track enter it twice.

vartests

An optional space separated list of condition data which must be met for this event to trigger. Each entry begins with an entry classification, followed by ':', followed by the entry data.

VarTestsParenthesis

Data may be '(' or ')', will affect order of resolving conditions.

VarTestsLogicalOperator

Data my be "OR" or "AND", will affect logical treatment of surrounding conditions.

VarOperation

Each VarOperationis a comma separated list of:

Var

Var to check. Vars stating with a '#' are internal vars set by Valkyrie. See Valkyrie Vars. Vars do not need to be declared, all are initialised to 0.

Operator
  • "==" Var and Value match
  • "!=" Var and Value do not match
  • ">=" Var greater than or equal to Value
  • "<=" Var smaller than or equal to Value
  • ">" Var greater than Value
  • "<" Var smaller than Value
Value

Var to use. To check agains a var must state with '#' (Valkyrie var) or an alpha character. Alternatively static numbers can be used. Vars do not need to be declared, all are initialised to 0.

operations

An optional space separated list of operations that will occur when this event triggers. Operations are performed in list order. Each operation is a comma separated list of:

Var

Var to modify. Vars stating with a '#' cannot be used. See Valkyrie Vars. Vars do not need to be declared, all are initialised to 0.

Operator

  • "=" Set var
  • "-" Subtract Value from Var
  • "+" Add Value to Var
  • "*" Multiply Var by Value
  • "/" Divide Var by Value
  • "%" Modulus Var by Value

Value

Var to use. To use a var must state with '#' (Valkyrie var) or an alpha character. Alternatively static numbers can be used. Vars do not need to be declared, all are initialised to 0.

randomevents

If set to true will randomly pick a non disabled event to trigger from the appropriate list rather than triggering the first available.

mincam

If set true the position of this event will be used to set a minimum (bottom/left) camera limit.

maxcam

If set true the position of this event will be used to set a maximum (top/right) camera limit.

Text

<sectionname>.text

The text to be displayed when this event is triggered.

{rnd:hero} can be used to fill in a random hero name. If used more than once in the same event the names will match. If the event is called multiple times the name may change.

{var:<Var>} can be used to fill in a Var value.

{c:<QItemComponent>} can be used to fill in the selected item name.

{c:<SpawnComponent>} can be used to fill in the selected monster name.

{c:<CustomMonsterComponent>} can be used to fill in the monster name.

{c:<TileComponent>} can be used to fill in the tile name.

{c:<EventComponent>} can be used to the selected hero (through manual selection or rnd:hero), only shows first hero.

This markup can be used as well as the symbols listed here.

<sectionname>.button<num>

button text to display for the event. button1 is the first button in the list. If one or more buttons do not fit in the standard size button size is increased and buttons are moved to the centre. Can use symbols. If there are 2 buttons and they are "Pass" and "Fail" they will be shown in green and red. {var:<Var>} can be used to fill in a Var value.

{c:<QItemComponent>} can be used to fill in the selected item name.

{c:<SpawnComponent>} can be used to fill in the selected monster name.

{c:<CustomMonsterComponent>} can be used to fill in the monster name.

{c:<TileComponent>} can be used to fill in the tile name.

{c:<EventComponent>} can be used to the selected hero (through manual selection or rnd:hero), only shows first hero.

Back to QuestIniDetails.

Clone this wiki locally