Visual Equipment for Blizz-ABS
Authors: Blizzard
Version: 1.1b
Type: Blizz-ABS plugin
Key Term: Blizz-ABS Plugin
IntroductionThis script will display equipment on the map. All sprites are placed in the Graphics/Characters folder. Also keep in mind that using this script can cause additional lag due to additional sprite display.
This script is to be distributed under the same terms and conditions like the script it was created for: Blizz-ABS.
Features
- visual equipment for characters on the map in Blizz-ABS
- many useful options
- easy to configure
- can be disabled globally or for specific characters
ScreenshotsN/A for this sort of script.
DemoN/A
ScriptJust make a new script above main and paste this code into it.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Visual Equipment for Blizz-ABS by Blizzard
# Version: 1.1b
# Type: Blizz-ABS Add-on
# Date: 1.2.2010
# Date v1.0b: 29.4.2010
# Date v1.01b: 29.12.2010
# Date v1.1b: 13.6.2011
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This script is to be distributed under the same terms and conditions like
# the script it was created for: Blizz-ABS.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Information:
#
# This script must be placed below Blizz-ABS and requires Blizz-ABS v2.84 or
# higher to work properly. It will display equipment on the map. All sprites
# are placed in the Graphics/Characters folder. Also keep in mind that using
# this script can cause additional lag due to additional sprite display.
#
#
# Configuration:
#
# EXCLUDE_WEAPONS - weapons that should not be drawn
# EXCLUDE_ARMORS - armors that should not be drawn
# DRAW_ORDER - drawing order from first to last sprite (0 for weapon;
# 1, 2, 3 and 4 for armor kinds) with the direction index
# PREFIX_WEAPON - prefix for each spriteset file for weapons (can include
# a full path)
# PREFIX_ARMOR - prefix for each spriteset file for armors (can include
# a full path)
# ACTOR_UNIQUE - allows separate equipment files for every single actor
#
#
# Notes:
#
# - The default file naming convention is:
#
# WPREFIX + WID - weapon files
# APREFIX + AID - armor files
# WPREFIX + WID + SUFFIX - weapon action files
# APREFIX + AID + SUFFIX - armor action files
#
# WPREFIX - by default "Equipment/w", but it can be changed
# APREFIX - by default "Equipment/a", but it can be changed
# WID - weapon ID
# AID - armor ID
# SUFFIX - action suffix (i.e. _atk1, _skl, etc.)
#
# examples:
#
# Equipment/w3.png - weapon ID 3
# Equipment/a41.png - armor ID 41
# Equipment/w1_atk1.png - weapon ID 1, attack type 1
# Equipment/a76_skl.png - armor ID 1, skill use
#
# If you are using the ACTOR_UNIQUE option, then the naming convention are:
#
# WPREFIX + BID + SEPARATOR + WID - weapon files
# APREFIX + BID + SEPARATOR + AID - armor files
# WPREFIX + BID + SEPARATOR + WID + SUFFIX - weapon action files
# APREFIX + BID + SEPARATOR + AID + SUFFIX - armor action files
#
# BID - actor ID
# SEPARATOR - the character _ (underscore)
#
# examples:
#
# Equipment/w4_2.png - actor ID 4, weapon ID 2
# Equipment/a1_22.png - actor ID 1, armor ID 22
# Equipment/w77_7_def.png - actor ID 77, weapon ID 7, defending
# Equipment/a3_8_atk5.png - actor ID 3, armor ID 8, attack type 5
#
# The default prefixes can be changed in the configuration, but the other
# parts are fixed.
#
# - If you are not using the ACTOR_UNIQUE option and Blizz-ABS's action
# animation frames other than the default, you have to adjust the action
# animation frames. In this case all actors will use the same equipment
# files for display and the files' frame number has to match the animation
# frames number for every actor which also means that all actors need to
# have the same number of action sprites for the various actions. i.e. All
# actors have to have the same number of frames for attack type 1, the same
# number of frames for attack type 2, the same number of frames for skill
# use, the same number of frames for defending, etc.
#
# - Keep in mind that the dimensions of the spriteset and the equipment
# sprite should match. i.e. If the actor spriteset is 192x192 pixels, then
# the equipment for that sprite has to be 192x192 pixels as well. If you
# have actors that use different spritesets among each other
#
# - You can disable / enable Visual Equipment for specific characters by
# using a Call Script event command with the following code:
#
# $game_actors[ID].visual_equipment = true/false
# $game_party.actors[POS].visual_equipment = true/false
#
# ID - the actor's ID in the database
# POS - the actor's position in the party (STARTS FROM 0, not 1!)
#
# - You can disable / enable Visual Equipment globally by using a Call Script
# event command with the following code:
#
# $game_system.visual_equipment = true/false
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
if !$BlizzABS || BlizzABS::VERSION < 2.84
raise 'ERROR: The "Visual Equipment" plugin requires Blizz-ABS 2.84 or higher.'
end
#==============================================================================
# module BlizzCFG
#==============================================================================
module BlizzCFG
DRAW_ORDER = {}
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
EXCLUDE_WEAPONS = [3, 4, 5, 6, 7, 8]
EXCLUDE_ARMORS = [2, 4, 5, 6, 7]
DRAW_ORDER[2] = [2, 3, 4, 1, 0]
DRAW_ORDER[4] = [2, 3, 4, 1, 0]
DRAW_ORDER[6] = [2, 3, 4, 1, 0]
DRAW_ORDER[8] = [2, 3, 4, 1, 0]
PREFIX_WEAPON = 'Equipment/w'
PREFIX_ARMOR = 'Equipment/a'
ACTOR_UNIQUE = false
def self.equipment_offset(character_name)
case character_name
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Equipment Sprite Offset
#
# Here you can define the equipment Y offset in pixels. This can be used
# to adjust the equipment sprites' position for smaller or tall
# character spritesets. Configure which spritesets have an offset:
#
# when NAME then return OFFSET
#
# NAME - spriteset name
# OFFSET - offset in pixels
#
# Make sure you don't mispell the filenames.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
when '011-Lancer03' then return -1
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Equipment Sprite Offset
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
return 0
end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
$blizzabs_visual_equipment = 1.1
end
#==============================================================================
# Game_System
#==============================================================================
class Game_System
attr_accessor :visual_equipment
alias init_blizzabsve_later initialize
def initialize
init_blizzabsve_later
@visual_equipment = true
end
end
#==============================================================================
# Game_Actor
#==============================================================================
class Game_Actor
attr_accessor :visual_equipment
alias init_blizzabsve_later initialize
def initialize(actor_id)
init_blizzabsve_later(actor_id)
@visual_equipment = true
end
def weapons
return (self.weapon_ids - BlizzCFG::EXCLUDE_WEAPONS - [0]) if defined?(G7_MS_MOD)
return ([@weapon_id] - BlizzCFG::EXCLUDE_WEAPONS - [0])
end
def armors
return (self.armor_ids - BlizzCFG::EXCLUDE_ARMORS - [0]) if defined?(G7_MS_MOD)
return ([@armor1_id, @armor2_id, @armor3_id, @armor4_id] -
BlizzCFG::EXCLUDE_ARMORS - [0])
end
end
#==============================================================================
# Sprite_CharacterEquipment
#==============================================================================
class Sprite_CharacterEquipment < RPG::Sprite
def initialize(viewport, character)
super(viewport)
@character = character
update
end
def update
super
weapons = @character.battler.weapons
armors = @character.battler.armors
if @weapons != weapons || @armors != armors ||
@character_name != @character.character_name
@weapons = weapons
@armors = armors
@character_name = @character.character_name
self.create_bitmap
@cw = self.bitmap.width / @character.pattern_size
@ch = bitmap.height / 4
self.ox = @cw / 2
self.oy = @ch
self.src_rect.x = @character.pattern * @cw
self.src_rect.width = @cw
end
self.visible = !@character.transparent
sx = @character.pattern * @cw
sy = (@character.direction - 2) / 2 * @ch
self.src_rect.set(sx, sy, @cw, @ch)
self.x = @character.screen_x
self.y = @character.screen_y
self.z = @character.screen_z(@ch)
self.opacity = @character.opacity
self.blend_type = @character.blend_type
self.bush_depth = @character.bush_depth
end
def create_bitmap
self.bitmap.dispose if self.bitmap != nil
bitmap = RPG::Cache.character(@character_name, 0)
self.bitmap = Bitmap.new(bitmap.width, bitmap.height)
BlizzCFG::DRAW_ORDER.each_key {|dir|
equipment = []
a_id = (BlizzCFG::ACTOR_UNIQUE ? "#{@character.battler.id}_" : '')
BlizzCFG::DRAW_ORDER[dir].each {|index|
if index == 0
@weapons.each {|id|
equipment.push("#{BlizzCFG::PREFIX_WEAPON}#{a_id}#{id}")}
else
@armors.each {|id|
if $data_armors[id].kind == index - 1
equipment.push("#{BlizzCFG::PREFIX_ARMOR}#{a_id}#{id}")
end
}
end
}
sprite_name = @character.character_name.sub(
@character.character_name_org) {''}
y = BlizzCFG.equipment_offset(@character.character_name_org)
index = dir / 2 - 1
equipment.each {|name|
b = RPG::Cache.character("#{name}#{sprite_name}", 0)
h = b.height / BlizzCFG::DRAW_ORDER.size
self.bitmap.blt(0, y + index * h, b, Rect.new(0, index * h, b.width, h))
}
}
end
end
#==============================================================================
# Control_Sprite_Character
#==============================================================================
class Control_Sprite_Character
alias update_blizzabsve_later update
def update
update_blizzabsve_later
return if !@character.is_a?(Map_Actor)
if $game_system.visual_equipment && @character.valid? &&
@character.battler.visual_equipment && @sprite != nil &&
(@character.battler.weapons.size > 0 ||
@character.battler.armors.size > 0)
if @equipment == nil
@equipment = Sprite_CharacterEquipment.new(@viewport, @character)
else
@equipment.update
end
elsif @equipment != nil
@equipment.dispose if !@equipment.disposed?
@equipment = nil
end
end
alias dispose_blizzabsve_later dispose
def dispose
dispose_blizzabsve_later
@equipment.dispose unless @equipment == nil || @equipment.disposed?
@equipment = nil
end
end
InstructionsIn the script in the first comment.
CompatibilityRequires Blizz-ABS to work.
Credits and Thanks
Author's NotesKeep in mind that this plugin comes UNDER Blizz-ABS. This script is not fully supported by me as my other scripts are.
If you find any bugs, please report them here:
http://forum.chaos-project.com
That's it! N-Joy! =D
Very nice blizzard! Many have been waiting for this! Thank you *lv's up*
The the irony is that it took almost longer to type down the instructions and the configuration than the script itself. Also, the instructions and the configuration part have more lines than the actual script. #_#
But Blizz-ABS FTW! So easy to make plugins. :3
Oh wow, this is awesome. I haven't had time to play around with it, but I hope there will be a way to use this system with custom poses and the like (for cutscenes). If that's possible, it'll be epic. If not, it'll be like some older 2D games where you're always wearing your default outfit in cutscenes. Either way, awesome addon, thanks blizz.
*Does the happy Dance ^^*
I can complete my game now ! ^^ *Lvl's up*
EDIT : !!!
First error :
(http://i935.photobucket.com/albums/ad199/ElementIsland/errorvisequip.jpg)
wich brings me to this line :
return if @character.is_a?(Map_Actor) || @character.is_a?(Map_OnlineBattler)
Online battler ? something with Blizz online-system ? quz I'm not using that :S
Ah, shit. ._. That was supposed to be compatibility for RMX-OS later. ._.; I'll remove it for now and add it later.
I got an error.
(http://decisive-games.com/ggp/error.png)
Fixed.
Is there anyway you can add this to the draw_actor_graphic?
My guy's naked in the menu D:
same with me ^^
Also in the load/save screen my guy's naked :/
not a that good look :p
Bug. My actual character is behind the tent but his visual equipment armor is above the tent.
(http://img130.imageshack.us/img130/8636/error2r.png)
wow blizz... Ive been waitin for this.... now that its here i could cry, but i wont. but i will smoke a bowl in honor of its completion!
Smoke a bowl?! O_O Lol.
I fixed the thing that should display it below the tent.
I'll add the draw_character_graphics later.
I can't add it in the save screen because the by default the save file display doesn't even load actor data. It loads only the spriteset filenames.
can i change the load/save thing with editing the default scene ?
and if yes, can someone learn me ? xD
:roll: *hey i'm up there !*
Is it possible, or will it be in later versions, to make the sprite for .. a halmet for example be always the same. so I dant have to have 1 normal sprite, 7 actions, a skill, def and item sprite ?
I'll think about it.
:clap: :bow:
My armor 1 sprite fails to show regardless of draw order position. Is the display of the "shield" armor type connected to the defend action, (I have chosen to omit a defend dynamic in my project) or am I missing something here?
Thanks.
Are you sure you configured everything right? There is an EXCLUDE_ARMORS option after all.
Yeah, everything appears to be configured correctly. The EXCLUDE_ARMORS was left at default, which I believe outlined armors 1-7. None of my custom sprites were affected as I began my list at armor number 30. To be on the safe side, however, I changed it to zero. My draw order is arranged so that the armor_1 slot is drawn directly before the weapon sprite--no change. Armor_1 is simply not drawn if equipped. Damned bizarre.
Script configuration:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Visual Equipment for Blizz-ABS by Blizzard
# Version: 1.0
# Type: Blizz-ABS Add-on
# Date: 1.2.2010
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This script is to be distributed under the same terms and conditions like
# the script it was created for: Blizz-ABS.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Information:
#
# This script must be placed below Blizz-ABS and requires Blizz-ABS v2.57 or
# higher to work properly. It will display equipment on the map. All sprites
# are placed in the Graphics/Characters folder. Also keep in mind that using
# this script can cause additional lag due to additional sprite display.
#
#
# Configuration:
#
# EXCLUDE_WEAPONS - weapons that should not be drawn
# EXCLUDE_ARMORS - armors that should not be drawn
# DRAW_ORDER - drawing order from first to last sprite (0 for weapon;
# 1, 2, 3 and 4 for armor kinds)
# PREFIX_WEAPON - prefix for each spriteset file for weapons (can include
# a full path)
# PREFIX_ARMOR - prefix for each spriteset file for armors (can include
# a full path)
# ACTOR_UNIQUE - allows separate equipment files for every single actor
#
#
# Notes:
#
# - The default file naming convention is:
#
# WPREFIX + WID - weapon files
# APREFIX + AID - armor files
# WPREFIX + WID + SUFFIX - weapon action files
# APREFIX + AID + SUFFIX - armor action files
#
# WPREFIX - by default "Equipment/w", but it can be changed
# APREFIX - by default "Equipment/a", but it can be changed
# WID - weapon ID
# AID - armor ID
# SUFFIX - action suffix (i.e. _atk1, _skl, etc.)
#
# examples:
#
# Equipment/w3.png - weapon ID 3
# Equipment/a41.png - armor ID 41
# Equipment/w1_atk1.png - weapon ID 1, attack type 1
# Equipment/a76_skl.png - armor ID 1, skill use
#
# If you are using the ACTOR_UNIQUE option, then the naming convention are:
#
# WPREFIX + BID + SEPARATOR + WID - weapon files
# APREFIX + BID + SEPARATOR + AID - armor files
# WPREFIX + BID + SEPARATOR + WID + SUFFIX - weapon action files
# APREFIX + BID + SEPARATOR + AID + SUFFIX - armor action files
#
# BID - actor ID
# SEPARATOR - the character _ (underscore)
#
# examples:
#
# Equipment/w4_2.png - actor ID 4, weapon ID 2
# Equipment/a1_22.png - actor ID 1, armor ID 22
# Equipment/w77_7_def.png - actor ID 77, weapon ID 7, defending
# Equipment/a3_8_atk5.png - actor ID 3, armor ID 8, attack type 5
#
# The default prefixes can be changed in the configuration, but the other
# parts are fixed.
#
# - If you are not using the ACTOR_UNIQUE option and Blizz-ABS's action
# animation frames other than the default, you have to adjust the action
# animation frames. In this case all actors will use the same equipment
# files for display and the files' frame number has to match the animation
# frames number for every actor which also means that all actors need to
# have the same number of action sprites for the various actions. i.e. All
# actors have to have the same number of frames for attack type 1, the same
# number of frames for attack type 2, the same number of frames for skill
# use, the same number of frames for defending, etc.
#
# - Keep in mind that the dimensions of the spriteset and the equipment
# sprite should match. i.e. If the actor spriteset is 192x192 pixels, then
# the equipment for that sprite has to be 192x192 pixels as well. If you
# have actors that use different spritesets among each other
#
# - You can disable / enable Visual Equipment for specific characters by
# using a Call Script event command with the following code:
#
# $game_actors[ID].visual_equipment = true/false
# $game_party.actors[POS].visual_equipment = true/false
#
# ID - the actor's ID in the database
# POS - the actor's position in the party (STARTS FROM 0, not 1!)
#
# - You can disable / enable Visual Equipment globally by using a Call Script
# event command with the following code:
#
# $game_system.visual_equipment = true/false
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
if !$BlizzABS || BlizzABS::VERSION < 2.57
raise 'ERROR: The "Visual Equipment" plugin requires Blizz-ABS 2.57 or higher.'
end
#==============================================================================
# module BlizzCFG
#==============================================================================
module BlizzCFG
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
EXCLUDE_WEAPONS = [1, 3, 4, 5, 6, 7, 8]
EXCLUDE_ARMORS =
DRAW_ORDER = [4, 2, 3, 1, 0]
PREFIX_WEAPON = 'Equipment/w'
PREFIX_ARMOR = 'Equipment/a'
ACTOR_UNIQUE = false
def self.equipment_offset(character_name)
case character_name
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Equipment Sprite Offset
#
# Here you can define the equipment Y offset in pixels. This can be used
# to adjust the equipment sprites' position for smaller or tall
# character spritesets. Configure which spritesets have an offset:
#
# when NAME then return OFFSET
#
# NAME - spriteset name
# OFFSET - offset in pixels
#
# Make sure you don't mispell the filenames.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
when '011-Lancer03' then return -1
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Equipment Sprite Offset
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
return 0
end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
$blizzabs_visual_equipment = 1.0
end
#==============================================================================
# Game_System
#==============================================================================
class Game_System
attr_accessor :visual_equipment
alias init_blizzabsve_later initialize
def initialize
init_blizzabsve_later
@visual_equipment = true
end
end
#==============================================================================
# Game_Actor
#==============================================================================
class Game_Actor
attr_accessor :visual_equipment
alias init_blizzabsve_later initialize
def initialize(actor_id)
init_blizzabsve_later(actor_id)
@visual_equipment = true
end
def weapons
return (self.weapon_ids - BlizzCFG::EXCLUDE_WEAPONS - - ) if defined?(G7_MS_MOD)
return ([@weapon_id] - BlizzCFG::EXCLUDE_WEAPONS - - )
end
def armors
return (self.armor_ids - BlizzCFG::EXCLUDE_ARMORS - - ) if defined?(G7_MS_MOD)
return ([@armor1_id, @armor2_id, @armor3_id, @armor4_id] -
BlizzCFG::EXCLUDE_ARMORS - - )
end
end
#==============================================================================
# Sprite_CharacterEquipment
#==============================================================================
class Sprite_CharacterEquipment < RPG::Sprite
def initialize(viewport, character)
super(viewport)
@character = character
update
end
def update
super
weapons = @character.battler.weapons
armors = @character.battler.armors
if @weapons != weapons || @armors != armors ||
@character_name != @character.character_name
@weapons = weapons
@armors = armors
@character_name = @character.character_name
self.create_bitmap
@cw = self.bitmap.width / @character.pattern_size
@ch = bitmap.height / 4
self.ox = @cw / 2
self.oy = @ch
self.src_rect.x = @character.pattern * @cw
self.src_rect.width = @cw
end
self.visible = !@character.transparent
sx = @character.pattern * @cw
sy = (@character.direction - 2) / 2 * @ch
self.src_rect.set(sx, sy, @cw, @ch)
self.x = @character.screen_x
self.y = @character.screen_y
self.z = @character.screen_z(@ch)
self.opacity = @character.opacity
self.blend_type = @character.blend_type
self.bush_depth = @character.bush_depth
end
def create_bitmap
self.bitmap.dispose if self.bitmap != nil
bitmap = RPG::Cache.character(@character_name, 0)
self.bitmap = Bitmap.new(bitmap.width, bitmap.height)
equipment = []
a_id = (BlizzCFG::ACTOR_UNIQUE ? "#{@character.battler.id}_" : '')
BlizzCFG::DRAW_ORDER.each {|index|
if index == 0
@weapons.each {|id|
equipment.push("#{BlizzCFG::PREFIX_WEAPON}#{a_id}#{id}")}
else
@armors.each {|id|
if $data_armors[id].kind == index
equipment.push("#{BlizzCFG::PREFIX_ARMOR}#{a_id}#{id}")
end}
end}
sprite_name = @character.character_name.sub(
@character.character_name_org) {''}
y = BlizzCFG.equipment_offset(@character.character_name_org)
equipment.each {|name|
b = RPG::Cache.character("#{name}#{sprite_name}", 0)
self.bitmap.blt(0, y, b, Rect.new(0, 0, b.width, b.height))}
end
end
#==============================================================================
# Control_Sprite_Character
#==============================================================================
class Control_Sprite_Character
alias update_blizzabsve_later update
def update
update_blizzabsve_later
return if !@character.is_a?(Map_Actor)
if $game_system.visual_equipment && @character.valid? &&
@character.battler.visual_equipment && @sprite != nil &&
(@character.battler.weapons.size > 0 ||
@character.battler.armors.size > 0)
if @equipment == nil
@equipment = Sprite_CharacterEquipment.new(@viewport, @character)
else
@equipment.update
end
elsif @equipment != nil
@equipment.dispose if !@equipment.disposed?
@equipment = nil
end
end
alias dispose_blizzabsve_later dispose
def dispose
dispose_blizzabsve_later
@equipment.dispose unless @equipment == nil || @equipment.disposed?
@equipment = nil
end
end
Your configuration says that "EXCLUDE_ARMORS" is "[4, 2, 3, 1, 0]" and not "[]".
I have a question. Why use your visual equipment instead of another one? I mean it seems like a great one, don't get me wrong, in fact it's the best I've ever seen, but why do we need to use this one if we're using Blizz-ABS? Why does it require Blizz-ABS? I trust you highly as a scripter, but why it this the only one working with Blizz-ABS?
I'd also like to say that it looks in every way perfect. You've done it again :P You should
Because Blizz-ABS already has a good sprite handling system. This code enhances Blizz-ABS rather than having completely independent (and therefore duplicate) code.
I'm not making a different script because I have retired from RMXP. *points to sig*
Aaaahh, so there is a good reason :D
no matter what i do it keeps giving me non stop errors, it says i need higher version, even do I'm using the highest version S:
anyhow, is there a change you could upload a demo? :S I know it's a simple scripit and you dont need a demo for it, but it helps me figure out what is the problem when I see how it's suppose to be..
If you keep getting version errors, then you haven't updated Blizz-ABS properly.
I'm asking for Demo because I dont really understand the Instructions.
my english isn't really good for reading stuff like that o-o..
and I'm trying to play around witht he scripit... but I have no idea where and what..
I made a folder in characters named Equipment, I put a sprite "a1"
I just see alot of clodes that just get me confused S:..
this is why I need a demo so I could just look into the scripit when Equips already made in it
so I'll know how to make Equips.. I just need to see how it looks like when it has Equips made already.
I'm having the same problem that DreadWing had with my shields no showing up.
My shield Id's are 1-4 and I have them all in my characters file called "Equipment.a2, Equipment.a3, ....."
Script:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Visual Equipment for Blizz-ABS by Blizzard
# Version: 1.0
# Type: Blizz-ABS Add-on
# Date: 1.2.2010
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This script is to be distributed under the same terms and conditions like
# the script it was created for: Blizz-ABS.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Information:
#
# This script must be placed below Blizz-ABS and requires Blizz-ABS v2.57 or
# higher to work properly. It will display equipment on the map. All sprites
# are placed in the Graphics/Characters folder. Also keep in mind that using
# this script can cause additional lag due to additional sprite display.
#
#
# Configuration:
#
# EXCLUDE_WEAPONS - weapons that should not be drawn
# EXCLUDE_ARMORS - armors that should not be drawn
# DRAW_ORDER - drawing order from first to last sprite (0 for weapon;
# 1, 2, 3 and 4 for armor kinds)
# PREFIX_WEAPON - prefix for each spriteset file for weapons (can include
# a full path)
# PREFIX_ARMOR - prefix for each spriteset file for armors (can include
# a full path)
# ACTOR_UNIQUE - allows separate equipment files for every single actor
#
#
# Notes:
#
# - The default file naming convention is:
#
# WPREFIX + WID - weapon files
# APREFIX + AID - armor files
# WPREFIX + WID + SUFFIX - weapon action files
# APREFIX + AID + SUFFIX - armor action files
#
# WPREFIX - by default "Equipment/w", but it can be changed
# APREFIX - by default "Equipment/a", but it can be changed
# WID - weapon ID
# AID - armor ID
# SUFFIX - action suffix (i.e. _atk1, _skl, etc.)
#
# examples:
#
# Equipment/w3.png - weapon ID 3
# Equipment/a41.png - armor ID 41
# Equipment/w1_atk1.png - weapon ID 1, attack type 1
# Equipment/a76_skl.png - armor ID 1, skill use
#
# If you are using the ACTOR_UNIQUE option, then the naming convention are:
#
# WPREFIX + BID + SEPARATOR + WID - weapon files
# APREFIX + BID + SEPARATOR + AID - armor files
# WPREFIX + BID + SEPARATOR + WID + SUFFIX - weapon action files
# APREFIX + BID + SEPARATOR + AID + SUFFIX - armor action files
#
# BID - actor ID
# SEPARATOR - the character _ (underscore)
#
# examples:
#
# Equipment/w4_2.png - actor ID 4, weapon ID 2
# Equipment/a1_22.png - actor ID 1, armor ID 22
# Equipment/w77_7_def.png - actor ID 77, weapon ID 7, defending
# Equipment/a3_8_atk5.png - actor ID 3, armor ID 8, attack type 5
#
# The default prefixes can be changed in the configuration, but the other
# parts are fixed.
#
# - If you are not using the ACTOR_UNIQUE option and Blizz-ABS's action
# animation frames other than the default, you have to adjust the action
# animation frames. In this case all actors will use the same equipment
# files for display and the files' frame number has to match the animation
# frames number for every actor which also means that all actors need to
# have the same number of action sprites for the various actions. i.e. All
# actors have to have the same number of frames for attack type 1, the same
# number of frames for attack type 2, the same number of frames for skill
# use, the same number of frames for defending, etc.
#
# - Keep in mind that the dimensions of the spriteset and the equipment
# sprite should match. i.e. If the actor spriteset is 192x192 pixels, then
# the equipment for that sprite has to be 192x192 pixels as well. If you
# have actors that use different spritesets among each other
#
# - You can disable / enable Visual Equipment for specific characters by
# using a Call Script event command with the following code:
#
# $game_actors[ID].visual_equipment = true/false
# $game_party.actors[POS].visual_equipment = true/false
#
# ID - the actor's ID in the database
# POS - the actor's position in the party (STARTS FROM 0, not 1!)
#
# - You can disable / enable Visual Equipment globally by using a Call Script
# event command with the following code:
#
# $game_system.visual_equipment = true/false
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
if !$BlizzABS || BlizzABS::VERSION < 2.57
raise 'ERROR: The "Visual Equipment" plugin requires Blizz-ABS 2.57 or higher.'
end
#==============================================================================
# module BlizzCFG
#==============================================================================
module BlizzCFG
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
EXCLUDE_WEAPONS = [1, 25, 33]
EXCLUDE_ARMORS = [46]
DRAW_ORDER = [1, 0, 2, 3, 4]
PREFIX_WEAPON = 'Equipment.w'
PREFIX_ARMOR = 'Equipment.a'
ACTOR_UNIQUE = false
def self.equipment_offset(character_name)
case character_name
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Equipment Sprite Offset
#
# Here you can define the equipment Y offset in pixels. This can be used
# to adjust the equipment sprites' position for smaller or tall
# character spritesets. Configure which spritesets have an offset:
#
# when NAME then return OFFSET
#
# NAME - spriteset name
# OFFSET - offset in pixels
#
# Make sure you don't mispell the filenames.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
when '011-Lancer03' then return -1
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Equipment Sprite Offset
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
return 0
end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
$blizzabs_visual_equipment = 1.0
end
#==============================================================================
# Game_System
#==============================================================================
class Game_System
attr_accessor :visual_equipment
alias init_blizzabsve_later initialize
def initialize
init_blizzabsve_later
@visual_equipment = true
end
end
#==============================================================================
# Game_Actor
#==============================================================================
class Game_Actor
attr_accessor :visual_equipment
alias init_blizzabsve_later initialize
def initialize(actor_id)
init_blizzabsve_later(actor_id)
@visual_equipment = true
end
def weapons
return (self.weapon_ids - BlizzCFG::EXCLUDE_WEAPONS -
- ) if defined?(G7_MS_MOD)
return ([@weapon_id] - BlizzCFG::EXCLUDE_WEAPONS - - )
end
def armors
return (self.armor_ids - BlizzCFG::EXCLUDE_ARMORS - - ) if defined?(G7_MS_MOD)
return ([@armor1_id, @armor2_id, @armor3_id, @armor4_id] -
BlizzCFG::EXCLUDE_ARMORS - - )
end
end
#==============================================================================
# Sprite_CharacterEquipment
#==============================================================================
class Sprite_CharacterEquipment < RPG::Sprite
def initialize(viewport, character)
super(viewport)
@character = character
update
end
def update
super
weapons = @character.battler.weapons
armors = @character.battler.armors
if @weapons != weapons || @armors != armors ||
@character_name != @character.character_name
@weapons = weapons
@armors = armors
@character_name = @character.character_name
self.create_bitmap
@cw = self.bitmap.width / @character.pattern_size
@ch = bitmap.height / 4
self.ox = @cw / 2
self.oy = @ch
self.src_rect.x = @character.pattern * @cw
self.src_rect.width = @cw
end
self.visible = !@character.transparent
sx = @character.pattern * @cw
sy = (@character.direction - 2) / 2 * @ch
self.src_rect.set(sx, sy, @cw, @ch)
self.x = @character.screen_x
self.y = @character.screen_y
self.z = @character.screen_z(@ch)
self.opacity = @character.opacity
self.blend_type = @character.blend_type
self.bush_depth = @character.bush_depth
end
def create_bitmap
self.bitmap.dispose if self.bitmap != nil
bitmap = RPG::Cache.character(@character_name, 0)
self.bitmap = Bitmap.new(bitmap.width, bitmap.height)
equipment = []
a_id = (BlizzCFG::ACTOR_UNIQUE ? "#{@character.battler.id}_" : '')
BlizzCFG::DRAW_ORDER.each {|index|
if index == 0
@weapons.each {|id|
equipment.push("#{BlizzCFG::PREFIX_WEAPON}#{a_id}#{id}")}
else
@armors.each {|id|
if $data_armors[id].kind == index
equipment.push("#{BlizzCFG::PREFIX_ARMOR}#{a_id}#{id}")
end}
end}
sprite_name = @character.character_name.sub(
@character.character_name_org) {''}
y = BlizzCFG.equipment_offset(@character.character_name_org)
equipment.each {|name|
b = RPG::Cache.character("#{name}#{sprite_name}", 0)
self.bitmap.blt(0, y, b, Rect.new(0, 0, b.width, b.height))}
end
end
#==============================================================================
# Control_Sprite_Character
#==============================================================================
class Control_Sprite_Character
alias update_blizzabsve_later update
def update
update_blizzabsve_later
return if !@character.is_a?(Map_Actor)
if $game_system.visual_equipment && @character.valid? &&
@character.battler.visual_equipment && @sprite != nil &&
(@character.battler.weapons.size > 0 ||
@character.battler.armors.size > 0)
if @equipment == nil
@equipment = Sprite_CharacterEquipment.new(@viewport, @character)
else
@equipment.update
end
elsif @equipment != nil
@equipment.dispose if !@equipment.disposed?
@equipment = nil
end
end
alias dispose_blizzabsve_later dispose
def dispose
dispose_blizzabsve_later
@equipment.dispose unless @equipment == nil || @equipment.disposed?
@equipment = nil
end
end
This isn't a fix, it's a hack. Worse, it's a hack that causes a bug which will turn all shields into helms in-game.
I fixed the problem in the script in the first post properly.
Is there / would there need to be (I'm assuming yes) a controller for use with RMX-OS? I saw you talking about compatibility with it earlier, but wasn't sure. And I didn't see anything in the script database.
the controler is here http://forum.chaos-project.com/index.php/topic,5409.0.html
Alright thanks. I wasn't sure if the original blizz-ABS controller handled this, or if it needed a separate one.
Is it possible to make multiple DRAW_ORDER arrays that are dependent on the direction that the character is facing? So if the character is facing down, then the weapon is drawn last (behind the actor), but if he is facing up, then the weapon is drawn first (on top of the actor). Something along these lines, I would think:
if @direction = 2
then DRAW_ORDER = [3, 2, 1, 0]
else DRAW_ORDER = [0, 3, 2, 1]
end
This forum is very neat, by the way. I've followed Blizz-Abs for a while now, and just the sheer number of possibilities that it opened up in RPG maker inspired me to buy it and start up again. Blizzard should be given a medal and a congressionally funded retirement plan for the amount of work he's put into this ABS.
A retirement plan would be awesome. ._.
Yes, it's possible. I can quickly edit the script to allow that. I'll do it when I get home from work.
EDIT: There you go. It's a simple but necessary feature so I quickly added it. I may have retired from RMXP, but I hate unfinished things.
Thank you! I see what you did now. That is much simpler than any idea I would have come up with. It's exactly what I needed, although the direction of the equipment is now always facing left, while the actor moves normally under it. I don't see what's wrong with the script, though.
I saw that you had retired from RMXP. Probably because you were tired the endless masses asking you questions about your scripts...
My bad, I fixed it.
I didn't know that they used "my bad" in the U.K. It fixed the error, but now the equipment completely disappears when the character is facing down...
Ah, shit, then I didn't fix it properly. :/ I'll take another look at it.
Also, I'm not from the UK. :P
EDIT: Alright, this time I checked everything properly. It worked for me just fine so you shouldn't have any more problems with it.
Really? The version dates in the script are European style. And yes, it works perfectly. One last question: Is there an index number for the actor?
I'm actually not American either. xD I'm actually Croatian, English is just my third language.
What do you mean by index number? There is an actor ID (in the database) and there is party member index. Which one do you need?
A number you can use to represent the actor in the DRAW_ORDER array. The script layers the weapons and armor perfectly, they just layer them over the actor. Here's an example:
(http://s3.postimage.org/1l9ifsao4/Example.png) (http://www.postimage.org/) <--- The order here is [Actor, Weapon, Armor], and I'm wondering if there is a way that you can make it [Weapon, Actor, Armor].
Croatian? And you can speak three languages fluently? And you're familiar with the show, "How I Met Your Mother"? You could be a perfectly rounded human being.
Blizzard, you should add another number for the draw order. A number that represents the character.
make it either 0 or -1 :P
0 is for weapon.
Quote from: Soloman on June 14, 2011, 07:00:26 pm
A number you can use to represent the actor in the DRAW_ORDER array. The script layers the weapons and armor perfectly, they just layer them over the actor. Here's an example:
(http://s3.postimage.org/1l9ifsao4/Example.png) (http://www.postimage.org/) <--- The order here is [Actor, Weapon, Armor], and I'm wondering if there is a way that you can make it [Weapon, Actor, Armor].
It's not impossible (it's actually very simple), but it rather doesn't make sense for most cases. In what scenario would it be necessary?
Quote from: Soloman on June 14, 2011, 07:00:26 pm
Croatian? And you can speak three languages fluently? And you're familiar with the show, "How I Met Your Mother"? You could be a perfectly rounded human being.
Yes, I could. I could also be awesome. I could.
He's trying to display the sword as if it were on the characters back.
It would allow the global use of any equipment spriteset on any character, regardless of the hairstyles, thickness, or species. I could edit the sword so that it wouldn't clip the actor's face, but what if I wanted a Wookiee companion?
Ah, good point. I forgot about that scenario. I'll do it when I get home from work today.
EDIT: I just realized it's not as simple to do because the equipment sprite is separate from the normal sprite. The only way to make it work would be 2 equipment sprites, one for under and one for over the actual character. :/
Hey, no problem. It's still a great script. I can use the unique actors option if I have to.
That was actually originally the point of the unique actors option. It was supposed to handle this problem.
umm sorry to necro (i think xP) the thread but i was wondering if itd be possible to have another sprite when somethings NOT equipped i know it sounds stupid but like for helmets this would be a huge help cause some characters hair is too big to go into a helmet (it sticks out the sides of the helmet) and with this idea you can pretty much have the character bald and have the hair as an armor id but its only on when theres nothing in the helmet slot lol then when you equip something itll change the hair to the helmet if that makes sense im a little drunk sorry ~_~
um yeah I could use something like that too, but something like you can configure the helmets that require the hair to disappear (or change?) or those who dont
In different words, another layer for hair S:.
haha yah thats better than my idea xP since some helmets dont go over the whole head good idea
Just out of curiosity, has anyone ever considered using this (or a similar script) and modifying it into something for creating custom character sprites? Like, having separate layers for hair and eyes, then the attire as this is meant for? Honestly, I kind of want to make a system like that, even with no prior knowledge of how to code RGSS. Unless someone else has already done it, I might try this lol.
Yes and no. In fact this script was supposed to be used as a base for that kind of script in the RMX-OS project Remexos, but it was cancelled. So it was planned, but it was never made.
That's actually kind of cool. So, that out in the open, does it mean a system like that is perfectly plausible in RMXP or was it scrapped for other reasons as well? Before I get as ambitious as a Nintendo 64 game designer and have all of my ideas shattered partway through the development process. >.>
Also, random but I feel strangely humbled by getting a reply from you right off the bat. Probably because I'm new here and because you're a legend on RRR. :^_^':
Lol, thanks. xD I usually don't reply to RMXP topics anymore (because I have retired almost a year and a half ago), except if it's a question that catches my attention somehow. But I am still fairly active in the community because of ARC.
Yes, it is a system that works just fine in RMXP. The only thing that can pose a bit of a problem is that you have to adjust all graphics properly. You have to expect that all hair graphics are used at the same place so every hair graphic has to be positioned properly in the file. Basically the same problem if you have a visual equipment script, just with body parts. Our script allowed you to change the hair, the color of the hair (in form of hue), each eye separately, the color of each eye separately (again, hue change) and the skin color and gender (basically one out of 10 base sprites, 5 colors each for 2 genders). They are were the same size because otherwise we would have to bother additionally with positioning of the sprite parts (as I explained earlier in this post).
That's actually exactly how I was picturing doing it, with the exception that I hadn't thought of doing each individual eye. I don't suppose the hue map works very well for changing skin colours either, does it? It'd probably be awkward lol. >_<
In any case, thank you for reassuring me on that. And I do appreciate getting a reply on that because I am aware of the fact that you're retired from RMXP, so I really do appreciate the swift reply.
Since RMXP spriting isn't my forte (I'll probably get better at it in time, I did loads of custom graphics in 2k3) I'mma have to try and edit the base sprites on Backwater Productions' character generator. Which is going to be annoying as they're all anatomically correct. I didn't realize this until I had saved a bunch of sprites of my character, then gotten an attire from elsewhere I wanted to put on him and discovered that my sprite had a massive peen lol. I need to work on my coding skills too but as with everyone that'll come with time. :)
Would there be any way to use masks with the equipment so that a certain color is rendered as transparent?
IE The player has big red spiky hair, so it pokes out of a helm graphic. You change the background color on the helm to a script-defined 'mask' color, and it renders the hair beyond the helm invisible.
That's not easy to implement so no.
Darn. So how difficult would it be to implement a new layer into the system? I tried looking through it but I cant quite figure out how it would be done. :wacko:
You can add new layers using just the configuration.
Ive been poking around with the script but I cant seem to figure it out :/ is there a written guide somewhere?
No, but I think somebody made a demo and posted it somewhere. >.<
I'm having a hard time making the visual equipment show up, I name them accordingly and everything, along with the prefix. Is there anything else that needs to be done? I'm not getting any errors, just this issue. Can someone help me out?
Does the game crash or is the equipment simply not displayed?
Quote from: MOAL on April 24, 2012, 07:42:54 pm
I'm having a hard time making the visual equipment show up, I name them accordingly and everything, along with the prefix. Is there anything else that needs to be done? I'm not getting any errors, just this issue. Can someone help me out?
The first time I used Visual Equipment I have a similar problem. I was testing the game with weapon id 1, and the deafult script comes with this configuration:
EXCLUDE_WEAPONS = [1, 3, 4, 5, 6, 7, 8]
EXCLUDE_ARMORS = [1, 2, 4, 5, 6, 7]
May this will help you.
Then I guess I should change the default configuration. :facepalm:
@Blizzard - It worked, thanks a load, mate! Sorry if it caused you any trouble. :^_^':
Sorry for the necro, but is still compatible with rmx-os?
Quote from: khkramer on December 25, 2012, 05:19:15 am
Sorry for the necro, but is still compatible with rmx-os?
It is, but if i remember correctly it is not global, meaning that only you can see the armour you wear, and you can't see anyone else's.
Quote from: Zexion on December 25, 2012, 05:27:12 am
Quote from: khkramer on December 25, 2012, 05:19:15 am
Sorry for the necro, but is still compatible with rmx-os?
It is, but if i remember correctly it is not global, meaning that only you can see the armour you wear, and you can't see anyone else's.
Hmmm, that takes away the purpose for which I was going to use it (if possible)
Actually I think I did make this work with RMX-OS. Best you try it out and you'll see for yourself. Then you'll know for sure.
Would it be possoble to make that script (more) compatible with the multi-slot script by guillaume777 ? Actually it is, but extra-slot armors are not displayed :( Thank you for your excellent work, this script is as amazing as the other :)
Quick question. I'm not sure if it was with this script or another, but is there a way to show equips on events?
I'm trying to event a character creation system, and using an event as an example dummy
There's no reference to events in the script at all. But I think the real question is:
Quote from: Shalaren on August 29, 2013, 08:47:28 pm
I'm trying to event a character creation system, and using an event as an example dummy
Why can't you use the player itself?
because I wanted it to be animated (showing the character walking as you design it)
I'm sure I can do somehting, just thought if it were possible to use an event it would make things a bit easier P:
Edit: here's a good question, can I make it sprite specific instead of actor specific?, since I want to make it so you can choose a gender, so one equip will look different for both genders.
With a little bit of magic, you can have the player animate. Script call (assuming the player is controlling Actor 1)
BlizzABS::Config::ANIMATED_IDS.push(
1)
And 'Set Move Route' for the player to be 'Stop Animation ON'. And once you're done, call this afterwards
BlizzABS::Config::ANIMATED_IDS.
delete(1)
Can't you just make two actors? From what you proposed, I'm not sure that's even possible.
I actually have a character creation made up for my game, i can send you a small demo if you'd like although you'll need to change a few things for what you want but it'd be easy enough.
Quote from: KK20 on August 30, 2013, 04:28:17 am
With a little bit of magic, you can have the player animate. Script call (assuming the player is controlling Actor 1)
BlizzABS::Config::ANIMATED_IDS.push(
1)
And 'Set Move Route' for the player to be 'Stop Animation ON'. And once you're done, call this afterwards
BlizzABS::Config::ANIMATED_IDS.
delete(1)
Can't you just make two actors? From what you proposed, I'm not sure that's even possible.
Thanks KK :P looks great animated.
and no it won't really work easily considering everything is going to revolve around actor 1. Although I suppose I can just make a male and female switch and keep using a conditional branch, I was just hoping there was a way to make it so the sprites update themselves depending on something like sprite name or using a switch (like if switch X is on, then the image name has to be 'a12_ON' instead of just 'a12' this way if it was a female character lets say, I would turn the switch on and the 'a12_ON' would be the female version of the armor.
@chaucer
Thanks but I think my character creation screen turned out pretty sweet P:
I don't get it...wouldn't that still be the same amount of sprites/work?
Anywho, if the problem is keeping the player as actor 1 but having separate sprites, find this line under
Sprite_CharacterEquipment
a_id = (BlizzCFG::ACTOR_UNIQUE ? "#{@character.battler.id}_" : '')
and make it
if BlizzCFG::ACTOR_UNIQUE
if @character.battler.id == 1 and $game_switches[1]
a_id = "2_"
else
a_id = "#{@character.battler.id}_"
end
else
a_id = ''
end
Then replace the update method with this
def update
super
@gender_switch = $game_switches[1] if @gender_switch.nil? #<=== Be sure to change if...
weapons = @character.battler.weapons
armors = @character.battler.armors
if @weapons != weapons || @armors != armors ||
@character_name != @character.character_name ||
@gender_switch != $game_switches[1] #<============= ...you want to use a different switch
@weapons = weapons
@armors = armors
@character_name = @character.character_name
self.create_bitmap
@cw = self.bitmap.width / @character.pattern_size
@ch = bitmap.height / 4
self.ox = @cw / 2
self.oy = @ch
self.src_rect.x = @character.pattern * @cw
self.src_rect.width = @cw
end
self.visible = !@character.transparent
sx = @character.pattern * @cw
sy = (@character.direction - 2) / 2 * @ch
self.src_rect.set(sx, sy, @cw, @ch)
self.x = @character.screen_x
self.y = @character.screen_y
self.z = @character.screen_z(@ch)
self.opacity = @character.opacity
self.blend_type = @character.blend_type
self.bush_depth = @character.bush_depth
end
If the actor's ID is 1 and game switch 1 is ON, then actor 1's sprites will be drawn as if it were actor 2.
Yes that could do exactly what I need it to, so I tried it out but when the switch is on weird stuff happens.
so the first 3 armors I have in the database are 3 helmets in which I am using as "Hair" slots.
so in the character creation I have it where you choose a haircut, so right after choosing a gender (when the switch is on) The sprite of Actor 1 from the helmet ID 2 is drawn on top of the Helmet ID 2 of Actor 2. and armor ID 7 isn't showing while the switch is on. I am probably confusing sometimes so Ill get you a picture in a sec.
here
(http://imageshack.us/a/img194/6808/usg5.png)
(and yes I do have 2 versions for everything)
it might be something really simple, but I don't know what it is :S
So what you're saying is that it's drawing 'a1_2' and 'a2_2' together, but it doesn't draw 'a1_7' nor 'a2_7' for the female sprite? Yeah, I have no clue what could be causing that. I'd need a demo to thoroughly test it--nothing in the code stands out to me right away.
Nvm! I deleted the script and added it again and now it works just fine! (I must have messed up something somehow)
Thanks alot :) this edit makes the gender difference I needed!
An update to display extra slots of G777 Multislot script would be very nice :^_^':