KuiNameplates

KuiNameplates

11M Downloads

%HP with Decimal Numbers

Kueckling opened this issue · 2 comments

commented

Hi,

is there a way to Set enemy HP shown as % with Decimal numbers? like 55.1% instead of only showing 55%?

Thanks

commented

This is my biggest complaint about kui...

PLEASE, can we get this as a feature????

commented

Hey!

Not sure if this is still relevant but I played around with the codebase a bit and changed following file: Kui_Nameplates_Core/create.lua. In there is a function called: HealthDisplay_Percent. I changed the function to have following code:

    local function HealthDisplay_Percent(s)
        return format('%.2f',s.health_per)..HEALTH_TEXT_PERCENT_SYMBOL
    end

This will then change the Nameplate to always show two decimals (if you only wanna have 99.1 then change the %.2f to %.1f ) instead of only formatting it with decimals when the target has less than 1%.

Not sure if this somehow breaks anything else or consumes more CPU 🤷🏻