Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Show pictures at 800x600 resolution

My desire is rather simple. All I want is to display 800x600 pictures in my RMXP project. Ive tried using Selwyn's script. It leaves me with a black border on the lower right corner. I dont even mind the black so much, if only I could display those pictures properly. Thats all I want.
 
Selwyn's:

Code:
#==============================================================================

# ■ Resolution

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

#  created by Selwyn

#  selwyn@rmxp.ch

#

#  released on the 19th of June 2006

#

#  allows to change the game window's resolution to 800 by 600.

#==============================================================================

 

module Resolution

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

  # ● instance variables

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

  attr_reader :state

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

  # ● initialize

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

  def initialize

    title = "\0" * 256

    Win32API.new('kernel32', 'GetPrivateProfileString','PPPPLP', 'L').call("Game", "Title", "", title, 256, ".\\Game.ini")

    title.delete!("\0")

    @set_resolution  = Win32API.new('Display.dll', 'SetResolution', 'III', 'I')

    @set_window_long = Win32API.new('user32', 'SetWindowLong', 'LIL', 'L')

    @set_window_pos  = Win32API.new('user32', 'SetWindowPos', 'LLIIIII', 'I')

    @gsm             = Win32API.new('user32', 'GetSystemMetrics', 'I', 'I')

    @gcr             = Win32API.new('user32', 'GetClientRect', 'LP', 'I')

    @kbe             = Win32API.new('user32', 'keybd_event', 'LLLL', '')

    @gaks            = Win32API.new('user32', 'GetAsyncKeyState', 'L', 'I')

    @window = Win32API.new('user32', 'FindWindow', 'PP', 'I').call("RGSS Player", title)

    @default_size = size

    if size[0] < 800 or size[1] < 600

      print("A minimum screen resolution of [800 by 600] is required in order to play #{title}")

      exit

    end

    @state = "default"

    self.default

  end

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

  # ● fullscreen

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

  def fullscreen

    @default_size = size

    @set_window_long.call(@window, -16, 0x14000000)

    @set_window_pos.call(@window, -1, 0, 0, 802, 602, 64)

    @set_resolution.call(800, 600, 4)

    @state = "fullscreen"

  end

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

  # ● default

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

  def default

    x = @default_size[0] / 2 - 403

    y = @default_size[1] / 2 - 316

    @set_window_long.call(@window, -16, 0x14CA0000)

    @set_window_pos.call(@window, 0, x, y, 808, 627, 0)

    @set_resolution.call(@default_size[0], @default_size[1], 0)

    @state = "default"

  end

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

  # ● trigger?(key)

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

  def trigger?(key)

    return @gaks.call(key) & 0x01 == 1

  end

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

  # ● private

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

  private :fullscreen

  private :default

  private :trigger?

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

  # ● size

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

  def size

    width = @gsm.call(0)

    height = @gsm.call(1)

    return width, height

  end

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

  # ● change

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

  def change

    if @state == "default"

      self.fullscreen

    else

      self.default

    end

  end

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

  # ● update

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

  def update

    if trigger?(121) # F10

      self.change

    end

    if Input.trigger?(Input::ALT) or Input.press?(Input::ALT)

      @kbe.call(18, 0, 2, 0)

    end

  end

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

  # ● module functions

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

  module_function :initialize

  module_function :fullscreen

  module_function :default

  module_function :trigger?

  module_function :size

  module_function :change

  module_function :update

end
 
Damn, Im starting to get the impression theres some sort of conspiracy to keep things like window class rewrites out of the hands of those who want them. Everytime I almost find something I need to get my game at 800x600, the thread is removed, or the code is all messed up. WTF?!
 
At the beginning of Spriteset_Map:
Code:
    @viewport1 = Viewport.new(0, 0, 640, 480)

    @viewport2 = Viewport.new(0, 0, 640, 480)

    @viewport3 = Viewport.new(0, 0, 640, 480)
Change the 640, 480 to 800, 600.

But be aware, that you cannot use this Resolution script (or any I know) with the standard RMXP engine.
You need either to rewrite big parts of it or write a new one from scratch. So, if you're not a scripter (what it seems like), this script wasn't made for you.
 
Lemme rewrap this topic up from the beginning... answering the question first: It is very well possible to display 800x600 images in RMXP without having black hidden stuff on the lower right. However, you have to show them outside of Scene_Map, as elements in Spriteset_Map (apparently, that applies to Game_Picture elements as well) will necessarily be chopped to a 640x480 bounding box starting at [0,0] regardless of the resolution the RGSS Player (this is the window your game runs in) has. To do that, use a scripted attempt such as this:
Code:
@sprite = Sprite.new

@sprite.bitmap = RPG::Cache.pictures("namegoeshere")


As for my resolution script - it's quite capable, however only for resolutions lower than 640x480 as well, since it uses Selwyns system ^^ I think I've figured out a way to get rid of this before using a Tilemap rewrite, but I'm not sure right now... my Custom Resolution Script thread should enlighten you if you're interested. Note that you'll never get a perfectly satisfying result, though, as RMXP is really no engine you can easily modify beyond it's bounds.

And last but not least for general information: Window class rewrites won't get you anywhere here, as the Window class is the class handling stuff like message background windows, not the OS's windows. What you need to achieve this is Selwyn's script or something similar to modify the RGSS Player dimensions, as well as a Tilemap rewrite to change the amount of tiles able to be displayed.
 
Neo-Bahamut":v55auipe said:
At the beginning of Spriteset_Map:
Code:
    @viewport1 = Viewport.new(0, 0, 640, 480)

    @viewport2 = Viewport.new(0, 0, 640, 480)

    @viewport3 = Viewport.new(0, 0, 640, 480)
Change the 640, 480 to 800, 600.

But be aware, that you cannot use this Resolution script (or any I know) with the standard RMXP engine.
You need either to rewrite big parts of it or write a new one from scratch. So, if you're not a scripter (what it seems like), this script wasn't made for you.


Yeah, I tried that. Didnt really work as I had hoped. Im not a 'scripter' perse, but I am a guy who enjoys the creative process. When I am on a creative streak, I will overcome just about any obstacle in my path to make my ideas come to fruition. Ive scoured the internet for every scrap of info I could get about rmxp in higher resolutions. Ive read that engine rewrites are near impossible, yet...Ive also read about some games that do indeed run at 800x600 or even higher. I wont pretend to understand all of it, but...

"Hidden class rewrites" seem to be integral to my goal. Im not sure if those qualify as full fledged engine rewrites or not. No matter, Its as if someone has made a concerted effort to hoard information about these class rewrites and prevent them from being shared with the community at large. Seems like everytime I was close to finding something important, I found deleted threads, and posted scripts garbled. WTF? Maybe Im just being paranoid.
 
BlueScope":bi641cph said:
Lemme rewrap this topic up from the beginning... answering the question first: It is very well possible to display 800x600 images in RMXP without having black hidden stuff on the lower right. However, you have to show them outside of Scene_Map, as elements in Spriteset_Map (apparently, that applies to Game_Picture elements as well) will necessarily be chopped to a 640x480 bounding box starting at [0,0] regardless of the resolution the RGSS Player (this is the window your game runs in) has. To do that, use a scripted attempt such as this:
Code:
@sprite = Sprite.new

@sprite.bitmap = RPG::Cache.pictures("namegoeshere")


As for my resolution script - it's quite capable, however only for resolutions lower than 640x480 as well, since it uses Selwyns system ^^ I think I've figured out a way to get rid of this before using a Tilemap rewrite, but I'm not sure right now... my Custom Resolution Script thread should enlighten you if you're interested. Note that you'll never get a perfectly satisfying result, though, as RMXP is really no engine you can easily modify beyond it's bounds.

And last but not least for general information: Window class rewrites won't get you anywhere here, as the Window class is the class handling stuff like message background windows, not the OS's windows. What you need to achieve this is Selwyn's script or something similar to modify the RGSS Player dimensions, as well as a Tilemap rewrite to change the amount of tiles able to be displayed.

I read over your Custom resolution thread at least twenty times. I searched the forum for a working set of scripts. I wasnt sure what all of the various rewrite scripts did, but I knew I needed a tilemap script, or a window script or SOMETHING like that. The closest I got to finding these things was a mention that they existed, and to search the forum. And of course, thats when I started finding mysteriously deleted threads and garbled scripts.


However, I DID find something. On another site entirely, that actually seems to do the job, for the most part. "Glitchfinder's Screen Size Editor" I still havent figured out how to get rid of the ugly black border while in gameplay, but it DOES allow me to show full-sized pictures.

Code:
#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡

# ** Glitchfinder's Screen Size Editor                           [RPG Maker XP]

#    Version 1.00

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

#  This script is meant to allow the programmer to change the screen size of

#  the RPG Maker XP window.

#==============================================================================

# * Version History

#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#   Version 1.00 ------------------------------------------------- (????-??-??)

#     - Initial version

#     - Author: Glitchfinder

#==============================================================================

# * Instructions

#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#  Place this script above Main, and below the default scripts. (I

#  realize this is obvious to most, but some people don't get it.)

#

#  To change the default screen size, simply edit the Screen_Data module, which

#  uses the following format:

#  [width (in tiles), height (in tiles), width, height]

#

#  To edit the size of the screen in game, simply use the following function:

#  Screen_Size.change_screen_size(width, height)

#  The width and height must be the number of tiles that you want the screen to

#  display in each direction.

#==============================================================================

# * Glitchfinder's Advice

#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#  This script is meant for people with a medium to high level of scripting

#  knowledge and ability. If you are unsure of your abilities, or don't know

#  how to script, then it would be a good idea to avoid this script.

#

#  If you are editing the default screen size in the Screen_Data module, the

#  second width and height should be the same as the first width and height

#  multiplied by 32, so that the player will display properly on the map.

#

#  If you make the screen size larger than the default, you must make sure that

#  all of your maps are at least that large, or you will get a fatal error.

#

#  If you use this script, you must be prepared to create your own custom

#  menus, titles, gameovers, etc. to fit the new screen size.

#==============================================================================

# * Contact

#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#  Glitchfinder, the author of this script, may be contacted through his

#  website, found at [url=http://www.glitchkey.com]http://www.glitchkey.com[/url]

#

#  You may also find Glitchfinder at [url=http://www.hbgames.org]http://www.hbgames.org[/url]

#==============================================================================

# * Usage

#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#  This script may be used with the following terms and conditions:

#

#    1. This script is free to use in any noncommercial project. If you wish to

#       use this script in a commercial (paid) project, please contact

#       Glitchfinder at his website.

#    2. This script may only be hosted at the following domains:

#         [url=http://www.glitchkey.com]http://www.glitchkey.com[/url]

#         [url=http://www.hbgames.org]http://www.hbgames.org[/url]

#    3. If you wish to host this script elsewhere, please contact Glitchfinder.

#    4. If you wish to translate this script, please contact Glitchfinder. He

#       will need the web address that you plan to host the script at, as well

#       as the language this script is being translated to.

#    5. This header must remain intact at all times.

#    6. Glitchfinder remains the sole owner of this code. He may modify or

#       revoke this license at any time, for any reason.

#    7. Any code derived from code within this script is owned by Glitchfinder,

#       and you must have his permission to publish, host, or distribute his

#       code.

#    8. This license applies to all code derived from the code within this

#       script.

#    9. If you use this script within your project, you must include visible

#       credit to Glitchfinder, within reason.

#≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡

 

#==============================================================================

# ** Screen_Size

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

#  This module handles the information regarding screen size. It is used within

#  the Screen_Size, Game_Map, Game_Player, Spriteset_Map, and Spriteset_Battle

#  classes.

#==============================================================================

 

module Screen_Data

    Screen_Data = [7, 8, 200, 250]

end

 

#==============================================================================

# ** Screen_Size

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

#  This class handles the screen size. It is used within the Game_Map,

#  Game_Actor, Spriteset_Map, and Spriteset_Battle classes.

#==============================================================================

 

class Screen_Size

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

  # * Change Screen Size

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

  def change_screen_size(width, height)

    window_width = width * 118

    window_height = height * 79

    Screen_Data::Screen_Data[0] = width

    Screen_Data::Screen_Data[1] = height

    Screen_Data::Screen_Data[2] = window_width

    Screen_Data::Screen_Data[3] = window_height

    self.resize_window((width * 118), (height * 79))

  end

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

  # * Handle Window Size Changes

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

  def resize_window(width, height)

    getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'I', 'I')

    moveWindow = Win32API.new('user32','MoveWindow',

      ['l','i','i','i','i','l'],'l')

    findWindowEx = Win32API.new('user32','FindWindowEx',['l','l','p','p'],'i')

    window = findWindowEx.call(0,0,"RGSS Player",0)

    screenwidth = getSystemMetrics.call(0)

    screenheight = getSystemMetrics.call(1)

    windowwidth = width + 6

    windowheight = height + 32

    moveWindow.call(window,(screenwidth - windowwidth) / 2,

      (screenheight - windowheight) / 2,windowwidth,windowheight, 2)

  end

end

 

#==============================================================================

# ** Game_Map

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

#  This class handles the map. It includes scrolling and passable determining

#  functions. Refer to "$game_map" for the instance of this class.

#==============================================================================

 

class Game_Map

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

  # * Scroll Down

  #     distance : scroll distance

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

  def scroll_down(distance)

    @display_y = [@display_y + distance,

      (self.height - Screen_Data::Screen_Data[1].to_s.to_i) * 128].min

  end

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

  # * Scroll Right

  #     distance : scroll distance

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

  def scroll_right(distance)

    screen = Screen_Size.new

    @display_x = [@display_x + distance,

      (self.width - Screen_Data::Screen_Data[0].to_s.to_i) * 128].min

    end

  end

#==============================================================================

# ** Game_Player

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

#  This class handles the player. Its functions include event starting

#  determinants and map scrolling. Refer to "$game_player" for the one

#  instance of this class.

#==============================================================================

 

class Game_Player < Game_Character

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

  # * Object Initialization

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

  alias glitchfinder_screen_resizer_initialize initialize

  def initialize

    width = (Screen_Data::Screen_Data[2].to_s.to_i / 2)

    height = (Screen_Data::Screen_Data[3].to_s.to_i / 2)

    @center_x = (width - 16) * 4

    @center_y = (height - 16) * 4

    glitchfinder_screen_resizer_initialize

  end

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

  # * Set Map Display Position to Center of Screen

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

  def center(x, y)

    max_x = ($game_map.width - Screen_Data::Screen_Data[0].to_s.to_i) * 128

    max_y = ($game_map.height - Screen_Data::Screen_Data[1].to_s.to_i) * 128

    $game_map.display_x = [0, [x * 128 - @center_x, max_x].min].max

    $game_map.display_y = [0, [y * 128 - @center_y, max_y].min].max

  end

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

  # * Frame Update

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

  def update

    # Remember whether or not moving in local variables

    last_moving = moving?

    # If moving, event running, move route forcing, and message window

    # display are all not occurring

    unless moving? or $game_system.map_interpreter.running? or

           @move_route_forcing or $game_temp.message_window_showing

      # Move player in the direction the directional button is being pressed

      case Input.dir4

      when 2

        move_down

      when 4

        move_left

      when 6

        move_right

      when 8

        move_up

      end

    end

    # Remember coordinates in local variables

    last_real_x = @real_x

    last_real_y = @real_y

    super

    # If character moves down and is positioned lower than the center

    # of the screen

    if @real_y > last_real_y and @real_y - $game_map.display_y > @center_y

      # Scroll map down

      $game_map.scroll_down(@real_y - last_real_y)

    end

    # If character moves left and is positioned more let on-screen than

    # center

    if @real_x < last_real_x and @real_x - $game_map.display_x < @center_x

      # Scroll map left

      $game_map.scroll_left(last_real_x - @real_x)

    end

    # If character moves right and is positioned more right on-screen than

    # center

    if @real_x > last_real_x and @real_x - $game_map.display_x > @center_x

      # Scroll map right

      $game_map.scroll_right(@real_x - last_real_x)

    end

    # If character moves up and is positioned higher than the center

    # of the screen

    if @real_y < last_real_y and @real_y - $game_map.display_y < @center_y

      # Scroll map up

      $game_map.scroll_up(last_real_y - @real_y)

    end

    # If not moving

    unless moving?

      # If player was moving last time

      if last_moving

        # Event determinant is via touch of same position event

        result = check_event_trigger_here([1,2])

        # If event which started does not exist

        if result == false

          # Disregard if debug mode is ON and ctrl key was pressed

          unless $DEBUG and Input.press?(Input::CTRL)

            # Encounter countdown

            if @encounter_count > 0

              @encounter_count -= 1

            end

          end

        end

      end

      # If C button was pressed

      if Input.trigger?(Input::C)

        # Same position and front event determinant

        check_event_trigger_here([0])

        check_event_trigger_there([0,1,2])

      end

    end

  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

    width = Screen_Data::Screen_Data[2].to_s.to_i

    height = Screen_Data::Screen_Data[3].to_s.to_i

    # Make viewports

    @viewport1 = Viewport.new(0, 0, width, height)

    @viewport2 = Viewport.new(0, 0, width, height)

    @viewport3 = Viewport.new(0, 0, width, height)

    @viewport2.z = 200

    @viewport3.z = 5000

    # 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

    @tilemap.priorities = $game_map.priorities

    # Make panorama plane

    @panorama = Plane.new(@viewport1)

    @panorama.z = -1000

    # Make fog plane

    @fog = Plane.new(@viewport1)

    @fog.z = 3000

    # 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

    @character_sprites.push(Sprite_Character.new(@viewport1, $game_player))

    # Make weather

    @weather = RPG::Weather.new(@viewport1)

    # Make picture sprites

    @picture_sprites = []

    for i in 1..50

      @picture_sprites.push(Sprite_Picture.new(@viewport2,

        $game_screen.pictures[i]))

    end

    # Make timer sprite

    @timer_sprite = Sprite_Timer.new

    # Frame update

    update

  end

end

 

#==============================================================================

# ** Spriteset_Battle

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

#  This class brings together battle screen sprites. It's used within

#  the Scene_Battle class.

#==============================================================================

 

class Spriteset_Battle

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

  # * Object Initialization

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

  def initialize

    width = Screen_Data::Screen_Data[2].to_s.to_i

    height = Screen_Data::Screen_Data[3].to_s.to_i

    # Make viewports

    @viewport1 = Viewport.new(0, 0, width, ((height * 2) / 3).to_i)

    @viewport2 = Viewport.new(0, 0, width, height)

    @viewport3 = Viewport.new(0, 0, width, height)

    @viewport4 = Viewport.new(0, 0, width, height)

    @viewport2.z = 101

    @viewport3.z = 200

    @viewport4.z = 5000

    # Make battleback sprite

    @battleback_sprite = Sprite.new(@viewport1)

    # Make enemy sprites

    @enemy_sprites = []

    for enemy in $game_troop.enemies.reverse

      @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))

    end

    # Make actor sprites

    @actor_sprites = []

    @actor_sprites.push(Sprite_Battler.new(@viewport2))

    @actor_sprites.push(Sprite_Battler.new(@viewport2))

    @actor_sprites.push(Sprite_Battler.new(@viewport2))

    @actor_sprites.push(Sprite_Battler.new(@viewport2))

    # Make weather

    @weather = RPG::Weather.new(@viewport1)

    # Make picture sprites

    @picture_sprites = []

    for i in 51..100

      @picture_sprites.push(Sprite_Picture.new(@viewport3,

        $game_screen.pictures[i]))

    end

    # Make timer sprite

    @timer_sprite = Sprite_Timer.new

    # Frame update

    update

  end

end

 

#==============================================================================

# ** Scene_Title

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

#  This class performs title screen processing.

#==============================================================================

 

class Scene_Title

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

  # * Main Processing

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

  def main

    # If battle test

    if $BTEST

      battle_test

      return

    end

    # Load database

    $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")

    # Make system object

    $game_system = Game_System.new

    # Make title graphic

    @sprite = Sprite.new

    @sprite.bitmap = RPG::Cache.title($data_system.title_name)

    # Make command window

    s1 = "New Game"

    s2 = "Continue"

    s3 = "Shutdown"

    @command_window = Window_Command.new(192, [s1, s2, s3])

    @command_window.back_opacity = 160

    @command_window.x = ((Screen_Data::Screen_Data[2].to_s.to_i / 2) -

                        (@command_window.width / 2))

    num = (((Screen_Data::Screen_Data[3].to_s.to_i - 128) * 9) / 11).to_i

    @command_window.y = num

    # Continue enabled determinant

    # Check if at least one save file exists

    # If enabled, make @continue_enabled true; if disabled, make it false

    @continue_enabled = false

    for i in 0..3

      if FileTest.exist?("Save#{i+1}.rxdata")

        @continue_enabled = true

      end

    end

    # If continue is enabled, move cursor to "Continue"

    # If disabled, display "Continue" text in gray

    if @continue_enabled

      @command_window.index = 1

    else

      @command_window.disable_item(1)

    end

    # Play title BGM

    $game_system.bgm_play($data_system.title_bgm)

    # Stop playing ME and BGS

    Audio.me_stop

    Audio.bgs_stop

    # Execute transition

    Graphics.transition

    # Main loop

    loop do

      # Update game screen

      Graphics.update

      # Update input information

      Input.update

      # Frame update

      update

      # Abort loop if screen is changed

      if $scene != self

        break

      end

    end

    # Prepare for transition

    Graphics.freeze

    # Dispose of command window

    @command_window.dispose

    # Dispose of title graphic

    @sprite.bitmap.dispose

    @sprite.dispose

  end

end

 

#==============================================================================

# ** Screen_Resizer

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

#  This will begin the screen size change.

#==============================================================================

begin

  width = Screen_Data::Screen_Data[0].to_s.to_i

  height = Screen_Data::Screen_Data[1].to_s.to_i

  screen = Screen_Size.new

  screen.change_screen_size(width, height)

end


Theres a few things about it I wish I could change.

"To edit the size of the screen in game, simply use the following function: Screen_Size.change_screen_size(width, height)"

...Does not work. If it did, I could switch back and forth between resolutions when I show a picture. OR, I could make a nice border image myself to cover it up. Im very pleased that I finally found SOMETHING that works for me, but I cant just settle for that unless theres no other choice.

At the very least, Id like some advice on how to push the text window DOWN and to the right. combine that with a fancy border to cover up the ugly, I might end up with something very nice looking. Ive been using a custom message script for quite some time, and if I recall properly, it does allow for it to be moved around...but will it let me move it even outside of its normal boundaries? The title screen menu box does so I assume its possible.

Also, if there is any way to center the game window in the middle of the black, so that its evenly distributed all around, I think that too might be a decent option.
 
I'm personally not familiar with Glitch's script, but what you said sounds like he simply has included what Neo Bahamut suggested earlier - change the viewport sizes to allow bigger display.

Changing the resolution "in game" doesn't mean mid-game, if you ask me, though that's kind of what he makes it sound like... with the default size and all directly before... but yeah, if it does allow changing the screen size of a running game, I'm impressed ^^ as while that's very well possible in theory, the RGSS Player is anything but meant for it. Note that the width and height variables are in tiles here, not pixels.

For the message window, as I said, anything outside Spriteset_Map should be no problem, meaning that message boxes are no problem, as they're an instance of Window class. Changing the x and y variables will get it to whatever position you like - just take a look into your custom message system.


All that being said, I'm starting to wonder why you want to take all those design flaws and program bends just to show a picture you could - per sé - simply resize to 640x480...
 
Well, I already replied to your PM, but I noticed this topic and figured I'd give you the updated script before you had to send me another PM on the matter. One warning is that, since the script actually locks you into tile-based screen sizes, you'll actually be at 800x608, instead of 800x600. (Although, this does factor in the current window width and height as well, so you don't run into any OS-based issues like you do with most of the others.) Anyway, this update is significantly slower than the version you are using, because it had to create a lot of new sprites, viewports, and planes to deal with the majority of the issues involving larger screen sizes on the map. (Please note that there was nothing I could do about transitions, which are based in the hidden Graphics class) Anyway, enough rambling, and on to the script. (Also, the header has yet to be updated, since this script hasn't been officially released in a thread or on my site)

Code:
#==============================================================================

# ** Glitchfinder's Screen Size Editor                           [RPG Maker XP]

#    Version 1.00

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

#  This script is meant to allow the programmer to change the screen size of

#  the RPG Maker XP window.

#==============================================================================

# * Version History

#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#   Version 1.00 ------------------------------------------------- (????-??-??)

#     - Initial version

#     - Author: Glitchfinder

#==============================================================================

# * Instructions

#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#  Place this script above Main, and below the default scripts. (I

#  realize this is obvious to most, but some people don't get it.)

#

#  To change the default screen size, simply edit the Screen_Data module, which

#  uses the following format:

#  [width (in tiles), height (in tiles), width, height]

#

#  To edit the size of the screen in game, simply use the following function:

#  Screen_Size.change_screen_size(width, height)

#  The width and height must be the number of tiles that you want the screen to

#  display in each direction.

#==============================================================================

# * Glitchfinder's Advice

#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#  This script is meant for people with a medium to high level of scripting

#  knowledge and ability. If you are unsure of your abilities, or don't know

#  how to script, then it would be a good idea to avoid this script.

#

#  If you are editing the default screen size in the Screen_Data module, the

#  second width and height should be the same as the first width and height

#  multiplied by 32, so that the player will display properly on the map.

#

#  If you make the screen size larger than the default, you must make sure that

#  all of your maps are at least that large, or you will get a fatal error.

#

#  If you use this script, you must be prepared to create your own custom

#  menus, titles, gameovers, etc. to fit the new screen size.

#==============================================================================

# * Contact

#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#  Glitchfinder, the author of this script, may be contacted through his

#  website, found at [url=http://www.glitchkey.com]http://www.glitchkey.com[/url]

#

#  You may also find Glitchfinder at [url=http://www.hbgames.org]http://www.hbgames.org[/url]

#==============================================================================

# * Usage

#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#  This script may be used with the following terms and conditions:

#

#    1. This script is free to use in any noncommercial project. If you wish to

#       use this script in a commercial (paid) project, please contact

#       Glitchfinder at his website.

#    2. This script may only be hosted at the following domains:

#         [url=http://www.glitchkey.com]http://www.glitchkey.com[/url]

#         [url=http://www.hbgames.org]http://www.hbgames.org[/url]

#    3. If you wish to host this script elsewhere, please contact Glitchfinder.

#    4. If you wish to translate this script, please contact Glitchfinder. He

#       will need the web address that you plan to host the script at, as well

#       as the language this script is being translated to.

#    5. This header must remain intact at all times.

#    6. Glitchfinder remains the sole owner of this code. He may modify or

#       revoke this license at any time, for any reason.

#    7. Any code derived from code within this script is owned by Glitchfinder,

#       and you must have his permission to publish, host, or distribute his

#       code.

#    8. This license applies to all code derived from the code within this

#       script.

#    9. If you use this script within your project, you must include visible

#       credit to Glitchfinder, within reason.

#==============================================================================

 

#==============================================================================

# ** Screen_Size

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

#  This module handles the information regarding screen size. It is used within

#  the Screen_Size, Game_Map, Game_Player, Spriteset_Map, and Spriteset_Battle

#  classes.

#==============================================================================

 

module Screen_Data

    Screen_Data = [25, 19, 800, 608]

end

 

#==============================================================================

# ** Screen_Size

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

#  This class handles the screen size. It is used within the Game_Map,

#  Game_Actor, Spriteset_Map, and Spriteset_Battle classes.

#==============================================================================

 

class Screen_Size

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

  # * Change Screen Size

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

  def change_screen_size(width, height)

    window_width = width * 32

    window_height = height * 32

    Screen_Data::Screen_Data[0] = width

    Screen_Data::Screen_Data[1] = height

    Screen_Data::Screen_Data[2] = window_width

    Screen_Data::Screen_Data[3] = window_height

    self.resize_window((width * 32), (height * 32))

  end

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

  # * Handle Window Size Changes

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

  def resize_window(width, height)

    getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'I', 'I')

    moveWindow = Win32API.new('user32','MoveWindow',

      ['l','i','i','i','i','l'],'l')

    findWindowEx = Win32API.new('user32','FindWindowEx',['l','l','p','p'],'i')

    window = findWindowEx.call(0,0,"RGSS Player",0)

    screenwidth = getSystemMetrics.call(0)

    screenheight = getSystemMetrics.call(1)

    border_width = getSystemMetrics.call(5) + getSystemMetrics.call(45)

    windowwidth = width + (border_width * 2)

    border_height = getSystemMetrics.call(6) + getSystemMetrics.call(46)

    windowheight = height + (border_height * 2) + getSystemMetrics.call(4)

    moveWindow.call(window,(screenwidth - windowwidth) / 2,

      (screenheight - windowheight) / 2,windowwidth,windowheight, 2)

  end

end

 

#==============================================================================

# ** RPG::Weather

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

#  This class handles the weather.

#==============================================================================

 

module RPG

  class Weather

    def update

      return if @type == 0

      width = Screen_Data::Screen_Data[2]

      height = Screen_Data::Screen_Data[3]

      for i in 1..@max

        sprite = @sprites[i]

        if sprite == nil

          break

        end

        if @type == 1

          sprite.x -= 2

          sprite.y += 16

          sprite.opacity -= 8

        end

        if @type == 2

          sprite.x -= 8

          sprite.y += 16

          sprite.opacity -= 12

        end

        if @type == 3

          sprite.x -= 2

          sprite.y += 8

          sprite.opacity -= 8

        end

        x = sprite.x - @ox

        y = sprite.y - @oy

        if (sprite.opacity < 64 or x < -50 or x > (width + 110) or y < -300 or

          y > (height + 20))

          sprite.x = rand(width + 160) - 50 + @ox

          sprite.y = rand(height + 320) - 200 + @oy

          sprite.opacity = 255

        end

      end

    end

    attr_reader :type

    attr_reader :max

    attr_reader :ox

    attr_reader :oy

  end

end

 

 

#==============================================================================

# ** Game_Map

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

#  This class handles the map. It includes scrolling and passable determining

#  functions. Refer to "$game_map" for the instance of this class.

#==============================================================================

 

class Game_Map

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

  # * Scroll Down

  #     distance : scroll distance

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

  def scroll_down(distance)

    @display_y = [@display_y + distance,

      (self.height - Screen_Data::Screen_Data[1].to_s.to_i) * 128].min

  end

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

  # * Scroll Right

  #     distance : scroll distance

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

  def scroll_right(distance)

    screen = Screen_Size.new

    @display_x = [@display_x + distance,

      (self.width - Screen_Data::Screen_Data[0].to_s.to_i) * 128].min

    end

  end

 

#==============================================================================

# ** Game_Player

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

#  This class handles the player. Its functions include event starting

#  determinants and map scrolling. Refer to "$game_player" for the one

#  instance of this class.

#==============================================================================

 

class Game_Player < Game_Character

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

  # * Object Initialization

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

  alias glitchfinder_screen_resizer_initialize initialize

  def initialize

    width = (Screen_Data::Screen_Data[2].to_s.to_i / 2)

    height = (Screen_Data::Screen_Data[3].to_s.to_i / 2)

    @center_x = (width - 16) * 4

    @center_y = (height - 16) * 4

    glitchfinder_screen_resizer_initialize

  end

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

  # * Set Map Display Position to Center of Screen

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

  def center(x, y)

    max_x = ($game_map.width - Screen_Data::Screen_Data[0].to_s.to_i) * 128

    max_y = ($game_map.height - Screen_Data::Screen_Data[1].to_s.to_i) * 128

    $game_map.display_x = [0, [x * 128 - @center_x, max_x].min].max

    $game_map.display_y = [0, [y * 128 - @center_y, max_y].min].max

  end

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

  # * Frame Update

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

  def update

    # Remember whether or not moving in local variables

    last_moving = moving?

    # If moving, event running, move route forcing, and message window

    # display are all not occurring

    unless moving? or $game_system.map_interpreter.running? or

           @move_route_forcing or $game_temp.message_window_showing

      # Move player in the direction the directional button is being pressed

      case Input.dir4

      when 2

        move_down

      when 4

        move_left

      when 6

        move_right

      when 8

        move_up

      end

    end

    # Remember coordinates in local variables

    last_real_x = @real_x

    last_real_y = @real_y

    super

    # If character moves down and is positioned lower than the center

    # of the screen

    if @real_y > last_real_y and @real_y - $game_map.display_y > @center_y

      # Scroll map down

      $game_map.scroll_down(@real_y - last_real_y)

    end

    # If character moves left and is positioned more let on-screen than

    # center

    if @real_x < last_real_x and @real_x - $game_map.display_x < @center_x

      # Scroll map left

      $game_map.scroll_left(last_real_x - @real_x)

    end

    # If character moves right and is positioned more right on-screen than

    # center

    if @real_x > last_real_x and @real_x - $game_map.display_x > @center_x

      # Scroll map right

      $game_map.scroll_right(@real_x - last_real_x)

    end

    # If character moves up and is positioned higher than the center

    # of the screen

    if @real_y < last_real_y and @real_y - $game_map.display_y < @center_y

      # Scroll map up

      $game_map.scroll_up(last_real_y - @real_y)

    end

    # If not moving

    unless moving?

      # If player was moving last time

      if last_moving

        # Event determinant is via touch of same position event

        result = check_event_trigger_here([1,2])

        # If event which started does not exist

        if result == false

          # Disregard if debug mode is ON and ctrl key was pressed

          unless $DEBUG and Input.press?(Input::CTRL)

            # Encounter countdown

            if @encounter_count > 0

              @encounter_count -= 1

            end

          end

        end

      end

      # If C button was pressed

      if Input.trigger?(Input::C)

        # Same position and front event determinant

        check_event_trigger_here([0])

        check_event_trigger_there([0,1,2])

      end

    end

  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

    width = Screen_Data::Screen_Data[2].to_s.to_i

    height = Screen_Data::Screen_Data[3].to_s.to_i

    # Make viewports

    @viewport1 = Viewport.new(0, 0, width, height)

    @viewport2 = Viewport.new(0, 0, width, height)

    @viewport3 = Viewport.new(0, 0, width, height)

    @viewport4 = Viewport.new(0, 480, 640, (height - 480))

    @viewport5 = Viewport.new(640, 0, (width - 640), 480)

    @viewport6 = Viewport.new(640, 480, (width - 640), (height - 480))

    @viewport7 = Viewport.new(0, 0, width, height)

    @viewport2.z = 200

    @viewport3.z = 5000

    # Make tilemap

    @tilemap = Tilemap.new(@viewport1)

    @tilemap2 = Tilemap.new(@viewport4)

    @tilemap3 = Tilemap.new(@viewport5)

    @tilemap4 = Tilemap.new(@viewport6)

    @tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)

    @tilemap2.tileset = RPG::Cache.tileset($game_map.tileset_name)

    @tilemap3.tileset = RPG::Cache.tileset($game_map.tileset_name)

    @tilemap4.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)

      @tilemap2.autotiles[i] = RPG::Cache.autotile(autotile_name)

      @tilemap3.autotiles[i] = RPG::Cache.autotile(autotile_name)

      @tilemap4.autotiles[i] = RPG::Cache.autotile(autotile_name)

    end

    @tilemap.map_data = $game_map.data

    @tilemap2.map_data = $game_map.data

    @tilemap3.map_data = $game_map.data

    @tilemap4.map_data = $game_map.data

    @tilemap.priorities = $game_map.priorities

    @tilemap2.priorities = $game_map.priorities

    @tilemap3.priorities = $game_map.priorities

    @tilemap4.priorities = $game_map.priorities

    # Make panorama plane

    @panorama = Plane.new(@viewport1)

    @panorama2 = Plane.new(@viewport4)

    @panorama3 = Plane.new(@viewport5)

    @panorama4 = Plane.new(@viewport6)

    @panorama.z = -1000

    @panorama2.z = -1000

    @panorama3.z = -1000

    @panorama4.z = -1000

    # Make fog plane

    @fog = Plane.new(@viewport1)

    @fog2 = Plane.new(@viewport4)

    @fog3 = Plane.new(@viewport5)

    @fog4 = Plane.new(@viewport6)

    @fog.z = 3000

    @fog2.z = 3000

    @fog3.z = 3000

    @fog4.z = 3000

    # Make character sprites

    @character_sprites = []

    @character_sprites2 = []

    @character_sprites3 = []

    @character_sprites4 = []

    for i in $game_map.events.keys.sort

      sprite = Sprite_Character.new(@viewport1, $game_map.events[i])

      @character_sprites.push(sprite)

      sprite = Sprite_Character.new(@viewport4, $game_map.events[i])

      @character_sprites2.push(sprite)

      sprite = Sprite_Character.new(@viewport5, $game_map.events[i])

      @character_sprites3.push(sprite)

      sprite = Sprite_Character.new(@viewport6, $game_map.events[i])

      @character_sprites4.push(sprite)

    end

    @character_sprites.push(Sprite_Character.new(@viewport1, $game_player))

    @character_sprites2.push(Sprite_Character.new(@viewport4, $game_player))

    @character_sprites3.push(Sprite_Character.new(@viewport5, $game_player))

    @character_sprites4.push(Sprite_Character.new(@viewport6, $game_player))

    # Make weather

    @weather = RPG::Weather.new(@viewport7)

    # Make picture sprites

    @picture_sprites = []

    for i in 1..50

      @picture_sprites.push(Sprite_Picture.new(@viewport2,

        $game_screen.pictures[i]))

    end

    # Make timer sprite

    @timer_sprite = Sprite_Timer.new

    # Frame update

    update

  end

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

  # * Alias Methods

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

  # If the dispose method has not been aliased

  unless method_defined?(:screensizeeditor_spriteset_map_dispose)

    # Alias the update method

    alias screensizeeditor_spriteset_map_dispose dispose

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

    # * Dispose

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

    def dispose

      # Call original method

      screensizeeditor_spriteset_map_dispose

      # Dispose new tilemaps 

      @tilemap2.tileset.dispose

      @tilemap3.tileset.dispose

      @tilemap4.tileset.dispose

      for i in 0..6

        @tilemap2.autotiles[i].dispose

        @tilemap3.autotiles[i].dispose

        @tilemap4.autotiles[i].dispose

      end

      @tilemap2.dispose

      @tilemap3.dispose

      @tilemap4.dispose

      # Dispose of new panorama planes

      @panorama2.dispose

      @panorama3.dispose

      @panorama4.dispose

      # Dispose of new fog planea

      @fog2.dispose

      @fog3.dispose

      @fog4.dispose

      # Dispose of new character sprites

      for sprite in @character_sprites2

        sprite.dispose

      end

      for sprite in @character_sprites3

        sprite.dispose

      end

      for sprite in @character_sprites4

        sprite.dispose

      end

      # Dispose new viewports

      @viewport4.dispose

      @viewport5.dispose

      @viewport6.dispose

      @viewport7.dispose

    end

  end

  # If the update method has not been aliased

  unless method_defined?(:screensizeeditor_spriteset_map_update)

    # Alias the update method

    alias screensizeeditor_spriteset_map_update update

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

    # * Frame Update

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

    def update

      # 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

          @panorama2.bitmap.dispose

          @panorama3.bitmap.dispose

          @panorama4.bitmap.dispose

          @panorama.bitmap = nil

          @panorama2.bitmap = nil

          @panorama3.bitmap = nil

          @panorama4.bitmap = nil

        end

        if @panorama_name != ""

          @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)

          @panorama2.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)

          @panorama3.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)

          @panorama4.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)

        end

        Graphics.frame_reset

      end

      # 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

          @fog2.bitmap.dispose

          @fog3.bitmap.dispose

          @fog4.bitmap.dispose

          @fog.bitmap = nil

          @fog2.bitmap = nil

          @fog3.bitmap = nil

          @fog4.bitmap = nil

        end

        if @fog_name != ""

          @fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)

          @fog2.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)

          @fog3.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)

          @fog4.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)

        end

        Graphics.frame_reset

      end

      # Update new tilemaps

      @tilemap2.ox = $game_map.display_x / 4

      @tilemap3.ox = ($game_map.display_x / 4) + 640

      @tilemap4.ox = ($game_map.display_x / 4) + 640

      @tilemap2.oy = ($game_map.display_y / 4) + 480

      @tilemap3.oy = $game_map.display_y / 4

      @tilemap4.oy = ($game_map.display_y / 4) + 480

      @tilemap2.update

      @tilemap3.update

      @tilemap4.update

      # Update new panorama planes

      @panorama2.ox = $game_map.display_x / 8

      @panorama3.ox = ($game_map.display_x / 8) + 320

      @panorama4.ox = ($game_map.display_x / 8) + 320

      @panorama2.oy = ($game_map.display_y / 8) + 240

      @panorama3.oy = $game_map.display_y / 8

      @panorama4.oy = ($game_map.display_y / 8) + 240

      # Update new fog planes

      @fog2.zoom_x = $game_map.fog_zoom / 100.0

      @fog3.zoom_x = $game_map.fog_zoom / 100.0

      @fog4.zoom_x = $game_map.fog_zoom / 100.0

      @fog2.zoom_y = $game_map.fog_zoom / 100.0

      @fog3.zoom_y = $game_map.fog_zoom / 100.0

      @fog4.zoom_y = $game_map.fog_zoom / 100.0

      @fog2.opacity = $game_map.fog_opacity

      @fog3.opacity = $game_map.fog_opacity

      @fog4.opacity = $game_map.fog_opacity

      @fog2.blend_type = $game_map.fog_blend_type

      @fog3.blend_type = $game_map.fog_blend_type

      @fog4.blend_type = $game_map.fog_blend_type

      @fog2.ox = $game_map.display_x / 4 + $game_map.fog_ox

      @fog3.ox = ($game_map.display_x / 4 + $game_map.fog_ox) + 640

      @fog4.ox = ($game_map.display_x / 4 + $game_map.fog_ox) + 640

      @fog2.oy = ($game_map.display_y / 4 + $game_map.fog_oy) + 480

      @fog3.oy = $game_map.display_y / 4 + $game_map.fog_oy

      @fog4.oy = ($game_map.display_y / 4 + $game_map.fog_oy) + 480

      @fog2.tone = $game_map.fog_tone

      @fog3.tone = $game_map.fog_tone

      @fog4.tone = $game_map.fog_tone

      # Update new character sprites

      for sprite in @character_sprites2

        sprite.update

        sprite.y -= 480

        sprite.visible = (sprite.y < 0) ? false : true

      end

      for sprite in @character_sprites3

        sprite.update

        sprite.x -= 640

        sprite.visible = (sprite.x < 0) ? false : true

      end

      for sprite in @character_sprites4

        sprite.update

        sprite.x -= 640

        sprite.y -= 480

        sprite.visible = ((sprite.x < 0) || (sprite.y < 0)) ? false : true

      end

      # Set screen color tone and shake position

      @viewport4.tone = $game_screen.tone

      @viewport5.tone = $game_screen.tone

      @viewport6.tone = $game_screen.tone

      @viewport7.tone = $game_screen.tone

      @viewport4.ox = $game_screen.shake

      @viewport5.ox = $game_screen.shake

      @viewport6.ox = $game_screen.shake

      @viewport7.ox = $game_screen.shake

      # Update viewports

      @viewport4.update

      @viewport5.update

      @viewport6.update

      @viewport7.update

      # Call original method

      screensizeeditor_spriteset_map_update

    end

  end

end

 

#==============================================================================

# ** Spriteset_Battle

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

#  This class brings together battle screen sprites. It's used within

#  the Scene_Battle class.

#==============================================================================

 

class Spriteset_Battle

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

  # * Object Initialization

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

  def initialize

    width = Screen_Data::Screen_Data[2].to_s.to_i

    height = Screen_Data::Screen_Data[3].to_s.to_i

    # Make viewports

    @viewport1 = Viewport.new(0, 0, width, ((height * 2) / 3).to_i)

    @viewport2 = Viewport.new(0, 0, width, height)

    @viewport3 = Viewport.new(0, 0, width, height)

    @viewport4 = Viewport.new(0, 0, width, height)

    @viewport2.z = 101

    @viewport3.z = 200

    @viewport4.z = 5000

    # Make battleback sprite

    @battleback_sprite = Sprite.new(@viewport1)

    # Make enemy sprites

    @enemy_sprites = []

    for enemy in $game_troop.enemies.reverse

      @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))

    end

    # Make actor sprites

    @actor_sprites = []

    @actor_sprites.push(Sprite_Battler.new(@viewport2))

    @actor_sprites.push(Sprite_Battler.new(@viewport2))

    @actor_sprites.push(Sprite_Battler.new(@viewport2))

    @actor_sprites.push(Sprite_Battler.new(@viewport2))

    # Make weather

    @weather = RPG::Weather.new(@viewport1)

    # Make picture sprites

    @picture_sprites = []

    for i in 51..100

      @picture_sprites.push(Sprite_Picture.new(@viewport3,

        $game_screen.pictures[i]))

    end

    # Make timer sprite

    @timer_sprite = Sprite_Timer.new

    # Frame update

    update

  end

end

 

#==============================================================================

# ** Scene_Title

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

#  This class performs title screen processing.

#==============================================================================

 

class Scene_Title

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

  # * Main Processing

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

  def main

    # If battle test

    if $BTEST

      battle_test

      return

    end

    # Load database

    $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")

    # Make system object

    $game_system = Game_System.new

    # Make title graphic

    @sprite = Sprite.new

    @sprite.bitmap = RPG::Cache.title($data_system.title_name)

    # Make command window

    s1 = "New Game"

    s2 = "Continue"

    s3 = "Shutdown"

    @command_window = Window_Command.new(192, [s1, s2, s3])

    @command_window.back_opacity = 160

    @command_window.x = ((Screen_Data::Screen_Data[2].to_s.to_i / 2) -

                        (@command_window.width / 2))

    num = (((Screen_Data::Screen_Data[3].to_s.to_i - 128) * 9) / 11).to_i

    @command_window.y = num

    # Continue enabled determinant

    # Check if at least one save file exists

    # If enabled, make @continue_enabled true; if disabled, make it false

    @continue_enabled = false

    for i in 0..3

      if FileTest.exist?("Save#{i+1}.rxdata")

        @continue_enabled = true

      end

    end

    # If continue is enabled, move cursor to "Continue"

    # If disabled, display "Continue" text in gray

    if @continue_enabled

      @command_window.index = 1

    else

      @command_window.disable_item(1)

    end

    # Play title BGM

    $game_system.bgm_play($data_system.title_bgm)

    # Stop playing ME and BGS

    Audio.me_stop

    Audio.bgs_stop

    # Execute transition

    Graphics.transition

    # Main loop

    loop do

      # Update game screen

      Graphics.update

      # Update input information

      Input.update

      # Frame update

      update

      # Abort loop if screen is changed

      if $scene != self

        break

      end

    end

    # Prepare for transition

    Graphics.freeze

    # Dispose of command window

    @command_window.dispose

    # Dispose of title graphic

    @sprite.bitmap.dispose

    @sprite.dispose

  end

end

 

#==============================================================================

# ** Screen_Resizer

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

#  This will begin the screen size change.

#==============================================================================

begin

  width = Screen_Data::Screen_Data[0].to_s.to_i

  height = Screen_Data::Screen_Data[1].to_s.to_i

  screen = Screen_Size.new

  screen.change_screen_size(width, height)

end


Also, Bluescope, my script can resize in game. Technically speaking, all of them do. Mine has the added bonus of making most things scalable, which makes it easier. (Although the version I just posted here can't actually go any further than 1280x960 without encountering the exact same problems it worked to correct. But then, who wants an RMXP window that big anyway?) Although, the only window I remember actively modding was the one in the default title screen. (And that was because I couldn't help but show off the fact that I figured out the formula they used to generate the apparently arbitrary y position for the window. In reality, they used a ratio of sorts)
 
lordgore":1ed6d858 said:
It works like a charm Glitchfinder. Thanks a lot for the hard work, I will make good use of it. :)

It's no problem. One thing you should be warned about is that this script causes a significant dip in frame-rate on some older computers. Mostly, it's because of how poorly the graphics handling in RM* is, so that, by quadrupling the graphics being handled on the map, I've increased the load significantly. It's just something you should be aware of, although many newer computers won't have as much trouble as computers made when RMXP was first released.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top