GSE3 Under the covers

In GSE A lot of the magic happens behind the scenes. With KeyPress and KeyRelease and Pre and PostMacro it is often not obvious what is occurring. This is one of the things with GSE3 that I am working on.

In GSE3 You don’t create a Macro that is executed. Instead, you create a “macro template” that is compiled into a macro that is executed. As such the internal ‘under the covers stuff’ has some significant changes. Long time users will recognise some of this for the others of you I hope it makes some sense.

For this post I am using the SAM_PROTGOD macro as an example. It currently looks like:

{
    ['Helplink'] = '',
    ['Talents'] = '1212312',
    ['ManualIntervention'] = true,
    ['Icon'] = '',
    ['MacroVersions'] = {
        [1] = {
            [1] = '/cast [nomod] 24275',
            [2] = '/cast [nomod] 20271',
            [3] = '/cast [nomod,combat] 26573',
            [4] = '/cast [nomod] 35395',
            [5] = '/cast [nomod,combat] 31935',
            [6] = '/cast [nomod] 35395',
            [7] = '/cast [nomod,combat] 31884',
            [8] = '/cast [nomod,@player,combat] 316958',
            [9] = '/cast [nomod] 20271',
            [10] = '/cast [nomod,combat] 26573',
            [11] = '/cast [nomod] 35395',
            [12] = '/cast [nomod,combat] 31935',
            ['LoopLimit'] = '3',
            ['Trinket1'] = true,
            ['Head'] = false,
            ['Neck'] = false,
            ['Belt'] = false,
            ['Ring1'] = false,
            ['Combat'] = true,
            ['KeyRelease'] = {
                [1] = '/use [@focus] 14'
            },
            ['KeyPress'] = {
                [1] = '/targetenemy [noharm][dead]',
                [2] = '/cast [mod:lctrl] 853',
                [3] = '/cast [mod:alt] 498'
            },
            ['Ring2'] = false,
            ['StepFunction'] = 'Sequential',
            ['PreMacro'] = {
                [1] = '/cast [nomod] 31935',
                [2] = '/cast [nomod] 53600'
            },
            ['PostMacro'] = {
                [1] = '/cast [nomod] 31935',
                [2] = '/cast [nomod] 35395'
            }
        }
    },
    ['GSEVersion'] = 2648,
    ['EnforceCompatability'] = true,
    ['Author'] = 'Bragna@turalyon',
    ['Default'] = 1,
    ['LastUpdated'] = '20210212215533',
    ['Help'] = 'Based on a BFA macro from Bragna@turalyon This is a simple Prot Macro',
    ['Variables'] = {
        
    },
    ['SpecID'] = 66,
    ['TOC'] = 90002,
    ['WeakAuras'] = {
        
    }
}

In GSE 3 this would instead look like:

{
    ['Macros'] = {
        [1] = {
            ['Variables'] = {
                ['KeyRelease'] = {
                    [1] = '/use [@focus] 14'
                },
                ['KeyPress'] = {
                    [1] = '/targetenemy [noharm][dead]',
                    [2] = '/cast [mod:lctrl] 853',
                    [3] = '/cast [mod:alt] 498'
                }
            },
            ['Actions'] = {
                [1] = {
                    [1] = '~~KeyPress~~',
                    [2] = '/cast [nomod] 31935',
                    [3] = '~~KeyRelease~~',
                    ['Type'] = 'Action'
                },
                [2] = {
                    [1] = '~~KeyPress~~',
                    [2] = '/cast [nomod] 53600',
                    [3] = '~~KeyRelease~~',
                    ['Type'] = 'Action'
                },
                [3] = {
                    [1] = {
                        [1] = '~~KeyPress~~',
                        [2] = '/cast [nomod] 24275',
                        [3] = '~~KeyRelease~~',
                        ['Type'] = 'Action'
                    },
                    [2] = {
                        [1] = '~~KeyPress~~',
                        [2] = '/cast [nomod] 20271',
                        [3] = '~~KeyRelease~~',
                        ['Type'] = 'Action'
                    },
                    [3] = {
                        [1] = '~~KeyPress~~',
                        [2] = '/cast [nomod,combat] 26573',
                        [3] = '~~KeyRelease~~',
                        ['Type'] = 'Action'
                    },
                    [4] = {
                        [1] = '~~KeyPress~~',
                        [2] = '/cast [nomod] 35395',
                        [3] = '~~KeyRelease~~',
                        ['Type'] = 'Action'
                    },
                    [5] = {
                        [1] = '~~KeyPress~~',
                        [2] = '/cast [nomod,combat] 31935',
                        [3] = '~~KeyRelease~~',
                        ['Type'] = 'Action'
                    },
                    [6] = {
                        [1] = '~~KeyPress~~',
                        [2] = '/cast [nomod] 35395',
                        [3] = '~~KeyRelease~~',
                        ['Type'] = 'Action'
                    },
                    [7] = {
                        [1] = '~~KeyPress~~',
                        [2] = '/cast [nomod,combat] 31884',
                        [3] = '~~KeyRelease~~',
                        ['Type'] = 'Action'
                    },
                    [8] = {
                        [1] = '~~KeyPress~~',
                        [2] = '/cast [nomod,@player,combat] 316958',
                        [3] = '~~KeyRelease~~',
                        ['Type'] = 'Action'
                    },
                    [9] = {
                        [1] = '~~KeyPress~~',
                        [2] = '/cast [nomod] 20271',
                        [3] = '~~KeyRelease~~',
                        ['Type'] = 'Action'
                    },
                    [10] = {
                        [1] = '~~KeyPress~~',
                        [2] = '/cast [nomod,combat] 26573',
                        [3] = '~~KeyRelease~~',
                        ['Type'] = 'Action'
                    },
                    [11] = {
                        [1] = '~~KeyPress~~',
                        [2] = '/cast [nomod] 35395',
                        [3] = '~~KeyRelease~~',
                        ['Type'] = 'Action'
                    },
                    [12] = {
                        [1] = '~~KeyPress~~',
                        [2] = '/cast [nomod,combat] 31935',
                        [3] = '~~KeyRelease~~',
                        ['Type'] = 'Action'
                    },
                    ['Type'] = 'Loop',
                    ['Repeat'] = '3',
                    ['StepFunction'] = 'Sequential'
                },
                [4] = {
                    [1] = '~~KeyPress~~',
                    [2] = '/cast [nomod] 31935',
                    [3] = '~~KeyRelease~~',
                    ['Type'] = 'Action'
                },
                [5] = {
                    [1] = '~~KeyPress~~',
                    [2] = '/cast [nomod] 53600',
                    [3] = '~~KeyRelease~~',
                    ['Type'] = 'Action'
                }
            },
            ['InbuiltVariables'] = {
                ['Ring2'] = false,
                ['Combat'] = true,
                ['Head'] = false,
                ['Neck'] = false,
                ['Trinket1'] = true,
                ['Belt'] = false,
                ['Ring1'] = false
            }
        }
    },
    ['MetaData'] = {
        ['Helplink'] = '',
        ['Talents'] = '1212312',
        ['WeakAuras'] = {
            
        },
        ['TOC'] = 90002,
        ['EnforceCompatability'] = true,
        ['Author'] = 'Bragna@turalyon',
        ['ClassID'] = 2,
        ['ManualIntervention'] = true,
        ['Default'] = 1,
        ['Help'] = 'Based on a BFA macro from Bragna@turalyon This is a simple Prot Macro',
        ['Name'] = 'SAM_PROTGOD',
        ['LastUpdated'] = '20210212215533',
        ['SpecID'] = 66,
        ['Icon'] = '',
        ['GSEVersion'] = 3000
    }
}

In GSE3 each action is its own object that consists of a stack of commands. This currently exists in that KeyPress + the current line + KeyRelease make up this stack in GSE2. You will note that KeyPress and KeyRelease have been converted to variables. (They always were now its a bit more obvious. You can also choose to not include them on a particular action.) BUt as you have control over the stack you can more easily see what is happening and what you want to do.

Where there used to be an inner loop there is now just the action of loop and its indented into the macro to show what is in that.

Now this is just the template. It is not what is executed. The executed macro is:

{
    [1] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod] Avenger's Shield
    /use [@focus] 14',
	[2] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod] Shield of the Righteous
    /use [@focus] 14',
	[3] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod] Hammer of Wrath
    /use [@focus] 14',
	[4] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod] Judgment
    /use [@focus] 14',
	[5] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod,combat] Consecration
    /use [@focus] 14',
	[6] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod] Crusader Strike
    /use [@focus] 14',
	[7] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod,combat] Avenger's Shield
/use [@focus] 14',
    [8] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod] Crusader Strike
/use [@focus] 14',
    [9] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod,combat] Avenging Wrath
/use [@focus] 14',
    [10] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod,@player,combat] Ashen Hallow
/use [@focus] 14',
    [11] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod] Judgment
/use [@focus] 14',
    [12] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod,combat] Consecration
/use [@focus] 14',
    [13] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod] Crusader Strike
/use [@focus] 14',
    [14] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod,combat] Avenger's Shield
    /use [@focus] 14',
	[15] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod] Hammer of Wrath
    /use [@focus] 14',
	[16] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod] Judgment
    /use [@focus] 14',
	[17] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod,combat] Consecration
    /use [@focus] 14',
	[18] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod] Crusader Strike
    /use [@focus] 14',
	[19] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod,combat] Avenger's Shield
/use [@focus] 14',
    [20] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod] Crusader Strike
/use [@focus] 14',
    [21] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod,combat] Avenging Wrath
/use [@focus] 14',
    [22] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod,@player,combat] Ashen Hallow
/use [@focus] 14',
    [23] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod] Judgment
/use [@focus] 14',
    [24] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod,combat] Consecration
/use [@focus] 14',
    [25] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod] Crusader Strike
/use [@focus] 14',
    [26] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod,combat] Avenger's Shield
    /use [@focus] 14',
	[27] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod] Hammer of Wrath
    /use [@focus] 14',
	[28] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod] Judgment
    /use [@focus] 14',
	[29] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod,combat] Consecration
    /use [@focus] 14',
	[30] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod] Crusader Strike
    /use [@focus] 14',
	[31] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod,combat] Avenger's Shield
/use [@focus] 14',
    [32] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod] Crusader Strike
/use [@focus] 14',
    [33] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod,combat] Avenging Wrath
/use [@focus] 14',
    [34] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod,@player,combat] Ashen Hallow
/use [@focus] 14',
    [35] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod] Judgment
/use [@focus] 14',
    [36] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod,combat] Consecration
/use [@focus] 14',
    [37] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod] Crusader Strike
/use [@focus] 14',
    [38] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod,combat] Avenger's Shield
    /use [@focus] 14',
	[39] = '/targetenemy [noharm][dead]
    /cast [mod:lctrl] Hammer of Justice
    /cast [mod:alt] Divine Protection
    /cast [nomod] Avenger's Shield
/use [@focus] 14',
    [40] = '/targetenemy [noharm][dead]
/cast [mod:lctrl] Hammer of Justice
/cast [mod:alt] Divine Protection
/cast [nomod] Shield of the Righteous
/use [@focus] 14'
}

This works out to be 40 clicks long. To get what was previously Priority - you would change the Loop type to Priority rather than sequential and this would then compile into about a 73 line macro. This approach also moves the computational stuff of GSE further out of combat. instead of worrying about loop limits and step functions in combat it just executes line per line meaning less lag and also more clarity about what is happening each click for troubleshooting.

3 Likes

In before: “wat mS r u rUnNiNg tHiS aT?” lol.

Seriously, been waiting for this reveal for a hot minute right now. Very excited for a playable version.

Thank you, Tim, and I’m excited to make my macros even better and to see what others can come up with.

wao nice work, practically a new version gse good news. from what i understand you will improve everything by simplifying and making it more accurate for dps tank healer rotations.

Just logged in to say:

This is GOLD!

So happy to hear there will be a GS3 soon :slight_smile:

PS: will macros migrate in some form from v2 to v3?

Cheers.

Yes. I have been using the above function to migrate this macro over.

1 Like