Falcao Minimap Set 1.1 RMXP

Falcao Minimap Set 1.1

Introduction

This script allow you to display a set of minimaps where the player can teleport or just display a minimap of your current location, also display events locations on minimpas such as chest, npc etc.

Features

- Display a minimap of the player current location
- Allow to save minimaps and then teleport
- Display player location on the minimap
- Display exact location of events on mainimaps
- Support a second index called dungeon
- Allow you to hide your current location wherever you want
- Easy to use

Instructions

Copy and paste the script above main.

Press 'ALT' button to call the script, but it can be called manually using the following command: $scene = Teletrans.new
All commands are on the script notes, please read.

Credits

By Falcao

Demo
http://www.mediafire.com/?a6dvdckx1r200ge

Script in code just copy and paste (I recomend you to download demo)

  1.  
  2. #===========================================================================#
  3. #  #*****************#         Minimap Set 1.1 Falcao script, display a set #
  4. #  #*** By Falcao ***#         of minimaps where the player can teleport,   #
  5. #  #*****************#         event objects can be displayed on minimap    #
  6. #         RMXP                 Release date:    25/4/2011                   #
  7. # makerpalace.onlinegoo.com    Translated date: 28/4/2011                   #
  8. #===========================================================================#
  9.  
  10. #----------------------------------------------------------------------------
  11. # * Main features
  12. #
  13. # - Display a minimap where the player
  14. # - Allow to save minimaps and then teleport
  15. # - Display player location on the minimap
  16. # - Display exact location of events on mainimaps
  17. # - Support a second index called dungeon
  18. # - Allow you to hide your current location wherever you want
  19. # - Easy to use
  20.  
  21. #----------------------------------------------------------------------------
  22. # * Instructions
  23. #
  24. # Copy and paste the script above main.
  25. #
  26. # Press 'ALT' button to call the script, but it can be called manually using
  27. # the following command:   $scene = Teletrans.new
  28. #
  29. # - To save or remove maps from the map list use the followings commands
  30. #
  31. # $game_map.savemap(X)     Add map id 'X' to the map list (Saved Maps)
  32. #                          Example: $game_map.savemap(1) add map id 1
  33. #
  34. #
  35. # $game_map.remove_map(X)  Remove map 'X' form the list (Saved Maps)
  36. #                          Example: $game_map.remove_map(1) remove map id 1
  37. #
  38. # Coodenates are added automatically, but it can be added manually using the
  39. # following command:
  40. #
  41. # $game_map.savemap(id,x,y)  id = map id
  42. #                            x  = map x   y = map y
  43. #----------------------------------------------------------------------------
  44. #
  45. # - To add or clear maps form the dungeon map set use the followings commands
  46. #
  47. # $game_map.dungeon(X)     Add map id 'X' to the dungeon list
  48. #                          Example: $game_map.dungeon(1) add map 1 as dungeon
  49. #
  50. # $game_map.dungeon_clear  Clear dungeon map set
  51. #----------------------------------------------------------------------------
  52. #
  53. # $game_map.hide_player          Hide player location on the minimap
  54. # $game_map.display_player       Show player location on the minimap
  55. #
  56. # $game_map.hide_minimap(value)  Hide current minimap, so you cannot see where
  57. #                                you are, change value for true or false
  58. #                                Example: $game_map.hide_minimap(true)
  59. #----------------------------------------------------------------------------
  60. #
  61. # * Type the following commads on the 'Comment' from the events commands
  62. #   Allows you to displays events on minimaps such as chests, bosses, npc etc.
  63. #
  64. # EVENT_POINT          Display a point icon on minimap
  65. # EVENT_CHEST          Display a chest icon on minimap
  66. # EVENT_BOSS           Display a boss icon on minimap
  67. # EVENT_TELEPORT       Display a teleport icon on minimap
  68. # EVENT_NPC            Display a npc icon on minimap
  69. #---------------------------------------------------------------------------
  70. #                          
  71. # License: This script is for non-comercial games, for comercial games please
  72. #          contact me.
  73. #---------------------------------------------------------------------------
  74.  
  75. module Faltrans
  76.  
  77.   # Each map descriptions
  78.   # A = Map id    B = Description (A=>B)
  79.   MapDescription = {
  80.  
  81.   1=> 'Lugar de recreacion donde los usuarios de Maker Palace descansan',
  82.   2=> 'Espeso bosque donde los mas probable es perderse xd',
  83.   3=> 'Caverna con muchas sorpresas lo mejor es tener una linterna',
  84.   5=> 'Lugar donde Falcao descansa en paz y se inspira',
  85.   4=> 'Kysis Dungeon salon prinsipal',
  86.   6=> 'Kysis Dungeon salon acuatico',
  87.   7=> 'Kysis Dungeon trono del Rey Falcao',
  88.  
  89.   }
  90.  
  91.   # Script call button
  92.   Call_Script = Input::ALT
  93.  
  94.   # Disable script call by the button
  95.   Disable_Trans_call = false
  96.  
  97.   # Transition
  98.   Transition = "015-Diamond01"
  99.  
  100.   # Font for the script
  101.   FalFont = "Georgia"
  102.  
  103.   # Icons
  104.   Point = "047-Skill04"
  105.   Chest = "034-Item03"
  106.   Boss = "046-Skill03"
  107.   Teleport = "035-Item04"
  108.   Npc = "011-Head02"
  109.  
  110.   # Vacabulary
  111.   Vocab_Title  = "Map list"
  112.   Saved = "Saved Maps"
  113.   Dungeon = "Dungeon Maps"
  114.  
  115.   #Icons vocabulary
  116.   Vocab_Point = "Key Point"
  117.   Vocab_Chest = "Chest"
  118.   Vocab_Boss = "Boss"
  119.   Vocab_Teleport = "Teleport"
  120.   Vocab_Npc = "Npc"
  121. end
  122.  
  123. #-----------------------------------------------------------------------
  124. # * Game map
  125. #-----------------------------------------------------------------------
  126. class Game_Map
  127.   attr_accessor :falmap_data
  128.   attr_accessor :falmap_added
  129.   attr_accessor :falhide    
  130.   attr_accessor :mess_var
  131.   attr_accessor :read_index
  132.   attr_reader   :hideminimap
  133.   alias falcaominimapset_ini initialize
  134.   def initialize
  135.     @falmap_data = {}
  136.     @falmap_added = []
  137.     @falhide = false
  138.     @read_index = 0
  139.     @mess_var = [tranfer = false, time = 0, [], []]
  140.     @falcmap = load_data("Data/MapInfos.rxdata")
  141.     @faldelay = 0
  142.     @hideminimap = false
  143.     falcaominimapset_ini
  144.   end
  145.  
  146.   alias falcaoset_fade_setup setup
  147.   def setup(map_id)
  148.     falcaoset_fade_setup(map_id)
  149.     if @mess_var[0]
  150.       $game_screen.start_tone_change($falcao_tone_rescue, 15)
  151.       @mess_var[1] = 16
  152.     end
  153.   end
  154.  
  155.   def savemap(id, x=$game_player.x, y=$game_player.y)
  156.     unless @falmap_data.has_key?(id)
  157.       @falmap_data[id] = [load_data(sprintf("Data/Map%03d.rxdata", id)),
  158.       @falcmap[id].name, id, x, y] rescue ala_mierda(id)
  159.       @falmap_added.push(id) unless $from_falmenu
  160.     end
  161.   end
  162.  
  163.   def remove_map(id)
  164.     if @falmap_data.has_key?(id)
  165.       @falmap_data.delete(id)
  166.     end
  167.   end
  168.  
  169.   def dungeon(id)
  170.     unless @mess_var[2].include?(id)
  171.       @mess_var[2].push(id)
  172.     end
  173.   end
  174.  
  175.   def dungeon_clear
  176.      return @mess_var[2] = []
  177.   end
  178.  
  179.   def ala_mierda(id)
  180.     p "Falcao script error: Map id #{id.to_s} has not been created"
  181.     $scene = nil
  182.   end
  183.  
  184.   def hide_player
  185.     player_manager(true)
  186.   end
  187.  
  188.   def display_player
  189.     player_manager(false)
  190.   end
  191.  
  192.   def player_manager(value)
  193.     @falhide = value
  194.     $game_player.refresh
  195.   end
  196.  
  197.   def hide_minimap(value)
  198.     @hideminimap = value
  199.     $game_player.refresh
  200.   end
  201.  
  202.   def delaytime(time)
  203.     loop do
  204.       Graphics.freeze
  205.       @faldelay += 1
  206.       if @faldelay == time
  207.         @faldelay = 0
  208.         Graphics.transition
  209.         break
  210.       end
  211.     end
  212.   end
  213. end
  214.  
  215. #-----------------------------------------------------------------------
  216. # * Minimap display
  217. #-----------------------------------------------------------------------
  218. class MapDisplay
  219.   attr_reader   :map
  220.   attr_reader   :panorama
  221.   def initialize
  222.     @panorama = Sprite.new
  223.     @panorama.bitmap = RPG::Cache.panorama($game_map.panorama_name,
  224.     $game_map.panorama_hue)
  225.     @panorama.x = 192
  226.     @panorama.y = 68
  227.     @panorama.zoom_x = 0.94
  228.     @panorama.zoom_y = 0.684
  229.     @map_width =  448
  230.     @map_height =  328  
  231.     @map = Sprite.new
  232.     @map.bitmap = Bitmap.new(width, height)
  233.     @map.x = 191
  234.     @map.y = 68
  235.   end
  236.  
  237.   def dispose
  238.     @map.bitmap.dispose
  239.     @map.dispose
  240.     @panorama.dispose
  241.     @panorama.bitmap.dispose
  242.   end
  243.  
  244.   def width
  245.     return @map_width
  246.   end
  247.  
  248.   def height
  249.     return @map_height
  250.   end
  251.  
  252.   def refresh(showmap)
  253.     if Input.press?(Input::UP) or Input.press?(Input::DOWN) or
  254.        Input.press?(Input::RIGHT) or Input.press?(Input::LEFT)
  255.       @map.bitmap.clear
  256.     end
  257.     tileset = $data_tilesets[showmap.tileset_id]  
  258.     if $game_map.read_index != $game_map.map_id
  259.       @panorama.bitmap = RPG::Cache.panorama(tileset.panorama_name,
  260.       tileset.panorama_hue)
  261.     else
  262.       @panorama.bitmap = RPG::Cache.panorama($game_map.panorama_name,
  263.       $game_map.panorama_hue)
  264.     end  
  265.     bitmap = Bitmap.new(showmap.width * 32, showmap.height * 32)
  266.     for i in 0...(showmap.width * showmap.height)
  267.       x = i % showmap.width
  268.       y = i / showmap.width
  269.       for level in 0...3
  270.         tile_id = showmap.data[x, y, level]
  271.         if tile_id >= 384
  272.           tileset_bitmap = RPG::Cache.tile(tileset.tileset_name, tile_id, 0)
  273.           src_rect = Rect.new(0, 0, 32, 32)
  274.           bitmap.blt(x * 32, y * 32, tileset_bitmap, src_rect)
  275.         end
  276.         if tile_id >= 48 and tile_id < 384
  277.           id = tile_id / 48 - 1
  278.           tileset_bitmap = RPG::Cache.autotile(tileset.autotile_names[id])
  279.           src_rect = Rect.new(32, 64, 32, 32)
  280.           bitmap.blt(x * 32, y * 32, tileset_bitmap, src_rect)
  281.         end
  282.       end
  283.     end
  284.     d_rect = Rect.new(0, 0, width, height)
  285.     s_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
  286.     @map.bitmap.stretch_blt(d_rect, bitmap, s_rect)
  287.     bitmap.clear
  288.     bitmap.dispose
  289.   end
  290. end
  291.  
  292. #-----------------------------------------------------------------------
  293. # * Window icons
  294. #-----------------------------------------------------------------------
  295. class Window_KeyIcons < Window_Base
  296.   include Faltrans
  297.   def initialize
  298.     super(0, 315, 190, 165)
  299.     self.contents = Bitmap.new(width - 32, height - 32)
  300.     refresh
  301.   end
  302.  
  303.   def refresh
  304.     self.contents.clear
  305.     draw_icons(Point, 0, 0)
  306.     draw_icons(Chest, 0, 28)
  307.     draw_icons(Boss, 0, 54)
  308.     draw_icons(Teleport, 0, 79)
  309.     draw_icons(Npc, 0, 105)
  310.     self.contents.draw_text(35, 0, self.width, 32, Vocab_Point)
  311.     self.contents.draw_text(35, 27, self.width, 32, Vocab_Chest)
  312.     self.contents.draw_text(35, 52, self.width, 32, Vocab_Boss)
  313.     self.contents.draw_text(35, 78, self.width, 32, Vocab_Teleport)
  314.     self.contents.draw_text(35, 103, self.width, 32, Vocab_Npc)
  315.   end
  316.  
  317.   def draw_icons(name, x, y)
  318.     src_rect = Rect.new(0, 0, 24, 24)
  319.     icon = RPG::Cache.icon(name)    
  320.     self.contents.blt(x , y,icon, src_rect)
  321.   end
  322. end
  323.  
  324. #-----------------------------------------------------------------------
  325. # * Indice de mapas
  326. #-----------------------------------------------------------------------
  327. class Map_Indice < Window_Selectable
  328.   def initialize(x=0,y=0, act = false)
  329.     super(x, y, 190, 226)
  330.     @column_max = 1
  331.     @action = act
  332.     $from_falmenu = true
  333.     refresh
  334.     self.index = 0
  335.   end
  336.  
  337.   def map
  338.     return @data[self.index]
  339.   end
  340.  
  341.   def refresh
  342.     if self.contents != nil
  343.       self.contents.dispose
  344.       self.contents = nil
  345.     end
  346.     @data = []
  347.     #---
  348.     if @action
  349.       data_save = $game_map.falmap_data
  350.       $game_map.falmap_data = {}
  351.       for d in $game_map.mess_var[2]
  352.         $game_map.savemap(d)
  353.       end
  354.       for i in $game_map.falmap_data.values
  355.         @data.push(i)
  356.       end
  357.       $game_map.falmap_data = data_save
  358.     else
  359.       $game_map.savemap($game_map.map_id)
  360.       for i in $game_map.falmap_data.values
  361.         @data.push(i)
  362.       end
  363.     end
  364.     if not @action
  365.       for c in @data
  366.         if c[2] == $game_map.map_id
  367.           @data.delete(c)
  368.           temp = @data[0]
  369.           @data[0] = c
  370.         end
  371.       end
  372.       @data.push(temp) unless $game_map.falmap_added.empty? or temp.nil?
  373.     end
  374.     #----
  375.     @item_max = @data.size
  376.     if @item_max > 0
  377.       self.contents = Bitmap.new(width - 32, row_max * 32)
  378.       for i in 0...@item_max
  379.         draw_item(i)
  380.       end
  381.     end
  382.   end
  383.  
  384.   def draw_item(index)
  385.     map_name = @data[index]
  386.     x, y = 4, index * 32
  387.     rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  388.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  389.     if contents.text_size(map_name[1]).width > self.width - 12
  390.       letters = map_name[1].scan(/./)
  391.       map_name[1] = ""
  392.       for i in letters
  393.         text_size = contents.text_size(map_name[1]).width
  394.         break if text_size > self.width - 55
  395.         map_name[1] += i
  396.       end
  397.       map_name[1] += "..."
  398.     end
  399.    
  400.     if not @action
  401.       index > 0 ? self.contents.font.color = normal_color :
  402.       self.contents.font.color = Color.new(128, 255, 128, 255)
  403.     end
  404.     self.contents.draw_text(x, y, self.width, 32,  map_name[1])
  405.   end
  406. end
  407.  
  408. #-----------------------------------------------------------------------
  409. # * Each map description
  410. #-----------------------------------------------------------------------
  411. class Falmap_info < Window_Base
  412.   include Faltrans
  413.   def initialize
  414.     super(189, 400, 451, 80)
  415.     self.contents = Bitmap.new(width - 32, height - 32)
  416.     @tiempo = 0
  417.     @scroll = 0
  418.   end
  419.  
  420.   def clear_data(cont=false)
  421.     @tiempo = 0
  422.     @scroll = 0
  423.     self.contents.clear if cont
  424.   end
  425.  
  426.   def refresh(map_id)
  427.     self.contents.clear
  428.     draw_description(map_id)
  429.   end
  430.  
  431.   def draw_description(map_id)
  432.     if MapDescription.has_key?(map_id)
  433.       MapDescription.each do |id, value|
  434.         if id == map_id
  435.           cx = contents.text_size(value).width
  436.           scroll_text(value)
  437.           self.contents.draw_text(@scroll, -4, cx + 10, 32 , value)
  438.         end
  439.       end
  440.     else
  441.       text = "                                                  
  442.                                                          
  443.              Descripcion no disponible
  444.              Falcao Script Minimap Teletransport v 1.1"      
  445.      
  446.       scroll_text(text,false)
  447.       cx = contents.text_size(text).width
  448.       self.contents.draw_text(@scroll, -4, cx + 10, 32, text)
  449.     end
  450.   end
  451.  
  452.   def scroll_text(texto, result_ok=true)
  453.     cx = contents.text_size(texto).width
  454.     if cx > self.width - 25
  455.       @tiempo += 1
  456.       if @tiempo > 60
  457.         @scroll -= 1 if @result == nil
  458.         if @scroll == -cx
  459.           @result = true
  460.         end
  461.       end
  462.     end
  463.     if @result
  464.       result_ok ? @scroll += 10 :  @scroll = 0
  465.       if @scroll >= 0
  466.         @scroll = 0;  @tiempo = 0
  467.         @result = nil
  468.       end
  469.     end
  470.     if Input.press?(Input::UP) or Input.press?(Input::DOWN)
  471.       @scroll = 0; @tiempo = 0; @result = nil
  472.     end
  473.   end
  474. end
  475.  
  476. #-----------------------------------------------------------------------
  477. # * Extra windows
  478. #-----------------------------------------------------------------------
  479. class Extra_Info < Window_Base
  480.   include Faltrans
  481.   def initialize(x=0, y=0, w=190, h=91)
  482.     super(x, y, w, h)
  483.     self.contents = Bitmap.new(width - 32, height - 32)
  484.   end
  485.  
  486.   def draw_title_contents(action="Current location")
  487.     self.contents.clear
  488.     self.contents.draw_text(0, 0, self.width, 32, Vocab_Title)
  489.     self.contents.draw_text(0, 30, self.width, 32, action)
  490.   end
  491.  
  492.   def draw_texto(map_name)
  493.     self.contents.clear
  494.     self.contents.draw_text(0, 0, self.width, 32,
  495.     "Teletrasportarse a #{map_name}?")
  496.   end
  497.  
  498.   def draw_nodata
  499.     self.contents.clear
  500.     self.opacity = 0
  501.     self.z = 500
  502.     self.contents.fill_rect(0, 0, 448, 328, Color.new(0, 0, 0, 255))
  503.     self.contents.font.size = 30
  504.     self.contents.draw_text(-12, 120, self.width, 32, "No data", 1)
  505.   end
  506. end
  507.  
  508. #-----------------------------------------------------------------------
  509. # * Seleccion inicial
  510. #-----------------------------------------------------------------------
  511. class Ini_Selection < Window_Selectable
  512.   def initialize(x=0,y=0)
  513.     super(x, y, 451, 64)
  514.     @column_max = 2
  515.     refresh
  516.     self.index = 0
  517.   end
  518.  
  519.   def ini_index
  520.     return @data[self.index]
  521.   end
  522.  
  523.   def refresh
  524.     if self.contents != nil
  525.       self.contents.dispose
  526.       self.contents = nil
  527.     end
  528.     @data = []
  529.     ini = [Faltrans::Saved, Faltrans::Dungeon]
  530.     for i in ini
  531.       @data.push(i)
  532.     end
  533.     @item_max = @data.size
  534.     if @item_max > 0
  535.       self.contents = Bitmap.new(width - 32, row_max * 32)
  536.       for i in 0...@item_max
  537.         draw_item(i)
  538.       end
  539.     end
  540.   end
  541.  
  542.   def draw_item(index)
  543.     name = @data[index]
  544.     x = 4 + index % 2 * (237 - 9)
  545.     y = 0
  546.     rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  547.     self.contents.draw_text(x, y, self.width, 32,  name)
  548.   end
  549. end
  550.  
  551. #-----------------------------------------------------------------------
  552. # * Scene Teletrans
  553. #-----------------------------------------------------------------------
  554. class Teletrans
  555.   include Faltrans
  556.   def initialize
  557.     $falcao_tone_rescue = $game_screen.tone
  558.     $game_screen.start_tone_change(Tone.new(-255, -255, -255, 0), 0)
  559.   end
  560.   def main
  561.     @viewport1 = Viewport.new(191, 68, 448, 328)
  562.     @viewport1.z = 200
  563.     @indice_map = Map_Indice.new(0, 90)
  564.     @key_sprites = []
  565.     @time_count = 0
  566.     @temp_data = []
  567.     @keyicon_window = Window_KeyIcons.new
  568.     @dungeon_indice = Map_Indice.new(0, 90, true)
  569.     @dungeon_indice.active = false
  570.     @dungeon_indice.visible = false
  571.     @nodata = Extra_Info.new(175, 52, 481, 360)
  572.     @nodata.draw_nodata
  573.     $game_map.hideminimap ? @nodata.visible = true : @nodata.visible = false
  574.     @display_map = MapDisplay.new
  575.     @info_map = Falmap_info.new
  576.     @title = Extra_Info.new
  577.     @sprite =Sprite_Pos.new(@viewport1,@indice_map.map[0],$game_party.actors[0])
  578.     @title.draw_title_contents
  579.     @selection_ini = Ini_Selection.new(189, 0)
  580.     @question = Extra_Info.new(0, 0, 330, 64)
  581.     @question.visible = false
  582.     @question.z = 600
  583.     @question.x = 250
  584.     @question.y = 137
  585.     @command_question = Window_Command.new(330, ["Yes", "No"])
  586.     @command_question.active = false
  587.     @command_question.visible = false
  588.     @command_question.x = 250
  589.     @command_question.y = 200
  590.     @command_question.z = 600
  591.     if !$game_map.falmap_data.empty?
  592.       @display_map.refresh(@indice_map.map[0])
  593.       @info_map.refresh(@indice_map.map[2])
  594.       @sprite.update_direction(@indice_map.map[0])
  595.       $game_map.mess_var[3] = @indice_map.map[0]
  596.       $game_map.read_index = @indice_map.map[2]
  597.     end
  598.     draw_icons(@indice_map.map[0], @indice_map.map[2])
  599.     Graphics.transition
  600.     loop do
  601.       Graphics.update
  602.       Input.update
  603.       update
  604.       if $scene != self
  605.         break
  606.       end
  607.     end
  608.     Graphics.freeze
  609.     unless $game_map.falmap_added.include?($game_map.map_id)
  610.       $game_map.remove_map($game_map.map_id)
  611.     end
  612.     @display_map.dispose
  613.     @info_map.dispose
  614.     @title.dispose
  615.     @dungeon_indice.dispose
  616.     @nodata.dispose
  617.     @selection_ini.dispose
  618.     @indice_map.dispose
  619.     @viewport1.dispose
  620.     @keyicon_window.dispose
  621.     @sprite.dispose
  622.     @command_question.dispose
  623.     @question.dispose
  624.     for sprite in @key_sprites
  625.       sprite.dispose
  626.     end
  627.     $from_falmenu = false
  628.     if $game_map.mess_var[0]
  629.       Graphics.transition(60, "Graphics/Transitions/" + Faltrans::Transition)
  630.     else
  631.       $game_screen.start_tone_change($falcao_tone_rescue, 0)
  632.     end  
  633.   end
  634.  
  635.   def update
  636.     @indice_map.update
  637.     @dungeon_indice.update
  638.     @sprite.update
  639.     @selection_ini.update
  640.     @command_question.update if @command_question.active
  641.     for sprite in @key_sprites
  642.       sprite.update
  643.     end
  644.     refresh_display
  645.     refresh_icons
  646.     update_teletrans
  647.     if Input.trigger?(Input::B) or
  648.       Input.trigger?(Faltrans::Call_Script)
  649.       salir
  650.     end
  651.   end
  652.  
  653.   def refresh_display
  654.     return if @command_question.active
  655.     case @selection_ini.index
  656.     when 0
  657.       @dungeon_indice.active = false
  658.       @dungeon_indice.visible = false
  659.       @indice_map.visible = true
  660.       @indice_map.active = true
  661.       if $game_map.hideminimap and @indice_map.index == 0
  662.         @nodata.visible = true
  663.       else
  664.         @nodata.visible = false
  665.       end
  666.       if Input.press?(Input::UP) or Input.press?(Input::DOWN) or
  667.         Input.press?(Input::RIGHT) or Input.press?(Input::LEFT)
  668.         @info_map.clear_data
  669.         @indice_map.index > 0 ? @title.draw_title_contents("Saved maps") :
  670.         @title.draw_title_contents
  671.         if !$game_map.falmap_data.empty?
  672.           @time_count = 1
  673.           @temp_data = [@indice_map.map[0], @indice_map.map[2]]
  674.           $game_map.mess_var[3] = @indice_map.map[0]
  675.           @display_map.refresh(@indice_map.map[0])
  676.         end
  677.       end
  678.       @info_map.refresh(@indice_map.map[2]) if !$game_map.falmap_data.empty?
  679.       $game_map.read_index = @indice_map.map[2]
  680.       @sprite.update_direction(@indice_map.map[0])
  681.     when 1
  682.       @indice_map.active = false
  683.       @indice_map.visible = false
  684.       @dungeon_indice.active = true
  685.       @dungeon_indice.visible = true
  686.       if Input.press?(Input::UP) or Input.press?(Input::DOWN) or
  687.         Input.press?(Input::RIGHT) or Input.press?(Input::LEFT)
  688.         @info_map.clear_data
  689.         @title.draw_title_contents("Dungeon set")
  690.         if $game_map.mess_var[2].empty?
  691.           @nodata.visible = true
  692.           @info_map.clear_data(true)
  693.         else
  694.           @nodata.visible = false
  695.         end
  696.         if !$game_map.falmap_data.empty? and !$game_map.mess_var[2].empty?
  697.           @time_count = 1
  698.           @temp_data = [@dungeon_indice.map[0], @dungeon_indice.map[2]]
  699.           $game_map.mess_var[3] = @dungeon_indice.map[0]
  700.           @display_map.refresh(@dungeon_indice.map[0])
  701.         end
  702.       end
  703.       if !$game_map.falmap_data.empty? and !$game_map.mess_var[2].empty?
  704.         @info_map.refresh(@dungeon_indice.map[2])
  705.         $game_map.read_index = @dungeon_indice.map[2]
  706.         @sprite.update_direction(@dungeon_indice.map[0])
  707.       end
  708.     end
  709.   end
  710.  
  711.   def refresh_icons
  712.     if @time_count > 0
  713.       @time_count += 1
  714.       case @time_count
  715.       when 1..3
  716.         clear_icons
  717.       when 4
  718.         draw_icons(@temp_data[0], @temp_data[1])
  719.         @time_count = 0
  720.       end
  721.     end
  722.   end
  723.  
  724.   def draw_icons(map, map_id)
  725.     @events = {}
  726.     for i in map.events.keys
  727.       @events[i] = Game_Event.new(map_id, map.events[i])
  728.     end
  729.     for event in @events.values
  730.       next if event.page.nil?
  731.       if event.event_point
  732.         sprite = Sprite_Keys.new(@viewport1, map, Point, event)
  733.         @key_sprites.push(sprite)
  734.       elsif event.event_chest
  735.         sprite = Sprite_Keys.new(@viewport1, map, Chest, event)
  736.         @key_sprites.push(sprite)
  737.       elsif event.event_boss
  738.         sprite = Sprite_Keys.new(@viewport1, map, Boss, event)
  739.         @key_sprites.push(sprite)
  740.       elsif event.event_teleport
  741.         sprite = Sprite_Keys.new(@viewport1, map, Teleport, event)
  742.         @key_sprites.push(sprite)
  743.       elsif event.event_npc
  744.         sprite = Sprite_Keys.new(@viewport1, map, Npc, event)
  745.         @key_sprites.push(sprite)
  746.       end
  747.     end
  748.   end
  749.  
  750.   def clear_icons
  751.     for sprite in @key_sprites
  752.       @key_sprites.delete(sprite)
  753.       sprite.dispose
  754.     end
  755.   end
  756.  
  757.   def update_teletrans
  758.     return if @selection_ini.index > 0
  759.     return if $game_map.falmap_data.empty?
  760.     if Input.trigger?(Input::C) and !@command_question.active
  761.       $game_system.se_play($data_system.decision_se)
  762.       if @indice_map.map[2] == $game_map.map_id
  763.         salir
  764.         return
  765.       end
  766.       @command_question.index = 0
  767.       @question.draw_texto(@indice_map.map[1])
  768.       @indice_map.active = false
  769.       @selection_ini.active = false
  770.       @command_question.active = true
  771.       @command_question.visible = true
  772.       @question.visible = true
  773.       $game_map.delaytime(50)
  774.     end
  775.     if Input.trigger?(Input::C) and @command_question.active
  776.       case @command_question.index
  777.       when 0
  778.         Audio.se_play("Audio/SE/010-System10")
  779.         $game_temp.player_transferring = true
  780.         $game_temp.player_new_map_id = @indice_map.map[2]
  781.         $game_temp.player_new_x = @indice_map.map[3]
  782.         $game_temp.player_new_y = @indice_map.map[4]
  783.         $game_temp.player_new_direction = 2
  784.         $game_temp.transition_processing = true
  785.         $game_map.mess_var[0] = true
  786.         $scene = Scene_Map.new
  787.         $game_map.autoplay
  788.       when 1
  789.         $game_system.se_play($data_system.cancel_se)
  790.         @indice_map.active = true
  791.         @selection_ini.active = true
  792.         @command_question.active = false
  793.         @command_question.visible = false
  794.         @question.visible = false
  795.       end
  796.     end
  797.   end
  798.  
  799.   def salir
  800.     $game_system.se_play($data_system.cancel_se)
  801.     $scene = Scene_Map.new
  802.     return
  803.   end
  804. end
  805.  
  806. #-----------------------------------------------------------------------
  807. # * Scene_Map, update aliased
  808. #-----------------------------------------------------------------------
  809. class Scene_Map
  810.   alias falcao_teletrans_call update
  811.   def update
  812.     if $game_map.mess_var[1] > 0
  813.       $game_map.mess_var[1] -= 1
  814.       if $game_map.mess_var[1] == 1
  815.         $game_map.mess_var[0] = false
  816.         $game_map.mess_var[1] = 0
  817.       end
  818.     end
  819.     falcao_teletrans_call
  820.     managercall
  821.   end
  822.   def managercall
  823.     return if Faltrans::Disable_Trans_call or
  824.     $game_temp.message_window_showing or $game_system.map_interpreter.running?
  825.     if Input.trigger?(Faltrans::Call_Script)
  826.       $scene = Teletrans.new if !$game_map.mess_var[0]
  827.       return
  828.     end
  829.   end
  830. end
  831.  
  832. #-----------------------------------------------------------------------
  833. # * Fuente
  834. #-----------------------------------------------------------------------
  835. class Font
  836.   alias falcaoBest4_font initialize
  837.   def initialize
  838.     falcaoBest4_font
  839.     if $scene.is_a?(Teletrans)
  840.       self.name = Faltrans::FalFont
  841.       self.size = 20
  842.     end
  843.   end
  844. end
  845.  
  846. #-----------------------------------------------------------------------
  847. # * Sprite que muestra la posision del jugador
  848. #-----------------------------------------------------------------------
  849. class Sprite_Pos < RPG::Sprite
  850.   def initialize(viewport, realmap, character = nil)
  851.     super(viewport)
  852.     @character = character
  853.     @sx = 0;  @counter = 0
  854.     create_bitmap
  855.     update_direction(realmap)
  856.     update
  857.   end
  858.   def update
  859.     super
  860.     return if $game_map.read_index != $game_map.map_id and !self.visible
  861.     update_src_rect
  862.   end
  863.   def create_bitmap
  864.     self.bitmap = RPG::Cache.character(@character.character_name,
  865.     @character.character_hue)
  866.     @cw = bitmap.width / 4
  867.     @ch = bitmap.height / 4
  868.     self.ox = @cw / 2
  869.     self.oy = @ch
  870.     self.zoom_x = 0.6
  871.     self.zoom_y = 0.6
  872.     if $game_map.read_index != $game_map.map_id or $game_map.falhide
  873.       self.visible = false
  874.     else; self.visible = true; end
  875.   end
  876.   def update_src_rect
  877.     if $game_map.read_index != $game_map.map_id or $game_map.falhide
  878.       self.visible = false
  879.     else; self.visible = true; end
  880.     @counter += 1
  881.     case @counter
  882.     when 10; @sx = 0 * @cw
  883.     when 20; @sx = 1 * @cw
  884.     when 30; @sx = 2 * @cw
  885.     when 40; @sx = 3 * @cw
  886.       @counter = 0
  887.     end
  888.     self.src_rect.set(@sx, 0, @cw, @ch)
  889.   end
  890.  
  891.   def update_direction(realmap)
  892.     real_x = $game_player.x  * 448 / realmap.width
  893.     real_y = $game_player.y * 328 / realmap.height
  894.     self.x = real_x + 10
  895.     self.y = real_y + 16
  896.     self.z = 200
  897.   end
  898. end
  899.  
  900. #-----------------------------------------------------------------------
  901. # * Key sprites
  902. #-----------------------------------------------------------------------
  903. class Sprite_Keys < RPG::Sprite
  904.   def initialize(viewport, realmap, icon, character = nil)
  905.     super(viewport)
  906.     @character = character
  907.     self.zoom_x = 0.8
  908.     self.zoom_y = 0.8
  909.     @counter = 0
  910.     self.bitmap = RPG::Cache.icon(icon)
  911.     update_direction(realmap)
  912.     update
  913.   end
  914.  
  915.   def update
  916.     super
  917.     @counter += 1
  918.     case @counter
  919.     when 1; self.visible = true
  920.     when 20; self.visible = false
  921.     when 40; @counter = 0
  922.     end
  923.   end
  924.  
  925.   def update_direction(realmap)
  926.     real_x = @character.x  * 448 / realmap.width
  927.     real_y = @character.y * 328 / realmap.height
  928.     self.x = real_x
  929.     self.y = real_y
  930.     self.z = 200
  931.   end
  932. end
  933.  
  934. #-----------------------------------------------------------------------
  935. # * Game_Event. refresh aliased
  936. #-----------------------------------------------------------------------
  937. class Game_Event < Game_Character
  938.   attr_reader     :event_point
  939.   attr_reader     :event_chest
  940.   attr_reader     :event_boss
  941.   attr_reader     :event_teleport
  942.   attr_reader     :event_npc
  943.   attr_accessor   :page
  944.   alias falpoint_refresh refresh
  945.   def refresh
  946.     @event_point = false
  947.     @event_chest = false
  948.     @event_boss = false
  949.     @event_teleport = false
  950.     @event_npc = false
  951.     falpoint_refresh
  952.     create_falcomments
  953.   end
  954.  
  955.   def create_falcomments
  956.     return if @page.nil?
  957.     for i in @page.list
  958.       if i.code == 108 or i.code == 408
  959.         if i.parameters[0].upcase[/EVENT_POINT/] != nil
  960.           @event_point = true
  961.         end
  962.         if i.parameters[0].upcase[/EVENT_CHEST/] != nil
  963.           @event_chest = true
  964.         end
  965.         if i.parameters[0].upcase[/EVENT_BOSS/] != nil
  966.           @event_boss = true
  967.         end
  968.         if i.parameters[0].upcase[/EVENT_TELEPORT/] != nil
  969.           @event_teleport = true
  970.         end
  971.         if i.parameters[0].upcase[/EVENT_NPC/] != nil
  972.           @event_npc = true
  973.         end
  974.       end
  975.     end
  976.   end
  977. end
  978.  
  979. #-----------------------------------------------------------------------
  980. # * Game_Character modificacion, alias
  981. #-----------------------------------------------------------------------
  982. class Game_Character
  983.   alias fal_moveto moveto
  984.   def moveto(x, y)
  985.     if $scene.is_a?(Teletrans)
  986.       falmoveto(x, y, $game_map.mess_var[3])
  987.       return
  988.     end
  989.     fal_moveto(x, y)
  990.   end
  991.  
  992.   def falmoveto(x, y, map)
  993.     @x = x % map.width
  994.     @y = y % map.height
  995.     @real_x = @x * 128
  996.     @real_y = @y * 128
  997.   end
  998. end
  999.  
Expand to see the code.



License:

This script is for non-comercial games, for comercial games please contact me.

Screens

Image

Image

Enjoy
Hey, this is pretty cool!
Is there a limit to map size, or does it just cut off after a certain number of tiles? Indicating events with an icon is a nice touch. My only critique is that you should resize proportionally (4x3 rectangle), rather than into a square; the latter looks a tad ugly squished horizontally.
I have a question about this script, once you get a place to teleport to and you select it, you get the option pop up to teleport, yes.. no.. ect.. but it says something in a different language, how do I change that? cos its
annoying when it says something in a different language then it adds your english at the end.

NICE SCRIPT by the way falcao.

@ regi.. it shrinks down ANY sized maps if you havent downloaded thge demo already.. and just noticed the date of ur post.. NVM.
BUMP! see above post please ^^
Try changing line 495 to
"Teleport to #{map_name}?")


If you see any other pieces that aren't in English you can always use Ctrl-F to search for and replace the text in the script.
thankyou regi.. i didnt think of that ^^ lol .. such a noob at scripts! lol
Apologies in advance for bumping an old topic. This script is really good though. But for some odd reason I got a stack error when I exited the demo. Other than that, worked fine.
im no longer supporting this, but feel free to modify anything you want
Hello I am using your script and it's nice. But how do I turn off the teleport thingy? I dont want players to teleport "through the storyline"

Also the Graphics in hthe minimap are very bad, is it supposed to be this edgy? O.o

Thanks in advice

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