Sorry for the late reply. I found the problem though. It seems that status bar are not taking custom variables for some reason now. I made a feature for the rested xp part of the bar. I currently re-formatted my computer and I do not have the OOBE software installed. Here is the code for the fractional variable feature though.
Code:
RDX.RegisterFeature({
name = "Variable: Rested XP (frxp)";
category = i18n("Variables: Unit Status");
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
if state:Slot("Var_frxp") then return nil; end
return true;
end;
ExposeFeature = function(desc, state, errs)
state:AddSlot("Var_frxp");
state:AddSlot("FracVar_frxp");
return true;
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code) code:AppendCode([[
local rxp = GetXPExhaustion();
local cxp = UnitXP(uid);
local cmxp = UnitXPMax(uid);
local lrxp = 0;
if not rxp then
lrxp = 0;
end
if rxp then
if (rxp > cmxp) then
lrxp = cmxp;
elseif (rxp + cxp) < cmxp then
lrxp = cxp + rxp;
end
frxp = format("%.2f", (lrxp/cmxp));
end
]]); end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("XP");
mux:Event_UnitMask("UNIT_XP_UPDATE", mask);
end;
UIFromDescriptor = VFL.Nil;
CreateDescriptor = function() return { feature = "Variable: Rested XP (frxp)" }; end
});
Just add that to the bottom of the autoexec file. Then edit the uf_gamestats object, drag in the new variable "Frac Rested XP ("frxp")" and make the last status bar that should be yellow point to the frxp variabe.