Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Additional Save Files (Translated), Original Author: Shine Garden
VileoSufora
post Aug 7 2008, 08:36 AM
Post #1


This is not Sparta! This is...What is this I don't even
Group Icon

Group: Revolutionary
Posts: 169
Type: Event Designer
RM Skill: Skilled




Version: 1.0
Author: Shine Garden
Release Date: Translated released on Thursday, August 7th 2008

Introduction

I translated this from a Japanese site, but I forget which one. Used to create more Save Files.


Features

Allows you to create unlimited Save Files.


Script

CODE
#==============================================================================
# ★ ExMenu_IncreaseSaveFile
#------------------------------------------------------------------------------
#  This script sets the number of save files above the default four.
#    Original Author: Shine Garden
#    Translated by: HotSpot6 (AKA hotspot4444, Aslansson)
#==============================================================================

# Maximum amount of save files.
# The default is 4.
EXMNU_INCSF_FILE_MAX = 6

# Height of save file window.
# Default is 90. It isn't usually necessary to modify this.
# The case where the save file window is customized, if it modifies this
# numerical value after adjusting the arrangement of each window, it is possible
# to make the scroll correspond.
EXMNU_INCSF_WINDOW_HEIGHT = 90

#------------------------------------------------------------------------------

class Window_SaveFile
  #--------------------------------------------------------------------------
  # ○ Object initialization (redefinition)
  #     file_index : Index of saving file (0 - 3)
  #--------------------------------------------------------------------------
  def initialize(file_index, filename)
    wh = EXMNU_INCSF_WINDOW_HEIGHT
    super(0, 56 + file_index % EXMNU_INCSF_FILE_MAX * wh, 544, wh)
    @file_index = file_index
    @filename = filename
    load_gamedata
    refresh
    @selected = false
  end
end

class Scene_File
  alias _exmincrsv_start start
  #--------------------------------------------------------------------------
  # ○ Start processing (additional definition)
  #--------------------------------------------------------------------------
  def start
    @file_max = EXMNU_INCSF_FILE_MAX
    _exmincrsv_start
    wh = EXMNU_INCSF_WINDOW_HEIGHT
    adj = (416 - @help_window.height) % wh
    @help_window.height += adj
    @page_file_max = ((416 - @help_window.height) / wh).truncate
    for i in 0...@file_max
      window = @savefile_windows[i]
      if @index > @page_file_max - 1
        if @index < @file_max - @page_file_max - 1
          @top_row = @index
          window.y -= @index * window.height
        elsif @index >= @file_max - @page_file_max
          @top_row = @file_max - @page_file_max
          window.y -= (@file_max - @page_file_max) * window.height
        else
          @top_row = @index
          window.y -= @index * window.height
        end
      end
      window.y += adj
      window.visible = (window.y >= @help_window.height and
        window.y < @help_window.height + @page_file_max * window.height)
    end
  end
  #--------------------------------------------------------------------------
  # ○ Compilation (redefinition) of saving file window
  #--------------------------------------------------------------------------
  def create_savefile_windows
    @top_row = 0
    @savefile_windows = []
    for i in 0...@file_max
      @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
    end
  end
  #--------------------------------------------------------------------------
  # ○ Cursor under movement (redefinition)
  #     wrap : Wrap-around permission
  #--------------------------------------------------------------------------
  def cursor_down(wrap)
    if @index < @file_max - 1 or wrap
      @index = (@index + 1) % @file_max
      for i in 0...@file_max
        window = @savefile_windows[i]
        if @index == 0
          @top_row = 0
          window.y = @help_window.height + i % @file_max * window.height
        elsif @index - @top_row > @page_file_max - 1
          window.y -= window.height
        end
        window.visible = (window.y >= @help_window.height and
          window.y < @help_window.height + @page_file_max * window.height)
      end
      if @index - @top_row > @page_file_max - 1
        @top_row += 1
      end
    end
  end
  #--------------------------------------------------------------------------
  # ○ Cursor on movement (redefinition)
  #     wrap : Wrap-around permission
  #--------------------------------------------------------------------------
  def cursor_up(wrap)
    if @index > 0 or wrap
      @index = (@index - 1 + @file_max) % @file_max
      for i in 0...@file_max
        window = @savefile_windows[i]
        if @index == @file_max - 1
          @top_row = @file_max - @page_file_max
          window.y = @help_window.height + i % @file_max * window.height
          window.y -= (@file_max - @page_file_max) * window.height
        elsif @index - @top_row < 0
          window.y += window.height
        end
        window.visible = (window.y >= @help_window.height and
          window.y < @help_window.height + @page_file_max * window.height)
      end
      if @index - @top_row < 0
        @top_row -= 1
      end
    end
  end
end



Customization

In
CODE
EXMNU_INCSF_FILE_MAX = 6
change 6 to however many Save Files you want.
Also, you can change the Window height, the default is 90.
CODE
EXMNU_INCSF_WINDOW_HEIGHT = 90
Warning: changes the height of the Save File boxes and the height of the "Save to which file?" box. If requested I can probably change this with some minor scripting.


Compatibility


Untested, but should be compatible with most other Save Screen scripts.


Screenshot

Not needed.


Demo

Not needed.


Installation

It's virtually Plug and Play. Just set the number of Save File you want.


FAQ

None yet.


Credits

Original Author: Shine Garden
Translator: HotSpot6


__________________________
Formerly HotSpot6


Anime-Planet.com - anime | manga | reviews
~ ~ ~
Go to the top of the page
 
+Quote Post
   

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: 18th May 2013 - 05:53 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker