Digging Into the .lua: The Look of Injector

The author decided to rebrand his addon with a new name: Aptcheka. However, the basic information should remain the same.

Today we’re going to take a look at Injector’s .lua file in order to customize the look and feel of the frames.  While you can make adjustments to the actual function of the program (the indicators, spells, and so forth) I am saving that discussion for a later post.

First off, you’re going to need an editor.  I prefer Komodo Edit 5 which can be used at no cost.

Once you have that, you’re ready to go.  Simply open the config.lua located in the Injector folder (Some changes you may want to make can be found in the injector.lua if you’re adventurous).

General Notes

I prefer to edit while I have my character and add-on up and running.  You can make changes to the .lua file and do a simple /console reloadui to see changes immediately.  I found this quite helpful as I am not a coder by any stretch of the imagination, and the scale of things doesn’t always make sense to me.  I would also highly suggest making a single change at a time and testing if you are unsure of your familiarity with the language, or how the effect will appear so that you don’t spend an hour making massive changes and discover at the end that everything is so confused that you find the need to download the entire add-on again.  Always a bummer.

Remember that bracketing, equal signs, and the like are important to the working of the program.  Make sure to note these before deleting or you may find yourself looking at a string of .lua errors even if all the remaining language is correct.

The author's original code will be boxed.

I have tried to highlight things you can safely change in red.  Notes by the author on appropriate choices for the selection are in italics.

Size

InjectorConfig.width = 50

Width of each individual box.

InjectorConfig.height = 35

Height of each individual box.

InjectorConfig.scale = 1

Overall scale, by box.  It should be noted that out-of-the-box, Injector is set-up to scale to .8 (80%) when more than 27 members are in the raid.  If you would like to change scale here, you will likely want to change that scaling as well, which can be found under Layout.

Frame Config

InjectorConfig.texture = [[Interface\AddOns\Injector\gradient]]

Change the texture of the boxes.  Any shared media will work; however, you will want to make sure your media file is located in your World of Warcraft folder.

InjectorConfig.font = [[Interface\AddOns\Injector\ClearFont.ttf]]

Changes the font for all text.  Make sure the text file is located in your World of Warcraft folder.

InjectorConfig.fontsize = 12

Text size.

InjectorConfig.cropNamesLen = 7

Determines the max characters that will show of a characters name.  For example, Starweaver would appear as Starwea.

InjectorConfig.manabarwidth = 6

Determines how wide the mana bar will appear.  (You can hide the mana bar under Injectorconfig.disablemanabar

InjectorConfig.orientation = "VERTICAL"    

HORIZONTAL / VERTICAL

Will determine whether bars fill horizontally or vertically.

InjectorConfig.outOfRangeAlpha = 0.4

Determines how dark the boxes of out of range characters will appear.

InjectorConfig.disableManaBar = false

If false, will allow the mana bar to appear, if true, will disable the mana bar.

InjectorConfig.invertColor = false

if true hp lost becomes dark, current hp becomes bright

InjectorConfig.incomingHealTimeframe = 1.5 

incoming in next 1.5 seconds heals are displayed, including hot ticks

There is little point in having this higher than 2 seconds as most casts take less time than that (heals).

InjectorConfig.incomingHealDisplayAmount = true

On second line.

If true, allows incoming heals to be displayed as a second line under name, if false, will disable.

InjectorConfig.incomingHealIgnoreHots = true

If true, will ignore hots on the incoming heals display, if false, all hot healing will appear as incoming.

InjectorConfig.raidIcons = true

True to display raid icons on frames, false to disable.

InjectorConfig.enableTraceHeals = true

True to show trace heals (Chain Heal, Circle of Healing), false to disable.

InjectorConfig.mouseoverTooltip = "outofcombat" 

ALWAYS / OUTOFCOMBAT / DISABLED

Controls when the tooltip will appear.  Always = tooltip always shown, outofcombat = tooltip only shown out of combat, disabled = tooltip will never appear for these frames.

Layout

InjectorConfig.maxgroups = 8

Number of groups.  8 is maximum, i.e. 40-man raid.

InjectorConfig.showSolo = true

True if Injector visible when solo, false if Injector is hidden when solo.

InjectorConfig.unitGap = 10

GAP BETWEEN UNITS

The grouping between party members in the same group.  Larger number for more space, smaller for less space.

InjectorConfig.groupGap = 10

The grouping between parties.  Larger number for more space, smaller for less space.

InjectorConfig.unitGrowth = "RIGHT

direction for adding new players in group. LEFT / RIGHT / TOP / BOTTOM

Which way do you want your party to grow?  You will need to determine anchorpoint before answering this question.

InjectorConfig.groupGrowth = "TOP

new groups direction. LEFT / RIGHT / TOP / BOTTOM

This is important for raid groups.  Again, you will need to know where your anchorpoint is located to answer this sensibly.

InjectorConfig.resize = { after = 27, to = 0.8 }

if number of players in raid exeeds 27 then resize to 0.8.   “InjectorConfig.resize = nil” disables it

Do you want your 10 & 25 man raid group to fit in the same whole in your UI?  If so, change the number of players exceeds to a smaller number (say 12) and adjust the UI scale accordingly until it fits.  Current setup is great for 40 man raid groups.  You can also disable resizing, keeping your raid frames the same independent size regardless of number of members by plugging in the “nil.”

InjectorConfig.anchorpoint = "BOTTOMLEFT"

Determines the “corner” from which all frames will grow.  If you want something at the top of your screen growing down, TOPLEFT or TOPRIGHT may be more appropriate.

InjectorConfig.lockedOnStartUp = true

If true, Injector will be locked on start-up, if false, the injector “move” button will be visible.

InjectorConfig.disableBlizzardParty = true

Determines whether Blizzard’s Party interface is visible while Injector is active.  True means that Blizzard Party UI frames are NOT active, and false means that they are visible.

Pets

InjectorConfig.petFrames = false

True if you’d like pet frames, false if you wouldn’t.

InjectorConfig.petScale = 1

Overall scale of pet frame (no minute adjustments available.)

InjectorConfig.petFramesSeparation = false

True if you would like the pet frames separated, false if you’d like them attached

InjectorConfig.useCombatLogFiltering = true

True allows Injector to monitor the combat log for events, while false keeps Injector out of your combat log.  While false may slightly increase performance, if possible, you should allow Injector access for a better experience.  (And no, I have no idea why this is under “pets” but I’m not a coder–what do I know?)

Libraries (Libs)

InjectorConfig.useHealComm = true
HealComm is a library shared by most healing add-ons (Vuhdo, Grid, Healbot) that allows incoming heals to be shared.  I would highly suggest that you leave this as true if you heal, otherwise, you can kill it to save yourself some talk between add-ons by choosing false.
InjectorConfig.useQuickHealth = isHealer
Allows you to see an estimate of your next heal.  As is, will only activate if you are a “healing” class.  I honestly don’t know how to deactivate it, although nil or false would be my best guess.

Indicators & Spell Parameters

Indicators are the icons (the little squares) that tell you a spell is active.  This particular portion of the code affects the size and location of indicators, while spell parameters allows you to attach spells to each indicator.

I will be dedicating a separate post to configuring the Indicators since they are a bit more in-depth than “yes/no” statements, and only those wishing to dig in and seriously customize the program will mess with them anyway.

If you have any questions about the current set-up of spells and indicators, I’ll redirect you back to my original post which details the out-of-the-box setup.

About these ads

4 thoughts on “Digging Into the .lua: The Look of Injector

  1. Looks pretty straight forward to this ex-programmer. :-) If Grid ever dies im trying out Injector for sure.

    BTW, re: InjectorConfig.useHealComm = true. Don't you find the the healcomm librbary spams tons and tons of messages to the rest of the raid, especially in 25 man? I've disabled mine in Grid and due to reoccuring disconnects of raiders, not using healcomm, but in a raid with a few healers who are using it, we had basically outlawed healcomms use in our raids.

    Besides, at the pace at which you are healing does the display of incomming heals actually help your decision making process? I never found it did.

    Anyway nice post again.

    Gobble gobble.

    • I personally have mine disabled, because on my older system I found that 1) It d/c'd me… a lot, 2) by the time I got the information I'd already made decisions about what/when to heal.

      However, I DO like it to get a "feel" for how healers are prioritizing and WHEN they're healing. My understanding is, when I disable it, my team doesn't get the information either, and I've had it be a required add-on for healing teams, so… I do suggest it despite the problems I have with it and the fact that I don't use it :P I also suggest Vuhdo as an addon for many a healer, but that doesn't mean I personally like it.

      Having zero coding experience of any kind other than looking at a lot of files and tinkering to see what worked, I found this one a breeze to get around :) I'm still hoping Grid2 will get out of beta, but it was still pretty unstable the last time I tried it.

  2. Since I'm playing too many characters, I don't like addons needing a lot of configuration. I'll need to give this one a try. Looking forward to your next post on Injector. ;)

    • Hopefully I'll have some time soon to do some testing on what I think *should* work as opposed to making everyone who's taking my advice a guinea pig :) There are some limited instructions embedded in the file itself if you feel adventurous!

Comments are closed.