Author Topic: Allowing more then 4 saves  (Read 1003 times)

0 Members and 1 Guest are viewing this topic.
lilrock
**
Rep: +0/-0
Offline Offline
Level 62 (51%)
Allowing more then 4 saves
« on: May 19, 2008, 08:50:57 PM »

  • This is my first post here, so if I make a mistake sorry and hopefully I don't get into trouble for something (checking spelling mistakes and grammer)

    I have been wondering around the scriping in RPG Maker VX and XP and I found out how to increase your saves amount.


    Once you go into "Scene_File" in the script editer, you'll see "Create Save File Window" about 6 batch scripts down, Line 70-76 (unless edited)

    This is my script now, I can have up to 15 saves.
    Code: [Select]
    def create_savefile_windows
        @savefile_windows = []
        for i in 0..14
            @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
        end
        @item_max = 15
      end

    This is it originaly

    Code: [Select]
    def create_savefile_windows
        @savefile_windows = []
        for i in 0..3
            @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
        end
        @item_max = 4
      end

    Then you have to head over to "Window_SaveFile" and change the first script batch. This is the original. Line 21-28 (unedited)

    Code: [Select]
    def initialize(file_index, filename)
        super(0, 56 + file_index % 4 * 90, 544, 90)
        @file_index = file_index
        @filename = filename
        load_gamedata
        refresh
        @selected = false
      end

    This is my set up(Example with description)


    Code: [Select]
    def initialize(file_index, filename)
                                        [color=red]*^1*[/color]
        super(file_index % 2 *272,56 + file_index % 15 * 22.5, 272, 70)
                    *^2*                        *^3*            *^4*
        @file_index = file_index

        @filename = filename

        load_gamedata

        refresh

        @selected = false

      end

    1) The filename and index is what the game will call to say how many save amounts there are.
    2) The first argument tells the game where to place the visual box. (X-axis)
    3) The second argument tells the game where to place the visual box. (Y-axis)
    4) the last two will tell the game how big the visual box is. (X-axis,Y-axis)

    Next the game will see where the characters pictures are and where the time stamp goes. Original, Line 67 and 68 (unedited)

    Code: [Select]
    draw_party_characters(152, 58)

    draw_playtime(0, 34, contents.width - 4, 2)

    This is my edit.

    Code: [Select]
    draw_party_characters(72, 29)
    draw_playtime(0, -5, contents.width - 2, 2)

    The draw_Party_characters(*1*,*2*) tell you where the characters are.

    and draw_Playtime(*1*,*2*) tells you where the time stamp goes.

    1) X-axis
    2) Y-axis


    Here are some attachments of pictures of before(save2) and after(save).
    « Last Edit: May 20, 2008, 02:35:31 PM by lilrock »
    ahref Male
    *
    Resident Cloud
    Rep: +52/-54
    Offline Offline
    Level 72 (04%)
    BOOP
    Re: Allowing more then 4 saves
    « Reply #1 on: May 20, 2008, 11:26:11 AM »

  • please use [co de]tags[/c ode] REMOVE SPACES next time. this should also be in the scripts section.

    ill take a look at the code when my eyes register the existence of the yellow text :D
    Restaurant Sackboy Male
    ***
    Rep: +5/-29
    Offline Offline
    Level 64 (10%)
    ohheythar :O
    Re: Allowing more then 4 saves
    « Reply #2 on: May 20, 2008, 11:29:57 AM »

  • Like this;
    Code: [Select]
    THIS IS A CODE BAWKS.
    lilrock
    **
    Rep: +0/-0
    Offline Offline
    Level 62 (51%)
    Re: Allowing more then 4 saves
    « Reply #3 on: May 20, 2008, 02:33:41 PM »

  • Yo, thanks guys :tpg: and hopefully you can read it now  ;8
    Helladen Male
    **
    Rep: +2/-6
    Offline Offline
    Level 62 (30%)
    Re: Allowing more then 4 saves
    « Reply #4 on: June 02, 2008, 02:28:30 PM »

  • Thanks for the help, though is this 99 saves, or less? I think that 99 is the best to do, because you can put your most liked saves at the end so that they won't be touched! lol.
    marty2008 Male
    **
    Rep: +2/-5
    Offline Offline
    Level 60 (25%)
    Re: Allowing more then 4 saves
    « Reply #5 on: June 11, 2008, 11:07:36 PM »

  • Thanks for the help, though is this 99 saves, or less? I think that 99 is the best to do, because you can put your most liked saves at the end so that they won't be touched! lol.

    That be good for offlines games though. lol
    "If you build it, they will play it"
    ahref Male
    *
    Resident Cloud
    Rep: +52/-54
    Offline Offline
    Level 72 (04%)
    BOOP
    Re: Allowing more then 4 saves
    « Reply #6 on: June 12, 2008, 01:22:55 PM »

  • your saying to replace the original scripts you can just call the class in a new page and then overwrite it yourself. this makes scripts one page.

    for example this feautres your above code but preserves the original code:
    Code: [Select]
    class Scene_File < Scene_Base
      def create_savefile_windows
        @savefile_windows = []
        for i in 0..14
            @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
        end
        @item_max = 15
      end
    end

    class Window_SaveFile < Window_Base
      def initialize(file_index, filename)
      super(file_index % 2 *272,56 + file_index % 15 * 22.5, 272, 70)
        @file_index = file_index
        @filename = filename
        load_gamedata
        refresh
        @selected = false
      end
        def refresh
        self.contents.clear
        self.contents.font.color = normal_color
        name = Vocab::File + " #{@file_index + 1}"
        self.contents.draw_text(4, 0, 200, WLH, name)
        @name_width = contents.text_size(name).width
        if @file_exist
          draw_party_characters(72, 29)
          draw_playtime(0, -5, contents.width - 2, 2)
        end
      end
    end
    users wishing to delete your script just delete the page :D
     

    hi

    RMRK.net Theme Super Ultra Mega Beta

    Follow RMRK on Twitter Ask RMRK Questions on Formspring Get RMRK Updates via Windows Live

    Page created in 1.816 seconds with 19 queries.