Skip to main content

Constants File

For advanced users who want to customize the visual appearance and behavior of RCC beyond what the in-game UI offers, edit the RaidConsumableChecker_Constants.lua file. Location:
World of Warcraft/
└── Interface/
    └── AddOns/
        └── RaidConsumableChecker/
            └── RaidConsumableChecker_Constants.lua
Lua Knowledge Required: Only edit this file if you’re comfortable with Lua syntax. Invalid values can break the addon.
Changes to the Constants file require a /reload to take effect.

Customizable Constants

All constants are defined in the RCC_Constants table with detailed inline comments.

UI Dimensions

WINDOW_WIDTH
number
default:"850"
Default window width in pixels.
  • Auto-calculated based on number of items if needed
  • Minimum enforced by WINDOW_MIN_WIDTH
RCC_Constants.WINDOW_WIDTH = 850
WINDOW_HEIGHT
number
default:"300"
Default window height in pixels.
  • Auto-calculated based on number of categories
  • Accounts for title bar and padding
RCC_Constants.WINDOW_HEIGHT = 300
WINDOW_MIN_WIDTH
number
default:"400"
Minimum window width in pixels.
RCC_Constants.WINDOW_MIN_WIDTH = 400
WINDOW_PADDING
number
default:"15"
Outer padding around window content.
RCC_Constants.WINDOW_PADDING = 15
ICON_SIZE
number
default:"45"
Size of item icons (width and height).
RCC_Constants.ICON_SIZE = 45
ICON_SPACING_X
number
default:"25"
Horizontal spacing between item icons.
RCC_Constants.ICON_SPACING_X = 25
CATEGORY_HEADER_HEIGHT
number
default:"25"
Height of category header text.
RCC_Constants.CATEGORY_HEADER_HEIGHT = 25
CATEGORY_SPACING
number
default:"30"
Vertical space between categories.
RCC_Constants.CATEGORY_SPACING = 30

Colors

All colors use ARGB hex format: "AARRGGBB"
Format: "AARRGGBB" where AA = alpha, RR = red, GG = green, BB = blue
Example: "FF00FF00" = fully opaque green

Background Colors

RCC_Constants.BACKGROUND_COLOR = "CC000000"
-- Black with 80% alpha (CC = 204/255)

Border Colors

These control the colored borders around item icons:
BORDER_COLOR_BUFF_ACTIVE
string
default:"FF00FF00"
Border when buff is active with >5 min remaining.
RCC_Constants.BORDER_COLOR_BUFF_ACTIVE = "FF00FF00"  -- Green
BORDER_COLOR_BUFF_WARNING
string
default:"FFFF8800"
Border when buff is active with <5 min remaining.
RCC_Constants.BORDER_COLOR_BUFF_WARNING = "FFFF8800"  -- Orange
BORDER_COLOR_BUFF_INACTIVE
string
default:"FFFF0000"
Border when buff is not active.
RCC_Constants.BORDER_COLOR_BUFF_INACTIVE = "FFFF0000"  -- Red
BORDER_COLOR_NO_BUFF
string
default:"FF000000"
Border for items without buff tracking (instant potions).
RCC_Constants.BORDER_COLOR_NO_BUFF = "FF000000"  -- Black

Text Colors

RCC_Constants.TEXT_COLOR_NORMAL = "FFFFFFFF"         -- White
RCC_Constants.TEXT_COLOR_CATEGORY = "FFFFD100"      -- Gold (category headers)
RCC_Constants.TEXT_COLOR_DESCRIPTION = "FFCCCCCC"   -- Gray (tooltips)

Fonts

FONT_TITLE
string
default:"Fonts\\\\FRIZQT__.TTF"
Font file for title text.
RCC_Constants.FONT_TITLE = "Fonts\\FRIZQT__.TTF"
FONT_NORMAL
string
default:"Fonts\\\\FRIZQT__.TTF"
Font file for normal text.
RCC_Constants.FONT_NORMAL = "Fonts\\FRIZQT__.TTF"

Font Sizes

RCC_Constants.FONT_SIZE_TITLE = 14        -- Window title
RCC_Constants.FONT_SIZE_CATEGORY = 13     -- Category headers
RCC_Constants.FONT_SIZE_ITEM_NAME = 11    -- Item names under icons

Timers and Performance

BUFF_SCAN_INTERVAL
number
default:"2.0"
Seconds between buff scans (only when window is open).
  • Lower = more responsive, higher CPU usage
  • Higher = less responsive, lower CPU usage
RCC_Constants.BUFF_SCAN_INTERVAL = 2.0  -- seconds
BUFF_UPDATE_DELAY_AFTER_USE
number
default:"0.2"
Seconds to wait after using item before updating buffs.
  • Prevents race conditions with game server
RCC_Constants.BUFF_UPDATE_DELAY_AFTER_USE = 0.2  -- seconds
BUFF_WARNING_THRESHOLD
number
default:"300"
Buff warning threshold in seconds.
  • Shows orange border when buff has less than this time remaining
  • Default: 300 seconds = 5 minutes
RCC_Constants.BUFF_WARNING_THRESHOLD = 300  -- 5 minutes

Display Settings

SHOW_ITEM_NAMES
boolean
default:"true"
Show item names below icons.
RCC_Constants.SHOW_ITEM_NAMES = true
Set to false to hide item labels and show icons only.
TEXT_WINDOW_TITLE
string
default:"Raid Consumable Checker"
Main window title text.
RCC_Constants.TEXT_WINDOW_TITLE = "Raid Consumable Checker"
TEXT_COUNTER_FORMAT
string
default:"%d/%d"
Format for item counter display.
  • Uses Lua string formatting
  • Default: “current/required” (e.g., “5/10”)
RCC_Constants.TEXT_COUNTER_FORMAT = "%d/%d"

Special Keywords

SPECIAL_BUFF_EQUIPPED_WEAPON
string
default:"EQUIPPED_WEAPON"
Special identifier for weapon enchants.
RCC_Constants.SPECIAL_BUFF_EQUIPPED_WEAPON = "EQUIPPED_WEAPON"
Do not change this unless you also update all items using it.

Customization Examples

Example: Change Border Colors

Make borders more vibrant:
RaidConsumableChecker_Constants.lua
-- Brighter green for active buffs
RCC_Constants.BORDER_COLOR_BUFF_ACTIVE = "FF00FF00"    -- Bright green

-- Yellow instead of orange for warnings
RCC_Constants.BORDER_COLOR_BUFF_WARNING = "FFFFFF00"   -- Yellow

-- Dark red instead of bright red
RCC_Constants.BORDER_COLOR_BUFF_INACTIVE = "FF880000"  -- Dark red

Example: Larger Icons

Increase icon size and spacing:
RaidConsumableChecker_Constants.lua
-- Bigger icons
RCC_Constants.ICON_SIZE = 60  -- Up from 45

-- More spacing to prevent overlap
RCC_Constants.ICON_SPACING_X = 35  -- Up from 25

Example: Change Warning Threshold

Show orange border at 10 minutes instead of 5:
RaidConsumableChecker_Constants.lua
-- 10 minutes = 600 seconds
RCC_Constants.BUFF_WARNING_THRESHOLD = 600

Example: Hide Item Names

Show icons only without labels:
RaidConsumableChecker_Constants.lua
RCC_Constants.SHOW_ITEM_NAMES = false

Example: Custom Color Scheme

Create a dark purple theme:
RaidConsumableChecker_Constants.lua
-- Dark purple background
RCC_Constants.BACKGROUND_COLOR = "CC1A0A2E"  -- Deep purple

-- Purple title bar
RCC_Constants.TITLE_BG_COLOR = "E6341553"   -- Purple
RCC_Constants.TITLE_TEXT_COLOR = "FFDA70D6" -- Orchid text

-- Purple-tinted borders
RCC_Constants.BORDER_COLOR_BUFF_ACTIVE = "FF9370DB"    -- Medium purple (active)
RCC_Constants.BORDER_COLOR_BUFF_WARNING = "FFFF00FF"   -- Magenta (warning)
RCC_Constants.BORDER_COLOR_BUFF_INACTIVE = "FF4B0082"  -- Indigo (inactive)

-- Orchid category headers
RCC_Constants.TEXT_COLOR_CATEGORY = "FFDA70D6"

Slash Commands

Customize the slash commands:
RaidConsumableChecker_Constants.lua
RCC_Constants.SLASH_COMMANDS = {
    PRIMARY = "/rcc",
    SECONDARY = "/raidcheck",
    TERTIARY = "/consumables"
}
Change to your preference:
Custom Commands
RCC_Constants.SLASH_COMMANDS = {
    PRIMARY = "/consumables",
    SECONDARY = "/cons",
    TERTIARY = "/checkbuffs"
}

Tooltip Customization

RaidConsumableChecker_Constants.lua
-- Tooltip texts
RCC_Constants.TEXT_TOOLTIP_WEAPON_ENCHANT = "Weapon enchant"
RCC_Constants.TEXT_TOOLTIP_CLICK_TO_USE = "Click to use"
Customize tooltip hints:
Custom Tooltips
RCC_Constants.TEXT_TOOLTIP_WEAPON_ENCHANT = "Enchant Active"
RCC_Constants.TEXT_TOOLTIP_CLICK_TO_USE = "Left-click to consume"

Confirmation Dialog

Customize the buff overwrite confirmation:
RaidConsumableChecker_Constants.lua
RCC_Constants.TEXT_CONFIRM_MESSAGE = "You already have the buff '%s'. Do you want to use another %s?"
RCC_Constants.TEXT_CONFIRM_ACCEPT = "Yes"
RCC_Constants.TEXT_CONFIRM_CANCEL = "No"

Color Format Reference

ARGB Hex Colors

Format: "AARRGGBB"
"FF"  -- 100% opaque (255/255)
"CC"  -- 80% opaque (204/255)
"99"  -- 60% opaque (153/255)
"66"  -- 40% opaque (102/255)
"33"  -- 20% opaque (51/255)
"00"  -- 0% opaque (fully transparent)

Color Examples

"FFC79C6E"  -- Warrior (tan)
"FFF58CBA"  -- Paladin (pink)
"FFABD473"  -- Hunter (green)
"FFFFF569"  -- Rogue (yellow)
"FFFFFFFF"  -- Priest (white)
"FFC41F3B"  -- Death Knight (red)
"FF0070DE"  -- Shaman (blue)
"FF40C7EB"  -- Mage (cyan)
"FF8787ED"  -- Warlock (purple)
"FF00FF96"  -- Monk (jade)
"FFFF7D0A"  -- Druid (orange)
"FFA330C9"  -- Demon Hunter (violet)

Performance Tuning

Optimize for your system:
Fast updates, higher CPU usage:
RCC_Constants.BUFF_SCAN_INTERVAL = 1.0  -- Scan every 1 second
Buff scans only run when the window is open, so performance impact is minimal.

Restoring Defaults

If you break something:
1

Backup Current File

Copy RaidConsumableChecker_Constants.lua to a safe location.
2

Delete Modified File

Delete the modified RaidConsumableChecker_Constants.lua.
3

Reinstall Addon

Download and reinstall RCC to get fresh defaults.
4

Reload UI

Type /reload in-game.
Or manually revert specific constants to their default values (listed in each section above).

Best Practices

Copy the file before making changes:
cp RaidConsumableChecker_Constants.lua RaidConsumableChecker_Constants.lua.backup
Change one thing at a time, then /reload to test:
  1. Edit one constant
  2. Save file
  3. /reload in-game
  4. Verify it works
  5. Repeat
Add comments to track your changes:
-- CUSTOM: Changed to 10 minutes instead of 5
RCC_Constants.BUFF_WARNING_THRESHOLD = 600
Make sure colors are 8 characters (AARRGGBB):"FF0000" (missing alpha)
"FFFF0000" (correct)

Troubleshooting

Addon won’t load after editing ConstantsLikely a Lua syntax error:
  1. Check for typos in constant names
  2. Ensure strings are in quotes: "value"
  3. Ensure numbers don’t have quotes: 300 not "300"
  4. Check for missing commas (not in Constants, but if you edit tables)
  5. Restore from backup if unsure
Colors not showing correctlyCheck color format:
  • Must be 8 characters: "AARRGGBB"
  • Must be in quotes
  • Must be valid hex: 0-9, A-F

Next Steps

Configuration Overview

Back to configuration system overview

Item Configuration

Configure items and consumables

Build docs developers (and LLMs) love