TimothyLuke / GSE-Advanced-Macro-Compiler

GSE is an alternative advanced macro editor and engine for World of Warcraft.
https://discord.gg/gseunited
MIT License
191 stars 71 forks source link

[ENH] Allow Keybinds to be tied to Talent Loadouts within a Spec #1519

Closed TimothyLuke closed 1 month ago

TimothyLuke commented 1 month ago

With the new Keybinding requirements for GSE Sequences it was requested that players be able to keybind a Sequence when in one talent set and a different in another talent set.

https://warcraft.wiki.gg/wiki/API_C_Traits.GetConfigInfo Shows that it may be possible to identify the current talent loadout.

Discussed in https://github.com/TimothyLuke/GSE-Advanced-Macro-Compiler/discussions/1516

Originally posted by **Dancharvey-co-uk** July 24, 2024 For example: As a havoc demon hunter I have one gse for raid and and a different one for m+. And different talent loadouts accordingly. I'd love to be able to use the same keybind for both contexts.
TimothyLuke commented 1 month ago
/dump C_ClassTalents.GetLastSelectedSavedConfigID(PlayerUtil.GetCurrentSpecID())
/dump C_ClassTalents.GetConfigIDsBySpecID(PlayerUtil.GetCurrentSpecID())
/dump C_Traits.GetConfigInfo(13322832)
TimothyLuke commented 1 month ago

Thinking this kind of structure:

GSE_C = {
    ["KeyBindings"] = {
        ["3"] = {
            -- Your Spec - this is a number between 1 and 4
            TalentLevel = true,
            TalentKeyBinds = {
                ["13322832"] = {
                    -- My Spec ID from GSE.GetSelectedLoadoutConfigID()
                    ["3"] = "GAOE", -- The Key and the Sequence Name in this case 3 calls GAOE
                    ["2"] = "GST" -- The Key and the Sequence Name in this case 2 calls GST
                }
            },
            SpecBinds = {}
        },
        ["1"] = {
            -- Your other Spec - this is a number between 1 and 4
            ["3"] = "RAOE", -- The Key and the Sequence Name in this case 3 calls RAOE
            ["2"] = "RST" -- The Key and the Sequence Name in this case 2 calls RST
        }
    },
    ["Updates"] = {
        ["3201"] = true
    }
}
TimothyLuke commented 1 month ago

image