Action Battlers [RMXP]
Publicado em 7 de julho de 2011.Action Battlers é um script pro RPG Maker XP que foi desenvolvido para temporariamente mudar battlers de diferentes imagens para diferentes poses ou posições, indicando a ação do char, entre os passos 2 e 5 da fase 5 de batalha. As posições incluem ataque, habilidade, uso de ítem, escapando e fazendo nada.
Foi feito por SephirothSpawn.
#==============================================================================
# ** Action Battlers
#------------------------------------------------------------------------------
# SephirothSpawn
# Version 1
# 2006-09-06
#------------------------------------------------------------------------------
# * Description :
#
# This script was designed to temporarily change battlers images to different
# posses between step 2 and step 5 in phase 5 of battle. The posses include
# attacking, skill casting, item using, defending, escaping and doing
# nothing.
#------------------------------------------------------------------------------
# * Instructions :
#
# Place The Script Below the SDK and Above Main.
#
# Place all Battler Images in your Battlers Folder with these extensions :
#
# - _attacking
# - _defending
# - _escaping
# - _resting
# - _casting
# - _item
#
# An example would be 001-Fighter01_attacking.png
#
# As a safety, the script test for files and does not change battler in the
# event a battler doesn't exist.
#
# For additional instructions refer to customization & syntax below.
#------------------------------------------------------------------------------
# * Customization :
#
# Enable Actor Action Battlers
# - Enable_Actors = true or false
#
# Enable Enemy Action Battlers
# - Enable_Enemies = true or false
#==============================================================================
#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log('Action Battlers', 'SephirothSpawn', 1, '2006-09-06')
#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state('Action Battlers')
#==============================================================================
# ** Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# * Enabling
#--------------------------------------------------------------------------
Enable_Actors = true
Enable_Enemies = true
File_Extensions = ['.png', '.jpg', '.jpeg']
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_actionbattler_gmbtlr_init initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Original Initialization
seph_actionbattler_gmbtlr_init
# Clears Battler Suffix
@seph_battlername_suffix = ''
end
#--------------------------------------------------------------------------
# * Update Action Battler Name
#--------------------------------------------------------------------------
def update_action_battler_name
# Actors Enable Test
if self.is_a?(Game_Actor)
return unless Enable_Actors
# Enemies Enable Test
else
return unless Enable_Enemies
end
# Branch Point By Current Battler Action
case @current_action.kind
# Attacking, Guarding & Resting
when 0
# Branch Point By Basic
case @current_action.basic
# Attacking
when 0 ; @seph_battlername_suffix = '_attacking'
# Defending
when 1 ; @seph_battlername_suffix = '_defending'
# Escaping
when 2 ; @seph_battlername_suffix = '_escaping'
# Resting (Nothing)
when 3 ; @seph_battlername_suffix = '_resting'
end
# Using Skill
when 1
@seph_battlername_suffix = '_casting'
# Using Item
when 2
@seph_battlername_suffix = '_item'
end
# Test For Battler Image
filetest = false
for extension in File_Extensions
if FileTest.exist?('Graphics/Battlers/' +
@battler_name + @seph_battlername_suffix + extension)
filetest = true
break
end
end
# If File Found
if filetest
# Adds Suffix to Battler Name
@battler_name += @seph_battlername_suffix
end
end
#--------------------------------------------------------------------------
# * Clear Action Battler
#--------------------------------------------------------------------------
def clear_action_battler_name
dummy = @battler_name.dup
unless @seph_battlername_suffix == ''
dummy.sub!(@seph_battlername_suffix, '')
end
@seph_battlername_suffix = ''
@battler_name = dummy
end
end
#==============================================================================
# ** Scene_Battle
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_actionbattler_scnbtl_main main
alias seph_actionbattler_scnbtl_sp2 start_phase2
alias seph_actionbattler_scnbtl_up2e update_phase2_escape
alias seph_actionbattler_scnbtl_up4s2 update_phase4_step2
alias seph_actionbattler_scnbtl_up4s5 update_phase4_step5
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Original Main Processing
seph_actionbattler_scnbtl_main
# Clear Actors Actions
$game_party.actors.each do |actor|
actor.current_action.clear
actor.clear_action_battler_name
end
end
#--------------------------------------------------------------------------
# * Start Party Command Phase
#--------------------------------------------------------------------------
def start_phase2
# Clear All Actors Action Battler
$game_party.actors.each {|x| x.clear_action_battler_name}
# Original Start Phase 2
seph_actionbattler_scnbtl_sp2
end
#--------------------------------------------------------------------------
# * Frame Update (party command phase: escape)
#--------------------------------------------------------------------------
def update_phase2_escape
# Originsl Phase 2 Escape
seph_actionbattler_scnbtl_up2e
# Sets All Actors Basic to 2, then Updates Action Battler
$game_party.actors.each do |actor|
actor.current_action.basic = 2
actor.update_action_battler_name
end
end
#--------------------------------------------------------------------------
# * Frame Update (main phase step 2 : start action)
#--------------------------------------------------------------------------
def update_phase4_step2
# Unless Escaping
unless @active_battler.current_action.basic == 2
# Update Action Battler
@active_battler.update_action_battler_name
end
# Original Phase 4 : Step 2
seph_actionbattler_scnbtl_up4s2
end
#--------------------------------------------------------------------------
# * Frame Update (main phase step 4 : animation for target)
#--------------------------------------------------------------------------
def update_phase4_step5
# Clear Action Battler
@active_battler.clear_action_battler_name
# Original Phase 4 : Step 4
seph_actionbattler_scnbtl_up4s5
end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
endInformações adicionais
- Categoria: Programação XP
- Tags: Em revisão, RPG Maker XP
- Adicionado por: LichKing
- Acessos: 52
Observação: se você gostou deste post ou ele lhe foi útil de alguma forma, por favor considere apoiar financeiramente a Gaming Room. Fico feliz só de ajudar, mas a contribuição do visitante é muito importante para que este site continua existindo e para que eu possa continuar provendo este tipo de conteúdo e melhorar cada vez mais. Acesse aqui e saiba como. Obrigado!
