Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin
- - State Removal Animations v1.1
- - Made by: Sixth
- - Description:
- This short script will let you play animations when states are removed in
- battle.
- - Note-tags:
- To set up a state removal animation, use this note-tag on your states:
- <rem_anim: anim_id>
- Replace the anim_id with the database ID of the animation you want to play.
- Examples:
- <rem_anim: 14> <rem_anim: 146> <rem_anim: 49>
- - Important note:
- Note that this will only show animations on enemies by default.
- If you want to show them for actors too, you can simply place a # sign right
- before this part in the script:
- && target.is_a?(Game_Enemy)
- You will still need a battle script that enables animations to be played on
- actors, and even than, this script may or may not function with the battle
- script you use for that.
- Also, since this script overwrites a method in the battle log, chances are,
- it won't work well with custom battle log scripts without a patch.
- Added compatibility with Raizen's Akea Advanced Battle Pop-up script (v1.1+).
- - Installation:
- Place this script between Materials and Main!
- If you use a batttle log script, try to place this script below that one.
- If it still won't work, you will probably need a patch for these to work
- together.
- If you use Raizen's Akea Advanced Battle Pop-up script, place this script below
- that script!
- =end
- class RPG::State < RPG::BaseItem
- attr_accessor :rem_anim
- def rem_anim
- init_rem_anim if @rem_anim.nil?
- return @rem_anim
- end
- def init_rem_anim
- @rem_anim = @note =~ /<rem_anim:(?:\s*)(\d+)>/i ? $1.to_i : 0
- end
- end
- class Window_BattleLog < Window_Selectable
- def display_removed_states(target) # Overwrite!
- target.result.removed_state_objects.each do |state|
- st_anim = false
- sh_log = true
- if state.rem_anim > 0 && target.is_a?(Game_Enemy)
- target.animation_id = state.rem_anim
- st_anim = true
- end
- if $included && $included[:akea_battlepopup] # Akea Popup compatibility!
- unless Akea_BattlePop::States_No_Pop.include?(state.name)
- SceneManager.scene.get_abp_type(target, nil, Akea_BattlePop::Recover_Name)
- @method_wait.call(Akea_BattlePop::Time_Pop)
- @get_all_pop_wait = (Akea_BattlePop::BattlePop[6][:movement].size - Akea_BattlePop::Time_Pop)
- end
- sh_log = Akea_BattlePop::Show_log
- end
- if sh_log && !state.message4.empty?
- replace_text(target.name + state.message4)
- wait
- end
- SceneManager.scene.wait_for_animation if st_anim
- end
- end
- end
- # End of script!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement