I was wondering if anyone had or could make a weakaura for moonfire and/or starfire that would show when it is safe to overwrite the current cast ie. higher stats or eclipse state. I saw there was an Affdots module made but for the life of me I can't get it to work.
Doing it based on Eclipse state should be pretty simple, and can be done a variety of ways, with either multiple Auras or multiple triggers. Doing it based on higher stats is probably pretty complex as far as Weak Auras goes. If it's possible at all, it's going to require custom lua for sure, and probably a lot of it. I'm no expert, but I would imagine this is one of those situations where it's possible with Weak Auras, but maybe more efficient and less complicated to just use an add-on that's made for this.
Did you make sure you downloaded the original AffDots add-on as well as the Balance module? Which part of it isn't working? Is it not showing your DoT's at all? Just not updating properly?
It boils down to two auras. One records your stats every time you cast an DoT worth tracking (and cleans up stats as mobs die or entries get stale).
The second ones pull stat information from the table generated by the first.
You'll be required to write custom triggers to compare current stats to existing stats and calculate time-remaining on buffs to work out how much of a gain is to be had (remember that recasting a dot early costs you some DPS because you could be using a filler spell instead - you need to account for that).
The problem becomes somewhat difficult to solve because you have run a sort of mini simulator to make it all go. You can do it, but it's easy to get wrong. I'm not really interested in tackling that problem right now but maybe somebody else will (http://www.voximmortalis.com/ has a weak auras tutoring thread frequented by very knowledgeable people: be warned that you have to show you made a real effort to solve the problem yourself or people will tend to ignore you). You could also try the official WA forums if nobody here steps up to help.
IMO this isn't really a great WA project, 200+ lines of code in triggers is a good sign that you're going too far. You would probably want to split your stats-tracking portion into it's own custom addon and then use WA to trigger on events that it generates.