I'm looking for a script that allows the player to view the in-game map in the menu. I've searched around for a good VX Ace one, but I haven't found much. I've been trying to get this to work (just the map menu part), but it's difficult to implement. https://forums.rpgmakerweb.com/index.php?threads/napoleons-minimap.13801/
Is there something that offers the same utility, but isn't a dead script?
Map in menu
● ARCHIVED · READ-ONLY
-
-
if you want the map inside a menu screen, then no there is no such script. All map-scripts I know of only display the minimap window on the real map, not inside a menu screen.
It can be done, but it would probably have to be custom build for you - and there aren't many VXA-Scripter still active, you might have to commission it... -
If you are OK with just an image associated to the map's ID to show up with a custom scene, I can do that. It could be easy to do. :distrust:
You may be able to find scripts that take screenshots of the whole map and puts it into a set dimension, but it seems cost intensive.. -
From what I understand, you are talking about opening a map image from the menu? How much of the map would it show? Can it be navigated seperately from the player with arrow keys?If you are OK with just an image associated to the map's ID to show up with a custom scene, I can do that. It could be easy to do. :distrust:
You may be able to find scripts that take screenshots of the whole map and puts it into a set dimension, but it seems cost intensive.. -
Yea I could make it move with the arrow keys. I don't know if I could make it follow where the player is on the map, because images doesn't need to follow a tile grid format. And you would be able to set up images for each map inside the script configuration...I think that would be more flexible.From what I understand, you are talking about opening a map image from the menu? How much of the map would it show? Can it be navigated seperately from the player with arrow keys?
Can you draw what you would like your map menu to look like and what it needs to show?
I wouldn't recommend using something like this for very large maps + images. it may cause bad loading times... -
Here is a quick mock-up. It needs to show arrow direction pictures, and show a small text area that tells the player how to exit the map back to the menu. Being able to show where the player is would be useful as well. I won't be using map markers because not having them encourages exploration and reading signs.
As for using large maps...Well...My starting map is 181x100. -
It better not lag then, because I'm not going to fix this script much.... :guffaw:As for using large maps...Well...My starting map is 181x100.
Tell me if you find any bugs. -
Wow! It's already done? I'll have to install it after work.
Thank you! :kaopride: -
@Ninjakillzu I took a different approach if you want to test this one. It just uses some premade functions in RM. No messing with images of your map etc to make new files. Rather it just duplicates the tilemap so you can save memory too and it will loop around the whole map plus retain water animations too.
Map Explore ScriptRuby:#============================================================================== # ** XANE MAP EXPLORE # v1.0 # Lets you scroll around your map freely. (Loops around map!) # Use SceneManager.call(Scene_MapExplore) to bring it up. #============================================================================= #============================================================================== # ** XANE_MAPEXPLORE #------------------------------------------------------------------------------ # This module handles settings for map exploring. #============================================================================== module XANE_MAPEXPLORE # How fast you want to scroll around. SPEED = 8 # Text to display on the screen DISPLAY_TEXT = "Press ESC to return" # Arrow Image USE_ARROWS = true ARROW_IMAGE = 'Arrow' end #============================================================================== # ** Window_ExploreReturn #------------------------------------------------------------------------------ # This window displays the return key function. #============================================================================== class Window_ExploreReturn < Window_Selectable #-------------------------------------------------------------------------- # * Included Modules #-------------------------------------------------------------------------- include XANE_MAPEXPLORE #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, Graphics.width / 2, fitting_height(1)) self.opacity = 0 refresh activate end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh contents.clear draw_text(contents.rect, DISPLAY_TEXT, 1) end end #============================================================================== # ** Scene_MapExplore #------------------------------------------------------------------------------ # This scene displays a view of the map that can be scrolled around. #============================================================================== class Scene_MapExplore < Scene_MenuBase #-------------------------------------------------------------------------- # * Included Modules #-------------------------------------------------------------------------- include XANE_MAPEXPLORE #-------------------------------------------------------------------------- # * Start Processing #-------------------------------------------------------------------------- def start super @viewport1 = Viewport.new @return_window = Window_ExploreReturn.new @return_window.set_handler(:cancel, method(:return_scene)) @view_x = $game_map.display_x * 32 @view_y = $game_map.display_y * 32 create_tilemap create_arrows end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super @viewport1.update update_tileset update_tilemap end #-------------------------------------------------------------------------- # * Terminate Processing #-------------------------------------------------------------------------- def terminate super @view_x = @view_y = nil dispose_tilemap dispose_arrows @viewport1.dispose end #-------------------------------------------------------------------------- # * Create Tilemap #-------------------------------------------------------------------------- def create_tilemap @tilemap = Tilemap.new(@viewport1) @tilemap.map_data = $game_map.data load_tileset end #-------------------------------------------------------------------------- # * Create Arrows #-------------------------------------------------------------------------- def create_arrows return unless USE_ARROWS @arrow_sprite = Sprite.new @arrow_sprite.z = @viewport1.z + 1 @arrow_sprite.bitmap = Cache.system(ARROW_IMAGE) end #-------------------------------------------------------------------------- # * Load Tileset #-------------------------------------------------------------------------- def load_tileset @tileset = $game_map.tileset @tileset.tileset_names.each_with_index do |name, i| @tilemap.bitmaps[i] = Cache.tileset(name) end @tilemap.flags = @tileset.flags end #-------------------------------------------------------------------------- # * Free Tilemap #-------------------------------------------------------------------------- def dispose_tilemap @tilemap.dispose end #-------------------------------------------------------------------------- # * Free Arrows #-------------------------------------------------------------------------- def dispose_arrows return unless USE_ARROWS @arrow_sprite.bitmap.dispose if @arrow_sprite.bitmap @arrow_sprite.dispose end #-------------------------------------------------------------------------- # * Update Tileset #-------------------------------------------------------------------------- def update_tileset if @tileset != $game_map.tileset load_tileset end end #-------------------------------------------------------------------------- # * Update Tilemap #-------------------------------------------------------------------------- def update_tilemap @tilemap.map_data = $game_map.data @view_x -= SPEED if Input.press?(:LEFT) && !Input.press?(:RIGHT) @view_x += SPEED if Input.press?(:RIGHT) && !Input.press?(:LEFT) @view_y -= SPEED if Input.press?(:UP) && !Input.press?(:DOWN) @view_y += SPEED if Input.press?(:DOWN) && !Input.press?(:UP) @tilemap.ox = @view_x @tilemap.oy = @view_y @tilemap.update end end
I also have an arrow image so you can quickly test it out using the script call. Put the picture in your system folder. (You probably wont see the image at first on here cause the arrows are white. Just right click and save).
Arrow Image -
This is awesome. Well done. I like it.No messing with images of your map
There is one correction to make.
You specified dispose_arrows but then you have two dispose_tilemap
so line 136 needs to be dispose_arrows -
@Roninator2 Haha good cache! That's what I get for typing it on the fly and not triple checking. Noted and fixed!
-
Cool! I wasn't expecting another to be made. I'll try this one out too.@Ninjakillzu I took a different approach if you want to test this one. It just uses some premade functions in RM. No messing with images of your map etc to make new files. Rather it just duplicates the tilemap so you can save memory too and it will loop around the whole map plus retain water animations too.
Map Explore ScriptRuby:#============================================================================== # ** XANE MAP EXPLORE # v1.0 # Lets you scroll around your map freely. (Loops around map!) # Use SceneManager.call(Scene_MapExplore) to bring it up. #============================================================================= #============================================================================== # ** XANE_MAPEXPLORE #------------------------------------------------------------------------------ # This module handles settings for map exploring. #============================================================================== module XANE_MAPEXPLORE # How fast you want to scroll around. SPEED = 8 # Text to display on the screen DISPLAY_TEXT = "Press ESC to return" # Arrow Image USE_ARROWS = true ARROW_IMAGE = 'Arrow' end #============================================================================== # ** Window_ExploreReturn #------------------------------------------------------------------------------ # This window displays the return key function. #============================================================================== class Window_ExploreReturn < Window_Selectable #-------------------------------------------------------------------------- # * Included Modules #-------------------------------------------------------------------------- include XANE_MAPEXPLORE #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, Graphics.width / 2, fitting_height(1)) self.opacity = 0 refresh activate end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh contents.clear draw_text(contents.rect, DISPLAY_TEXT, 1) end end #============================================================================== # ** Scene_MapExplore #------------------------------------------------------------------------------ # This scene displays a view of the map that can be scrolled around. #============================================================================== class Scene_MapExplore < Scene_MenuBase #-------------------------------------------------------------------------- # * Included Modules #-------------------------------------------------------------------------- include XANE_MAPEXPLORE #-------------------------------------------------------------------------- # * Start Processing #-------------------------------------------------------------------------- def start super @viewport1 = Viewport.new @return_window = Window_ExploreReturn.new @return_window.set_handler(:cancel, method(:return_scene)) @view_x = $game_map.display_x * 32 @view_y = $game_map.display_y * 32 create_tilemap create_arrows end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super @viewport1.update update_tileset update_tilemap end #-------------------------------------------------------------------------- # * Terminate Processing #-------------------------------------------------------------------------- def terminate super @view_x = @view_y = nil dispose_tilemap dispose_arrows @viewport1.dispose end #-------------------------------------------------------------------------- # * Create Tilemap #-------------------------------------------------------------------------- def create_tilemap @tilemap = Tilemap.new(@viewport1) @tilemap.map_data = $game_map.data load_tileset end #-------------------------------------------------------------------------- # * Create Arrows #-------------------------------------------------------------------------- def create_arrows return unless USE_ARROWS @arrow_sprite = Sprite.new @arrow_sprite.z = @viewport1.z + 1 @arrow_sprite.bitmap = Cache.system(ARROW_IMAGE) end #-------------------------------------------------------------------------- # * Load Tileset #-------------------------------------------------------------------------- def load_tileset @tileset = $game_map.tileset @tileset.tileset_names.each_with_index do |name, i| @tilemap.bitmaps[i] = Cache.tileset(name) end @tilemap.flags = @tileset.flags end #-------------------------------------------------------------------------- # * Free Tilemap #-------------------------------------------------------------------------- def dispose_tilemap @tilemap.dispose end #-------------------------------------------------------------------------- # * Free Arrows #-------------------------------------------------------------------------- def dispose_arrows return unless USE_ARROWS @arrow_sprite.bitmap.dispose if @arrow_sprite.bitmap @arrow_sprite.dispose end #-------------------------------------------------------------------------- # * Update Tileset #-------------------------------------------------------------------------- def update_tileset if @tileset != $game_map.tileset load_tileset end end #-------------------------------------------------------------------------- # * Update Tilemap #-------------------------------------------------------------------------- def update_tilemap @tilemap.map_data = $game_map.data @view_x -= SPEED if Input.press?(:LEFT) && !Input.press?(:RIGHT) @view_x += SPEED if Input.press?(:RIGHT) && !Input.press?(:LEFT) @view_y -= SPEED if Input.press?(:UP) && !Input.press?(:DOWN) @view_y += SPEED if Input.press?(:DOWN) && !Input.press?(:UP) @tilemap.ox = @view_x @tilemap.oy = @view_y @tilemap.update end end
I also have an arrow image so you can quickly test it out using the script call. Put the picture in your system folder. (You probably wont see the image at first on here cause the arrows are white. Just right click and save).
Arrow Image -
@Ninjakillzu Awesome, let us know which one you choose afterwards as I'm curious of the performance comparison on very large maps. But I tested this with the 'field1' built in map in Ace and it ran like a dream.
-
I have a beefy PC, so I'm not too concerned about performance, but I do know that others with less powerful PCs would appreciate it.@Ninjakillzu Awesome, let us know which one you choose afterwards as I'm curious of the performance comparison on very large maps. But I tested this with the 'field1' built in map in Ace and it ran like a dream.
-
@zeroscares I'm not sure if I configured this correctly, but my map image isn't showing up. I can move it, but it's invisible.
I put all the images needed (test versions) under the Graphics/System folder.
Here's my script configuration.
**Note from Script's Author (inserted by mod): The version of the script shown here is broken. Do not use it!**
Don't Use This Version!Ruby:#============================================================================== # ★ Simple Map System V1.1 by ZeroScares ★ #------------------------------------------------------------------------------ # 【 About 】 # >> Custom scene to show a picture tied to the current map. # >> Lets you show player indicator on the picture* # >> *Only useful if your picture is 1:1 with your map dimensions. #------------------------------------------------------------------------------ # 【 Terms of Usage 】 # >> Free to use and edit for any VX Ace game! No credit needed. #------------------------------------------------------------------------------ # 【 Issues 】 # >> Player sprite off toggle is not optimized. # >> Start scene: Map Picture X and Y aren't set to where the player is # >> May cause lag on large maps ¯\_(ツ)_/¯ #------------------------------------------------------------------------------ # 【 Advanced 】 # >> Change text drawing method: def refresh # >> SubImage directory line: def create_background # >> Input conditional line: def update #============================================================================== # * Module. Edit Below! #============================================================================== module ZEROMAPMENU #---------------------------------------------------------------------- # !! ALL PICTURE FILES GO IN => Graphics/System !! #---------------------------------------------------------------------- OFFPLAYERPIC = false # true => shows no player graphic # false => shows no "PLAYERPIC" on map image. #---------------------------------------------------------------------- OFFSWITCH = 1 # turn this switch on to disable the command! COMMANDNAME = "Map" # Name of the menu command. SHOW_COMMAND = true # true => add Map command to menu. SCENE_EXIT_BUTTON = :M #What button to exit this menu? #---------------------------------------------------------------------- INCREMENT = 32 # how many px can you move Left/Right/Up/Down ? # # recommended numbers: 16, 32 #---------------------------------------------------------------------- EXTRAPIC = "MapMenu_Info" # Name of picture EXTRAPIC_XY = [0, 0] # x and y placements EXTRAPIC_OPACITY = 255 # 0 to 255 only PLAYERPIC = "MapMenu_Player" # Name of picture. Best size: 32 x 32 px PLAYERPIC_OFF = true # true: player picture doesn't show up. SHOW_ARROWS = true #---------------------------------------------------------------------- ARROW_PICS = ["arrow_up", "arrow_down", "arrow_right", "arrow_left"] # In order: UP DOWN RIGHT LEFT #---------------------------------------------------------------------- ARROW_SIZE = 32 # must be the same height and width ARROW_OPACITY = 155 # arrow opacity ARROW_OFFSET_SCREEN = 10 # distance from screen borders #---------------------------------------------------------------------- # !! set map picture names below !! #---------------------------------------------------------------------- MAPPICTURES = [ "map009", ] end #============================================================================== # * No more editing! #============================================================================== # * Scene_Menu #============================================================================== class Scene_Menu < Scene_MenuBase #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- alias wmc_zero_create_command_window create_command_window def create_command_window wmc_zero_create_command_window @command_window.set_handler(:viewmap, method(:command_viewmap)) end #-------------------------------------------------------------------------- # * [View Map] Command #-------------------------------------------------------------------------- def command_viewmap SceneManager.call(Scene_MapView) end end #============================================================================== # * Window_MenuCommand #============================================================================== class Window_MenuCommand < Window_Command #-------------------------------------------------------------------------- # * For Adding Original Commands #-------------------------------------------------------------------------- alias wmc_zero_add_original_commands add_original_commands def add_original_commands wmc_zero_add_original_commands if ZEROMAPMENU::SHOW_COMMAND == true add_command(ZEROMAPMENU::COMMANDNAME, :viewmap, enable_viewmap) end end #-------------------------------------------------------------------------- # * enable the map command? NEW #-------------------------------------------------------------------------- def enable_viewmap return true if $game_switches[ZEROMAPMENU::OFFSWITCH] == false end end #============================================================================== # ** Scene_End #------------------------------------------------------------------------------ # This class performs game over screen processing. #============================================================================== class Scene_MapView < Scene_MenuBase #-------------------------------------------------------------------------- # start #-------------------------------------------------------------------------- def start super @truemapvalue = $game_map.map_id - 1 create_map_picture end #-------------------------------------------------------------------------- # create_map_picture #-------------------------------------------------------------------------- def create_map_picture @imagemap = Sprite.new @imagemap.opacity = 255 @imagemap.bitmap = Cache.system(ZEROMAPMENU::MAPPICTURES[($game_map.map_id - 1)].to_s) @playerpic = Sprite.new @playerpic.opacity = 255 @playerpic.x = ($game_player.real_x * 32) @playerpic.y = ($game_player.real_y * 32) if ZEROMAPMENU::OFFPLAYERPIC == false @playerpic.bitmap = Cache.system(ZEROMAPMENU::PLAYERPIC) end @imageinfo = Sprite.new @imageinfo.bitmap = Cache.system(ZEROMAPMENU::EXTRAPIC) @imageinfo.x = ZEROMAPMENU::EXTRAPIC_XY[0] @imageinfo.y = ZEROMAPMENU::EXTRAPIC_XY[1] @imageinfo.opacity = ZEROMAPMENU::EXTRAPIC_OPACITY @arrows = [] 4.times {|i| @arrows.push(Sprite.new) @arrows[i].opacity = 0 @arrows[i].bitmap = Cache.system(ZEROMAPMENU::ARROW_PICS[i]) } @arrows[0].x = @arrows[1].x = (Graphics.width - ZEROMAPMENU::ARROW_SIZE) / 2 @arrows[0].y = ZEROMAPMENU::ARROW_OFFSET_SCREEN @arrows[1].y = Graphics.height - ZEROMAPMENU::ARROW_SIZE - ZEROMAPMENU::ARROW_OFFSET_SCREEN @arrows[2].y = @arrows[3].y = (Graphics.height - ZEROMAPMENU::ARROW_SIZE) / 2 @arrows[2].x = Graphics.width - ZEROMAPMENU::ARROW_SIZE - ZEROMAPMENU::ARROW_OFFSET_SCREEN @arrows[3].x = ZEROMAPMENU::ARROW_OFFSET_SCREEN @arrows[0].opacity = ZEROMAPMENU::ARROW_OPACITY if @imagemap.height + @imagemap.oy != @imagemap.bitmap.height @arrows[1].opacity = ZEROMAPMENU::ARROW_OPACITY if @imagemap.height - @imagemap.oy != Graphics.height @arrows[2].opacity = ZEROMAPMENU::ARROW_OPACITY if @imagemap.width - @imagemap.ox != Graphics.width @arrows[3].opacity = ZEROMAPMENU::ARROW_OPACITY if @imagemap.width + @imagemap.ox != @imagemap.bitmap.width end #-------------------------------------------------------------------------- # create_background #-------------------------------------------------------------------------- def create_background super @background_sprite.tone.set(0, 0, 0, 0) end #-------------------------------------------------------------------------- # terminate #-------------------------------------------------------------------------- def terminate super dispose_background dispose_mappictures end #-------------------------------------------------------------------------- # dispose_mappictures #-------------------------------------------------------------------------- def dispose_mappictures @imagemap.dispose @imageinfo.dispose @playerpic.dispose @imagemap.bitmap.dispose @imageinfo.bitmap.dispose @playerpic.bitmap.dispose if !@playerpic.bitmap.nil? 4.times {|i| @arrows[i].dispose ; @arrows[i] = nil } end #-------------------------------------------------------------------------- # update_coords_vertic #-------------------------------------------------------------------------- def update_coords_vertic if @imagemap.height + @imagemap.oy != @imagemap.bitmap.height @imagemap.oy = @playerpic.oy -= ZEROMAPMENU::INCREMENT if Input.trigger?(:UP) || Input.repeat?(:UP) @arrows[0].opacity = ZEROMAPMENU::ARROW_OPACITY else @arrows[0].opacity = 0 end if @imagemap.height - @imagemap.oy != Graphics.height @imagemap.oy = @playerpic.oy += ZEROMAPMENU::INCREMENT if Input.trigger?(:DOWN) || Input.repeat?(:DOWN) @arrows[1].opacity = ZEROMAPMENU::ARROW_OPACITY else @arrows[1].opacity = 0 end end #-------------------------------------------------------------------------- # update_coords_horiz #-------------------------------------------------------------------------- def update_coords_horiz if @imagemap.width - @imagemap.ox != Graphics.width @imagemap.ox = @playerpic.ox += ZEROMAPMENU::INCREMENT if Input.trigger?(:RIGHT) || Input.repeat?(:RIGHT) @arrows[2].opacity = ZEROMAPMENU::ARROW_OPACITY else @arrows[2].opacity = 0 end if @imagemap.width + @imagemap.ox != @imagemap.bitmap.width @imagemap.ox = @playerpic.ox -= ZEROMAPMENU::INCREMENT if Input.trigger?(:LEFT) || Input.repeat?(:LEFT) @arrows[3].opacity = ZEROMAPMENU::ARROW_OPACITY else @arrows[3].opacity = 0 end end #-------------------------------------------------------------------------- # update_basic #p @imagemap.width + @imagemap.ox if Input.trigger?(:CTRL) #-------------------------------------------------------------------------- def update_basic super update_coords_horiz if @imagemap.bitmap.width != Graphics.width update_coords_vertic if @imagemap.bitmap.height != Graphics.height return_scene if Input.trigger?(ZEROMAPMENU::SCENE_EXIT_BUTTON) end end
@Xane That's a really cool concept, but none of my events show up nor do any screen effects. No lag though! -
Oh, right now you seem to want to use it for map ID 9Here's my script configuration.
But it's taking that image and applying it to map ID 1, because there's only one image specified. You can just leave image slots blank like this " ", if you're sure you won't use the script on a particular map ID.
If that isn't good for your project I could make it connect images to maps automatically, but it'd probably mean map images would need to be named with the same style. Let me know what you think.
EX map_1, map_2, map_3....
(( To be honest Xane's script seems like a better solution for you hahahaha, if you're not interested in doing any edits to your map image it might be much better for performance )) -
Ok, so I got it to work!Oh, right now you seem to want to use it for map ID 9
But it's taking that image and applying it to map ID 1, because there's only one image specified. You can just leave image slots blank like this " ", if you're sure you won't use the script on a particular map ID.
If that isn't good for your project I could make it connect images to maps automatically, but it'd probably mean map images would need to be named with the same style. Let me know what you think.
EX map_1, map_2, map_3....
(( To be honest Xane's script seems like a better solution for you hahahaha, if you're not interested in doing any edits to your map image it might be much better for performance ))
Hm, so if I have a map for ID 069, does that mean I have to add 68 of the quotes before?
Honestly, I would rather images be connected automatically to maps than have to put in a ton of blank quotes. I would only use images for large outdoor maps too. I currently have around 180 maps... Thankfully, most are indoor and won't require a map image.
Also, Are you able to center the map on the player when it's opened? It would be super nice if that were possible! :kaoangry: -
Honestly, I would rather images be connected automatically to maps than have to put in a ton of blank quotes. I would only use images for large outdoor maps too. I currently have around 180 maps... Thankfully, most are indoor and won't require a map image.
Also, Are you able to center the map on the player when it's opened? It would be super nice if that were possible! :kaoangry:
for the first one, yeah I can make it automatically tie to image names.
for the second one, do you mean center to where the player is or center to the middle of the map? -
Center to where the player is. It's confusing if it doesn't start at the player's location.for the first one, yeah I can make it automatically tie to image names.
for the second one, do you mean center to where the player is or center to the middle of the map? -
Center to where the player is. It's confusing if it doesn't start at the player's location.
Updated pastebin link. I would like you to remove the copy of the code from your previous message please! So that people don't use broken code. My 640x480 map fix is very lazy hahahaha
Use EMPTY_SWITCH now to make a "empty map" picture show up. It disables scrolling and you can have another custom image appear over it.