Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # =============================================================================
- # TheoAllen - Custom Parameter Formula
- # Version : 1.0
- # Contact : www.rpgmakerid.com (or) http://theolized.blogspot.com
- # (English Documentaton)
- # -----------------------------------------------------------------------------
- # ATTENTION ~ !
- # - This script needs RGSS3 knowlegde if you want to use it optimally.
- # If you want to do something and you don't know how to do it in this script,
- # you may ask me or make a thread script support in RGSS forum
- # =============================================================================
- ($imported ||= {})[:Theo_CustomParamFormula] = true
- # =============================================================================
- # Change Logs:
- # -----------------------------------------------------------------------------
- # 2013.11.12 - Finished Script
- # =============================================================================
- =begin
- ---------------------------------------------------------------------------
- Introduction :
- ---------------------------------------------------------------------------
- Have u though what if each parameter has its own formula? For example, the
- MDF bonus is depends on remaining MP. Or even DEF is depends on remaining
- HP? Which mean, if your character has a lot of remaining HP, your character
- will be much stronger.
- ---------------------------------------------------------------------------
- How to use :
- ---------------------------------------------------------------------------
- Put this script below material but above main
- Edit the configuration below. Make sure that you edit it between "def" and
- "end". For example :
- def custom_mdf(ori_param)
- ori_param + mp/5
- end
- (ori_param is a original parameter from the character)
- From the example abouve, the MDF value will have 1 parameter bonus for each
- MP 5. Which mean, if your character has 100 remain MP and MDF is equal 50,
- then the result is 50 + (100/5) = 70
- What if those formula affect only specified character?
- You may use "case" and when". For example :
- def custom_mdf(ori_param)
- case id
- when 1
- ori_param + mp/5
- else
- ori_param
- end
- end
- Then, the rule only affect on an actor which has ID 1.
- You may add "case, when" as many as you want
- A List of variables that can be used :
- (Not limited on these if you know how to code in RGSS3)
- - hp >> Remain HP
- - mp >> Remain MP
- - tp >> TP Value
- - mhp >> Maximal HP
- - mmp >> Maximal MP
- - atk >> Attack
- - def >> Defense
- - mat >> Magic attack
- - mdf >> Magic defense
- - agi >> Agility
- - luk >> Luck
- - $game_variables[var_id] >> In game variable (replace var_id with a number)
- ---------------------------------------------------------------------------
- Terms of use :
- ---------------------------------------------------------------------------
- Credit me, TheoAllen. You are free to edit this script by your own. As long
- as you don't claim it yours. For commercial purpose, don't forget to give me
- a free copy of the game.
- If you want to share your ustom formula to public, you can request a credit
- for yourself. But don't forget to credit me as well.
- =end
- # =============================================================================
- class Game_Actor < Game_Battler # <-- Do not touch
- # =============================================================================
- # Here you can edit your own custom formula
- # =============================================================================
- Param_Base = false # Basic Parameter? (Read below)
- # --------------------------------------------------------------------------
- # True >> The ori_param value will be depends on database that not currently
- # calculated from features modifier
- # False >> The ori_param value have been produced from feature calculation
- # and others
- # --------------------------------------------------------------------------
- # * ) Maximum MP
- # --------------------------------------------------------------------------
- def custom_mhp(ori_param)
- ori_param # <-- Define it here
- end
- # --------------------------------------------------------------------------
- # * ) Maximum MP
- # --------------------------------------------------------------------------
- def custom_mmp(ori_param)
- ori_param # <-- Define it here
- end
- # --------------------------------------------------------------------------
- # * ) Attack Point
- # --------------------------------------------------------------------------
- def custom_atk(ori_param)
- ori_param # <-- Define it here
- end
- # --------------------------------------------------------------------------
- # * ) Defense Point
- # --------------------------------------------------------------------------
- def custom_def(ori_param)
- ori_param # <-- Define it here
- end
- # --------------------------------------------------------------------------
- # * ) Magic Attack
- # --------------------------------------------------------------------------
- def custom_mat(ori_param)
- ori_param # <-- Define it here
- end
- # --------------------------------------------------------------------------
- # * ) Magic Defense
- # --------------------------------------------------------------------------
- def custom_mdf(ori_param)
- ori_param # <-- Define it here
- end
- # --------------------------------------------------------------------------
- # * ) Agility Point
- # --------------------------------------------------------------------------
- def custom_agi(ori_param)
- ori_param # <-- Define it here
- end
- # --------------------------------------------------------------------------
- # * ) Luck Point
- # --------------------------------------------------------------------------
- def custom_luk(ori_param)
- ori_param # <-- Define it here
- end
- # =============================================================================
- # End of configuration
- # =============================================================================
- end
- param_name = Game_Actor::Param_Base ? "param_base" : "param"
- eval("
- class Game_Actor < Game_Battler
- alias theo_custom_param #{param_name}
- def #{param_name}(param_id)
- ori_param = theo_custom_param(param_id)
- case param_id
- when 0 # MHP
- custom_mhp(ori_param)
- when 1 # MMP
- custom_mmp(ori_param)
- when 2 # ATK
- custom_atk(ori_param)
- when 3 # DEF
- custom_def(ori_param)
- when 4 # MAT
- custom_mat(ori_param)
- when 5 # MDF
- custom_mdf(ori_param)
- when 6 # AGI
- custom_agi(ori_param)
- when 7 # LUK
- custom_luk(ori_param)
- end
- end
- end
- ")
Advertisement
Add Comment
Please, Sign In to add comment