Press Play
2011-12-21 01:42:07
I'm not quite sure where to post this or if it's been menioned before but.. should the function stats_IncVariable(varName: String, value: Integer) be changed so that 'value' is an extended type? This would encompass experience points with decimals.
Otherwise, I'll quite happily round my decimal to an integer :)
Why?
Rs counts xp to round numbers…
Press Play
2011-12-22 08:58:04
That's not what it says on the wiki :S I don't believe you are correct, because I think internally, they are decimals.. Ever made something like cannonballs? The xp counter alternates between 25 and 26 xp points. Which would mean you are give 25-point-something xp for each bar..
I don't really mind though :P It'd just improve accuracy hahah
Borland
2011-12-22 09:15:46
You can gain half exps like as you mentioned, cannonballs. But they are displayed as integers, even on the stats tab, it doesn't say xxxxx.5 till you make the next ball.
If you don't need to know the decimal in-game, there's no reason to need to know it from a script. Also, if it was extended, the only way it'd know if it gained a decimal of experience would be if there was a list of everything that can give .5 or w/e of exp. You can't grab this info from the game as it's displayed rounded.
Not worth the hassle of doing that over whether its 25.5 or 25 then 26
weequ
2011-12-22 09:27:13
Just Inc your xp by 25 every other time and 26 every another.
Nava2
2011-12-22 12:04:46
var
XPMod: Integer;
procedure updateWithHalfMod(var x: Integer);
begin
x := x + XPMod;
XPMod := (XPMod + 1) mod 2;
end;