The following changes to MenuStatBar::render() fixes the issue with big numbers. Note that one goes in each orientation section, one using bar_pos.w and the other bar_pos.h
P.S. I just realized the current download is still 0.18 so these fixes may already be in 0.19. :P To check, just go to a saved game save and change xp to 2000000000 (2 Billion). Then to check the overflow issue, set the miners to give 100000000 XP (100 Million) and go kill a few.
(Deleted)
The class list for new characters comes from:
mods/fantasycore/engine/classes.txt
To see Warrior instead of Brute, just override classes.txt.
Pur
(Main Branch)
The following changes to MenuStatBar::render() fixes the issue with big numbers. Note that one goes in each orientation section, one using bar_pos.w and the other bar_pos.h
else bar_length = (1.0 * stat_cur) * (1.0*bar_pos.w) / (1.0*stat_max);
else bar_length = (1.0 * stat_cur) * (1.0*bar_pos.h) / (1.0*stat_max);
Pur
P.S. I just realized the current download is still 0.18 so these fixes may already be in 0.19. :P To check, just go to a saved game save and change xp to 2000000000 (2 Billion). Then to check the overflow issue, set the miners to give 100000000 XP (100 Million) and go kill a few.
Ding! Level 17!
LOL
That's what you get when you add the following to CampaignManager::rewardXP
hero->xp += (amount * (100 + hero->effects.bonus_xp)) / 100;
if (hero->xp < 0) hero->xp = std::numeric_limits<int>::max(); /* added */
hero->refresh_stats = true;
and of course the include at the top:
#include <limits>
If it's already fixed then just ignore me.
Pages