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.

Could anyone take the SDK out of this script?

Ok, so I was looking for a good world map script to go with my game, and I found this script. It's easy to use and easy to include or exclude maps from. Only problem is it contains the SDK which isn't compatible with my scripts, or not all of them at least. Would anyone be able to SDK this script, or explain to me how I would SDK it? Any help is appreciated.
Thanks.
AlphaAO.
Here is the script:
Code:
#===============================================================================

# ** World Map System: Setup Module

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

# Author :   Chaosg1

# Version:   1.0

# Date   :   21-02-07

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

SDK.log('World Map','Chaosg1',1.0, 21-02-07)

SDK.check_requirements(2.0, [1,2])

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

# Begin SDK Enabled Check

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

if SDK.enabled?('World Map')

  FIRST_MAP_ID  = 1

  SIGN    = '•'   #the map name must contain this simbol. in default case *

  #Not Necessary, but when you select a location it can show the locations in the world map.

  WMLocations = {"Forest" => [500,500]}

  class Scene_World_Map < SDK::Scene_Base

    MAP = "World Map"

    KEY  = (Input::A)

    PIXEL_MOVE = 10

    PIXEL_KEY  = 10

    ZOOM_KEY = (Input::CTRL)

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

    # * Object Initialization

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

    def main_variable

      super()

      @map = RPG::Cache.picture(MAP)

      @viewport = Viewport.new(200,0,440,480)

      @sprite = Sprite.new(@viewport)

      @sprite.bitmap = @map

      @sprite.visible = false

      @window_command = Command_Map.new

      @window_title = Window_Title.new

      @viewport_active = false

      @character_window = Window_Charcter.new

      @command   = Window_Command.new(160,["Go to Location", "Check in the map"])

      @command.visible = false

      @command.x = 240

      @command.y = [email=240-@command.height]240-@command.height[/email]/2

    end

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

    # * Object Initialization

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

    def update

      super()

      if @viewport_active != true

        if Input.trigger?(Input::B)

          $game_system.se_play($data_system.cancel_se)

          return $scene = Scene_Map.new 

        end

        @sprite.visible = false

        if @window_command.index == @window_command.commands.size - 1

          if Input.trigger?(Input::C)

            $game_system.se_play($data_system.decision_se)

            @window_command.active = false

            @viewport_active = true

          end

        end

      else

        @sprite.visible = true

        if Input.trigger?(Input::B)

          $game_system.se_play($data_system.cancel_se)

          @window_command.active = true

          return @viewport_active = false 

        end

        pixel = PIXEL_MOVE

        pixel = PIXEL_KEY if Input.press?(KEY)

        #Player Input

        @viewport.ox -= pixel if Input.repeat?(Input::LEFT) or Input.trigger?(Input::LEFT)

        @viewport.ox += pixel if  Input.repeat?(Input::RIGHT) or Input.trigger?(Input::RIGHT)

        if Input.repeat?(Input::UP) or Input.trigger?(Input::UP)

          if Input.press?(ZOOM_KEY)

            @sprite.zoom_x  += 0.1

            @sprite.zoom_y  += 0.1

            @viewport.ox += (@sprite.zoom_x * 10 * @viewport.ox)/100 

            @viewport.oy += (@sprite.zoom_y * 10 * @viewport.oy)/100 

          else  

            @viewport.oy -= pixel

          end

        end

        if Input.repeat?(Input::DOWN) or Input.trigger?(Input::DOWN)

          if Input.press?(ZOOM_KEY)

            @sprite.zoom_x  -= 0.1

            @sprite.zoom_y  -= 0.1

            @viewport.ox -= (@sprite.zoom_x * 10 * @viewport.ox)/100 

            @viewport.oy -= (@sprite.zoom_y * 10 * @viewport.oy)/100 

          else  

            @viewport.oy += pixel

          end

        end

      end

      if @command.visible

        case @command.index

        when 0

        if Input.trigger?(Input::C)

          $game_system.se_play($data_system.decision_se)

          array = $game_system.map_coo[@window_command.commands[@window_command.index]]

          $game_temp.player_transferring = true

          $game_temp.player_new_map_id = array[0]

          $game_temp.player_new_x = array[1]

          $game_temp.player_new_y = array[2]

          $game_temp.player_new_direction = array[3]

          $scene = Scene_Map.new

          # Set transition processing flag

          $game_temp.transition_processing = true

          $game_temp.transition_name = ""

        end

        when 1

          if Input.trigger?(Input::C)

            $game_system.se_play($data_system.decision_se)

            @sprite.zoom_x = @sprite.zoom_y = 1.0

            return if  WMLocations[@window_command.commands[@window_command.index]].nil?

            @sprite.visible  = true

            @viewport_active = true

            @command.visible = false

            @viewport.ox = WMLocations[@window_command.commands[@window_command.index]][0]-210

            @viewport.oy = WMLocations[@window_command.commands[@window_command.index]][1]-240

          end

        end

      elsif Input.trigger?(Input::C) and not @window_command.index == @window_command.commands.size - 1

        $game_system.se_play($data_system.decision_se)

        @window_command.active = false

        @command.active = true

        @command.visible = true

      end          

    end

  end

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

  # ** Game_System

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

  #  This class handles data surrounding the system. Backround music, etc.

  #  is managed here as well. Refer to "$game_system" for the instance of 

  #  this class.

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

  class Game_System

    attr_accessor :visited_maps,:map_coo

    alias cg1_wm_gm_init initialize

    def initialize

      cg1_wm_gm_init

      @visited_maps = []

      @map_coo      = {}

    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

    alias cg1_setup setup

    def setup(map_id)

      cg1_setup(map_id)

      data = load_data("Data/MapInfos.rxdata")

      if @map_id != FIRST_MAP_ID and data[@map_id].location?

        $game_system.visited_maps.push(data[@map_id].name)

        $game_system.map_coo[data[@map_id].name] = [@map_id,$game_temp.player_new_x,$game_temp.player_new_y,$game_player.direction] 

      elsif data[@map_id].location?

        $game_system.visited_maps.push(data[@map_id].name)

        $game_system.map_coo[data[@map_id].name] = [@map_id,$data_system.start_x,$data_system.start_x,2] 

      end

    end

  end

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

  class RPG::MapInfo

    def name 

       return @name.gsub(/#{SIGN.to_s}/) {|a| ""}

    end

    def location?

      return @name.scan(/#{SIGN.to_s}/).size > 0

    end

  end  

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

# Begin SDK Enabled Check

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

  class Command_Map < Window_Command

    attr_accessor :commands

    def initialize

      @commands = nil

      @commands = $game_system.visited_maps|$game_system.visited_maps

      @commands.push("View World Map")

      super(200,@commands)

      self.height = 340

      self.y = 60

    end

  end

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

  class Window_Title < Window_Base

    def initialize

      super(0,0,200,60)

      @text = "Where To:"

      self.contents = Bitmap.new(self.width - 32,self.height - 32)

      cx = self.contents.text_size(@text).width

      cy = self.contents.text_size(@text).height

      x  = (self.width-32)/2 - cx/2

      y  = (self.height-32)/2 - cy/2

      self.contents.draw_text(x,y,cx,cy,@text)

    end

  end

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

  class Window_Charcter < Window_Base

    def initialize

      super(0,400,200,80)

      self.contents = Bitmap.new(self.width-32,self.height-32)

      a = 1

      $game_party.actors.each do |actor|

        return if a > 4

        bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)

        cw = bitmap.width / 4

        ch = bitmap.height / 4

        #x =(self.width-32)/2) * a

        x = a * cw

        y = ch

        draw_actor_graphic(actor,x,y)

        a += 1

        actor = $game_party.actors[a]

      end

    end

  end

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

end

 
 
Here, try this...

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

# ** World Map System: Setup Module

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

# Author :   Chaosg1

# Version:   1.0

# Date   :   21-02-07

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

FIRST_MAP_ID  = 1

SIGN    = '•'   #the map name must contain this simbol. in default case *

#Not Necessary, but when you select a location it can show the locations in the world map.

WMLocations = {"Forest" => [500,500]}

class Scene_World_Map

  MAP = "World Map"

  KEY  = (Input::A)

  PIXEL_MOVE = 10

  PIXEL_KEY  = 10

  ZOOM_KEY = (Input::CTRL)

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

  # * Object Initialization

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

  def main

    super()

    @map = RPG::Cache.picture(MAP)

    @viewport = Viewport.new(200,0,440,480)

    @sprite = Sprite.new(@viewport)

    @sprite.bitmap = @map

    @sprite.visible = false

    @window_command = Command_Map.new

    @window_title = Window_Title.new

    @viewport_active = false

    @character_window = Window_Charcter.new

    @command   = Window_Command.new(160,["Go to Location", "Check in the map"])

    @command.visible = false

    @command.x = 240

    @command.y = [email=240-@command.height]240-@command.height[/email]/2

    # NOTE : Place 'loop do' stuff here

    @map.dispose

    @sprite.dispose

    @window_command.dispose

    @window_title.dispose

    @character_window.dispose

  end

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

  # * Update

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

  def update

    @map.update

    @sprite.update

    @window_command.update

    @window_title.update

    @character_window.update

    if @viewport_active != true

      if Input.trigger?(Input::B)

        $game_system.se_play($data_system.cancel_se)

        return $scene = Scene_Map.new 

      end

      @sprite.visible = false

      if @window_command.index == @window_command.commands.size - 1

        if Input.trigger?(Input::C)

          $game_system.se_play($data_system.decision_se)

          @window_command.active = false

          @viewport_active = true

        end

      end

    else

      @sprite.visible = true

      if Input.trigger?(Input::B)

        $game_system.se_play($data_system.cancel_se)

        @window_command.active = true

        return @viewport_active = false 

      end

      pixel = PIXEL_MOVE

      pixel = PIXEL_KEY if Input.press?(KEY)

      #Player Input

      @viewport.ox -= pixel if Input.repeat?(Input::LEFT) or Input.trigger?(Input::LEFT)

      @viewport.ox += pixel if  Input.repeat?(Input::RIGHT) or Input.trigger?(Input::RIGHT)

      if Input.repeat?(Input::UP) or Input.trigger?(Input::UP)

        if Input.press?(ZOOM_KEY)

          @sprite.zoom_x  += 0.1

          @sprite.zoom_y  += 0.1

          @viewport.ox += (@sprite.zoom_x * 10 * @viewport.ox)/100 

          @viewport.oy += (@sprite.zoom_y * 10 * @viewport.oy)/100 

        else  

          @viewport.oy -= pixel

        end

      end

      if Input.repeat?(Input::DOWN) or Input.trigger?(Input::DOWN)

        if Input.press?(ZOOM_KEY)

          @sprite.zoom_x  -= 0.1

          @sprite.zoom_y  -= 0.1

          @viewport.ox -= (@sprite.zoom_x * 10 * @viewport.ox)/100 

          @viewport.oy -= (@sprite.zoom_y * 10 * @viewport.oy)/100 

        else  

          @viewport.oy += pixel

        end

      end

    end

    if @command.visible

      case @command.index

      when 0

      if Input.trigger?(Input::C)

        $game_system.se_play($data_system.decision_se)

        array = $game_system.map_coo[@window_command.commands[@window_command.index]]

        $game_temp.player_transferring = true

        $game_temp.player_new_map_id = array[0]

        $game_temp.player_new_x = array[1]

        $game_temp.player_new_y = array[2]

        $game_temp.player_new_direction = array[3]

        $scene = Scene_Map.new

        # Set transition processing flag

        $game_temp.transition_processing = true

        $game_temp.transition_name = ""

      end

      when 1

        if Input.trigger?(Input::C)

          $game_system.se_play($data_system.decision_se)

          @sprite.zoom_x = @sprite.zoom_y = 1.0

          return if  WMLocations[@window_command.commands[@window_command.index]].nil?

          @sprite.visible  = true

          @viewport_active = true

          @command.visible = false

          @viewport.ox = WMLocations[@window_command.commands[@window_command.index]][0]-210

          @viewport.oy = WMLocations[@window_command.commands[@window_command.index]][1]-240

        end

      end

    elsif Input.trigger?(Input::C) and not @window_command.index == @window_command.commands.size - 1

      $game_system.se_play($data_system.decision_se)

      @window_command.active = false

      @command.active = true

      @command.visible = true

    end          

  end

end

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

# ** Game_System

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

#  This class handles data surrounding the system. Backround music, etc.

#  is managed here as well. Refer to "$game_system" for the instance of 

#  this class.

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

class Game_System

  attr_accessor :visited_maps,:map_coo

  alias cg1_wm_gm_init initialize

  def initialize

    cg1_wm_gm_init

    @visited_maps = []

    @map_coo      = {}

  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

  alias cg1_setup setup

  def setup(map_id)

    cg1_setup(map_id)

    data = load_data("Data/MapInfos.rxdata")

    if @map_id != FIRST_MAP_ID and data[@map_id].location?

      $game_system.visited_maps.push(data[@map_id].name)

      $game_system.map_coo[data[@map_id].name] = [@map_id,$game_temp.player_new_x,$game_temp.player_new_y,$game_player.direction] 

    elsif data[@map_id].location?

      $game_system.visited_maps.push(data[@map_id].name)

      $game_system.map_coo[data[@map_id].name] = [@map_id,$data_system.start_x,$data_system.start_x,2] 

    end

  end

end

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

class RPG::MapInfo

  def name 

     return @name.gsub(/#{SIGN.to_s}/) {|a| ""}

  end

  def location?

    return @name.scan(/#{SIGN.to_s}/).size > 0

  end

end  

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

# Begin SDK Enabled Check

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

class Command_Map < Window_Command

  attr_accessor :commands

  def initialize

    @commands = nil

    @commands = $game_system.visited_maps|$game_system.visited_maps

    @commands.push("View World Map")

    super(200,@commands)

    self.height = 340

    self.y = 60

  end

end

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

class Window_Title < Window_Base

  def initialize

    super(0,0,200,60)

    @text = "Where To:"

    self.contents = Bitmap.new(self.width - 32,self.height - 32)

    cx = self.contents.text_size(@text).width

    cy = self.contents.text_size(@text).height

    x  = (self.width-32)/2 - cx/2

    y  = (self.height-32)/2 - cy/2

    self.contents.draw_text(x,y,cx,cy,@text)

  end

end

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

class Window_Charcter < Window_Base

  def initialize

    super(0,400,200,80)

    self.contents = Bitmap.new(self.width-32,self.height-32)

    a = 1

    $game_party.actors.each do |actor|

      return if a > 4

      bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)

      cw = bitmap.width / 4

      ch = bitmap.height / 4

      #x =(self.width-32)/2) * a

      x = a * cw

      y = ch

      draw_actor_graphic(actor,x,y)

      a += 1

      actor = $game_party.actors[a]

    end

  end

end

Basically I just removed all SDK-related stuff, and changed the Scene_World_Map. The one thing I didn't do is add the silly 'loop do' that comes in default scenes, so go into a default scene (like Scene_Debug or something) and copy/paste the loop do from that. I commented a line "# NOTE : Place 'loop do' stuff here", paste that silly loop do thing over it.

Good luck :thumb:

PS : Don't let a mod catch you pre-bumping, you're supposed to actually wait 3 days but no big deal ;)
 
Ok, thanks a lot I'll try this and see if it works. Ok, I got an error on line 22 it says the following: Script 'World Map' Line 22 NoMethodError super: no superclass method 'main' Not sure what would cause this.
 
So I am going to be making another game, and this one will be massive in scale. I need this script without the SDK in it because this script will be used for my ship navigation map. Can anyone help me please?
 
Ok Thanks for your post Landarma. I did what you said, and it fixed that problem, but now I get another one it says the following: Scene 'World Map' line 58: NoMethodError occured undefined method 'update' for # <Bitmap:0x39ee308> I have no idea what that means. Did I do something wrong?

Also, would this be possible using events instead of a script? For example, this script automatically updates the places you can go to when you get to a new map. Could I mimic this script using events possibly?
 
Bump. Anyone got a non-SDK version of this script, or know where I can get one similar to this?

Edit: I tried using the SDK version of this script and using the SDK. It worked but caused a ton of problems for my other scripts, mainly events(Which treasure chests and my item creation system rely heavily on). It kept going like I was repeatedly talking to the treasure chest. Just thought I'd add that in there.
 
That line it mentions with the bitmap update can just be deleted. Also a few lines were missing (@command.update and @command.dispose, to handle the "Go to Location"/"Check in the map" command window, and there was a logic error on setting the teleport point in the first map.

[rgss]#===============================================================================
# ** World Map System: Setup Module
#-------------------------------------------------------------------------------
# Author :   Chaosg1
# Version:   1.0
# Date   :   21-02-07
#===============================================================================
FIRST_MAP_ID  = 1
SIGN    = '•'   #the map name must contain this simbol. in default case *
#Not Necessary, but when you select a location it can show the locations in the world map.
WMLocations = {"Forest" => [500,500]}
class Scene_World_Map
  MAP = "World Map"
  KEY  = (Input::A)
  PIXEL_MOVE = 10
  PIXEL_KEY  = 10
  ZOOM_KEY = (Input::CTRL)
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def main
    @map = RPG::Cache.picture(MAP)
    @viewport = Viewport.new(200,0,440,480)
    @sprite = Sprite.new(@viewport)
    @sprite.bitmap = @map
    @sprite.visible = false
    @window_command = Command_Map.new
    @window_title = Window_Title.new
    @viewport_active = false
    @character_window = Window_Charcter.new
    @command   = Window_Command.new(160,["Go to Location", "Check in the map"])
    @command.visible = false
    @command.x = 240
    @command.y = 240-@command.height/2
    # 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
    # Refresh map
    $game_map.refresh
    # Prepare for transition
    Graphics.freeze
    @map.dispose
    @sprite.dispose
    @window_command.dispose
    @window_title.dispose
    @character_window.dispose
    @command.dispose
  end
  #--------------------------------------------------------------------------
  # * Update
  #--------------------------------------------------------------------------
  def update
    @sprite.update
    @window_command.update
    @window_title.update
    @character_window.update
    @command.update if @command.visible
    if @viewport_active != true
      if Input.trigger?(Input::B)
        $game_system.se_play($data_system.cancel_se)
        return $scene = Scene_Map.new
      end
      @sprite.visible = false
      if @window_command.index == @window_command.commands.size - 1
        if Input.trigger?(Input::C)
          $game_system.se_play($data_system.decision_se)
          @window_command.active = false
          @viewport_active = true
        end
      end
    else
      @sprite.visible = true
      if Input.trigger?(Input::B)
        $game_system.se_play($data_system.cancel_se)
        @window_command.active = true
        return @viewport_active = false
      end
      pixel = PIXEL_MOVE
      pixel = PIXEL_KEY if Input.press?(KEY)
      #Player Input
      @viewport.ox -= pixel if Input.repeat?(Input::LEFT) or Input.trigger?(Input::LEFT)
      @viewport.ox += pixel if  Input.repeat?(Input::RIGHT) or Input.trigger?(Input::RIGHT)
      if Input.repeat?(Input::UP) or Input.trigger?(Input::UP)
        if Input.press?(ZOOM_KEY)
          @sprite.zoom_x  += 0.1
          @sprite.zoom_y  += 0.1
          @viewport.ox += (@sprite.zoom_x * 10 * @viewport.ox)/100
          @viewport.oy += (@sprite.zoom_y * 10 * @viewport.oy)/100
        else  
          @viewport.oy -= pixel
        end
      end
      if Input.repeat?(Input::DOWN) or Input.trigger?(Input::DOWN)
        if Input.press?(ZOOM_KEY)
          @sprite.zoom_x  -= 0.1
          @sprite.zoom_y  -= 0.1
          @viewport.ox -= (@sprite.zoom_x * 10 * @viewport.ox)/100
          @viewport.oy -= (@sprite.zoom_y * 10 * @viewport.oy)/100
        else  
          @viewport.oy += pixel
        end
      end
    end
    if @command.visible
      case @command.index
      when 0
      if Input.trigger?(Input::C)
        $game_system.se_play($data_system.decision_se)
        array = $game_system.map_coo[@window_command.commands[@window_command.index]]
        $game_temp.player_transferring = true
        $game_temp.player_new_map_id = array[0]
        $game_temp.player_new_x = array[1]
        $game_temp.player_new_y = array[2]
        $game_temp.player_new_direction = array[3]
        $scene = Scene_Map.new
        # Set transition processing flag
        $game_temp.transition_processing = true
        $game_temp.transition_name = ""
      end
      when 1
        if Input.trigger?(Input::C)
          $game_system.se_play($data_system.decision_se)
          @sprite.zoom_x = @sprite.zoom_y = 1.0
          return if  WMLocations[@window_command.commands[@window_command.index]].nil?
          @sprite.visible  = true
          @viewport_active = true
          @command.visible = false
          @viewport.ox = WMLocations[@window_command.commands[@window_command.index]][0]-210
          @viewport.oy = WMLocations[@window_command.commands[@window_command.index]][1]-240
        end
      end
    elsif Input.trigger?(Input::C) and not @window_command.index == @window_command.commands.size - 1
      $game_system.se_play($data_system.decision_se)
      @window_command.active = false
      @command.active = true
      @command.visible = true
    end          
  end
end
#=============================================================================
# ** Game_System
#-----------------------------------------------------------------------------
#  This class handles data surrounding the system. Backround music, etc.
#  is managed here as well. Refer to "$game_system" for the instance of
#  this class.
#=============================================================================
class Game_System
  attr_accessor :visited_maps,:map_coo
  alias cg1_wm_gm_init initialize
  def initialize
    cg1_wm_gm_init
    @visited_maps = []
    @map_coo      = {}
  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
  alias cg1_setup setup
  def setup(map_id)
    cg1_setup(map_id)
    data = load_data("Data/MapInfos.rxdata")
    if @map_id != FIRST_MAP_ID and data[@map_id].location?
      $game_system.visited_maps.push(data[@map_id].name)
      $game_system.map_coo[data[@map_id].name] = [@map_id,$game_temp.player_new_x,$game_temp.player_new_y,$game_player.direction]
    elsif data[@map_id].location?
      $game_system.visited_maps.push(data[@map_id].name)
      $game_system.map_coo[data[@map_id].name] = [@map_id,$data_system.start_x,$data_system.start_y,2]
    end
  end
end
#-----------------------------------------------------------------------------
class RPG::MapInfo
  def name
     return @name.gsub(/#{SIGN.to_s}/) {|a| ""}
  end
  def location?
    return @name.scan(/#{SIGN.to_s}/).size > 0
  end
end  
#--------------------------------------------------------------------------
# Begin SDK Enabled Check
#--------------------------------------------------------------------------
class Command_Map < Window_Command
  attr_accessor :commands
  def initialize
    @commands = nil
    @commands = $game_system.visited_maps|$game_system.visited_maps
    @commands.push("View World Map")
    super(200,@commands)
    self.height = 340
    self.y = 60
  end
end
#------------------------------------------------------------------------
class Window_Title < Window_Base
  def initialize
    super(0,0,200,60)
    @text = "Where To:"
    self.contents = Bitmap.new(self.width - 32,self.height - 32)
    cx = self.contents.text_size(@text).width
    cy = self.contents.text_size(@text).height
    x  = (self.width-32)/2 - cx/2
    y  = (self.height-32)/2 - cy/2
    self.contents.draw_text(x,y,cx,cy,@text)
  end
end
#------------------------------------------------------------------------
class Window_Charcter < Window_Base
  def initialize
    super(0,400,200,80)
    self.contents = Bitmap.new(self.width-32,self.height-32)
    a = 1
    $game_party.actors.each do |actor|
      return if a > 4
      bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
      cw = bitmap.width / 4
      ch = bitmap.height / 4
      #x =(self.width-32)/2) * a
      x = a * cw
      y = ch
      draw_actor_graphic(actor,x,y)
      a += 1
      actor = $game_party.actors[a]
    end
  end
end
[/rgss]

Should work.
 

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