Notice: fwrite(): Write of 461 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 59 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 1714 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 44 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 8192 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96
Print Page - Extra Event Pictures

The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => XP Scripts Database => Topic started by: modern algebra on April 15, 2009, 06:17:17 PM

Title: Extra Event Pictures
Post by: modern algebra on April 15, 2009, 06:17:17 PM
Extra Event Pictures
Version: 1.0
Author: modern algebra
Date: April 15, 2009

Version History




Description



For complicated Picture eventing, it is quite clear that 50 pictures is not enough. This script allows you to use more, albeit in a non-intuitive way

Features



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 the header of the script

Script



#==============================================================================
#  50+ Pictures
#  Author: modern algebra
#  Version: 1.0
#  Date: April 15, 2009
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#    For complicated Picture eventing, it is quite clear that 50 pictures is
#    not enough. This script allows you to use more, albeit in a non-intuitive
#    way
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#    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) to the number that you want, say 21 or 22 or 105. Then set up the
#    Picture command directly below it with a number of 20. Once that is done,
#    the variable is cleared and so every time you want to handle the picture
#    you have to re-set that variable to the number you want.
#
#    So, a line to do this would be:
#      @> Control Variable: [XXXX: Picture Number] = 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, 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
#==============================================================================
PIC_LIMIT = 70    # This is the new limit for pictures
PIC_VARIABLE = 50 # The index of the variable which holds the number of each picture

#==============================================================================
# ** Game_Screen
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased methods - initialize, update
#==============================================================================

class Game_Screen
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias algebra_nssih_picsplusxp_init_4nn5 initialize
  def initialize
    # Run Original Method
    algebra_nssih_picsplusxp_init_4nn5
    # Initialize extra picture sprites
    for i in 101..(PIC_LIMIT*2)
      @pictures.push (Game_Picture.new(i))
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Frame Update
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modlg_ness_more_picsxp_upd_8nf2 update
  def update
    # Run Original Method
    modlg_ness_more_picsxp_upd_8nf2
    # Update extra pictures
    if $game_temp.in_battle
      for i in (51 + PIC_LIMIT)..(2*PIC_LIMIT)
        @pictures[i].update
      end
    else
      for i in 101..(51 + PIC_LIMIT)
        @pictures[i].update
      end
    end
  end
end

#==============================================================================
# ** Spriteset_Map
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased methods - initialize
#==============================================================================

class Spriteset_Map
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias mdrnbr_nsiah_extrapics_init_spmap_56nd initialize
  def initialize
    # Run Original Method
    mdrnbr_nsiah_extrapics_init_spmap_56nd
    # Initialize extra picture sprites
    for i in 101..(51 + PIC_LIMIT)
      @picture_sprites.push(Sprite_Picture.new(@viewport2,
        $game_screen.pictures[i]))
    end
  end
end

#==============================================================================
# ** Spriteset_Battle
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased methods - initialize
#==============================================================================

class Spriteset_Battle
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias algbrm_nessy_mrpicxps_init_spbt_83b5 initialize
  def initialize
    # Run Original Method
    algbrm_nessy_mrpicxps_init_spbt_83b5
    # Initialize extra picture sprites
    for i in (51 + PIC_LIMIT)..(2*PIC_LIMIT)
      @picture_sprites.push(Sprite_Picture.new(@viewport3,
        $game_screen.pictures[i]))
    end
  end
end

#==============================================================================
# ** Interpreter
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased methods -
#==============================================================================

class Interpreter
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Show Picuture
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_ness_extra_pictures_231_commnd_h5ne command_231
  def command_231
    # Get number
    ma_check_picture_variable
    # Run Original Method
    modalg_ness_extra_pictures_231_commnd_h5ne
    # Reset
    $game_variables[PIC_VARIABLE] = 0
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Move Picuture
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_siah_extr_pices_232_cmand_hjh4 command_232
  def command_232
    # Get number
    ma_check_picture_variable
    # Run Original Method
    modalg_siah_extr_pices_232_cmand_hjh4
    # Reset
    $game_variables[PIC_VARIABLE] = 0
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Rotate Picuture
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_nes_pluspics_233_cmmnd_7bf5 command_233
  def command_233
    # Get number
    ma_check_picture_variable
    # Run Original Method
    modalg_nes_pluspics_233_cmmnd_7bf5
    # Reset
    $game_variables[PIC_VARIABLE] = 0
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Tint Picuture
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modrnalbr_nesih_ex_pict_234_comnd_65hg3 command_234
  def command_234
    # Get number
    ma_check_picture_variable
    # Run Original Method
    modrnalbr_nesih_ex_pict_234_comnd_65hg3
    # Reset
    $game_variables[PIC_VARIABLE] = 0
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Erase Picuture
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modabr_nsah_morepics_235_cmnd_8nt4 command_235
  def command_235
    # Get number
    ma_check_picture_variable
    # Run Original Method
    modabr_nsah_morepics_235_cmnd_8nt4
    # Reset
    $game_variables[PIC_VARIABLE] = 0
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Check Picture Variable
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def ma_check_picture_variable
    # If the label is within the proper set of numbers
    if $game_variables[PIC_VARIABLE] <= PIC_LIMIT
      @parameters[0] = $game_variables[PIC_VARIABLE]
      if $game_temp.in_battle
        @parameters[0] += PIC_LIMIT - 50
      else
        @parameters[0] += 50 if @parameters[0] >= 50
      end
    end
  end
end


Credit




Thanks


Support



Please post in this topic at rmrk.net for the swiftest support.

Known Compatibility Issues

None so far.
Title: Re: Extra Event Pictures
Post by: Grafikal on April 15, 2009, 11:02:18 PM
well that was fast lol.
Title: Re: Extra Event Pictures
Post by: Nessiah on April 15, 2009, 11:44:24 PM
Oooh thank you very much :3