MQ2React
MQ2React | |
---|---|
Condition/Action execution plugin (i.e., the if-then part of MQ2Melee without the Melee) |
Authors | drwhomphd, Knightly |
---|---|
Software type | Plugin |
Config file | MQ2React.yaml
|
Maintained | Yes and supported |
Links |
🏠Resource (review) |
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 mq2 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
Syntax | Description |
---|---|
/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.
See also
Top-Level Object(s)
TLOs added by MQ2React:
TLO | Data Type(s) | Description |
---|---|---|
React | React | Holds the React data type, which is far more interesting. |
Forms. Typical usage, /echo ${TLO}
Type | TLO | Description |
---|---|---|
React | React | Returns the word "React" if loaded. |
Members. More may be available if inherited. Typical usage, /echo ${TLO.Member}
TLO | Data Type | Return Type | Member | Description |
---|---|---|---|---|
React | React | bool | Active | Returns true if processing reactions is on. |
Enabled[nickname] | Return true if the react is enabled for the currect character or false if it is disabled | |||
string | Action[nickname] | Return the action from the react with "nickname" | ||
Condition[nickname] | Returns the condition from the react with "nickname" | |||
Global[globalnickname] | Returns the condition from the global condition with 'globalnickname' |