Skip to content

MQ2React

MQ2React

Condition/Action execution plugin (i.e., the if-then part of MQ2Melee without the Melee)

Authors: drwhomphd, Knightly • Config: MQ2React.yaml

Resource Download Support Repo Quick Start

MQ2React is a plugin that allows users to define actions and conditions that define when to perform those actions. Conditions are defined in MQ2 Macro syntax and actions are mq commands. It's up to the user to make sure their defined conditionas and reactions do not conflict with one another; mq2react does no additional action deconfliction. This is similar to the "HolyShit" and "DownShit" behavior of MQ2Melee without the additional automation behavior that exists within the plugin. MQ2React also allows for complex conditions to be defined as global conditions and reused throughout multiple reacts, thus making reacts considerably easier to maintain and reuse.

Commands

/react [option] [<value>...]
Enable, disable, list, add and remove reactions.

Settings

MQ2React uses a yaml format for configuration. Upon initial execution, a default configuration file named MQ2React.yaml will be created with example reacts and an example global condition. The configuration file is case sensitive.

Examples

Due to their sensitivity to spaces and tabs, it's recommended you use a code editor for manually editing .yaml files, such as VS Code.

globals:
  GlobalExample: "${Me.CombatState.NotEqual[COMBAT]} && ${Me.PctHPs} <= 25"
  NotCasting: "!${Me.Casting.ID}"
reacts:
  DoHaste:
    action: /cast Dark Cloak of the Sky
    condition: "${Spell[Haste].Stacks} && !${Me.Song[Haste].ID} && ${React.Global[NotCasting]}"
  EmpoweredBlade:
    action: "/alt act ${Me.AltAbility[Empowered Blades].ID}"
    condition: >-
      ${Target.PctHPs}<99 && ${Target.Named} && ${Me.AltAbilityReady[Empowered
      Blades]}
  ExampleReact:
    action: >-
      /multiline ; /echo Default Example react Disables itself when you're
      at 100%HP and out of Combat ; /delay 5 ; /react disable ExampleReact
    condition: "${Me.PctHPs} == 100 && ${Me.CombatState.NotEqual[COMBAT]}"
  FalconStrike:
    action: "/cast Aurora, the Heartwood Blade"
    condition: >-
      ${Spell[Falcon Strike].Stacks} && !${Me.Buff[Falcon Strike].ID} &&
      ${React.Global[NotCasting]}
  Hungry:
    action: /useitem Fresh Cookie Dispenser
    condition: >-
      ${FindItemCount[=Fresh Cookie]} < 5 && ${FindItemCount[Fresh Cookie
      Dispenser]} == 1

More examples can be found in this thread.

Top-Level Objects

React

Holds the React data type, which is far more interesting.

DataTypes

React

Note: Members that return condition statements will be parsed automatically. These are most useful to provide shortcuts to complex conditions for macros like KissAssist.

Members

string Action[nickname]

Return the action from the react with "nickname"

string Condition[nickname]

Returns the condition from the react with "nickname"

bool Enabled[nickname]

Return true if the react is enabled for the currect character or false if it is disabled

string Global[globalnickname]

Returns the condition from the global condition with 'globalnickname'

bool Active

Returns true if processing reactions is on.