[Solved] How do I do this in GSE?


I am new to GSE and while I’ve gone through the intro video as well as the documentation, I am stuck doing simple things in GSE.

I have the below standard macro for a rogue:

/use [nomod,stealth]Shadowstrike
/use [spec:1,nomod]Mutilate
/use [spec:2,nomod]Sinister Strike
/use [spec:3,nomod]Backstab
/use [spec:1,mod:shift]Vendetta
/use [spec:2,mod:shift]Adrenaline Rush
/use [mod:ctrl]Crimson Vial

Here is the Raw template:

    ["Variables"] = {
    ["Actions"] = {
        [1] = {
            [1] = "/use [nomod,stealth]  Shadowstrike",
            [2] = "/use [spec:1,nomod]  Mutilate",
            [3] = "/use [spec:2,nomod]  Sinister Strike",
            [4] = "/use [spec:3,nomod]  Backstab",
            [5] = "/use [spec:1,mod:shift]  Vendetta",
            [6] = "/use [spec:2,mod:shift]  Adrenaline Rush",
            [7] = "/use [mod:ctrl]  Crimson Vial",
            [8] = "/use [mod:alt]  Deadly Poison",
            ["Type"] = "Action"
    ["InbuiltVariables"] = {

This takes 236/255 characters. If I try to add /use [mod:alt]Deadly Poison, it would be over 255 characters long. I am trying to leverage GSE to implement such macro.

This gets converted into the below, although I’m not trying to use clicks:

/click [button:2] ROGUE_D1 RightButton; [button:3] ROGUE_D1 MiddleButton; [button:4] ROGUE_D1 Button4; [button:5] ROGUE_D1 Button5; ROGUE_D1

I tried both having a simple “Action” block and putting everything there, as well as trying out with different blocks of type “Action” to recreate the above macro.

What I’m looking to make is a macro for my class that would morph based on specialization. Problem is, 255 characters are not enough to cover all of that.

An example would be, for pressing 1, I would like to have the following macro:

/use [nomod,stealth] Shadowstrike
/use [spec:1,nomod] Mutilate
/use [spec:2,nomod] Sinister Strike
/use [spec:3,nomod] Backstab
/use [spec:1,mod:shift] Vendetta
/use [spec:2,mod:shift] Adrenaline Rush
/use [mod:ctrl] Crimson Vial
/use [mod:alt] Deadly Poison

For pressing 2, the following:

/use [spec:1,nomod] Garrote
/use [spec:2,nomod] Pistol Shot
/use [spec:3,nomod] Rupture
/use [spec:1,talent:6/3,mod:shift] Exsanguinate
/use [spec:2,mod:shift] Dreadblades
/use [spec:3,mod:shift] Shadow Blades
/use [mod:ctrl] Cloak of Shadows
/use [mod:alt] Crippling Poison

As you can see, these are longer than 255 characters so they wouldn’t fit in the normal macro dialog. I simply wish to implement such thing in GSE, leveraging as much as possible the GSE functionalities but I seem to be lost in the multitude of options and can’t make it work.

How do I do this in GSE? Is there no such thing as a simple block that would recreate the macro I’m using above?

Another thing is the changing of icons. In the regular macros interface, I add #showtooltip and the icon gets changed as soon as I press the modifier keys. In GSE, I need to press the button for the icon to change. Is there no way to have the icon changed as soon as I press the modifier key?

Please help.

you cant do this. 1 action per block/click (unless its not on a gcd)
you can try using the variables at the bottom to add more than 1 per click, per block, but depending on the ability/CD it wont work in most cases.

for each “ability/spell” in your list, thats on the GCD, will need its own block, its own click/button press.

So you mean that for each line in my macro I need to place it in an action block separately? Do I include #showtooltip? Also, what kind of action block should that be?

What about the icon showing up after I activate the ability and not when I press the modifier key?

In GSE there are multiple ways to do the. You can use functions and if blocks to determine your spec and then output the spec specific version of that.

You could also chain your mods to save characters using a ; Just remember that the mod evaluation order for this is left to right.

An action block is simply that - 1action. The other blocks are containers to arrange action blocks. In GSE you create a template from which GSE creates a macro. You are not directly creating a macro. The Compiled Template button will shoes you the actual macro it creates.

#showtooltip has no meaning or use in GSE. GSE evaluated the next action block and gets the icon to show from its contents.

GSE also has a difference between /use and /cast. They do different things in GSE. You need /cast for spells rather than /use

Seems way too complicated than it should be. Thanks for pointing this out. I’ll simply look for another addon that can actually do macros instead of GSE.

This GSE Addon might be underrated, but it’s missing proper documentation/tutorials to explain how it works and the reasoning behind this.

No one reads the documentation Home · TimothyLuke/GSE-Advanced-Macro-Compiler Wiki · GitHub

Every change and the logic behind it is also located at Issues · TimothyLuke/GSE-Advanced-Macro-Compiler · GitHub

1 Like

Thank you for the links. I am aware of those pages, however, the documentation is not updated. For example, in the latest build there are no more KeyPress, PreMacro, KeyRelease and PostMacro.

Besides that, there are insufficient examples on how these missing config items really work. You mentioned If statements but that require a variable (Haven’t seen an example of how to assign the value which represents my specialization to a variable in GSE. There’s no reference to some API doc which contain these variables). I could never figure out where KeyPress, PreMacro, KeyRelease and PostMacro can be useful for, again, need way more examples with logic behind why X chose ability Y to go in place Z, being the Nth item in the list.

Another example, in the GSE3 section there is ~~KeyPress~~ and ~~KeyRelease~~ as variables with the value holding the macros. Nowhere does it say that in-game, when you include them in your main block, your character will actually do a /say ~~KeyPress~~ and /say ~~KeyRelease~~ respectively.

99% of the current examples don’t really explain the actual differences between /click, /use and /cast and are about doing a sequence of abilities by single-pressing one key and waiting for the macro to execute all listed spells in a particular order. While this looks powerful in theory, I find it very difficult to play like this and instead wish to create macros similar to the one I mentioned in my original post but none of the examples have sufficient information about what I’m looking to achieve.

I would gladly accept examples and more info.

If you put a variable into a block and the variable doesn’t exist it will say the variable name.

The GSE3 from a GSE2 users perspective covers this with a ton more detail and more including the change from those previous fields to Loop Blocks for PreMacro and PostMacro and the key two simply being variables.

This site has examples however they are built around expected failure. Or you are spamming your button and it expects that lines are being skipped and frankly 90% and throw and Hope macros. Throw everything at the server and Hope something happens. Frankly there is a lot of garbage. GSE isn’t this sites mod. It is a mod used by this site.

In my case this isn’t how I play so my macros don’t work like this. At the end of the day one action block = one click. GSE’s greatest strength and weakness is in order for it to operate it can’t tell if something worked or not. This is a limitation of WoW’s rules around mods and botting. GSE simply moves to the next action each click.

Wows rules go further in that only the first GCD ability it finds in an action is executed. All other gcd abilities are ignored. It reads top down then left to right using WoW macro commands with the following caveats.

Macros have to be executed in the natural language of the client. In order to do this GSE stores the internal WoW spellID. /cast Judgment is stored as /cast 1245 internally where 1245 is the spellID for example. /use mana potion is stored as /use 1245 where it is the item id instead of the spellID. (these are not the real numbers).

Mods can be concatenated into a single command using an if then structure.

/cast [mod:alt] spell1; [spec:1] spell2; [talent:1/2] spell3; spell4

Is interpreted by WoW as if alt is down the cast spell1 else if spec 1 then cast spell2 else if talent1/2 then cast spell4 otherwise cast spell4. None of this is defined by GSE but by WoW macro commands.

/click is to click a WoW interface button. Each GSE macro is in fact a hidden button which has a macro stub in /macro that clicks the button. /click … clicks buttons.

1 Like

Using the functions in WoW’s API you ca. also combine that with If blocks in GsE to create if/then scenarios for things like specs and talents.

API documentation: World of Warcraft API - Wowpedia - Your wiki guide to the World of Warcraft

WoW macro commands: Macro commands - Wowpedia - Your wiki guide to the World of Warcraft

1 Like

Thank you very much for the detailed explanation and the API links, @TimothyLuke . I still have lack of clarity on the following GSE functionality:

Here is an Action Block for my Druid in GSE:

/use [spec:1,nomod]  Moonfire
/use [spec:2,nomod]  Shred

Given the above, do I really need the ~~KeyPress~~/~~KeyRelease~~? It seems to be outputting this to chat, like doing a /say ~~KeyRelease~~ instead of being silent. I found them in the examples and this is why I’ve included them in the action block. I will explain further below what I am trying to do:

I have the second Action Block:

/use [spec:1,mod:shift]  Celestial Alignment
/use [spec:2,mod:shift]  Berserk

These 2 blocks are on the same macro. I hit “Create Icon”, to create the icon in my /m interface, then drag and drop it into the action bar.

Here is what happens when I press the modifier keys (Click image below for video on IMGUR):


Have a look at the other buttons from my action bar. They change immediately when I press the modifier key. The GSE macro is bound to Key 1, while on Key 2 I’ve bound the same macro, but made in WoW’s own macro UI:

As you might see, the icon used there is the question mark ?, so I let the #showtooltip do the job of switching the icon based on modifier key.

I can see that functionally, both macros work as expected, except that the GSE won’t switch the icon until the spell is cast/finished casting/button already pressed. I am looking for a way to have the spell icon show up as soon as I hit the modifier key and before pressing the action bar key, just like the other buttons in my Action Bar do it.

I am NOT looking to make the macro shorter or “optimized”. I am more than happy to have the macro as verbose as possible for readability purposes and I am NOT looking to make a /castsequence out of this. I simply want the icons to be responsive as soon as I hit the modifier keys AND BEFORE I hit the actual Action Bar key (in the above example, it’s 1). There is already an addon that works like this and it’s called Mega Macro, but it’s buggy and sometimes I need to reload the UI several times to get my macros working, so I’d like to switch my macros to GSE, but this thing with the icons is driving me crazy. If another addon can handle the icon changes, I’m thinking GSE can too, if not, I’m happy to open an issue on GirHub about this.

What am I missing here? Removing ~~KeyPress~~/~~KeyRelease~~ simply removes the chat output of these string values.

1 Like

KeyPress and KeyRelease are variables. If they are blank or missing then your macro will spam the to chat to tell you to either update the variable or to remove the reference. You will find variables at the bottom of the edit screen.

#showtooltip does nothing within GSE except potentially hang and crash your UI at the worst possible time.

As to changing the icon when you hit the mod, this is available to Blizzards code but a mod like GSE is unable to replicate that capability in combat and still continue to be able to cast spells. The trade off here is do you want GSE to update the icon or do you want it to ask WoW to execute your macro - it can’t do both with Blizzards anti bot code.


Thanks. Regarding KeyPress and KeyRelease, what kind of values should they have? Are they boolean variables or do they accept values such as a keyboard key value like the ones listed here?

For changing the icon, I need that to track cooldowns, as casted spells replace current icon, thus, losing visibility on the action bar whether or not the previous spell is ready. I am aware there are other alternatives to tracking cooldowns, but I was looking for something simple and avoid the extra addon for it.

I dont know what that link is.

I would suggest googling GSE Variables or reading the Wiki in particular Understanding GSE3 from a GSE2 Users Perspective · TimothyLuke/GSE-Advanced-Macro-Compiler Wiki · GitHub and GSE3.0 Block Specification · TimothyLuke/GSE-Advanced-Macro-Compiler Wiki · GitHub as the variable can be a string, number, boolean or a function returning a string, boolean or a number depending on how you are planning to sue the variable.

As for visibility I still have my individual buttons on my bars in case i want to use and ability out of order or to check the cooldown. GSE isn’t able to provide a solution for your specific use case.


I could never get the if block to work. But more importantly are the KeyRelease and KeyPress variables required?

KeyPress and KeyRelease are just names of variables. They are only required if 1) you have a meaning for them and 2) you put them in places where you want to use them. In GSE2 they had meaning, in GSE3 they could just as easily be U, D, Prefix, Suffix, Bobthebuilder or whatever other name I care to use.

If blocks are only calculate OuTSIDE of combat. If you are trying to cast something when you have x combo points this will never work. You use if blocks for things like an I in specific covenant or am I targetting a boss or am I in x raid.

1 Like