TinyMine

Veteran
Veteran
Joined
Oct 26, 2013
Messages
53
Reaction score
54
First Language
German
Primarily Uses
Tinys Travel Map (TTM)
 
Script Name : Tinys Travel Map 1.4
Creator name : TinyMine

 

News:

- New Demo!!!

- New Addon "Confirmation Window Addon"

Introduction
An oldschool fasttravel map? Here you go.
 
Screenshot :

One of many many config examples:

lcg2i8p8.png


jphpxnn5.png
 
Script : 
#╔═=══════════════════════════════════════════════════════════════════════════=##║ Tinys Travel Map#║ By TinyMine#║#║  First Published/Erstveröffentlicht 09.07.2013#║#║  Visit : http://rpgmaker-vx-ace.de/ for further Information#║#║  Suggestions? Support? Bugs? Contact me in http://rpgmaker-vx-ace.de/#║#║  Credits required : TinyMine#║  Commercial Use?  : Contact me in http://rpgmaker-vx-ace.de/#║  #║  #║ Version : 1.41 // 04.06.2014#╚═=═=════════════════════════════════════════════════════════════════════════=#$imported ||= {}$imported[:TINY_TTM] = 1.41#╔═=══════════════════════════════════════════════════════════════════════════=##║ ** UPDATES **#║ #║ 1.41#║ - FIXED: No more Savegame error#║ #║ 1.4#║ - New Highlight Options#║ - New Highlight Effect (replacing old one)#║ - New Addon Compatibility#║ #╚═=═=════════════════════════════════════════════════════════════════════════=##╔═=══════════════════════════════════════════════════════════════════════════=##║ ** FEATURES **#║ #║ - Use a map image to fasttravel across it#║ - 2 Modifications#║    Mode 1 : For small maps#║    Mode 2 : For big maps#║ - Own targets placeable#║ - Everything is adjustable by you (Graphics, names, fonts etc...)#║ - New folder "Map" for your map scene#║ #╚═=═=════════════════════════════════════════════════════════════════════════=##╔═=══════════════════════════════════════════════════════════════════════════=##║ ** USAGE INSTRUCTIONS **#║ #║ Adding a target during game progress to your map#║ █  add_map_target(ID)#║ Where ID is the ID of your target you want to add#║ #║ Removing a target during game progress from your map#║ █  rem_map_target(ID)#║ Where ID is the ID of your target you want to remove#║ #║ Calling the scene to travel across your map, type...#║ █  open_travel_map#║ Which opens the Scene_TinyMap automatically#║ #╚═=═=════════════════════════════════════════════════════════════════════════=#module TINY # Do not touch  module TTM_GENERAL # Do not touch#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** EDITABLE REGION ** Defining TTM General Settings ** EDITABLE REGION **#╚═=═=════════════════════════════════════════════════════════════════════════=#        # Defines the map graphic image name which is found in new "map" folder    GRAPHIC_MAP = "MapBig"        # Graphic which shows the players position on the map    GRAPHIC_POS = "Pin"        # Defines the background image name which is found in new "map" folder    # "" for black screen    BACKGROUND = ""        # Defines used mode in your game    MODE = 2        # Mode 1 : Resize the map to 400x368px. All "added" targets visible and selectable    # Mode 2 : For bigger maps. No resizing. Scrolling across the map between "added" targets        # Do you want to scroll or jump across MODE 2 maps? (true = scroll)    SCROLLING = true    # Scrollspeed is calculated by px/frame (frame is 1/60 second)    SCROLLSPEED = 10        # Should a menu point be visible for the map?    MENUPOINT = true        # Highlight Options    HIGHLIGHT_SELECTED = true    # Highlight Size // 10-20 recommended    HIGHLIGHT_SIZE     = 20    # Shall the Highlight effect be smooth or not    HIGHLIGHT_SMOOTH   = false    # the higher the level the higher the blur (1 = lowest)    HIGHLIGHT_SMOOTH_LEVEL = 1    # Blink the selected target if HIGHLIGHT_SELECTED is true    BLINK_SELECTED = true    # The lower the faster    BLINK_SPEED    = 60#═=═=═════════════════════════════════════════════════════════════════════════=#      end # Do not touch  module TTM_VOCAB # Do not touch#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** EDITABLE REGION **    Defining TTM Vocab          ** EDITABLE REGION **#╚═=═=════════════════════════════════════════════════════════════════════════=#        # Headername for the travel map    VOC_MAPNAME = "A beautiful land"        # Name of menu point if activated    VOC_MENUNAME = "Map"        #═=═=═════════════════════════════════════════════════════════════════════════=#      end # Do not touch  module TTM_TARGETS # Do not touch    TARGETS = {  # Do not touch#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** EDITABLE REGION **    Defining TTM Targets        ** EDITABLE REGION **#╚═=═=════════════════════════════════════════════════════════════════════════=#        #█ EXAMPLE TARGETS # ** Dont change the Data packs symbols - use them everytime        # Target id    # Data packs  #  "Target name"      :desert => {:text         => "Desert",                                 # [ Target x, Target y, "graphicname in map folder", icon id ]                   :graphic      => [400, 400,"wüste", 232],                                 # [ Mapid, Mapx, Mapy ]                  :teleportdest => [3, 16, 6]          }, # Don't forget comma if another target follows                              :tundra =>  {:text         =>  "Tundra",                   :graphic      =>  [500, 1100,"tundra", 232],                   :teleportdest =>  [4, 8, 0]                             },      :grassland =>{:text         =>  "Grasland",                    :graphic      =>  [1200, 1100,"wiese", 232],                    :teleportdest =>  [1, 8, 12]                            },      :mountain => { :text         => "Mountain",                     :graphic      => [1200, 1000,"berge", 232],                     :teleportdest => [2, 0, 6]                            } # Don't put a comma if it is the last target                                         #█ OWN TARGETS                                                                                                                                                                                                                                                                        #═=═=═════════════════════════════════════════════════════════════════════════=#      } # end targets hash * Do not touch  end # Do not touch    module TTM_MODE # Do not touch#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** EDITABLE REGION **  Defining TTM MODE General   ** EDITABLE REGION **#╚═=═=════════════════════════════════════════════════════════════════════════=#    # █ ** all x/y, width/height adjustments only affect MODE 2    # Defining the "cursors" position when scrolling/jumping on the map by x/y px  CURSORX = 300  CURSORY = 208    # Defining x/y pos of header window; dont forget the brackets []  HEADPOS   = [0, 0]   # Defining width/height of header window; dont forget the brackets []  HEADSIZE  = [544, 48]   # Defining the Windowskin of your header window; => system folder              HSKIN     = "Window"          # Defining the font which should be used in header window  HEADFONT  = "VL Gothic"                # Defines the fonts size in header window  HFTSIZE   = 26     # Defines if font is bold  HBOLD   = true  # Defines if font has shadow  HSHADOW   = true                    # Defines the header windows opacity ( 255 = fully visible)  HOPACITY   = 0      # Defining x/y pos of target list window; dont forget the brackets []  LISTPOS   = [24, 96]  # Defining width/height of target list window; dont forget the brackets []  LISTSIZE  = [144, 200]  # Defining the Windowskin of your target list window; => system folder    LSKIN     = "Window"  # Defining the font which should be used in target list window  LISTFONT  = "VL Gothic"  # Defines the fonts size in target list window  LFTSIZE   = 22   # Defines if font is bold  LBOLD   = false  # Defines if font has shadow  LSHADOW   = false  # Defines the target list windows opacity ( 255 = fully visible)  LOPACITY   = 192#═=═=═════════════════════════════════════════════════════════════════════════=#   end # Do not touch#╔═=══════════════════════════════════════════════════════════════════════════=#         #║ █ ** END OF EDITABLE REGION ** BEWARE ** END OF EDITABLE REGION ** DONT! **#║ █ **           Dont edit below this line, except... just don't           **#╚═=═=════════════════════════════════════════════════════════════════════════=#end#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** OLD Module Cache#╚═=═=════════════════════════════════════════════════════════════════════════=#module Cache    # Loads from a new folder to developers graphic folder  def self.map(filename)    load_bitmap("Graphics/Map/", filename)  endend # Cache#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** OLD Module DataManager#╚═=═=════════════════════════════════════════════════════════════════════════=#module DataManager    class << self    alias_method :create_game_objects_tiny_13177           ,:create_game_objects    alias_method :make_save_contents_tiny_45774             ,:make_save_contents    alias_method :extract_save_contents_tiny_89733       ,:extract_save_contents  end    def self.create_game_objects    create_game_objects_tiny_13177    $game_travelmap = Game_Travelmap.new  end      def self.make_save_contents    contents = make_save_contents_tiny_45774    contents[:travelmap] = $game_travelmap    contents  end    def self.extract_save_contents(contents)    extract_save_contents_tiny_89733(contents)    $game_travelmap     = contents[:travelmap]  end  end # DataManager#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** OLD Class Game_Interpreter#╚═=═=════════════════════════════════════════════════════════════════════════=#class Game_Interpreter    # Command adding predefined targets to travel map  def add_map_target(id)    $game_travelmap.add_map_target(id)  end    # Command removing predefined targets from travel map  def rem_map_target(id)    $game_travelmap.rem_map_target(id)  end    # Command for opening the travel scene  def open_travel_map    SceneManager.call(Scene_TinyMap)  end  end # Game_Interpreter#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** OLD Class Game_Map#╚═=═=════════════════════════════════════════════════════════════════════════=#class Game_Map    # Attr  attr_reader    :map_id  end # Game_Map#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** OLD Class Window_MenuCommand#╚═=═=════════════════════════════════════════════════════════════════════════=#class Window_MenuCommand  # Only change class when active  if TINY::TTM_GENERAL::MENUPOINT      # Alias  alias_method :tiny_tinymap_add_commands_23498     ,     :add_original_commands    def add_original_commands    tiny_tinymap_add_commands_23498    add_command(TINY::TTM_VOCAB::VOC_MENUNAME,:map,main_commands_enabled)  end    end # end of ifend # Window_MenuCommand#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** OLD Class Scene_Menu#╚═=═=════════════════════════════════════════════════════════════════════════=#class Scene_Menu  # Only change class when active  if TINY::TTM_GENERAL::MENUPOINT    # Alias  alias_method :tiny_tinymap_set_handlers_17348     ,     :create_command_window    def create_command_window    tiny_tinymap_set_handlers_17348     @command_window.set_handler:)map,method:)call_tinymap))  end    def call_tinymap    SceneManager.call(Scene_TinyMap)  end    end # end of ifend # Scene_Menu#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** NEW Class Game_Travelmap#╚═=═=════════════════════════════════════════════════════════════════════════=#class Game_Travelmap    # Attr  attr_reader   :targets  attr_accessor :last_target    def initialize    @targets = []    @last_target = nil  end    def add_map_target(id)    return if @targets.include?(id)    @targets << id if TINY::TTM_TARGETS::TARGETS[id]    @last_target = id  end    def rem_map_target(id)    return unless @targets.include?(id)    @targets.delete(id)  end    def update    # Future Use  end  end # Game_Travelmap#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** NEW Class Window_Target_List#╚═=═=════════════════════════════════════════════════════════════════════════=#class Window_Target_List < Window_Selectable    def initialize    if TINY::TTM_GENERAL::MODE == 2      super(TINY::TTM_MODE::LISTPOS[0], TINY::TTM_MODE::LISTPOS[1],       TINY::TTM_MODE::LISTSIZE[0], TINY::TTM_MODE::LISTSIZE[1])    else      super(0, 48, 144, 368)    end      self.windowskin = Cache.system(TINY::TTM_MODE::LSKIN)        self.index = $game_travelmap.targets.index($game_travelmap.last_target) unless $game_travelmap.targets.empty?    activate    set_config    refresh  end    def item_max    $game_travelmap.targets.size  end    def all_targets    return @list[index]  end    def set_config    self.opacity = TINY::TTM_MODE::LOPACITY    font = Font.new([TINY::TTM_MODE::HEADFONT])    font.bold = TINY::TTM_MODE::LBOLD    font.shadow = TINY::TTM_MODE::LSHADOW    font.size = TINY::TTM_MODE::HFTSIZE    font.out_color = Color.new(0, 0, 0, 128)    self.contents.font = font  end  def refresh        self.contents.clear        @list ||= []    for i in 0..item_max-1      e = $game_travelmap.targets      @list << e      draw_icon(TINY::TTM_TARGETS::TARGETS[e][:graphic][3], 0, i * 24)      self.contents.draw_text(24, i * 24, self.width - 24, 24, TINY::TTM_TARGETS::TARGETS[e][:text])    end      end  end # Window_Target_List#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** NEW Class Window_Map_Header#╚═=═=════════════════════════════════════════════════════════════════════════=#class Window_Map_Header < Window_Base  def initialize    if TINY::TTM_GENERAL::MODE == 2      super(TINY::TTM_MODE::HEADPOS[0], TINY::TTM_MODE::HEADPOS[1],       TINY::TTM_MODE::HEADSIZE[0], TINY::TTM_MODE::HEADSIZE[1])    else      super(0, 0, 544, 48)    end      self.windowskin = Cache.system(TINY::TTM_MODE::HSKIN)        set_config    refresh  end     def set_config    self.opacity = TINY::TTM_MODE::HOPACITY    font = Font.new([TINY::TTM_MODE::HEADFONT])    font.bold = TINY::TTM_MODE::HBOLD    font.shadow = TINY::TTM_MODE::HSHADOW    font.size = TINY::TTM_MODE::HFTSIZE    font.out_color = Color.new(0, 0, 0, 128)    self.contents.font = font  end    def refresh    self.contents.clear        self.contents.draw_text(4, -2, self.width - 24, 28, TINY::TTM_VOCAB::VOC_MAPNAME, 1)  end  end # Window_Map_Header#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** NEW Class Sprite_MapBack#╚═=═=════════════════════════════════════════════════════════════════════════=#class Sprite_MapBack < Sprite_Base    def initialize(x, y)    super(nil)    self.z = 11    self.bitmap = Cache.map(TINY::TTM_GENERAL::GRAPHIC_MAP)    define_mode_one(x, y)    @tar_x = self.x    @tar_y = self.y  end    def define_mode_one(x, y)    return unless TINY::TTM_GENERAL::MODE == 1    self.x = x    self.y = y    rect = Rect.new(0, 0, 400, 368)     self.bitmap.stretch_blt(rect, bitmap, self.bitmap.rect)  end    def get_pos    return [self.x, self.y]  end    def get_size    return [self.width, self.height]  end    def jmp_pos    self.x = @tar_x    self.y = @tar_y  end    def upd_pos(x, y)    @tar_x = 0 - x    @tar_y = 0 - y  end    def upd_movement    savescr = TINY::TTM_GENERAL::SCROLLSPEED        if self.x != @tar_x             if TINY::TTM_GENERAL::SCROLLING                if self.x > @tar_x          self.x -= 1          self.x -= savescr-1 if self.x > @tar_x+savescr        else self.x < @tar_x          self.x += 1           self.x += savescr-1 if self.x < @tar_x-savescr        end              else        self.x = @tar_x      end    end        if self.y != @tar_y             if TINY::TTM_GENERAL::SCROLLING                if self.y > @tar_y          self.y -= 1          self.y -= savescr-1 if self.y > @tar_y+savescr         else self.y < @tar_y          self.y += 1           self.y += savescr-1 if self.y < @tar_y-savescr         end              else        self.y = @tar_y      end          end  end    def update    super    upd_movement  end  end # Sprite_MapBack    #╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** NEW Class Sprite_MapTarget#╚═=═=════════════════════════════════════════════════════════════════════════=#class Sprite_MapTargetSet    # Attr  attr_accessor :blink, :target  attr_reader   :target_id, :x, :y    def initialize(x, y, bitmap, id)    @x = x-TINY::TTM_MODE::CURSORX    @y = y-TINY::TTM_MODE::CURSORY    @target = Sprite.new    @target_highlight = Sprite.new    @timer = 0    @blink = false    set_pos(x, y)    set_id(id)    set_visual(bitmap)  end    def local_position    @local_pos = Sprite.new    @local_pos.bitmap = Cache.map(TINY::TTM_GENERAL::GRAPHIC_POS) rescue nil    @local_pos.z = 13  end    def set_pos(x, y)    @target.x = 144+x    @target.y = 48+y    @target.z = 12    @target_highlight.x = @target.x    @target_highlight.y = @target.y    @target_highlight.z = @target.z-1  end    def upd_pos(x, y)    @target.x = TINY::TTM_MODE::CURSORX + @x + x - @target.bitmap.width/2     @target.y = TINY::TTM_MODE::CURSORY + @y + y - @target.bitmap.height/2    @target_highlight.x = @target.x    @target_highlight.y = @target.y    unless @local_pos == nil      @local_pos.x = @target.x - @local_pos.bitmap.width/2      @local_pos.y = @target.y - @target.height    end  end    def set_id(id)    @target_id = id  end    def set_visual(filename)    @target.bitmap = Cache.map(filename)    # Pass new bitmap to work with it separately    @target_highlight.bitmap = Bitmap.new("Graphics/Map/"+filename)    @target.ox = @target.bitmap.width/2    @target.oy = @target.bitmap.height/2    @target_highlight.ox = @target.bitmap.width/2    @target_highlight.oy = @target.bitmap.height/2    @target_highlight.zoom_x = 1.0 + (TINY::TTM_GENERAL::HIGHLIGHT_SIZE/100.0)    @target_highlight.zoom_y = 1.0 + (TINY::TTM_GENERAL::HIGHLIGHT_SIZE/100.0)    TINY::TTM_GENERAL::HIGHLIGHT_SMOOTH_LEVEL.to_i.times do @target_highlight.bitmap.blur end if TINY::TTM_GENERAL::HIGHLIGHT_SMOOTH  end    def dispose    @target.dispose    @target_highlight.dispose    @local_pos.dispose unless @local_pos == nil    @target_id = nil  end    def show_char    return unless @local_pos == nil    local_position  end    def hide_char    return if @local_pos == nil    return if @local_pos.disposed?    @local_pos.dispose   end    def blink_update    @target_highlight.update    unless @blink      @target_highlight.visible = false      return     end    @target_highlight.visible = true    color = Color.new(255, 255, 255)    unless TINY::TTM_GENERAL::BLINK_SELECTED      @target_highlight.flash(color, 90)      return    end    if @timer == 0      @timer = TINY::TTM_GENERAL::BLINK_SPEED/2      @target_highlight.flash(color, TINY::TTM_GENERAL::BLINK_SPEED)    end    @timer -= 1  end    def update    blink_update  end  end # Sprite_MapTarget#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** NEW Class Scene_TinyMap#╚═=═=════════════════════════════════════════════════════════════════════════=#class Scene_TinyMap < Scene_Base    include TINY::TTM_GENERAL    def start    super    @tar = nil    create_windows    create_handler    create_targets    create_map    create_background    set_mappos if MODE == 2  end    def create_windows    @head_window = Window_Map_Header.new    @tar_window = Window_Target_List.new  end    def create_handler    @tar_window.set_handler:)ok,     method:)check_transfer))    @tar_window.set_handler:)cancel, method:)return_scene))  end    def create_targets    @sprites = []    $game_travelmap.targets.each { |tar_id|      arr = TINY::TTM_TARGETS::TARGETS[tar_id][:graphic]      @sprites << Sprite_MapTargetSet.new(arr[0], arr[1], arr[2], tar_id)    }    # Mark player pos    @sprites.each { |e|      val = e.target_id      if  TINY::TTM_TARGETS::TARGETS[val][:teleportdest][0] == $game_map.map_id        e.show_char        return      else        e.hide_char      end    }  end    def create_map    @map = Sprite_MapBack.new(144, 48)    return unless MODE == 2    @map.upd_pos(@map.get_size[0]/2,@map.get_size[1]/2) if $game_travelmap.targets.size == 0    @map.jmp_pos  end    def create_background    @background = Sprite.new    @background.bitmap = Cache.map(BACKGROUND) rescue @background.bitmap = SceneManager.background_bitmap  end    def set_mappos    @sprites.each { |spr|        if spr.target_id == @tar_window.all_targets          @map.upd_pos(spr.x, spr.y)          @map.jmp_pos        end      }  end    def check_transfer    dest = []    return SceneManager.call(Scene_Map) if TINY::TTM_TARGETS::TARGETS[@tar_window.all_targets].nil?    dest = TINY::TTM_TARGETS::TARGETS[@tar_window.all_targets][:teleportdest]    if dest != nil      $game_player.reserve_transfer(dest[0], dest[1], dest[2])      perform_transfer      $game_travelmap.last_target = @tar_window.all_targets    end    SceneManager.call(Scene_Map)  end    def update    super    @map.update if MODE == 2    @sprites.each { |e|       e.update       e.upd_pos(@map.get_pos[0], @map.get_pos[1]) if MODE == 2    }    # Change Properties when target is changing    if @tar != @tar_window.all_targets      @sprites.each { |e|        if e.target_id == @tar_window.all_targets          e.blink = true if HIGHLIGHT_SELECTED          @map.upd_pos(e.x, e.y) if MODE == 2        else          e.blink = false        end      }      @tar = @tar_window.all_targets    end    $game_travelmap.update  end    def perform_transfer    $game_player.perform_transfer  end    def terminate    @sprites.each { |e| e.dispose }    @map.dispose    @background.dispose    super  end  end # Scene_TinyMap#╔═=═══════════════════════════════════════════════════════════════════════════╗#╠══════════════════════════════▲ END OF SCRIPT ▲══════════════════════════════╣#╚═=═=═════════════════════════════════════════════════════════════════════════╝
  

ADDONs

TTM Fade Out Addon 1.1


 

Content:

  - Fades Out if leaving the travel map to a new destination

 


Code:
#╔═=══════════════════════════════════════════════════════════════════════════=##║ Tinys Travel Map //#║ **     Fade Out Addon#║ By TinyMine#║#║  First Published/Erstveröffentlicht 04.06.2014#║#║  Visit : [URL="http://rpgmaker-vx-ace.de/"]http://rpgmaker-vx-ace.de/[/URL] for further Information#║#║  Suggestions? Support? Bugs? Contact me in [URL="http://rpgmaker-vx-ace.de/"]http://rpgmaker-vx-ace.de/[/URL]#║#║  Credits required : TinyMine#║  Commercial Use?  : Contact me in [URL="http://rpgmaker-vx-ace.de/"]http://rpgmaker-vx-ace.de/[/URL]#║  #║  #║ Version : 1.1 // 04.06.2014#╚═=═=════════════════════════════════════════════════════════════════════════=#$imported ||= {}if $imported[:TINY_TTM] == nil  msgbox_p("You need to install \"Tiny Travel Map\" Main Script to use \"Fade Out Addon\"")elsif $imported[:TINY_TTM] < 1.4  msgbox_p("You need to install \"Tiny Travel Map 1.4\" or higher Main Script to use \"Fade Out Addon\"")else$imported[:TINY_TTM_FO] = 1.1#╔═=══════════════════════════════════════════════════════════════════════════=##║ ** UPDATES **#║ #║ 1.1#║ - Now Supports Map Window#║ #╚═=═=════════════════════════════════════════════════════════════════════════=##╔═=══════════════════════════════════════════════════════════════════════════=##║ ** FEATURES **#║ #║ - Fading out of Travel Map when travelling#║ #╚═=═=════════════════════════════════════════════════════════════════════════=#module TINY # Do not touch  module TTM_GENERAL # Do not touch#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** EDITABLE REGION ** Defining TTM General Settings ** EDITABLE REGION **#╚═=═=════════════════════════════════════════════════════════════════════════=#            # Set the Fade Type ( 0 = Black, 1 = White )    FADE_TYPE = 1    # Adjusting the Fade Speed (Default: 30)    FADE_SPEED = 30            #╔═=══════════════════════════════════════════════════════════════════════════=#         #║ █ ** END OF EDITABLE REGION ** BEWARE ** END OF EDITABLE REGION ** DONT! **#║ █ **           Dont edit below this line, except... just don't           **#╚═=═=════════════════════════════════════════════════════════════════════════=#    end # Do not touchend # TINY#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** OLD Class Scene_Map#╚═=═=════════════════════════════════════════════════════════════════════════=#class Scene_Map    # Alias  alias_method :start_addon_fadeout                                      ,:start    def start    start_addon_fadeout    travel_start  end    def travel_start    return unless $game_travelmap.travel_transfer    $game_travelmap.travel_transfer = false    post_transfer  end  end # Scene_Map#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** OLD Class Game_Travelmap#╚═=═=════════════════════════════════════════════════════════════════════════=#class Game_Travelmap    # Attr  attr_accessor :travel_transfer    # Alias  alias_method :initialize_addon_fadeout                            ,:initialize      def initialize    initialize_addon_fadeout    @travel_transfer = false  end  end # Game_Travelmap#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** OLD Class Scene_TinyMap#╚═=═=════════════════════════════════════════════════════════════════════════=#class Scene_TinyMap      # Alias  alias_method :perform_transfer_fade_addon                   ,:perform_transfer  alias_method :check_transfer_fade_addon                       ,:check_transfer    def check_transfer    $game_temp.fade_type = TINY::TTM_GENERAL::FADE_TYPE    check_transfer_fade_addon  end    def perform_transfer    pre_transfer    $game_travelmap.travel_transfer = true    perform_transfer_fade_addon  end    def update_for_fade    update_basic  end    def fade_loop(duration)    duration.times do |i|      yield 255 * (i + 1) / duration      update_for_fade    end  end    def fadeout(duration)    fade_loop(duration) {|v| Graphics.brightness = 255 - v }  end    def white_fadeout(duration)    fade_loop(duration) {|v| @viewport.color.set(255, 255, 255, v) }  end    def pre_transfer    case $game_temp.fade_type    when 0      fadeout(TINY::TTM_GENERAL::FADE_SPEED)    when 1      white_fadeout(TINY::TTM_GENERAL::FADE_SPEED)    end  end  end # Scene_TinyMapend # endif#╔═=═══════════════════════════════════════════════════════════════════════════╗#╠══════════════════════════════▲ END OF SCRIPT ▲══════════════════════════════╣#╚═=═=═════════════════════════════════════════════════════════════════════════╝

 

TTM Map Effects Addon 1.1


 

Content:

    - Change weather/tone of your travel map

 


Code:
#╔═=══════════════════════════════════════════════════════════════════════════=##║ Tinys Travel Map //#║ **     Map Effects Addon#║ By TinyMine#║#║  First Published/Erstveröffentlicht 04.06.2014#║#║  Visit : [URL="http://rpgmaker-vx-ace.de/"]http://rpgmaker-vx-ace.de/[/URL] for further Information#║#║  Suggestions? Support? Bugs? Contact me in [URL="http://rpgmaker-vx-ace.de/"]http://rpgmaker-vx-ace.de/[/URL]#║#║  Credits required : TinyMine#║  Commercial Use?  : Contact me in [URL="http://rpgmaker-vx-ace.de/"]http://rpgmaker-vx-ace.de/[/URL]#║  #║  #║ Version : 1.1 // 14.06.2014#╚═=═=════════════════════════════════════════════════════════════════════════=#$imported ||= {}if $imported[:TINY_TTM] == nil  msgbox_p("You need to install \"Tiny Travel Map\" Main Script to use \"Fade Out Addon\"")elsif $imported[:TINY_TTM] < 1.4  msgbox_p("You need to install \"Tiny Travel Map 1.4\" or higher Main Script to use \"Map Effects Addon\"")else$imported[:TINY_TTM_ME] = 1.1#╔═=══════════════════════════════════════════════════════════════════════════=##║ ** UPDATES **#║ #║ 1.1#║ - Fixed Tints having delay when calling the map#║ #╚═=═=════════════════════════════════════════════════════════════════════════=##╔═=══════════════════════════════════════════════════════════════════════════=##║ ** FEATURES **#║ #║ - Makes it possible to add RGSS Weather Effects to you travel map#║ - Makes it possible to change screen tone of you map/targets#║ #╚═=═=════════════════════════════════════════════════════════════════════════=##╔═=══════════════════════════════════════════════════════════════════════════=##║ ** USAGE INSTRUCTIONS **#║ #║ █  change_map_tone(r, g, #║ Change the Tone of your travel map. r = Red, g = Green, b = Blue#║ #║ █  change_map_weather(type, power)#║ types#║ :rain, :snow, :storm, :none#║ power#║ 0-9#║ #╚═=═=════════════════════════════════════════════════════════════════════════=##╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** OLD Class Game_Interpreter#╚═=═=════════════════════════════════════════════════════════════════════════=#class Game_Interpreter    def change_map_tone(r, g, b, fade=0)    $game_travelmap.screen.start_tone_change(Tone.new(r,g,b,fade)  end    def change_map_weather(type, power, fade=0)    $game_travelmap.screen.change_weather(type, power, fade)  end  end # Game_Interpreter#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** OLD Class Game_Travelmap#╚═=═=════════════════════════════════════════════════════════════════════════=#class Game_Travelmap    # Attr  attr_accessor :screen    # Alias  alias_method :initialize_addon_mapeffects                         ,:initialize  alias_method :update_addon_mapeffects                                 ,:update    def initialize    initialize_addon_mapeffects    @screen = Game_Screen.new  end    def update    update_addon_mapeffects    @screen.update  end  end # Game_Travelmap#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** OLD Class Scene_TinyMap#╚═=═=════════════════════════════════════════════════════════════════════════=#class Scene_TinyMap    # Alias  alias_method :start_addon_mapeffects                                   ,:start  alias_method :update_addon_mapeffects                                 ,:update  alias_method :terminate_addon_mapeffects                           ,:terminate    def start    start_addon_mapeffects    @viewport_weather = Viewport.new(0,0,640, 480)    @viewport_weather.z = 25    @weather = Spriteset_Weather.new(@viewport_weather)    @sprites.each { |e| e.target.tone = $game_travelmap.screen.tone }    @map.tone = $game_travelmap.screen.tone  end    def update    update_addon_mapeffects    @sprites.each { |e| e.target.tone = $game_travelmap.screen.tone }    @map.tone = $game_travelmap.screen.tone    @weather.type = $game_travelmap.screen.weather_type    @weather.power = $game_travelmap.screen.weather_power    @weather.update  end      def terminate    terminate_addon_mapeffects    @weather.dispose  end  end # Scene_TinyMapend #endif#╔═=═══════════════════════════════════════════════════════════════════════════╗#╠══════════════════════════════▲ END OF SCRIPT ▲══════════════════════════════╣#╚═=═=═════════════════════════════════════════════════════════════════════════╝
TTM Text Names Addon


 

Content:

    - Shows the target names in map directly

 


#╔═=══════════════════════════════════════════════════════════════════════════=##║ Tinys Travel Map //#║ **     Text Names Addon#║ By TinyMine#║#║  First Published/Erstveröffentlicht 04.06.2014#║#║  Visit : http://rpgmaker-vx-ace.de/ for further Information#║#║  Suggestions? Support? Bugs? Contact me in http://rpgmaker-vx-ace.de/#║#║  Credits required : TinyMine#║  Commercial Use?  : Contact me in http://rpgmaker-vx-ace.de/#║  #║  #║ Version : 1.0 // 04.06.2014#╚═=═=════════════════════════════════════════════════════════════════════════=#$imported ||= {}if $imported[:TINY_TTM] == nil  msgbox_p("You need to install \"Tiny Travel Map\" Main Script to use \"Fade Out Addon\"")elsif $imported[:TINY_TTM] < 1.4  msgbox_p("You need to install \"Tiny Travel Map 1.4\" or higher Main Script to use \"Map Effects Addon\"")else$imported[:TINY_TTM_TN] = 1.0#╔═=══════════════════════════════════════════════════════════════════════════=##║ ** FEATURES **#║ #║ - Show the Names of the Targets in the Map directly#║ #╚═=═=════════════════════════════════════════════════════════════════════════=#module TINY # Do not touch  module TTM_GENERAL # Do not touch#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** EDITABLE REGION ** Defining TTM General Settings ** EDITABLE REGION **#╚═=═=════════════════════════════════════════════════════════════════════════=#        # Need the default Window?    WINDOW_TARGETS = true        # Font Type    TARGET_FONT_NAME = "VL Gothic"     # Font Size of Name in map    TARGET_FONT_SIZE = 18    # Properties    TARGET_FONT_BOLD = false    TARGET_FONT_SHADOW = false        # Adjustment needed for the Y Pos of the Name in map?    TARGET_NAME_Y_POS = 0    # Adjustment needed for the X Pos of the Name in map?    TARGET_NAME_X_POS = 0        #╔═=══════════════════════════════════════════════════════════════════════════=#         #║ █ ** END OF EDITABLE REGION ** BEWARE ** END OF EDITABLE REGION ** DONT! **#║ █ **           Dont edit below this line, except... just don't           **#╚═=═=════════════════════════════════════════════════════════════════════════=#    end # Do not touchend # TINY#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** OLD Class Sprite_MapTarget#╚═=═=════════════════════════════════════════════════════════════════════════=#class Sprite_MapTargetSet    # Alias  alias_method :initialize_addon_travelnames                        ,:initialize  alias_method :set_pos_addon_travelnames                              ,:set_pos  alias_method :upd_pos_addon_travelnames                              ,:upd_pos  alias_method :set_visual_addon_travelnames                        ,:set_visual  alias_method :dispose_addon_travelnames                              ,:dispose    def initialize(x, y, bitmap, id)    @text = Sprite.new    initialize_addon_travelnames(x, y, bitmap, id)  end    def set_pos(x, y)    set_pos_addon_travelnames(x, y)    @text.x = @target.x    @text.y = @target.y    @text.z = @target.z+1  end    def upd_pos(x, y)    upd_pos_addon_travelnames(x, y)    @text.x = @target.x    @text.y = @target.y  end    def set_visual(filename)    set_visual_addon_travelnames(filename)    @text.bitmap = Bitmap.new(@target.bitmap.width*2, [@target.bitmap.height, TINY::TTM_GENERAL::TARGET_FONT_SIZE].max)    @text.ox = @target.bitmap.width + TINY::TTM_GENERAL::TARGET_NAME_X_POS    @text.oy = @target.bitmap.height/2 + TINY::TTM_GENERAL::TARGET_NAME_Y_POS    set_font_config    @text.bitmap.draw_text(@text.bitmap.rect, TINY::TTM_TARGETS::TARGETS[@target_id][:text], 1)   end    def set_font_config    font = Font.new([TINY::TTM_GENERAL::TARGET_FONT_NAME])    font.bold = TINY::TTM_GENERAL::TARGET_FONT_BOLD    font.shadow = TINY::TTM_GENERAL::TARGET_FONT_SHADOW    font.size = TINY::TTM_GENERAL::TARGET_FONT_SIZE    @text.bitmap.font = font  end    def dispose    @text.dispose    dispose_addon_travelnames  end  end # Sprite_MapTarget#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** OLD Class Sprite_MapTarget#╚═=═=════════════════════════════════════════════════════════════════════════=#class Scene_TinyMap    # Alias  alias_method :create_windows_addon_travelnames                ,:create_windows    def create_windows    create_windows_addon_travelnames    @tar_window.visible = TINY::TTM_GENERAL::WINDOW_TARGETS  end  end # Scene_TinyMapend #endif#╔═=═══════════════════════════════════════════════════════════════════════════╗#╠══════════════════════════════▲ END OF SCRIPT ▲══════════════════════════════╣#╚═=═=═════════════════════════════════════════════════════════════════════════╝

TTM Common Event Addon


 

Content:

    - Instead of porting the player you can also call a common event with TTM for

      each target.

Code:
#╔═=══════════════════════════════════════════════════════════════════════════=##║ Tinys Travel Map //#║ **     Common Event Addon#║ By TinyMine#║#║  First Published/Erstveröffentlicht 08.06.2014#║#║  Visit : [URL="http://rpgmaker-vx-ace.de/"]http://rpgmaker-vx-ace.de/[/URL] for further Information#║#║  Suggestions? Support? Bugs? Contact me in [URL="http://rpgmaker-vx-ace.de/"]http://rpgmaker-vx-ace.de/[/URL]#║#║  Credits required : TinyMine#║  Commercial Use?  : Contact me in [URL="http://rpgmaker-vx-ace.de/"]http://rpgmaker-vx-ace.de/[/URL]#║  #║  #║ Version : 1.0 // 14.06.2014#╚═=═=════════════════════════════════════════════════════════════════════════=#$imported ||= {}if $imported[:TINY_TTM] == nil  msgbox_p("You need to install <Tiny Travel Map> Main Script to use <Common Event Addon>")elsif $imported[:TINY_TTM] < 1.4  msgbox_p("You need to install <Tiny Travel Map 1.4> or higher Main Script to use <Common Event Addon>")else$imported[:TINY_TTM_CE] = 1.0#╔═=══════════════════════════════════════════════════════════════════════════=##║ ** FEATURES **#║ #║ - Instead of porting the player you can also call a common event with TTM for#║   each target.#║ #╚═=═=════════════════════════════════════════════════════════════════════════=#module TINY # Do not touch  module TTM_GENERAL # Do not touch#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** EDITABLE REGION ** Defining TTM General Settings ** EDITABLE REGION **#╚═=═=════════════════════════════════════════════════════════════════════════=#        # Still Port the Player? Or should TTM just be used to call common events for    # each target?    PORT_PLAYER = false            #═=═=═════════════════════════════════════════════════════════════════════════=#   end # Do not touch  module TTM_TARGETS # Do not touch    ADDONS_CE = { # Do not touch#═=═=═════════════════════════════════════════════════════════════════════════=#      # █ EXAMPLE TARGETS    # Use your IDs of your targets for setting up a Common Event for it    # Only Targets that are defined in the Mainscript will be used for this and    # can be upgraded by this feature.        # ID => Common Event ID    :desert     => 1,    :grassland  => 2,    :mountain   => 3,    :tundra     => 4#╔═=══════════════════════════════════════════════════════════════════════════=#         #║ █ ** END OF EDITABLE REGION ** BEWARE ** END OF EDITABLE REGION ** DONT! **#║ █ **           Dont edit below this line, except... just don't           **#╚═=═=════════════════════════════════════════════════════════════════════════=#    } # Do not touch  end # Do not touchend # TINY#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** OLD Class Scene_TinyMap#╚═=═=════════════════════════════════════════════════════════════════════════=#class Scene_TinyMap    alias_method :check_transfer_common_event_addon               ,:check_transfer    def check_transfer    ce_id = TINY::TTM_TARGETS::ADDONS_CE[@tar_window.all_targets]     ce_id = ce_id == nil ? 0 : ce_id    $game_temp.reserve_common_event(ce_id)    unless TINY::TTM_GENERAL::PORT_PLAYER      SceneManager.return      return    end    check_transfer_common_event_addon  end  end # Scene_TinyMapend # endif#╔═=═══════════════════════════════════════════════════════════════════════════╗#╠══════════════════════════════▲ END OF SCRIPT ▲══════════════════════════════╣#╚═=═=═════════════════════════════════════════════════════════════════════════╝



TTM Confirmation Window Addon


 

Content:

     - Adds a Window with further information of the selected target or a picture

     - Information Window is also a confirmation window

Code:
#╔═=══════════════════════════════════════════════════════════════════════════=##║ Tinys Travel Map //#║ **    Confirmation Window Addon#║ By TinyMine#║#║  First Published/Erstveröffentlicht 08.07.2014#║#║  Visit : [URL="http://rpgmaker-vx-ace.de/"]http://rpgmaker-vx-ace.de/[/URL] for further Information#║#║  Suggestions? Support? Bugs? Contact me in [URL="http://rpgmaker-vx-ace.de/"]http://rpgmaker-vx-ace.de/[/URL]#║#║  Credits required : TinyMine#║  Commercial Use?  : Contact me in [URL="http://rpgmaker-vx-ace.de/"]http://rpgmaker-vx-ace.de/[/URL]#║  #║  #║ Version : 1.0 // 08.07.2014#╚═=═=════════════════════════════════════════════════════════════════════════=#$imported ||= {}if $imported[:TINY_TTM] == nil  msgbox_p("You need to install <Tiny Travel Map> Main Script to use <Confirmation Window Addon>")elsif $imported[:TINY_TTM] < 1.41  msgbox_p("You need to install <Tiny Travel Map 1.41> or higher Main Script to use <Confirmation Window Addon>")else$imported[:TINY_TTM_CW] = 1.0#╔═=══════════════════════════════════════════════════════════════════════════=##║ ** FEATURES **#║ #║ - Adds a Window with further information of the selected target or a picture#║ - Information Window is also a confirmation window#║ #╚═=═=════════════════════════════════════════════════════════════════════════=#module TINY # Do not touch  module TTM_MODE # Do not touch#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** EDITABLE REGION ** Defining TTM General Settings ** EDITABLE REGION **#╚═=═=════════════════════════════════════════════════════════════════════════=#      # Defining x/y pos of info window; dont forget the brackets []  INFOPOS      = [350, 100]  # Defining width/height of info window; dont forget the brackets []  INFOSIZE     = [190, 200]  # Defining the Windowskin of your info window; => system folder    INFOSKIN     = "Window"  # Defining the font which should be used in info window  INFOFONT     = "VL Gothic"  # Defines the info windows opacity ( 255 = fully visible)  INFOOPACITY  = 192  # Defines the info windows opacity ( 255 = fully visible)  INFO_BACKOPACITY  = 192      # Defines the fonts size of target name in info window  INFOTTSIZE   = 24  # Defines if name text is bold  INFOTTBOLD   = true  # Defines if name text has shadow  INFOTTSHADOW = true    # Defines the fonts size of the info text  INFOFTSIZE   = 18  # Defines if info text font is bold  INFOFTBOLD   = false  # Defines if info text has shadow  INFOFTSHADOW = false    # Defines the fonts size of confirm text in info window  INFOCTSIZE   = 24  # Defines if confirm text is bold  INFOCTBOLD   = false  # Defines if confirm text has shadow  INFOCTSHADOW = true    #═=═=═════════════════════════════════════════════════════════════════════════=#   end # Do not touch  module TTM_VOCAB # Do not touch#═=═=═════════════════════════════════════════════════════════════════════════=#            # Confirm Text    CONFIRM = "Travel"        #═=═=═════════════════════════════════════════════════════════════════════════=#      end # Do not touch  module TTM_TARGETS # Do not touch    ADDONS_CW = { # Do not touch#═=═=═════════════════════════════════════════════════════════════════════════=#      # █ EXAMPLE TARGETS    # Use your IDs of your targets for passing a info text to the window    # Only Targets that are defined in the Mainscript will be used for this and    # can be upgraded by this feature.        # ID => Info Text    # You can also use PNG Files by their filename which will be drawn into the     # center of the window. A Image will be detected by putting .png to the end     # of the string/text    # Example:    #   :desert => "A_Picture.png"        :desert     => "Just a dry place;\nSome people say\nthere would be\ntreasures though.",    :grassland  => "The wide and bright\nfields of grassland.\nFarmers call this\ntheir home.",    :mountain   => "Big mountains seem to\nbe the rulers of\nthe world in this\nplace.",    :tundra     => "Eternity rests between\nsnow and ice."    #╔═=══════════════════════════════════════════════════════════════════════════=#         #║ █ ** END OF EDITABLE REGION ** BEWARE ** END OF EDITABLE REGION ** DONT! **#║ █ **           Dont edit below this line, except... just don't           **#╚═=═=════════════════════════════════════════════════════════════════════════=#    } # Do not touch  end # Do not touchend # TINY#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** OLD Class Scene_TinyMap#╚═=═=════════════════════════════════════════════════════════════════════════=#class Scene_TinyMap    alias_method :create_handler_info_window_addon                ,:create_handler  alias_method :create_windows_info_window_addon                ,:create_windows    def create_windows    create_windows_info_window_addon    @info_window = Window_Target_Info.new  end      def create_handler    create_handler_info_window_addon    @tar_window.set_handler(:ok,     method(:open_info_window))    @tar_window.set_handler(:cancel, method(:return_scene))    @info_window.set_handler(:ok,    method(:check_transfer))    @info_window.set_handler(:cancel,method(:close_info_window))  end    def close_info_window    @info_window.close    @info_window.deactivate    @tar_window.activate  end    def open_info_window    @info_window.refresh(@tar_window.all_targets)    @info_window.open unless $game_travelmap.targets.empty?    @info_window.activate    @tar_window.deactivate  end    end # Scene_TinyMap#╔═=══════════════════════════════════════════════════════════════════════════=##║ █ ** New Class Window_Target_Info#╚═=═=════════════════════════════════════════════════════════════════════════=#class Window_Target_Info < Window_Selectable    def initialize    super(TINY::TTM_MODE::INFOPOS[0], TINY::TTM_MODE::INFOPOS[1],    TINY::TTM_MODE::INFOSIZE[0], TINY::TTM_MODE::INFOSIZE[1])    deactivate    self.openness = 0    @index = 0    set_config  end    def col_max    return 1  end    def item_max    return 1  end    def item_width    contents.width  end    def line_height    return TINY::TTM_MODE::INFOFTSIZE  end    def item_rect(index)    rect = Rect.new    f = Font.new    rect.width = contents.text_size(TINY::TTM_VOCAB::CONFIRM).width + 10    rect.height = TINY::TTM_MODE::INFOCTSIZE    rect.x = index % col_max * (item_width + spacing) + (contents.width/2 - rect.width/2)    rect.y = contents.height - TINY::TTM_MODE::INFOCTSIZE    rect  end    def draw_text_ex(x, y, text)    text = convert_escape_characters(text)    pos = {:x => x, :y => y, :new_x => x, :height => calc_line_height(text)}    process_character(text.slice!(0, 1), text, pos) until text.empty?  end    def draw_line(x, y, width)    contents.fill_rect(x, y, width, 1, Color.new(255,255,255,160))  end    def set_config    self.back_opacity = TINY::TTM_MODE::INFO_BACKOPACITY    self.opacity = TINY::TTM_MODE::INFOOPACITY    font = Font.new([TINY::TTM_MODE::INFOFONT])    font.size = TINY::TTM_MODE::INFOFTSIZE    font.out_color = Color.new(0, 0, 0, 128)    self.contents.font = font  end    def refresh(item)    if $game_travelmap.targets.empty?      process_ok       return    end    contents.clear    # Draw Titel stuff (line + name)      contents.font.color  = normal_color    contents.font.bold   = TINY::TTM_MODE::INFOTTBOLD    contents.font.shadow = TINY::TTM_MODE::INFOTTSHADOW    contents.font.size   = TINY::TTM_MODE::INFOTTSIZE    align_middle_x = contents.width/2 - contents.text_size(TINY::TTM_TARGETS::TARGETS[item][:text]).width/2    draw_text_ex(align_middle_x,0, TINY::TTM_TARGETS::TARGETS[item][:text])    draw_line(0, contents.font.size, self.width)    # Draw Picture or Text     begin    if TINY::TTM_TARGETS::ADDONS_CW[item][-4, 4].downcase == ".png"      bitmap = Cache.map(TINY::TTM_TARGETS::ADDONS_CW[item])      x = contents.width/2 - bitmap.width/2      y = contents.height/2 - bitmap.height/2      contents.blt(x, y, bitmap, bitmap.rect)    else      contents.font.bold   = TINY::TTM_MODE::INFOFTBOLD      contents.font.shadow = TINY::TTM_MODE::INFOFTSHADOW      contents.font.size   = TINY::TTM_MODE::INFOFTSIZE      draw_text_ex(0, TINY::TTM_MODE::INFOTTSIZE + 2, TINY::TTM_TARGETS::ADDONS_CW[item])    end    rescue      p "There was no info to that target #{item}. On purpose?"    end    # Draw Confirm stuff (selection)    contents.font.color  = normal_color    contents.font.size   = TINY::TTM_MODE::INFOCTSIZE    contents.font.bold   = TINY::TTM_MODE::INFOCTBOLD    contents.font.shadow = TINY::TTM_MODE::INFOCTSHADOW    align_middle_x = contents.width/2 - contents.text_size(TINY::TTM_VOCAB::CONFIRM).width/2    draw_text_ex(align_middle_x, contents.height - contents.font.size, TINY::TTM_VOCAB::CONFIRM)  endend # Window_Target_Infoend # endif#╔═=═══════════════════════════════════════════════════════════════════════════╗#╠══════════════════════════════▲ END OF SCRIPT ▲══════════════════════════════╣#╚═=═=═════════════════════════════════════════════════════════════════════════╝

Known Issues :
 
- In 1.4 - problems when loading savegames (older versions work fine and 1.41 fixed it)
 
Planned Features : 
 
- Share your wishes/suggestions with me!
 
Thanks go to :
 
- PandaMaru for her beautiful demo graphics
 
Demo is up to date contents following addons: Map Effects, Fade Out, Names in Map, Confirmation Window

TinyMap Demo 1.41.zip
 

Attachments

  • TinyMap Demo 1.41.zip
    323 bytes · Views: 510
Last edited by a moderator:

Oriceles

Veteran
Veteran
Joined
Apr 4, 2012
Messages
384
Reaction score
72
First Language
English
Primarily Uses
N/A
This is making me think about not using a world map on my game and that could save me a lot of time...

I'm gonna try this!
 

TinyMine

Veteran
Veteran
Joined
Oct 26, 2013
Messages
53
Reaction score
54
First Language
German
Primarily Uses
Sweet Oriceles, let me know if you are comfortable with it!

Regards
 

ShinGamix

DS Style 4Ever!
Veteran
Joined
Mar 18, 2012
Messages
3,936
Reaction score
503
First Language
April Fools
Primarily Uses
N/A
I wanted to use this but it sadly conflicts with littledrago's core script.
 

TinyMine

Veteran
Veteran
Joined
Oct 26, 2013
Messages
53
Reaction score
54
First Language
German
Primarily Uses
I don't know this Script. My Script has high compatibility - nothing got overwritten and the scene itself uses new classes only. You can link it and i will have a look - he must have overwritten some vanilla methods.

edit : I found little dragos core script and tested it with my script - no problems occured for me?! All seemed to work - no errors.
 
Last edited by a moderator:

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
423
Reaction score
206
First Language
Finnish
Primarily Uses
This script looks awesome. What are your terms of use? I'm interested in using this in a commercial game.

I'd like to know if it is possible to add fade out and fade in when the player transfers (and tints/weather effects/other script calls). In the demo the player transfers immediately and it doesn't look so good. Also, would like to have the selected target with white outlines rather than fully white (You really can't see the details of the target "icon" so it's hard to see if it is pyramid, iglo etc..).
 

TinyMine

Veteran
Veteran
Joined
Oct 26, 2013
Messages
53
Reaction score
54
First Language
German
Primarily Uses
Finally some nice suggestions I can think of to add :) Thank you for your feedback. Stay tuned!
 
Last edited by a moderator:

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
423
Reaction score
206
First Language
Finnish
Primarily Uses
I was planning on using this with a vehicle interior script (http://www.rpgmakervxace.net/topic/1865-csca-vehicle-interiors/) like this:

I board my Airship and go to it's interior. In the Cabin I'd find the world map (this script) which would serve as your quick travel. By choosing a location it would transfer the player and the airship to the location desired on the "real" world map (field tileset in the editor) where you can move around. Nice script overall, really like the ability to have a real map made by artists in my game.
 

TinyMine

Veteran
Veteran
Joined
Oct 26, 2013
Messages
53
Reaction score
54
First Language
German
Primarily Uses
Big update on this one:
 
Mainscript: 1.4
- New highlight options and effect
- Addon Compatibility
 
3 new Addons:
Fade Out Addon
- Fades out of Travel Map now when entering a new area through it
Map Effects Addon
- Change Weather and Tone for your travel map
Text Names Addon
- Show text(name) of destinations directly in map

Mini post-update:

Fade Out Addon 1.1
- Fades into map like normal map to map now

Demo contents all Addons in their newest versions!
 
Last edited by a moderator:

Kitasume

Warper
Member
Joined
Jul 28, 2013
Messages
1
Reaction score
0
First Language
English
Primarily Uses
I love you for this update.
Small problem though. When you change the tint of the map it doesn't show instantly. It stays normal for half a second before tinting.
 
Last edited by a moderator:

TinyMine

Veteran
Veteran
Joined
Oct 26, 2013
Messages
53
Reaction score
54
First Language
German
Primarily Uses
Ouch - You are right! I forgot a mini-thing ^^ Sorry for this - update will come in some minutes!

Edit:

Ok... it should work now. I also added a new Addon in the process.

The Demo is up to date with the new Map effect addon. 

Updates:

Map Effects Addon 1.1

- Fixed delay of tint

 

new Addon:

Common Event Addon

- Instead of porting the player you can also call a common event with TTM for

each target.
 
Last edited by a moderator:

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
423
Reaction score
206
First Language
Finnish
Primarily Uses
Nice! Will check it when I get back home from vacation!


Sent from my GT-P5210 using Tapatalk
 

TinyMine

Veteran
Veteran
Joined
Oct 26, 2013
Messages
53
Reaction score
54
First Language
German
Primarily Uses
IMPORTANT Updates:

Mainscript 1.41

- Fixed: Script will no longer cause problems when loading savegames
 

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
423
Reaction score
206
First Language
Finnish
Primarily Uses
Hello again, I'm back! I added this updated script to my game. Got this error for that Weather effects addon:

Line 68: Syntax error

unexpected ',', expecting ')'

 $game_travelmap.screen.start_tone_change(Tone.new(r,g,, fade)

The correct line is $game_travelmap.screen.start_tone_change(Tone.new(r,g, B) , fade)

You have the correct script in your DEMO, your first post containing the Weather effects addon separately has the error in the line.
 
Last edited by a moderator:

TinyMine

Veteran
Veteran
Joined
Oct 26, 2013
Messages
53
Reaction score
54
First Language
German
Primarily Uses
Thanks RaZzi. I corrected it. This is a smiley problem. Sometimes when I add code here it is not in code tags anymore when editing in full editor. Kinda strange. At least Demo is working all fine *g*
 

TinyMine

Veteran
Veteran
Joined
Oct 26, 2013
Messages
53
Reaction score
54
First Language
German
Primarily Uses
new Addon:

Confirmation Window Addon

- Adds a Window with further information of the selected target or a picture

- Information Window is also a confirmation window

 

new Demo:

Little bit more love in it ;)
 

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
423
Reaction score
206
First Language
Finnish
Primarily Uses
Good work, just added the new addon! :)
 

Noamancy

Veteran
Veteran
Joined
Nov 3, 2014
Messages
45
Reaction score
7
First Language
English
Primarily Uses
RMVXA
I'll start by saying, this script is beautiful! I've not found anything like it that can be manipulated with decent ease. I'm very happy to have stumbled upon this.

On the flip side, I did run into a slight issue with it, and I wasn't sure if I should post here for your support, or seek out help from the support area.

Intermittently I get this error:

Script 'Tinys Travel Map' line 614: NoMethodError occured

undefined method 'width' for nil:NilClass
No idea what's causing it, but it only happens when I try to open the map AFTER opening a port point. Sometimes, it'll only happen after opening a second point via an event - it's pretty random.

It used to have no problems, until I started actually trying to teleport. After the first successful port, it broke on when I attempt the second one and hasn't worked since, even after re adding it. 

I am using 2 test points, "Debug" and "Test"

Here's the full code:

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ Tinys Travel Map

#║ By TinyMine

#║

#║  First Published/Erstveröffentlicht 09.07.2013

#║

#║  Visit : http://rpgmaker-vx-ace.de/ for further Information

#║

#║  Suggestions? Support? Bugs? Contact me in http://rpgmaker-vx-ace.de/

#║

#║  Credits required : TinyMine

#║  Commercial Use?  : Contact me in http://rpgmaker-vx-ace.de/

#║  

#║  

#║ Version : 1.41 // 04.06.2014

#╚═=═=════════════════════════════════════════════════════════════════════════=#

 

 

$imported ||= {}

$imported[:TINY_TTM] = 1.41

 

 

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ ** UPDATES **

#║ 

#║ 1.41

#║ - FIXED: No more Savegame error

#║ 

#║ 1.4

#║ - New Highlight Options

#║ - New Highlight Effect (replacing old one)

#║ - New Addon Compatibility

#║ 

#╚═=═=════════════════════════════════════════════════════════════════════════=#

 

 

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ ** FEATURES **

#║ 

#║ - Use a map image to fasttravel across it

#║ - 2 Modifications

#║    Mode 1 : For small maps

#║    Mode 2 : For big maps

#║ - Own targets placeable

#║ - Everything is adjustable by you (Graphics, names, fonts etc...)

#║ - New folder "Map" for your map scene

#║ 

#╚═=═=════════════════════════════════════════════════════════════════════════=#

 

 

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ ** USAGE INSTRUCTIONS **

#║ 

#║ Adding a target during game progress to your map

#║ █  add_map_target(ID)

#║ Where ID is the ID of your target you want to add

#║ 

#║ Removing a target during game progress from your map

#║ █  rem_map_target(ID)

#║ Where ID is the ID of your target you want to remove

#║ 

#║ Calling the scene to travel across your map, type...

#║ █  open_travel_map

#║ Which opens the Scene_TinyMap automatically

#║ 

#╚═=═=════════════════════════════════════════════════════════════════════════=#

 

 

module TINY # Do not touch

  module TTM_GENERAL # Do not touch

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ █ ** EDITABLE REGION ** Defining TTM General Settings ** EDITABLE REGION **

#╚═=═=════════════════════════════════════════════════════════════════════════=#

    

    # Defines the map graphic image name which is found in new "map" folder

    GRAPHIC_MAP = "MapBig"

    

    # Graphic which shows the players position on the map

    GRAPHIC_POS = "Pin"

    

    # Defines the background image name which is found in new "map" folder

    # "" for black screen

    BACKGROUND = ""

    

    # Defines used mode in your game

    MODE = 2

    

    # Mode 1 : Resize the map to 400x368px. All "added" targets visible and selectable

    # Mode 2 : For bigger maps. No resizing. Scrolling across the map between "added" targets

    

    # Do you want to scroll or jump across MODE 2 maps? (true = scroll)

    SCROLLING = true

    # Scrollspeed is calculated by px/frame (frame is 1/60 second)

    SCROLLSPEED = 10

    

    # Should a menu point be visible for the map?

    MENUPOINT = true

    

    # Highlight Options

    HIGHLIGHT_SELECTED = true

    # Highlight Size // 10-20 recommended

    HIGHLIGHT_SIZE     = 20

    # Shall the Highlight effect be smooth or not

    HIGHLIGHT_SMOOTH   = false

    # the higher the level the higher the blur (1 = lowest)

    HIGHLIGHT_SMOOTH_LEVEL = 1

    # Blink the selected target if HIGHLIGHT_SELECTED is true

    BLINK_SELECTED = true

    # The lower the faster

    BLINK_SPEED    = 60

 

 

#═=═=═════════════════════════════════════════════════════════════════════════=#    

  end # Do not touch

  module TTM_VOCAB # Do not touch

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ █ ** EDITABLE REGION **    Defining TTM Vocab          ** EDITABLE REGION **

#╚═=═=════════════════════════════════════════════════════════════════════════=#

    

    # Headername for the travel map

    VOC_MAPNAME = "A beautiful land"

    

    # Name of menu point if activated

    VOC_MENUNAME = "Map"

    

    

#═=═=═════════════════════════════════════════════════════════════════════════=#    

  end # Do not touch

  module TTM_TARGETS # Do not touch

    TARGETS = {  # Do not touch

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ █ ** EDITABLE REGION **    Defining TTM Targets        ** EDITABLE REGION **

#╚═=═=════════════════════════════════════════════════════════════════════════=#

    

    #█ EXAMPLE TARGETS # ** Dont change the Data packs symbols - use them everytime

    

    # Target id    # Data packs  #  "Target name"

      :desert => {:text         => "Desert",

                                 # [ Target x, Target y, "graphicname in map folder", icon id ] 

                  :graphic      => [400, 400,"wüste", 232],

                                 # [ Mapid, Mapx, Mapy ]

                  :teleportdest => [3, 16, 6]

          }, # Don't forget comma if another target follows    

                    

      :tundra =>  {:text         =>  "Tundra",

                   :graphic      =>  [500, 1100,"tundra", 232],

                   :teleportdest =>  [4, 8, 0]

                   

          },

      :grassland =>{:text         =>  "Grasland",

                    :graphic      =>  [1200, 1100,"wiese", 232],

                    :teleportdest =>  [1, 8, 12]

                  

          },

      :mountain => { :text         => "Mountain",

                     :graphic      => [1200, 1000,"berge", 232],

                     :teleportdest => [2, 0, 6]

                  

          }, # Don't put a comma if it is the last target 

                                   

     #█ OWN TARGETS                   

                                   

                                   

          :debug => {:text      => "Debug",

                                 # [ Target x, Target y, "graphicname in map folder", icon id ] 

                  :graphic      => [400, 400,"castle1", 232],

                                 # [ Mapid, Mapx, Mapy ]

                  :teleportdest => [2, 040, 030]

          },  

          :test => {:text         =>  "Test",

                    :graphic      =>  [1200, 1000,"crystalm", 232],

                    :teleportdest =>  [1, 004, 004]

                   

          }                         

                                   

                                   

                                   

                                   

#═=═=═════════════════════════════════════════════════════════════════════════=#  

    } # end targets hash * Do not touch

  end # Do not touch  

  module TTM_MODE # Do not touch

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ █ ** EDITABLE REGION **  Defining TTM MODE General   ** EDITABLE REGION **

#╚═=═=════════════════════════════════════════════════════════════════════════=#

  

  # █ ** all x/y, width/height adjustments only affect MODE 2

  

  # Defining the "cursors" position when scrolling/jumping on the map by x/y px

  CURSORX = 300

  CURSORY = 208

  

  # Defining x/y pos of header window; dont forget the brackets []

  HEADPOS   = [0, 0] 

  # Defining width/height of header window; dont forget the brackets []

  HEADSIZE  = [544, 48] 

  # Defining the Windowskin of your header window; => system folder            

  HSKIN     = "Window"        

  # Defining the font which should be used in header window

  HEADFONT  = "VL Gothic"              

  # Defines the fonts size in header window

  HFTSIZE   = 26   

  # Defines if font is bold

  HBOLD   = true

  # Defines if font has shadow

  HSHADOW   = true                  

  # Defines the header windows opacity ( 255 = fully visible)

  HOPACITY   = 0    

 

 

  # Defining x/y pos of target list window; dont forget the brackets []

  LISTPOS   = [24, 96]

  # Defining width/height of target list window; dont forget the brackets []

  LISTSIZE  = [144, 200]

  # Defining the Windowskin of your target list window; => system folder  

  LSKIN     = "Window"

  # Defining the font which should be used in target list window

  LISTFONT  = "VL Gothic"

  # Defines the fonts size in target list window

  LFTSIZE   = 22 

  # Defines if font is bold

  LBOLD   = false

  # Defines if font has shadow

  LSHADOW   = false

  # Defines the target list windows opacity ( 255 = fully visible)

  LOPACITY   = 192

 

 

#═=═=═════════════════════════════════════════════════════════════════════════=# 

  end # Do not touch

#╔═=══════════════════════════════════════════════════════════════════════════=#         

#║ █ ** END OF EDITABLE REGION ** BEWARE ** END OF EDITABLE REGION ** DONT! **

#║ █ **           Dont edit below this line, except... just don't           **

#╚═=═=════════════════════════════════════════════════════════════════════════=#

end

 

 

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ █ ** OLD Module Cache

#╚═=═=════════════════════════════════════════════════════════════════════════=#

module Cache

  

  # Loads from a new folder to developers graphic folder

  def self.map(filename)

    load_bitmap("Graphics/Map/", filename)

  end

 

 

end # Cache

 

 

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ █ ** OLD Module DataManager

#╚═=═=════════════════════════════════════════════════════════════════════════=#

module DataManager

  

  class << self

    alias_method :create_game_objects_tiny_13177           ,:create_game_objects

    alias_method :make_save_contents_tiny_45774             ,:make_save_contents

    alias_method :extract_save_contents_tiny_89733       ,:extract_save_contents

  end

  

  def self.create_game_objects

    create_game_objects_tiny_13177

    $game_travelmap = Game_Travelmap.new

  end  

  

  def self.make_save_contents

    contents = make_save_contents_tiny_45774

    contents[:travelmap] = $game_travelmap

    contents

  end

  

  def self.extract_save_contents(contents)

    extract_save_contents_tiny_89733(contents)

    $game_travelmap     = contents[:travelmap]

  end

  

end # DataManager

 

 

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ █ ** OLD Class Game_Interpreter

#╚═=═=════════════════════════════════════════════════════════════════════════=#

class Game_Interpreter

  

  # Command adding predefined targets to travel map

  def add_map_target(id)

    $game_travelmap.add_map_target(id)

  end

  

  # Command removing predefined targets from travel map

  def rem_map_target(id)

    $game_travelmap.rem_map_target(id)

  end

  

  # Command for opening the travel scene

  def open_travel_map

    SceneManager.call(Scene_TinyMap)

  end

  

end # Game_Interpreter

 

 

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ █ ** OLD Class Game_Map

#╚═=═=════════════════════════════════════════════════════════════════════════=#

class Game_Map

  

  # Attr

  attr_reader    :map_id

  

end # Game_Map

 

 

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ █ ** OLD Class Window_MenuCommand

#╚═=═=════════════════════════════════════════════════════════════════════════=#

class Window_MenuCommand

  # Only change class when active

  if TINY::TTM_GENERAL::MENUPOINT

    

  # Alias

  alias_method :tiny_tinymap_add_commands_23498     ,     :add_original_commands

  

  def add_original_commands

    tiny_tinymap_add_commands_23498

    add_command(TINY::TTM_VOCAB::VOC_MENUNAME,:map,main_commands_enabled)

  end

  

  end # end of if

end # Window_MenuCommand

 

 

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ █ ** OLD Class Scene_Menu

#╚═=═=════════════════════════════════════════════════════════════════════════=#

class Scene_Menu

  # Only change class when active

  if TINY::TTM_GENERAL::MENUPOINT

  

  # Alias

  alias_method :tiny_tinymap_set_handlers_17348     ,     :create_command_window

  

  def create_command_window

    tiny_tinymap_set_handlers_17348 

    @command_window.set_handler:)map,method:)call_tinymap))

  end

  

  def call_tinymap

    SceneManager.call(Scene_TinyMap)

  end

  

  end # end of if

end # Scene_Menu

 

 

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ █ ** NEW Class Game_Travelmap

#╚═=═=════════════════════════════════════════════════════════════════════════=#

class Game_Travelmap

  

  # Attr

  attr_reader   :targets

  attr_accessor :last_target

  

  def initialize

    @targets = []

    @last_target = nil

  end

  

  def add_map_target(id)

    return if @targets.include?(id)

    @targets << id if TINY::TTM_TARGETS::TARGETS[id]

    @last_target = id

  end

  

  def rem_map_target(id)

    return unless @targets.include?(id)

    @targets.delete(id)

  end

  

  def update

    # Future Use

  end

  

end # Game_Travelmap

 

 

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ █ ** NEW Class Window_Target_List

#╚═=═=════════════════════════════════════════════════════════════════════════=#

class Window_Target_List < Window_Selectable

  

  def initialize

    if TINY::TTM_GENERAL::MODE == 2

      super(TINY::TTM_MODE::LISTPOS[0], TINY::TTM_MODE::LISTPOS[1], 

      TINY::TTM_MODE::LISTSIZE[0], TINY::TTM_MODE::LISTSIZE[1])

    else

      super(0, 48, 144, 368)

    end

  

    self.windowskin = Cache.system(TINY::TTM_MODE::LSKIN)

    

    self.index = $game_travelmap.targets.index($game_travelmap.last_target) unless $game_travelmap.targets.empty?

    activate

    set_config

    refresh

  end

  

  def item_max

    $game_travelmap.targets.size

  end

  

  def all_targets

    return @list[index]

  end

  

  def set_config

    self.opacity = TINY::TTM_MODE::LOPACITY

    font = Font.new([TINY::TTM_MODE::HEADFONT])

    font.bold = TINY::TTM_MODE::LBOLD

    font.shadow = TINY::TTM_MODE::LSHADOW

    font.size = TINY::TTM_MODE::HFTSIZE

    font.out_color = Color.new(0, 0, 0, 128)

    self.contents.font = font

  end

 

 

  def refresh

    

    self.contents.clear

    

    @list ||= []

    for i in 0..item_max-1

      e = $game_travelmap.targets

      @list << e

      draw_icon(TINY::TTM_TARGETS::TARGETS[e][:graphic][3], 0, i * 24)

      self.contents.draw_text(24, i * 24, self.width - 24, 24, TINY::TTM_TARGETS::TARGETS[e][:text])

    end

    

  end

  

end # Window_Target_List

 

 

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ █ ** NEW Class Window_Map_Header

#╚═=═=════════════════════════════════════════════════════════════════════════=#

class Window_Map_Header < Window_Base

 

 

  def initialize

    if TINY::TTM_GENERAL::MODE == 2

      super(TINY::TTM_MODE::HEADPOS[0], TINY::TTM_MODE::HEADPOS[1], 

      TINY::TTM_MODE::HEADSIZE[0], TINY::TTM_MODE::HEADSIZE[1])

    else

      super(0, 0, 544, 48)

    end

  

    self.windowskin = Cache.system(TINY::TTM_MODE::HSKIN)

    

    set_config

    refresh

  end 

  

  def set_config

    self.opacity = TINY::TTM_MODE::HOPACITY

    font = Font.new([TINY::TTM_MODE::HEADFONT])

    font.bold = TINY::TTM_MODE::HBOLD

    font.shadow = TINY::TTM_MODE::HSHADOW

    font.size = TINY::TTM_MODE::HFTSIZE

    font.out_color = Color.new(0, 0, 0, 128)

    self.contents.font = font

  end

  

  def refresh

    self.contents.clear

    

    self.contents.draw_text(4, -2, self.width - 24, 28, TINY::TTM_VOCAB::VOC_MAPNAME, 1)

  end

  

end # Window_Map_Header

 

 

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ █ ** NEW Class Sprite_MapBack

#╚═=═=════════════════════════════════════════════════════════════════════════=#

class Sprite_MapBack < Sprite_Base

  

  def initialize(x, y)

    super(nil)

    self.z = 11

    self.bitmap = Cache.map(TINY::TTM_GENERAL::GRAPHIC_MAP)

    define_mode_one(x, y)

    @tar_x = self.x

    @tar_y = self.y

  end

  

  def define_mode_one(x, y)

    return unless TINY::TTM_GENERAL::MODE == 1

    self.x = x

    self.y = y

    rect = Rect.new(0, 0, 400, 368) 

    self.bitmap.stretch_blt(rect, bitmap, self.bitmap.rect)

  end

  

  def get_pos

    return [self.x, self.y]

  end

  

  def get_size

    return [self.width, self.height]

  end

  

  def jmp_pos

    self.x = @tar_x

    self.y = @tar_y

  end

  

  def upd_pos(x, y)

    @tar_x = 0 - x

    @tar_y = 0 - y

  end

  

  def upd_movement

    savescr = TINY::TTM_GENERAL::SCROLLSPEED

    

    if self.x != @tar_x 

      

      if TINY::TTM_GENERAL::SCROLLING

        

        if self.x > @tar_x

          self.x -= 1

          self.x -= savescr-1 if self.x > @tar_x+savescr

        else self.x < @tar_x

          self.x += 1 

          self.x += savescr-1 if self.x < @tar_x-savescr

        end

        

      else

        self.x = @tar_x

      end

    end

    

    if self.y != @tar_y 

      

      if TINY::TTM_GENERAL::SCROLLING

        

        if self.y > @tar_y

          self.y -= 1

          self.y -= savescr-1 if self.y > @tar_y+savescr 

        else self.y < @tar_y

          self.y += 1 

          self.y += savescr-1 if self.y < @tar_y-savescr 

        end

        

      else

        self.y = @tar_y

      end

      

    end

  end

  

  def update

    super

    upd_movement

  end

  

end # Sprite_MapBack

    

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ █ ** NEW Class Sprite_MapTarget

#╚═=═=════════════════════════════════════════════════════════════════════════=#

class Sprite_MapTargetSet

  

  # Attr

  attr_accessor :blink, :target

  attr_reader   :target_id, :x, :y

  

  def initialize(x, y, bitmap, id)

    @x = x-TINY::TTM_MODE::CURSORX

    @y = y-TINY::TTM_MODE::CURSORY

    @target = Sprite.new

    @target_highlight = Sprite.new

    @timer = 0

    @blink = false

    set_pos(x, y)

    set_id(id)

    set_visual(bitmap)

  end

  

  def local_position

    @local_pos = Sprite.new

    @local_pos.bitmap = Cache.map(TINY::TTM_GENERAL::GRAPHIC_POS) rescue nil

    @local_pos.z = 13

  end

  

  def set_pos(x, y)

    @target.x = 144+x

    @target.y = 48+y

    @target.z = 12

    @target_highlight.x = @target.x

    @target_highlight.y = @target.y

    @target_highlight.z = @target.z-1

  end

  

  def upd_pos(x, y)

    @target.x = TINY::TTM_MODE::CURSORX + @x + x - @target.bitmap.width/2 

    @target.y = TINY::TTM_MODE::CURSORY + @y + y - @target.bitmap.height/2

    @target_highlight.x = @target.x

    @target_highlight.y = @target.y

    unless @local_pos == nil

      @local_pos.x = @target.x - @local_pos.bitmap.width/2

      @local_pos.y = @target.y - @target.height

    end

  end

  

  def set_id(id)

    @target_id = id

  end

  

  def set_visual(filename)

    @target.bitmap = Cache.map(filename)

    # Pass new bitmap to work with it separately

    @target_highlight.bitmap = Bitmap.new("Graphics/Map/"+filename)

    @target.ox = @target.bitmap.width/2

    @target.oy = @target.bitmap.height/2

    @target_highlight.ox = @target.bitmap.width/2

    @target_highlight.oy = @target.bitmap.height/2

    @target_highlight.zoom_x = 1.0 + (TINY::TTM_GENERAL::HIGHLIGHT_SIZE/100.0)

    @target_highlight.zoom_y = 1.0 + (TINY::TTM_GENERAL::HIGHLIGHT_SIZE/100.0)

    TINY::TTM_GENERAL::HIGHLIGHT_SMOOTH_LEVEL.to_i.times do @target_highlight.bitmap.blur end if TINY::TTM_GENERAL::HIGHLIGHT_SMOOTH

  end

  

  def dispose

    @target.dispose

    @target_highlight.dispose

    @local_pos.dispose unless @local_pos == nil

    @target_id = nil

  end

  

  def show_char

    return unless @local_pos == nil

    local_position

  end

  

  def hide_char

    return if @local_pos == nil

    return if @local_pos.disposed?

    @local_pos.dispose 

  end

  

  def blink_update

    @target_highlight.update

    unless @blink

      @target_highlight.visible = false

      return 

    end

    @target_highlight.visible = true

    color = Color.new(255, 255, 255)

    unless TINY::TTM_GENERAL::BLINK_SELECTED

      @target_highlight.flash(color, 90)

      return

    end

    if @timer == 0

      @timer = TINY::TTM_GENERAL::BLINK_SPEED/2

      @target_highlight.flash(color, TINY::TTM_GENERAL::BLINK_SPEED)

    end

    @timer -= 1

  end

  

  def update

    blink_update

  end

  

end # Sprite_MapTarget

 

 

#╔═=══════════════════════════════════════════════════════════════════════════=#

#║ █ ** NEW Class Scene_TinyMap

#╚═=═=════════════════════════════════════════════════════════════════════════=#

class Scene_TinyMap < Scene_Base

  

  include TINY::TTM_GENERAL

  

  def start

    super

    @tar = nil

    create_windows

    create_handler

    create_targets

    create_map

    create_background

    set_mappos if MODE == 2

  end

  

  def create_windows

    @head_window = Window_Map_Header.new

    @tar_window = Window_Target_List.new

  end

  

  def create_handler

    @tar_window.set_handler:)ok,     method:)check_transfer))

    @tar_window.set_handler:)cancel, method:)return_scene))

  end

  

  def create_targets

    @sprites = []

    $game_travelmap.targets.each { |tar_id|

      arr = TINY::TTM_TARGETS::TARGETS[tar_id][:graphic]

      @sprites << Sprite_MapTargetSet.new(arr[0], arr[1], arr[2], tar_id)

    }

    # Mark player pos

    @sprites.each { |e|

      val = e.target_id

      if  TINY::TTM_TARGETS::TARGETS[val][:teleportdest][0] == $game_map.map_id

        e.show_char

        return

      else

        e.hide_char

      end

    }

  end

  

  def create_map

    @map = Sprite_MapBack.new(144, 48)

    return unless MODE == 2

    @map.upd_pos(@map.get_size[0]/2,@map.get_size[1]/2) if $game_travelmap.targets.size == 0

    @map.jmp_pos

  end

  

  def create_background

    @background = Sprite.new

    @background.bitmap = Cache.map(BACKGROUND) rescue @background.bitmap = SceneManager.background_bitmap

  end

  

  def set_mappos

    @sprites.each { |spr|

        if spr.target_id == @tar_window.all_targets

          @map.upd_pos(spr.x, spr.y)

          @map.jmp_pos

        end

      }

  end

  

  def check_transfer

    dest = []

    return SceneManager.call(Scene_Map) if TINY::TTM_TARGETS::TARGETS[@tar_window.all_targets].nil?

    dest = TINY::TTM_TARGETS::TARGETS[@tar_window.all_targets][:teleportdest]

    if dest != nil

      $game_player.reserve_transfer(dest[0], dest[1], dest[2])

      perform_transfer

      $game_travelmap.last_target = @tar_window.all_targets

    end

    SceneManager.call(Scene_Map)

  end

  

  def update

    super

    @map.update if MODE == 2

    @sprites.each { |e| 

      e.update 

      e.upd_pos(@map.get_pos[0], @map.get_pos[1]) if MODE == 2

    }

    # Change Properties when target is changing

    if @tar != @tar_window.all_targets

      @sprites.each { |e|

        if e.target_id == @tar_window.all_targets

          e.blink = true if HIGHLIGHT_SELECTED

          @map.upd_pos(e.x, e.y) if MODE == 2

        else

          e.blink = false

        end

      }

      @tar = @tar_window.all_targets

    end

    $game_travelmap.update

  end

  

  def perform_transfer

    $game_player.perform_transfer

  end

  

  def terminate

    @sprites.each { |e| e.dispose }

    @map.dispose

    @background.dispose

    super

  end

  

end # Scene_TinyMap

 

 

#╔═=═══════════════════════════════════════════════════════════════════════════╗

#╠══════════════════════════════▲ END OF SCRIPT ▲══════════════════════════════╣

#╚═=═=═════════════════════════════════════════════════════════════════════════╝

 



 

Here's the line that it claims is the problem:

 @local_pos.x = @target.x - @local_pos.bitmap.width/2
 
Last edited by a moderator:

TinyMine

Veteran
Veteran
Joined
Oct 26, 2013
Messages
53
Reaction score
54
First Language
German
Primarily Uses
Thank you! :)

Hmmm ... never seen this error before - but be assure that I will have a look asap on this. 

I will try to reproduce and let you know when I found a solution for you/the script.

Regards

EDIT:

Ok found the issue.In the config you can set 

    # Graphic which shows the players position on the map    GRAPHIC_POS = "Pin"a graphical marker to determine where the player is on the map right now. Since you probably do not have the "Pin.png" in you Folder it will result in a nil class (nothing) and will cause error in further use, since "nothing" has no "witdh". To avoid this "error" you could use another graphic that the system will find, like:

# Graphic which shows the players position on the map    GRAPHIC_POS = "SomeGraphicInMyFolderThatExists"or you can just deactivete this "Feature" by setting up an empty name, by:

# Graphic which shows the players position on the map    GRAPHIC_POS = ""Since "" is empty the system will create a "empty" picture what can be worked with. An not found graphic though will cause error, like "Pin" did in your example.

I think I will rework this - For now it can be avoided but I dont like the error handling there from me. So I much appreciate this report! Thank you! Maybe in a future version.
 
Last edited by a moderator:

Noamancy

Veteran
Veteran
Joined
Nov 3, 2014
Messages
45
Reaction score
7
First Language
English
Primarily Uses
RMVXA
OH SNAP!? I forgot to put a Pin Graphic! Thank you sooo much! I haven't tested it yet, but no reason for you to edit your script, cuz that was all my fault if that's the resolution - nothing you did in error.

I'll go add it right now and let you know.

EDIT: Yup, that fixed it. THANK YOU SO MUCH!!
 
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

Gnyaaaa! Invisible comments on YouTube!!!
When I learned about multithreading in C++, one of the first things was that while heap is shared, each thread has its own stack and it's impossible to access another thread's stack.
So I wrapped the variables into a static class and passed its address to another thread. And it worked.
More characters from my game )
bandicam 2023-03-31 07-42-50-549.png
ScreenShot_3_30_2023_10_5_45.pngstarted working on a new area today. It's a warped version of being inside someone's home. Also moved the face and Panic gauges to be out of the way of the map names. switching moods actively changes what you encounter. Calm is normal while anxious is all the way up to Manic.
Ads.png
Some advertisements for M

And yes kiddos smoking, alcohol and too much coffee or tea are bad for you - but in the 20's we didnt know that yet xD

Forum statistics

Threads
129,980
Messages
1,206,710
Members
171,211
Latest member
aythr1
Top