I am not entirely sure if Sephiroth Spawn has discontinued work on this (although it is missing from his test bed v4). Basically this script changes the battler graphic per command (attack, defend, item, skill) and also changes the attack graphic based upon the characters equipped weapon.
Now the problem here is that the battlers fail to change during battle when its an encrypted game project, however it works perfectly fine when it is unencrypted or when testing the game from the editor. I'm guessing the encrypted game can't recognise the files? I hope this problem is "fix-able" as it is an important part to my game.
It is also most likely to the SDK being V 2.3 instead of V1 but its strange that this problem has only just started as i have been using the sdk 2.3 for quite a while now (even though the one i had been using earlier today was causing a security error.
the script:
Now the problem here is that the battlers fail to change during battle when its an encrypted game project, however it works perfectly fine when it is unencrypted or when testing the game from the editor. I'm guessing the encrypted game can't recognise the files? I hope this problem is "fix-able" as it is an important part to my game.
It is also most likely to the SDK being V 2.3 instead of V1 but its strange that this problem has only just started as i have been using the sdk 2.3 for quite a while now (even though the one i had been using earlier today was causing a security error.
the script:
Code:
#==============================================================================
# ** Action Battlers
#------------------------------------------------------------------------------
# SephirothSpawn
# Version 1.1
# 2006-10-24
#------------------------------------------------------------------------------
# * Version History :
#
# Version 1 ---------------------------------------------------- (2006-09-20)
# Version 1.1 ------------------------------------------------- (2006-10-24)
# - Addition : Weapon Based Attacking Animations
#------------------------------------------------------------------------------
# * 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
#
# For further attacking battlers, place image with weapons name at end of
# attacking. If no image is found, it will use the default _attacking sprite.
#
# Example : 01-Fighter01 attacks with a Bronze Sword
# - Image Name = 01-Fighter01_attacking_Bronze Sword.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.1, '2006-10-24')
#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state('Action Battlers')
#==============================================================================
# ** Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# * Enabling
#--------------------------------------------------------------------------
Enable_Actors = true
Enable_Enemies = true
File_Extensions = ['.png', '.bmp', 'jpg']
#--------------------------------------------------------------------------
# * 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'
# If Actor
if self.is_a?(Game_Actor)
# If Weapon Exist
unless (weapon = $data_weapons[@weapon_id]).nil?
# Adds Weapons Name
@seph_battlername_suffix += "_#{weapon.name}"
# If File Exist
filetest = false
for extension in File_Extensions
if FileTest.exist?('Graphics/Battlers/' +
@battler_name + @seph_battlername_suffix + extension)
filetest = true
break
end
end
unless filetest
@seph_battlername_suffix.sub!("_#{weapon.name}", '')
end
end
end
# 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
#--------------------------------------------------------------------------
end