Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if $imported_trvc_params
- $imported_trvc_param_modifiers = true
- # =============================================================================
- # ======== INTRODUCTION =======================================================
- # =============================================================================
- # Name: Stat Manager Plugin: Param Modifiers
- # Author: Trevyn MC (http://trevync.wordpress.com/)
- # Version: 1.0 (5/28/14)
- #
- # Purpose: Extend the functionality of my stat manager script to modify
- # params, xparams and sparams
- #
- # Dependencies: Stat Manager version 1.0 or later
- #
- # Terms Of Use:
- # 1 Always give credit
- # 2 Let me know when you release a game (a response to the forum post about
- # this script is enough)
- # 3 Always include the full introduction section with the script
- #
- # Otherwise you are free to use and modify as you see fit for both
- # commercial or non_commercial projects
- #
- # Compatibility:
- # Alias: 4 Methods
- # Game_BattlerBase
- # param_plus
- # param_rate
- # xparam
- # sparam
- #
- # compatibility should be pretty good. but just be careful of mixing this
- # script with others that do the same thing. Results could be potentially
- # unpredictable.
- #
- # Change_log:
- #
- # =============================================================================
- # ========= INSTRUCTIONS ======================================================
- # =============================================================================
- # Put this script below materials and above main.
- # Put this script below my stat manager
- #
- # Script is plug and play. no customizing required
- #
- # Put notetags with the form
- # <stat: (+-*) value>
- # in the note field of Skills, States, Equips, Classes, Actors or Enemies
- # Example
- # <mrg: + 0.05> add 5% mana regen
- # <hrg: * 2> double heath regen
- # <atk: + 21> add 21 to atk
- # <mev: - 0.2> lower magic evade by 20%
- # These tags allow you to either multiply or add to any parameter from objects
- # That normally don't support those options. (skills for example)
- #
- #
- #
- module Trvc_Params
- Params +=[[[:param, 0],["mhp"]],
- [[:param, 1],["mmp"]],
- [[:param, 2],["atk"]],
- [[:param, 3],["def"]],
- [[:param, 4],["mat"]],
- [[:param, 5],["mdf"]],
- [[:param, 6],["agi"]],
- [[:param, 7],["luk"]],
- [[:xparam,0],["hit"]],
- [[:xparam,1],["eva"]],
- [[:xparam,2],["cri"]],
- [[:xparam,3],["cev"]],
- [[:xparam,4],["mev"]],
- [[:xparam,5],["mrf"]],
- [[:xparam,6],["cnt"]],
- [[:xparam,7],["hrg"]],
- [[:xparam,8],["mrg"]],
- [[:xparam,9],["trg"]],
- [[:sparam,0],["tgr"]],
- [[:sparam,1],["grd"]],
- [[:sparam,2],["rec"]],
- [[:sparam,3],["pha"]],
- [[:sparam,4],["mcr"]],
- [[:sparam,5],["tcr"]],
- [[:sparam,6],["pdr"]],
- [[:sparam,7],["mdr"]],
- [[:sparam,8],["fdr"]],
- [[:sparam,9],["exr"]],]
- #
- end
- class Game_BattlerBase
- #--------------------------------------------------------------------------
- # Alias param_plus
- #--------------------------------------------------------------------------
- alias trvc_param_plus_alias param_plus
- def param_plus(param_id)
- (t_param(:param, param_id).plus + trvc_param_plus_alias(param_id) )
- end
- #--------------------------------------------------------------------------
- # Alias param_rate
- #--------------------------------------------------------------------------
- alias trvc_param_rate_alias param_rate
- def param_rate(param_id)
- t_param(:param, param_id).rate * trvc_param_rate_alias(param_id)
- end
- #--------------------------------------------------------------------------
- # Alias xparam
- #--------------------------------------------------------------------------
- alias trvc_xparam xparam
- def xparam(xparam_id)
- (trvc_xparam(xparam_id) + t_param(:xparam, xparam_id).plus) * t_param(:xparam, xparam_id).rate
- end
- #--------------------------------------------------------------------------
- # Alias sparam
- #--------------------------------------------------------------------------
- alias trvc_sparam sparam
- def sparam(sparam_id)
- (trvc_sparam(sparam_id) + t_param(:sparam, sparam_id).plus) * t_param(:sparam, sparam_id).rate
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement