RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Extra Event Pictures

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2010 Best Use Of Avatar And Signature Space2010 Favourite Staff Member
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


Code: [Select]
#==============================================================================
#    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


  • modern algebra

Support


Just post in this topic if you have any questions

Known Compatibility Issues

No known compatibility issues.


Creative Commons License
This script by modern algebra is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.
« Last Edit: May 08, 2011, 04:24:04 AM by modern algebra »

**
Rep: +0/-0Level 85
Script takes getting used to but its working fine.

MAII, you forgot to say that the Script has got to been put above Main.

Show Picture: Working
Move Picture: Working
Tint Picture: Working

Its Dangerous To Have A Signature These Days.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2010 Best Use Of Avatar And Signature Space2010 Favourite Staff Member
I suppose I did. All scripts have to be put above Main though :P

*
Rep:
Level 85
I am the wood of my broom
2010 Project of the YearProject of the Month winner for January 2010Project of the Month winner for January 2009Project of the Month winner for April 2010
I found out that Rotate Picture doesn't work with this ;v;
To be exact: I used a show picture #1 and made it rotate...It won't rotate.
I haven't tested it yet with binded into variable tho so I'm going to try that one out too.

EDIT: Ok it seems that I have to bind my picture numbers in variable for it to rotate :o
Adding attachment~ I just find it funny it's not above 20 and it won't rotate :) I'll have to get used to it I guess! But I thought I should bring it up.
« Last Edit: May 08, 2011, 02:58:19 AM by Nessiah »


*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2010 Best Use Of Avatar And Signature Space2010 Favourite Staff Member
Oops! That's an error. I will fix it immediately.


EDIT::

Alright, I updated the script to 1.1. You can get it from the first post.
« Last Edit: May 08, 2011, 04:25:13 AM by modern algebra »

*
Rep:
Level 85
I am the wood of my broom
2010 Project of the YearProject of the Month winner for January 2010Project of the Month winner for January 2009Project of the Month winner for April 2010
Thank you Modern Algebra <3

Edit: Suddenly it's not compatible with woratanas picture below character XD

Code: [Select]
#===============================================================
# ? [VX] ? Pictures under Characters ? ?
# * Show pictures under characters on map but above map tiles *
#--------------------------------------------------------------
# ? by Woratana [woratana@hotmail.com]
# ? Thaiware RPG Maker Community
# ? Released on: 22/02/2009
# ? Version: 1.0
#--------------------------------------------------------------
# ? Update:
#--------------------------------------------------------------
# ? Version 1.0 (22/02/2009)
# - Unlimited numbers of picture under characters
#
#--------------------------------------------------------------
# ? Compatibility:
#--------------------------------------------------------------
# ? This script will rewrite 0 method(s):
#
#
# ? This script will alias 2 method(s):
#     Spriteset_Map.create_pictures
#     Sprite_Picture.update
#
# ? This script should work with most scripts
#
#--------------------------------------------------------------
# ? Installation:
#--------------------------------------------------------------
# 1) This script should be placed JUST AFTER ? Materials.
#
# ? Like this:
# ? Materials
# *Pictures under Characters
# ...
# ...
# ? Main Process
# Main
#
# 2) Setup this script in Setup Part below.
#
#--------------------------------------------------------------
# ? How to use:
#--------------------------------------------------------------
# ? Place this script and setup in the setup part.
#
#=================================================================

class Spriteset_Map

  #=================================================================
  # ++ Setup Part
  #-----------------------------------------------------------------
  FIRST_PICBELOW_ID = 80 # First ID of picture that will show below characters
  LAST_PICBELOW_ID = 99 # Last ID of picture that will show below characters

  #   For example, if you set FIRST to 10 and LAST to 15, picture ID 10-15
  # will show below characters on map.
  #=================================================================

  alias wora_picbelow_sprsetmap_crepic create_pictures

  #--------------------------------------------------------------------------
  # * Create Picture Sprite
  #--------------------------------------------------------------------------
  def create_pictures(*args)
    wora_picbelow_sprsetmap_crepic(*args)
    for pic_id in FIRST_PICBELOW_ID..LAST_PICBELOW_ID
      @picture_sprites[pic_id - 1].dispose
      # Create picture below player in viewport1, so it can show just below player
      @picture_sprites[pic_id - 1] = Sprite_Picture.new(@viewport1,
    $game_map.screen.pictures[pic_id])
    end
  end
end

class Sprite_Picture < Sprite
  alias wora_picbelow_sprpic_upd update

  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update(*args)
    wora_picbelow_sprpic_upd(*args)
    self.z = $game_player.screen_z - 1 if @picture.number >=
  Spriteset_Map::FIRST_PICBELOW_ID and @picture.number <= Spriteset_Map::LAST_PICBELOW_ID
  end
end
« Last Edit: May 08, 2011, 06:00:34 AM by Nessiah »


*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2010 Best Use Of Avatar And Signature Space2010 Favourite Staff Member
Err.. maybe when you recopied it you didn't set the PIC_LIMIT in my script back up to whatever you had it before? The default is only 50.

*
Rep:
Level 85
I am the wood of my broom
2010 Project of the YearProject of the Month winner for January 2010Project of the Month winner for January 2009Project of the Month winner for April 2010
That's weird, I set it back to 100, I'll just use the old version for now I guess :)


*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2010 Best Use Of Avatar And Signature Space2010 Favourite Staff Member
Oh, and was Extra Event Pictures above the Fix Pictures script? If not, then that would cause that error.

*
Rep:
Level 85
I am the wood of my broom
2010 Project of the YearProject of the Month winner for January 2010Project of the Month winner for January 2009Project of the Month winner for April 2010
I have it above fix picture yeah, but I put the woratana script below it and increase my pic limit higher, I guess my pic limit was the problem? Woops sorry about that X'D


*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2010 Best Use Of Avatar And Signature Space2010 Favourite Staff Member
So it's working now?

*
Rep:
Level 85
I am the wood of my broom
2010 Project of the YearProject of the Month winner for January 2010Project of the Month winner for January 2009Project of the Month winner for April 2010
Yes! Don't worry >v<)//