Skip to content

Understanding GSE3 from a GSE2 Users Perspective

Timothy Minahan edited this page Jun 21, 2021 · 4 revisions

GSE2 has been in use for a number of years and people have over time gotten their head around it. One of the great strengths was that there was a lot of hidden behind the scene things done by GSE that both were not obvious and black magic. There were a number of one size fits all decisions that mostly suited the way people played. With the release of the classics and changes to multiboxing and simply people wanting to be able to use a macro to get closer to their simmed DPS, it just couldn't be achieved with the current design. I wanted to walk through a rather involved macro to highlight how GSE3 works.

Performance-wise we were right on the edge of what GSE could handle as every action was compiled in combat adding to combat lag that people were experiencing. This lag wasn't sustainable. With GSE 2.6 we introduce macro variables and was able to offload some of that processing to Out of Combat time. GSE3 offloads all the computation stuff to out of combat time so that your macros performance uses less resources and is more responsive and accurate.

SAM_PROTGOD in GSE2

This macro is a sample maco that has been part of GSE for a while. Its one I use personally on a day to day basis.

It has A Premacro and PostMacro with the Sequence internally looping 3 times. It also has a KeyPress, A KeyRelease and some default use options specified.

What was occurring with this

At an execution level the macro would start at line one of the PreMacro with the cast of Avenger's Shield. Now while that is what it looks like that isn't what has happening. Added to this line was the KeyPress, KeyRelease, the Use options at the bottom of the macro and also a number of built in things to suppress errors from the Options. What this worked out to be in my case was a command that looked like:

/run sfx=GetCVar("Sound_EnableSFX")
/run ers=GetCVar("Sound_EnableErrorSpeech");
/console Sound_EnableSFX 0
/console Sound_EnableErrorSpeech 0
/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Ardent Defender
/cast [nomod] Avenger's Shield
/use [@focus] 14
/use [combat,@player,nochanneling] 13
/run SetCVar("Sound_EnableSFX",sfx);
/run SetCVar("Sound_EnableErrorSpeech",ers);

That was just the first click. All of that was compiled in combat and then sent to WoW to execute. It would start at the top of that stack and work down. It would attempt to execute the first GCD ability it could and then every other GCD ability after that would be ignored but it would move on to the end of the stack process non GCD abilities.

Next click it would attempt the next line:

/run sfx=GetCVar("Sound_EnableSFX")
/run ers=GetCVar("Sound_EnableErrorSpeech");
/console Sound_EnableSFX 0
/console Sound_EnableErrorSpeech 0
/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Ardent Defender
/cast [nomod] Shield of the Righteous
/use [@focus] 14
/use [combat,@player,nochanneling] 13
/run SetCVar("Sound_EnableSFX",sfx);
/run SetCVar("Sound_EnableErrorSpeech",ers);

It would then get to the first line of the sequence and do the same for it. It would then process the sequence box line by line using the Priority Step Function completing that cycle 3 times and then move onto the PostMacro then moving back to the PreMacro. It would recompile that action stack each click.

But what if you didn't want to execute that entire stack? That command stack is 402 characters long. There is almost a 300 character overhead each line and for a long castsequence your macro would break as it could get so long that it was truncating mid way through that stack. If it cut off in the middle of the Shield of the Righteous line because it was too long then your macro would start erroring.

Also PreMacro, PostMacro and Inner Loop was confusing for people and they made their own guesses on what it meant and did. I had someone telling me (the mod author and the guy who defined how these working in GSE) how the PostMacro and PreMacro didn't work the way I programmed them as someone had told them How it worked based on their guess. What if you wanted a couple of loops to work or wanted to put a loop inside a loop? You couldn't.

GSE3 Changes

GSE3 doesn't have a PreMacro, PostMacro, KeyPress and KeyRelease. Instead it reworks the entire way a macro is written. When you open up that same macro in GSE3. You will notice that its VERY different.

With those boxes gone instead is a thing called a Block. It has a number of icons for creating different Blocks and then some utility functions. This image shows the first two lines in what used to be the PreMacro of the macro. This is the important thing to make a connection with. If this macro didn't have a PreMacro, what would instead be shown here would be the blocks that cover the first few lines of the Sequence Box in GSE2.

This "Action" allows you to specify exactly what happens when you click this button. You have entire control over not only this line but the stack that makes up this line. KeyPress and KeyRelease have been converted into GSE Variables and inserted into their specific places in the action stack. The output of this stack is still the same as the first line as shown above but I could skip the entire KeyPress this stack by removing the line out of the stack. I could simply not even have a KeyPress or KeyRelease in my macro if I didn't want one.

If we scroll down a bit we come to the commands in what was the Sequence area in GSE2. This is a different type of block called a Loop. It follows the Priority step function and repeats 3 times. It in itself has a number of blocks and these block as indented to show that they are part of the loop block. If we added another loop in it would be further indented again.

To reorder the blocks at a level you just click them up or down. To add a Block at the end of this level there are icons to do that. The X deletes this block from the macro. Be careful though if you delete a loop you will delete the entire loop and the blocks inside it.

As we continue to scroll we get to the variable section. These operate as they did with GSE2 but they are attached to this version of the macro.

Right at the end we have the Use and Reset short-cuts. Currently, these still apply to each action but the plan is as we integrate through the development of GSE3 that you will have control of these at the Block level.

Advanced GSE3 things

Raw Edit

At the top of each macro version is a Raw Edit button. This button allows you to edit the entire macro directly via a text editor.

Note: this is for people who understand how Lua tables work and understand the limits that copy and pasting have with relation to quotes. This is not forgiving. The faintest mistake here can crash the game.

Changes to Sequence Debugger

The Sequence Debugger (/gse debug) has the ability to show the full block that was attempted to be executed each click. This setting is in GSE's Options.

Block Types

A full list of Block types is available here.