Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # Script: Customizable Holder Battlers
- # Author: Selchar
- # Requestor: Nosleinad
- # Credits: Yami
- #===============================================================================
- =begin
- This is an extention of Yami's Holder Battler addon for Battle Engine Symphony.
- It allows for different battlers based on class id, as well as changing it via
- scriptcall. Scriptcall changes take priority over class specific, which takes
- priority over the default holder notetag.
- #-------------------------------------------------------------------------------
- # Actor Notetag
- #-------------------------------------------------------------------------------
- <class holder battler class_id: filename>
- <class holder battler class_id: nil> changes back to original class
- #-------------------------------------------------------------------------------
- # Scriptcall
- #-------------------------------------------------------------------------------
- $game_actors[actor_id].new_holders_name = 'filename'
- Replace class_id or actor_id with the relevant number, and filename with the
- name of the holder style image you want to use.
- =end
- #===============================================================================
- # The script
- #===============================================================================
- module Selchar
- module Symphony
- def self.holder_class(class_id)
- /<class[-_ ]?holder[-_ ]?battler[-_ ]?#{class_id}:\s*(.*)\s*>/i
- end
- end
- end
- class Game_Actor < Game_Battler
- attr_accessor :new_holders_name
- def holders_name
- if @new_holders_name != nil
- return @new_holders_name if @new_holders_name != ''
- end
- return actor.class_holder_name(@class_id) if actor.class_holder_name(@class_id)
- return actor.holders_name
- end
- end
- class RPG::Actor
- def class_holder_name(class_id)
- if @class_holder_name.nil?
- @class_holder_name = {}
- $data_classes.each do |i|
- next unless i
- @class_holder_name[i.id] = $1 if @note =~ Selchar::Symphony.holder_class(i.id)
- end
- end
- @class_holder_name[class_id]
- end
- end
- #===============================================================================
- # End of File
- #===============================================================================
RAW Paste Data