• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver
MQ2React

Release MQ2React

Joined
Oct 4, 2019
RedCents
7,843¢
Redbot submitted a new resource:

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

MQ2React

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...

Read more about this resource...
 
Saw this mentioned the other day, was hoping we wouldn't need to wait long for it!

Many thanks!
 
Although.. YAML? Seems like cracking a nut with a sledgehammer. Was there a pressing reason to diverge from the standard ini file format? New users to YAML will often get the syntax wrong as it's unlike anything else they are used to; indenting/whitespace being the main culprit, especially if they are not using a yaml aware code editor.

It would be worth putting in some examples for folks on here, most of which are not programmers and will not be familiar with it. I suspect there will be plenty of copy and pasting of existing commands into the file (I virtually never use in game commands with plugins for configuration). Also, working examples give people something to work with.
 
Although.. YAML? Seems like cracking a nut with a sledgehammer. Was there a pressing reason to diverge from the standard ini file format? New users to YAML will often get the syntax wrong as it's unlike anything else they are used to; indenting/whitespace being the main culprit, especially if they are not using a yaml aware code editor.

It was considerably easier for me to design the plugin with the way yaml allowed me to construct the config file. I also did it to future proof things as mq2 progresses.

It would be worth putting in some examples for folks on here, most of which are not programmers and will not be familiar with it. I suspect there will be plenty of copy and pasting of existing commands into the file (I virtually never use in game commands with plugins for configuration). Also, working examples give people something to work with.

Agreed. I wanted one example available to create the default plugin configuration but figured further work can be done on the resource in this forum as folks work up good reacts. I was going to try and keep a community editable post so folks could add their stuff. My intention is that the vast majority of editing goes via cutting and pasting into the file. This will lead to some bug fixes in this plugin due to malconstructed config files I bet. The slash commands are there for easy testing and insertion.

Update: Added some additional information to the resource release. We'll be working some bugs out for the next few weeks (my first plugin after all) as more wide spread testing occurs. Also made a note regarding my statement above in terms of having more examples.

Update 2: Also, while I would have liked to do all the above earlier, it seemed very difficult to wrangle up folks to test on Test or live without getting something stable (though with kinks) in the VV build first.
 
Last edited:
What editor are people using for YAML files?

I'm used to notepad++, can that be used?
 
And I'll probably change the file extension after must consternation from other devs so that it'll auto syntax highlight right.

I used notepad and notepad++ to edit while I was testing. Note that right now if you scew up the plugin will probably crash so you'll know right away if you've done a good job. That'll be fixed in the next release. I was dragging my feet to avoid having to rewrite a bunch of stuff after a code review but now have a reasonable template on how other plugins are doing it so I can maintain consistent style.
 
It would be nice to build a library of the different uses, like the kiss ini library.

Let's start here https://www.redguides.com/community/threads/mq2-react-collection.72469/ and if there's enough engagement I'm sure we can ask RedBot to help grow this organically.

I'm certainly curious to see how many reacts can be enabled until client processing just decides to roll over. That may also highlight the need to change how reacts are processed or how often. I had a number of discussions with Knightly during the writing of this plugin about design trade-offs. My view is right now the big locked down design is the config format. That should be scalable and readable in its current form (and changing config will break a lot of work folks would do). I think design elements that could be tweaked are the slash command interface and how the plugin queues and executes reactions (this would require no changes on behalf of the users but potentially lead to increased reliability of execution in large configs). There's things here that I just couldn't test by myself or by dangling folks Test server builds out of the proverbial trunk of my proverbial car.
 
Looking for assistance if possible. I've tried a few times unsuccessfully to convert commands like the following but I crashed when I tried. Anyone able to convert one to show me how it would look in the new format? I will keep playing with it, just frustrated with crashing so I deleted what I did and unloaded for now.. will reattack later when not so beat.

holyshit3=/if (${Spell[Falcon Strike].Stacks} && !${Me.Buff[Falcon Strike].ID}) /casting "Aurora, the Heartwood Blade"
holyshit4=/if (${Spell[Haste].Stacks} && !${Me.Buff[Haste].ID}) /casting "Dark Cloak of the Sky"
holyshit5=/if (${Target.PctHPs}<99 && ${Target.Named} && ${Me.AltAbilityReady[Empowered Blades]}) /casting "Empowered Blades" alt
holyshit6=/if (${Target.PctHPs}<99 && ${Target.Named} && ${Me.CombatAbilityReady[Arbor Stalker's Discipline]}) /disc Arbor Stalker's Discipline
 
Looking for assistance if possible. I've tried a few times unsuccessfully to convert commands like the following but I crashed when I tried. Anyone able to convert one to show me how it would look in the new format? I will keep playing with it, just frustrated with crashing so I deleted what I did and unloaded for now.. will reattack later when not so beat.

holyshit3=/if (${Spell[Falcon Strike].Stacks} && !${Me.Buff[Falcon Strike].ID}) /casting "Aurora, the Heartwood Blade"
holyshit4=/if (${Spell[Haste].Stacks} && !${Me.Buff[Haste].ID}) /casting "Dark Cloak of the Sky"
holyshit5=/if (${Target.PctHPs}<99 && ${Target.Named} && ${Me.AltAbilityReady[Empowered Blades]}) /casting "Empowered Blades" alt
holyshit6=/if (${Target.PctHPs}<99 && ${Target.Named} && ${Me.CombatAbilityReady[Arbor Stalker's Discipline]}) /disc Arbor Stalker's Discipline

Try the following -- no guarantees as I can't test it. Next update to mq2react will just start yelling at you if it can't parse the YAML versus crash. Note that YAML is white space sensitive so you gotta get the tabs and spaces right.

YAML:
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.Buff[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
  ShrinkPet:
    action: /useitem Curious Companion Compactor
    condition: "${Pet.Height} > 2.04"
  Thirsty:
    action: /useitem Warm Milk Dispenser
    condition: >-
      ${FindItemCount[=Warm Milk]} < 5 && ${FindItemCount[Warm Milk Dispenser]}
      == 1

@Jetanroth -- the above should work as an example of the parts that matter.

The configuration file is split so that no one ever has to post the portion with their server and character names.

(Updated after finding an issue in the globals -- btw it'll reload fine if you click 'retry' at the crash screen -- next version will at least yell at you on the parser.)

Second update:
YAML:
  ArborStrike:
    action: "/disc Arbor Stalker's Discipline"
    condition: >-
      ${Target.PctHPs}<99 && ${Target.Named} && ${Me.CombatAbilityReady[Arbor
      Stalker's Discipline]}

UPDATE: The above examples with quotes will work with the latest mq2react. I have not tested any actions or conditions with commas.
 
Last edited:
So we're going to have some fun stuff coming down the pipe here soon. I've fixed the mini-yaml library so that it properly handles lines with quotes in them. This means the next mq2react release should handle actions such as Arbor Stalker's and Huntsman's Ethereal Quiver. The big change though is you're going to need to cut and paste all your reacts into the new .yaml file that will be created from the .ini file that was used original. Upside: your text editor of choice will syntax highlight. Finally, actions are going to be a bit more aggressive in their execution. Upside: you probably won't over summon items as often; Downside: you'll want to improve your conditions to gate from over casting or casting when other things are happening. Thankfully you can easily do that by setting up a global and using the React Global TLO.
 
Everyone!

With the latest VV update, you may notice mq2react is eerily quiet. The configuration file is now mq2react.yaml. Just cut and paste from the ini file (and delete the ini) and all will be right again. See my prior post.

AS OF 06/14/2020 CONFIGURATION FILE IS NOW: MQ2React.yaml
 
Last edited:
Redbot updated MQ2React with a new update entry:

June updates

Replaced the .ini file with a .yaml. Created a SaveConfig function to wrap the serialize interface with an exception to avoid crashing on parse errors. Also wrapped serialize in an exception. Switched individual calls to parse and serialize throughout the slash functions to these load and save functions. Added single quotes to the list of tokens that mini-yaml thinks should be double quoted. Changed save and load functions so that they didn't take an argument and instead leverage the...

Read the rest of this update entry...
 
Although.. YAML? Seems like cracking a nut with a sledgehammer. Was there a pressing reason to diverge from the standard ini file format? New users to YAML will often get the syntax wrong as it's unlike anything else they are used to; indenting/whitespace being the main culprit, especially if they are not using a yaml aware code editor.

It would be worth putting in some examples for folks on here, most of which are not programmers and will not be familiar with it. I suspect there will be plenty of copy and pasting of existing commands into the file (I virtually never use in game commands with plugins for configuration). Also, working examples give people something to work with.

I have to agree, this is a nightmare to unleash on the standard non coder MQ2 user.
 
I have to agree, this is a nightmare to unleash on the standard non coder MQ2 user.

Thus the creation of: https://www.redguides.com/community/threads/mq2-react-collection.72469/ (which is slowly growing including tips on how to write reacts). This should get most folks started and for the most part is is expected a lot of initial work will be copy & paste just like holys/downs are for mq2melee.

To be honest I don't think the 'bar to entry' will be any higher with the YAML as much as the required logic work, ability to leverage MQ2 syntax, and ability to lookup TLOs. I think those are going to be the bigger challenges (and mq2react isn't designed to fix that) but challenges that already exist with mq2melee.
 
Last edited:
why the change to yaml? if change for upside then yes, i'll eat the learning curve, if change just for a different flavour of the same thing, then not so much


Also, is it a global yaml config file ? or is it per character ?

I am thinking of using MQ2React to fire my Rage of Rolfron (COP4) clickies on 3 characters that run CWTN plugins (zerks and BST). While they will check if they have the buff before clicking, they are all attempting to fire it at the same time. I tried to adjust their engage percentages to stagger the triggering of them but it didn't work.

Can I setup MQ2React conditions to click the Rage of Rolfrons at different ${Target.PctHPs} for different characters ?
 
why the change to yaml?
It's always been yaml; originally was just with the 'ini' extension. The predominant reason is it is CONSIDERABLY easier to add and edit configurations than an ini format especially for the way mq2react is designed. Second, it allowed for a considerably cleaner implementation of the mq2react plugin. Doing what I did with the old ini format just would not work well and would not scale well without some really gnarly looking plugin code. YAML will also be a core configuration syntax for version versions of mq2, or so I hear, so I'm trying to get ahead of the curve.

Also, is it a global yaml config file ?

Global across all your characters with the ability to /react enable <react name> and disable per character.

Can I setup MQ2React conditions to click the Rage of Rolfrons at different ${Target.PctHPs} for different characters ?

Yes. There's multiple ways of doing is that I can think of so it'll be up to how you want to implement it.
 
how to get the toon to use the wand of imperceptibility (shrink) after zoning or detecing a size <2.04

thanks for the help!
 
/if (${Me.Height}>=1) /useitem Wand of Imperceptibility

this works in the commandline. why not in a condition? anyone can help me out on this please?
 
/if (${Me.Height}>=1) /useitem Wand of Imperceptibility

this works in the commandline. why not in a condition? anyone can help me out on this please?

As long as you have all the white space correct (keep in mind, YAML is white space sensitive so you need the tabs and spaces and stuff to be correct):

Code:
reacts:
  ShrinkPlayer:
    action: /useitem Wand of Imperceptibility
    condition: ${Me.Height} >= 1 && ${FindItemCount[Wand of Imperceptibility]}

And then save it. Make sure on whatever character you want to use it on you remember to do a:
/react enable ShrinkPlayer

Sorry, I don't have that wand so I can't test out the react, but the above should work presuming you have the formatting correct in your mq2react yaml file.
 
Question? When I am making changes to the yaml file and do a reload. if there is a error with the one of my reacts it reset the whole file back to a template. I have lost work multiple times to this. Is there a way to stop this?
 
Question? When I am making changes to the yaml file and do a reload. if there is a error with the one of my reacts it reset the whole file back to a template. I have lost work multiple times to this. Is there a way to stop this?

I'll need to mark this down as a bug and take a look. I have a suspicion from memory why it's writing the template and just need to add in an extra check that says: "Obviously if you fail parsing there was something there so even if you don't see it after parsing because of an error, don't write the default file." Should be an easy fix/test and I'll let Redbot know when it's updated. Before this wouldn't have been caught because the plugin would just crash if you had a bad file so I missed it on initial testing.

Optimal suggestion at the moment, keep a backup of your known good mq2react.yaml file.
 
Great example showing the usage of globals!
Could the plugin perhaps have a command added to add/edit globals
I have a script that figures out what to use on my WAR discs/aa then writes the mq2melee holy's.
With the mq2react yamI cannot do it from within eq/mq2, trying to avoid having to run a script generating an ini then run an external program that adds to the yaml from the ini, possible but tedious.

e.g
/react global WARCharge "Imperator's Charge"

Then I can use ${React.Global[WARCharge]} in the conditions etc
 
Sure. I'll toss it in as an issue. I need to make a minor fix for another bug as well.

UPDATE:
Code is in place for two new commands:
/react globaladd <nickname> <condition>
/react globalrem <nickname

Once I get a chance to test these and the bug my patch is attempting to solve, I'll push changes up to the repository and get a request in for the next VV rebuild.
 
Last edited:
Drwhom,

started using MQ2React. Couple of things
1) if I have a syntax error (that fails to parse) in my config file, the plugin creates a new ‘default’ config file, which overwrites the previous
2) the plugin is not very chatty, can I enable a verbose mode? If for example
** I issue a /react enable hungry statement, nothing is echoed in MQ2Chat.
** I issue a /react list, I think it returns ALL configured reacts, and not just the ones enabled for that character
3) On my SK I have summon food and summon water reacts, if I am hungry or thirsty respectively. If enabled, the processing load seems heavy, coz if I issue a come to me nav command or try to start a Kiss macro, I get a “you cannot use that command right now ....“ and it takes a couple of attempts before MQ2 can squeeze in the other KA / come to me commands. MQ2 behaved similarly when I had the same configured in MQ2Melee, and I was hoping for something different here in MQ2React. Other characters have the same react enabled (and admittedly I don’t drive from them with regularity) but don’t seem to be similarly affected.

Thanks in advance,

Hylander.
 
#1 -- Known bug & fixed in my development version. Need to test things out and get a push to redbot for live.
#2a -- I'll make a note and see if I can post a message in chat.
#2b -- Working as intended. It's meant to give you a list of all reacts available at the moment. (There's a potential we could add a couple hooks for enable/disable but my original intention was for most the editing to occur in the YAML file vs. the game)
#3 -- Reacts are triggered every 50 pulses or so. That's done to reduce load on the system. I plan to offer a configuration on how often they're checked in the future.
 
Last edited:
Release MQ2React

Users who are viewing this thread

Back
Top
Cart