Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> Myst's Scripts, Learning RGSS2
Myst
post Feb 14 2012, 04:22 PM
Post #1


Level 4
Group Icon

Group: Member
Posts: 51
Type: None
RM Skill: Undisclosed




Hey! Welcome to my scripting workshop. tongue.gif I'm trying to learn RGSS2 so anything I make for my own game or other's games will usually be posted up here for grabs. If you have a request feel free to PM me (I can't guarantee I can do it though being a beginner and all) but I can try my best smile.gif

Disable Save Script
CODE
#==============================================================================
# ** Disable Save Script made by Myst 2/21/2012 (Revised)
#------------------------------------------------------------------------------
#  Originally made for my own game.
#==============================================================================

class Scene_Menu < Scene_Base

  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5])
    @command_window.index = @menu_index
    if $game_party.members.size == 0          # If number of party members is 0
      @command_window.draw_item(0, false)     # Disable item
      @command_window.draw_item(1, false)     # Disable skill
      @command_window.draw_item(2, false)     # Disable equipment
      @command_window.draw_item(3, false)     # Disable status
    end
    if $game_system.save_disabled             # If save is forbidden
      @command_window.draw_item(4, false)     # Disable save
    end
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        start_actor_selection
      when 4      # End Game (Save Rewrite)
        $scene = Scene_End.new
      when 5      # End Game
        $scene = Scene_End.new
      end
    end
  end

  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1  # skill
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end
This script disables save via the menu thus, making it only possible to save from the vx option "Open Save Menu" in events.


Credit Option Menu
CODE
#==============================================================================
# Credit Option Menu by Myst 2/21/2012 (Revised)
# Request by: Pera
# Edits: Scene_Title Add-on
# Installation: Paste above Main
# Line #58 is what is displayed on the credit box.
# Info: This is my second script edit any criticism/helpful suggestions would
# be extremely appreciated.
# - Myst
#------------------------------------------------------------------------------
#  This class performs the title screen processing.
#==============================================================================

class Scene_Title < Scene_Base  
  #--------------------------------------------------------------------------
  # * Adding credit as a physical option
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::new_game
    s2 = Vocab::continue
    s3 = Vocab::shutdown
    s4 = 'Credits'
    @command_window = Window_Command.new(172, [s1, s2, s3, s4])
    @command_window.x = (544 - @command_window.width) / 2
    @command_window.y = 288
    if @continue_enabled                    # If continue is enabled
      @command_window.index = 1             # Move cursor over command
    else                                    # If disabled
      @command_window.draw_item(1, false)   # Make command semi-transparent
    end
    @command_window.openness = 0
    @command_window.open
  end
  #--------------------------------------------------------------------------
  # * Adding aftermath for selection of credits
  #--------------------------------------------------------------------------
  def update
    super
    @command_window.update
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0    #New game
        command_new_game
      when 1    # Continue
        command_continue
      when 2    # Shutdown
        command_shutdown
      when 3    # Credits
        command_credits
      end
      end
    end
  #--------------------------------------------------------------------------
  # * Pop-Up Credit-Box
  #--------------------------------------------------------------------------
  def command_credits
    Sound.play_decision
    p('Game made by X, game made by Y, released: X/XX/XXXX X:XX PM/AM, Drawings made by X, Scripts done by X, etc.')
    end
end
This script adds credits on the Title Screen. When selected a pop-up will display game credits.


This post has been edited by Myst: Feb 21 2012, 08:34 AM
Go to the top of the page
 
+Quote Post
   

Posts in this topic
- Myst   Myst's Scripts   Feb 14 2012, 04:22 PM
- - Kread-EX   Protip: when you publish a script, you should only...   Feb 15 2012, 01:48 AM
- - Myst   Ah thanks for the advice Kread, much appreciated. ...   Feb 15 2012, 04:40 AM
- - Myst   Update -> Changed topic's purpose (from sin...   Feb 21 2012, 08:36 AM
- - Pera   QUOTE (Myst @ Feb 14 2012, 04:22 PM) Hey...   Feb 21 2012, 09:37 AM
- - Myst   No problem Pera   Feb 21 2012, 10:04 AM
- - kayden997   Intresting, a credit option script. Thanks   Feb 21 2012, 10:10 AM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 21st May 2013 - 08:33 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker