#Old Classic WA Acting Up

48 messages ¡ Page 1 of 1 (latest)

willow echo
#

I don't play anymore and I am doing everything I can to keep it that way. One of my previous guild members is complaining that on login and instance change he gets the following LUA error(s):

20x Lua error in aura 'Physical DPS Stats': Custom Text Function
WeakAuras Version: 5.18.1
Aura Version: 1.0.2
Stack trace:
[string "return function()"]:29: attempt to perform arithmetic on local 'cHit' (a nil value)
[string "return function()"]:29: in function <[string "return function()"]:1>
[string "=[C]"]: in function xpcall'
[string "@WeakAuras/WeakAuras.lua"]:5040: in function RunCustomTextFunc'
[string "@WeakAuras/RegionTypes/Text.lua"]:263: in function ?'
[string "@WeakAuras/SubscribableObject.lua"]:94: in function Notify'
[string "@WeakAuras/RegionTypes/RegionPrototype.lua"]:637: in function ?'
[string "@WeakAuras/SubscribableObject.lua"]:94: in function Notify'
[string "@WeakAuras/RegionTypes/RegionPrototype.lua"]:843: in function <...aceWeakAuras/RegionTypes/RegionPrototype.lua:841>

Locals:
red = "ff0000"
green = "00ff00"
white = "ffffff"
cCrit = 0
cHit = nil
tLevel = 63
cLevel = 60
cSkillMBase = 0
cSkillMMod = 0
cSkillOBase = 0
cSkillOMod = 0
cApBase = 0
cApAdd = 0
cApSub = 0
 = 0
 = 0
 = 0
 = 0
 = 0
 = 0
cDamageMod = 0
tIsEnemy = false
levelDelta = -60
cAp = 0
cDamage = 0
cWeaponSkill = 0
cSkillCap = 300
cBaseAttackRating = 0
cWeaponSkill = 0
extraWeaponSkill = -300
tDefense = 315
(temporary) = 68
(temporary) = false
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(temporary) = nil
(*temporary) = "attempt to perform arithmetic on local 'cHit' (a nil value)"
glacial lake
#

Physical DPS Stats

willow echo
#

The current trigger is "every frame" and while I realize that it could be fixed by changing that, its not ideal. It's meant to be active at all times without a hitch. So, how can I delay the aura from loading for some period of time after an instance change\load?

glacial lake
#

you can fix the mess not using a custom text and every frame stuff. yes thats possible

#

you can also get rid of most code and use a default trigger for stats

willow echo
#

Thanks, I'm just looking for a quick fix, not an overhaul. I haven't logged in in 5 years, nor have I done any LUA 😄

pallid venture
#

WA made internal code for many things since then, i suspect without a link to the aura itself (instead of its error messages) its not easy to respec it for you

willow echo
pallid venture
#

for cata, or for classic-era? i can try it out

#

I'm gonna test it on a deathknight I made just to get the promo mount over in retail. ❤️

pallid venture
#

you might be able to get it to "pop a lot" but throttled if you trigger it via the combat log.

Since it's for phys dps, maybe the swing timer would be ubiquitous enough?

glacial lake
#

Do NOT use combatlog. That's worse far far far worse than every frame could ever be.

pallid venture
#

ooh alrighty then.

#

base it on your hitpoints? if you're losing any, you're in a fight where it's worth knowing. (this feels silly. "in combat" is already a load type.)

#

one thing i can say, with ONLY weakauras loaded and ONLY this aura imported, I'm not getting any UI errors in Stormwind, but I'm also not seeing it display any stats.

#

I had to add Load (Alive) this didnt work too

#

I easily got a fresh text aura to show me crit percent, lol i need to reduce the digits of precision though!

#

ok

I feel certain beyond a shadow of a doubt .

based on trigger 1 being
[ Player/Unit Info] [Character Stats]

✔︎ Critical (%) > 0

#

and various others there, that I can easily replicate what it looks like this thing was trying to do.

#

On The Plus Side - it does look nice, when i anchor it to bottom of PlayerFrame ❤️

#

but the replication will indeed be, as you put it, an overhaul.

#

OP addohm I hope it's okay if I do this tomorrow afternoon US? I'm off to make sure scrollsage Nola gets a proper sendoff before reset wipes out the questline.

#

^ you might not need any raw LUA to pull off what you had done, since colorizing text is also part of the baseline WA.

#

cheap attempt one, no color, just info being pulled together

#

note I consider this still REALLY cheap, as the plaintexts should be their own, and the variables each get a sub aura in the group so they can get colorized

but maybe you will beat me to it

hope this helps any.

willow echo
#

Im doing my best to not download the client and log in. I guess I could mess around with it on the PTR but I'd rather not get pulled into the vacuum that is WoW lol

#

It would certainly make things easier but I guess I'm going to have to if I want to get this fixed quickly and cheaply. I've no idea how the game, API, and WA has changed since then.

willow echo
#

I'll have to double check

#

Looks like the bulk of the magic is in the crit and hit calculations.

    local cCritCap = 100 - cMiss - tDodge - tGlance + tCritSupp + (extraWeaponSkill * 0.04)
    
    -- Spellbook Crit with Crit Cap Logic string
    local cCritCapString = 'Crit: |r |cff'
    if cCrit >= cCritCap then
        cCritCapString = cCritCapString .. red .. string.format('%.2f', cCrit) 
    else
        cCritCapString = cCritCapString .. green .. string.format('%.2f', cCrit)
    end
    cCritCapString = cCritCapString .. '% |r |cff' .. white .. '/ ' .. cCritCap .. '%'
    
    -- Hit String
    local cHitString = 'Hit: |r |cff'
    if cWeaponSkill >= tDefense - 15 then
        if (cWeaponSkill < tDefense - 10 and cHit >= 9) or (cWeaponSkill >= tDefense - 10 and cHit >= 6) then
            cHitString = cHitString .. green .. cHit
        else
            cHitString = cHitString .. red .. cHit
        end
    else
        cHitString = cHitString .. red .. cHit
    end
    cHitString = cHitString .. "% |r |cff" .. white
pallid venture
#

The warcraft.wiki.gg page regarding Cap is a fun read for theorycrafting. You trying to calc the hard cap or soft cap?

#

These seem a good candidate for Conditions to set the color

willow echo
pallid venture
#

ok. i can study that. 🧡

#

knowing you intended stuff based on target gives me some ideas to work with, certainly.

what do you want it to show when player isn't targeting anyone?

willow echo
#

I believe I just had it show base values (e.g. whatevers on the character sheet).

pallid venture
#

magey's page is last updated july 2022. but that might be enough to get your guildies valid results. I'll have to ingest this over a day or two. hope thats OK

willow echo
#

Im not asking anything of you sir 🙂 If you're taking this on, you're welcome to inherit it

pallid venture
#

alrighty then ✨

willow echo
glacial lake
#

In-game, mouseovering the text box

willow echo
# glacial lake In-game, mouseovering the text box

Doesn't seem to show the full list though. I broke down and installed the PTR client. Cringe! 😄 For example above @pallid venture showed %1.hitpercent but not only is that not in the docs (as far as I can tell) its also not in the in-game tooltip.

glacial lake
#

it does show all available options

willow echo
willow echo
pallid venture
#

I'm intrigued to see if i can do it by scratch but the modern way, so as not to burn a hole in your past guildies' CPUs.

i do play, just more retail than Cata, so am fitting it around other things in my life.

TLDR i don't mind!! i'm just sliw ::)