Interactive World Map Script

Interactive World Map Script Version: 1.0
By: Plague180

This script creates a world map, to not be mistaken with a map.rxdata file, but an interactive world map that allows users to choose what town they would like to travel to and then go there, much like dragon age, guild wars, oblivion or fable 3.

Features:
There are 3 cursor types:
1.Static choices-cursor can only move over towns(example used in demo)
2.Free moving cursor-works like mouse but moves with keyboard
3.Mouse-self explanatory
There are 2 Name types
1. Under cursor
2.Nam Box at top of screen(example used in demo)
Plus tons of other small customizable items

Screenshots
Image

Demo

this isnt the best demo in the world(but it should give you a good idea how all this works) im waiting for graphics/ feed back to make better demo.
http://www.megaupload.com/?d=796VBH7M

Script
lots of code Spoiler
  1. #==============================================================================
  2. # Keyboard Input Module
  3. #----------------------------------------------------------------------------
  4. # Script by Cybersam
  5. #==============================================================================
  6.  
  7. module Input
  8.   @keys = []
  9.   @pressed = []
  10.   Mouse_Left = 1
  11.   Mouse_Right = 2
  12.   Mouse_Middle = 4
  13.   Back= 8
  14.   Tab = 9
  15.   Enter = 13
  16.   Shift = 16
  17.   Ctrl = 17
  18.   Alt = 18
  19.   Esc = 27
  20.   Space = 32
  21.   Numberkeys = {}
  22.   Numberkeys[0] = 48        # => 0
  23.   Numberkeys[1] = 49        # => 1
  24.   Numberkeys[2] = 50        # => 2
  25.   Numberkeys[3] = 51        # => 3
  26.   Numberkeys[4] = 52        # => 4
  27.   Numberkeys[5] = 53        # => 5
  28.   Numberkeys[6] = 54        # => 6
  29.   Numberkeys[7] = 55        # => 7
  30.   Numberkeys[8] = 56        # => 8
  31.   Numberkeys[9] = 57        # => 9
  32.   Numberpad = {}
  33.   Numberpad[0] = 45
  34.   Numberpad[1] = 35
  35.   Numberpad[2] = 40
  36.   Numberpad[3] = 34
  37.   Numberpad[4] = 37
  38.   Numberpad[5] = 12
  39.   Numberpad[6] = 39
  40.   Numberpad[7] = 36
  41.   Numberpad[8] = 38
  42.   Numberpad[9] = 33
  43.   Letters = {}
  44.   Letters["A"] = 65
  45.   Letters["B"] = 66
  46.   Letters["C"] = 67
  47.   Letters["D"] = 68
  48.   Letters["E"] = 69
  49.   Letters["F"] = 70
  50.   Letters["G"] = 71
  51.   Letters["H"] = 72
  52.   Letters["I"] = 73
  53.   Letters["J"] = 74
  54.   Letters["K"] = 75
  55.   Letters["L"] = 76
  56.   Letters["M"] = 77
  57.   Letters["N"] = 78
  58.   Letters["O"] = 79
  59.   Letters["P"] = 80
  60.   Letters["Q"] = 81
  61.   Letters["R"] = 82
  62.   Letters["S"] = 83
  63.   Letters["T"] = 84
  64.   Letters["U"] = 85
  65.   Letters["V"] = 86
  66.   Letters["W"] = 87
  67.   Letters["X"] = 88
  68.   Letters["Y"] = 89
  69.   Letters["Z"] = 90
  70.   Fkeys = {}
  71.   Fkeys[1] = 112
  72.   Fkeys[2] = 113
  73.   Fkeys[3] = 114
  74.   Fkeys[4] = 115
  75.   Fkeys[5] = 116
  76.   Fkeys[6] = 117
  77.   Fkeys[7] = 118
  78.   Fkeys[8] = 119
  79.   Fkeys[9] = 120
  80.   Fkeys[10] = 121
  81.   Fkeys[11] = 122
  82.   Fkeys[12] = 123
  83.   Collon = 186        # => \ |
  84.   Equal = 187         # => = +
  85.   Comma = 188         # => , <
  86.   Underscore = 189    # => - _
  87.   Dot = 190           # => . >
  88.   Backslash = 191     # => / ?
  89.   Lb = 219
  90.   Rb = 221
  91.   Quote = 222         # => '"
  92.   #-------------------------------------------------------------------------------
  93.   USED_KEYS = [Mouse_Left, Mouse_Right, Mouse_Middle]
  94.   #-------------------------------------------------------------------------------
  95.  
  96. module_function
  97.   #--------------------------------------------------------------------------
  98.   def triggered?(key)
  99.     Win32API.new("user32","GetAsyncKeyState",['i'],'i').call(key) & 0x01 == 1
  100.   end
  101.   #--------------------------------------------------------------------------
  102.   def check(key)
  103.     Win32API.new("user32","GetAsyncKeyState",['i'],'i').call(key) & 0x01 == 1
  104.   end
  105.   #--------------------------------------------------------------------------
  106.   def pressed?(key)
  107.     return true unless Win32API.new("user32","GetKeyState",['i'],'i').call(key).between?(0, 1)
  108.     return false
  109.   end
  110.   #--------------------------------------------------------------------------
  111.   def mouse_update
  112.     @used_i = []
  113.     for i in USED_KEYS
  114.       x = check(i)
  115.       if x == true
  116.         @used_i.push(i)
  117.       end
  118.     end
  119.   end
  120.   #--------------------------------------------------------------------------
  121.   def self.C
  122.     self.trigger?(C)
  123.   end
  124.   #--------------------------------------------------------------------------
  125.   def self.B
  126.     self.trigger?(B)
  127.   end
  128.   #--------------------------------------------------------------------------
  129.   def self.A
  130.     self.trigger?(A)
  131.   end
  132.   #--------------------------------------------------------------------------
  133.   def self.Down
  134.     self.trigger?(DOWN)
  135.   end
  136.   #--------------------------------------------------------------------------
  137.   def self.Up
  138.     self.trigger?(UP)
  139.   end
  140.   #--------------------------------------------------------------------------
  141.   def self.Right
  142.     self.trigger?(RIGHT)
  143.   end
  144.   #--------------------------------------------------------------------------
  145.   def self.Left
  146.     self.trigger?(LEFT)
  147.   end
  148.   #--------------------------------------------------------------------------
  149.   def self.Anykey
  150.     if A or B or C or Down or Up or Right or Left
  151.       return true
  152.     else
  153.       return false
  154.     end
  155.   end
  156.   #--------------------------------------------------------------------------
  157. end
  158.  
Expand to see the code.

  1. #-------------------------------------------------------------------------------
  2. # Author    Cybersam
  3. # Version   1.0
  4. # Date      11-04-06
  5. # Edit      Astro_mech
  6. #===============================================================================
  7. module Mouse
  8.   #--------------------------------------------------------------------------
  9.   # * Variable Setup
  10.   #--------------------------------------------------------------------------
  11.   gsm = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')
  12.   @cursor_pos = Win32API.new('user32', 'GetCursorPos', 'p', 'i')
  13.   module_function
  14.   #--------------------------------------------------------------------------
  15.   # * Mouse Global Position
  16.   #--------------------------------------------------------------------------
  17.   def mouse_global_pos
  18.     pos = [0, 0].pack('ll')
  19.     if @cursor_pos.call(pos) != 0
  20.       return pos.unpack('ll')
  21.     else
  22.       return nil
  23.     end
  24.   end
  25.   #--------------------------------------------------------------------------
  26.   # * Mouse Position
  27.   #--------------------------------------------------------------------------
  28.   def mouse_pos(catch_anywhere = false)
  29.     width, height = client_size
  30.     x, y = screen_to_client(*mouse_global_pos)
  31.     return x,y
  32.   end
  33.   #--------------------------------------------------------------------------
  34.   # * Delete
  35.   #--------------------------------------------------------------------------
  36.   def del
  37.     if @oldcursor == nil
  38.       return
  39.     else
  40.       @SetClassLong.call(handel ,-12, @oldcursor)
  41.       @oldcursor = nil
  42.     end
  43.   end
  44. end
  45.  
  46. #--------------------------------------------------------------------------
  47. # * Variable Setup
  48. #--------------------------------------------------------------------------
  49. $scr2cli = Win32API.new('user32', 'ScreenToClient', %w(l p), 'i')
  50. $client_rect = Win32API.new('user32', 'GetClientRect', %w(l p), 'i')
  51. $readini = Win32API.new('kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l')
  52. $findwindow = Win32API.new('user32', 'FindWindowA', %w(p p), 'l')
  53.  
  54. #--------------------------------------------------------------------------
  55. # * Screen to Client
  56. #--------------------------------------------------------------------------
  57. def screen_to_client(x, y)
  58.   return nil unless x and y
  59.   pos = [x, y].pack('ll')
  60.   if $scr2cli.call(hwnd, pos) != 0
  61.     return pos.unpack('ll')
  62.   else
  63.     return nil
  64.   end
  65. end
  66. #--------------------------------------------------------------------------
  67. # * H Windowed
  68. #--------------------------------------------------------------------------
  69. def hwnd
  70.   game_name = "\0" * 256
  71.   $readini.call('Game','Title','',game_name,255,".\\Game.ini")
  72.   game_name.delete!("\0")
  73.   return $findwindow.call('RGSS Player',nil)
  74. end
  75. #--------------------------------------------------------------------------
  76. # * Client Size
  77. #--------------------------------------------------------------------------
  78. def client_size
  79.   rect = [0, 0, 0, 0].pack('l4')
  80.   $client_rect.call(hwnd, rect)
  81.   right, bottom = rect.unpack('l4')[2..3]
  82.   return right, bottom
  83. end
  84.  
Expand to see the code.

  1. cursor = Win32API.new("user32", "ShowCursor", "i", "i" )
  2. cursor.call(0) # hide mouse
  3. #--------------------------------------------------------------------------
  4. class Mouse_Reader
  5.   MOUSE_ICON = "Arrow"         #The default mouse icon.
  6.   CURSOR = Win32API.new("user32", "ShowCursor", "i", "i" )
  7.   #--------------------------------------------------------------------------
  8.   # * Attributes
  9.   #--------------------------------------------------------------------------
  10.   attr_accessor :x
  11.   attr_accessor :y
  12.   #--------------------------------------------------------------------------
  13.   # * Object Initialization
  14.   #--------------------------------------------------------------------------
  15.   def initialize
  16.     @x = 0
  17.     @y = 0
  18.     @sprite = Sprite.new
  19.     @sprite.z = 5000
  20.     @draw = false
  21.     draw
  22.   end
  23.   #--------------------------------------------------------------------------
  24.   # * draw
  25.   #--------------------------------------------------------------------------
  26.   def draw
  27.     @icon = RPG::Cache.icon(MOUSE_ICON)
  28.     @icon_name = MOUSE_ICON
  29.     @sprite.bitmap.dispose if @sprite.bitmap != nil and @sprite.bitmap.disposed?
  30.     @sprite.bitmap = @icon
  31.     @draw = false
  32.     @x, @y = Mouse.mouse_pos
  33.     @sprite.x = @x
  34.     @sprite.y = @y
  35.     @sprite.z = 5000
  36.     @sprite.visible = true
  37.   end
  38.   #--------------------------------------------------------------------------
  39.   # * Update
  40.   #--------------------------------------------------------------------------
  41.   def update
  42.     # Updates the co-ordinates of the icon
  43.     @x, @y = Mouse.mouse_pos
  44.     return if @x == nil or @y == nil
  45.     #Get Client Size
  46.     width,height = Mouse.client_size
  47.     @sprite.x = @x
  48.     @sprite.y = @y
  49.     #Check if needs to restart
  50.     (@draw = (@x < 0 or @y < 0 or @x > width or @y > height)) if !@draw
  51.     #draw if need to draw
  52.     draw if @draw and @x > 1 and @y > 1 and @x < width and @y < height
  53.     #Show mouse if need to
  54.     if (@x < 0 or @y < 0 or @x > width or @y > height) and @visible
  55.       CURSOR.call(1)
  56.       @visible = false
  57.     elsif (@x > 0 or @y > 0 or @x < width or @y < height) and !@visible
  58.       CURSOR.call(0)
  59.       @visible = true
  60.     end
  61.     #Return if Scene is not Scene_Map
  62.     if $scene != $scene.is_a?(Scene_Map)
  63.       return
  64.     end  
  65.   end
  66.   def disable
  67.     @sprite.visible = false
  68.   end  
  69. end
  70.  
Expand to see the code.

  1. #==============================================================================
  2. # ** Data::Object, Map_Items::Town, Sub::Town
  3. #------------------------------------------------------------------------------
  4. #  These classes were created by SephirothSpawn
  5. #==============================================================================
  6. module Map_Items
  7.   Towns = {}
  8. end
  9. module Sub
  10.   Towns = {}
  11. end
  12. class Data::Object
  13.   @@ids = {}
  14.   @@containers = {}
  15.   attr_accessor :id
  16.   def initialize
  17.     @@ids[self.class] = 0 unless @@ids.has_key?(self.class)
  18.     @@ids[self.class] += 1
  19.     @id = @@ids[self.class]
  20.     if @@containers.has_key?(self.class)
  21.       @@containers[self.class][@id] = self
  22.     end
  23.   end
  24.   def self.add_container(class_name, container)
  25.     @@containers[class_name] = container
  26.   end
  27. end
  28. class Map_Items::Town < Data::Object
  29.   Data::Object.add_container(self, Map_Items::Towns)
  30.   attr_reader :screen_x
  31.   attr_reader :screen_y
  32.   attr_reader :map_id
  33.   attr_reader :map_x
  34.   attr_reader :map_y
  35.   attr_reader :direction
  36.   attr_reader :icon
  37.   attr_reader :town_name
  38.   attr_reader :switch
  39.   def initialize(screen_x, screen_y, map_id, map_x, map_y, direction, icon, town_name, switch)
  40.    super()
  41.     @screen_x = screen_x
  42.     @screen_y = screen_y
  43.     @map_id = map_id
  44.     @map_x = map_x
  45.     @map_y = map_y
  46.     @direction = direction
  47.     @icon = icon
  48.     @town_name = town_name
  49.     @switch = switch
  50.   end
  51.   def self.screen_x
  52.     return @screen_x
  53.   end
  54.   def self.screen_y
  55.     return @screen_y
  56.   end
  57.   def self.map_id
  58.     return @map_id
  59.   end
  60.   def self.map_x
  61.     return @map_x
  62.   end
  63.   def self.map_y
  64.     return @map_y
  65.   end
  66.   def self.direction
  67.     return @direction
  68.   end
  69.   def self.icon
  70.     return @icon
  71.   end
  72.   def self.town_name
  73.     return @town_name
  74.   end
  75.   def self.switch
  76.     return @switch
  77.   end
  78. end
  79.  
  80. class Sub::Town < Data::Object
  81.   Data::Object.add_container(self, Sub::Towns)
  82.   attr_reader :screen_x
  83.   attr_reader :screen_y
  84.   attr_reader :map_id
  85.   attr_reader :map_x
  86.   attr_reader :map_y
  87.   attr_reader :direction
  88.   attr_reader :icon
  89.   attr_reader :town_name
  90.   attr_reader :switch
  91.   attr_reader :upper_level
  92.   def initialize(screen_x, screen_y, map_id, map_x, map_y, direction, icon, town_name, switch, upper_level)
  93.    super()
  94.     @screen_x = screen_x
  95.     @screen_y = screen_y
  96.     @map_id = map_id
  97.     @map_x = map_x
  98.     @map_y = map_y
  99.     @direction = direction
  100.     @icon = icon
  101.     @town_name = town_name
  102.     @switch = switch
  103.     @upper_level = upper_level
  104.   end
  105.   def self.screen_x
  106.     return @screen_x
  107.   end
  108.   def self.screen_y
  109.     return @screen_y
  110.   end
  111.   def self.map_id
  112.     return @map_id
  113.   end
  114.   def self.map_x
  115.     return @map_x
  116.   end
  117.   def self.map_y
  118.     return @map_y
  119.   end
  120.   def self.direction
  121.     return @direction
  122.   end
  123.   def self.icon
  124.     return @icon
  125.   end
  126.   def self.town_name
  127.     return @town_name
  128.   end
  129.   def self.switch
  130.     return @switch
  131.   end
  132.   def self.upper_level
  133.     return @upper_level
  134.   end
  135. end
  136. #==============================================================================
  137. # ** Sprite_Cursor
  138. #------------------------------------------------------------------------------
  139. #  This sprite is used to display the cursor for World_Map.
  140. #==============================================================================
  141.  
  142. class Sprite_Cursor < Sprite
  143.  def initialize(viewport = Viewport.new(0, 0, 0, 0))
  144.     super(viewport)
  145.     update
  146.   end
  147.   #--------------------------------------------------------------------------
  148.   # * Dispose
  149.   #--------------------------------------------------------------------------
  150.   def dispose
  151.     if self.bitmap != nil
  152.       self.bitmap.dispose
  153.     end
  154.     super
  155.   end
  156.   #--------------------------------------------------------------------------
  157.   # * Frame Update
  158.   #--------------------------------------------------------------------------
  159.   def update
  160.     super
  161.   end
  162. end
  163. #==============================================================================
  164. # ** Window_Map
  165. #------------------------------------------------------------------------------
  166. #  This window displays the name box for World_Map
  167. #==============================================================================
  168.  
  169. class Window_Map < Window_Base
  170.   #--------------------------------------------------------------------------
  171.   # * Object Initialization
  172.   #--------------------------------------------------------------------------
  173.   def initialize
  174.     super(0, 0, 640, 64)
  175.     self.contents = Bitmap.new(width - 32, height - 32)
  176.     self.z = 2010
  177.     @text = ""
  178.   end
  179.   def text=(text)
  180.     if @text != text
  181.       @text = text
  182.       self.contents.clear
  183.       self.contents.draw_text(0, 0, contents.width, 32, @text, 1)
  184.     end
  185.   end
  186. end
  187.  
Expand to see the code.

  1. #==============================================================================
  2. # ** World_Map Script Settings
  3. #------------------------------------------------------------------------------
  4. #  Script by            :   Plague180
  5. #  Last Update          :   May 27, 2010
  6. #  Version              :   1.0
  7. #  Contact Information  :   plague180(www.hbgames.org)
  8. #  Contact Information  :   [email hidden]
  9. #------------------------------------------------------------------------------  
  10.  
  11. module Map_Items
  12.   # All icons are to be located in your Graphics/Icon folder.
  13.   # All maps are to be located in your Graphics/Pictures folder.
  14.   # All Sub section maps must be named after the town that it is a subsection
  15.   # of. E.g. if the main town is called: "Saar" then the map name must be:
  16.   # "Saar.bmp"
  17.  
  18.   # Icon used for the players current location
  19.   PLAYER_ICON = "player"  
  20.  
  21.   # Icon used for the cursor
  22.   CURSOR = "cursor"    
  23.  
  24.   # Sound effect on move
  25.   MOVE_SE = RPG::AudioFile.new("018-Teleport01", 80)
  26.  
  27.   # Cursor offset type:
  28.   # 1 = Static Choices(cursor can only go where the player can move)
  29.   # 2 = Free Choice(cursor can freely move, like a mouse)
  30.   # 3 = Mouse(do i really need to exsplain?)
  31.   CURSOR_TYPE = 1
  32.  
  33.   # Only for CURSOR_TYPE 2
  34.   # Number of pixels to move per left(down) or right(up) press
  35.   MOVE_PIXEL = 15
  36.  
  37.   # Only for CURSOR_TYPE 2
  38.   # Number of pixels around the icon you can click
  39.   PIXEL_OFFSET = 20
  40.  
  41.   # Name Styles:
  42.   # 1 = Under the cursor
  43.   # 2 = Help window on top of screen
  44.   # 3 = None
  45.   NAME_STYLE = 2
  46.  
  47.   # Only for type NAME_STYLE 2
  48.   # Opacity of Name Window
  49.   NAME_WINDOW_OPACITY = 235
  50.  
  51.   # Show player icon above town?
  52.   SHOW_PLAYER = true
  53.  
  54.   # Number of the text color you want to use
  55.   # Please note that you only need Window_Base(216 Colors) if you want to use a
  56.   # non-default color(or use any other message script u want)
  57.   TOWN_TEXT_COLOR = 211
  58.  
  59.   # Turn fog on and off
  60.   FOG_ON = true
  61.  
  62.   # Graphic used for fog, must be in the Graphics/Fogs Folder
  63.   FOG_GRAPHIC = "001-Fog01"
  64.  
  65.   # Fog Opacity
  66.   FOG_OPACITY = 64
  67.  
  68.   # Fog scroll X
  69.   FOG_SX = 1
  70.  
  71.   # Fog Scroll Y
  72.   FOG_SY = 1
  73.  
  74.   # Fog Blending Type(1=Normal, 2=Add, 3=Subtract)
  75.   FOG_BLEND_TYPE = 1
  76. end
  77. # Setup your towns here
  78. #
  79. # 1 = Screen X coordinate that u want the top left corner of icon to start.
  80. # 2 = Screen Y coordinate that u want the top left corner of icon to start.
  81. # 3 = Map Id player travels to when you click it.
  82. # 4 = Map X coordinate player travels to when you click it.
  83. # 5 = Map Y coordinate player travels to when you click it.
  84. # 6 = Direction(2 = Down, 4 = Left, 6 = Right, 8 = up)
  85. # 7 = Name of icon to use for town.
  86. # 8 = Name of town for name box or under the cursor
  87. # 9 = Switch used to lock and unlock that town.
  88. #
  89. # Example Map_Items::Town.new(screen_x, screen_y, map_id, map_x, map_y, direction
  90. #         icon_name, town_name, switch)
  91. #
  92. # Sub sections are the same as normal maps, with the exception that their
  93. # last item is the name of the town that they are a sub section of.
  94. #
  95. # Example Sub::Town.new(screen_x, screen_y, map_id, map_x, map_y, direction
  96. #         icon_name, town_name, switch, upper_level)
  97. #
  98. # VERY IMPORTANT: Put the towns in the order you want the game to cycle threw
  99. # them. you dont have to unlock them in order, just insert them in the order
  100. # you plan too have them cycle when they all are unlocked.
  101. Map_Items::Town.new(80,130,1,8,4,2,"town3","Saar",1)
  102.     Sub::Town.new(100,80,1,3,8,2,"town3","Shop",8,"Saar")
  103.     Sub::Town.new(380,130,1,18,5,2,"town3","Black Smith",9,"Saar")
  104.     Sub::Town.new(330,340,1,18,14,2,"town3","Home",10,"Saar")
  105. Map_Items::Town.new(150,300,2,6,2,4,"snowtown","Alphian",2)
  106.     Sub::Town.new(120,80,2,16,6,2,"town3","Store",11,"Alphian")
  107.     Sub::Town.new(400,130,2,2,5,2,"town3","Armory",12,"Alphian")
  108.     Sub::Town.new(350,340,2,6,14,2,"town3","House",13,"Alphian")
  109. Map_Items::Town.new(215,370,3,10,3,2,"mountain","Dwarven Mine",3)
  110. Map_Items::Town.new(270,105,4,9,4,2,"castle","Royal Palace",4)      
  111. Map_Items::Town.new(425,340,5,10,5,6,"tower","Tower",5)
  112. Map_Items::Town.new(450,100,6,9,3,2,"ruins","Lost Ruins",6)        
  113. Map_Items::Town.new(520,50,7,10,4,8,"forrest","Elven Forrest",7)
Expand to see the code.

  1. #==============================================================================
  2. # ** Interactive World Map Script
  3. #------------------------------------------------------------------------------
  4. #  Script by            :   Plague180
  5. #  Last Update          :   June 13, 2010
  6. #  Version              :   1.1
  7. #  Contact Information  :   plague180(www.hbgames.org)
  8. #  Contact Information  :   [email hidden]
  9. #------------------------------------------------------------------------------
  10. # * Version History :
  11. # May 27, 2010 - Version 1.0 Initial Release
  12. # June 13, 2010 - Version 1.1 Fixed Bugs with cursor type 2
  13. #------------------------------------------------------------------------------
  14.  
  15. class World_Map < Window_Base
  16.   #--------------------------------------------------------------------------
  17.   # * Object Initialization
  18.   #--------------------------------------------------------------------------
  19.   def initialize(index=$game_map.map_id)
  20.     super(0, 0, 640, 480)
  21.     self.contents = Bitmap.new(640-32, 480-32)
  22.     self.z = 2010
  23.     self.opacity = 0
  24.     @draw_player = true
  25.     @start = index
  26.     @pindex = first_check
  27.     @cursor = Sprite_Cursor.new()
  28.     @cursor.bitmap = RPG::Cache.icon(Map_Items::CURSOR)
  29.     @cursor.z = 2020
  30.     if Map_Items::CURSOR_TYPE == 2
  31.      @cursor.x = Map_Items::Towns[@pindex].screen_x + RPG::Cache.icon(Map_Items::Towns[@pindex].icon).width/4
  32.      @cursor.y = Map_Items::Towns[@pindex].screen_y + RPG::Cache.icon(Map_Items::Towns[@pindex].icon).height
  33.      @cursor.z = 2020
  34.    end  
  35.   if second_check != true
  36.     @draw_player = false
  37.   end  
  38.   refresh
  39.   end
  40.   #--------------------------------------------------------------------------
  41.   # * Return value of @pindex
  42.   #--------------------------------------------------------------------------
  43.   def pindex
  44.     return @pindex
  45.   end  
  46.   #--------------------------------------------------------------------------
  47.   # * Update the value of @pindex so the name box knows what name to disply
  48.   #--------------------------------------------------------------------------
  49.   def update_pindex
  50.     @cursor.x, @cursor.y = Mouse.mouse_pos
  51.   end  
  52.   #--------------------------------------------------------------------------
  53.   # * Set the value of @cursor.x
  54.   #--------------------------------------------------------------------------
  55.   def set_x(set)
  56.     @cursor.x = set
  57.   end
  58.   #--------------------------------------------------------------------------
  59.   # * Set the value of @cursor.x
  60.   #--------------------------------------------------------------------------
  61.   def set_y(set)
  62.     @cursor.y = set
  63.   end
  64.   #--------------------------------------------------------------------------
  65.   # * find map to start on(for cursor)
  66.   #--------------------------------------------------------------------------
  67.   def first_check
  68.     for i in 1...Map_Items::Towns.size+1
  69.       if $game_switches[Map_Items::Towns[i].switch] == true
  70.         return i
  71.       end
  72.     end  
  73.   end
  74.   #--------------------------------------------------------------------------
  75.   # * Check to see if the player is on a valid map(inside of Map_Items::Towns)
  76.   #   (used to determin if the player is on one of the drawable maps)
  77.   #--------------------------------------------------------------------------
  78.   def second_check
  79.     for i in 1...Map_Items::Towns.size+1
  80.       if Map_Items::Towns[i].map_id == $game_map.map_id
  81.         if $game_switches[Map_Items::Towns[i].switch] == true
  82.           return true
  83.         end  
  84.       end  
  85.     end  
  86.   end
  87.   #--------------------------------------------------------------------------
  88.   # * Check for sub sections before moving
  89.   #--------------------------------------------------------------------------
  90.   def check_move(index=0)
  91.       for i in 1...Sub::Towns.size+1
  92.        if Map_Items::CURSOR_TYPE != 1
  93.         if Map_Items::Towns[index].town_name == Sub::Towns[i].upper_level
  94.           if Map_Items::CURSOR_TYPE == 2
  95.              $scene = Scene_Sub_Map.new(Map_Items::Towns[index].town_name)
  96.            end
  97.            if Map_Items::CURSOR_TYPE == 3
  98.              $scene = Scene_Sub_Map.new(Map_Items::Towns[index].town_name)
  99.           end
  100.           return
  101.         end#not type 1
  102.        end
  103.         if Map_Items::CURSOR_TYPE == 1
  104.           if Map_Items::Towns[@pindex].town_name == Sub::Towns[i].upper_level
  105.              $scene = Scene_Sub_Map.new(Map_Items::Towns[@pindex].town_name)
  106.           end  
  107.         end  
  108.       end  
  109.   end
  110.   #--------------------------------------------------------------------------
  111.   # * Move Player To New Map
  112.   #--------------------------------------------------------------------------
  113.   def move(index=0)
  114.       $game_system.se_play(Map_Items::MOVE_SE)
  115.       if Map_Items::CURSOR_TYPE == 1
  116.         index = @pindex
  117.       end
  118.       Audio.bgm_fade(800)
  119.       Audio.bgs_fade(800)
  120.       Audio.me_fade(800)
  121.       $game_temp.player_new_map_id = Map_Items::Towns[index].map_id
  122.       $game_temp.player_new_x = Map_Items::Towns[index].map_x
  123.       $game_temp.player_new_y = Map_Items::Towns[index].map_y
  124.       $game_temp.player_new_direction = Map_Items::Towns[index].direction
  125.       $game_temp.player_transferring = true
  126.       $game_map.autoplay
  127.       $scene = Scene_Map.new
  128.   end
  129.   #--------------------------------------------------------------------------
  130.   # * Check if you can move(and do it if you can)
  131.   #--------------------------------------------------------------------------
  132.   def move_if_can
  133.     for i in 1...Map_Items::Towns.size+1
  134.       if @cursor.x > Map_Items::Towns[i].screen_x-Map_Items::PIXEL_OFFSET && @cursor.x < Map_Items::Towns[i].screen_x + RPG::Cache.icon(Map_Items::Towns[i].icon).width + Map_Items::PIXEL_OFFSET
  135.         if @cursor.y > Map_Items::Towns[i].screen_y-Map_Items::PIXEL_OFFSET && @cursor.y < Map_Items::Towns[i].screen_y + RPG::Cache.icon(Map_Items::Towns[i].icon).height + Map_Items::PIXEL_OFFSET
  136.           check_move(i)
  137.         end
  138.       end
  139.     end  
  140.   end  
  141.   #--------------------------------------------------------------------------
  142.   # * Check if you can click on town, if so show name
  143.   #--------------------------------------------------------------------------
  144.   def check_name
  145.       for i in 1...Map_Items::Towns.size+1
  146.       if @cursor.x > Map_Items::Towns[i].screen_x - Map_Items::PIXEL_OFFSET && @cursor.x < Map_Items::Towns[i].screen_x + RPG::Cache.icon(Map_Items::Towns[i].icon).width + Map_Items::PIXEL_OFFSET
  147.         if @cursor.y > Map_Items::Towns[i].screen_y - Map_Items::PIXEL_OFFSET && @cursor.y < Map_Items::Towns[i].screen_y + RPG::Cache.icon(Map_Items::Towns[i].icon).height + Map_Items::PIXEL_OFFSET
  148.           self.contents.clear
  149.           refresh
  150.           self.contents.font.size = 18
  151.           self.contents.font.color = text_color(Map_Items::TOWN_TEXT_COLOR)
  152.           cx = contents.text_size(Map_Items::Towns[i].town_name).width
  153.           if $game_switches[Map_Items::Towns[i].switch] == true #unlocked?
  154.             self.contents.draw_text(@cursor.x-cx/2,@cursor.y,cx,32,Map_Items::Towns[i].town_name)
  155.           end  
  156.         end
  157.       end
  158.     end
  159.   end  
  160.   #--------------------------------------------------------------------------
  161.   # * Check if you can click on town, if so show name window
  162.   #--------------------------------------------------------------------------
  163.   def check_name_window
  164.       for i in 1...Map_Items::Towns.size+1
  165.       if @cursor.x > Map_Items::Towns[i].screen_x - Map_Items::PIXEL_OFFSET && @cursor.x < Map_Items::Towns[i].screen_x + RPG::Cache.icon(Map_Items::Towns[i].icon).width + Map_Items::PIXEL_OFFSET
  166.         if @cursor.y > Map_Items::Towns[i].screen_y-Map_Items::PIXEL_OFFSET && @cursor.y < Map_Items::Towns[i].screen_y + RPG::Cache.icon(Map_Items::Towns[i].icon).height + Map_Items::PIXEL_OFFSET
  167.           if $game_switches[Map_Items::Towns[i].switch] == true #unlocked?
  168.             return Map_Items::Towns[i].town_name
  169.           end
  170.         end  
  171.       end
  172.     end
  173.     return ""
  174.   end
  175.   #--------------------------------------------------------------------------
  176.   # * Move Cursor Right
  177.   #--------------------------------------------------------------------------
  178.   def move_cursor_right_one
  179.      @cursor.x += Map_Items::MOVE_PIXEL
  180.      refresh
  181.   end
  182.   #--------------------------------------------------------------------------
  183.   # * Move Cursor Left
  184.   #--------------------------------------------------------------------------
  185.   def move_cursor_left_one
  186.      @cursor.x -= Map_Items::MOVE_PIXEL
  187.      refresh
  188.   end
  189.   #--------------------------------------------------------------------------
  190.   # * Move Cursor Up
  191.   #--------------------------------------------------------------------------
  192.   def move_cursor_up_one
  193.      @cursor.y -= Map_Items::MOVE_PIXEL
  194.      refresh
  195.   end
  196.   #--------------------------------------------------------------------------
  197.   # * Move Cursor Down
  198.   #--------------------------------------------------------------------------
  199.   def move_cursor_down_one
  200.      @cursor.y += Map_Items::MOVE_PIXEL
  201.      refresh
  202.   end
  203.   #--------------------------------------------------------------------------
  204.   # * Move Cursor Right
  205.   #--------------------------------------------------------------------------
  206.   def move_cursor_right
  207.       @pindex += 1
  208.       if @pindex > Map_Items::Towns.size
  209.         @pindex = 1
  210.       end
  211.       for i in 1...Map_Items::Towns.size+1
  212.         if $game_switches[Map_Items::Towns[@pindex].switch] == false
  213.           @pindex += 1
  214.           if @pindex > Map_Items::Towns.size
  215.             @pindex = 1
  216.           end
  217.         end
  218.       end
  219.      refresh
  220.    end
  221.   #--------------------------------------------------------------------------
  222.   # * Move Cursor Left
  223.   #--------------------------------------------------------------------------
  224.   def move_cursor_left
  225.       @pindex -= 1
  226.       if @pindex < 1
  227.         @pindex = Map_Items::Towns.size
  228.       end
  229.       for i in 1...Map_Items::Towns.size+1
  230.         if $game_switches[Map_Items::Towns[@pindex].switch] == false
  231.           @pindex -= 1
  232.            if @pindex < 1
  233.              @pindex = Map_Items::Towns.size
  234.            end
  235.         end
  236.       end
  237.       refresh
  238.   end  
  239.   #--------------------------------------------------------------------------
  240.   # * Move Cursor Up
  241.   #--------------------------------------------------------------------------
  242.   def move_cursor_up
  243.       @pindex += 1
  244.       if @pindex > Map_Items::Towns.size
  245.         @pindex = 1
  246.       end
  247.       for i in 1...Map_Items::Towns.size+1
  248.         if $game_switches[Map_Items::Towns[@pindex].switch] == false
  249.           @pindex += 1
  250.           if @pindex > Map_Items::Towns.size
  251.             @pindex = 1
  252.           end
  253.         end
  254.       end
  255.      refresh
  256.   end
  257.   #--------------------------------------------------------------------------
  258.   # * Move Cursor Down
  259.   #--------------------------------------------------------------------------
  260.   def move_cursor_down
  261.       @pindex -= 1
  262.       if @pindex < 1
  263.         @pindex = Map_Items::Towns.size
  264.       end
  265.       for i in 1...Map_Items::Towns.size+1
  266.         if $game_switches[Map_Items::Towns[@pindex].switch] == false
  267.           @pindex -= 1
  268.            if @pindex < 1
  269.              @pindex = Map_Items::Towns.size
  270.            end
  271.         end
  272.       end
  273.       refresh
  274.   end
  275.   #--------------------------------------------------------------------------
  276.   # * Draw Player
  277.   #--------------------------------------------------------------------------  
  278.   def draw_player
  279.       bitmap = RPG::Cache.icon(Map_Items::PLAYER_ICON)
  280.       @player_offset_x = Map_Items::Towns[@start].screen_x - (bitmap.width / 2)
  281.       @player_offset_y = Map_Items::Towns[@start].screen_y - bitmap.height - (RPG::Cache.icon(Map_Items::Towns[@start].icon).height / 2)
  282.       self.contents.blt(@player_offset_x,@player_offset_y, bitmap, Rect.new(0,0,RPG::Cache.icon(Map_Items::PLAYER_ICON).height,RPG::Cache.icon(Map_Items::PLAYER_ICON).width))
  283.   end
  284.   #--------------------------------------------------------------------------
  285.   # * Draw Towns
  286.   #--------------------------------------------------------------------------
  287.   def draw_towns
  288.     for i in 1...Map_Items::Towns.size+1
  289.       if $game_switches[Map_Items::Towns[i].switch] == true
  290.         bitmap = RPG::Cache.icon(Map_Items::Towns[i].icon)
  291.         self.contents.blt(Map_Items::Towns[i].screen_x-(bitmap.width/2), Map_Items::Towns[i].screen_y-(bitmap.height/2), bitmap, Rect.new(0,0,bitmap.width,bitmap.height))
  292.       end
  293.     end
  294.   end
  295.   #--------------------------------------------------------------------------
  296.   # * Draw Cursor
  297.   #--------------------------------------------------------------------------
  298.   def draw_cursor
  299.      if Map_Items::CURSOR_TYPE == 1
  300.         bitmap = @cursor.bitmap
  301.         # IF YOU GET ERROR ON THIS LINE YOU MOST LIKLY HAVE NO TOWNS UNLOCKED
  302.         if $game_switches[Map_Items::Towns[@pindex].switch] == true
  303.           if Map_Items::Towns[@pindex].icon != nil
  304.             x = Map_Items::Towns[@pindex].screen_x - (bitmap.width / 2)
  305.             y = Map_Items::Towns[@pindex].screen_y + (RPG::Cache.icon(Map_Items::Towns[@pindex].icon).height / 2 + 3)
  306.           end
  307.         if Map_Items::Towns[@pindex].icon != nil
  308.           self.contents.blt(x, y, bitmap, Rect.new(0,0,bitmap.height,bitmap.width))
  309.         else
  310.           self.contents.blt(Map_Items::Towns[@pindex].screen_x, Map_Items::Towns[@pindex].screen_y+bitmap.width, bitmap, Rect.new(0,0,bitmap.height,bitmap.width))
  311.         end
  312.         if Map_Items::NAME_STYLE == 1
  313.           self.contents.font.size = 18
  314.           cx = contents.text_size(Map_Items::Towns[@pindex].town_name).width
  315.           x = Map_Items::Towns[@pindex].screen_x+(RPG::Cache.icon(Map_Items::Towns[@pindex].icon).width/2)-cx/2
  316.           self.contents.font.color = text_color(Map_Items::TOWN_TEXT_COLOR)
  317.           self.contents.draw_text(x,y,cx,32,Map_Items::Towns[@pindex].town_name)
  318.         end
  319.        end
  320.       end
  321.       if Map_Items::CURSOR_TYPE == 2
  322.          bitmap = @cursor.bitmap
  323.          self.contents.blt(@cursor.x, @cursor.y, bitmap, Rect.new(0,0,bitmap.height,bitmap.width))
  324.       end  
  325.     end
  326.   #--------------------------------------------------------------------------
  327.   # * Check cursor bounds so it doesnt go off screen
  328.   #--------------------------------------------------------------------------
  329.    def check_cursor_bounds
  330.       if @cursor.x < 0
  331.         @cursor.x = 0
  332.       end
  333.       if @cursor.x > 640 - RPG::Cache.icon(Map_Items::CURSOR).width - 32
  334.         @cursor.x = 640 - RPG::Cache.icon(Map_Items::CURSOR).width - 32
  335.       end  
  336.       if @cursor.y < 0
  337.         @cursor.y = 0
  338.       end
  339.       if @cursor.y > 480 - RPG::Cache.icon(Map_Items::CURSOR).height - 32
  340.         @cursor.y = 480 - RPG::Cache.icon(Map_Items::CURSOR).height - 32
  341.       end
  342.   end
  343.   #--------------------------------------------------------------------------
  344.   # * Refresh
  345.   #--------------------------------------------------------------------------
  346.   def refresh
  347.     self.contents.clear
  348.     check_cursor_bounds
  349.     #draws player
  350.     if Map_Items::SHOW_PLAYER == true
  351.       if @draw_player == true
  352.         draw_player
  353.       end  
  354.     end
  355.     #draws all towns
  356.     draw_towns
  357.     #draw cursor
  358.     draw_cursor
  359.   end
  360. end  
Expand to see the code.

  1. #==============================================================================
  2. # ** Scene_World_Map
  3. #------------------------------------------------------------------------------
  4. #  Script by            :   Plague180
  5. #  Last Update          :   May 27, 2010
  6. #  Version              :   1.0
  7. #  Contact Information  :   plague180(www.hbgames.org)
  8. #  Contact Information  :   [email hidden]
  9. #------------------------------------------------------------------------------
  10. # e.g $scene = Scene_World_Map.new("World_Map.bmp")
  11. #------------------------------------------------------------------------------
  12. class Scene_World_Map
  13.    def initialize(name)
  14.     @name = name.to_s
  15.     @map = Sprite.new
  16.     @map.bitmap = RPG::Cache.picture(@name)
  17.     @map.z = 2000
  18.     if Map_Items::FOG_ON == true
  19.       @fog = Plane.new
  20.       @fog.bitmap = RPG::Cache.fog(Map_Items::FOG_GRAPHIC,0)
  21.       @fog.opacity = Map_Items::FOG_OPACITY
  22.       @fog.blend_type = Map_Items::FOG_BLEND_TYPE
  23.       @fog.z = 2005
  24.     end
  25.     if Map_Items::CURSOR_TYPE == 3
  26.       @mouse = Mouse_Reader.new
  27.     end
  28.   end
  29.   #--------------------------------------------------------------------------
  30.   # * Main Processing
  31.   #--------------------------------------------------------------------------
  32.   def main
  33.     # Make World Map window
  34.     @world_map = World_Map.new()
  35.     # Make town name window
  36.     if Map_Items::NAME_STYLE == 2
  37.       @name_window = Window_Map.new
  38.       @name_window.opacity = Map_Items::NAME_WINDOW_OPACITY
  39.       @name_window.text = Map_Items::Towns[@world_map.pindex].town_name
  40.     end
  41.     # Execute transition
  42.     Graphics.transition
  43.     # Main loop
  44.     loop do
  45.       # Update game screen
  46.       Graphics.update
  47.       # Update input information
  48.       Input.update
  49.       # Frame update
  50.       update
  51.       # Abort loop if screen is changed
  52.       if $scene != self
  53.         if Map_Items::CURSOR_TYPE == 3
  54.           @mouse.disable
  55.         end  
  56.         break
  57.       end
  58.     end
  59.     # Prepare for transition
  60.     Graphics.freeze
  61.     # Dispose of windows
  62.     @world_map.dispose
  63.     @map.dispose
  64.     if Map_Items::FOG_ON == true
  65.       @fog.dispose
  66.     end
  67.     if Map_Items::NAME_STYLE == 2
  68.       @name_window.dispose
  69.     end
  70.   end
  71.   def update
  72.     # Update windows
  73.     @world_map.update
  74.     @map.update
  75.     if Map_Items::CURSOR_TYPE == 3
  76.       @mouse.update
  77.       @world_map.update_pindex
  78.     end
  79.     if Map_Items::FOG_ON == true
  80.       @fog.ox += Map_Items::FOG_SX
  81.       @fog.oy -= Map_Items::FOG_SY
  82.     end
  83.     if Map_Items::NAME_STYLE == 1
  84.       @world_map.check_name
  85.     end  
  86.     if Map_Items::NAME_STYLE == 2
  87.       @name_window.text = Map_Items::Towns[@world_map.pindex].town_name
  88.       @name_window.update
  89.       if Map_Items::CURSOR_TYPE == 2
  90.         @name_window.text = @world_map.check_name_window
  91.         @name_window.update
  92.       end  
  93.       if Map_Items::CURSOR_TYPE == 3
  94.         @name_window.text = @world_map.check_name_window
  95.         @name_window.update
  96.       end
  97.     end
  98.     # If B button was pressed
  99.     if Input.trigger?(Input::B)
  100.       # Return to map
  101.       $scene = Scene_Map.new
  102.       return
  103.     end
  104.     if Input.trigger?(Input::RIGHT)
  105.       # Move the cursor to the right
  106.       if Map_Items::CURSOR_TYPE == 1
  107.         @world_map.move_cursor_right
  108.       end  
  109.       if Map_Items::CURSOR_TYPE == 2
  110.         @world_map.move_cursor_right_one
  111.       end
  112.       return
  113.     end
  114.     # If L button was pressed
  115.     if Input.trigger?(Input::LEFT)
  116.       # Move the cursor to the left
  117.       if Map_Items::CURSOR_TYPE == 1
  118.         @world_map.move_cursor_left
  119.       end
  120.       if Map_Items::CURSOR_TYPE == 2
  121.         @world_map.move_cursor_left_one
  122.       end  
  123.       return
  124.     end
  125.     # If Up button was pressed
  126.     if Input.trigger?(Input::UP)
  127.       # Move the cursor to the left
  128.       if Map_Items::CURSOR_TYPE == 1
  129.         @world_map.move_cursor_up
  130.       end
  131.       if Map_Items::CURSOR_TYPE == 2
  132.         @world_map.move_cursor_up_one
  133.       end  
  134.       return
  135.     end
  136.     # If Down button was pressed
  137.     if Input.trigger?(Input::DOWN)
  138.       # Move the cursor to the left
  139.       if Map_Items::CURSOR_TYPE == 1
  140.         @world_map.move_cursor_down
  141.       end
  142.       if Map_Items::CURSOR_TYPE == 2
  143.         @world_map.move_cursor_down_one
  144.       end  
  145.       return
  146.     end
  147.     if Input.trigger?(Input::C)
  148.         # Switch to item screen
  149.         if Map_Items::CURSOR_TYPE == 1
  150.           @world_map.check_move
  151.         end  
  152.         if Map_Items::CURSOR_TYPE == 2
  153.          @world_map.move_if_can
  154.         end  
  155.     end  
  156.     if Input.triggered?(Input::Mouse_Left)
  157.        @x, @y = Mouse.mouse_pos
  158.        @world_map.set_x(@x)
  159.        @world_map.set_y(@y)
  160.        @world_map.move_if_can
  161.     end  
  162.   end
  163. end
  164.  
Expand to see the code.

  1. #==============================================================================
  2. # ** Sub_Map
  3. #------------------------------------------------------------------------------
  4. #  Script by            :   Plague180
  5. #  Last Update          :   June 13, 2010
  6. #  Version              :   1.0
  7. #  Contact Information  :   plague180(http://www.hbgames.org)
  8. #  Contact Information  :   [email hidden]
  9. #------------------------------------------------------------------------------
  10. # * Version History :
  11. # May 27, 2010 - Version 1.0 Initial Release
  12. #------------------------------------------------------------------------------
  13.  
  14. class Sub_Map < Window_Base
  15.   #--------------------------------------------------------------------------
  16.   # * Object Initialization
  17.   #--------------------------------------------------------------------------
  18.   def initialize(upper)
  19.     super(0, 0, 640, 480)
  20.     self.contents = Bitmap.new(640-32, 480-32)
  21.     self.z = 2010
  22.     self.opacity = 0
  23.     @section = []
  24.     @section[0] = nil#fills spot 0 in array, to fix problem with pindex
  25.     @upper = upper
  26.     @draw_player = true
  27.     @start = $game_map.map_id
  28.     make_section
  29.     @pindex = first_check
  30.     @cursor = Sprite_Cursor.new()
  31.     @cursor.bitmap = RPG::Cache.icon(Map_Items::CURSOR)
  32.     @cursor.z = 2020
  33.     if Map_Items::CURSOR_TYPE == 2
  34.      @cursor.x = Sub::Towns[@pindex].screen_x + RPG::Cache.icon(Sub::Towns[@pindex].icon).width/4
  35.      @cursor.y = Sub::Towns[@pindex].screen_y + RPG::Cache.icon(Sub::Towns[@pindex].icon).height
  36.      @cursor.z = 2020
  37.    end  
  38.   if second_check != true
  39.     @draw_player = false
  40.   end  
  41.  
  42.   refresh
  43. end
  44.    #--------------------------------------------------------------------------
  45.    # * Fill @section for drawing correct sub sections
  46.    #--------------------------------------------------------------------------
  47.    def make_section
  48.      for i in 1...Sub::Towns.size+1
  49.        if Sub::Towns[i].upper_level == @upper
  50.          @section.push(Sub::Towns[i])
  51.        end  
  52.      end  
  53.    end
  54.   #--------------------------------------------------------------------------
  55.   # * Return value of @pindex
  56.   #--------------------------------------------------------------------------
  57.   def pindex
  58.     return @pindex
  59.   end  
  60.   #--------------------------------------------------------------------------
  61.   # * Return @section for name box processing
  62.   #--------------------------------------------------------------------------
  63.   def section
  64.     return @section
  65.   end  
  66.   #--------------------------------------------------------------------------
  67.   # * Update the value of @pindex so the name box knows what name to disply
  68.   #--------------------------------------------------------------------------
  69.   def update_pindex
  70.     @cursor.x, @cursor.y = Mouse.mouse_pos
  71.   end  
  72.   #--------------------------------------------------------------------------
  73.   # * Set the value of @cursor.x
  74.   #--------------------------------------------------------------------------
  75.   def set_x(set)
  76.     @cursor.x = set
  77.   end
  78.   #--------------------------------------------------------------------------
  79.   # * Set the value of @cursor.x
  80.   #--------------------------------------------------------------------------
  81.   def set_y(set)
  82.     @cursor.y = set
  83.   end
  84.   #--------------------------------------------------------------------------
  85.   # * find map to start on(for cursor)
  86.   #--------------------------------------------------------------------------
  87.   def first_check
  88.     for i in 1...@section.size
  89.       if $game_switches[@section[i].switch] == true
  90.         return (i)
  91.       end
  92.     end  
  93.   end
  94.   #--------------------------------------------------------------------------
  95.   # * Check to see if the player is on a valid map(inside of @section)
  96.   #--------------------------------------------------------------------------
  97.   def second_check
  98.     for i in 1...@section.size
  99.       if @section[i].map_id == $game_map.map_id
  100.         if $game_switches[@section[i].switch] == true
  101.           return true
  102.         end  
  103.       end  
  104.     end  
  105.   end
  106.   #--------------------------------------------------------------------------
  107.   # * Move Player To New Map
  108.   #--------------------------------------------------------------------------
  109.   def move(index=0)
  110.       $game_system.se_play(Map_Items::MOVE_SE)
  111.       if Map_Items::CURSOR_TYPE == 1
  112.         index = @pindex
  113.       end
  114.       Audio.bgm_fade(800)
  115.       Audio.bgs_fade(800)
  116.       Audio.me_fade(800)
  117.       $game_temp.player_new_map_id = @section[index].map_id
  118.       $game_temp.player_new_x = @section[index].map_x
  119.       $game_temp.player_new_y = @section[index].map_y
  120.       $game_temp.player_new_direction = @section[index].direction
  121.       $game_temp.player_transferring = true
  122.       $game_map.autoplay
  123.       $scene = Scene_Map.new
  124.   end
  125.   #--------------------------------------------------------------------------
  126.   # * Check if can move(and do it if you can)
  127.   #--------------------------------------------------------------------------
  128.   def move_if_can
  129.     for i in 1...@section.size
  130.       if @cursor.x > @section[i].screen_x-Map_Items::PIXEL_OFFSET && @cursor.x < @section[i].screen_x + RPG::Cache.icon(@section[i].icon).width + Map_Items::PIXEL_OFFSET
  131.         if @cursor.y > @section[i].screen_y-Map_Items::PIXEL_OFFSET && @cursor.y < @section[i].screen_y + RPG::Cache.icon(@section[i].icon).height + Map_Items::PIXEL_OFFSET
  132.           move(i)
  133.         end
  134.       end
  135.     end  
  136.   end  
  137.   #--------------------------------------------------------------------------
  138.   # * Check if you can click on town, if so show name
  139.   #--------------------------------------------------------------------------
  140.   def check_name
  141.       for i in 1...@section.size
  142.       if @cursor.x > @section[i].screen_x - Map_Items::PIXEL_OFFSET && @cursor.x < @section[i].screen_x + RPG::Cache.icon(@section[i].icon).width + Map_Items::PIXEL_OFFSET
  143.         if @cursor.y > @section[i].screen_y - Map_Items::PIXEL_OFFSET && @cursor.y < @section[i].screen_y + RPG::Cache.icon(@section[i].icon).height + Map_Items::PIXEL_OFFSET
  144.           self.contents.clear
  145.           refresh
  146.           self.contents.font.size = 18
  147.           self.contents.font.color = text_color(Map_Items::TOWN_TEXT_COLOR)
  148.           cx = contents.text_size(@section[i].town_name).width
  149.           if $game_switches[@section[i].switch] == true #unlocked?
  150.             self.contents.draw_text(@cursor.x-cx/2,@cursor.y,cx,32,@section[i].town_name)
  151.           end  
  152.         end
  153.       end
  154.     end
  155.   end  
  156.   #--------------------------------------------------------------------------
  157.   # * Check if you can click on town, if so show name window
  158.   #--------------------------------------------------------------------------
  159.   def check_name_window
  160.     for i in 1...@section.size
  161.       if @cursor.x > @section[i].screen_x - Map_Items::PIXEL_OFFSET && @cursor.x < @section[i].screen_x + RPG::Cache.icon(@section[i].icon).width + Map_Items::PIXEL_OFFSET
  162.         if @cursor.y > @section[i].screen_y-Map_Items::PIXEL_OFFSET && @cursor.y < @section[i].screen_y + RPG::Cache.icon(@section[i].icon).height + Map_Items::PIXEL_OFFSET
  163.           if $game_switches[@section[i].switch] == true #unlocked?
  164.             return @section[i].town_name
  165.           end
  166.         end  
  167.       end
  168.     end
  169.     return ""
  170.   end
  171.   #--------------------------------------------------------------------------
  172.   # * Move Cursor Right
  173.   #--------------------------------------------------------------------------
  174.   def move_cursor_right_one
  175.      @cursor.x += Map_Items::MOVE_PIXEL
  176.      refresh
  177.   end
  178.   #--------------------------------------------------------------------------
  179.   # * Move Cursor Left
  180.   #--------------------------------------------------------------------------
  181.   def move_cursor_left_one
  182.      @cursor.x -= Map_Items::MOVE_PIXEL
  183.      refresh
  184.   end
  185.   #--------------------------------------------------------------------------
  186.   # * Move Cursor Up
  187.   #--------------------------------------------------------------------------
  188.   def move_cursor_up_one
  189.      @cursor.y -= Map_Items::MOVE_PIXEL
  190.      refresh
  191.   end
  192.   #--------------------------------------------------------------------------
  193.   # * Move Cursor Down
  194.   #--------------------------------------------------------------------------
  195.   def move_cursor_down_one
  196.      @cursor.y += Map_Items::MOVE_PIXEL
  197.      refresh
  198.   end
  199.   #--------------------------------------------------------------------------
  200.   # * Move Cursor Right
  201.   #--------------------------------------------------------------------------
  202.   def move_cursor_right
  203.       @pindex += 1
  204.       if @pindex > @section.size-1
  205.         @pindex = 1
  206.       end
  207.       for i in 1...@section.size
  208.         if $game_switches[@section[@pindex].switch] == false
  209.           @pindex += 1
  210.           if @pindex > @section.size-1
  211.             @pindex = 1
  212.           end
  213.         end
  214.       end
  215.      refresh
  216.    end
  217.   #--------------------------------------------------------------------------
  218.   # * Move Cursor Left
  219.   #--------------------------------------------------------------------------
  220.   def move_cursor_left
  221.       @pindex -= 1
  222.       if @pindex < 1
  223.         @pindex = @section.size-1
  224.       end
  225.       for i in 1...@section.size
  226.         if $game_switches[@section[@pindex].switch] == false
  227.           @pindex -= 1
  228.            if @pindex < 1
  229.              @pindex = @section.size-1
  230.            end
  231.         end
  232.       end
  233.       refresh
  234.   end  
  235.   #--------------------------------------------------------------------------
  236.   # * Move Cursor Up
  237.   #--------------------------------------------------------------------------
  238.   def move_cursor_up
  239.       @pindex += 1
  240.       if @pindex > @section.size-1
  241.         @pindex = 1
  242.       end
  243.       for i in 1...@section.size
  244.         if $game_switches[@section[@pindex].switch] == false
  245.           @pindex += 1
  246.           if @pindex > @section.size-1
  247.             @pindex = 1
  248.           end
  249.         end
  250.       end
  251.      refresh
  252.   end
  253.   #--------------------------------------------------------------------------
  254.   # * Move Cursor Down
  255.   #--------------------------------------------------------------------------
  256.   def move_cursor_down
  257.       @pindex -= 1
  258.       if @pindex < 1
  259.         @pindex = @section.size-1
  260.       end
  261.       for i in 1...@section.size
  262.         if $game_switches[@section[@pindex].switch] == false
  263.           @pindex -= 1
  264.            if @pindex < 1
  265.              @pindex = @section.size-1
  266.            end
  267.         end
  268.       end
  269.       refresh
  270.   end
  271.   #--------------------------------------------------------------------------
  272.   # * Draw Player
  273.   #--------------------------------------------------------------------------  
  274.   def draw_player
  275.       bitmap = RPG::Cache.icon(Map_Items::PLAYER_ICON)
  276.       @player_offset_x = @section[@start].screen_x - (bitmap.width / 2)
  277.       @player_offset_y = @section[@start].screen_y - bitmap.height - (RPG::Cache.icon(@section[@start].icon).height / 2)
  278.       self.contents.blt(@player_offset_x,@player_offset_y, bitmap, Rect.new(0,0,RPG::Cache.icon(Map_Items::PLAYER_ICON).height,RPG::Cache.icon(Map_Items::PLAYER_ICON).width))
  279.   end
  280.   #--------------------------------------------------------------------------
  281.   # * Draw Towns
  282.   #--------------------------------------------------------------------------
  283.   def draw_towns
  284.     for i in 1...@section.size
  285.       if $game_switches[@section[i].switch] == true #unlocked?
  286.         bitmap = RPG::Cache.icon(@section[i].icon)
  287.         self.contents.blt(@section[i].screen_x-(bitmap.width/2), @section[i].screen_y-(bitmap.height/2), bitmap, Rect.new(0,0,bitmap.width,bitmap.height))
  288.       end
  289.     end
  290.   end
  291.   #--------------------------------------------------------------------------
  292.   # * Draw Cursor
  293.   #--------------------------------------------------------------------------
  294.   def draw_cursor
  295.      if Map_Items::CURSOR_TYPE == 1
  296.         bitmap = @cursor.bitmap
  297.         # IF YOU GET ERROR ON THIS LINE YOU MOST LIKLY HAVE NO sub sections UNLOCKED
  298.         if $game_switches[@section[@pindex].switch] == true
  299.           if @section[@pindex].icon != nil
  300.             x = @section[@pindex].screen_x - (bitmap.width / 2)
  301.             y = @section[@pindex].screen_y + (RPG::Cache.icon(@section[@pindex].icon).height / 2 + 3)
  302.           end
  303.         if @section[@pindex].icon != nil
  304.           self.contents.blt(x, y, bitmap, Rect.new(0,0,bitmap.height,bitmap.width))
  305.         else
  306.           self.contents.blt(@section[@pindex].screen_x, @section[@pindex].screen_y+bitmap.width, bitmap, Rect.new(0,0,bitmap.height,bitmap.width))
  307.         end
  308.         if Map_Items::NAME_STYLE == 1
  309.           self.contents.font.size = 18
  310.           cx = contents.text_size(@section[@pindex].town_name).width
  311.           x = @section[@pindex].screen_x+(RPG::Cache.icon(@section[@pindex].icon).width/2)-cx/2
  312.           self.contents.font.color = text_color(Map_Items::TOWN_TEXT_COLOR)
  313.           self.contents.draw_text(x,y,cx,32,@section[@pindex].town_name)
  314.         end
  315.        end
  316.       end
  317.       if Map_Items::CURSOR_TYPE == 2
  318.          bitmap = @cursor.bitmap
  319.          self.contents.blt(@cursor.x, @cursor.y, bitmap, Rect.new(0,0,bitmap.height,bitmap.width))
  320.       end    
  321.     end
  322.   #--------------------------------------------------------------------------
  323.   # * Check cursor bounds so it doesnt go off screen
  324.   #--------------------------------------------------------------------------
  325.   def check_cursor_bounds
  326.     @cursor.x = [[@cursor.x, 0].max, 640].min
  327.     @cursor.y = [[@cursor.y, 0].max, 480].min
  328.   end  
  329.   #--------------------------------------------------------------------------
  330.   # * Refresh
  331.   #--------------------------------------------------------------------------
  332.   def refresh
  333.     self.contents.clear
  334.     check_cursor_bounds
  335.     #draws player
  336.     if Map_Items::SHOW_PLAYER == true
  337.       if @draw_player == true
  338.         draw_player
  339.       end  
  340.     end
  341.     #draws all towns
  342.     draw_towns
  343.     #draw cursor
  344.     draw_cursor
  345.   end
  346. end #class
Expand to see the code.

  1. #==============================================================================
  2. # ** Scene_Sub_Map
  3. #------------------------------------------------------------------------------
  4. #  Script by            :   Plague180
  5. #  Last Update          :   May 27, 2010
  6. #  Version              :   1.0
  7. #  Contact Information  :   plague180(www.hbgames.org)
  8. #  Contact Information  :   [email hidden]
  9. #------------------------------------------------------------------------------
  10. # e.g $scene = Scene_Sub_Map.new("Saar.bmp")
  11. class Scene_Sub_Map
  12.    def initialize(name)
  13.     @name = name.to_s
  14.     @map = Sprite.new
  15.     @map.bitmap = RPG::Cache.picture(@name)
  16.     @map.z = 2000
  17.     if Map_Items::CURSOR_TYPE == 3
  18.       @mouse = Mouse_Reader.new
  19.     end
  20.   end
  21.   #--------------------------------------------------------------------------
  22.   # * Main Processing
  23.   #--------------------------------------------------------------------------
  24.   def main
  25.     # Make world Map window
  26.     @world_map = Sub_Map.new(@name)
  27.     # Make town name window
  28.     if Map_Items::NAME_STYLE == 2
  29.       @name_window = Window_Map.new
  30.       @name_window.opacity = Map_Items::NAME_WINDOW_OPACITY
  31.       @section = @world_map.section
  32.       @name_window.text = @section[@world_map.pindex].town_name
  33.     end
  34.     # Execute transition
  35.     Graphics.transition
  36.     # Main loop
  37.     loop do
  38.       # Update game screen
  39.       Graphics.update
  40.       # Update input information
  41.       Input.update
  42.       # Frame update
  43.       update
  44.       # Abort loop if screen is changed
  45.       if $scene != self
  46.         if Map_Items::CURSOR_TYPE == 3
  47.           @mouse.disable
  48.         end
  49.         break
  50.       end
  51.     end
  52.     # Prepare for transition
  53.     Graphics.freeze
  54.     # Dispose of windows
  55.     @world_map.dispose
  56.     @map.dispose
  57.     if Map_Items::NAME_STYLE == 2
  58.       @name_window.dispose
  59.     end
  60.   end
  61.   def update
  62.     # Update windows
  63.     @world_map.update
  64.     @map.update
  65.     if Map_Items::CURSOR_TYPE == 3
  66.       @mouse.update
  67.       @world_map.update_pindex
  68.     end
  69.     if Map_Items::NAME_STYLE == 1
  70.       @world_map.check_name
  71.     end  
  72.     if Map_Items::NAME_STYLE == 2
  73.       @name_window.text = @section[@world_map.pindex].town_name
  74.       @name_window.update
  75.       if Map_Items::CURSOR_TYPE == 2
  76.         @name_window.text = @world_map.check_name_window
  77.         @name_window.update
  78.       end  
  79.       if Map_Items::CURSOR_TYPE == 3
  80.         @name_window.text = @world_map.check_name_window
  81.         @name_window.update
  82.       end  
  83.     end
  84.     # If B button was pressed
  85.     if Input.trigger?(Input::B)
  86.       # Return to map
  87.       $scene = Scene_Map.new
  88.       return
  89.     end
  90.     if Input.trigger?(Input::RIGHT)
  91.       # Move the cursor to the right
  92.       if Map_Items::CURSOR_TYPE == 1
  93.         @world_map.move_cursor_right
  94.       end  
  95.       if Map_Items::CURSOR_TYPE == 2
  96.         @world_map.move_cursor_right_one
  97.       end
  98.       return
  99.     end
  100.     # If L button was pressed
  101.     if Input.trigger?(Input::LEFT)
  102.       # Move the cursor to the left
  103.       if Map_Items::CURSOR_TYPE == 1
  104.         @world_map.move_cursor_left
  105.       end
  106.       if Map_Items::CURSOR_TYPE == 2
  107.         @world_map.move_cursor_left_one
  108.       end  
  109.       return
  110.     end
  111.     # If Up button was pressed
  112.     if Input.trigger?(Input::UP)
  113.       # Move the cursor to the left
  114.       if Map_Items::CURSOR_TYPE == 1
  115.         @world_map.move_cursor_up
  116.       end
  117.       if Map_Items::CURSOR_TYPE == 2
  118.         @world_map.move_cursor_up_one
  119.       end  
  120.       return
  121.     end
  122.     # If Down button was pressed
  123.     if Input.trigger?(Input::DOWN)
  124.       # Move the cursor to the left
  125.       if Map_Items::CURSOR_TYPE == 1
  126.         @world_map.move_cursor_down
  127.       end
  128.       if Map_Items::CURSOR_TYPE == 2
  129.         @world_map.move_cursor_down_one
  130.       end  
  131.       return
  132.     end
  133.     if Input.trigger?(Input::C)
  134.         # Switch to item screen
  135.         if Map_Items::CURSOR_TYPE == 1
  136.           @world_map.move
  137.         end  
  138.         if Map_Items::CURSOR_TYPE == 2
  139.          @world_map.move_if_can
  140.         end  
  141.     end  
  142.     if Input.triggered?(Input::Mouse_Left)
  143.        @x, @y = Mouse.mouse_pos
  144.        @world_map.set_x(@x)
  145.        @world_map.set_y(@y)
  146.        @world_map.move_if_can
  147.     end
  148.   end
  149. end
  150.  
Expand to see the code.

Instructions

Content Hidden Spoiler
1 = Screen X coordinate that u want the top left corner of icon to start.
2 = Screen Y coordinate that u want the top left corner of icon to start.
3 = Map Id player travels to when you click it.
4 = Map X coordinate player travels to when you click it.
5 = Map Y coordinate player travels to when you click it.
6 = Direction(2 = Down, 4 = Left, 6 = Right, 8 = up)
7 = Name of icon to use for town.
8 = Name of town for name box or under the cursor
9 = Switch used to lock and unlock that town.

Example Map_Items::Town.new(screen_x, screen_y, map_id, map_x, map_y, direction
icon_name, town_name, switch)

Sub sections are the same as normal maps, with the exception that their
last item is the name of the town that they are a sub section of.

Example Sub::Town.new(screen_x, screen_y, map_id, map_x, map_y, direction
icon_name, town_name, switch, upper_level)

VERY IMPORTANT: Put the towns in the order you want the game to cycle threw
them. you dont have to unlock them in order, just insert them in the order
you plan too have them cycle when they all are unlocked.


FAQ

Q: I get an error on line 305 in world_map, what wrong?
A: You don't have any towns UNLOCKED yet.

Q:I get an error on line 299 in sub_map, what wrong?
A: You don't have any sub sections for that town unlocked UNLOCKED. Shouldn't ever have an issue here because if there is no subsection it is sapose to go straight to the default, but one person did get this error.

Compatibility

Haven't tested it with anything out side of my other custom scripts, but if you have a mouse system it might clash with this(if u use my mouse, but if u dont then it might not accept your clicks)

Credits and Thanks

SephirothSpawn - Created Data Structure
CyberSam - Keyboard Input Module
CyberSam - Mouse Module
Mr.Mo - Error Log
Tomas - World Map Background
Special Thanks to Silver Wind for all his help with my Sub Sections
Special Thanks to SephirothSpawn for all his support coding and moral, Thanks man!

Author's Notes

I work alot, but i will help you with any problems asap.
if you have a game that uses my script i would love to see what my script can do with good graphics :)

Terms and Conditions

I do not what this script hosted anywhere other then http://www.hbgames.org with out my permission. free for use commercial and noncommercial.
i live in bahrain and my internet really sucks today, every time i try to submit with the code it times out, so i cant post it atm, it is in demo though. let me know any other feed back :)
Looking good; this was one of my favourite features of Guild Wars I reckon, being able to zip about to places you've been to before.
good point :) i shall add that to my list of examples
Plague180 wrote:
FAQ

Q: I get an error on line 305 in world_map, what wrong?
A: You don't have any towns UNLOCKED yet.

Q:I get an error on line 299 in sub_map, what wrong?
A: You don't have any sub sections for that town unlocked UNLOCKED. Shouldn't ever have an issue here because if there is no subsection it is sapose to go straight to the default, but one person did get this error.

This pretty much sounds like you blame everything on the player :/ If it's possible to have an empty array of towns, then by all means don't ignore that while scripting.

Other than that, I see a well-coded script right here 😀 You have a few non-broken-where-they-should-be-broken-for-viewability lines in there (note that you can break lines without messing up your script more than one time!), and I see the dreadful customization class full of pointless constants, but other than that: Clean coding, very good documentation. I think you're coming along good!
Oh, I also spotted self.contents = Bitmap.new(640-32, 480-32)... forcing the Interpreter to do a totally pointless calculation is... neither efficient nor smart ^^"

As a side note, I think your check_cursor_bounds method is broken... shouldn't it be...
  1.  def check_cursor_bounds
  2.      if @cursor.x < 0
  3.        @cursor.x = 0
  4.      end
  5.      if @cursor.x > 640 - RPG::Cache.icon(Map_Items::CURSOR).width
  6.        @cursor.x = 640 - RPG::Cache.icon(Map_Items::CURSOR).width
  7.      end
  8.      if @cursor.y < 0
  9.        @cursor.y = 0
  10.      end
  11.      if @cursor.y > 480 - RPG::Cache.icon(Map_Items::CURSOR).height
  12.        @cursor.y = 480 - RPG::Cache.icon(Map_Items::CURSOR).height
  13.      end
  14.   end
Expand to see the code.


And a general suggestion: Having icons on the map displayed from the center instead of the upper-left corner makes more sense, considering you're trying to populate a map. It also allows you to change the icon size at whichever time during develoment without messing up the placement on the map.

Keep up the good work!
about my faqs, i wasnt sure what to make the script do if there is no maps, so i made it do nothing, i mean whats the point of letting the player open the map if there is no where to go? it is for travel not for viewing(tho i guess with some customizing it they could make it...)

i know you hate constants, but i like the current set up(will see what other people say)

once i have some bugs to fix i will edit the long lines too :)

i forgot to remove the -32 lol i meant to, i was just making sure it was right :)

you are correct about the cursor bounds check(even tho i dont think anyone will use cursor type 2)

Quote:
And a general suggestion: Having icons on the map displayed from the center instead of the upper-left corner makes more sense, considering you're trying to populate a map. It also allows you to change the icon size at whichever time during development without messing up the placement on the map.

i dont get what you mean?
Plague180 wrote:
you are correct about the cursor bounds check(even tho i dont think anyone will use cursor type 2)
I like how that proves me right in everything I ever said about overcustomizeable scripts and, in a looser range, too many constants ^^

Plague180 wrote:
Quote:
And a general suggestion: Having icons on the map displayed from the center instead of the upper-left corner makes more sense, considering you're trying to populate a map. It also allows you to change the icon size at whichever time during development without messing up the placement on the map.

i dont get what you mean?
Well, right now, you're drawing icons on the map, obviously decided by x and y coordinates, from the top left corner. You could, however, draw them from the center (as in icon_x = x + (icon-width/2), and the same for y) to get the benefits I was talking about before.
oh i see, shall work on that tmw :) lots of code to change..and im going to bed
Really? :huh:
You should just have to change the two lines I mentioned...
upon trying it your way i remembered why i used it my way, the cursor was going off screen some(32 pixels) so i added the minus 32. it works correct the way i had it. also you were trying to use my cursor type 2 against me and my beloved constants, you cant do that the only reason i kept the feature is because i made it before i had decided to make the mouse work for it. so ha :P silly blue and his constant-hateness(im still willing to see your side if you can give me an good example how losing the constants will help me). i changed the draw_town method to your suggestion and i now see how it would be useful to developers. but now i have to change draw_player and draw_cursor, and sadly i must go to work, but as soon as i get home i will fix the code and post new version :)
Btw, now that I see it, and before I forget it: Awesome user title, awesome signature ^^

As for the cursor, your minimum x (assuming you draw from the upper left corner) needs to be zero, while the max needs to be Window.width (speaking figuratively), in numbers 640. So yeah, I was wrong, but only because I didn't think and double-check what I was writing again ^^"

On a side note, a pretty faster way of writing your method would be this:
  1.   def check_cursor_bounds
  2.     p RPG::Cache.icon(Map_Items::CURSOR).width.to_s + ', ' + RPG::Cache.icon(Map_Items::CURSOR).height # ready-made testing line for you ^^
  3.     @cursor.x = [[@cursor.x, 0].max, 640].min
  4.     @cursor.y = [[@cursor.y, 0].max, 480].min
  5.   end
Expand to see the code.
i love your rant!!! <3 and when i get home i will look at the code u post in game, looks sound to me :) i like the added test line :) i do that alot!!!! exp with this script to extract the x and y passed into a method


edit:upon playing with that code i couldnt get it to do what i wanted, and my code is easier to read so i think im gonna stick with mine for now. now im gonna go work on changing draw_player and draw_cursor
I think you should work with the second cursor option, because I feel that having to switch from full keyboard control to using the mouse can break immersion (and even more so for those kids who use gamepads, who will have to set down their controller to operate the world map.
i am working on option2 since it seems to be the only only having issues atm
i have been really busy cause of work(im in the navy) but i have the 10th off, i shall try to fix the last few known bugs and release update then, 200 some odd views, and no comments, i just want to know if its a good system or a bad system, and anything else i could do to make it better, (can all ready hear blue's wheels turning) and is anyone having trouble with the mouse?
fixed cursor type 2, however my home computer cant connect to the internet for some reason :( has anyone found any other bugs? or any comments on the system?
ok, i know its late, but i finally updated demo, i tried to play test as much as i could, no problems that i could find, but you guys let me know if u find some. i have an idea for a easy editor so you dont even have to script to set up towns, if i get some time ill make it :)

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