Thread Tools Display Modes
07/06/14, 06:31 AM   #1
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
CLS needs a patch (and I can't do it)

On the main Forum someone said that CLS "crafting inspisration tracking" element was not working properly. Specifically it told totally irational values for "precentage till next level" (like -7 billion percent). I checked that and it indeed does (even on a clean install):
http://forums.elderscrollsonline.com...tistics#latest

The author has not logged in esoui for about 1 month.

I took a look at the code but cannot make heads or tail out of the code at my current level. Could anybody who understand the area of Inpsiration tracking a bit better take a look at it?
  Reply With Quote
07/06/14, 10:09 AM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
It's not fully tested, but it seems to be working so far.

Replace function FCL.NewSkill in Combat Log Statistic.lua with:
Lua Code:
  1. function FCL.NewSkill(eventCode, Category, Type, MinXP, MaxXP, CurrentXP)
  2.     local diff = 0
  3.     local inLevel = 0
  4.     local display = ""
  5.  
  6.     if (FCL.SkillsXP[Category][Type][3] >= CurrentXP) or (FCL.SkillsXP[Category][Type][3] == nil) then return end
  7.     if (FCL.CText.Skills[Category][Type] == false) then return end
  8.  
  9.     diff = CurrentXP - FCL.SkillsXP[Category][Type][3]
  10.     if FCL.SkillsXP[Category][Type][2] < CurrentXP then
  11.         FCL.SkillsXP[Category][Type] = {GetSkillLineXPInfo(Category, Type)}
  12.     else  
  13.         FCL.SkillsXP[Category][Type][3] = CurrentXP
  14.     end
  15.     inLevel = FCL.SkillsXP[Category][Type][2] - FCL.SkillsXP[Category][Type][1]
  16.     percent = string.format( "%.2f" , ((CurrentXP - FCL.SkillsXP[Category][Type][1])/inLevel)*100)
  17.     display = "|cc8ff3a+" .. diff .. " " .. FCL.SkillXPNames[Category][Type] ..  " (" .. percent .. "%)"
  18.  
  19.     if (FCL.CText.Time == true) then
  20.         table.insert(FCL.CText.You, 1, "[" ..GetTimeString() .. "]" .. display)
  21.     else   
  22.         table.insert(FCL.CText.You, 1, display)
  23.     end
  24.  
  25.     if FCL.CText.Chat == true then
  26.         d(FCL.CText.You[1])
  27.     end
  28.  
  29.     if FCL.Hiden == "You" then
  30.         FCL.FadeTime = GetGameTimeMilliseconds()
  31.         for i = 1, FCL.CText.MaxLines do
  32.             if FCL.CText.You[FCL.Value + i] ~= nil then
  33.                 _G["CombatLog_Textbox"..i]:SetText(FCL.CText.You[FCL.Value + i])
  34.             end
  35.         end    
  36.     end
  37.  
  38. end

And in function FCL.NewExp replace XP_REASON_FINESSE with PROGRESS_REASON_FINESSE.

Last edited by Garkin : 07/08/14 at 07:40 AM. Reason: corrected "percent"
  Reply With Quote
07/06/14, 10:33 AM   #3
d2allgr
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 3
Based on the documentation on the wiki for EVENT_SKILL_XP_UPDATE I would suggest changing FCL.NewSkill to:
Lua Code:
  1. function FCL.NewSkill(eventCode, Category, Type, reason, rank, previousXP, CurrentXP)
  2.     local diff = 0
  3.     local display = ""
  4.    
  5.     --d(Category .. "//" .. Type .. "//" .. CurrentXP .. "//" .. MaxXP .. "//" .. FCL.SkillsXP[Category][Type][3])
  6.    
  7.     if (FCL.SkillsXP[Category][Type][3] == CurrentXP) or (FCL.SkillsXP[Category][Type][3] > CurrentXP) or (FCL.SkillsXP[Category][Type][3] == nil) then return end
  8.     if (FCL.CText.Skills[Category][Type] == false) then return end
  9.    
  10.  
  11.     diff = CurrentXP - previousXP
  12.     lastRankXp, nextRankXP  = GetSkillLineXPInfo(8,Type)
  13.     cLevelXP = nextRankXP - lastRankXp
  14.     percent = string.format( "%.2f" , (CurrentXP/cLevelXP)*100)
  15.     SkillName   = GetSkillLineInfo(8,Type)
  16.     display = "|cc8ff3a+" .. diff .. " " .. SkillName ..  " (" .. percent .. "%)"
  17.  
  18.     FCL.SkillsXP[Category][Type][3] = CurrentXP
  19.  
  20.    
  21.     if (FCL.CText.Time == true) then
  22.         table.insert(FCL.CText.You, 1, "[" ..GetTimeString() .. "]" .. display)
  23.     else   
  24.         table.insert(FCL.CText.You, 1, display)
  25.     end
  26.    
  27.     if FCL.CText.Chat == true then
  28.         d(FCL.CText.You[1])
  29.     end
  30.    
  31.     if FCL.Hiden == "You" then
  32.         FCL.FadeTime = GetGameTimeMilliseconds()
  33.         for i = 1, FCL.CText.MaxLines do
  34.             if FCL.CText.You[FCL.Value + i] ~= nil then
  35.                 _G["CombatLog_Textbox"..i]:SetText(FCL.CText.You[FCL.Value + i])
  36.             end
  37.         end    
  38.     end
  39.    
  40. end

although I would trust Garkin to know better than me in the subject

Only standard notation on the actual parameters to the event seem to be for the first three only (as used in the ESOUI official module inside game0000.dat). The rest/number of parameters seem to vary from module to module.
  Reply With Quote
07/08/14, 02:01 PM   #4
katkat42
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 155
Okay, I fixed a few things and posted a patch, here.
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » CLS needs a patch (and I can't do it)


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off