Cutting off decimal points

I want to avoid showing decimal points in some of the variables in the stat screen.

Basically, I now have a variable called “hit points”, but if I do fairmath on it I end up with 13.4666666666 hit points, which doesn’t look very nice. Is there any way to avoid showing so many decimal points? Or better to just display it as a health bar?


That’s weird. Fairmath will always produce rounded up/down value.
Well, the manual code is *set varname round(varnamehere), if you want to go that way.


Wait, I though fairmath automatically rounded… :confused: But do you really want to use fairmath for hitpoints? You’d never get down to 0… (I mean, not that that’s a problem, I always think dying in a CoG due to losing hitpoints is a pretty terrible ending, but still…)


*round(number) will round it to the nearest integer.

If you want a health bar, you could set an initial health of 100 and subtract from that, and display it like any other stat bar.

Edit: Missed the fairmath thing but agree with it. (Good morning all)

1 Like

Following on from catorrina, if you just want to change how they’re displayed:

*set displayhp round(hitpoints)

You have ${displayhp} health left.

Morning :raised_hand_with_fingers_splayed:t4:
Although, it’s night at here, but just as my professor said, “Everytime is glorious morning. Morning glory.”


Couldn’t comment on how fairmath is supposed to behave, but this will strip the decimals off without rounding:

*temp remainder 0
*set remainder (number modulo 1)
*set number (number-remainder)
1 Like