Change or Zoom Character Graphic XP VX
Version: 0.1.0
By Kyonides-Arkanthos alias Kyonides, Shadowball
Introduction
A collection of scriptlets!
Change any hero's graphic and keep it saved in a variable so he or she can go back to normal (script call based).
You can also change any character sprite's current zoom.
Screenshots
Do you really need one?
Demo
None needed.
Script
Instructions
Script Calls
$game_party.actors[0].change_graphic(2) # Aluxes is now Basil
$game_party.actors[0].old_graphic # The same old (stupid) Aluxes
$game_party.actors[0].old_name # Falls back to hero's old name if any
FAQ
You tell me...
Compatibility
It should be compatible with anything that does not modify Game_Actor or Game_Character classes.
Credits and Thanks
Well, thanks to Falcao that gave me an idea of how to change a character's x and y zoom by looking at his script. I didn't like the way he dealt with it so I made my own scriptlet because of that.
Author's Notes
Nothing yet.
Terms and Conditions
Not intended for Commercial Use and must include my name (Kyonides-Arkanthos).
Version: 0.1.0
By Kyonides-Arkanthos alias Kyonides, Shadowball
Introduction
A collection of scriptlets!
Change any hero's graphic and keep it saved in a variable so he or she can go back to normal (script call based).
You can also change any character sprite's current zoom.
Screenshots
Do you really need one?
Demo
None needed.
Script
script
Spoiler
- =begin
- * Change Name / Graphic or Zoom Character Graphic - XP VX
- by Kyonides-Arkanthos alias Kyonides, Shadowball
- 03.07.2010
- Script Calls:
- $game_party.actors[0].change_graphic(2) # Aluxes is now Basil
- $game_party.actors[0].old_graphic # The same old (stupid) Aluxes
- $game_party.actors[0].old_name # Falls back to hero's old name if any
- $game_player.zoom_xy(2.0,2.0) # Player gets double sized... Fat is bad!
- $game_map.events[1].zoom(1.5,1.5) # Event 1 is 50% bigger
- =end
- module DBASE
- ACTORS = load_data('Data/Actors.rxdata')
- end
- class Game_Actor
- def name=(name)
- @old_name = @name # It stores your hero's old name
- @name = name # Changes hero's name as always
- end
- def old_name
- return if @old_name.nil?
- @name = @old_name # Falls back to the old name
- end
- def change_graphic(graphic, value=0)
- if File.exist?('Data/Actors.rxdata')
- @old_graphic = [@character_name, @battler_name, value]
- else
- @old_graphic = [@character_name, @battler_name, @face_index]
- end
- # XP - Pass Character Graphic, Hue, Battler Graphic, Hue values
- # VX -Pass Character Graphic, Index, Face Graphic, Index values
- graphic = DBASE::ACTORS[graphic].character_name
- self.set_graphic(graphic, value, graphic, value) # Change graphic
- $game_player.refresh # Refresh player
- end
- def old_graphic
- return if @old_graphic.nil?
- # XP - Pass Character Graphic, Hue, Battler Graphic, Hue values
- # VX -Pass Character Graphic, Index, Face Graphic, Index values
- self.set_graphic(@old_graphic[0], @old_graphic[2],
- @old_graphic[1], @old_graphic[2])
- $game_player.refresh
- end
- end
- class Game_Character
- attr_reader :zooms
- alias kyon_gm_char_ini initialize
- def initialize
- @zooms = [1.0, 1.0]
- kyon_gm_char_ini
- end
- def zoom_xy(x,y); @zooms = [x, y]; end
- alias :zoom :zoom_xy
- end
- class Sprite_Character
- alias character_zoom_update update
- def update
- character_zoom_update
- if self.zoom_x != @character.zooms[0] or self.zoom_y != @character.zooms[1]
- self.zoom_x, self.zoom_y = @character.zooms
- end
- end
- end
Expand to see the code.
Instructions
Script Calls
$game_party.actors[0].change_graphic(2) # Aluxes is now Basil
$game_party.actors[0].old_graphic # The same old (stupid) Aluxes
$game_party.actors[0].old_name # Falls back to hero's old name if any
FAQ
You tell me...
Compatibility
It should be compatible with anything that does not modify Game_Actor or Game_Character classes.
Credits and Thanks
Well, thanks to Falcao that gave me an idea of how to change a character's x and y zoom by looking at his script. I didn't like the way he dealt with it so I made my own scriptlet because of that.
Author's Notes
Nothing yet.
Terms and Conditions
Not intended for Commercial Use and must include my name (Kyonides-Arkanthos).