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.
Scene Display Ex

0 Members and 1 Guest are viewing this topic.

*
Scripter
Rep:
Level 40
Crownless King
Scene Display Ex
Version: 1.0
Author: Soulpour777
Date: March 20, 2014 - 2:29PM

Description


This script allows you to display different images of different kind, of which it serves as a multipurpose custom scene. It can be a monster book, town book, encyclopedia of items, encyclopedia of people met, notebook or any other types of images you want to display. The script intends to display image rather than a embedded text or graphic is because for the developer to be free on making their designs on the image shown rather than limited graphic shown from the maker.


Features

  • Fully customized scene to display images
  • Unlimited Commands

Screenshots



See it in action here: https://www.youtube.com/watch?feature=player_embedded&v=sXozqwGo5O8

Instructions

Usage:
to call the Scene Display Ex, do this script call:
SceneManager.call(Soulpour_SceneDisplay)


Script


Code: [Select]
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# RGSS3 - Scene Display Ex
# Author: Soulpour777
# Web URL: infinitytears.wordpress.com
# Version 1.0
# Script Category: Custom Scene
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Description:
# This script allows you to display different images of different kind, of which
# it serves as a multipurpose custom scene. It can be a monster book, town book,
# encyclopedia of items, encyclopedia of people met, notebook or any other
# types of images you want to display. The script intends to display image
# rather than a embedded text or graphic is because for the developer to be
# free on making their designs on the image shown rather than limited graphic
# shown from the maker.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Usage:
# to call the Scene Display Ex, do this script call:
# SceneManager.call(Soulpour_SceneDisplay)
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Terms of Use:
# For my terms of use, visit: http://infinitytears.wordpress.com/terms-of-use/
# This script is only for NON COMMERCIAL USE. Contact me for commercial one.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

# Do not touch this unless you know what you're doing.
$image_displayed = ""

module Soulpour

  module Scene_Display
   
    # This hash contains all the display commands. You can add as many as you
    # want, then define what they would do down on the Soulpour_SceneDisplay.
    Commands = {
   
    "Myalai" => :myalai,
    "Cyclops" => :cyclops,
    "Note" => :booknote
   
    }
   
    # This hash contains all the display images displayed on the Scene Book.
    # It contains images rather than texts because of the better design
    # that can be implemented rather than formatting plain texts on the
    # window.
    Display_Images = {
   
    1 => "Myalai",
    2 => "Cyclops",
    3 => "Book"
   
    }
   
  end
 
end

#==============================================================================
# ** Soulpour_DisplayCommand
#------------------------------------------------------------------------------
#  This command window appears on the Scene Display screen.
#==============================================================================

class Soulpour_DisplayCommand < Window_Command
  #--------------------------------------------------------------------------
  # * Initialize Command Selection Position (Class Method)
  #--------------------------------------------------------------------------
  def self.init_command_position
    @@last_command_symbol = nil
  end
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0)
  end
  #--------------------------------------------------------------------------
  # * Get Window Width
  #--------------------------------------------------------------------------
  def window_width
    return 160
  end
  #--------------------------------------------------------------------------
  # * Get Number of Lines to Show
  #--------------------------------------------------------------------------
  def visible_line_number
    item_max
  end
  #--------------------------------------------------------------------------
  # * Create Command List
  #--------------------------------------------------------------------------
  def make_command_list
    add_main_commands
  end
  #--------------------------------------------------------------------------
  # * Add Main Commands to List
  #--------------------------------------------------------------------------
  def add_main_commands
    Soulpour::Scene_Display::Commands.each { |key, value|
      add_command(key, value)
    }
  end
  #--------------------------------------------------------------------------
  # * Get Activation State of Save
  #--------------------------------------------------------------------------
  def save_enabled
    !$game_system.save_disabled
  end
  #--------------------------------------------------------------------------
  # * Processing When OK Button Is Pressed
  #--------------------------------------------------------------------------
  def process_ok
    @@last_command_symbol = current_symbol
    super
  end
end

#==============================================================================
# ** Window_SceneDisplay
#------------------------------------------------------------------------------
#  This window displays the Scene Display.
#==============================================================================

class Window_SceneDisplay < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(160, 0, book_window_width, book_window_height)
    refresh
    self.z = 20
  end
  #--------------------------------------------------------------------------
  # * Get Window Width
  #--------------------------------------------------------------------------
  def book_window_width
    Graphics.width - 160
  end
  #--------------------------------------------------------------------------
  # * Get Window Height
  #--------------------------------------------------------------------------
  def book_window_height
    Graphics.height
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
  end
  #--------------------------------------------------------------------------
  # * Open Window
  #--------------------------------------------------------------------------
  def open
    refresh
    super
  end
end

#==============================================================================
# ** Soulpour_SceneDisplay
#------------------------------------------------------------------------------
#  This class performs the Scene Display screen processing.
#==============================================================================

class Soulpour_SceneDisplay < Scene_MenuBase
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    super
    @book_screen = Window_SceneDisplay.new
    create_command_display
    display_image_in_window
  end
  #--------------------------------------------------------------------------
  # * Create Command Display
  #-------------------------------------------------------------------------- 
  def create_command_display
    @display_command = Soulpour_DisplayCommand.new
    @display_command.set_handler(:ok, method(:on_display_ok))
  end 
 
  #--------------------------------------------------------------------------
  # * On Display OK
  # This is where you would edit the functions that would happen when you
  # press the options. Adding is easy, just follow the format of the
  # commands below and add the functions you made or modified from above.
  # display_image_in_window and @display_command.activate must be always
  # present, and redispose should be on top everytime.
  #-------------------------------------------------------------------------- 
  def on_display_ok
    case @display_command.current_symbol
    when :myalai
      redispose
      $image_displayed = Soulpour::Scene_Display::Display_Images.values[0]
      display_image_in_window
      @display_command.activate
    when :cyclops
      redispose
      $image_displayed = Soulpour::Scene_Display::Display_Images.values[1]
      display_image_in_window
      @display_command.activate
    when :booknote
      redispose
      $image_displayed = Soulpour::Scene_Display::Display_Images.values[2]
      display_image_in_window
      @display_command.activate
    end
  end 
 
  #--------------------------------------------------------------------------
  # * Display Image
  # This is where the displaying of the alternate images is created
  #--------------------------------------------------------------------------   
  def display_image_in_window
    @image_displayed = Plane.new
    @image_displayed.bitmap = Cache.picture($image_displayed)
    @image_displayed.z = 120
  end
 
  #--------------------------------------------------------------------------
  # * Redispose
  # Redispose means that you need to destroy the image when you press the
  # commands, as to it is already present and create it again to display
  # the image. Once displayed, you need to destroy that image again when
  # you select another command.
  #--------------------------------------------------------------------------   
  def redispose
    @image_displayed.bitmap.dispose
    @image_displayed.dispose
  end
 
  #--------------------------------------------------------------------------
  # * Update Basic
  #--------------------------------------------------------------------------   
  def update
    update_basic
    if Input.trigger?(:B)
      redispose
      RPG::SE.new("Cancel1",100,100).play
      SceneManager.goto(Scene_Map)
    end
  end
 
end

Credit


  • Soulpour777
  • Makapri for the art used.

Support


For any questions and suggestions about the script, don't forget to PM, comment or mail me.

Known Compatibility Issues

NONE :)

Demo


https://dl.dropboxusercontent.com/u/36246420/RGSS3%20Scripts%20Master%20Host/Scene%20Display%20Ex.exe

Terms of Use

For Commercial Use:

    The script license is required to use the script commercially. This license means that I (SoulPour777) acknowledge the user on using my scripts in your project. This script license is issued per script use or per project. If the script is to be used on multiple projects, the user must pay for them separately.
    Updates or Bug Fixes are accepted. These updates or bug fixes are also charged.
    Credit SoulPour777 for the script on your project.
    Preserve the Script Headers and Notes.
    Requested Scripts has a higher price that the scripts that are already available on my website.

For Non-Commercial Use:

    You are free to use the script on any non-commercial projects.
    You are free to adapt the script. Any modifications are allowed as long as it is provided as a note on the script.
    Credits to SoulPour777 for the script.
    Preserve the Script Header.
    Claiming the script as your own is prohibited.


If you like my work, please do support me on Patreon.
https://www.patreon.com/Soulpour777?ty=h

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
This looks like a very useful script, SoulPour777. I actually had an idea like this that I never got around to scripting. I'm glad to see that now I'll never have to.

Also, sorry for not commenting on this when it was posted. I've been quite busy, and am just now getting around to adding these scripts to the index. I really do think this is great though.

*
Scripter
Rep:
Level 40
Crownless King
Thanks :) I think this needs more upgrades though, instead of using images, I'd want to use fonts and word wrapping, though I have no sufficient skills to do so.


If you like my work, please do support me on Patreon.
https://www.patreon.com/Soulpour777?ty=h

**
Rep: +0/-0Level 35
RMRK Junior
Very neat script! An nice optional feature to have is a way for devs to unlock the commands throughout the game. :)

Great work overall.