[RMXP] Extended Save slots script

I was trying to use HonorBlade's script, but there's garbled text in half of the script. I'm not sure if that's originally text in a foreign language. The garbled text interfered with the script and rendering it useless
Code:
def main
   # ヘルプウィンドウを作�
   @help_window = Window_Help.new
   @help_window.set_text(@help_text)
   # セーブファイルウィンド�
?を作�

"?を作�" was detected as error in the engine, and I don't know if that was supposed to be commands or if it was part of the comments.

If anyone knows how to fix this or suggest me a better script for adding save slots, I'd be grateful. Thank you.
Alternate extended save script

Improved Save by gerkrt
https://rpgmaker.net/scripts/49/code/

Preview
saves.png


line 581- you can adjust max save slots
Thanks, that looks nice. I'm not entirely sure I need the level displays though...
For Improved Save script
line 519 - delete 'level',
to remove level displays in save
I see. Thank you.
Out of curiousity, would you know what part of the script allows the screen to scroll?

Before looking for scripts, I tried modifying the save slots in Scene_File manually, but all it did was add the extra slots off-screen. I don't know how to make the screen scroll down, so I was forced to find a script in the end.
In Scene_File#update, just look at the blocks under Input.repeat?(Input::DOWN) and Input.repeat?(Input::UP). It doesn't appear to scroll anything. There's only ever 4 save slot windows created, just the contents within them get updated as the file_index changes.

This logic doesn't exist in the default Scene_File script, so yes, using a separate script that does this already is the better choice.
In Scene_File#update, just look at the blocks under Input.repeat?(Input::DOWN) and Input.repeat?(Input::UP). It doesn't appear to scroll anything. There's only ever 4 save slot windows created, just the contents within them get updated as the file_index changes.

This logic doesn't exist in the default Scene_File script, so yes, using a separate script that does this already is the better choice.
Oh yeah, that is true. I know I would have to add it in manually.
I am curious about what exactly were the script commands that shifts the row upwards so that the extra slots aren't stuck offscreen.
I am curious about what exactly were the script commands that shifts the row upwards so that the extra slots aren't stuck offscreen.
As I already said, there aren't extra windows offscreen. There's only ever 4 drawn to the screen at any time. All it does is just clears out the contents in all the windows and fills them with new information (a la the windows' refresh methods) to give it the illusion that there are more save slots.
Code:
# ... the player has pressed down, and there are more save slots to show ...

    # Play cursor SE
    $game_system.se_play($data_system.cursor_se)
    # Move cursor down
    @file_index +=1
    # Refresh the widows
    for i in 0..3
      # Checks if its beyond the limit
      if @file_index+i > Wep::Max_slots-1
        @savefile_windows[i].refresh(1001)                                            #<==
        @slot_windows[i].refresh(Wep::Slot_dont_exist)                                #<==
      else                
        @savefile_windows[i].refresh(@save_slots[@file_index+i][0])                   #<==
        @slot_windows[i].refresh(Wep::Slot+(@save_slots[@file_index+i][0]+1).to_s)    #<==
        if Wep::Quicksave and @file_index+i == Wep::Quicksave_slot-1
          @slot_windows[i].refresh(Wep::Quicksave_slot_text)                          #<==
        end
        if Wep::Autosave and @file_index+i == Wep::Autosave_slot-1
          @slot_windows[i].refresh(Wep::Autosave_slot_text)                           #<==
        end              
      end
    end
The parameters you pass into the refresh method tells the script what it should render. For savefile windows, it's the save file data. For slot windows, it's the "Slot #" or "Quick/Autosave" text. You can verify this yourself by looking at the Window_SaveFile#refresh and Slot_Window#refresh methods.
As I already said, there aren't extra windows offscreen. There's only ever 4 drawn to the screen at any time. All it does is just clears out the contents in all the windows and fills them with new information (a la the windows' refresh methods) to give it the illusion that there are more save slots.
Ooh I see. Interesting. I had always thought it disappears offscreen because when I just changed the number, when I press the arrow keys down the blinking select indicator disappears after slot 4, while still making the beep sounds. So it looked like the selector is selecting something offscreen.

I have some coding experience but not quite enough to fully understand how RGSS works
Are you talking about when you tried to modify the vanilla Scene_File script? If what you did was something like:
Code:
    # Make save file window
    @savefile_windows = []
    for i in 0..4               #<=============== or anything larger
      @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
    end
then yes, there would be an extra window(s) outside of the visible area.

The script by gerkrt does not do that:
Code:
    # Make save file and slots windows
    @savefile_windows = []
    @slot_windows = []
   
    for i in 0..3
      @savefile_windows.push(Window_SaveFile.new(i))
      @slot_windows.push(Slot_Window.new(i))
    end
Are you talking about when you tried to modify the vanilla Scene_File script? If what you did was something like:
Code:
# Make save file window
@savefile_windows = []
for i in 0..4 #<=============== or anything larger
@savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
end
then yes, there would be an extra window(s) outside of the visible area.
Yes, yes, sorry I was talking about both scripts at the same time.
I was trying to compare between the default/original Scene_File with the new functions in gerkrt's script to see what makes it "scroll"

Original thread: https://forums.rpgmakerweb.com/threads/rmxp-extended-save-slots-script.143056/