Custom Resolution Script

Custom Resolution Script
v0.82


Another script of mine... some screens of other people's games, ideas, and of course, the work on my Lufia graphic set got me to this...


Introduction

Most of us know that RMXP's default resolution is 640x480, and we all know that this doesn't fit every game... Some games need lesser resolution, some games need more than the little default space. Regardless what's the case, Selwyn's script does it, right? Well, not quite... with Selwyn's nice script, you can change your game's aspects, but not the tile size. It's also a pain in the ass to adjust the character's movement settings, and of course, getting all this set up well together is impossible for non-experienced scripters.
My intention with this script was to provide you guys with a plug-and-play tool to change the game's resolution, and the outcome is a very powerful script in my honest opinion... along with the screen resolution and the tileset size, it changes the character's movement speed, the step distance to keep the movement aspects, and a few more things.


Features
  • In theory any resolution you want (only hardware-limited)
  • Easy Setup - You name the resolution, the script does anything else for you
  • Changes the tile size relative to the resolution
  • Changes the character movement speed and step distance relative to the resolution
  • The Player's x and y coordinates are adjusted to the resolution

Screenshots

http://img80.imageshack.us/img80/5390/resolution1wg0.th.png[/img] http://img106.imageshack.us/img106/9762/reslufiaho9.th.png[/img]


Demo

Custom Resolution Script Demo v0.82
Hosted on Box.net, 0.46MB


Script and Resources

Tilemap Class Rewrite & Window Resolution Script Spoiler
[spoiler=SephirothSpawn's Tilemap Class Rewrite]Since SephirothSpawns Tilemap class rewrite is hard to find (I wasn't able to locate it in these forums) and it's SDK-based, I'll provide you with a non-SDK version. Compatibility to the SDK equivalent is untested, but aside from removing the SDK tags and adjusting the script's look to my common style, I didn't do anything to that script, so it should work... in theory.
Note that you can grab the original script from SephirothSpawn's Script Editor, 'System & Required Scripts' category.

#==============================================================================
# Tilemap Class
#------------------------------------------------------------------------------
# Script by SephirothSpawn
#==============================================================================

class Game_Map
  #--------------------------------------------------------------------------
  attr_reader   :map
  attr_accessor :tilemap_tone
  attr_accessor :tilemap_plane
  attr_accessor :tilemap_zoom_x
  attr_accessor :tilemap_zoom_y
  attr_accessor :tilemap_tile_width
  attr_accessor :tilemap_tile_height
  #--------------------------------------------------------------------------
  alias seph_tilemap_gmap_init initialize
  def initialize
    seph_tilemap_gmap_init
    @tilemap_tone        = nil
    @tilemap_plane       = false
    @tilemap_zoom_x      = 1.0
    @tilemap_zoom_y      = 1.0
    @tilemap_tile_width  = 32
    @tilemap_tile_height = 32
  end
  #--------------------------------------------------------------------------
end


class Tilemap
  #--------------------------------------------------------------------------
  Animated_Autotiles_Frames = 15
  #--------------------------------------------------------------------------
  Autotiles = [
    [ [27, 28, 33, 34], [ 5, 28, 33, 34], [27,  6, 33, 34], [ 5,  6, 33, 34],
      [27, 28, 33, 12], [ 5, 28, 33, 12], [27,  6, 33, 12], [ 5,  6, 33, 12] ],
    [ [27, 28, 11, 34], [ 5, 28, 11, 34], [27,  6, 11, 34], [ 5,  6, 11, 34],
      [27, 28, 11, 12], [ 5, 28, 11, 12], [27,  6, 11, 12], [ 5,  6, 11, 12] ],
    [ [25, 26, 31, 32], [25,  6, 31, 32], [25, 26, 31, 12], [25,  6, 31, 12],
      [15, 16, 21, 22], [15, 16, 21, 12], [15, 16, 11, 22], [15, 16, 11, 12] ],
    [ [29, 30, 35, 36], [29, 30, 11, 36], [ 5, 30, 35, 36], [ 5, 30, 11, 36],
      [39, 40, 45, 46], [ 5, 40, 45, 46], [39,  6, 45, 46], [ 5,  6, 45, 46] ],
    [ [25, 30, 31, 36], [15, 16, 45, 46], [13, 14, 19, 20], [13, 14, 19, 12],
      [17, 18, 23, 24], [17, 18, 11, 24], [41, 42, 47, 48], [ 5, 42, 47, 48] ],
    [ [37, 38, 43, 44], [37,  6, 43, 44], [13, 18, 19, 24], [13, 14, 43, 44],
      [37, 42, 43, 48], [17, 18, 47, 48], [13, 18, 43, 48], [ 1,  2,  7,  8] ]
  ]
  #--------------------------------------------------------------------------
  attr_reader   :layers
  attr_accessor :tileset
  attr_accessor :autotiles
  attr_accessor :map_data
  attr_accessor :flash_data
  attr_accessor :priorities
  attr_accessor :visible
  attr_accessor :ox
  attr_accessor :oy
  #--------------------------------------------------------------------------
  def initialize(viewport, map = $game_map.map)
    @layers = []
    for l in 0...3
      layer = ($game_map.tilemap_plane ?
      Plane.new(viewport) : Sprite.new(viewport))
      layer.bitmap = Bitmap.new(map.width * 32, map.height * 32)
      layer.z = l * 150
      layer.zoom_x = $game_map.tilemap_zoom_x
      layer.zoom_y = $game_map.tilemap_zoom_y
      if (tone = $game_map.tilemap_tone).is_a?(Tone)
        layer.tone = tone
      end
      @layers << layer
    end
    @tileset    = nil  # Refers to Map Tileset Name
    @autotiles  = []   # Refers to Tileset Auto-Tiles (Actual Auto-Tiles)
    @map_data   = nil  # Refers to 3D Array Of Tile Settings
    @flash_data = nil  # Refers to 3D Array of Tile Flashdata
    @priorities = nil  # Refers to Tileset Priorities
    @visible    = true # Refers to Tilest Visibleness
    @ox         = 0    # Bitmap Offsets
    @oy         = 0    # bitmap Offsets
    @data       = nil  # Acts As Refresh Flag
    @map         = map
    @tone        = $game_map.tilemap_tone
    @plane       = $game_map.tilemap_plane
    @zoom_x      = $game_map.tilemap_zoom_x
    @zoom_y      = $game_map.tilemap_zoom_y
    @tile_width  = $game_map.tilemap_tile_width
    @tile_height = $game_map.tilemap_tile_height
  end
  #--------------------------------------------------------------------------
  def dispose
    for layer in @layers
      layer.dispose
    end
  end
  #--------------------------------------------------------------------------
  def update
    unless @data == @map_data && @tile_width == $game_map.tilemap_tile_width &&
           @tile_height == $game_map.tilemap_tile_height
      refresh
    end
    unless @tone == $game_map.tilemap_tone
      @tone = $game_map.tilemap_tone
      @tone = Tone.new(0, 0, 0, 0) if @tone.nil?
      for layer in @layers
        layer.tone = @tone
        layer.tone = @tone
      end
    end
    unless @zoom_x == $game_map.tilemap_zoom_x
      @zoom_x = $game_map.tilemap_zoom_x
      for layer in @layers
        layer.zoom_x = @zoom_x
        layer.zoom_x = @zoom_x
      end
    end
    unless @zoom_y == $game_map.tilemap_zoom_y
      @zoom_y = $game_map.tilemap_zoom_y
      for layer in @layers
        layer.zoom_y = @zoom_y
        layer.zoom_y = @zoom_y
      end
    end
    for layer in @layers
      layer.ox = @ox
      layer.oy = @oy
    end
    if Graphics.frame_count % Animated_Autotiles_Frames == 0
      refresh_autotiles
    end
  end
  #--------------------------------------------------------------------------
  def refresh
    @data = @map_data
    for p in 0..5
      for z in 0...@map_data.zsize
        for x in 0...@map_data.xsize
          for y in 0...@map_data.ysize
            id = @map_data[x, y, z]
            next if id == 0
            next unless p == @priorities[id]
            p = 2 if p > 2
            id < 384 ? draw_autotile(x, y, p, id) : draw_tile(x, y, p, id)
          end
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  def refresh_autotiles
    autotile_locations = Table.new(@map_data.xsize, @map_data.ysize,
      @map_data.zsize)
    for p in 0..5
      for z in 0...@map_data.zsize
        for x in 0...@map_data.xsize
          for y in 0...@map_data.ysize
            id = @map_data[x, y, z]
            next if id == 0
            next unless p == @priorities[id]
            p = 2 if p > 2
            if id < 384
              next unless @autotiles[id / 48 - 1].width / 96 > 1
              draw_autotile(x, y, p, id)
              autotile_locations[x, y, z] = 1
            else
              if autotile_locations[x, y, z] == 1
                draw_tile(x, y, p, id)
              end
            end
          end
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  def draw_tile(x, y, z, id)
    rect = Rect.new((id - 384) % 8 * 32, (id - 384) / 8 * 32, 32, 32)
    x *= @tile_width
    y *= @tile_height
    if @tile_width == 32 && @tile_height == 32
      @layers[z].bitmap.blt(x, y, @tileset, rect)
    else
      dest_rect = Rect.new(x, y, @tile_width, @tile_height)
      @layers[z].bitmap.stretch_blt(dest_rect, @tileset, rect)
    end
  end
  #--------------------------------------------------------------------------
  def draw_autotile(x, y, z, tile_id)
    autotile = @autotiles[tile_id / 48 - 1]
    tile_id %= 48
    bitmap = Bitmap.new(32, 32)
    tiles = Autotiles[tile_id / 8][tile_id % 8]
    frames = autotile.width / 96
    anim = (Graphics.frame_count / Animated_Autotiles_Frames) % frames * 96
    for i in 0...4
      tile_position = tiles[i] - 1
      src_rect = Rect.new(tile_position % 6 * 16 + anim,
        tile_position / 6 * 16, 16, 16)
      bitmap.blt(i % 2 * 16, i / 2 * 16, autotile, src_rect)
    end
    x *= @tile_width
    y *= @tile_height
    if @tile_width == 32 && @tile_height == 32
      @layers[z].bitmap.blt(x, y, bitmap, Rect.new(0, 0, 32, 32))
    else
      dest_rect = Rect.new(x, y, @tile_width, @tile_height)
      @layers[z].bitmap.stretch_blt(dest_rect, bitmap, Rect.new(0, 0, 32, 32))
    end
  end
  #--------------------------------------------------------------------------
  def bitmap
    bitmap = Bitmap.new(@layers[0].bitmap.width, @layers[0].bitmap.height)
    for layer in @layers
      bitmap.blt(0, 0, layer.bitmap, Rect.new(0, 0,
        bitmap.width, bitmap.height))
    end
    return bitmap
  end
  #--------------------------------------------------------------------------
end
Expand to see the code.
Selwyn's Window Resolution Script Spoiler
Click this link for Selwyn's script and the required DLL file.
[/spoiler]
Custom Resolution Script Spoiler
#==============================================================================
# Custom Resolution Script v0.82
#------------------------------------------------------------------------------
# Script by BlueScope
#==============================================================================

module Setup
  #--------------------------------------------------------------------------
  RESOLUTION = [(320).to_f, (240).to_f]
  #--------------------------------------------------------------------------
  def self.x_value
    return RESOLUTION[0] / 640
  end
  #--------------------------------------------------------------------------
  def self.y_value
    return RESOLUTION[1] / 480
  end
  #--------------------------------------------------------------------------
  def self.c_value
    return ((RESOLUTION[0] / 640) + (RESOLUTION[1] / 480)) / 2
  end
  #--------------------------------------------------------------------------
  def self.h_value
    return RESOLUTION[0]
  end
  #--------------------------------------------------------------------------
  def self.v_value
    return RESOLUTION[1]
  end
  #--------------------------------------------------------------------------
  def self.variance
    return (((RESOLUTION[0] / 640) + (RESOLUTION[1] / 480)) / 2) - 1
  end
  #--------------------------------------------------------------------------
end


module Resolution
  #--------------------------------------------------------------------------
  # The following method refers to the resolution changing script and has to
  # be placed below Selwyn's resolution script in order to work properly
  #--------------------------------------------------------------------------
  def self.fullscreen
    @default_size = size
    @set_window_long.call(@window, -16, 0x14000000)
    @set_window_pos.call(@window, -1, 0, 0, Setup.h_value, Setup.v_value, 64)
    @set_resolution.call(Setup.h_value, Setup.v_value, 4)
    @state = "fullscreen"
  end
  #--------------------------------------------------------------------------
end


class Sprite_Character < RPG::Sprite
  #--------------------------------------------------------------------------
  attr_accessor :character
  #--------------------------------------------------------------------------
  alias resolution_update update
  def update
    super
    if @tile_id != @character.tile_id or
      @character_name != @character.character_name or
      @character_hue != @character.character_hue
      @tile_id = @character.tile_id
      @character_name = @character.character_name
      @character_hue = @character.character_hue
      if @tile_id >= 384
        self.bitmap = RPG::Cache.tile($game_map.tileset_name, @tile_id, @character.character_hue)
        self.src_rect.set(0, 0, 32, 32)
        self.ox = 16
        self.oy = 32
      else
        self.bitmap = RPG::Cache.character(@character.character_name, @character.character_hue)
        @cw = bitmap.width / 4
        @ch = bitmap.height / 4
        self.ox = @cw / 2
        self.oy = @ch - (32 * Setup.variance)
      end
    end
    resolution_update
  end
  #--------------------------------------------------------------------------
end


class Spriteset_Map
  #--------------------------------------------------------------------------
  alias resolution_initialize initialize
  def initialize
    @viewport1 = Viewport.new(0, 0, Setup.h_value, Setup.v_value)
    @viewport2 = Viewport.new(0, 0, Setup.h_value, Setup.v_value)
    @viewport3 = Viewport.new(0, 0, Setup.h_value, Setup.v_value)
    resolution_initialize
  end
  #--------------------------------------------------------------------------
end


class Game_Map
  #--------------------------------------------------------------------------
  # The following method refers to the Tilemap class and has to be placed
  # below SephirothSpawn's Tilemap class rewrite in order to work properly
  #--------------------------------------------------------------------------
  alias resolution_initialize initialize
  def initialize
    resolution_initialize
    @tilemap_tile_width = (32 * Setup.x_value)
    @tilemap_tile_height = (32 * Setup.y_value)
  end
  #--------------------------------------------------------------------------
  def scroll_down(distance)
    @display_y = [@display_y + distance, (self.height - 15) * (128 * Setup.y_value)].min
  end
  #--------------------------------------------------------------------------
  def scroll_right(distance)
    @display_x = [@display_x + distance, (self.width - 20) * (128 * Setup.x_value)].min
  end
  #--------------------------------------------------------------------------
  def start_scroll(direction, distance, speed)
    @scroll_direction = direction
    @scroll_rest = distance * (128 * Setup.c_value)
    @scroll_speed = speed
  end
  #--------------------------------------------------------------------------
end


class Game_Character
  #--------------------------------------------------------------------------
  alias resolution_initialize initialize
  def initialize
    resolution_initialize
    @move_speed = 4 + (Setup.variance * 2)
  end
  #--------------------------------------------------------------------------
  def moving?
    return (@real_x != @x * (128 * Setup.x_value) or @real_y != @y * (128 * Setup.y_value))
  end
  #--------------------------------------------------------------------------
  def moveto(x, y)
    @x = x % $game_map.width
    @y = y % $game_map.height
    @real_x = @x * (128 * Setup.x_value)
    @real_y = @y * (128 * Setup.y_value)
    @prelock_direction = 0
  end
  #--------------------------------------------------------------------------
  def screen_x
    return (@real_x - $game_map.display_x + 3) / 4 + (16 * Setup.x_value)
  end
  #--------------------------------------------------------------------------
  alias resolution_screen_y screen_y
  def screen_y
    y = (@real_y - $game_map.display_y + 3) / 4 + (32 * Setup.y_value)
    resolution_screen_y
  end
  #--------------------------------------------------------------------------
  def screen_z(height = 0)
    if @always_on_top
      return 999
    end
    z = (@real_y - $game_map.display_y + 3) / 4 + (32 * Setup.c_value)
    if @tile_id > 0
      return z + $game_map.priorities[@tile_id] * (32 * Setup.c_value)
    else
      return z + ((height > 32) ? 31 : 0)
    end
  end
  #--------------------------------------------------------------------------
  alias resolution_update update
  def update
    resolution_update
    if @anime_count > 18 - @move_speed * (2 - (Setup.variance * 2))
      if not @step_anime and @stop_count > 0
        @pattern = @original_pattern
      else
        @pattern = (@pattern + 1) % 4
      end
      @anime_count = 0
    end
  end
  #--------------------------------------------------------------------------
  def update_jump
    @jump_count -= 1
    @real_x = (@real_x * @jump_count + @x * (128 * Setup.x_value)) / (@jump_count + 1)
    @real_y = (@real_y * @jump_count + @y * (128 * Setup.y_value)) / (@jump_count + 1)
  end
  #--------------------------------------------------------------------------
  def update_move
    distance = 2 ** @move_speed
    if @y * (128 * Setup.y_value) > @real_y
      @real_y = [@real_y + distance, @y * (128 * Setup.y_value)].min
    end
    if @x * (128 * Setup.x_value) < @real_x
      @real_x = [@real_x - distance, @x * (128 * Setup.x_value)].max
    end
    if @x * (128 * Setup.x_value) > @real_x
      @real_x = [@real_x + distance, @x * (128 * Setup.x_value)].min
    end
    if @y * (128 * Setup.y_value) < @real_y
      @real_y = [@real_y - distance, @y * (128 * Setup.y_value)].max
    end
    if @walk_anime
      @anime_count += 1.5
    elsif @step_anime
      @anime_count += 1
    end
  end
  #--------------------------------------------------------------------------
end


class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  CENTER_X = ((320 * Setup.x_value) - 8) * 4
  CENTER_Y = ((240 * Setup.y_value) - 8) * 4
  #--------------------------------------------------------------------------
  def center(x, y)
    max_x = ($game_map.width - 20) * (128 * Setup.x_value)
    max_y = ($game_map.height - 15) * (128 * Setup.y_value)
    $game_map.display_x = [0, [x * (128 * Setup.x_value) - CENTER_X, max_x].min].max
    $game_map.display_y = [0, [y * (128 * Setup.y_value) - CENTER_Y, max_y].min].max
  end
  #--------------------------------------------------------------------------
end


class Window_Message < Window_Selectable
  #--------------------------------------------------------------------------
  alias resolution_initialize initialize
  def initialize
    resolution_initialize
    self.x = 80 *- Setup.variance
    self.width = 480 *- Setup.variance
    self.height = 160 *- Setup.variance
    self.contents.font.name = 'Verdana'
    self.contents.font.size = Font.default_size * -Setup.variance
  end
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    x = y = 0
    @cursor_width = 0
    if $game_temp.choice_start == 0
      x = 8
    end
    if $game_temp.message_text != nil
      text = $game_temp.message_text
      begin
        last_text = text.clone
        text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
      end until text == last_text
      text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
        $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
      end
      text.gsub!(/\\\\/) { "\000" }
      text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
      text.gsub!(/\\[Gg]/) { "\002" }
      while ((c = text.slice!(/./m)) != nil)
        if c == "\000"
          c = "\\"
        end
        if c == "\001"
          text.sub!(/\[([0-9]+)\]/, "")
          color = $1.to_i
          if color >= 0 and color <= 7
            self.contents.font.color = text_color(color)
          end
          next
        end
        if c == "\002"
          if @gold_window == nil
            @gold_window = Window_Gold.new
            @gold_window.x = (Setup.h_value * 0.875) - @gold_window.width
            if $game_temp.in_battle
              @gold_window.y = (Setup.h_value / 10) * 3
            else
              @gold_window.y = self.y >= (128 * Setup.variance) ?
                (32 * Setup.variance) : (384 * Setup.variance)
            end
            @gold_window.opacity = self.opacity
            @gold_window.back_opacity = self.back_opacity
          end
          next
        end
        if c == "\n"
          if y >= $game_temp.choice_start
            @cursor_width = [@cursor_width, x].max
          end
          y += 1
          x = 0
          if y >= $game_temp.choice_start
            x = 8
          end
          next
        end
        draw_y = (26 *- Setup.variance) * y - (24 *- Setup.variance)
        self.contents.draw_text(4 *- Setup.variance + x, draw_y, 40, 32, c)
        x += self.contents.text_size(c).width
      end
    end
    if $game_temp.choice_max > 0
      @item_max = $game_temp.choice_max
      self.active = true
      self.index = 0
    end
    if $game_temp.num_input_variable_id > 0
      digits_max = $game_temp.num_input_digits_max
      number = $game_variables[$game_temp.num_input_variable_id]
      @input_number_window = Window_InputNumber.new(digits_max)
      @input_number_window.number = number
      @input_number_window.x = self.x + 8
      @input_number_window.y = self.y + $game_temp.num_input_start * 32
    end
  end
  #--------------------------------------------------------------------------
  def reset_window
    if $game_temp.in_battle
      self.y = (16 * Setup.variance)
    else
      case $game_system.message_position
      when 0
        self.y = (16 *- Setup.variance)
      when 1
        self.y = (160 *- Setup.variance)
      when 2
        self.y = (304 *- Setup.variance)
      end
    end
    if $game_system.message_frame == 0
      self.opacity = 255
    else
      self.opacity = 0
    end
    self.back_opacity = 160
  end
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index >= 0
      n = $game_temp.choice_start + @index
      self.cursor_rect.set(8, n * (24 *- Setup.variance), @cursor_width,
        (24 *- Setup.variance))
    else
      self.cursor_rect.empty
    end
  end
  #--------------------------------------------------------------------------
end


begin
  Resolution.initialize
  Resolution.fullscreen
  $scene = nil
end
Expand to see the code.
Plug-Ins Spoiler
[spoiler=Scene_Title Custom Resolution Support]
#==============================================================================
# Custom Resolution Plugin :: Scene_Title
#------------------------------------------------------------------------------
# Script by BlueScope
#==============================================================================

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)
    @sprite.zoom_x = Setup.x_value
    @sprite.zoom_y = Setup.y_value
    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 * Setup.x_value) - @command_window.width / 2
    @command_window.y = (240 * Setup.y_value) - @command_window.height / 2
    @continue_enabled = false
    for i in 0..3
      if FileTest.exist?("Save#{i+1}.rxdata")
        @continue_enabled = true
      end
    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
      Resolution.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    @sprite.bitmap.dispose
    @sprite.dispose
  end
  #--------------------------------------------------------------------------
end
Expand to see the code.
[/spoiler]

Instructions

First, you need to get both required, external scripts ready, which are SephirothSpawn's Tilemap Class Rewrite and Selwyn's Resolution Script.
While you can simply copy Seph's script in a new script above Main and below Game_Map, you need some more steps to integrate Selwyn's script. Refer to the instructions in his thread for that.
If you have both scripts integrated, insert another script above Main, below the two required one and Game_Player, and copy the Custom Resolution Script into it. Well, designed to be plug-and-play, that's basically it, though you of course have to choose your desired resolution. Refer to the top of the Custiom Resolution Script for the Setup module, where you can find the following line:
RESOLUTION = [([b]320[/b]).to_f, ([b]240[/b]).to_f]
Expand to see the code.

Note the two bolded numbers that equal RMXP's half default screen width (320) and height (240). You may change these two numbers to whatever resolution you desire, but make sure you don't try creepy stuff. I'm not responsible for anything bad resulting from resolutions other than 320x240, 640x480, 800x600, 1024x768, or anything bad resulting from the named resolutions because of your computer settings. Other resolutions should be fine, too, but I didn't test them, so I won't guarantee for them.


Glitchfinder's AddOn

If you experience problems with my basic version or the two priority layers aren't enough, you might check out Glitch's post, which includes an edited version of my script, plus a modified version of Selwyn's RPG::Cache module.

The easiest way is to remove what you put in from my post and insert everything from his into your project. Remember that you don't need the Display.dll anymore, which you should remove from your project then.

Also, please be aware that though i believe in Glitch and his statements, I haven't tested the script by myself. If you're in need of support, please also contact Glitchfinder, not me.


Frequently Asked Questions

Q: How do I use smaller or bigger tiles?
A: You use normal 32x32 tiles on normal 256x[32] tilesets, the script resizes these tiles for you. Custom tile size is planned for future versions.

Q: Is this script intended for a specific resolution?
A: Yes, 320x240 is the resolution this script works best with and was originally intended to be used with.

Q: What're the half trees doing there?
A: This bug occurs for tile priority settings above 2, so all tiles with priority 3, 4, or 5 won't be drawn. It's an error caused by Seph's Tilemap rewrite. Note that his script is only v0.9, and therefore not complete. I think it'll be fixed in the final version.

Q: Where can I get the display.dll? The link in Selwyn's thread is broken...
A: arevulopapo re-hosted the file, you can find this link further down in his thread.

Q: Why don't the charactersets get resized?
A: As you can use any characterset sizes you want to without any relation to the screen resolution or the tiles, such a feature is quite redundant.

Q: Who should I give credit for this?
A: Without SephirothSpawn's and Selwyn's scripts, this script wouldn't exist, so you need to give all three of us credit if you use this script. If you use any plugins, make sure you credit the authors of those, too.

Q: What are those Plugins?
A: It's simply a name I made up for the spoiler, it's unrelated to what a real 'plugin' would be for a game. Instead, it's just a script you place below the Custom Resolution Script to modify some defaults. For example, the Scene_Title plugin I provided centers the command window, regardless of the resolution you use.

Q: What do I have to do if I want to make my own plugin?
A: Just make sure you don't modify any of the three default scripts (Tilemap Rewrite, Window Resolution Script, or Custom Resolution Script) and only use the methods defined in the Setup module in your plugin. You should also alias as much as possible, as the plugin's purposes are to increase compatibility, at least.


ToDo-List

Until v1.0
  • Support for custom tile and tileset size (i.e. using smaller or larger tilesets instead of having the program resize the tiles)
Further Versions
  • Adjustable step distance (can be used for pixel movement, for example)

Compatibility
  • The Tilemap Class Rewrite modifies a method of Game_Map (aliased)
  • The Custom Resolution Script modifies several methods of Sprite_Character (aliased), Spriteset_Map (aliased), Game_Map, Game_Character, and Game_Player.
  • The Scene_Title Support Script modifies a method of Scene_Title.


Conclusion

So, this script is out in the open... now what to do with it? How about grabbing some sprites (like my newly submitted Lufia 2 graphics, which'll work great with a 320x240 resolution) and make a game with this script? Why not open up your desired script editor and write custom systems for this? And of course, why not help me with my To-Do list XD It's up to you, as long as you put it in good use! I hope you can work with this.


Credits

BlueScope ^_^
SephirothSpawn for the Tilemap Class Rewrite
Selwyn for the Window Resolution Script or the RPG::Cache module
Glitchfinder, if you're using his AddOn
Think you could host the Display.dll file the link at his post is no longer there.
Edit Found it, was on the 2nd page, good script To bad does not work with my game.
I guess the Update Trandition Rectangle is not enlarged on a bigger resolution, right?
Well, the viewport's parts above the default 640x480 are shown in black no matter what, I don't have an idea why (the viewports are shown correctly). You can draw windows on the empty space without a problem, nevertheless, though, of course, this isn't what I'm going for...
If you have an idea on how I can fix that, please tell me... I haven't checked if the same occurs for Selwyn's script, though, which'd mean that this bug is caused by his resolution fix.
Erm, Because the Graphics class' Viewport is in c coded? So you can't just fix it. Each time I see a new resolution script, I hope people have done it...
I see... I thought you couldn't do it the 'normal way'... mainly because I tried everything I could XD Thanks anyway, too bad there is no easy solution...

EDIT: Updated the script to v0.81... the only change is another aliased method, but no functionality added yet...
So this script brings back the F5 function from RM2k/2k3? Press F5 to switch between double size/normal size.

I suppose it doesn't actually do the button toggling it, but the rest is the same?

...I would use this but then I'd need to reposition EVERY non-Scene_Map item. D: And back with older versions when I was going for 480x320 it was quite tedious. And a right pain. And did I mention tedious?
Battle elements were easy, it was the menu that was hard (and now that I'm using MOG Menus? x_x)

Yeah... too bad thier isn't a script that could half all graphic sizes and x and y positions (or similar e.g cx, cy) unless labled otherwise.
Even if you would half all graphic's size, windows and other by-script drawn objects still wouldn't be halfed. I know it's a tedious process to script any scenes you need, but I'm not a fan of the default menus anyway... XD Well, maybe, since this script is out now, someone will do some menues for this... we have some very talented CMS guys in here, right?
Nice, but my resolution isn't changing well the game window anyway, any suggestions?

A screen
http://img177.imageshack.us/img177/1339/111to9.png[/IMG]
Looks like you disabled the auto-fullscreen... I'm unsure about what this script does if it's set to windowed mode, but I guess this is what happens... well, maybe you forgot the display.dll and included some kind of rescue method in Main... or there's another script interfering with it. It might also be hardware-caused, so best try it in a new project with no other scripts applied and see what happens there. Of course, make sure you follow the instructions correctly, especially Selwyn's, as his require the most work.
Let me bump this because of the simple reason that I added a demo of v0.82 for you to grab. Note that it includes a fix on the message window (which I also included in the script you can get from the first post) and and old man talking weird stuff ;) I think it's worth taking a look at.
lol .. i like'd the little "break from reading all this text" xD

very nice script as well.
Necro-bump-yeah

Hey Bluescope, do you have a copy of the display.dll file? The link to it is broken =[

EDIT: Problem Solved, read the FAQ.
Hey...I downloaded the demo but it was just full screen!
Um, it definately wasn't... use PrintScreen (the key) while the game's running, and enter some drawing program to paste the screenshot. You can check the resolution there.
I have the same problem MysticTrunks has, and I'm confident that I followed Selwyn's instructions to the letter. In addition, I get an error after I try to start the game by selecting "New Game" from the title screen. Line 237 of your script, an "ArgumentError," then it says "bad value for size." Here's the line:

self.contents.font.size = Font.default_size * -Setup.variance

Any idea what's causing this?

EDIT: I've tried this with numerous resolutions, from 800x600 up to my native 1680x1050 (Not necessarily expecting it to work, but I get the same error regardless of the resolution I pick :P)
I wonder if you tried out the demo... if it works there, it's a problem with your game... for example a script that changes the Font module (very unlikely), or version issues... you need v1.02 upwards to use this.

Also, for larger resolutions then 640x480, the screen will be black outside this area... noone's been able to fix this by now.
This is great, all that needs to be fixed is the menu and font issues.
When I enter a building, it ocures error :(
Could someone please explain those instructions better, I could not understand them really....I'm trying to set up the resolution to fit with gameboy advance's (240x160) and anything I try just messes my game up and I want the tiles to be 16x16 also o_O
@gadula: Sorry for the late reply, didn't see your post... either way, if you could tell me what error you encounter, it'd be easier to tell you what you need to do to fix it...

@Pyro: Just download the demo and try it there... depending on what you mean with "messes your game up", there might not even be a problem, just you figuring there is one because the characters don'T get resized, but the characters do.
I get an error on line 228 for window selectable....in the custom resolution script itself....i have the Display.dll extension in the same folder as the game extension itself, Selwyn's script was working prior, Seph's script was put in above Main and Below Game_Map and _PLayer.....

any thoughts?

*FIXED*
It wasn't underneath the window selectable folder =P

I am having issues with 'no implicit conversion to float from nil' in seph's script...going to try to relocate that as well....
here are the lines>

def initialize(viewport, map = $game_map.map)
@layers = []
for l in 0...3
layer = ($game_map.tilemap_plane ?
Plane.new(viewport) : Sprite.new(viewport))
layer.bitmap = Bitmap.new(map.width * 32, map.height * 32)
layer.z = l * 150

error line>>>>>>>>>>> layer.zoom_x = $game_map.tilemap_zoom_x

layer.zoom_y = $game_map.tilemap_zoom_y
if (tone = $game_map.tilemap_tone).is_a?(Tone)
layer.tone = tone
end
@layers << layer
end
mt
Alright, I'll admit I'm kind of ignorant in regards to scripting. I kinda know how it works, but the errors perplex me.

I did everything that was said with Selwyn's script and Sephiroth's, and it says:

Quote:
'Custom_Resolution' line 352: NoMethodError occurred.
private method 'initialize' called for Resolution:Module


Can anybody tell me what happened? Also I don't know if this means anything, but Selwyn said to put Resolution.update after Input.update in all the Scene_ scripts. But Input.update isn't in 7 of those scenes ("Scene_Save" through "Scene_Battle 4"). Could that be any source of the problem?

EDIT: I fixed my own problem...I can't believe I'm this dumb. I simply forgot one of the key scripts :) Thought I had them all.
I just got back into scripting, but the only thing that'd make this perfect is if you kept the window, instead of the screen going to the top left of your computer screen.
Excuse me for the necropost. (covers head) XD

I'm having the same problem as mentioned before with this script, the game window gets pushed to the upper left of the screen. When I put it into fullscreen it's still centered wrong. (This happens even with the demo.)
I just bought RPG Maker XP and downloaded the RGSS runtime environment, so I haven't included any scripts that might be interfering. My goal is to make the resolution look like RM2K3 (320 x 240), which the demo did except it was centered wrong.
My computer is running at 1024 x 768 resolution, by the way.

Does of you know how to solve this?
This is an edit of the original scripts posted in this thread, made so that it no longer requires Display.dll, and so that it starts in the center. I'll reformatg it later.

Content Hidden Spoiler
# Custom Resolution Script v0.82
#------------------------------------------------------------------------------
# Script by BlueScope


module Setup
  #--------------------------------------------------------------------------
  RESOLUTION = [(320).to_f, (240).to_f]
  #--------------------------------------------------------------------------
  def self.x_value
    return RESOLUTION[0] / 640
  end
  #--------------------------------------------------------------------------
  def self.y_value
    return RESOLUTION[1] / 480
  end
  #--------------------------------------------------------------------------
  def self.c_value
    return ((RESOLUTION[0] / 640) + (RESOLUTION[1] / 480)) / 2
  end
  #--------------------------------------------------------------------------
  def self.h_value
    return RESOLUTION[0]
  end
  #--------------------------------------------------------------------------
  def self.v_value
    return RESOLUTION[1]
  end
  #--------------------------------------------------------------------------
  def self.variance
    return (((RESOLUTION[0] / 640) + (RESOLUTION[1] / 480)) / 2) - 1
  end
  #--------------------------------------------------------------------------
end


#BEGIN CLASS

#Script made by Squall [email hidden]

class Win32API

  #CONSTANTS

  SCREEN_WIDTH = 240
  SCREEN_HEIGHT = 160
  GAME_INI_FILE = ".\\Game.ini"         # define "Game.ini" file
  HWND_TOPMOST = 0                      # window always active
  HWND_TOP = 0                         # window active when used only
  SWP_NOMOVE   = 0                      # window pos and sizes can be changed

  #Win32API.GetPrivateProfileString

  #Checks your game's title in Game.ini
  def Win32API.GetPrivateProfileString(section, key)
    val = "\0"*256
    gps = Win32API.new('kernel32','GetPrivateProfileString',%w(p p p p l p),'l')
    gps.call(section, key, "", val, 256, GAME_INI_FILE)
    val.delete!("\0")
    return val
  end

  #Win32API.FindWindow

  #Finds the RGSS Window
  def Win32API.FindWindow(class_name, title)
    fw = Win32API.new('user32', 'FindWindow', %(p, p), 'i')
    hWnd = fw.call(class_name, title)
    return hWnd
  end

  #Win32API.SetWindowPos

  #Changes Window position and size
  def Win32API.SetWindowPos(w, h)
    title =  Win32API.GetPrivateProfileString("Game", "Title")
    hWnd = Win32API.FindWindow("RGSS Player", title)
    swp = Win32API.new('user32', 'SetWindowPos', %(l, l, i, i, i, i, i), 'i')
    win = swp.call(hWnd, HWND_TOP, 0, 0, w + 6, h + 32, 0)
    #the line below makes the window on top of all others
    @gsm = Win32API.new('user32', 'GetSystemMetrics', 'I', 'I')
    @default_width = @gsm.call(0)
    @default_height = @gsm.call(1)
    win = swp.call(hWnd, HWND_TOPMOST, ((@default_width-w)/2),
    ((@default_height-h)/2), w + 6, h + 32, SWP_NOMOVE)
    return win
  end

  #Win32API.client_size

  #Checks the Window's width and height
  def Win32API.client_size
    title =  Win32API.GetPrivateProfileString("Game", "Title")
    hWnd = Win32API.FindWindow("RGSS Player", title)
    rect = [0, 0, 0, 0].pack('l4')
    Win32API.new('user32', 'GetClientRect', %w(l p), 'i').call(hWnd, rect)
    width, height = rect.unpack('l4')[2..3]
    return width, height
  end

#END CLASS

end 

class Sprite_Character < RPG::Sprite
  #--------------------------------------------------------------------------
  attr_accessor :character
  #--------------------------------------------------------------------------
  alias resolution_update update
  def update
    resolution_update
    super
    if @tile_id != @character.tile_id or
      @character_name != @character.character_name or
      @character_hue != @character.character_hue
      @tile_id = @character.tile_id
      @character_name = @character.character_name
      @character_hue = @character.character_hue
      if @tile_id >= 384
        self.bitmap = RPG::Cache.tile($game_map.tileset_name, @tile_id, @character.character_hue)
        self.src_rect.set(0, 0, 32, 32)
        self.ox = 16 * Setup.variance
        self.oy = 32 * (1 / Setup.c_value)
      else
        self.bitmap = RPG::Cache.character(@character.character_name, @character.character_hue)
        @cw = bitmap.width / 4
        @ch = bitmap.height / 4
        self.ox = (@cw / 2) - (16 * Setup.variance)
        self.oy = @ch + (64 * Setup.variance)
      end
    end
    if Setup.variance < 1
      self.zoom_x = 0.50
      self.zoom_y = 0.50
    else
      self.zoom_x = 1.00
      self.zoom_y = 1.00
    end
    x = @character.screen_x
    newx = x# / 2# * Setup.x_value
    y = @character.screen_y
    newy = y# / 2# * Setup.y_value
    self.x = newx
    self.y = newy
  end
  #--------------------------------------------------------------------------
end


class Spriteset_Map
  #--------------------------------------------------------------------------
  alias resolution_initialize initialize
  def initialize
    @viewport1 = Viewport.new(0, 0, Setup.h_value, Setup.v_value)
    @viewport2 = Viewport.new(0, 0, Setup.h_value, Setup.v_value)
    @viewport3 = Viewport.new(0, 0, Setup.h_value, Setup.v_value)
    resolution_initialize
  end
  #--------------------------------------------------------------------------
end


class Game_Map
  #--------------------------------------------------------------------------
  # The following method refers to the Tilemap class and has to be placed
  # below SephirothSpawn's Tilemap class rewrite in order to work properly
  #--------------------------------------------------------------------------
  alias resolution_initialize initialize
  def initialize
    resolution_initialize
    @tilemap_tile_width = (32 * Setup.x_value)
    @tilemap_tile_height = (32 * Setup.y_value)
  end
  #--------------------------------------------------------------------------
  def scroll_down(distance)
    @display_y = [@display_y + distance, (self.height - 15) * (128 * Setup.y_value)].min
  end
  #--------------------------------------------------------------------------
  def scroll_right(distance)
    @display_x = [@display_x + distance, (self.width - 20) * (128 * Setup.x_value)].min
  end
  #--------------------------------------------------------------------------
  def start_scroll(direction, distance, speed)
    @scroll_direction = direction
    @scroll_rest = distance * (128 * Setup.c_value)
    @scroll_speed = speed
  end
  #--------------------------------------------------------------------------
end


class Game_Character
  #--------------------------------------------------------------------------
  alias resolution_initialize initialize
  def initialize
    resolution_initialize
    @move_speed = 4 + (Setup.variance * 2)
  end
  #--------------------------------------------------------------------------
  def moving?
    return (@real_x != @x * (128 * Setup.x_value) or @real_y != @y * (128 * Setup.y_value))
  end
  #--------------------------------------------------------------------------
  def moveto(x, y)
    @x = x % $game_map.width
    @y = y % $game_map.height
    @real_x = @x * (128 * Setup.x_value)
    @real_y = @y * (128 * Setup.y_value)
    @prelock_direction = 0
  end
  #--------------------------------------------------------------------------
  def screen_x
    return (@real_x - $game_map.display_x + 3) / 4 + (16 * Setup.x_value)
  end
  #--------------------------------------------------------------------------
  def screen_y
    y = (@real_y - $game_map.display_y + 3) / 4 + (32 * Setup.y_value)
    if @jump_count >= @jump_peak
      n = @jump_count - @jump_peak
    else
      n = @jump_peak - @jump_count
    end
    return y - (@jump_peak * @jump_peak - n * n) / 2
  end
  #--------------------------------------------------------------------------
  def screen_z(height = 0)
    if @always_on_top
      return 999
    end
    z = (@real_y - $game_map.display_y + 3) / 4 + (32 * Setup.c_value)
    if @tile_id > 0
      return z + $game_map.priorities[@tile_id] * (32 * Setup.c_value)
    else
      return z + ((height > 32) ? 31 : 0)
    end
  end
  #--------------------------------------------------------------------------
  alias resolution_update update
  def update
    resolution_update
    if @anime_count > 18 - @move_speed * (2 - (Setup.variance * 2))
      if not @step_anime and @stop_count > 0
        @pattern = @original_pattern
      else
        @pattern = (@pattern + 1) % 4
      end
      @anime_count = 0
    end
  end
  #--------------------------------------------------------------------------
  def update_jump
    @jump_count -= 1
    @real_x = (@real_x * @jump_count + @x * (128 * Setup.x_value)) / (@jump_count + 1)
    @real_y = (@real_y * @jump_count + @y * (128 * Setup.y_value)) / (@jump_count + 1)
  end
  #--------------------------------------------------------------------------
  def update_move
    distance = 2 ** @move_speed
    if @y * (128 * Setup.y_value) > @real_y
      @real_y = [@real_y + distance, @y * (128 * Setup.y_value)].min
    end
    if @x * (128 * Setup.x_value) < @real_x
      @real_x = [@real_x - distance, @x * (128 * Setup.x_value)].max
    end
    if @x * (128 * Setup.x_value) > @real_x
      @real_x = [@real_x + distance, @x * (128 * Setup.x_value)].min
    end
    if @y * (128 * Setup.y_value) < @real_y
      @real_y = [@real_y - distance, @y * (128 * Setup.y_value)].max
    end
    if @walk_anime
      @anime_count += 1.5
    elsif @step_anime
      @anime_count += 1
    end
  end
  #--------------------------------------------------------------------------
end


class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  CENTER_X = ((320 * Setup.x_value) - 8) * 4
  CENTER_Y = ((240 * Setup.y_value) - 8) * 4
  #--------------------------------------------------------------------------
  def center(x, y)
    max_x = ($game_map.width - 20) * (128 * Setup.x_value)
    max_y = ($game_map.height - 15) * (128 * Setup.y_value)
    $game_map.display_x = [0, [x * (128 * Setup.x_value) - CENTER_X, max_x].min].max
    $game_map.display_y = [0, [y * (128 * Setup.y_value) - CENTER_Y, max_y].min].max
  end
  #--------------------------------------------------------------------------
end


class Window_Message < Window_Selectable
  #--------------------------------------------------------------------------
  alias resolution_initialize initialize
  def initialize
    resolution_initialize
    self.x = 80 *- Setup.variance
    self.width = 480 *- Setup.variance
    self.height = 160 *- Setup.variance
    self.contents.font.name = 'Verdana'
    self.contents.font.size = Font.default_size * -Setup.variance
  end
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    x = y = 0
    @cursor_width = 0
    if $game_temp.choice_start == 0
      x = 8
    end
    if $game_temp.message_text != nil
      text = $game_temp.message_text
      begin
        last_text = text.clone
        text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
      end until text == last_text
      text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
        $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
      end
      text.gsub!(/\\\\/) { "\000" }
      text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
      text.gsub!(/\\[Gg]/) { "\002" }
      while ((c = text.slice!(/./m)) != nil)
        if c == "\000"
          c = "\\"
        end
        if c == "\001"
          text.sub!(/\[([0-9]+)\]/, "")
          color = $1.to_i
          if color >= 0 and color <= 7
            self.contents.font.color = text_color(color)
          end
          next
        end
        if c == "\002"
          if @gold_window == nil
            @gold_window = Window_Gold.new
            @gold_window.x = (Setup.h_value * 0.875) - @gold_window.width
            if $game_temp.in_battle
              @gold_window.y = (Setup.h_value / 10) * 3
            else
              @gold_window.y = self.y >= (128 * Setup.variance) ?
                (32 * Setup.variance) : (384 * Setup.variance)
            end
            @gold_window.opacity = self.opacity
            @gold_window.back_opacity = self.back_opacity
          end
          next
        end
        if c == "\n"
          if y >= $game_temp.choice_start
            @cursor_width = [@cursor_width, x].max
          end
          y += 1
          x = 0
          if y >= $game_temp.choice_start
            x = 8
          end
          next
        end
        draw_y = (26 *- Setup.variance) * y - (24 *- Setup.variance)
        self.contents.draw_text(4 *- Setup.variance + x, draw_y, 40, 32, c)
        x += self.contents.text_size(c).width
      end
    end
    if $game_temp.choice_max > 0
      @item_max = $game_temp.choice_max
      self.active = true
      self.index = 0
    end
    if $game_temp.num_input_variable_id > 0
      digits_max = $game_temp.num_input_digits_max
      number = $game_variables[$game_temp.num_input_variable_id]
      @input_number_window = Window_InputNumber.new(digits_max)
      @input_number_window.number = number
      @input_number_window.x = self.x + 8
      @input_number_window.y = self.y + $game_temp.num_input_start * 32
    end
  end
  #--------------------------------------------------------------------------
  def reset_window
    if $game_temp.in_battle
      self.y = (16 * Setup.variance)
    else
      case $game_system.message_position
      when 0
        self.y = (16 *- Setup.variance)
      when 1
        self.y = (160 *- Setup.variance)
      when 2
        self.y = (304 *- Setup.variance)
      end
    end
    if $game_system.message_frame == 0
      self.opacity = 255
    else
      self.opacity = 0
    end
    self.back_opacity = 160
  end
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index >= 0
      n = $game_temp.choice_start + @index
      self.cursor_rect.set(8, n * (24 *- Setup.variance), @cursor_width,
        (24 *- Setup.variance))
    else
      self.cursor_rect.empty
    end
  end
  #--------------------------------------------------------------------------
end


begin
  win = Win32API.SetWindowPos(Setup.h_value, Setup.v_value)
  if(win == 0)
    p "Size change has failed!"
  end
  $scene = nil
end
Expand to see the code.


With this, you no longer need Selwyn's Script, or the dll. Instead, there is and addition by Squall, which I have edited. Also, here is the updated version of SephirothSpawn's Rewritten Tilemap, also edited by me. (So that it no longer requires the SDK) You might want this version, because it can display tiles of all priorities. (Unlike the version posted at the top of this thread, which doesn't display tiles with a priority of 3, 4, or 5.)

Content Hidden Spoiler
#==============================================================================
# ** RPG::Cache
#==============================================================================

module RPG::Cache
  #--------------------------------------------------------------------------
  # * Auto-Tiles
  #--------------------------------------------------------------------------
  Autotiles = [
    [[27, 28, 33, 34], [ 5, 28, 33, 34], [27,  6, 33, 34], [ 5,  6, 33, 34],
     [27, 28, 33, 12], [ 5, 28, 33, 12], [27,  6, 33, 12], [ 5,  6, 33, 12]],
    [[27, 28, 11, 34], [ 5, 28, 11, 34], [27,  6, 11, 34], [ 5,  6, 11, 34],
     [27, 28, 11, 12], [ 5, 28, 11, 12], [27,  6, 11, 12], [ 5,  6, 11, 12]],
    [[25, 26, 31, 32], [25,  6, 31, 32], [25, 26, 31, 12], [25,  6, 31, 12],
     [15, 16, 21, 22], [15, 16, 21, 12], [15, 16, 11, 22], [15, 16, 11, 12]],
    [[29, 30, 35, 36], [29, 30, 11, 36], [ 5, 30, 35, 36], [ 5, 30, 11, 36],
     [39, 40, 45, 46], [ 5, 40, 45, 46], [39,  6, 45, 46], [ 5,  6, 45, 46]],
    [[25, 30, 31, 36], [15, 16, 45, 46], [13, 14, 19, 20], [13, 14, 19, 12],
     [17, 18, 23, 24], [17, 18, 11, 24], [41, 42, 47, 48], [ 5, 42, 47, 48]],
    [[37, 38, 43, 44], [37,  6, 43, 44], [13, 18, 19, 24], [13, 14, 43, 44],
     [37, 42, 43, 48], [17, 18, 47, 48], [13, 18, 43, 48], [ 1,  2,  7,  8]]
  ]
  #--------------------------------------------------------------------------
  # * Autotile Cache
  #
  #   @autotile_cache = {
  #     filename => { [autotile_id, frame_id, hue] => bitmap, ... },
  #     ...
  #    }
  #--------------------------------------------------------------------------
  @autotile_cache = {}
  #--------------------------------------------------------------------------
  # * Autotile Tile
  #--------------------------------------------------------------------------
  def self.autotile_tile(filename, tile_id, hue = 0, frame_id = nil)
    # Gets Autotile Bitmap
    autotile = self.autotile(filename)
    # Configures Frame ID if not specified
    if frame_id.nil?
      # Animated Tiles
      frames = autotile.width / 96
      # Configures Animation Offset
      fc = Graphics.frame_count / Animated_Autotiles_Frames
      frame_id = (fc) % frames * 96
    end
    # Creates list if already not created
    @autotile_cache[filename] = {} unless @autotile_cache.has_key?(filename)
    # Gets Key
    key = [tile_id, frame_id, hue]
    # If Key Not Found
    unless @autotile_cache[filename].has_key?(key)
      # Reconfigure Tile ID
      tile_id %= 48
      # Creates Bitmap
      bitmap = Bitmap.new(32, 32)
      # Collects Auto-Tile Tile Layout
      tiles = Autotiles[tile_id / 8][tile_id % 8]
      # Draws Auto-Tile Rects
      for i in 0...4
        tile_position = tiles[i] - 1
        src_rect = Rect.new(tile_position % 6 * 16 + frame_id,
          tile_position / 6 * 16, 16, 16)
        bitmap.blt(i % 2 * 16, i / 2 * 16, autotile, src_rect)
      end
      # Saves Autotile to Cache
      @autotile_cache[filename][key] = bitmap
      # Change Hue
      @autotile_cache[filename][key].hue_change(hue)
    end
    # Return Autotile
    return @autotile_cache[filename][key]
  end
end

#==============================================================================
# ** Spriteset_Map
#------------------------------------------------------------------------------
#  This class brings together map screen sprites, tilemaps, etc.
#  It's used within the Scene_Map class.
#==============================================================================

class Spriteset_Map
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    init_viewports                            # Initialize Viewports
    init_tilemap                              # Initialize Tilemap
    init_panorama                             # Initialize Panorama
    init_fog                                  # Initialize Fog
    init_characters                           # Initialize Characters
    init_player                               # Initialize Player
    init_weather                              # Initialize Weather
    init_pictures                             # Initialize Pictures
    init_timer                                # Initialize Timer
    update                                    # Frame update
  end
  #--------------------------------------------------------------------------
  # * Viewport Initialization
  #--------------------------------------------------------------------------
  def init_viewports
    # Make viewports
    @viewport1 = Viewport.new(0, 0, 640, 480)
    @viewport2 = Viewport.new(0, 0, 640, 480)
    @viewport3 = Viewport.new(0, 0, 640, 480)
    @viewport2.z = 200
    @viewport3.z = 5000
  end
  #--------------------------------------------------------------------------
  # * Tilemap Initialization
  #--------------------------------------------------------------------------
  def init_tilemap
    # Make tilemap
    @tilemap = Tilemap.new(@viewport1)
    @tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
    for i in 0..6
      autotile_name = $game_map.autotile_names[i]
      @tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
    end
    @tilemap.map_data = $game_map.data.dup
    @tilemap.priorities = $game_map.priorities
  end
  #--------------------------------------------------------------------------
  # * Panorama Initialization
  #--------------------------------------------------------------------------
  def init_panorama
    # Make panorama plane
    @panorama = Plane.new(@viewport1)
    @panorama.z = -1000
  end
  #--------------------------------------------------------------------------
  # * Fog Initialization
  #--------------------------------------------------------------------------
  def init_fog
    # Make fog plane
    @fog = Plane.new(@viewport1)
    @fog.z = 3000
  end
  #--------------------------------------------------------------------------
  # * Character Sprite Initialization
  #--------------------------------------------------------------------------
  def init_characters
    # Make character sprites
    @character_sprites = []
    for i in $game_map.events.keys.sort
      sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
      @character_sprites.push(sprite)
    end
  end
  #--------------------------------------------------------------------------
  # * Player Initialization
  #--------------------------------------------------------------------------
  def init_player
    @character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
  end
  #--------------------------------------------------------------------------
  # * Weather Initialization
  #--------------------------------------------------------------------------
  def init_weather
    # Make weather
    @weather = RPG::Weather.new(@viewport1)
  end
  #--------------------------------------------------------------------------
  # * Picture Initialization
  #--------------------------------------------------------------------------
  def init_pictures
    # Make picture sprites
    @picture_sprites = []
    for i in 1..50
      @picture_sprites.push(Sprite_Picture.new(@viewport2,
        $game_screen.pictures[i]))
    end
  end
  #--------------------------------------------------------------------------
  # * Timer Initialization
  #--------------------------------------------------------------------------
  def init_timer
    # Make timer sprite
    @timer_sprite = Sprite_Timer.new
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    update_panorama                           # Update Panorama
    update_fog                                # Update Fog
    update_tilemap                            # Update Tilemap
    update_panorama_plane                     # Update Panorama Plane
    update_fog_plane                          # Update Fog Plane
    update_character_sprites                  # Update Character Sprites
    update_weather                            # Update Weather
    update_picture_sprites                    # Update Picture Sprites
    update_timer                              # Update Timer Sprite
    update_viewports                          # Update Viewports
  end
  #--------------------------------------------------------------------------
  # * Update Panorama
  #--------------------------------------------------------------------------
  def update_panorama
    # If panorama is different from current one
    if @panorama_name != $game_map.panorama_name or
       @panorama_hue != $game_map.panorama_hue
      @panorama_name = $game_map.panorama_name
      @panorama_hue = $game_map.panorama_hue
      if @panorama.bitmap != nil
        @panorama.bitmap.dispose
        @panorama.bitmap = nil
      end
      if @panorama_name != ""
        @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
      end
      Graphics.frame_reset
    end
  end
  #--------------------------------------------------------------------------
  # * Update Fog
  #--------------------------------------------------------------------------
  def update_fog
    # If fog is different than current fog
    if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
      @fog_name = $game_map.fog_name
      @fog_hue = $game_map.fog_hue
      if @fog.bitmap != nil
        @fog.bitmap.dispose
        @fog.bitmap = nil
      end
      if @fog_name != ""
        @fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
      end
      Graphics.frame_reset
    end
  end
  #--------------------------------------------------------------------------
  # * Update Tilemap
  #--------------------------------------------------------------------------
  def update_tilemap
    # Update tilemap
    @tilemap.ox = $game_map.display_x / 4
    @tilemap.oy = $game_map.display_y / 4
    @tilemap.update
  end
  #--------------------------------------------------------------------------
  # * Update Panorama Plane
  #--------------------------------------------------------------------------
  def update_panorama_plane
    # Update panorama plane
    @panorama.ox = $game_map.display_x / 8
    @panorama.oy = $game_map.display_y / 8
  end
  #--------------------------------------------------------------------------
  # * Update Fog Plane
  #--------------------------------------------------------------------------
  def update_fog_plane
    # Update fog plane
    @fog.zoom_x = $game_map.fog_zoom / 100.0
    @fog.zoom_y = $game_map.fog_zoom / 100.0
    @fog.opacity = $game_map.fog_opacity
    @fog.blend_type = $game_map.fog_blend_type
    @fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
    @fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
    @fog.tone = $game_map.fog_tone
  end
  #--------------------------------------------------------------------------
  # * Update Character Sprites
  #--------------------------------------------------------------------------
  def update_character_sprites
    # Update character sprites
    for sprite in @character_sprites
      sprite.update
    end
  end
  #--------------------------------------------------------------------------
  # * Update Weather
  #--------------------------------------------------------------------------
  def update_weather
    # Update weather graphic
    @weather.type = $game_screen.weather_type
    @weather.max = $game_screen.weather_max
    @weather.ox = $game_map.display_x / 4
    @weather.oy = $game_map.display_y / 4
    @weather.update
  end
  #--------------------------------------------------------------------------
  # * Update Picture Sprites
  #--------------------------------------------------------------------------
  def update_picture_sprites
    # Update picture sprites
    for sprite in @picture_sprites
      sprite.update
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update : Timer
  #--------------------------------------------------------------------------
  def update_timer
    # Update timer sprite
    @timer_sprite.update
  end
  #--------------------------------------------------------------------------
  # * Frame Update : Viewports
  #--------------------------------------------------------------------------
  def update_viewports
    # Set screen color tone and shake position
    @viewport1.tone = $game_screen.tone
    @viewport1.ox = $game_screen.shake
    # Set screen flash color
    @viewport3.color = $game_screen.flash_color
    # Update viewports
    @viewport1.update     
    @viewport3.update
  end
end

RPG::Cache::Animated_Autotiles_Frames = 16
#==============================================================================
# ** Tilemap_Options
#==============================================================================

module Tilemap_Options
  #--------------------------------------------------------------------------
  # * Tilemap Options
  #
  #
  #   Print Error Reports when not enough information set to tilemap
  #    - Print_Error_Logs          = true or false
  #
  #   Number of autotiles to refresh at edge of viewport
  #    - Viewport_Padding          = n
  #
  #   When maps are switch, automatically set
  #   $game_map.tileset_settings.flash_data (Recommended : False unless using
  #   flash_data)
  #    - Autoset_Flash_data        = true or false
  #
  #   Duration Between Flash Data Flashes
  #    - Flash_Duration            = n
  #
  #   Color of bitmap (Recommended to use low opacity value)
  #    - Flash_Bitmap_C            = Color.new(255, 255, 255, 50)
  #
  #   Update Flashtiles Default Setting
  #   Explanation : In the Flash Data Addition, because of lag, you may wish
  #   to toggle whether flash tiles flash or not. This is the default state.
  #    - Default_Update_Flashtiles = false
  #--------------------------------------------------------------------------
  Print_Error_Logs          = true
  Autoset_Flash_data        = true
  Viewport_Padding          = 2
  Flash_Duration            = 40
  Flash_Bitmap_C            = Color.new(255, 255, 255, 50)
  Default_Update_Flashtiles = false
end

#==============================================================================
# ** Tilemap_Settings
#==============================================================================

class Tilemap_Settings
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :map
  attr_accessor :is_a_plane
  attr_accessor :tone
  attr_accessor :hue
  attr_accessor :zoom_x
  attr_accessor :zoom_y
  attr_accessor :tile_size
  attr_accessor :flash_data
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(map = nil)
    # Set Instance Variables
    @map, @is_a_plane, @tone, @hue, @zoom_x, @zoom_y, @tile_size,
      @flash_data = map, false, nil, 0, 1.0, 1.0, 16, nil
  end
end

#==============================================================================
# ** Game_Map
#==============================================================================

class Game_Map
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :tilemap_settings
  def setup_load
    # Load map from file and set @map
    @map = load_data(sprintf("Data/Map%03d.rxdata", @map_id))
  end
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias_method :seph_tilemap_gmap_init, :initialize
  alias_method :seph_tilemap_gmap_stld, :setup_load
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    # Original Initialization
    seph_tilemap_gmap_init
    # Create Tilemap Settings
    @tilemap_settings = Tilemap_Settings.new
  end
  #--------------------------------------------------------------------------
  # * Load Map Data
  #--------------------------------------------------------------------------
  def setup_load
    # Original Load Map Data
    seph_tilemap_gmap_stld
    # Reset Tilemap Flash Data
    if Tilemap_Options::Autoset_Flash_data
      @tilemap_settings.flash_data = Table.new(@map.width, @map.height)
    end
    @tilemap_settings.map = @map
  end
end

#==============================================================================
# ** Spriteset_Map
#==============================================================================

class Spriteset_Map
  def init_tilemap
    # Make tilemap
    @tilemap = Tilemap.new(@viewport1)
    @tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
    for i in 0..6
      autotile_name = $game_map.autotile_names[i]
      @tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
    end
    @tilemap.map_data = $game_map.data.dup
    @tilemap.priorities = $game_map.priorities
  end
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias_method :seph_tilemap_ssmap_inittm, :init_tilemap
  #--------------------------------------------------------------------------
  # * Tilemap Initialization
  #--------------------------------------------------------------------------
  def init_tilemap
    # Original Tilemap Initialization
    seph_tilemap_ssmap_inittm
    # Set Tilemap Settings
    @tilemap.tileset_name = $game_map.tileset_name
    for i in 0..6
      @tilemap.autotiles_name[i] = $game_map.autotile_names[i]
    end
    @tilemap.tilemap_settings = $game_map.tilemap_settings
    # Setup Flash Data
    @tilemap.flash_data = $game_map.tilemap_settings.flash_data
    # Run Tilemap Setup
    @tilemap.setup
  end
end

#==============================================================================
# ** Tilemap
#==============================================================================

class Tilemap
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :layers
  attr_accessor :tileset
  attr_accessor :tileset_name
  attr_accessor :autotiles
  attr_accessor :autotiles_name
  attr_reader   :map_data
  attr_accessor :flash_data
  attr_accessor :priorities
  attr_accessor :visible
  attr_accessor :ox
  attr_accessor :oy
  attr_accessor :tilemap_settings
  attr_accessor :refresh_autotiles
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(viewport)
    # Saves Viewport
    @viewport = viewport
    # Creates Blank Instance Variables
    @layers            = []    # Refers to Array of Sprites or Planes
    @tileset           = nil   # Refers to Tileset Bitmap
    @tileset_name      = ''    # Refers to Tileset Filename
    @autotiles         = []    # Refers to Array of Autotile Bitmaps
    @autotiles_name    = []    # Refers to Array of Autotile Filenames
    @map_data          = nil   # Refers to 3D Array Of Tile Settings
    @flash_data        = nil   # Refers to 3D Array of Tile Flashdata
    @priorities        = nil   # Refers to Tileset Priorities
    @visible           = true  # Refers to Tilest Visibleness
    @ox                = 0     # Bitmap Offsets         
    @oy                = 0     # Bitmap Offsets
    @tilemap_settings  = nil   # Special Tilemap Settings
    @dispose           = false # Disposed Flag
    @refresh_autotiles = true  # Refresh Autotile Flag
  end
  #--------------------------------------------------------------------------
  # * Setup
  #--------------------------------------------------------------------------
  def setup
    # Print Error if Tilemap Settings not Found
    if Tilemap_Options::Print_Error_Logs
      if @tilemap_settings.nil?
        p 'Tilemap Settings have not been set. System will not crash.'
      end
      if @map_data.nil?
        p 'Map Data has not been set. System will crash.'
      end
    end
    # Creates Layers
    @layers = []
    for l in 0...3
      layer = @tilemap_settings.nil? || !@tilemap_settings.is_a_plane ?
        Sprite.new(@viewport) : Plane.new(@viewport)
      layer.bitmap = Bitmap.new(@map_data.xsize * 32, @map_data.ysize * 32)
      layer.z = l * 150
      layer.zoom_x = @tilemap_settings.nil? ? 1.0 : @tilemap_settings.zoom_x
      layer.zoom_y = @tilemap_settings.nil? ? 1.0 : @tilemap_settings.zoom_y
      unless @tilemap_settings.nil? || @tilemap_settings.tone.nil?
        layer.tone = @tilemap_settings.tone
      end
      @layers << layer
    end
    # Update Flags
    @refresh_data = nil
    @zoom_x   = @tilemap_settings.nil? ? 1.0 : @tilemap_settings.zoom_x
    @zoom_y   = @tilemap_settings.nil? ? 1.0 : @tilemap_settings.zoom_y
    @tone     = @tilemap_settings.nil? ? nil : @tilemap_settings.tone
    @hue      = @tilemap_settings.nil? ? 0   : @tilemap_settings.hue
    @tilesize = @tilemap_settings.nil? ? 32  : @tilemap_settings.tile_size
  end
  #--------------------------------------------------------------------------
  # * Map Data=
  #--------------------------------------------------------------------------
  def map_data=(map_data)
    # Save Map Data
    @map_data = map_data
    # Refresh if able
    begin ; refresh ; rescue ; end
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  def dispose
    # Dispose Layers (Sprites)
    @layers.each { |layer| layer.dispose }
    # Set Disposed Flag to True
    @disposed = true
  end
  #--------------------------------------------------------------------------
  # * Disposed?
  #--------------------------------------------------------------------------
  def disposed?
    return @disposed
  end
  #--------------------------------------------------------------------------
  # * Viewport
  #--------------------------------------------------------------------------
  def viewport
    return @viewport
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Set Refreshed Flag to On
    needs_refresh = true
    # If Map Data, Tilesize or HueChanges
    if @map_data != @refresh_data || (@tilemap_settings != false &&
       @hue != @tilemap_settings.hue) || (@tilemap_settings != false &&
       @tilesize != @tilemap_settings.tile_size)
      # Refresh Bitmaps
      refresh
      # Turns Refresh Flag to OFF
      needs_refresh = false
    end
    # Zoom X, Zoom Y, and Tone Changes
    unless @tilemap_settings.nil?
      if @zoom_x != @tilemap_settings.zoom_x
        @zoom_x = @tilemap_settings.zoom_x
        @layers.each {|layer| layer.zoom_x = @zoom_x}
      end
      if @zoom_y != @tilemap_settings.zoom_y
        @zoom_y = @tilemap_settings.zoom_y
        @layers.each {|layer| layer.zoom_y = @zoom_y}
      end
      if @tone != @tilemap_settings.tone
        @tone = @tilemap_settings.tone.nil? ?
          Tone.new(0, 0, 0, 0) : @tilemap_settings.tone
        @layers.each {|layer| layer.tone = @tone}
      end
    end
    # Update layer Position offsets
    for layer in @layers
      layer.ox = @ox
      layer.oy = @oy
    end
    # If Refresh Autotiles, Needs Refreshed & Autotile Reset Frame
    if @refresh_autotiles && needs_refresh &&
       Graphics.frame_count % RPG::Cache::Animated_Autotiles_Frames == 0
      # Refresh Autotiles
      refresh_autotiles
    end
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    # Saves Map Data & Tilesize
    @refresh_data = @map_data
    @hue      = @tilemap_settings.nil? ? 0  : @tilemap_settings.hue
    @tilesize = @tilemap_settings.nil? ? 32 : @tilemap_settings.tile_size
    # Passes Through Layers
    for z in 0...@map_data.zsize
      # Passes Through X Coordinates
      for x in 0...@map_data.xsize
        # Passes Through Z Coordinates
        for y in 0...@map_data.ysize
          # Collects Tile ID
          id = @map_data[x, y, z]
          # Skip if 0 tile
          next if id == 0
          # Passes Through All Priorities
          for p in 0..5
            # Skip If Priority Doesn't Match
            next unless p == @priorities[id]
            # Cap Priority to Layer 3
            p = 2 if p > 2
            # Draw Tile
            id < 384 ? draw_autotile(x, y, p, id) : draw_tile(x, y, p, id)
          end
        end
      end
    end
  end   
  #--------------------------------------------------------------------------
  # * Refresh Auto-Tiles
  #--------------------------------------------------------------------------
  def refresh_autotiles
    # Auto-Tile Locations
    autotile_locations = Table.new(@map_data.xsize, @map_data.ysize,
      @map_data.zsize)
  # Get X Tiles
    x1 = [@ox / @tilesize - Tilemap_Options::Viewport_Padding, 0].max
    x2 = [@viewport.rect.width / @tilesize +
          Tilemap_Options::Viewport_Padding, @map_data.xsize].min
    # Get Y Tiles
    y1 = [@oy / @tilesize - Tilemap_Options::Viewport_Padding, 0].max
    y2 = [@viewport.rect.height / @tilesize +
          Tilemap_Options::Viewport_Padding, @map_data.ysize].min
    # Passes Through Layers
    for z in 0...@map_data.zsize
      # Passes Through X Coordinates
      for x in x1...x2
        # Passes Through Y Coordinates
        for y in y1...y2
          # Collects Tile ID
          id = @map_data[x, y, z]
          # Skip if 0 tile
          next if id == 0
          # Skip If Non-Animated Tile
          next unless @autotiles[id / 48 - 1].width / 96 > 1 if id < 384
          # Get Priority
          p = @priorities[id]
          # Cap Priority to Layer 3
          p = 2 if p > 2
          # If Autotile
          if id < 384
            # Draw Auto-Tile
            draw_autotile(x, y, p, id)
            # Draw Higher Tiles
            for l in 0...@map_data.zsize
              id_l = @map_data[x, y, l]
              draw_tile(x, y, p, id_l)
            end
            # Save Autotile Location
            autotile_locations[x, y, z] = 1
          # If Normal Tile
          else
            # If Autotile Drawn
            if autotile_locations[x, y, z] == 1
              # Redraw Normal Tile
              draw_tile(x, y, p, id)
              # Draw Higher Tiles
              for l in 0...@map_data.zsize
                id_l = @map_data[x, y, l]
                draw_tile(x, y, p, id_l)
              end
            end
          end
        end
      end
    end
  end     
  #--------------------------------------------------------------------------
  # * Draw Tile
  #--------------------------------------------------------------------------
  def draw_tile(x, y, z, id)
    rect = Rect.new((id - 384) % 8 * 32, (id - 384) / 8 * 32, 32, 32)
    x *= @tilesize
    y *= @tilesize
    if @tile_width == 32 && @tile_height == 32
      @layers[z].bitmap.blt(x, y, @tileset, rect)
    else
      dest_rect = Rect.new(x, y, @tilesize, @tilesize)
      @layers[z].bitmap.stretch_blt(dest_rect, @tileset, rect)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Auto-Tile
  #--------------------------------------------------------------------------
  def draw_autotile(x, y, z, tile_id)
    # Gets Autotile Filename
    filename = @autotiles_name[tile_id / 48 - 1]
    # Reconfigure Tile ID
    tile_id %= 48
    # Gets Generated Autotile Bitmap Section
    bitmap = RPG::Cache.autotile_tile(filename, tile_id, @hue)
    # Calculates Tile Coordinates
    x *= @tilesize
    y *= @tilesize
    # If Normal Tile
    if @tilesize == 32
      @layers[z].bitmap.blt(x, y, bitmap, Rect.new(0, 0, 32, 32))
    # If Altered Dimensions
    else
      dest_rect = Rect.new(x, y, @tilesize, @tilesize)
      @layers[z].bitmap.stretch_blt(dest_rect, bitmap, Rect.new(0, 0, 32, 32))
    end
  end
  #--------------------------------------------------------------------------
  # * Collect Bitmap
  #--------------------------------------------------------------------------
  def bitmap
    # Creates New Blank Bitmap
    bitmap = Bitmap.new(@layers[0].bitmap.width, @layers[0].bitmap.height)
    # Passes Through All Layers
    for layer in @layers
      bitmap.blt(0, 0, layer.bitmap,
        Rect.new(0, 0, bitmap.width, bitmap.height))
    end
    # Return Bitmap
    return bitmap
  end
end
Expand to see the code.
Awesome, thanks! ...But unfortunately, I am extremely new to scripting and don't quite know what to do with this. -_- I pasted the first bunch of code you gave me over the previous "Custom Resolution Script" code, and I'm not sure what to do with the rest of it. When I test played the game, the window was in the middle of the screen (hooray!) but I got an error message saying "Script 'Window Resolution Script' line 50: NoMethodError occurred. undefined method 'call' for nil:NilClass."

These are lines 49 - 52:
(49)def trigger?(key)
(50)    return @gaks.call(key) & 0x01 == 1
(51)  end

What now? =0
GoldenGriffon wrote:
Awesome, thanks! ...But unfortunately, I am extremely new to scripting and don't quite know what to do with this. -_- I pasted the first bunch of code you gave me over the previous "Custom Resolution Script" code, and I'm not sure what to do with the rest of it. When I test played the game, the window was in the middle of the screen (hooray!) but I got an error message saying "Script 'Window Resolution Script' line 50: NoMethodError occurred. undefined method 'call' for nil:NilClass."

These are lines 49 - 52:
(49)def trigger?(key)
(50)    return @gaks.call(key) & 0x01 == 1
(51)  end

What now? =0


I already said, with my script, you don't need Selwyn's. (The Window Resolution Script). You can also delete the .dll file that is in the project as well. (As in, delete Display.dll)
@Glitch: Haven't tested what you stated yet, but it definately sounds like it'd eradicate some of the more major problems of the initial script... what bugs me is that the implementation of Selwyns script (if I'm not mistaken, Selwyn's the more recent nick of "Squall")... what I'll definately do is including a reference to your additions - credited, of course - in the initial post... unless you desire otherwise, in which case just leave me a message and I'll delete it again...

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=19861