Thanks for the help! Now I have run into a new issue since I started coding.
I am trying to get the item stats so that I can begin to use them in calculations. However, i cant seem to even get a stat out using getitemstats(). To simplify troubleshooting the table and ability to pull stats I have simply made a table, tried to populate it, and am trying to display a stat value. Once I do this, I know I am getting the stats and can then move on to using them in calculations. Code is below.
Code:
function TipTypeFuncs:item(linkToken,id)
local owner = self:GetOwner();
local _, _, _, itemLevel, _, _, _, itemStackCount, _, itemTexture = GetItemInfo(id);
--EP MOD by Dagodz
var stats = {};
GetItemStats(id, stats);
local itemstamina = stats[ITEM_MOD_STAMINA_SHORT];
-- Icon
if (self.SetIconTextureAndText) and (not cfg.if_smartIcons or not (owner.hasItem or owner.link or owner.action)) then
local count = itemStackCount and itemStackCount > 1 and (itemStackCount == 0x7FFFFFFF and "#" or itemStackCount) or "";
self:SetIconTextureAndText(itemTexture,count);
end
-- level + id
if (cfg.if_showItemLevelAndId) then
self:AddLine(format("ItemLevel: %d, ItemID: %d",itemLevel or 0,id or 0),unpack(cfg.if_infoColor));
self:AddLine(format("Item Stamina: %d,itemstamina or 0,),unpack(cfg.if_infoColor));
self:Show();
end
end
My ultimate goal here for the first phase of this mod is to take the stats from an item and run them through a calculation function to then present the EP value on to a tooltip. I use TipTac and have started modifying it for myself. Thanks for any help.