Character Class Graphics
Publicado em 26 de junho de 2012.Character Class Graphics (Version 1) é um script de SephirothSpawn, feito em 2006, que foi projetado para permitir que o seu herói mude de gráficos quando muda de classe.
Você pode controlar os sprites de ambos battlers e characters separadamente.
A instalação é muito simples, mas você também vai precisar do Standart Development Kit, o SDK. Você deve adicionar o código do Character Class Graphics, acima do Main e abaixo do SDK. O código está logo abaixo:
#==============================================================================
# ** Character Class Graphics
#------------------------------------------------------------------------------
# SephirothSpawn
# Version 1
# 2006-08-01
#------------------------------------------------------------------------------
# * Description :
#
# This script was designed to allow your character to change graphics when
# they change their class. You can control both battlers and character
# sprites seperately.
#------------------------------------------------------------------------------
# * Instructions :
#
# Place The Script Below the SDK and Above Main.
# To Customize your characters, refer to the customization instructions.
#------------------------------------------------------------------------------
# * Customization :
#
# <Sprite_Type> = { actor_id => { class_id => [filename, hue], ... }, ... }
#
# 0 as an actor id to use as a default for all actors, unless otherwise
# redefined by the actor.
#------------------------------------------------------------------------------
# * Syntax :
#
# Battler Graphic Information
# - <game_actor>.seph_get_battler_graphic(class_id)
#
# Character Graphic Information
# - <game_actor>.seph_get_character_graphic(class_id)
#
# Will Return [filename, hue] or nil (nil being no graphic specified)
#==============================================================================
#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log('Character Class Graphics', 'SephirothSpawn', 1, '2006-08-01')
#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state('Character Class Graphics')
#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Actor Class Graphics
#
# ~ {actor_id => {class_id => [name, hue], ... }, ... }
# ** DO NOT DELETE 0 VALUE (It's A Default For All Actors)
#--------------------------------------------------------------------------
Actor_Class_Battlers = {
0 => {}
}
Actor_Class_Characters = {
0 => {},
1 => {1 => ['001-Fighter01', 0], 2 => ['009-Lancer01', 0]}
}
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_chrgrphcs_gmactr_setup setup
alias seph_chrgrphcs_gmactr_cid= class_id=
#--------------------------------------------------------------------------
# * Setup
#--------------------------------------------------------------------------
def setup(id)
# Original Setup
seph_chrgrphcs_gmactr_setup(id)
# Update Graphics
seph_update_graphics
end
#--------------------------------------------------------------------------
# * Class ID
#--------------------------------------------------------------------------
def class_id=(class_id)
# Original Class ID
self.seph_chrgrphcs_gmactr_cid=(class_id)
# Update Graphics
seph_update_graphics
# Refresh Player
$game_player.refresh
end
#--------------------------------------------------------------------------
# * Update Graphics
#--------------------------------------------------------------------------
def seph_update_graphics
# Reset Character & Battler Name & Hue
character_info = seph_get_character_graphic
unless character_info.nil?
@character_name, @character_hue = character_info[0], character_info[1]
end
battler_info = seph_get_battler_graphic
unless battler_info.nil?
@battler_name , @battler_hue = battler_info[0] , battler_info[1]
end
end
#--------------------------------------------------------------------------
# * Get Character Graphic
#--------------------------------------------------------------------------
def seph_get_character_graphic(class_id = @class_id)
# If Actor Defined
if Actor_Class_Characters.has_key?(@actor_id)
# If Class ID
if Actor_Class_Characters[@actor_id].has_key?(@class_id)
# Return Values
return Actor_Class_Characters[@actor_id][@class_id]
end
# If Default Defined
elsif Actor_Class_Characters[0].has_key?(@class_id)
# Return Default
return Actor_Class_Characters[0][@class_id]
end
# Return Nil
return nil
end
#--------------------------------------------------------------------------
# * Get Battler Graphic
#--------------------------------------------------------------------------
def seph_get_battler_graphic(class_id = @class_id)
# If Actor Defined
if Actor_Class_Battlers.has_key?(@actor_id)
# If Class ID
if Actor_Class_Battlers[@actor_id].has_key?(@class_id)
# Return Values
return Actor_Class_Battlers[@actor_id][@class_id]
end
# If Default Defined
elsif Actor_Class_Battlers[0].has_key?(@class_id)
# Return Default
return Actor_Class_Battlers[0][@class_id]
end
# Return Nil
return nil
end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
endInformações adicionais
- Categoria: Programação XP
- Tag: RPG Maker XP
- Adicionado por: LichKing
- Acessos: 43
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!
