Maintenance for the week of December 16:
• PC/Mac: No maintenance – December 16
• NA megaservers for patch maintenance – December 17, 4:00AM EST (9:00 UTC) - 12:00PM EST (17:00 UTC)
• EU megaservers for patch maintenance – December 17, 9:00 UTC (4:00AM EST) - 17:00 UTC (12:00PM EST)
The issues on the North American megaservers have been resolved at this time. If you continue to experience difficulties at login, please restart your client. Thank you for your patience!

Combat Log Statistics

RussSTi
RussSTi
Soul Shriven
I have been using Combat Log Statistics for a while now. I really like the way is has a DPS meter and a Scrolling window for EXP. In particular the EXP is useful for crafting to sort out the most efficient way to level. The Addon used to show the amount of the EXP and the precent of the level that you were at after the gain. Unfortunately 1.2.X has messed up the percentages so they are like -73459603.67%. Also it seems the developer has not responded to comments on the Addon for months, so I don't expect an update from them.

Can any one recommend how to fix this or another Addon that works in a similar manner?
  • zgrssd
    zgrssd
    ✭✭✭✭
    Tested it. Have the same, but am gettinga unlikely high number:
    74012017.43%

    Propably faulty math running into buffer overflow. I take a look at the code.

    Edit: I am currently not capable of understanding his code. I will propably need some time to even get what he is trying to do and how.
    I am just going to repost it on the esoui forum.
    Edited by zgrssd on July 6, 2014 12:25PM
    Elana Peterson (EU), Dominion, Imperial Sorc, Rune & Alchemy Crafting Char
    Leonida Peterson (EU), Daggerfall, Kajiit Nightblade, Tank & main Crafter
    Kurga Peterson (EU), Ebonhart, Ork Dragonknight, Provision Mule
    Coldblood Peterson (EU) Argonian Templer, Daggerfall, Healer
    Incendia Peterson (EU), Dominion, Dunmer Dragonknight, fire DPS & healer
    Haldor Belendor (EU), Ebonhart, Breton Sorcerer, Tank
    Fuliminictus Peterson (EU), Ebonhart, Altmer Sorcerer, Electric DPS

    Me babbling about PvE roles and Armor, Short Guide to Addon Programming (for Programmers)

    If you think anything I or somebody else said violates the Rules of this Forum, you are free to flag my posts. Till I get any notifcaion from this, I just asume you know you have no case against me or Zenimax disagrees with you.
  • Garkin
    Garkin
    ✭✭✭
    It's not fully tested, but it seems to be working so far.

    Replace function FCL.NewSkill in Combat Log Statistic.lua with:
    function FCL.NewSkill(eventCode, Category, Type, MinXP, MaxXP, CurrentXP)
    	local diff = 0
    	local inLevel = 0
    	local display = ""
    
    	if (FCL.SkillsXP[Category][Type][3] >= CurrentXP) or (FCL.SkillsXP[Category][Type][3] == nil) then return end
    	if (FCL.CText.Skills[Category][Type] == false) then return end
    
    	diff = CurrentXP - FCL.SkillsXP[Category][Type][3]
    	if FCL.SkillsXP[Category][Type][2] < CurrentXP then
    		FCL.SkillsXP[Category][Type] = {GetSkillLineXPInfo(Category, Type)}
    	else  
    		FCL.SkillsXP[Category][Type][3] = CurrentXP
    	end
    	inLevel = FCL.SkillsXP[Category][Type][2] - FCL.SkillsXP[Category][Type][1] 
    	percent = string.format( "%.2f" ,((CurrentXP - FCL.SkillsXP[Category][Type][1])/inLevel)*100)
    	display = "|cc8ff3a+" .. diff .. " " .. FCL.SkillXPNames[Category][Type] ..  " (" .. percent .. "%)"
    
    	if (FCL.CText.Time == true) then
    		table.insert(FCL.CText.You, 1, "[" ..GetTimeString() .. "]" .. display)
    	else	
    		table.insert(FCL.CText.You, 1, display)
    	end
    
    	if FCL.CText.Chat == true then
    		d(FCL.CText.You[1])
    	end
    
    	if FCL.Hiden == "You" then
    		FCL.FadeTime = GetGameTimeMilliseconds()
    		for i = 1, FCL.CText.MaxLines do
    			if FCL.CText.You[FCL.Value + i] ~= nil then
    				_G["CombatLog_Textbox"..i]:SetText(FCL.CText.You[FCL.Value + i])
    			end
    		end		
    	end
    
    end
    

    And in function FCL.NewExp replace XP_REASON_FINESSE with PROGRESS_REASON_FINESSE.

    EDIT:
    fixed formula for percent
    Edited by Garkin on July 8, 2014 1:34PM
    Garkin / EU / CSF guild
    My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, No, thank you, ... (full list)
    I'm taking care of: Azurah - Interface Enhanced, Srendarr - Aura, Buff & Debuff Tracker and more
    My folder with updated/modified addons: DROPBOX
  • RussSTi
    RussSTi
    Soul Shriven
    @Garkin‌, I tried this and it is very very close to how it worked before. IT now shows the percent that amount of experience gained equals. Before it would show the total precent of that level completed after experience gained.

    So if it took 10,000 points to get to the next level and you already had 8,000 and then did an action where you gained 1,000, it would display "90%" because you had 9,000/10,000 points. I hope that makes sense.
  • Garkin
    Garkin
    ✭✭✭
    Ah, my mistake. There is a wrong formula for percent. Correct code:
    percent = string.format( "%.2f" ,((CurrentXP - FCL.SkillsXP[Category][Type][1])/inLevel)*100)
    

    I have corrected code I have posted before.

    EDIT: Added missing parenthesis.
    Edited by Garkin on July 8, 2014 1:33PM
    Garkin / EU / CSF guild
    My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, No, thank you, ... (full list)
    I'm taking care of: Azurah - Interface Enhanced, Srendarr - Aura, Buff & Debuff Tracker and more
    My folder with updated/modified addons: DROPBOX
  • RussSTi
    RussSTi
    Soul Shriven
    Thanks Garkin, you are awesome. I don't write code but I thought that was where the problem was. Only thing is the more I played with it the more I messed it up. ;) Now that the server is down I will try it out again later.
    Edited by RussSTi on July 7, 2014 6:36PM
  • Syntse
    Syntse
    ✭✭✭✭✭
    Awesome community work. I will bookmark this thread and fix the CLS for me once I get home.

    Big thanks!
    Syntse Dominion Khajiit Dragonknight Stamina Tank [50]
    Ra'Syntse Dominion Khajiit Nightblade Magica DPS [50]
    Syntselle Dominion Dark Elf Dragonknight Magica DPS [50]
    Syntseus Dominion Imperial Templar Healer [50]
    Syntsetar Dominion High Elf Sorcerer Magica DPS [50]
    Friar Tuktuk Daggerfall Brenton Templar Healer [50]
    Syntseyn Ebonheart Brenton Nightblade Magica DPS [50]
  • RussSTi
    RussSTi
    Soul Shriven
    @Garkin‌ thanks again. The most current iteration was close but it showed a crazy number again. I was able to figure out that there was a set of parenthesis missing in the formula. Also I have added back the display of the percent gained. So now it shows how far along in that level and how much that action gained. Good Stuff! Below is what it looks like after my changes. Like I said I don't code so this was a big deal for me.

    inLevel = FCL.SkillsXP[Category][Type][2] - FCL.SkillsXP[Category][Type][1] 
    	percent = string.format( "%.2f" ,((CurrentXP - FCL.SkillsXP[Category][Type][1])/inLevel)*100)
    	percentgain = string.format( "%.2f" ,(diff/inLevel)*100)
    	display = "|cc8ff3a+" .. diff .. " " .. FCL.SkillXPNames[Category][Type] ..  " (" .. percent .. "%) (" ..percentgain .. "%)"
    


    Now if I could just figure out why the most recent action doesn't show and you have to wait for another action to scroll it down to see it that would be awesome. This seems to be something affecting the whole addon not just the crafting actions. I imagine that will be way out of my league but this exercise has helped me understand a little about the code and syntax.
  • Garkin
    Garkin
    ✭✭✭
    To be honest, I made a bit more changes, and when I went to update this post I tried to figure out what I have done. :)

    If you are interested this is what I have changed:
    function FCL.NewSkill(eventCode, Category, Type, MinXP, MaxXP, CurrentXP)
        local diff = 0
        local skillXP, skillName
        local display = ""
    
        FCL.SkillsXP[Category] = FCL.SkillsXP[Category] or {}
        FCL.SkillXPNames[Category] = FCL.SkillXPNames[Category] or {}
    
        skillXP = FCL.SkillsXP[Category][Type]
        skillName = FCL.SkillXPNames[Category][Type]
    
        if skillXP == nil then
            FCL.SkillsXP[Category][Type] = {GetSkillLineXPInfo(Category, Type)}
            skillXP = FCL.SkillsXP[Category][Type]
        end
        if skillName == nil then
            FCL.SkillXPNames[Category][Type] = (GetSkillLineInfo(Category, Type))
            skillName = FCL.SkillXPNames[Category][Type]
        end
    
        if (skillXP[3] >= CurrentXP) or (skillXP[3] == nil) then return end
        if FCL.CText.Skills[Category][Type] == false then return end
    
        diff = CurrentXP - skillXP[3]
        if skillXP[2] < CurrentXP then
            skillXP = {GetSkillLineXPInfo(Category, Type)}
        else
            skillXP[3] = CurrentXP
        end
    
        percent = ("%.2f"):format(((CurrentXP - skillXP[1])/(skillXP[2] - skillXP[1]))*100)
        display = zo_strformat("|cc8ff3a+<<1>> <<2>> (<<3>>%)|r", diff, skillName, percent)
    
        if (FCL.CText.Time == true) then
            table.insert(FCL.CText.You, 1, "[" ..GetTimeString() .. "]" .. display)
        else
            table.insert(FCL.CText.You, 1, display)
        end
    
        if FCL.CText.Chat == true then
            d(FCL.CText.You[1])
        end
    
        if FCL.Hiden == "You" then
            FCL.FadeTime = GetGameTimeMilliseconds()
            for i = 1, FCL.CText.MaxLines do
                if FCL.CText.You[FCL.Value + i] ~= nil then
                    _G["CombatLog_Textbox"..i]:SetText(FCL.CText.You[FCL.Value + i])
                end
            end
        end
    
    end
    
    function FCL.NewExp( eventCode, unitTag, currentExp, maxExp, reason )
        local display = ""
    
        -- Bail if it's not earned by the player
        if ( unitTag ~= "player" ) then return end
    
        -- Don't display experience for veteran characters
        if ( eventCode == EVENT_EXPERIENCE_UPDATE and IsUnitVeteran('player') ) then return end
    
        -- Ignore finesse bonuses, they will get rolled into the next reward
        if ( reason == PROGRESS_REASON_FINESSE ) then return end
    
        -- Get the base experience
        local base = IsUnitVeteran('player') and FCL.VetXP or FCL.XP
    
        -- Calculate the difference
        local diff     = currentExp - base
    
        -- Record Gains for current Game-play
        FCL.XPGain = FCL.XPGain + diff
    
        -- Ignore zero experience rewards
        if ( diff  <= 0 ) then return end
    
        -- Only show if wanted
        if ( FCL.CText.XP == false ) then return end
    
        -- Update the base experience
        if ( IsUnitVeteran('player') ) then
            display = "|c75d3ff+" .. diff .. " Veteran Points"
            FCL.VetXP = currentExp
        else
            display = "|c75d3ff+" .. diff .. " Experience Points"
            FCL.XP = currentExp
        end
    
        -- Puts in time stamp from button
        if ( FCL.CText.Time == true ) then
            table.insert(FCL.CText.You, 1, "[" .. GetTimeString() .. "]" .. display)
        else
            table.insert(FCL.CText.You, 1, display)
        end
    
        if FCL.Hiden == "You" then
            for i = 1, FCL.CText.MaxLines do
                if FCL.CText.You[FCL.Value + i] ~= nil then
                    _G["CombatLog_Textbox"..i]:SetText(FCL.CText.You[FCL.Value + i])
                end
            end
        end
    
    end
    
    function FCL.CharacterStats()
        FCL.CName = GetUnitName( 'player' )
        FCL.XP = GetUnitXP('player')
        FCL.VetXP = GetUnitVeteranPoints('player')
    
       FCL.SkillsXP = {}
       FCL.SkillXPNames = {}
       for skillType = 1, GetNumSkillTypes() do
          FCL.SkillXPNames[skillType] = {}
          FCL.SkillsXP[skillType] = {}
          for skillLine = 1, GetNumSkillLines(skillType) do
             FCL.SkillXPNames[skillType][skillLine] = (GetSkillLineInfo(skillType, skillLine))
             FCL.SkillsXP[skillType][skillLine] = {GetSkillLineXPInfo(skillType, skillLine)}
          end
       end
    end
    
    Garkin / EU / CSF guild
    My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, No, thank you, ... (full list)
    I'm taking care of: Azurah - Interface Enhanced, Srendarr - Aura, Buff & Debuff Tracker and more
    My folder with updated/modified addons: DROPBOX
  • Syntse
    Syntse
    ✭✭✭✭✭
    @Garkin awesome stuff you do even though it's not your project but someones abandoned project. You should maybe take over it ;) I also use couple others of your add-ons SkyShards and LoreBooks.

    I love this add-on mostly of it's way of showing the log which reminds me so much of the days when I played MUD. Also it had great bonus being able to output to the chat window so I could minimize the glutter.

    Though later on stopped using chat window output and used the own window as gained more friends in game and needed to see what they chatted.
    Syntse Dominion Khajiit Dragonknight Stamina Tank [50]
    Ra'Syntse Dominion Khajiit Nightblade Magica DPS [50]
    Syntselle Dominion Dark Elf Dragonknight Magica DPS [50]
    Syntseus Dominion Imperial Templar Healer [50]
    Syntsetar Dominion High Elf Sorcerer Magica DPS [50]
    Friar Tuktuk Daggerfall Brenton Templar Healer [50]
    Syntseyn Ebonheart Brenton Nightblade Magica DPS [50]
  • Garkin
    Garkin
    ✭✭✭
    Edited by Garkin on July 8, 2014 8:25PM
    Garkin / EU / CSF guild
    My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, No, thank you, ... (full list)
    I'm taking care of: Azurah - Interface Enhanced, Srendarr - Aura, Buff & Debuff Tracker and more
    My folder with updated/modified addons: DROPBOX
  • Vuron
    Vuron
    ✭✭✭✭✭
    Garkin wrote: »

    Thanks for stepping up and putting in the effort. Your contributions don't go unnoticed by the community.
  • sylviermoone
    sylviermoone
    ✭✭✭✭✭
    Thank you, thank you to all in this thread who worked on updating this add on!!

    Query: I've noticed since the last couple of patches that my opening attacks are generally not showing up in the log. Do the changes take care of that?
    Co-GM, Angry Unicorn Traders: PC/NA
    "Official" Master Merchant Tech Support
    and Differently Geared AF
    @sylviermoone
Sign In or Register to comment.