This is what I have now:
#--------#Script By: Bloodmorphed#Difficulty Script v1.0##Change Log:#v1.0#Simple version. Checks difficulty and multiplies based on the difficulty, also#easily modified.####--------#-----------------# Determines what variable, and the multiplier based on difficulty## Feel free to edit these. Make sure you are using the right variable!#-----------------module Blood Difficulty_Settings = { #don't touch :easy => [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], :normal => [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], :hard => [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0], :insane => [4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0], } #don't touch #-------------------------------------------------------------- # Variable to use. #-------------------------------------------------------------- module Variable Difficulty_Variable = 100 # Which variable to use? Default is 100 end #ends variableend #ends Blood #===============================================================================class Game_Enemy#=============================================================================== #----------------------------------------------------------------------------- # List Of Aliased Methods #----------------------------------------------------------------------------- alias :bloody_param :param #----------------------------------------------------------------------------- # Method to determine value of enemies params based on difficulty. #----------------------------------------------------------------------------- def param(param_id) case $game_variables[Blood::Variable::Difficulty_Variable] when 0 (bloody_param(param_id) * Blood::Difficulty_Settings[:easy][param_id]).to_i when 1 (bloody_param(param_id) * Blood::Difficulty_Settings[:normal][param_id]).to_i when 2 (bloody_param(param_id) * Blood::Difficulty_Settings[:hard][param_id]).to_i when 3 (bloody_param(param_id) * Blood::Difficulty_Settings[:insane][param_id]).to_i end #ends case end #ends defend #ends class
Thank you Dekita for that!
But the way it's set up now, I have no idea how to do sparams, which is where the Experience Rate is....
[Ace] Adding Experience Rate modifier to a parameter script
● ARCHIVED · READ-ONLY
-
-
no need to modify the sparams directly if you only wish to modify the exr rate. Just modify the 'exp' method within the game_enemy class directly, like this
#-------------------------------------------------------------------------- # * Get Experience #-------------------------------------------------------------------------- alias :exp_alias :exp def exp case $game_variables[500] when 0 then exp_alias * Blood::Exp_Setting[:easy] when 1 #... end endObviously you would have to make a new hash for the exp difficulty modifications within your module. :) -
Final Script:
#--------#Script By: Bloodmorphed#Difficulty Script v1.0##Change Log:#v1.0#Simple version. Checks difficulty and multiplies based on the difficulty, also#easily modified.####--------#-----------------# Determines what variable, and the multiplier based on difficulty## Feel free to edit these. Make sure you are using the right variable!#-----------------module Blood Difficulty_Settings = { #don't touch :easy => [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], :normal => [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], :hard => [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0], :insane => [4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0], } #don't touch Exp_Settings = { #don't touch :easy => 0.5, :normal => 1, :hard => 2, :insane => 4, }# don't touch #-------------------------------------------------------------- # Variable to use. #-------------------------------------------------------------- module Variable Difficulty_Variable = 100 # Which variable to use? Default is 100 end #ends variableend #ends Blood #===============================================================================class Game_Enemy#=============================================================================== #----------------------------------------------------------------------------- # List Of Aliased Methods #----------------------------------------------------------------------------- alias :bloody_param :param #----------------------------------------------------------------------------- # Method to determine value of enemies params based on difficulty. #----------------------------------------------------------------------------- def param(param_id) case $game_variables[Blood::Variable::Difficulty_Variable] when 0 (bloody_param(param_id) * Blood::Difficulty_Settings[:easy][param_id]).to_i when 1 (bloody_param(param_id) * Blood::Difficulty_Settings[:normal][param_id]).to_i when 2 (bloody_param(param_id) * Blood::Difficulty_Settings[:hard][param_id]).to_i when 3 (bloody_param(param_id) * Blood::Difficulty_Settings[:insane][param_id]).to_i end #ends case end #ends def #-------------------------------------------------------------------------- # * Get Experience #-------------------------------------------------------------------------- alias :blood_exp :exp def exp case $game_variables[500] when 0 then blood_exp * Blood::Exp_Settings[:easy] when 1 then blood_exp * Blood::Exp_Settings[:normal] when 2 then blood_exp * Blood::Exp_Settings[:hard] when 3 then blood_exp * Blood::Exp_Settings[:insane] end #end case end #end defend #ends class
Thank you Dekita so much! Especially for being patient with me -
Yep, that's what I did in mine too! Though, one warning...this will round the number down (or at least it did in mine), so if the calculation ever gives 0.5 for instance, it will give 0 EXP. Just something to keep in mind for your easy setting.
-
Some things I would maybe do, just to make it flow a little neater, would be
1 - change the name of Difficulty_Settings in the module to 'Param_Settings' or something more descriptive.
2 - make a method for calling "(bloody_param(param_id) * Blood::Difficulty_Settings[:easy][param_id]).to_i"
something like this...
def param(param_id) case $game_variables[Blood::Variable::Difficulty_Variable] when 0 then (bloody_param(param_id) * param_diff_mod:)easy,param_id)).to_i #... end #ends case end #ends def def param_diff_mod(type,param_id) Blood::Difficulty_Settings[type][param_id] endAlso - seeing as its a difficulty script, you could modify the gold as well. like, harder setting = less gold gained. using the 'gold' method in Game_Enemy would be fine for that :)
Edit:
That would only happen if you where trying to give 1 exp or less before the modification though :)Yep, that's what I did in mine too! Though, one warning...this will round the number down (or at least it did in mine), so if the calculation ever gives 0.5 for instance, it will give 0 EXP. Just something to keep in mind for your easy setting. -
Which I actually do in my game. I wanted really slow leveling in my game, and the way RPGMaker has us modify the EXP curve is pretty crazy in my opinion, so I just settled on using the default curve, but a lot of 1 exp monsters early on in the game. But, if he doesn't have any 1 EXP monsters in his game, nothing to worry about!That would only happen if you where trying to give 1 exp or less before the modification though :)
Edit: Also, if you have say 4 1 EXP monsters, the battle gives 0 EXP, not 2 like you at first expect. This is because it first computes the EXP per battler as 1 * 0.5, or 0, then 4 * 0 = 0 total EXP earned. I actually have my insane difficulty on 50% of EXP earned, and this very thing happens in the game, but that was also my intended effect as well.
Here my code if you are curious. Maybe something to compare with when you are done? Its not documented yet, but the rest of it is done. http://pastebin.com/GavUmfst -
Personally, I prefer the pokemon style exp calculations. I guess that is why I've written so many scripts to change things to their calculations :p
Also, @bgillisp, there is not need for you to overwrite any of those methods within your script imo. You could raise overall compatibility by simply aliasing the old method and using that in your formulas. -
Hmmm...I'd be interested in how to make it work with an alias, as calling the old function at all has it return the old value, with no calculations. Maybe call it and store it? Is that what you would recommend?
-
I would just use the alias directly within the new formula.its going to retun a value anyway, so it can easily be calculated.
Something like...
alias :exp_alias :expdef exp ((exp_alias * Modifier_Value)+1).to_iendThe plus 1 would ensure your will always gain at least 1 exp :) -
Didn't think of that, thanks!
-
Nice! Well I added gold, and put the +1 thingy, so it wouldn't reach 0.
I think this script is as good as it can be, minus the little simple mod you did to it Dekita. I really don't see a point doing that right now, unless I plan on making a lot more edits.
Thanks again for your help! -
No problem :)
As I said, param modifications are my absolute favorite :D