View Single Post
06-16-16, 01:13 AM   #6
TimothyLuke
A Fallenroot Satyr
 
TimothyLuke's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 24
Ok working through this further I have been enhancing Semlar's GnomeSequencer for Legion.

The Git repository for this is located here: https://github.com/TimothyLuke/DraikUI/tree/Legion

I have about 22 alts of different classes and have been using GS for a while.

The original GS is structured like so:
Errorhandler.lua <---- initial setup
Sequences.lua <---- Table of cast sequences. Sequences are loaded here via
local GNOME, Sequences = ...
This file doesn't exist out of the box and requires a person create the file and add in their code. If you are playing on multiple computers you have to manually sync this.
Core.lua <---- expands a sequence from sequences.lua into a secure button. This loads in the same sequences via
local GNOME, Sequences = ...
What most people like me ended up with was a massive Sequence.lua that was huge and hard to maintain

My first enhancement added some Spec ID management to this and the mod as uploaded here as Gnome Sequencer Enhanced looks like this and also some help meta data to the sequence.

ErrorHandler.lua
DraiksMacros/<<classname>>.lua <---- Each class has its own file for my macros e.g. paladin.lua mage.lua
Sequences.lua
Core.lua

This works as intended using the same
local GNOME, Sequences = ...
structure. I could put this on Github and sync that to my multiple computers.

---------------------------

Having gotten this far, what if other mod authors wanted to release their own compilation of macros. DBM, Skada, ... each have their own plugin system and a way of creating your own bundle of sequences would be better than repackaging into your own compilation .....

I tried to break these up into a GS-Core that contains
ErrorHandler.lua
Sequences.lua
Core.lua

to allow for backwards compatibility. If you had your sequences.lua and were happy doing that ... great

I then moved my macros to GS-Draik and had it depend on GS-Core. The problem is that this would load after GS-Core had initialised and completed its Core.lua routines. Again i didn't want to force the use of my extra add-on and wanted to be able to have a GS-Draik, a GS-newblevelling, GS-SuperPaladinCollection etc. The Core wouldn't know exactly how many of these existed prior to initialisation. Again as these were optional there may be none of these present at all.

I started by taking the initial
local GNOME, Sequences = ...
in error handler.lua and exposing the Sequences table as a Global. The GS-Draik files then loaded their sequences into the global.

After entering the world, GS-Core could read the sequences from GS-Draik but it wouldn't do the initialisation steps that occurred when they were the one mod. I can see the extra sequences are able to be seen in the GS-Core mod post load via some debugging but I am stuck. I can't then tell the GS-Core to rerun its initialisation with the new sequences.

Which brings me back where I am. -- Does this make sense?
  Reply With Quote