Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ╔═══════════════════════════════════════════════╦════════════════════╗
- # ║ Title: Adjust Stats on Party Size ║ Version: 1.00 ║
- # ║ Author: Roninator2 ║ ║
- # ╠═══════════════════════════════════════════════╬════════════════════╣
- # ║ Function: ║ Date Created ║
- # ║ ╠════════════════════╣
- # ║ Adjust params for actors ║ 21 Dec 2024 ║
- # ╚═══════════════════════════════════════════════╩════════════════════╝
- # ╔════════════════════════════════════════════════════════════════════╗
- # ║ Requires: nil ║
- # ║ ║
- # ╚════════════════════════════════════════════════════════════════════╝
- # ╔════════════════════════════════════════════════════════════════════╗
- # ║ Brief Description: ║
- # ║ More battle memebrs causes battlers to lose ATK ║
- # ╚════════════════════════════════════════════════════════════════════╝
- # ╔════════════════════════════════════════════════════════════════════╗
- # ║ Instructions: ║
- # ║ Turn Value below to true to have it get applied ║
- # ║ LOWER_ATK = true ║
- # ║ Set value that will be changed for stat ║
- # ║ ║
- # ║ Add more ad you desire ║
- # ╚════════════════════════════════════════════════════════════════════╝
- # ╔════════════════════════════════════════════════════════════════════╗
- # ║ Updates: ║
- # ║ 1.00 - 21 Dec 2024 - Script finished ║
- # ║ ║
- # ╚════════════════════════════════════════════════════════════════════╝
- # ╔════════════════════════════════════════════════════════════════════╗
- # ║ Credits and Thanks: ║
- # ║ Roninator2 ║
- # ║ ║
- # ╚════════════════════════════════════════════════════════════════════╝
- # ╔════════════════════════════════════════════════════════════════════╗
- # ║ Terms of use: ║
- # ║ Follow the original Authors terms of use where applicable ║
- # ║ - When not made by me (Roninator2) ║
- # ║ Free for all uses in RPG Maker except nudity ║
- # ║ Anyone using this script in their project before these terms ║
- # ║ were changed are allowed to use this script even if it conflicts ║
- # ║ with these new terms. New terms effective 03 Apr 2024 ║
- # ║ No part of this code can be used with AI programs or tools ║
- # ║ Credit must be given ║
- # ╚════════════════════════════════════════════════════════════════════╝
- module R2_Modify_Battle_Stats_Large_Party
- LOWER_ATK = true
- ATK_AMOUNT = 10
- # add more here as you need
- # LOWER_DEF = true
- # DEF_AMOUNT = 5
- end
- # ╔════════════════════════════════════════════════════════════════════╗
- # ║ End of editable region ║
- # ╚════════════════════════════════════════════════════════════════════╝
- class Game_Party < Game_Unit
- #--------------------------------------------------------------------------
- # * Initial Party Setup
- #--------------------------------------------------------------------------
- def setup_starting_members
- @actors = $data_system.party_members.clone
- remove_actor_stats_by_member
- end
- #--------------------------------------------------------------------------
- # * Add an Actor
- #--------------------------------------------------------------------------
- alias :r2_change_stats_add :add_actor
- def add_actor(actor_id)
- reset_actor_stats_by_member
- r2_change_stats_add(actor_id)
- remove_actor_stats_by_member
- end
- #--------------------------------------------------------------------------
- # * remove stats
- #--------------------------------------------------------------------------
- def reset_actor_stats_by_member
- battle_members.each do |act|
- act.raise_battle_stat(2) if R2_Modify_Battle_Stats_Large_Party::LOWER_ATK
- # add more here as you need
- # act.raise_battle_stat(3) if R2_Modify_Battle_Stats_Large_Party::LOWER_DEF
- end
- end
- #--------------------------------------------------------------------------
- # * remove stats
- #--------------------------------------------------------------------------
- def remove_actor_stats_by_member
- battle_members.each do |act|
- act.lower_battle_stat(2) if R2_Modify_Battle_Stats_Large_Party::LOWER_ATK
- # add more here as you need
- end
- end
- #--------------------------------------------------------------------------
- # * Remove Actor
- #--------------------------------------------------------------------------
- alias :r2_change_stats_remove :remove_actor
- def remove_actor(actor_id)
- add_actor_stats_by_member
- r2_change_stats_remove(actor_id)
- end
- #--------------------------------------------------------------------------
- # * add stats
- #--------------------------------------------------------------------------
- def add_actor_stats_by_member
- battle_members.each do |act|
- act.gain_battle_stat(2) if R2_Modify_Battle_Stats_Large_Party::LOWER_ATK
- # add more here as you need
- # act.gain_battle_stat(2) if R2_Modify_Battle_Stats_Large_Party::LOWER_DEF
- end
- end
- end
- class Game_Actor < Game_Battler
- #--------------------------------------------------------------------------
- # * Change Param Plus Value
- #--------------------------------------------------------------------------
- def gain_battle_stat(param)
- adj = R2_Modify_Battle_Stats_Large_Party::ATK_AMOUNT if param == 2
- # add more here as you need
- # params [mhp, mmp, atk, def, mat, mdf, agi, luk]
- # params [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ]
- # adj = R2_Modify_Battle_Stats_Large_Party::DEF_AMOUNT if param == 3
- add_param(param, adj)
- end
- #--------------------------------------------------------------------------
- # * Change Param Plus Value
- #--------------------------------------------------------------------------
- def lower_battle_stat(param)
- adj = -(($game_party.battle_members.size - 1) *
- R2_Modify_Battle_Stats_Large_Party::ATK_AMOUNT) if param == 2
- # add more here as you need
- # params [mhp, mmp, atk, def, mat, mdf, agi, luk]
- # params [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ]
- add_param(param, adj)
- end
- #--------------------------------------------------------------------------
- # * Change Param Plus Value
- #--------------------------------------------------------------------------
- def raise_battle_stat(param)
- adj = (($game_party.battle_members.size - 1) *
- R2_Modify_Battle_Stats_Large_Party::ATK_AMOUNT) if param == 2
- # add more here as you need
- # params [mhp, mmp, atk, def, mat, mdf, agi, luk]
- # params [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ]
- add_param(param, adj)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement