Character Sprite Access
Authors: LiTTleDRAgo
Version: 1.01
Type: Graphical Add-on
Key Term: Misc Add-on
IntroductionThis script can make you have a full access to character sprite in map
Features
Screenshots(http://2.bp.blogspot.com/-9mCEbbfoIFE/UjC0N_K8gII/AAAAAAAAAUw/I11TeIgZ9uM/s1600/character_sprite_access.png)
ScriptHere (http://littledrago.blogspot.com/2013/09/rgss23-character-sprite-access.html)
InstructionsTo change character sprite with other image
(XP uses RPG::Cache while VX and VX-A uses Cache)
$game_map.events[1].bitmap = RPG::Cache.battler('001-Fighter01')
$game_map.events[2].bitmap = RPG::Cache.icon('001-Potion01')
$game_map.events[3].bitmap = Cache.system('Iconset')
$game_map.events[3].bitmap.src_rect.set(24,0,24,24)
To add an effect to character sprite
$game_map.events[1].bitmap.invert!
$game_map.events[1].bitmap.frost!
$game_map.events[1].bitmap.clear
You can use all kind of methods in Bitmap class
To reset bitmap back to normal
$game_map.events[1].bitmap.reset_bitmap
CompatibilityWill cause trouble with something that alters Sprite_Character
Will cause trouble with ABSEAL
Credits and Thanks
Author's NotesEnjoy ~
I always hated how RMXP designed the scripts to make it so hard to access the sprites/bitmaps of the characters on the screen, it seems like such a commonsense thing.
The script seems a little overly complicated to me, though. Something like this has the same effect and does not have any other script dependencies.
class Game_Character
def bitmap
return if !$scene.is_a?(Scene_Map)
char = $scene.spriteset.character_sprites.find {|c| c.character == self }
if char != nil
return char.bitmap
end
end
def bitmap=(arg)
return if !$scene.is_a?(Scene_Map)
char = $scene.spriteset.character_sprites.find {|c| c.character == self }
char.bitmap = arg
end
end
class Scene_Map
attr_accessor :spriteset
end
class Spriteset_Map
attr_accessor :character_sprites
end
If I'm doing it like that, character who shared the same graphic will also be affected
$game_player.character_name = '001-Fighter01'
$game_map.events[1].character_name = '001-Fighter01'
$game_player.bitmap.invert!
with your script, $game_map.events[1] bitmap would also inverted, and when changing scene, the changed graphics would reset back to normal
Oh, yes, I see what you are saying, forgive me, I didn't pay too close attention. I was under the impression it was simply making the sprite accessible, and didn't think it all through.