I am using todd's Difficulty Selection script, contained in this post (not a separate download)
http://forums.rpgmakerweb.com/index.php?/topic/2789-difficulty-selection/?p=99001
I see from a post that Todd has now more or less retired from scripting, which leaves a problem I posted about unresolved, and so am wondering if anyone else can help.
When you select a difficulty other than 'Normal' the script multiplies all enemy stats, Exp gained and gold dropped by a percentage. The problem is that this means that the player is told they have just gained e.g. 28.5899952 exp and 30.5 gold.
I would like to be able to show this as rounded figures. deilin also spotted this and proposed the following:
since you are multiplying decimals, you are getting decimals in outcomes. You need to add some .to_i if possible.
class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # * Get Base Value of Parameter #-------------------------------------------------------------------------- def param_base(param_id) case $difficulty when 0 (enemy.params[param_id] * TODDDIFFICULTY::EASYM).to_i when 1 enemy.params[param_id] when 2 (enemy.params[param_id] * TODDDIFFICULTY::HEROICM).to_i when 3 enemy.params[param_id] * TODDDIFFICULTY::HARDM else enemy.params[param_id] end endendor in the other case:
#--------------------------------------------------------------------------113. # * Get Base Value of Parameter114. #--------------------------------------------------------------------------115. alias todd_difficulty_gmen_param_base param_base116. def param_base(param_id, *args)117. n1 = todd_difficulty_gmen_param_base(param_id, *args)118. n2 = case $game_system.todd_difficulty119. when 0 then TODDDIFFICULTY::EASYM120. when 1 then 1121. when 2 then TODDDIFFICULTY::HEROICM122. when 3 then TODDDIFFICULTY::HARDM123. end124. return (n1 * n2).to_i125.endI think the first part of the suggestion is for the earlier version of the script, as mine lacks that section entirely, and I have tried altering what he suggests for line 124, but it still returns large decimals.
Does anyone have any idea how this might be fixed?
Thanks