Extra Event Pictures
Version: 1.1
Author: modern algebra
Date: May 7, 2011
Version History
- <Version 1.1> 05.07.2011 - Fixed a bug which would only rotate if an extra picture. Also cleaned it up a bit and added an option not to autoreset the variable
- <Version 1.0> 03.14.2008 - Original Release
Description
For complicated Picture eventing, it is quite clear that 20 pictures is not enough. This script allows you to use more, albeit in a slightly non-intuitive way
Features
- Allows you to set a Max Picture Limit greater than 20
- Easy to use. All you need to do is set an event variable to the number you want the picture to be, then use the picture commands as you would normally. Pay attention to the instructions.
Screenshots
Not really necessary - I could make a bunch of pictures show up on the screen, but that wouldn't be particularly difficult even without the script as I could just merge all the pictures together in Paint. Just try it out in a new project or something to see it.
Instructions
See inside the script for instructions.
Script
#==============================================================================
# Extra Event Pictures
# Author: modern algebra (rmrk.net)
# Version: 1.1
# Date: May 7, 2011
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Description:
#
# For complicated Picture eventing, it is quite clear that 20 pictures is
# not enough. This script allows you to use more, albeit in a non-intuitive
# way
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Instructions:
# Place this script above Main and below Materials.
#
# It is quite simple: to use a picture that has a greater label than 20, all
# that is required is that you set an in-game variable (that you choose below
# at line 44) to the number that you want, say 21 or 22 or 105. Then set up
# the Picture command directly below it. If you have EP_AUTORESET at line 46
# set to true, the variable is then cleared and so every time you want to
# handle the picture you have to re-set that variable to the number you want.
# If it is false, then that does not happen and so you have to remember to
# set it back to 0 when you are finished operating on that picture. You also
# must set a maximum number of pictures at line 43.
#
# EXAMPLE:
# So, a line to do this would be:
# @> Control Variable: [XXXX: Picture Label] = Y
# @> Show Picture: 1, 'Avatar', Upper Left (0, 0), (100%, 100%), 255, Normal
#
# That would make a picture with number Y. It is important to remember that
# the variable [XXXX: Picture Number] is set back to 0 after every picture
# command (if you use EP_AUTORESET), so if you wanted to then move the
# picture, the event must have another Control Variable, like so:
#
# @> Control Variable: [XXXX: Picture Number] = Y
# @> Show Picture: 1, 'Avatar', Upper Left (0, 0), (100%, 100%), 255, Normal
# @> Control Variable: [XXXX: Picture Number] = Y
# @> Move Picture: 2, Upper Left (105, 0), (100%, 100%), 255, Normal, @60, Wait
#==============================================================================
# * Global Constants
#==============================================================================
EP_PIC_LIMIT = 50 # The maximum number of pictures useable
EP_PIC_VARIABLE = 1 # The ID of the variable you set to operate on extra pics
# Whether to automatically reset the variable to 0 after each operation
EP_AUTORESET = true
#==============================================================================
# ** Game_Screen
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# aliased method - clear
#==============================================================================
class Game_Screen
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Clear
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias modera_extrapictr_clr_4fx2 clear
def clear (*args)
modera_extrapictr_clr_4fx2 (*args) # Run original method
# Add extra pictures
for i in 21..EP_PIC_LIMIT
@pictures.push (Game_Picture.new (i))
end
end
end
#==============================================================================
# ** Spriteset_Battle
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# aliased method - create_pictures
#==============================================================================
class Spriteset_Battle
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Create Picture Sprite
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias modrn_expictur_createbtl_9ic2 create_pictures
def create_pictures (*args)
modrn_expictur_createbtl_9ic2 (*args) # Run original method
# Create Extra Pictures
for i in 21..EP_PIC_LIMIT
@picture_sprites.push(Sprite_Picture.new(@viewport2,
$game_troop.screen.pictures[i]))
end
end
end
#==============================================================================
# ** Spriteset_Map
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# aliased method - create_pictures
#==============================================================================
class Spriteset_Map
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Create Picture Sprite
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias mala_extrpics_create_5th1 create_pictures
def create_pictures (*args)
mala_extrpics_create_5th1 (*args) # Run original method
# Create Extra Pictures
for i in 21..EP_PIC_LIMIT
@picture_sprites.push(Sprite_Picture.new(@viewport2,
$game_map.screen.pictures[i]))
end
end
end
#==============================================================================
# ** Game_Interpreter
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# aliased methods - command_231, _232, _233, _234, _235
#==============================================================================
class Game_Interpreter
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Picture Operations
# 231 => Show; 232 => Move; 233 => Rotate; 234 => Tint; 235 => Erase
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[:command_231, :command_232, :command_233, :command_234, :command_235].each { |method|
alias_method ("ma_extrpics_#{method}_7xa7".to_sym, method)
define_method (method) { |*args|
# If the label is within the proper set of numbers
if $game_variables[EP_PIC_VARIABLE] > 20 && $game_variables[EP_PIC_VARIABLE] <= EP_PIC_LIMIT
@params[0] = $game_variables[EP_PIC_VARIABLE]
end
# Run Original Method
self.send ("ma_extrpics_#{method}_7xa7".to_sym, *args)
$game_variables[EP_PIC_VARIABLE] = 0 if EP_AUTORESET # Reset Variable
}
}
end
Credit
Support
Just post in this topic if you have any questions
Known Compatibility Issues
No known compatibility issues.
This script by
modern algebra is licensed under a
Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.