じ☆ve冰风 发表于 2026-8-1 15:20:24

[Ace] Difficulty Script v5.0 **UPDATED****NEW**

I have been wanting to write a difficulty script for a long time now. With the help of Dekita it has finally happened. While it is extremely simple right now, I do plan on having some more features. I just don't know what to add really.
 
I will post the script here as it's very short, but if I end up do adding stuff, and it gets too long it will be put on pastebin, or something like that.

 
Here is the script:

Spoiler#=============================================================================##Script By: Bloodmorphed#Difficulty Script v3.5##Change Log:#v5.0# This is a decently big change. This version completely enables full#customization. There is no longer set in stone rules, if you want higher then#4 difficulties all you have to do is add them! I have also enabled you to use#more then 4 battlers for difficulties. You just have to change it where it#is needed.#It's Located in Script: Game_Party (Line 72) Change the return 4 to whatever.## Now a little bit how it works now.#    Param_Settings = { #don't touch#     Corresponding Params:#               MHP, MMP, ATK, DEF, MAT, MDF, AGI, LUK#      :easy => ,#      :normal => ,#      :hard => ,#      :insane => ,#      } #don't touch# This is the old way I have it, it will stay the same... unless you want to#change it. You can even change the name of them, for example :easy could be#renamed to :normal### Here is an example:#    Param_Settings = { #don't touch#     Corresponding Params:#               MHP, MMP, ATK, DEF, MAT, MDF, AGI, LUK#      :normal => ,#      :medium => ,#      :hard => ,#      :insane => ,#      :impossible = > ,#      } #don't touch## See how I changed the name of two, AND created another one? Yup that works.#Now, while this will work seamlessly for using the Party, very easily, you#have to know what the variable you will be corrisponds to what.##```NOTICE````NOTICE!!!!!!#If you change ANYTHING on one thing, you MUST change it on everything! #(otherwise you will either get errors, or weird changes)#If you re-name :easy in one thing, you must re-name it in all things. if you also#make a new difficulty, such as :impossible above, you MUST make it every where else, as well.#Everything must have the same order as well! If it is:#:normal :medium :hard in one category it must be the same for every category.#For example you cant have it like this :medium :normal :hard in one category and the other way in another!### Let's say this is our Enemy settings, which is set to 99 variable by default.## When this is set to 0 it pulls from :normal# 1 = :medium# 2 = :hard# See, easy, right? So be sure to if you do this by events and not party to#use the right setting you want to!###v4.0#Condensed the script down some (reduced some line lengths.)#Added an option to use the party size for the difficulty.##v3.6#Removed the "+1" from gold and XP to avoid confusion and so that if you put#0 in the database for XP or Gold it will be 0 rather then 1.##v3.5#Added TP Settings. CAUTION: Try not to set them higher then 5! It will get#broken past that! Based on actor getting hit only!###v3.0#I've added Actor params, and you can now disable Actor edits, and Enemy edits.#Putting these both to false will disable the script, if needed.## Note:#   You can use this script as you please, as long as you give credit! This#   script was made possible by massive help from Dekita.##=============================================================================##=============================================================================## Param_Settings is each param that will be modified. You may edit these as# you please. Keep in mind I have added something that will NEVER make these# reach 0.## Exp_Settings is the experience gained based on difficulty, normally people# use higher Experience the lower the difficulty, but this your choice!## Gold_Settings increases or decreases gold gain. Again most peopel would give# more gold the lower the difficulty, but again, it is your choice!## Keep in mind everything is MULTIPLIED! Not ADDED. To go lower, use 0.9 and# lower. For example## gold * 0.5 will be HALF of what it used to be.#=============================================================================#module Blood  #-----------------------------------------------------------------------------  #Putting these both to false will disable the script, if you ever need to.  #If you are going to use Use_Party, Use_Enemy must also be true!  #  #Note: If you use party for difficulty you do not need to setup a event!  #-----------------------------------------------------------------------------  Use_Enemy = true         #Use enemy edits? Default is true  Use_Actor = false        #Use actor edits? Default is false  Use_Party = false        #Use Party? Default is false  module Enemy    Param_Settings = { #don't touch      # Corresponding Params:      #        MHP, MMP, ATK, DEF, MAT, MDF, AGI, LUK      :easy => ,      :normal => ,      :hard => ,      :insane => ,      } #don't touch    Exp_Settings = { #don't touch      :easy => 2,               :normal => 1,             :hard => 0.8,      :insane => 0.5,    } #don't touch    Gold_Settings = { #don't touch    :easy => 2,    :normal => 1,    :hard => 0.8,    :insane => 0.5,    } #don't touch  end #ends Enemy  module Actor#=============================================================================## Param_Settings is each param that will be modified. You may edit these as# you please. Keep in mind I have added something that will NEVER make these# reach 0.## This part people usually go higher the easier difficulty, lower the higher.#=============================================================================#    Param_Settings = { #don't touch      # Corresponding Params:      #        MHP, MMP, ATK, DEF, MAT, MDF, AGI, LUK      :easy => ,      :normal => ,      :hard => ,      :insane => ,      } #don't touch         #=========================================================================      # TP Settings scales QUICKLY, do not go over 5, if you do it gets pretty      # broken. I didn't test this exstensively but it works well. This only      # effects the CHARGE of TP (Getting hit)      #      # easy default = 2      # normal default = 1      # hard default = 0.8      # insane default = 0.5      #=========================================================================    TP_Settings = { #don't touch      :easy => 2,      :normal => 1,      :hard => 0.8,      :insane => 0.5,      } #don't touch  end #ends Actor  #============================================================================#  # Variable to use. This variable will be used for the difficulty setting  #============================================================================#  module Variable    Enemy_Variable = 99  # Which to use for enemy/party. Default is 99    Actor_Variable = 100 # Which to use for actor. Default 100  end #ends variableend #ends Blood#==============================================================================## Do not edit anything past this point, unless you know what you are doing# edit at your own risk, just know that if you have no idea what you are doing,# you could break it.#==============================================================================#if Blood::Use_Party == true#===============================================================================  class Scene_Map < Scene_Base#===============================================================================  alias bloody_update update      #-------------------------------------------------------------------------      #Updates our party difficulty      #-------------------------------------------------------------------------      def update        bloody_update        update_difficulty      end #ends update      #-------------------------------------------------------------------------      #Increases, or decreses the Enemy_Variable based on party members      #-------------------------------------------------------------------------    def update_difficulty      @old_size = 0 if @old_size.nil?        if @old_size != $game_party.battle_members.size          $game_variables =            [$game_party.battle_members.size - 1,$game_party.max_battle_members].min          @old_size = $game_party.battle_members.size        end #ends if    end #ends update_difficulty  end #ends classend #ends if Use_Partyif Blood::Use_Enemy == true#===============================================================================  class Game_Enemy#===============================================================================  #-----------------------------------------------------------------------------  # List Of Aliased Methods  #-----------------------------------------------------------------------------  alias :bloody_param
aram  #-----------------------------------------------------------------------------  # Method to determine value of enemies params based on difficulty.  #-----------------------------------------------------------------------------    def param(param_id)      eps = Blood::Enemy:
aram_Settings      diff = eps.keys[$game_variables]      return (bloody_param(param_id) * eps + 1).to_i    end #ends def  #--------------------------------------------------------------------------  # * Get Experience  #--------------------------------------------------------------------------    alias :blood_exp :exp    def exp      ees = Blood::Enemy::Exp_Settings      diff = ees.keys[$game_variables]      return (blood_exp * ees).to_i    end #end def  #--------------------------------------------------------------------------  # * Get Gold  #--------------------------------------------------------------------------    alias :blood_gold :gold    def gold      egs = Blood::Enemy::Gold_Settings      diff = egs.keys[$game_variables]      return (blood_gold * egs).to_i    end #ends def  end #ends classend #ends ifif Blood::Use_Actor == true#===============================================================================  class Game_Actor#===============================================================================  #-----------------------------------------------------------------------------  # List Of Aliased Methods  #-----------------------------------------------------------------------------  alias :bloody_param
aram  #-----------------------------------------------------------------------------  # Method to determine value of actors params based on difficulty.  #-----------------------------------------------------------------------------    def param(param_id)      aps = Blood::Actor:
aram_Settings      diff = aps.keys[$game_variables]      return (bloody_param(param_id) * aps + 1).to_i    end #ends def     #    # TP Regen    #    def charge_tp_by_damage(damage_rate)      calc = self.tp += 50 * damage_rate * tcr      ats = Blood::Actor::TP_Settings      diff = ats.keys[$game_variables]      return (calc * ats).to_i    end #ends def  end #ends classend #ends if



You need an event like this, before your game starts.

http://i.imgur.com/XsJtZO2.png

 
Features:-Full Customization

-You can now use your battle members for difficulty, now also able to change the max easily (even past 4!)

-Individual editing of each parameter.

-Experience editing.

-Gold Editing.

-Actor Param edits

-Enabaling and disabling the use of Actor, and Enemy edits. Putting both to false will disable the script, if needed.

-Added TP Settings (This is based on the actor getting hit, not the actor hitting!)

Future Features:

I'm not too sure what else to put in here. If you have suggestions please let me know. I'm new to scripting and scripting something this simple is a BIG help, you have no idea.

 
Credit:
Bloodmorphed for writing it.
Dekita for his major guidance in the process.
 
Use it as you please, with credits of course.

I'm going to add this:

I would like to thank Dekita and others for their support and help through this, they have been patient with me! You guys are awesome!


本贴来自国际rpgmaker官方论坛作者:Bloodmorphed处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/ace-difficulty-script-v5-0-updated-new.31237/
页: [1]
查看完整版本: [Ace] Difficulty Script v5.0 **UPDATED****NEW**