GSE 2.1 - Target=true Replacement Options - Feedback needed.

Target=true wasn’t working so it was fixed. It used a potential fault in securecmdparse that was returning the target to the sandbox. The bad news is that Blozzard fixed this and it’s now a blocked action. I need to remove the option from GSE as if it’s on it stops the macro from executing. So 2.0.13 will be released to remove that chunk of code.

It still leVes a situation that we need to be able to reset a macro while it is running. Macros run in a small sandbox. What that means is that while Lua the language mods are written in and Blizzards API is extensive, what a macro has access to is limited to a small portion of that. Macros can play with anything in the sandbox but they can’t use anything outside it.

What is in the sandpit though is the following:

IsRightAltKeyDown(), IsLeftAltKeyDown(), IsAltKeyDown() : return 1 if the relevant key is held down.

IsRightControlKeyDown(), IsLeftControlKeyDown(), IsControlKeyDown() : return 1 if the relevant key is held down.

IsRightShiftKeyDown(), IsLeftShiftKeyDown(), IsShiftKeyDown() : return 1 if the relevant key is held down.

IsModifierKeyDown() : returns 1 if any alt, control or shift key is held down.

IsModifiedClick(“modifierType”) : returns 1 if the associated modifier is held down.

GetMouseButtonClicked() : returns the mouse button responsible for the hardware click.

What I can do to reset a macro is give you options where you could use alt or shift or control to reset. I could also look at Right Click as an alternative. This will take time so will be the 2.1 release. I had deferred some GUI work for that release as well so it kinda makes sense.

What I do need though is some input. What out of the above would be useful?

To be clear, macros would not reset between combats (or does this only affect target switching?) without some sort of modifier being present for the first keypress?

My preference would be to check for whatever right-sided modifier is depressed. Perhaps provide options in the config to allow the user to decide which of Shift, Control, or Alt to use?

To be clear - this only affects the in combat target Reset. Eg you were attacking target 1 and switched to target 2, the macro would reset to step 1 if you had target=true in the macro.

Out of combat resets were not affected.

I would rather prefer a right-click Option, putting a reset=target on a mod key would mess up a lot of macros but that’s just my 2cent.

How would this be different than just using something like this which is supported now:
/cast [modifier:alt] Arcane Barrage

Hi Patronblade

This doesn’t replace that but you wouldn’t be able to use the same mod to do two thing a. You wouldn’t be able to use alt to reset the macro and a [mod:alt] in the same macro.

Wouldn’t it be the most fluid with a mouse click? As in when I click on a new target with the mouse.
just a shame it could not be integrated with tab targeting. that way the reset function is the same as target switching.

Yes but a generic mouse click will behave the same way as a tab target. That event won’t break into the macros sandbox. Even two macros can’t see each other to interrogate where they are at.

The thing that I might be able to identify is the mouse click on the macro.

You wouldn’t be able to use alt to reset the macro and a [mod:alt] in the same macro.

That’s what I assumed, thanks for Clearing that up!
What about a Option to put that in the keybindings, so People could choose weither they choose a mouse button or some different key, or would that be too complicated?

BTW thanks a lot TL !

I would prefer a right button mouse click tbh, what are the other GUI improvements in the works?

Being able to resize the editor and have things adjust in size

So basically you are looking for a modifier key to “reset” the Macro and tab target to next closest enemy? Since I use ALT as a modifier in my macros, I am not against it but I would prefer to have a want to manage the behavior of the modifier so I could still use it to cast certain abilities if I want. Would be great for aiding the spread of Multi-dots.

I’ve been using reset=target to reset a macro during combat. It’s easy enough when there are multiple targets, and if there is one you can always just hit ESC to un-target the enemy, and then continue with the macro to target it again, resetting the macro.

Does this target=true change impact this?

Reset=target only works for the current line of a castsequence. If you have a 5 line macro and there are two castsequences in it only the current castsequence will reset. It also won’t reset Internal Loops or revert to PreMacro. Target=true used to be able to do that.

This is not about changing reset=true on a castsequence. That function is a Blizzard one. This is about giving people a way to reset the entire GSE sequence while in combat. Target=true did for 4 weeks when you swapped targets. It was able to identify the change in targets and reset the macro. That ability is now blocked so need to come up with something else and it looks like a mod of some sort might be possible.

I forgot to ask another important question. With the original GS there was a ton of boilerplate code that everyone put into every macro = eg the code to hide UI errors. So should this option be per macro or per user. Do you expect to set it once and have it work for all macros the same way or would you want it set at the macro level? If its at the macro level should this option export with the macro?

Im thinking that at the macro level there is a lot of GUI code that needs to fit in there somewhere and how to make it clean.

/castsequence [combat] reset=target/shift Moonfire, Sunfire, null
is what your refering to? I switch from target to target or hold down shift for recast on same mob. but i noticed when i placed it in priority so it always resets on target swap. Is this going to change

Going to take a chunk out of a random macro from the forum:

    [1] = {
      StepFunction = "Priority",
      KeyPress={
        "/targetenemy  [noharm][dead]",
      },
      PreMacro={
      },
        "/cast Avenger's Shield",
        "/castsequence  reset=true  Consecration, Consecration, Judgement, Consecration",
        "/cast [combat] Seraphim",
        "/castsequence  reset=6  Judgment",
        "/castsequence  reset=14  Shield of the Righteous",
        "/cast !Consecration",
        "/cast Avenger's Shield",
        "/cast Judgment",
        "/cast Light of the Protector",
        "/cast !Blessed Hammer",
      PostMacro={
        "/cast [combat] Eye of Tyr",
      },
      KeyRelease={
        "/startattack",
      },
    },

Ok line 9 has reset=target on it. The way this statement works is that if you are at line 9 of your macro and you change targets it will reset. But only line 9 will reset. It will move on to line 10 as per normal. If you are line 11 and you change targets it wont reset line 9. This has been the behaviour up until GSE2. In the beginning of patch 7.1.5 you could add Target=true to the beginning of your macro up there with StepFunction and when you changed targets it would reset the entire macro. If you were at line 7 the next line would be line 1. You may be 3 of 8 runs through priority and it would go back to 1, 12, 123 etc.

Progress Update:

I created a seperate branch to GSE on GitHub and started work on this. The good news is that within the macro Sandbox I can detect all these options.

Right alt key false
Left alt key true
Any alt key true
Right ctrl key false
Left ctrl key false
Any ctrl key false
Right shft key false
Left shft key false
Any shft key false
Any mod key true
GetMouseButtonClicked() LeftButton
Right alt key false
Left alt key true
Any alt key true
Right ctrl key false
Left ctrl key false
Any ctrl key false
Right shft key false
Left shft key false
Any shft key false
Any mod key true
GetMouseButtonClicked() RightButton
Right alt key false
Left alt key false
Any alt key false
Right ctrl key false
Left ctrl key false
Any ctrl key false
Right shft key true
Left shft key false
Any shft key true
Any mod key true
GetMouseButtonClicked() RightButton
Right alt key false
Left alt key false
Any alt key false
Right ctrl key true
Left ctrl key false
Any ctrl key true
Right shft key false
Left shft key false
Any shft key false
Any mod key true
GetMouseButtonClicked() MiddleButton

in /macros each macro needs a macro that looks like

#showtooltip
/click [button:2] SAM_Ret RightButton; [button:3] SAM_Ret MiddleButton; [button:4] SAM_Ret Button4; [button:5] SAM_Ret Button5; SAM_Ret

Now just got to figure out how to configure those options.

I forgot to ask another important question. With the original GS there was a ton of boilerplate code that everyone put into every macro = eg the code to hide UI errors. So should this option be per macro or per user. Do you expect to set it once and have it work for all macros the same way or would you want it set at the macro level? If its at the macro level should this option export with the macro?

Im thinking that at the macro level there is a lot of GUI code that needs to fit in there somewhere and how to make it clean.

I would prefer to have it in the options per user, so I can concentrate on the essentials in my macros.

Tacolibre wrote:

Reset=target

/castsequence [combat] reset=target/shift Moonfire, Sunfire, null
is what your refering to? I switch from target to target or hold down shift for recast on same mob. but i noticed when i placed it in priority so it always resets on target swap. Is this going to change

TL is referring to the Line

Target=true
in e.g. his Ret macro that resets the whole macro and not a single castsequence.
[2] = {
StepFunction = "Priority",
Target=true,
Combat=true,
Trinket1=false,
Trinket2=false,
Ring1=false,
Ring2=false,
KeyPress={
/targetenemy [noharm][dead]",
},
"/cast [talent:5/1] Justicar's Vengeance; [talent:5/2]Eye for an Eye",
"/cast Templar's Verdict",
"/cast Judgment",
"/cast Blade of Justice",
"/cast Crusader Strike",

Got this to work. There will be a 2.1 alpha out later this week.

From this screenshot Right Clicking the Macro Icon on the actionbar with the Alt key down will reset the macro.

It works account wide. Whatever combination you put in there will reset the GSE execution of thge macro back to Premacro line 1.