Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Wecoc

21
Wow sorry, my mistake. In this case it was not $game_variables[19] but @game_variables[19] because we are not using the global value, we are using the loaded from each file Marshal data.
You can also change that 19 to the ID of the variable you want for the chapter.

Your script had some tabulation issues. It doesn't matter for the code itself, but scripters always prefer a good tabulation to easily understand the code.

So this is the corrected script, I hope it will work fine now:

#==============================================================================
# MOG Scene File Ayumi V1.0           
#==============================================================================
# By Moghunter
#==============================================================================

module MOG
  #Transition Time
  MSVT = 30
  #Transition Type
  MSVTT = "006-Stripe02"
end

$mogscript = {} if $mogscript == nil
$mogscript["menu_ayumi"] = true

###############
# Window_Base #
###############

class Window_Base < Window
  def drw_win_file(x,y)
    dwf = RPG::Cache.picture("Win_File")
    cw = dwf.width
    ch = dwf.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x , y - ch, dwf, src_rect) 
  end   
end

###################
# Window_SaveFile #
###################

class Window_SaveFile < Window_Base
 
  attr_reader   :filename               
  attr_reader   :selected       
 
  def initialize(file_index, filename)
    super(0, 64 + file_index * 138, 640, 240)   
    self.contents = Bitmap.new(width - 32, height - 32) 
    self.opacity = 0
    @file_index = file_index
    @filename = "Save#{@file_index + 1}.rxdata"
    @time_stamp = Time.at(0)
    @file_exist = FileTest.exist?(@filename)
    if @file_exist
      file = File.open(@filename, "r")
      @time_stamp = file.mtime
      @characters = Marshal.load(file)
      @frame_count = Marshal.load(file)
      @game_system = Marshal.load(file)
      @game_switches = Marshal.load(file)
      @game_variables = Marshal.load(file)
      @game_self_switches = Marshal.load(file)
      @game_screen = Marshal.load(file)
      @game_actors = Marshal.load(file)
      @game_party = Marshal.load(file)
      @game_troop = Marshal.load(file)
      @game_map = Marshal.load(file)
      @total_sec = @frame_count / Graphics.frame_rate
      file.close
    end
    @wiref = 0
    refresh
    @selected = false
  end 
 
  def refresh
    self.contents.clear
    drw_win_file(0,190)
    name = "Pagina" + "#{@file_index + 1}"#nome pagina
    self.contents.draw_text(338, 23, 600, 32, name) #posizione pagina
    self.contents.draw_text(337, 22, 600, 32, name) #posizione pagina
    @name_width = contents.text_size(name).width
    chapter = case @game_variables[19] # Chapter
      when 0 then "Capitolo 1: Destino Infernale"
      when 1 then "Capitolo 2: Le ''Amazon Stones''"
      when 2 then "Capitolo 3: Sogni In Pericolo"
      when 3 then "Capitolo 4: Lotta Per La Galassia"
      when 4 then "Capitolo 5: L'Ultima Battaglia"
      when 5 then "Capitolo 6: Il Primo Amore Di Ami"
    end
    self.contents.draw_text(338, 23, 600, 32, chapter) #posizione pagina
    self.contents.draw_text(337, 22, 600, 32, chapter) #posizione pagina
    if @file_exist
      for i in 0...@characters.size
        bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
        cw = bitmap.rect.width / 4
        ch = bitmap.rect.height / 4
        src_rect = Rect.new(cw * @wiref + 1 , 0, cw, ch)
        x = 360 - @characters.size + i * 32 - cw / 4 #posizione sailor
        self.contents.blt(x - 10, 135 - ch, bitmap, src_rect) #135altezza sailor
        x = 116
        actors = @game_party.actors
        for i in 0...[actors.size, 5].min
          x     = i * 60
          actor = actors[i]       
        end         
      end     
      hour = @total_sec / 60 / 60
      min = @total_sec / 60 % 60
      sec = @total_sec % 60
      time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
      self.contents.draw_text(5, 41, 397, 32, time_string, 2)
      self.contents.draw_text(4, 40, 397, 32, time_string, 2)   
    end
  end
   
  def selected=(selected)
    @selected = selected
  end
end

##############
# Scene_File #
##############

class Scene_File
  def initialize(help_text)
    @help_text = help_text
  end
 
  def main
    @mnback = Plane.new
    @mnback.bitmap = RPG::Cache.picture("MN_BK")
    @mnback.z = 1
    @mnlay = Sprite.new
    @mnlay.bitmap = RPG::Cache.picture("Lay_File")
    @mnlay.z = 2
    @help_window = Window_Help.new
    @help_window.set_text(@help_text)
    @help_window.opacity = 0
    @savefile_windows = []
    for i in 0..2
      @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
    end
    @savefile_windows[0]
    @file_index = $game_temp.last_file_index
    @savefile_windows[@file_index].selected = true
    @savefile_windows[0].y = 40   
    @savefile_windows[1].y= 140
    @savefile_windows[2].y= 240   
    @win_move_time = 0
    @win_move = 0
    @win_dire = 0
    @win_opac = 255
    @win1_y = 0
    @win2_y = 0
    @win3_y = 0
    Graphics.transition(MOG::MSVT, "Graphics/Transitions/" + MOG::MSVTT)
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    for i in 0..50
      @mnback.ox += 1
      Graphics.update 
    end     
    Graphics.freeze
    @help_window.dispose
    @mnback.dispose
    @mnlay.dispose
    for i in @savefile_windows
      i.dispose
    end
  end
 
  def update
    for i in 0..2
      @savefile_windows[i].x = 0
      @savefile_windows[i].z = 1
      @savefile_windows[i].contents_opacity = 130
    end
    @savefile_windows[@file_index].x = @win_move
    @savefile_windows[@file_index].z = 2
    @savefile_windows[@file_index].contents_opacity = @win_opac
    @help_window.update   
    for i in @savefile_windows
      i.update
    end
    if Input.trigger?(Input::C)
      on_decision(make_filename(@file_index))
      $game_temp.last_file_index = @file_index
      return
    end
    if Input.trigger?(Input::B)
      on_cancel
      return
    end
    if Input.repeat?(Input::DOWN)
      if Input.trigger?(Input::DOWN) or @file_index < 3
        $game_system.se_play($data_system.cursor_se)
        @savefile_windows[@file_index].selected = false
        @file_index = (@file_index + 1) % 3
        @savefile_windows[@file_index].selected = true
        return
      end
    end
    if Input.repeat?(Input::UP)
      if Input.trigger?(Input::UP) or @file_index > 0
        $game_system.se_play($data_system.cursor_se)
        @savefile_windows[@file_index].selected = false
        @file_index = (@file_index - 1) % 3
        @savefile_windows[@file_index].selected = true
        return
      end
    end
  end
 
  def make_filename(file_index)
    return "Save#{file_index + 1}.rxdata"
  end
end
22
You should think about change that font, light background with white font... and that large shadow is not helping.

Also, don't use 'else if' instead of 'elsif'. But with only a variable as F0 said, you will be able to use a 'case'.

case $game_variables[19] # Chapter
when 0
 chapter = "Intro - A Sailor from the Moon"
when 1
 chapter = "Chapter 1 - Infernal destination or something"
when 2
 chapter = "Chapter 2 - So you basically are a cat who talks"
when 3
 chapter = "Chapter 3 - We need help, please call Son Goku"
end
self.contents.draw_text(338, 58, 600, 32, chapter)


And this is exactly the same a little more compressed:

chapter = case $game_variables[19] # Chapter
  when 0 then "Intro - A Sailor from the Moon"
  when 1 then "Chapter 1 - Infernal destination or something"
  when 2 then "Chapter 2 - So you basically are a cat who talks"
  when 3 then "Chapter 3 - We need help, please call Son Goku"
end
self.contents.draw_text(338, 58, 600, 32, chapter)
23
LOL sorry, I meant WhiteRose (???)

Well, after check the script a bit more, I didn't found new bugs. That means this version is officially concluded. If in a future someone find other bugs, lacks or important incompatibilities the script will be uploaded again, to 2.5.

Thank you LD for helping me on this.
24
RMXP Script Database / Re: [XP] Enemies That Level Up
September 16, 2014, 08:10:28 am
WhiteRose:
Some people use a defined formula across the game to define all the enemies using the same logic.

Example: ShowHide
PE = PA[n] * (pn / tn) * (1 + ef) / (3 - d)

PE - Enemy parameter
PA - Actor parameter (in level [n])
pn - Party number
tn - Troop number
ef - Enemy effectiveness - 0 - Low, 1 - Default, 2 - High
d - Enemy difficulty - 0 - Easy, 1 - Default, 2 - Boss


The script could calculate that automatically, with some adds to the current one it shouldn't be difficult.
But testing the game several times is the best way, and for me, the only way.

I never had problems with this; once you defined and tested the first type of enemy, others can be calculated as an improvement of the first, plus specific enemy parameter changes (for example adding agility on a flying enemy type).




I know something interesting about enemies with level in a more complex way on RPG maker XP. Some time ago I contributed on the hispanic community with a script called ERON engine. I don't like some things on it but it's idea is great for some type of RPGs.

It's base is the next one: Enemies and Actors have the same properties and capacities; level, equip...
The way the script does that using the default Database is the next one:
Every Actor is associated to a Enemy ID it uses as a base, so every Enemy is also associated to an Actor ID (and its class), and the battler is the result of both. The Database 'Actor' parameters now control both actors and enemies parameters because of the level variation. The 'Actor' element / state represent the specific elements and states of that battler, and the 'Enemy' ones the weakness to that element / state. Finally the gold is recalculated using the 'Enemy' value with a level multiplicator, and enemy's equip is added to the treasures array.




About the SephirothSpawn's script, it's a good way to make the game difficult from start to end, and in a game based by time where everyone (good and evil) train in the same time to get the victory (for example Age of Empires), the more you wait the stronger your enemies are.  But for a classical RPG I would not use that because some reasons; First, the best way the player realize how strong his party has been made because of the training (and also how strong the antagonist is) is battle them with an enemy type which were hard to kill before and now it's so easy; Second, because with the script, grinding (go back to train) makes no sense since it will not cause an advantage of the party over the enemies; And Third, it's logical that the party gets stronger after every battle, but the enemies who didn't fight with the party shouldn't have that growth.

Uh and... I like the variance add-on, lol.
25
Event System Database / [XP] Battle by Layers
September 14, 2014, 12:25:37 pm
Battle by Layers
Version: 1.0
Type: Boss Battle Engine



Introduction

This engine simulates an absolutely picture-based boss battle in map. It's a base with which you could do many other things.


Features


  • Default damage display.
  • New support for pictures: animation display, collapse...



Screenshots

Spoiler: ShowHide




Demo

Battle by Layers.zip


Instructions

It requires all these to work:
- 2 switches --> "Battle" to activate the engine and "Dead" when the hero or the enemy are dead (end of the demo)
- 5 variables --> Basically for damage calculation and HP.
- 14 pictures --> Background (1) , Enemy (3), Terrain (1) and Actor (9)
- 1 script --> New support for pictures. Place over main and under the other scripts. It's compatible with most scripts.
- 2 common events --> hero damage and enemy damage
- 5 map events --> everything else

The script doesn't have configuration changes, all the configuration is inside the engine.



Credits and Thanks


  • Wecoc



Author's Notes

Difficulty: Medium / High
26
Thanks Zexion.

I tried to map a really cool ship with the new tileset and it still being too hard.
That's why I decided to make another one even better, just for you!

Here I show the result I get, it's only an example but see, only Chuck Norris could do that with the default RTP tileset!

Spoiler: ShowHide



TILESET (Ship01)
Spoiler: ShowHide



Again, credits not required.
27
whiteflute: Yes, your system uses MACL 2.3 divided in three scripts. You can udapte to 2.4 but it will not fix the incompatibilities with RMX-OS, first because I didn't change anything about that for the new version, and second and most important, because the major incompatibilities are from the House System by itself.

I dare say you have not been answered in the other topic because you are asking for something hard to solve. I don't know how the RMX-OS "global" events and switches work exactly, but that system should be rewritten to support that. It's the only way.

LiTTleDRAgo: I see, because of the :product replacement. Thank you again for all those contributions.

Quote from: LiTTleDRAgoalso for some reason keyboard input in MACL makes the game lags


Maybe Keyboard.update can be simplified... That bug is too difficult to solve right now xD
28
Done! The dropbox file was updated.
I already checked all the hidden class methods, and I didn't found any other incompatibility with RGSS3. The script is only compatible with XP because of all the other specific XP classes... So the only thing left to do is check it with XPA and get all the bugs out.
29
Resource Requests / Re: Panorama Requests
September 11, 2014, 03:28:14 pm
I have that feature, it's called "Be awesome and do it by hand" :V:

Spoiler: ShowHide



Edit:

Direct link: http://cdn.imghack.se/images/9969a0e0ed183a1e3b57429c4003fef8.png
Mirror: http://s24.postimg.org/aiigfz305/tile_panorama.png
30
Ok, thank you LiTTleDRAgo :) That product method is great.

You can't deactivate the full script with =begin // =end because it uses the string '=end' inside the methods :load_next_line and :load_data_from_txt (I have no idea why xD)

The most simple way to fix that is using for example '=' + 'end' instead of '=end'

Anyway I was looking for other possible problems, because some of the new methods are pre-defined in RGSS3.
I found those:

Array -->  :find_index, :sort_by!
String --> :clear
Font --> :shadow, :shadow=, :outline, :outline=

I'll search more and try to fix them.
31
Not sure if better:

This is a product I made long time ago, it's only implemented for 0, 1 and 2 arguments and it works like the RGSS3's product.

class Array
  #--------------------------------------------------------------------------
  # product
  #--------------------------------------------------------------------------
  # [1,2,3].product([4,5]) #=> [[1,4],[1,5],[2,4],[2,5],[3,4],[3,5]]
  #
  # [1,2].product([3,4],[5,6]) #=>[[1,3,5],[1,3,6],[1,4,5],[1,4,6],
  #                            #  [2,3,5],[2,3,6],[2,4,5],[2,4,6]]
  #--------------------------------------------------------------------------
  def product_2(array)
    a = result = []
    if array.is_a?(Numeric)
      for i in 0...self.length
        result[i] = self[i] * array
      end
      return result
    end
    return [] if array.length == 0
    if array.length == 1
      for i in 0...self.length
        result[i] = self[i] * array[0]
      end
      return result
    end
    for i in 0..self.length-1
      a = [self[i],array].flatten
      result += a.combination(array.length)
      result.pop
    end
    return result
  end

  def product(*args)
    result = []
    if args.length == 0
      self.map! {|item| item.to_a }
      return self
    end
    if args.length == 1
      return self.product_2(*args)
    end
    if args.length == 2
      resprev = self.product_2(args[0])
      for i in 0..resprev.length-1
        for j in 0..args[1].length-1
          result.push resprev[i]+args[1][j].to_a
        end
      end
      return result
    end
    raise "args.length > 2 not implemented"
  end
 
  #--------------------------------------------------------------------------
  # powerset
  #--------------------------------------------------------------------------
  # x = [1, 2, 3]
  # y = x.powerset #=> [[], [1], [2], [1,2], [3], [1,3], [2,3], [1,2,3]]
  #--------------------------------------------------------------------------
 
  def powerset
    num = 2**size
    ps = Array.new(num, [])
    self.each_index do |i|
      a = 2**i
      b = 2**(i+1) - 1
      j = 0
      while j < num-1
        for j in j+a..j+b
          ps[j] += [self[i]]
        end
        j += 1
      end
    end
    ps
  end
 
  #--------------------------------------------------------------------------
  # combination
  #--------------------------------------------------------------------------
  # x = [1, 2, 3]
  # y = x.combination(1) #=> [[1], [2], [3]]
  # y = x.combination(2) #=> [[1,2], [1,3], [2,3]]
  # y = x.combination(3) #=> [[1,2,3]]
  #--------------------------------------------------------------------------
 
  def combination(n)
    result = []
    power = self.powerset
    return if n > power.length
    return [[]] if n == 0
    for i in 0..power.length
      if power[i].to_a.length == n
        result.push power[i]
      end
    end
    return result
  end
 
  #--------------------------------------------------------------------------
  # num_prod
  #--------------------------------------------------------------------------
  # [1,2,3,4].num_prod #=> 24
  #--------------------------------------------------------------------------

  def num_prod
    n = 1
    each {|num| n *= num}
    return n
  end
end


Maybe other methods will be incompatible with RGSS3 / XPA... sort_by for example.
32
I'm not sure if there is an official 2.4 version (I was searching for it and I didn't found anything) but the old version 2.3 had some bugs so I decided to fix them. Also, I added some easy features.

Bugfixes:

- Underline and Strikethrough were not working properly
- Align feature now compatible with underline and strikethrough
- Gradient text was being drawn over a normal text (alpha problems)

Addons:

- Underline and Strikethrough 'height' feature
- Underline and Strikethrough 'double' feature
- Shadow 'x' / 'y' (default: 2, 2)
- Array method missing ; if you call a missing method to an array it will check if it can be applied in any object inside the array

And that's all, I know it's not so much. There could be more bugs to fix, if you know any please contact me.

MACL Complete 2.4.txt

MACL is full of interesting methods for hidden classes. I have thousands of them too, in a compilation I did for my own (some are written by me). Some of them could be added on MACL, but I should have to check them between the current ones, and I CAN'T do that.

I will probably choose the interesting ones and post on another project, but not sure when I will be able to do it.

If there is any problem with this post or the MACL author's rules or... ANYTHING, please sorry.

If you use this version don't credit me, but the real authors.
33
Script Requests / Re: Scaling Tileset to 64x64 Tiles
September 09, 2014, 03:03:03 am
If you want 64 x 64 tiles, the best way on RPG maker is NOT change the tilemap and use 32 x 32 tiles but using squares of 2 x 2 tiles. You will have to change the player movement, the passability rules and some things more to adapt to the "double" tile maping, but the most difficult to rewrite in a efficient way is the tilemap and you won't have to do that.

Furthermore, I don't like the idea of changing the zoom of the tilemap. It will cause a problem of resolution between the graphics of the events (1x1 pixel resolution) and maps (2x2 pixel resolution), the result will look weird.
34
RMXP Script Database / [XP] ACE WF
September 01, 2014, 10:58:22 pm
VX Ace Wecoc Features
Authors: Wecoc
Version: 1.1
Type: Add-on Collection
Key Term: Add-on Collection



Introduction

I did a pack of little scripts and I'm glad to share it to you.
It gets on RPG maker XP some functions from RPG maker VX Ace, that's why it's called VX Ace Wecoc Features (ACE WF)

The pack contains 34 individual scripts and some Scene edits. You can use any of the scripts separately except the Scene ones.
All the scripts are catalogued in the same way; with a number, a short name, its requirements, the known incompatibilities, the author and a description of usage.

Every little script includes at least an specific global inside module ACE_WF. That global is not used in the script, but in others to identify if the script is being used so please DON'T REMOVE IT.


Features


  • 001 Alias - Allows to add an alias for a character.

  • 002 Description  - Allows to add a description for an actor, class, state, enemy or map.

  • 003 Learnings - Allows to have a better control of the learnings (easily add or remove them).

  • 004 Element Rate - Changes element rate configuration.

  • 005 State Rate - Changes state rate configuration.

  • 006 Enconter Rate - Adds a new variable to actor, item, weapon, armor or state which will alter the rate of encounters.

  • 007 Victory Rates - Adds some new variables to actors, items, weapons, armors and states which affect on some battle victory features.

  • 008 Multi-drop - Changes the victory window so if there's any repeated item, it will be shown only once with a multiplicator.

  • 009 Battler States - With this script plus_state_set and minus_state_set are also modificable by actor, enemy and armors.

  • 010 Pretty Numbers - Before big numbers were written "1000000000" and now "1,000,000,000".

  • 011 Escape Rate - Adds a new variable to actor, item, weapon, armor, state or enemy which affects on the probability to escape a battle.

  • 012 Item Type - Assigns different types of items, and also special items.

  • 013 Skill Type - Assigns different types of skills.

  • 014 Weapon Type - Assigns different types of weapons.

  • 015 Armor Type - Assigns different types of each kind of armor.

  • 016 Equip Optimize - Allows to directly optimize the equipment of an actor.

  • 017 Notes - Adds the option to add notes to actor, class, enemy, state, item, skill, weapon and armor. This notes are evaluated via script.

  • 018 Windowskin Colors - Allows to obtain colors from a windowskin and set them as a font color, so every windowskin has its specific colors.

  • 019 Formulas - This script gives the option of assigning damage formulas to actors, enemies and skills.

  • 020 Message Codes - Very simple Message System with some of the Ace's message codes.

  • 021 Resistence State - An actor or an enemy can be totally resistant to a state.

  • 022 Die Effect - Allows to select the die 'collapse' effect of an actor or enemy.

  • 023 Exp curve - The default XP experience curve is generated using 2 values. With this script you can create it with 2 extra values ("acc").

  • 024 Battle Scope - Adds new 'random' scope options to items and skills.

  • 025 Effect Edits - Adds new damage options for items and skills.

  • 026 Strategy - Adds two new types of target strategy for enemies, to the strongest and to the weakest.

  • 027 Step State - A state can be removed after a certain number of footsteps.

  • 028 Showing Name - Assigns a new map name to be displayed in windows instead of the default name.

  • 029 Choice Window - Changes the way choices are shown, displaying them in a separete window.

  • 030 Scroll Text - Allows to add a message box that scrolls up.

  • 031 Draw Character - Allows applying other features when you draw a character.

  • 032 Scene Calling - The same as menu_calling and save_calling but for any scene.

  • 033 Screen Color - Allows to change the Screen Color in the same way than Screen Tone.

  • 034 Screen Brightness - Allows to change the Screen Brightness.




Screenshots

Spoiler: ShowHide










Demo

ACE WF 1.1.zip


Instructions

Inside the demo and each script.


Compatibility

I tested with some engines, here's an approximate percentage of compatibility with them:

Drago Core Engine - 100%
Blizz-Abs - 90%
Tons of AddOns - 90%
SDK 1.x - 90%
SDK 2.x - 70%



Credits and Thanks


  • Wecoc




Author's Notes

You can contribute to make it better!
35
Quoterunning_button(true/false)  - enables or disables the running button.


Do you mean like that? It's in the instructions, the script already had it.
36
Script Troubleshooting / Re: Problem for Characters
August 29, 2014, 12:40:59 am
So the problem is, if I understood, there are some z problems as you can see with alexis over the pink maid and the bird over alexis, and also zoom problems on the bird.

Are you using other scripts or a weird modification of those? Do any of this events have a special script caller or something? It's hard to help you with only that information.

I never heard about a similar incompatibility between RMX-OS and Blizz-ABS...
37
Wecoc's Dynamic File System
Authors: Wecoc
Version: 1.2
Type: Save / Load Add-on
Key Term: Title / Save / Load / GameOver Add-on



Introduction

The script rewrites all the load/save system.

I created this basis so you can make your own load / save system with dynamic functions in your own way.
My recommendation is not use it alone because the interface is not pretty, but it will work anyway.



Features


  • The player can name the Save file in the same way like actors.

  • It has no max on the number of files.

  • New folder for save files. If it does not exist it will be created automatically.

  • (Not used but done) Delete save files from the game.

  • (Not used but done) Get the last saved game directly by mtime

  • Get the actual file you are playing, with $game_temp.playing_file ("" if none)




Screenshots

These are from the default interface. As I said, it's not so cool.

Screen01
Screen02
Screen03



Script

Put this script over main
Spoiler: ShowHide

#==============================================================================
# ** [XP] Wecoc's Dynamic File System v1.2
#------------------------------------------------------------------------------
# by: Wecoc
#==============================================================================

module Save_Module

 FOLDER = "Save"

 def self.folder
   save_folder = FOLDER
   if FOLDER == "" or FOLDER == nil
     save_folder = Dir.getwd
   end
   return save_folder
 end
end

class Dir
 def Dir.get_extension_files(dirname)
   Dir.open(dirname) do |d|
     if dirname == Dir.getwd
       return d.select {|ent| File.file?("#{ent}")}
     else
       return d.select {|ent| File.file?("#{dirname}/#{ent}")}
     end
   end
 end

 def Dir.get_save_files(dirname)
   folder_files = Dir.get_extension_files(dirname)
   folder_files = folder_files.select {|d| d.include?(".rxdata")}
   folder_files.each do |d|
     d.chomp!(".rxdata")
   end
   return folder_files
 end

 def Dir.last_file_played
   array = []
   Dir.get_extension_files(Save_Module.folder).each do |last|
     file = File.open("#{Save_Module.folder}/#{last}", "r")
     array.push [last, file.mtime]
   end
   array.sort! {|a, b| b[1] <=> a[1] }
   return array[0][0]
 end
end

#==============================================================================
# ** Window_VariableNameEdit
#==============================================================================

class Game_Temp
 attr_accessor :var_max_char
 attr_accessor :playing_file
 alias var_max_char_ini initialize unless $@
 def initialize
   var_max_char_ini
   @var_max_char = 16
   @playing_file = ""
 end
end

class Window_VariableNameEdit < Window_Base
 attr_reader  :name
 attr_reader  :index

 def initialize(max_char)
   super(0, 0, 640, 128)
   self.contents = Bitmap.new(width - 32, height - 32)
   @max_char = max_char
   @name = ""
   @index = 0
   refresh
   update_cursor_rect
 end

 def refresh
   self.contents.clear
   name_array = @name.split(//)
   for i in 0...@max_char
     c = name_array[i]
     if c == nil
       c = "_"
     end
     x = 320 - @max_char * 14 + i * 28
     self.contents.draw_text(x, 32, 28, 32, c, 1)
   end
 end

 def add(character)
   if @index < @max_char and character != ""
     @name += character
     @index += 1
     refresh
     update_cursor_rect
   end
 end

 def back
   if @index > 0
     name_array = @name.split(//)
     @name = ""
     for i in 0...name_array.size-1
       @name += name_array[i]
     end
     @index -= 1
     refresh
     update_cursor_rect
   end
 end

 def update_cursor_rect
   x = 320 - @max_char * 14 + @index * 28
   self.cursor_rect.set(x, 32, 28, 32)
 end

 def restore_default
   refresh
   update_cursor_rect
 end
 
 def update
   super
   update_cursor_rect
 end
end

#==============================================================================
# ** Scene_Variable_Name
#==============================================================================

class Scene_Variable_Name
 attr_accessor :variable

 def main
   @edit_window = Window_VariableNameEdit.new($game_temp.var_max_char)
   @input_window = Window_NameInput.new
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   Graphics.freeze
   @edit_window.dispose
   @input_window.dispose
 end

 def update
   @edit_window.update
   @input_window.update
   if Input.repeat?(Input::B)
     if @edit_window.index == 0
       $game_system.se_play($data_system.cancel_se)
       $scene = Scene_Save.new(false)
       return
     end
     $game_system.se_play($data_system.cancel_se)
     @edit_window.back
     return
   end
   if Input.trigger?(Input::C)
     if @input_window.character == nil
       if @edit_window.name == ""
         @edit_window.restore_default
         if @edit_window.name == ""
           $game_system.se_play($data_system.buzzer_se)
           return
         end
         $game_system.se_play($data_system.decision_se)
         return
       end
       $save_variable = @edit_window.name
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Save.new(true) ##
       return
     end
     if @edit_window.index == $game_temp.var_max_char
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     if @input_window.character == ""
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     $game_system.se_play($data_system.decision_se)
     @edit_window.add(@input_window.character)
     return
   end
 end
end

#==============================================================================
# ** Window_Confirm
#==============================================================================

class Window_Confirm < Window_Selectable
 attr_accessor :question
 attr_accessor :yes_string
 attr_accessor :no_string

 def initialize(question, yes_string, no_string, column_max=1)
   super(0, 0, 120, 160 - (column_max * 32))
   self.contents = Bitmap.new(self.width - 32, self.height - 32)
   w1 = self.contents.text_size(question).width
   w2 = self.contents.text_size(yes_string).width
   w3 = self.contents.text_size(no_string).width
   if column_max == 1
     self.width = [w1, w2, w3].max + 36
   else
     self.width = [w1, w2 + w3].max + 36
   end
   self.contents = Bitmap.new(self.width - 32, self.height - 32)
   @column_max = column_max
   @item_max = 2
   @index = 1
   @question = question
   @yes_string = yes_string
   @no_string = no_string
   draw_strings
 end

 def refresh
   self.contents.clear
   draw_strings
 end

 def draw_strings
   self.contents.draw_text(2, 0, self.width - 32, 32, @question)
   self.contents.draw_text(2, 32, self.width - 32, 32, @yes_string)
   case @column_max
   when 1
     x = 2
     y = 64
     width = self.width - 32
   when 2
     x = (self.width - 32) / 2
     y = 32
     width = (self.width - 32) / 2
   end
   self.contents.draw_text(x, y, width, 32, @no_string)
 end

 def update_cursor_rect
   if @index < 0
     self.cursor_rect.empty
     return
   end
   row = @index / @column_max
   if row < self.top_row
     self.top_row = row
   end
   if row > self.top_row + (self.page_row_max - 1)
     self.top_row = row - (self.page_row_max - 1)
   end
   cursor_width = self.width / @column_max - 32
   x = @index % @column_max * (cursor_width + 32)
   y = @index / @column_max * 32 - self.oy
   self.cursor_rect.set(x, y + 32, cursor_width, 32)
 end
end

#==============================================================================
# ** Window_File
#==============================================================================

class Window_File < Window_Selectable
 def initialize
   super(0, 64, 640, 352)
   @column_max = 1
   refresh
   self.index = 0
 end

 def item
   return @data[self.index]
 end

 def refresh
   if self.contents != nil
     self.contents.dispose
     self.contents = nil
   end
   @data = []
   # Add item
   save_files = Dir.get_save_files(Save_Module.folder)
   for i in 0...save_files.size
     @data.push(save_files[i])
   end
   # If item count is not 0, make a bit map and draw all items
   @item_max = @data.size
   if @item_max > 0
     self.contents = Bitmap.new(width - 32, row_max * 32)
     for i in 0...@item_max
       draw_item(i)
     end
   end
 end

 def draw_item(index)
   item = @data[index]
   # x = 4 + index % 2 * (288 + 32)
   # y = index / 2 * 32
   x = 4
   y = index * 32
   rect = Rect.new(x, y, self.width / @column_max - 32, 32)
   self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
   self.contents.draw_text(x, y, 640, 32, item)
 end
end

#==============================================================================
# ** Scene_Title
#==============================================================================

class Scene_Title
 def main
   if $BTEST
     battle_test
     return
   end
   $data_actors        = load_data("Data/Actors.rxdata")
   $data_classes       = load_data("Data/Classes.rxdata")
   $data_skills        = load_data("Data/Skills.rxdata")
   $data_items         = load_data("Data/Items.rxdata")
   $data_weapons       = load_data("Data/Weapons.rxdata")
   $data_armors        = load_data("Data/Armors.rxdata")
   $data_enemies       = load_data("Data/Enemies.rxdata")
   $data_troops        = load_data("Data/Troops.rxdata")
   $data_states        = load_data("Data/States.rxdata")
   $data_animations    = load_data("Data/Animations.rxdata")
   $data_tilesets      = load_data("Data/Tilesets.rxdata")
   $data_common_events = load_data("Data/CommonEvents.rxdata")
   $data_system        = load_data("Data/System.rxdata")
   $game_system = Game_System.new
   @sprite = Sprite.new
   @sprite.bitmap = RPG::Cache.title($data_system.title_name)
   s1 = "New Game"
   s2 = "Continue"
   s3 = "Shutdown"
   @command_window = Window_Command.new(192, [s1, s2, s3])
   @command_window.back_opacity = 160
   @command_window.x = 320 - @command_window.width / 2
   @command_window.y = 288
   if Save_Module.folder != Dir.getwd
     if not Dir.entries(Dir.getwd).include?(Save_Module.folder)
       Dir.mkdir(Save_Module.folder)
     end
   end
   @continue_enabled = false
   if Dir.get_save_files(Save_Module.folder).size > 0
     @continue_enabled = true
   end
   if @continue_enabled
     @command_window.index = 1
   else
     @command_window.disable_item(1)
   end
   $game_system.bgm_play($data_system.title_bgm)
   Audio.me_stop
   Audio.bgs_stop
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   Graphics.freeze
   @command_window.dispose
   @sprite.bitmap.dispose
   @sprite.dispose
 end
end

#==============================================================================
# ** Scene_File
#==============================================================================

class Scene_File
 def make_filename(name)
   return "#{Save_Module.folder}/#{name.to_s}.rxdata"
 end

 def delete_file(filename)
   $game_system.se_play($data_system.save_se)
   File.delete(filename)
 end

 def write_save_data(file)
   characters = []
   for i in 0...$game_party.actors.size
     actor = $game_party.actors[i]
     characters.push([actor.character_name, actor.character_hue])
   end
   Marshal.dump(characters, file)
   Marshal.dump(Graphics.frame_count, file)
   $game_system.save_count += 1
   $game_system.magic_number = $data_system.magic_number
   Marshal.dump($game_system, file)
   Marshal.dump($game_switches, file)
   Marshal.dump($game_variables, file)
   Marshal.dump($game_self_switches, file)
   Marshal.dump($game_screen, file)
   Marshal.dump($game_actors, file)
   Marshal.dump($game_party, file)
   Marshal.dump($game_troop, file)
   Marshal.dump($game_map, file)
   Marshal.dump($game_player, file)
 end

 def read_save_data(file)
   characters = Marshal.load(file)
   Graphics.frame_count = Marshal.load(file)
   $game_system        = Marshal.load(file)
   $game_switches      = Marshal.load(file)
   $game_variables     = Marshal.load(file)
   $game_self_switches = Marshal.load(file)
   $game_screen        = Marshal.load(file)
   $game_actors        = Marshal.load(file)
   $game_party         = Marshal.load(file)
   $game_troop         = Marshal.load(file)
   $game_map           = Marshal.load(file)
   $game_player        = Marshal.load(file)
   if $game_system.magic_number != $data_system.magic_number
     $game_map.setup($game_map.map_id)
     $game_player.center($game_player.x, $game_player.y)
   end
   $game_party.refresh
 end
end

#==============================================================================
# ** Scene_Save
#==============================================================================

class Scene_Save < Scene_File
 def initialize(from_name=false)
   @from_name = from_name
   if @from_name == false
     $save_variable = ""
   end
 end

 def main
   a1 = "Create new file"
   a2 = "Overwrite file"
   a3 = "Cancel"
   @command_window = Window_Command.new(300, [a1, a2, a3])
   @command_window.index = 0
   @continue_enabled = false
   if Dir.get_save_files(Save_Module.folder).size > 0
     @continue_enabled = true
   end
   unless @continue_enabled
     @command_window.disable_item(1)
   end
   b1 = "This file already exists!"
   b2 = "Overwrite"
   b3 = "Cancel"
   @confirm_window = Window_Confirm.new(b1, b2, b3)
   @confirm_window.x = 20
   @confirm_window.y = 160
   @confirm_window.visible = false
   @confirm_window.active = false
   @save_window = Window_File.new
   @save_window.y = 128
   @save_window.visible = false
   @save_window.active = false
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   Graphics.freeze
   @command_window.dispose
   @confirm_window.dispose
   @save_window.dispose
 end

 def update
   @command_window.update
   @confirm_window.update
   @save_window.update
   if @from_name == true
     @from_name = false
     filename = make_filename($save_variable)
     if FileTest.exist?(filename)
       to_confirm
       return
     end
     $game_temp.playing_file = $save_variable
     create_file(filename)
     return
   end
   if @command_window.active
     update_command
     return
   end
   if @confirm_window.active
     update_confirm
     return
   end
   if @save_window.active
     update_save
     return
   end
 end

 def update_command
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     if $game_temp.save_calling
       $game_temp.save_calling = false
       $scene = Scene_Map.new
       return
     end
     $scene = Scene_Menu.new(4)
   end
   if Input.trigger?(Input::C)
     case @command_window.index
     when 0 # "Create new file"
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Variable_Name.new
     when 1 # "Overwrite file"
       if Dir.get_save_files(Save_Module.folder).size == 0
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       $game_system.se_play($data_system.decision_se)
       # save_files = Dir.get_save_files(Save_Module.folder)
       @save_window.refresh
       @command_window.active = false
       @confirm_window.active = false
       @save_window.visible = true
       @save_window.active = true
     when 2 # "Cancel"
       $game_system.se_play($data_system.cancel_se)
       if $game_temp.save_calling
         $game_temp.save_calling = false
         $scene = Scene_Map.new
         return
       end
       $scene = Scene_Menu.new(4)
     end
   end
 end

 def update_confirm
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     @command_window.index = 0
     @command_window.active = true
     @confirm_window.visible = false
     @confirm_window.active = false
     return
   end
   if Input.trigger?(Input::C)
     case @confirm_window.index
     when 0 # Yes
       filename = make_filename($save_variable)
       $game_temp.playing_file = $save_variable
       create_file(filename)
     when 1 # No
       $game_system.se_play($data_system.cancel_se)
       @command_window.index = 0
       @command_window.active = true
       @confirm_window.visible = false
       @confirm_window.active = false
     end
   end
 end

 def update_save
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     @command_window.active = true
     @save_window.visible = false
     @save_window.active = false
     return
   end
   if Input.trigger?(Input::C)
     $save_variable = @save_window.item
     to_confirm
   end
 end

 def to_confirm
   $game_system.se_play($data_system.cursor_se)
   @command_window.active = false
   @save_window.active = false
   @save_window.visible = false
   @confirm_window.visible = true
   @confirm_window.active = true
 end

 def create_file(filename)
   $game_system.se_play($data_system.save_se)
   file = File.open(filename, "wb")
   write_save_data(file)
   file.close
   if $game_temp.save_calling
     $game_temp.save_calling = false
     $scene = Scene_Map.new
     return
   end
   $scene = Scene_Menu.new(4)
 end
end

#==============================================================================
# ** Scene_Load
#==============================================================================

class Scene_Load < Scene_File
 def initialize
   $game_temp = Game_Temp.new
 end

 def main
   a1 = "Load file"
   a2 = "Cancel"
   @command_window = Window_Command.new(300, [a1, a2])
   @command_window.index = 0
   @load_window = Window_File.new
   @load_window.y = 128
   @load_window.visible = false
   @load_window.active = false
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   Graphics.freeze
   @command_window.dispose
   @load_window.dispose
 end

 def update
   @command_window.update
   @load_window.update
   if @command_window.active
     update_command
     return
   end
   if @load_window.active
     update_load
     return
   end
 end

 def update_command
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     $scene = Scene_Title.new
     return
   end
   if Input.trigger?(Input::C)
     case @command_window.index
     when 0 # "Load file"
       $game_system.se_play($data_system.decision_se)
       # save_files = Dir.get_save_files(Save_Module.folder)
       @load_window.refresh
       @command_window.active = false
       @load_window.visible = true
       @load_window.active = true
     when 1 # "Cancel"
       $game_system.se_play($data_system.cancel_se)
       $scene = Scene_Title.new
     end
   end
 end

 def update_load
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     @command_window.active = true
     @load_window.visible = false
     @load_window.active = false
     return
   end
   if Input.trigger?(Input::C)
     $game_temp.playing_file = @load_window.item
     filename = make_filename(@load_window.item)
     load_file(filename)
   end
 end

 def load_file(filename)
   $game_system.se_play($data_system.load_se)
   file = File.open(filename, "rb")
   read_save_data(file)
   file.close
   $game_system.bgm_play($game_system.playing_bgm)
   $game_system.bgs_play($game_system.playing_bgs)
   $game_map.update
   $scene = Scene_Map.new
 end
end


Eron made an addon for this script which uses the default interface instead of the new. Place it under mine if you want to use that.
Spoiler: ShowHide

#==============================================================================
# [XP] Default Interface for Wecoc's Dynamic File System
#------------------------------------------------------------------------------
# by: Eron
#==============================================================================

module Save_Module
 FW_FIT = 4 # Number of file windows that fit on screen
 FW_MIN = 4 # Minimum number of file windows. It should be the same as FW_FIT
 FW_MAX = 4 # Maximum number of save files. Set it nil to have no limits.
 EMPTY = "- Empty -" # Window's name when empty
end

class Dir
 def Dir.save_files_by(sym)
   array = []
   Dir.get_save_files(Save_Module.folder).each do |last|
     file = File.open("#{Save_Module.folder}/#{last}.rxdata", "r")
     array.push [last, file.send(sym)]
   end
   array.sort! {|a, b| b[1] <=> a[1] }
   return array
 end

 def Dir.last_file_played
   files = Dir.save_files_by(:mtime)
   return files[0][0]
 end
end

#==============================================================================
# ** Window_SaveFile
#==============================================================================

class Window_SaveFile < Window_Base

 attr_reader :file_index
 attr_reader :filename
 attr_reader :file_exist

 def initialize(file_index, filename, file_exist=true)
   super(0, 0, 640, (480 - 64) / Save_Module::FW_FIT)
   self.contents = Bitmap.new(width - 32, height - 32)
   @file_index = file_index
   @filename = filename
   @file_exist = file_exist
   @time_stamp = Time.at(0)
   @name_width = 0
   if @file_exist
     file = File.open("#{Save_Module.folder}/#{filename}.rxdata", "r")
     @time_stamp = file.mtime
     @characters         = Marshal.load(file)
     @frame_count        = Marshal.load(file)
     @game_system        = Marshal.load(file)
     @game_switches      = Marshal.load(file)
     @game_variables     = Marshal.load(file)
     @game_self_switches = Marshal.load(file)
     @game_screen        = Marshal.load(file)
     @game_actors        = Marshal.load(file)
     @game_party         = Marshal.load(file)
     @game_troop         = Marshal.load(file)
     @game_map           = Marshal.load(file)
     @game_player        = Marshal.load(file)
     @total_sec = @frame_count / Graphics.frame_rate
     file.close
   end
   refresh
   @selected = false
 end

 def refresh
   self.contents.clear
   self.contents.font.color = normal_color
   if @filename == Save_Module::EMPTY
     self.contents.font.color = disabled_color
   end
   name = @filename
   self.contents.draw_text(4, 0, 600, 32, name)
   @name_width = contents.text_size(name).width
   if @file_exist
     for i in 0...@characters.size
       # Actor's graphic
       bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
       cw = bitmap.rect.width / 4
       ch = bitmap.rect.height / 4
       src_rect = Rect.new(0, 0, cw, ch)
       x = 300 - @characters.size * 32 + i * 64 - cw / 2
       self.contents.blt(x, 68 - ch, bitmap, src_rect)
       ## Actor's name
       # draw_actor_name(@game_party.actors[i], x - 16, 8)
       ## Actor's level
       # draw_actor_level(@game_party.actors[i], x - 16, 24)
       ## Actor's states
       # draw_actor_state(@game_party.actors[i], x - 16, 48)
     end
     # Draw play time
     hour = @total_sec / 60 / 60
     min = @total_sec / 60 % 60
     sec = @total_sec % 60
     time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
     self.contents.font.color = normal_color
     self.contents.draw_text(4, 8, 600, 32, time_string, 2)
     # Draw timestamp
     self.contents.font.color = normal_color
     time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
     self.contents.draw_text(4, 40, 600, 32, time_string, 2)
     ## Gold
     # cx = contents.text_size($data_system.words.gold).width
     # self.contents.font.color = normal_color
     # self.contents.draw_text(4, 8, 120-cx-2, 32, @game_party.gold.to_s, 2)
     # self.contents.font.color = system_color
     # self.contents.draw_text(124-cx, 8, cx, 32, $data_system.words.gold, 2)
     ## Variable
     # self.contents.font.color = system_color
     # self.contents.draw_text(4, 8, 120, 32, "CapĂ­tulo")
     # self.contents.font.color = normal_color
     # self.contents.draw_text(100, 8, 48, 32, @game_variables[1].to_s)
     ## Map name
     # self.contents.font.color = normal_color
     # self.contents.draw_text(4, 40, 320, 32, @game_map.map_name)
   end
 end
end

class Game_Map
attr_reader  :map_id
 def map_name
   @mpn = load_data("Data/MapInfos.rxdata")
 return @mpn[@map_id].name
 end
end

#==============================================================================
# ** Scene_File
#==============================================================================

class Scene_File
 def refresh
   if @savefile_windows != nil
     for i in @savefile_windows
       i.dispose
     end
   end
   @savefile_windows = []
   save_files = Dir.save_files_by(:mtime)
   size = save_files.size
   for i in 0...size
     @savefile_windows.push(Window_SaveFile.new(i, save_files[i][0]))
   end
   if self.is_a?(Scene_Save)
     if Save_Module::FW_MAX == nil or size < Save_Module::FW_MAX
       @savefile_windows.push(Window_SaveFile.new(size, "New File", false))
     end
   end
   loop do
     if @savefile_windows.size < Save_Module::FW_MIN
       size = @savefile_windows.size
       empty = Save_Module::EMPTY
       @savefile_windows.push(Window_SaveFile.new(size, empty, false))
     else
       break
     end
   end
   @file_index = 0
   @first_window = 0
   @savefile_windows[@file_index].selected = true
   window_refresh
 end
 
 def window_refresh
   for window in 0...@savefile_windows.size
     @savefile_windows[window].y = 64
     @savefile_windows[window].visible = false
     window_index = (window - @first_window)
     if (0..3).include?(window_index)
       height = (480 - 64) / Save_Module::FW_FIT
       @savefile_windows[window].y = 64 + window_index * height
       @savefile_windows[window].visible = true
     end
   end
 end
end

#==============================================================================
# ** Scene_Save
#==============================================================================

class Scene_Save < Scene_File
 def main
   @help_window = Window_Help.new
   @help_window.set_text("Which file would you like to save to?")
   refresh
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   Graphics.freeze
   @help_window.dispose
   for i in @savefile_windows
     i.dispose
   end
 end

 def update
   @help_window.update
   for i in @savefile_windows
     i.update
   end

   if @from_name == true
     @from_name = false
     filename = make_filename($save_variable)
     if FileTest.exist?(filename)
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     $game_temp.playing_file = $save_variable
     create_file(filename)
     return
   end

   if Input.trigger?(Input::C)
     if @savefile_windows[@file_index].filename == Save_Module::EMPTY
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     $game_system.se_play($data_system.decision_se)
     if @savefile_windows[@file_index].file_exist == false
       $scene = Scene_Variable_Name.new
       return
     else
       filename = make_filename(@savefile_windows[@file_index].filename)
       $game_temp.playing_file = @savefile_windows[@file_index].filename
       create_file(filename)
       return
     end
   end

   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     if $game_temp.save_calling
       $game_temp.save_calling = false
       $scene = Scene_Map.new
       return
     end
     $scene = Scene_Menu.new(4)
   end

   max_files = @savefile_windows.size

   if Input.repeat?(Input::DOWN)
     if Input.trigger?(Input::DOWN) or @file_index < max_files - 1
       $game_system.se_play($data_system.cursor_se)
       @savefile_windows[@file_index].selected = false
       @file_index += 1
       if @file_index == max_files
         @file_index = 0
         @first_window = 0
       elsif @file_index - @first_window > (Save_Module::FW_FIT - 1)
         @first_window += 1
       end
       window_refresh
       @savefile_windows[@file_index].selected = true
       return
     end
   end

   if Input.repeat?(Input::UP)
     if Input.trigger?(Input::UP) or @file_index > 0
       $game_system.se_play($data_system.cursor_se)
       @savefile_windows[@file_index].selected = false
       @file_index -= 1
       if @file_index == -1
         @file_index = max_files - 1
         @first_window = @file_index - (Save_Module::FW_FIT - 1)
       elsif @first_window - @file_index > 0
         @first_window -= 1
       end
       window_refresh
       @savefile_windows[@file_index].selected = true
       return
     end
   end
 end

 def create_file(filename)
   $game_system.se_play($data_system.save_se)
   file = File.open(filename, "wb")
   write_save_data(file)
   file.close
   if $game_temp.save_calling
     $game_temp.save_calling = false
     $scene = Scene_Map.new
     return
   end
   refresh
 end
end

#==============================================================================
# ** Scene_Load
#==============================================================================

class Scene_Load < Scene_File
 def initialize
   $game_temp = Game_Temp.new
 end

 def main
   @help_window = Window_Help.new
   @help_window.set_text("Which file would you like to load?")
   refresh
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   Graphics.freeze
   @help_window.dispose
   for i in @savefile_windows
     i.dispose
   end
 end

 def update
   @help_window.update
   for i in @savefile_windows
     i.update
   end

   if Input.trigger?(Input::C)
     if @savefile_windows[@file_index].filename == Save_Module::EMPTY
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     $game_system.se_play($data_system.decision_se)
     $game_temp.playing_file = @savefile_windows[@file_index].filename
     filename = make_filename(@savefile_windows[@file_index].filename)
     load_file(filename)
   end
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     $scene = Scene_Title.new
   end

   max_files = @savefile_windows.size

   if Input.repeat?(Input::DOWN)
     if Input.trigger?(Input::DOWN) or @file_index < max_files - 1
       $game_system.se_play($data_system.cursor_se)
       @savefile_windows[@file_index].selected = false
       @file_index += 1
       if @file_index == max_files
         @file_index = 0
         @first_window = 0
       elsif @file_index - @first_window > (Save_Module::FW_FIT - 1)
         @first_window += 1
       end
       window_refresh
       @savefile_windows[@file_index].selected = true
       return
     end
   end

   if Input.repeat?(Input::UP)
     if Input.trigger?(Input::UP) or @file_index > 0
       $game_system.se_play($data_system.cursor_se)
       @savefile_windows[@file_index].selected = false
       @file_index -= 1
       if @file_index == -1
         @file_index = max_files - 1
         @first_window = @file_index - (Save_Module::FW_FIT - 1)
       elsif @first_window - @file_index > 0
         @first_window -= 1
       end
       window_refresh
       @savefile_windows[@file_index].selected = true
       return
     end
   end
 end
end




Instructions

The script uses a new folder to save all the files inside. If it does not exist it will be created automatically. If you have files already, you will have to move them to the new folder.
To change the folder name, find on the very start of the script this line and change it there:
FOLDER = "Save"

If you name it "" or nil, the files will be saved in the game's folder as always.



Compatibility

Not tested. If there is any problem you can contact me.
I had to rewrite the method :main of Scene_Title, so if you use a modification of the Title beware with this. Practically this is the only incompatibility that can give you problems if you are not careful.


Credits and Thanks


  • Wecoc - The WDSF script basis

  • Eron - Default Interface Script

38
Weapon Attacks by Skill or Item
Authors: Wecoc
Version: 1.0
Type: Attack Add-on
Key Term: Battle Add-on



Introduction

This script allows certain weapons to attack using a skill or an item. It can be usefull for example because weapons can't call common events but items and skills can.



Features


  • Use a default attack, or attack using item, skill or both

  • Use it to add special features to the attack for example to call a common event

  • Avoid attacks without weapon and defense without shield.




Screenshots

N/A


Script

Spoiler: ShowHide

#==============================================================================
# ** Weapon Attacks by Skill or Item
#------------------------------------------------------------------------------
#  Author: Wecoc
#==============================================================================

module SpecialWeapons
   # ID Weapon => [ID Skill, sp cost?]
 SKILLS =  {1 => [7, true],
            2 => [8, false],
           }
   # ID Weapon => [ID Item, item cost?]
 ITEMS =   {3 => [1, true],
           }
end
       
#==============================================================================
# ** Scene_Battle : Attack edit
#==============================================================================

class Scene_Battle
 def make_basic_action_result
   # If attack
   if @active_battler.current_action.basic == 0
     skill_hash = SpecialWeapons::SKILLS
     item_hash = SpecialWeapons::ITEMS
     # Skill attack
     if skill_hash.keys.include?(@active_battler.weapon_id)
       @skill = $data_skills[skill_hash[@active_battler.weapon_id][0]]
       sp_cost = skill_hash[@active_battler.weapon_id][1]
       if sp_cost
         @active_battler.sp -= @skill.sp_cost
         @status_window.refresh
       end
       @animation1_id = @skill.animation1_id
       @animation2_id = @skill.animation2_id
       @common_event_id = @skill.common_event_id
       set_target_battlers(@skill.scope)
       for target in @target_battlers
         target.skill_effect(@active_battler, @skill)
       end
     # Item attack
     elsif item_hash.keys.include?(@active_battler.weapon_id)
       @item = $data_items[item_hash[@active_battler.weapon_id][0]]
       item_cost = item_hash[@active_battler.weapon_id][1]
       if @item.consumable and item_cost
         $game_party.lose_item(@item.id, 1)
       end
       @animation1_id = @item.animation1_id
       @animation2_id = @item.animation2_id
       @common_event_id = @item.common_event_id
       index = @active_battler.current_action.target_index
       target = $game_party.smooth_target_actor(index)
       set_target_battlers(@item.scope)
       for target in @target_battlers
         target.item_effect(@item)
       end
     # Default attack
     else
       @animation1_id = @active_battler.animation1_id
       @animation2_id = @active_battler.animation2_id
       if @active_battler.is_a?(Game_Enemy)
         if @active_battler.restriction == 3
           target = $game_troop.random_target_enemy
         elsif @active_battler.restriction == 2
           target = $game_party.random_target_actor
         else
           index = @active_battler.current_action.target_index
           target = $game_party.smooth_target_actor(index)
         end
       end
       if @active_battler.is_a?(Game_Actor)
         if @active_battler.restriction == 3
           target = $game_party.random_target_actor
         elsif @active_battler.restriction == 2
           target = $game_troop.random_target_enemy
         else
           index = @active_battler.current_action.target_index
           target = $game_troop.smooth_target_enemy(index)
         end
       end
       @target_battlers = [target]
       for target in @target_battlers
         target.attack_effect(@active_battler)
       end
       return
     end
   end
   # If guard
   if @active_battler.current_action.basic == 1
     @help_window.set_text($data_system.words.guard, 1)
     return
   end
   # If escape
   if @active_battler.is_a?(Game_Enemy) and
     @active_battler.current_action.basic == 2
     @help_window.set_text("Escape", 1)
     @active_battler.escape
     return
   end
   # If doing nothing
   if @active_battler.current_action.basic == 3
     $game_temp.forcing_battler = nil
     @phase4_step = 1
     return
   end
 end
end

#==============================================================================
# ** Scene_Battle : Disable Attack & Guard
#==============================================================================

class Scene_Battle

 WEAPON_ATTACK = false # If true, the actor won't attack without weapon
 SHIELD_GUARD = false  # If true, the actor won't defend without shield

 alias phase3_setup_disabled phase3_setup_command_window unless $@
 def phase3_setup_command_window
   phase3_setup_disabled
   @disabled_attack = false
   @actor_command_window.enable_item(0)
   @disabled_guard = false
   @actor_command_window.enable_item(2)
   actor = $game_party.actors[@actor_index]
   skill_hash = SpecialWeapons::SKILLS
   item_hash = SpecialWeapons::ITEMS
   if WEAPON_ATTACK
     if actor.weapon_id == 0
       @disabled_attack = true
       @actor_command_window.disable_item(0)
     end
   end
   if SHIELD_GUARD
     if actor.armor1_id == 0
       @disabled_guard = true
       @actor_command_window.disable_item(2)
     end
   end
   if skill_hash.keys.include?(actor.weapon_id)
     if skill_hash[actor.weapon_id][1] == true # sp cost
       skill = $data_skills[skill_hash[actor.weapon_id][0]]
       if skill.sp_cost > actor.sp
         @disabled_attack = true
         @actor_command_window.disable_item(0)
       end
     end
   end
   if item_hash.keys.include?(actor.weapon_id)
     if skill_hash[actor.weapon_id][1] == true # item cost
       item_id = skill_hash[actor.weapon_id][0]
       if $game_party.item_number(item_id) == 0
         @disabled_attack = true
         @actor_command_window.disable_item(0)
       end
     end
   end
 end

 def update_phase3_basic_command
   # If B button was pressed
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     phase3_prior_actor
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     case @actor_command_window.index
     when 0  # attack
       if @disabled_attack
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       $game_system.se_play($data_system.decision_se)
       @active_battler.current_action.kind = 0
       @active_battler.current_action.basic = 0
       start_enemy_select
     when 1  # skill
       $game_system.se_play($data_system.decision_se)
       @active_battler.current_action.kind = 1
       start_skill_select
     when 2  # guard
       if @disabled_guard
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       $game_system.se_play($data_system.decision_se)
       @active_battler.current_action.kind = 0
       @active_battler.current_action.basic = 1
       phase3_next_actor
     when 3  # item
       $game_system.se_play($data_system.decision_se)
       @active_battler.current_action.kind = 2
       start_item_select
     end
     return
   end
 end
end

class Window_Command < Window_Selectable
 def enable_item(index)
   draw_item(index, normal_color)
 end
end



Instructions

In the start of the script there are two hashes.
The first one (SKILLS) works in that way:

1 => [7, true]


That means the weapon with ID 1 uses the skill with ID 7 (it doesn't matter if the character doesn't have that skill). The true / false indicates whether SP is spent or not. If true, the skill will spend SP so if the character has not enough he/she will not be able to attack.

Example: Fire Weapon. When you attack, it will do a fire effect. It does not depend on actor's skills, it does the fire effect only because of the weapon type.

The second hash (ITEMS) is so similar:

1 => [7, true]


That means the weapon with ID 1 uses the item with ID 7. The true / false indicates if  the item is spent or not. If false, the party can have none.

Example: Bow and arrows. If you have no arrows you can't use the bow.



Compatibility

It was done for the default battle. Still, it shouldn't be difficult to adapt to other systems.


Credits and Thanks


  • Wecoc




Author's Notes

I have to learn English properly, I find it harder to publish the scripts than to make them.
Also, some of you are so great that most of my scripts give pain in comparison xDD
You can improve the script if you want.
39
Resource Requests / Re: Tree edit
August 24, 2014, 12:25:47 pm
I think this should be enough to map corners and whatever.

http://cdn.imghack.se/medium/6e296b23e69575b8132e8b20160a13cc.png

Some of the tiles are repeated but I think it's the most intuitive way.
40
I did this cute Wood Tileset (Forest Tileset edit)
Hope you like!

Spoiler: ShowHide