Formerly known as RMVXP, Save-Point is a game creational forum that aids users in creating games using software like RPG Maker or Game Maker. Support is also available today for members and members can also upload and download resources and scripts to use in their games. If you are new or experienced we welcome you to register.
Introduction
Adds on additional properties from the Sprite class to battler sprites which weren't included before such as Angle, Tone, Color, Mirror, Zoom_X and Zoom_Y. As of version 1.1, it also allows devs to change certain properties of battler sprites.
Features
Gives battler sprites additional properties from the Sprite class such as angle, tone, color, mirror, zoom_x and zoom_y.
Change the color, tone, angle and size of battler sprites with script calls.
1 customization option. (See Customization section in text file.)
Script
Code:
=begin
????????????????????????????????????????????????????????????????????????????????
? Battler Sprite Addons ?
? Version 1.2 by Punk ?
????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????
? ? Description: ?
? ?? Adds on additional properties to battler sprites which weren't included ?
? before such as Angle, Tone, Color, Mirror, Zoom_X and Zoom_Y. ?
????????????????????????????????????????????????????????????????????????????????
? ? Features: ?
? ?? Gives battler sprites additional properties from the Sprite class such ?
? ? as angle, tone, color, mirror, zoom_x and zoom_y. ?
? ?? Change the angle, size, color, tone of a battler sprite as well as ?
? flipping it horizontally with script calls. (New to Version 1.1) ?
????????????????????????????????????????????????????????????????????????????????
? ? Customization ?
? ?? For those who don't like how in the zoom functions, the value 1.0 ?
? signifies "actual pixel size", I've changed it a bit to make the value ?
? 100.0 signify actual pixel size. For those who may not like the update, ?
? you can disable this by jumping to the third line after this long box ?
? and set BattlerSpriteZoom100 to false. ?
????????????????????????????????????????????????????????????????????????????????
? ? Usage: ?
? ? ? Tones. ?
? ?? How do I change the tone of an actor's sprite? ?
? ? 1. Use Call script event command. ?
? ? 2. Type this (replace red green blue saturation with values): ?
? ? $game_actors[id].tone = Tone.new(red, green, blue(, sat)) ?
? ? $game_party.actors[index].tone = Tone.new(red, green, blue(, sat) ?
? ? return true ?
? ?? How do I change the tone of an event's sprite? ?
? ? 1. Use Call script event command. ?
? ? 2. Type this (replace id with an enemy id): ?
? ? $game_troop.enemies[id].tone = Tone.new(red, green, blue(, sat)) ?
? ? return true ?
? ?? Example usage? I may still be confused. ?
? ? $game_actors[1].tone = Tone.new(100, 100, 100, 255);return true ?
? ? $game_party.actors[0].tone = Tone.new(100, 100, 100, 255);return true ?
? ? $game_troop.enemies[0].tone = Tone.new(-64, 0, -64, 0);return true ?
? ? $game_troop.enemies[0].tone = Tone.new(-64, 0, -64);return true ?
? ? ? Angles. ?
? ?? How do I change the angle of the actors's sprite? ?
? ? 1. Use Call script event command. ?
? ? 2. Type this (replace angle with a value): ?
? ? $game_actors[id].angle = value ?
? ? $game_party.actors[index].angle = value ?
? ?? How do I change the angle of an enemy's sprite? ?
? ? 1. Use Call script event command. ?
? ? 2. Type this (replace angle with a value, id with an event id): ?
? ? $game_troop.enemies[id].angle = value ?
? ? ? Colors. ?
? ?? How do I change the color of the first actor's sprite? ?
? ? 1. Use Call script event command. ?
? ? 2. Type this (replace red green blue alpha with values): ?
? ? $game_actors[1].color = Color.new(red, green, blue(, alpha)) ?
? ? return true ?
? ?? How do I change the angle of an enemy's sprite? ?
? ? 1. Use Call script event command. ?
? ? 2. Type this (replace id with an event id): ?
? ? $game_troop.enemies[id].color = Color.new(red, green, blue(, alpha))?
? ? return true ?
? ?? Example usage? I may still be confused. ?
? ? $game_actors[1].color = Color.new(100, 100, 100, 100);return true ?
? ? $game_party.actors[0].color = Color.new(200, 0, 200, 255);return true ?
? ? $game_troop.enemies[0].color = Color.new(200, 0, 200);return true ?
? ? ?
? ? ? zoom_x and zoom_y. ?
? ?? How do I change the sprite's x-axis zoom level? ?
? ? For actor: $game_party.actors[index].zoom_x = value ?
? ? For enemy: $game_troop.enemies[index].zoom_x = value ?
? ?? How do I change the sprite's y-axis zoom level? ?
? ? For actor: $game_party.actors[index].zoom_y = value ?
? ? For enemy: $game_troop.enemies[index].zoom_y = value ?
? ? ? Mirror. ?
? ?? How do I flip battler sprites horizontally? ?
? ? For actors: $game_party.actors[index].mirror = true ?
? ? For events: $game_troop.enemies[index].mirror = true ?
? ?? Okay, how do I unflip them? ?
? For actors: $game_party.actors[index].mirror = false ?
? For events: $game_troop.enemies[index].mirror = false ?
????????????????????????????????????????????????????????????????????????????????
? ? Methods Aliased: ?
? ?? update - Sprite_Battler < RPG::Sprite ?
? ?? initialize - Game_Battler ?
????????????????????????????????????????????????????????????????????????????????
? ? Changelog: ?
? ?? Version 1.1 (5/10/09) - Replaced attr_reader with attr_accessor. ?
? ?? Version 1.2 (5/12/09) - Updated the zoom stuff. (More info below) ?
????????????????????????????????????????????????????????????????????????????????
? ? About Version 1.2 change: ?
? Originally, the value '1.0' for properties zoom_x and zoom_y stood for ?
? the battler sprite's actual size. I felt like trying to explain that in ?
? the instructions of this script and add-ons made to it would just confuse ?
? some people. So I wanted to make the value 100.0 denote the actual pixel ?
? size of the sprite. ?
????????????????????????????????????????????????????????????????????????????????
=end
#????????????????????????????????????????????????????????????????????????????????
#? ? Customize ?
#????????????????????????????????????????????????????????????????????????????????
class PK8
BattlerSpriteZoom100 = true
# If false, sprite's zoom level value 1.0 would denote actual pixel size.
# If true, sprite's zoom level value 100.0 would denote actual pixel size.
end
Instructions
Copy-paste! Also, look for any add-on topics which may link to this as a requirement for use.
FAQ
Changing the tone of a battler sprite
Actors:
Use Call script event command.
Type this (replace red green blue saturation with values):
$game_actors[id].tone = Tone.new(red, green, blue(, sat))
$game_party.actors[index].tone = Tone.new(red, green, blue(, sat))
return true
Enemies:
Use Call script event command.
Type this (replace id with an event id):
$game_troop.enemies[index].tone = Tone.new(red, green, blue(, sat))
return true
Enemies
$game_troop.enemies[index].mirror = boolean
* boolean meaning either true or false.
Compatibility
This aliases the following methods from the following classes.
Sprite_Battler < RPG::Sprite
update
Game_Battler
initialize
Author's Notes
I want scripters to add on to it. :3
Terms and Conditions It's not necessary to credit me for this. <--Thats what PK8 said in his battler sprite addons script. This is a remix of his "Character Sprite Addons" tailored to battlers, so it isn't necessary for you to credit ME for this (I mean you can) but I would like you to credit PK8 even if he doesn't say so =P
------------------------------
Add-ons Battler Tone, Angle, Color, Mirror and Size comment commands. (Should be posted later tonight I hope)