I was wondering if I could have more than the default 10x8 balloon set? aka I wanted to add more to the set of 80.
balloon graphic size
RPG Maker VXAce SupportYou can expand the size of the standard balloon set, if you wish. But, in order to call any balloon beyond the original ten, you will have to use a scriptlet :
Code:
# Change 'x' to the index of the new balloon, and 'evID' for the ID of the event.# For the Player :$game_player.balloon_id = x# For an Event :$game_map.events[evID].balloon_id = x# If you want to 'wait' while the balloon is being displayed, place this next line after the previous command.# For the Player :Fiber.yield while $game_player.balloon_id > 0# For an Event :Fiber.yield while $game_map.events[evID].balloon_id > 0
Wow you are very knowledgeable on everything Ace Exhydra!
Do I have to do a scriptlet to remove the balloon also?
and do I need to keep the width of ten balloons still?
Do I have to do a scriptlet to remove the balloon also?
and do I need to keep the width of ten balloons still?
Those should update themselves. They are timed images, so they should disappear fully well on their own. You can change their time settings in Sprite_Character, just look for start_balloon, update_balloon, etc.
To add more frames, you will need to use the following scriptlet which also allows you to control the frame speed and frame wait following the end of the balloon animation. The script automatically returns to the default setting after the balloon animation is finished, so compatibility with balloons using less frames is maintained.
Balloon Animation Options Script :
Balloon Animation Options Script :
Code:
class Game_CharacterBase #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :balloon_frame_total attr_accessor :balloon_frame_speed attr_accessor :balloon_frame_wait #-------------------------------------------------------------------------- # * Initialize Public Member Variables #-------------------------------------------------------------------------- unless method_defined?(:ex_gcb_091513_init_public_members) alias_method(:ex_gcb_091513_init_public_members, :init_public_members) end def init_public_members(*args, &block) ex_gcb_091513_init_public_members(*args, &block) @balloon_frame_total = 7 @balloon_frame_speed = 8 @balloon_frame_wait = 12 end endclass Sprite_Character < Sprite_Base #-------------------------------------------------------------------------- # * Balloon Icon Display Speed #-------------------------------------------------------------------------- unless method_defined?(:ex_sc_091513_balloon_speed) alias_method(:ex_sc_091513_balloon_speed, :balloon_speed) end def balloon_speed(*args, &block) # Return 'Display Speed' in Frames ex_sc_091513_balloon_speed(*args, &block) if @character.balloon_frame_speed.nil? return @character.balloon_frame_speed end #-------------------------------------------------------------------------- # * Wait Time for Last Frame of Balloon #-------------------------------------------------------------------------- unless method_defined?(:ex_sc_091513_balloon_wait) alias_method(:ex_sc_091513_balloon_wait, :balloon_wait) end def balloon_wait(*args, &block) # Return 'Last Frame Wait' in Frames ex_sc_091513_balloon_wait(*args, &block) if @character.balloon_frame_wait.nil? return @character.balloon_frame_wait end #-------------------------------------------------------------------------- # * End Balloon Icon #-------------------------------------------------------------------------- unless method_defined?(:ex_sc_091513_end_balloon) alias_method(:ex_sc_091513_end_balloon, :end_balloon) end def end_balloon(*args, &block) ex_sc_091513_end_balloon(*args, &block) @character.balloon_frame_total = 7 @character.balloon_frame_speed = 8 @character.balloon_frame_wait = 12 end #-------------------------------------------------------------------------- # * Frame Number of Balloon Icon #-------------------------------------------------------------------------- unless method_defined?(:ex_sc_091513_balloon_frame_index) alias_method(:ex_sc_091513_balloon_frame_index, :balloon_frame_index) end def balloon_frame_index(*args, &block) ex_sc_091513_balloon_frame_index(*args, &block) if @character.balloon_frame_total.nil? return @character.balloon_frame_total - [(@balloon_duration - balloon_wait) / balloon_speed, 0].max end end
Code:
# Change 'x' to the index of the new balloon, and 'evID' for the ID of the event.# For the Player :$game_player.balloon_id = x# Change total number of frames ((width / 32) - 1); default 7$game_player.balloon_frame_total = 7# Change frame display speed; default 8$game_player.balloon_frame_speed = 8# Change frame wait at end of balloon animation; default 12$game_player.balloon_frame_wait = 12# For an Event :$game_map.events[evID].balloon_id = x# Change total number of frames ((width / 32) - 1); default 7$game_map.events[evID].balloon_frame_total = 7# Change frame display speed; default 8$game_map.events[evID].balloon_frame_speed = 8# Change frame wait at end of balloon animation; default 12$game_map.events[evID].balloon_frame_wait = 12
Original thread: https://forums.rpgmakerweb.com/threads/balloon-graphic-size.18125/