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.

How to use RGSS2 or RGSS3 with RPG Maker XP

Ahh~It looks so cool can i use this to run rmvx projects in rgss?(foolish...囧)
with my language---“很好很强大”
 
Zarnik":3tg2xiq5 said:
This is great! It takes everything thats good from vx into xp which is the perfect maker. But I got a question, when in fullscreen there are black borders. And I think that looks cool but when you wanna explore more of the map the character just dissapear into the black frame. Any script fixes to that?

I haven't tried this, but that's because in VX the resolution is smaller than XP's, so black borders are placed around the game in fullscreen mode. Since you're using XP, the resolution is 640*480 but since it's using VX scripts, it places the border there. You would have to edit it wherever it does that, assuming it's not in a hidden class or anything.
 
tensuke":tvun2h2h said:
Zarnik":tvun2h2h said:
This is great! It takes everything thats good from vx into xp which is the perfect maker. But I got a question, when in fullscreen there are black borders. And I think that looks cool but when you wanna explore more of the map the character just dissapear into the black frame. Any script fixes to that?

I haven't tried this, but that's because in VX the resolution is smaller than XP's, so black borders are placed around the game in fullscreen mode. Since you're using XP, the resolution is 640*480 but since it's using VX scripts, it places the border there. You would have to edit it wherever it does that, assuming it's not in a hidden class or anything.
maybe you can try shana‘s full screen script ,it can work both xp and vx ..
here’s the url:
http://www.66rpg.com/htm/news616.htm
use this script the game will not run in fullscreen
I think running a rm game in fullscreen looks foolish
the 640*480 script can’t work in some versons of vx
such as 1.03 and 1.02

Maybe i need a transfer
 
When you say "the windowskin will look weird", can this be fixed by just making a VX-style windowskin?

Edit: Also, you mention changing the resolution is possible - how?
Edit2: Found out, but can't the height go above 480? Selwyn's script doesn't work with RGSS2, and it always resizes it down to 640x480 no matter what I type in (if it's bigger).
 
But isnt it possible to make it so that it has the black borders but you cant walk throough them just like in vx?
Cuz I want it fullscreen...
 
I've noticed this gets quite a few game-crashing-with-no-explanation errors.

That I've found:

-Whenever windows are shown
-When teleporting to a new map

Anyone else having trouble with this?
 
Commander Wyatt":10htu5gt said:
When you say "the windowskin will look weird", can this be fixed by just making a VX-style windowskin?

Yah, just look at my above screenshot. Basically, it re-writes the XP windowclass with VX's. I think it's much nicer anyway. It also replaces the font with the VX font.
 
I never had these "game-crashing-with-no-explanation" errors.

The Reason why there's a black border in full screen is because of VX default viewport values.

Code:
class Viewport
  alias dargor_xp_rgss2_viewport_initialize initialize
  def initialize(*args)
    dargor_xp_rgss2_viewport_initialize(0,0,640,480)
  end
end
 
You write :
Code:
#==============================================================================
# ** 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
  alias dargor_vx_player_update update
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    if Input.press?(Input::CTRL) and $TEST
      @through = true
    else
      @through = false
    end
    dargor_vx_player_update
  end

Can't you simply use :
Code:
$TEST = $DEBUG
Easier ?
 
Interesting to know that this can be done.

Any known ways to stop the blur-i-fication of the sprites and tilemap and suchlike? It looks pretty awful with the XP sets, as they're supposed to look sharp and clear (since VX has bigger lines)
Example:
http://img.photobucket.com/albums/v487/ ... S2Blur.jpg[/img]
Blah...Blurry for teh loss and fail.

Still, the 60Fps is pretty awesome. Never seen it that smooth before. I also take it that there isn't an english rgss dll floating around yet. Naturally, this one sets the options screen to Japanese. Ouch. I was also initially confused at the sudden change of the default keys that RGSS2 apparently implements (Its now Z for pressing C...which is unnatural for me, though I suppose it might be useful for left handed people)
 
Nope, this is just the downloaded demo with the tilemap changed to poccils, and the 640x480 viewport fix added in. (I added a couple of trees, to see if they would be affected, and as you can see from the shot, they are)

An standard XP game run isn't affected by this; so I figured its an RGSS2 issue.
 
Dargor":3s27tzq3 said:
Step 2 - Game.exe and DLL
[...]
b) Copy/paste RGSS200J.dll in your game folder and rename it RGSS102E.dll
seems wrong, why not just alter the Library=RGSS102E.dll line in your Game.ini so it reads Library=RGSS200J.dll
 
alexanderpas":lello6xj said:
Dargor":lello6xj said:
Step 2 - Game.exe and DLL
[...]
b) Copy/paste RGSS200J.dll in your game folder and rename it RGSS102E.dll
seems wrong, why not just alter the Library=RGSS102E.dll line in your Game.ini so it reads Library=RGSS200J.dll
I'm thinking that might not be a good plan, because your Copy of RMXP is probably expecting to find RGSS102E. Changing the .ini might work for the final edition of the game; but I don't know if you could edit it. I could be wrong though, you'd just have to try it.
 
eharper256":3ep0bhsk said:
alexanderpas":3ep0bhsk said:
Dargor":3ep0bhsk said:
Step 2 - Game.exe and DLL
[...]
b) Copy/paste RGSS200J.dll in your game folder and rename it RGSS102E.dll
seems wrong, why not just alter the Library=RGSS102E.dll line in your Game.ini so it reads Library=RGSS200J.dll
I'm thinking that might not be a good plan, because your Copy of RMXP is probably expecting to find RGSS102E. Changing the .ini might work for the final edition of the game; but I don't know if you could edit it. I could be wrong though, you'd just have to try it.

I tested the .ini method and it works exactly the same as the rename method. And yes, you can still edit it.

Also, I had problems with poccil's tilemap and now use RTH's. It doesn't give me errors when i make 500x500 maps

Code:
#==============================================================================
# Tilemap
#------------------------------------------------------------------------------
# Author of THIS VERSION: RTH
#==============================================================================

class Tilemap
  
  # Autotile Update Rate
  AUTOTILE_UPDATE = 10
  
  # Autotiles Index (Dont Change these numbers)
  INDEX = [
    [ [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_accessor :ox
  attr_accessor :oy
  attr_accessor :tileset
  attr_accessor :autotiles
  attr_accessor :priorities
  attr_accessor :map_data
  
  def initialize(viewport)
    @viewport = viewport
    @swidth = (@viewport.rect.width / 32)
    @sheight = (@viewport.rect.height / 32)
    @data = nil
    @data_priorities = nil
    @priorities = nil
    @map_data = nil
    @tileset = nil
    @autotiles = []
    @sprites = {}
    @bitmaps = {}
    @cache = {}
    @need_counters = []
    @counter = []
    @max_counters = []
    @ox = 0
    @oy = 0
    @time_counter = 1
    @need_refresh = false
  end
  
  def refresh
    @need_refresh = false
    @table = Table.new(384)
    @size = 0
    @data = @map_data
    @data_priorities = @priorities
    min_x = [@ox / 32 - 1, 0].max
    min_y = [@oy / 32 - 1, 0].max
    max_x = [min_x + @swidth + 1 * 2, @data.xsize - 1].min
    max_y = [min_y + @sheight + 1 * 2, @data.ysize - 1].min
    (min_x..max_x).each {|x|
      (min_y..max_y).each {|y|
        (0..2).each {|z|
          tile_id = @data[x, y, z]
          next if tile_id == 0
          priority = @priorities[tile_id]
          key = [x, y, z, priority]
          @sprites[key] = Sprite.new(@viewport)
          @sprites[key].x = x * 32 - @ox
          @sprites[key].y = y * 32 - @oy
          @sprites[key].z = (y * 32 - @oy) + ((priority + 1) * 32)
          if tile_id < 384
            tile = get_autotile(tile_id)
          else
            tile = get_tile(tile_id)
          end
          @sprites[key].bitmap = tile
        }
      }
    }
  end
  
  def get_autotile(tile_id)
    if tile_id >= 384
      return get_tile(tile_id)
    end
    autotile = @autotiles[(tile_id/48) - 1]
    n = (autotile.width / 96)
    if @bitmaps[tile_id].nil?
      @bitmaps[tile_id] = []
    end
    if n > 1
      if @table[tile_id] == 0
        @counter[tile_id] = 0
        @max_counters[tile_id] = n
        @table[tile_id] = 1
        @size += 1
      end
    end
    for i in 0...n
      @bitmaps[tile_id][i] = get_tile(tile_id, i)
    end
    if @counter[tile_id].nil?
      return @bitmaps[tile_id][0]
    end
    return @bitmaps[tile_id][@counter[tile_id]]
  end
  
  def get_tile(tile_id, c=0)
    key = [tile_id, c]
    if @cache[key].nil?
      @cache[key] = Bitmap.new(32, 32)
      if tile_id < 384
        anim = c * 96
        id = tile_id % 48
        tiles = INDEX[id >> 3][id % 8]
        autotile = @autotiles[(tile_id/48) - 1]
        for i in 0...4
          tile_position = tiles[i] - 1
          rect = Rect.new(tile_position % 6 * 16 + anim, tile_position / 6 * 16, 16, 16)
          @cache[key].blt((i%2) * 16, (i/2) * 16, autotile, rect)
        end
      else
        @cache[key].blt(0, 0, @tileset, Rect.new((tile_id - 384) % 8 * 32, (tile_id - 384) / 8 * 32, 32, 32))
      end
    end
    return @cache[key]
  end
  
  def tileset=(valor)
    for v in @cache.values
      v.dispose
    end
    @cache = {}
    @tileset = valor
    @need_refresh = true
  end
  
  def dispose
    @cache.values.each {|v| v.dispose }
    @cache = {}
    @bitmaps.values.each {|a|
      next if a.nil?
      a.each {|v|
        next if v.nil?
        v.dispose unless v.disposed?
      }
    }
    @sprites.values.each {|sprite|
      next if sprite.nil?
      sprite.dispose
    }
    @sprites = {}
  end
  
  def update
    if @data != @map_data or @priorities != @data_priorities or @need_refresh
      refresh
      return
    end
    min_x = [@ox / 32 - 1, 0].max
    min_y = [@oy / 32 - 1, 0].max
    max_x = [min_x + @swidth + 1 * 2, @data.xsize - 1].min
    max_y = [min_y + @sheight + 1 * 2, @data.ysize - 1].min
    if AUTOTILE_UPDATE > 0
      @time_counter = (@time_counter + 1) % AUTOTILE_UPDATE
    end
    checked = []
    for x in min_x..max_x
      rx = ((x * 32) - @ox)
      cx = (rx < 0 or rx > (@swidth - 32))
      ax = (((rx + 32) < 0) or (rx > @viewport.rect.width))
      for y in min_y..max_y
        ry = ((y * 32) - @oy)
        cy = (ry < 0 or ry > (@sheight - 32))
        ay = (((ry + 32) < 0) or (ry > @viewport.rect.height))
        for z in 0..2
          tile_id = @data[x, y, z]
          next if tile_id == 0
          priority = @priorities[tile_id]
          key = [x, y, z, priority]
          if ay or ax
            if @sprites[key] != nil
              @sprites[key].dispose 
              @sprites[key] = nil
            end
            next
          end
          if @sprites[key].nil?
            @sprites[key] = Sprite.new(@viewport)
            @sprites[key].x = rx
            @sprites[key].y = ry
            @sprites[key].z = ry + ((priority + 1) * 32)
            if tile_id < 384
              tile = get_autotile(tile_id)
            else
              tile = get_tile(tile_id)
            end
            @sprites[key].bitmap = tile
            next
          end
          if @changed_ox or cy
            if @sprites[key].x != rx
              @sprites[key].x = rx
            end
          end
          if @changed_oy or cx
            if @sprites[key].y != ry
              @sprites[key].y = ry
              @sprites[key].z = ry + ((priority + 1) * 32)
            end
          end
          next if (@time_counter != 0)
          if @table[tile_id] == 1
            if checked[tile_id] != true
              @counter[tile_id] = (@counter[tile_id] + 1) % @max_counters[tile_id]
              checked[tile_id] = true
            end
            @sprites[key].bitmap = @bitmaps[tile_id][@counter[tile_id]]
          end
        end
      end
    end 
    if @changed_ox
      @changed_ox = false
    end
    if @changed_oy
      @changed_oy = false
    end
  end
  
  def ox=(valor)
    return if @ox == valor
    @ox = valor
    @changed_ox = true
  end
  
  def oy=(valor)
    return if @oy == valor
    @oy = valor
    @changed_oy = true
  end
  
end

oh, I've made my own template already patched for screen resizing, and 500x500 tilemaps, and it uses RGSS 2.0.2.1 so it has newer patches. I don't think its illegal to provide these files as you get them with the RTP and you don't need to register for that... If it is, just remove the link from my post

rgss2template.zip
 

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