Addon programming…

A long time ago in a galaxy far, far away… I thought it would be fun to RP a worgen DK (Note, I said RP…not ERP…I’m not kink-shaming, just clarifying).

In A little RP distraction…, I penned a backstory for the DK. Part of his character (though not stated in that post) was his shame at his furry fate. He would always revert back to his less-fuzzy form as soon as humanly possible. With that said, I wanted an addon that would automatically change him back to human form. It seems as if that addon had existed, but Blizzard killed it because they didn’t want addons automatically casting spells. I understand why, but come on. There should be 2 classifications of spells (Combat and Fluff). Obviously, secure the crap out of the combat spells. Fluff spells, well, they shouldn’t be as restricted for automation.

Worgen Human Form Reminder

Regardless, the current state of affairs is that there is no addon. I gave it a little thought and decided that I’d write one. I like programming and this would be a neat way of dipping my toes in the pool of Lua programming. First thought, “What the hell do I write? No automation, but what about pseudo automation? A clickable icon that lets you know you’re out of form and should revert. Perfect!”

I decided that I’d write an addon that determined if the player was in combat and whether they were in human or worgen form. If out of combat and in worgen form, plaster a big button over the toon as a reminder to press the button. This adventure began a year or so ago. It was abandoned almost immediately because of Life, the Universe, and Everything. Not forgotten, just way down towards the bottom of the list of priorities.

The other day, while working on a WeakAuras2 option for my shaman, I discovered how to make buttons in Lua. Then I realized, “OH YEAH! I wanted to do something like this for my worgen DK addon.” That was all I needed to be able to “complete” the addon. The double quotes is because no programming project is truly complete. However, there’s complete enough for use.

After screwing around with it for a while, I realized there were a few places where the form status should be checked for when to show/hide the icon.

Hide icon conditions:

  • When entering combat (right clicking on an attackable mob even if too far away or /startattack).
  • When aggroed/attacked.
  • When mounted (I figured if you were in worgen form and mounted, you probably don’t want to dismount to change form and have to remount again. At least, that’s how I’d imagine the addon should work.)
  • When you swap to human form.

Show the icon:

  • When leaving combat (hitting [esc] to stop your attacks) and you’re in worgen form.
  • When aggro drops off and you’re in worgen form.
  • When dismounting and you’re in worgen form.
  • When you swap to worgen form.

At some point, I might put together a setup window. Options like opacity, icon size, show when mounted, possibly hot-key, and anything else that comes to mind down the road.

How useful is this addon? It’s not. It’s really just RP fodder.

Is this something that could be done in WeakAuras2 rather than writing an addon? Possibly.

Should it be done in WeakAuras2 rather than writing an addon (if it’s possible)? Probably.

Will anyone but me use this addon? Doubtful.

Do I care?  No! It was fun and I learned a thing or two.

One thought on “Addon programming…

  1. Pingback: Tracking Macros – Bodhi Rana

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s