GSE: Sequences, Variables, Macros

GSE: Sequences, Variables, Macros

7M Downloads

GSE2 Macro Text Parser dropping certain combinations of macro modifiers.

andrewkhunn opened this issue · 19 comments

commented

I've noticed GSE2 adding spaces and removing some macro information (presumably an issue with parsing on import/save).

ORIGINAL

Sequences['Enmity'] = {
  Author="Enmity",  
  SpecID=251,
  Talents = "2232111",
  Helplink = "http://bit.ly/2j7uiSA",
  Help = "20ms Repeat Rate",
  Default=1,
  PVP=2,
  Icon='Spell_Deathknight_FrostPresence',
  MacroVersions = {
    [1] = {
      StepFunction = "Sequential",
      KeyPress={
        "/cast [combat] Pillar of Frost",
      },
      PreMacro={
      },
        "/cast [talent:7/1,combat] Obliteration",
        "/castsequence reset=combat Howling Blast, Frost Strike, Obliterate, Frost Strike, Obliterate",
        "/castsequence reset=combat [talent:7/3] Glacial Advance, [talent:6/1] Frostscythe, Frost Strike, Frost Strike, [talent:6/1] Frostscythe, [talent:6/1] Frostscythe",
        "/castsequence reset=combat Frost Strike, Obliterate, [talent:6/1] Frostscythe",
        "/cast [talent:7/3,combat] Glacial Advance",
        "/cast [combat] Obliterate",
        "/cast [combat] Frost Strike",
        "/cast [combat] Obliterate",
        "/cast [talent:6/1,combat] Frostscythe",
        "/cast [combat] Empower Rune Weapon",
        "/cast [combat] Remorseless Winter",
      PostMacro={
      },
      KeyRelease={
        "/targetenemy [noharm][dead]",
        "/cast [combat] Anti-Magic Shell",
      },
    },
    [2] = {
      StepFunction = "Sequential",
      KeyPress={
        "/cast [combat] Pillar of Frost",
      },
      PreMacro={
      },
        "/cast reset=60 [talent:4/2,combat] Blinding Sleet",
        "/cast reset=45 [pvptalent:6/3,combat] Chill Streak",
        "/cast [combat] Obliterate",
        "/cast [combat] Frost Strike",
        "/cast [combat] Obliterate",
        "/cast [talent:6/1,combat] Frostscythe",
        "/cast [combat] Empower Rune Weapon",
        "/cast reset=90 [talent:7/1,combat] Obliteration",
        "/castsequence reset=combat Howling Blast, Frost Strike, Obliterate, Frost Strike, Obliterate",
        "/castsequence reset=combat [talent:7/3] Glacial Advance, [talent:6/1] Frostscythe, Frost Strike, Frost Strike, [talent:6/1] Frostscythe, [talent:6/1] Frostscythe",
        "/castsequence reset=combat Frost Strike, Obliterate, [talent:6/1] Frostscythe",
        "/cast [combat] Remorseless Winter",
      PostMacro={
      },
      KeyRelease={
        "/targetenemy [noharm][dead]",
        "/cast [combat] Anti-Magic Shell",
      },
    },
  },
}

AFTER IMPORT

Sequences['Enmity'] = {
  Author="Enmity",  
  SpecID=251,
  Talents = "2232111",
  Helplink = "http://bit.ly/2j7uiSA",
  Help = "20ms Repeat Rate",
  Default=1,
  PVP=2,
  Icon='Spell_Deathknight_FrostPresence',
  MacroVersions = {
    [1] = {
      StepFunction = "Sequential",
      KeyPress={
        "/cast [combat] Pillar of Frost",
      },
      PreMacro={
      },
        "/cast [talent:7/1,combat] Obliteration",
        "/castsequence  reset=combat  Howling Blast, Frost Strike, Obliterate, Frost Strike, Obliterate",
        "/castsequence [talent:7/3] Glacial Advance, [talent:6/1] Frostscythe, Frost Strike, Frost Strike, [talent:6/1] Frostscythe, [talent:6/1] Frostscythe",
        "/castsequence [talent:6/1] Frostscythe",
        "/cast [talent:7/3,combat] Glacial Advance",
        "/cast [combat] Obliterate",
        "/cast [combat] Frost Strike",
        "/cast [combat] Obliterate",
        "/cast [talent:6/1,combat] Frostscythe",
        "/cast [combat] Empower Rune Weapon",
        "/cast [combat] Remorseless Winter",
      PostMacro={
      },
      KeyRelease={
        "/targetenemy  [noharm][dead]",
        "/cast [combat] Anti-Magic Shell",
      },
    },
    [2] = {
      StepFunction = "Sequential",
      KeyPress={
        "/cast [combat] Pillar of Frost",
      },
      PreMacro={
      },
        "/cast reset=60 [talent:4/2,combat] Blinding Sleet",
        "/cast reset=45 [pvptalent:6/3,combat] Chill Streak",
        "/cast [combat] Obliterate",
        "/cast [combat] Frost Strike",
        "/cast [combat] Obliterate",
        "/cast [talent:6/1,combat] Frostscythe",
        "/cast [combat] Empower Rune Weapon",
        "/cast [talent:7/1,combat] Obliteration",
        "/castsequence  reset=combat  Howling Blast, Frost Strike, Obliterate, Frost Strike, Obliterate",
        "/castsequence [talent:7/3] Glacial Advance, [talent:6/1] Frostscythe, Frost Strike, Frost Strike, [talent:6/1] Frostscythe, [talent:6/1] Frostscythe",
        "/castsequence [talent:6/1] Frostscythe",
        "/cast [combat] Remorseless Winter",
      PostMacro={
      },
      KeyRelease={
        "/targetenemy  [noharm][dead]",
        "/cast [combat] Anti-Magic Shell",
      },
    },
  },
}

Added Spaces: Lines 19, 32, 51, and 58
Stripped Content: Lines 20, 21, 50, 52 and 53

Let me know if you need anything else from me to debug this. Thanks!

GSE.lua

commented

Hi Andrew I just edited you post so I can tell one line from the other. Github deals with code blocks better when you select the block after paste and then hit the <> code button.

commented

GSE parses what comes in and has to interpret it. It may add an extra space but it also cleans up redundant boilerplate. The adding extra spaces is cosmetic but I will trace it. The loosing of reset=combat is a bug. Its this combination - reset=combat [talent:7/3]

"/castsequence [talent:7/3] Glacial Advance, [talent:6/1] Frostscythe, Frost Strike, Frost Strike, [talent:6/1] Frostscythe, [talent:6/1] Frostscythe",
"/castsequence reset=combat [talent:7/3] Glacial Advance, [talent:6/1] Frostscythe, Frost Strike, Frost Strike, [talent:6/1] Frostscythe, [talent:6/1] Frostscythe",

commented

This is NOT fixed in 2.0.6 AFAIK.

commented

Hi Andrew

This is complicated to solve. I have just added a UnitTest for this. UnitTests are executed every time I change code for GSE to test that I dont accidently break stuff. The limitations is that I cant UnitTest Macro Execution and I cant UnitTest the GUI. The enxt step will be changing the code unitl the Unit Test returns the right result. Then wow should follow.

commented

(Im apologising if you get a bunch of spam emails about checkings)

commented

Unit Tests are passing now. Will be in the 2.0.8 release

commented

This change actually broke castsequence.

I've reverted it as the syntax should be
/castsequence options resetcondition spelllist

"/castsequence reset=combat [talent:7/3] Glacial Advance, [talent:6/1] Frostscythe, Frost Strike, Frost Strike, [talent:6/1] Frostscythe, [talent:6/1] Frostscythe",
should be

"/castsequence [talent:7/3] reset=combat Glacial Advance, [talent:6/1] Frostscythe, Frost Strike, Frost Strike, [talent:6/1] Frostscythe, [talent:6/1] Frostscythe",

commented

Huh, odd. Would that mean that each talent modifier needs it's own reset=combat?

commented

Sorry for making you do so much unnecessary work, BTW. :(

commented
commented
commented

If you look at this area - https://travis-ci.org/TimothyLuke/GnomeSequencer-Enhanced/builds

I cant test everything as its checking what it can that doesnt need WoW to interact with but its able to verify the core of things.

commented
        "/castsequence reset=combat Howling Blast, Frost Strike, Obliterate, Frost Strike, Obliterate",
        "/castsequence reset=combat [talent:7/3] Glacial Advance, [talent:6/1] Frostscythe, Frost Strike, Frost Strike, [talent:6/1] Frostscythe, [talent:6/1] Frostscythe",
        "/castsequence reset=combat Frost Strike, Obliterate, [talent:6/1] Frostscythe",

To be clear, this block from the 1st macro should become this?

        "/castsequence reset=combat Howling Blast, Frost Strike, Obliterate, Frost Strike, Obliterate",
        "/castsequence [talent:7/3] reset=combat Glacial Advance, [talent:6/1] Frostscythe, Frost Strike, Frost Strike, [talent:6/1] Frostscythe, [talent:6/1] Frostscythe",
        "/castsequence reset=combat Frost Strike, Obliterate, [talent:6/1] Frostscythe",

And that would apply reset=combat to each /castsequence appropriately? I am using this format in 2.0.8 and the parser is scrambling things around. Do i need to wait for 2.0.9?

commented
commented

Thanks for the quick reply. Any idea when you might push that out?

Might try and get up and running via this git repo if it will be awhile.

commented

Up and running on 2.0.9 pulled like 2 mins ago and this:

"/castsequence reset=combat Frost Strike, Obliterate, [talent:6/1] Frostscythe",

is getting imported as this:

"/castsequence [talent:6/1] Frostscythe",

Should that line be formatted differently or does an edge case need to be added to the parser?

commented
commented

Cool, just trying to get up and running. No worries. Just so you're aware though, the last comment is still valid.

"/castsequence reset=combat Frost Strike, Obliterate, [talent:6/1] Frostscythe",

is being imported as:

/castsequence [talent:6/1] Frostscythe

with the latest code in the repo. I assume the parser needs an edge case built into it, or I need to reformat that /castsequence somehow.

commented

Moving this over here, from my issue (#213) with hunter pet abilities:

In 2.0.8 the line for /petattack [@target,harm], [@target,harm] is all white text, instead of green - but it still processes the command.