Hi guys,
I am currently using a map name display script for RPG Maker VX Ace.
#==============================================================================# Window Map Name+# by Enterbrain# edited by LUSHI# Date 04/04/2012#------------------------------------------------------------------------------# **WHAT IT DOES**# This edit is simple I'm no pro but wanted my have my one image in the# background of the map name so I edited Window_MapName.# This adds a background image to the map name and moves it to the right of the# screen.#------------------------------------------------------------------------------# **WHERE THINGS GO**# place this scrip ether in the materials section or overright Window_MapName# with this one. If using the map name fix By Crazyninjaguy place this above it.## Must have "Map_Name_Back.png" in Graphics/System folder## thats it run your game.##------------------------------------------------------------------------------# **HOW TO EDIT**# To change the locaton of the name change the values of lines,## 49# 122# 123## to change the name of the png file find line,## 120## and edit as you need.## **THE END**# Thats all there is. I hope That helps.#------------------------------------------------------------------------------# This window displays the map name.#==============================================================================class Window_MapName < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, window_width, fitting_height(1)) self.opacity = 0 self.contents_opacity = 0 self.x = 340 @map_name_back = Sprite.new @show_count = 0 refresh end #-------------------------------------------------------------------------- # * Get Window Width #-------------------------------------------------------------------------- def window_width return 240 end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super if @show_count > 0 && $game_map.name_display update_fadein @show_count -= 1 else update_fadeout end end #-------------------------------------------------------------------------- # * Update Fadein #-------------------------------------------------------------------------- def update_fadein self.contents_opacity += 16 @map_name_back.opacity += 16 end #-------------------------------------------------------------------------- # * Update Fadeout #-------------------------------------------------------------------------- def update_fadeout self.contents_opacity -= 16 @map_name_back.opacity -= 16 end #-------------------------------------------------------------------------- # * Open Window #-------------------------------------------------------------------------- def open refresh @show_count = 150 self.contents_opacity = 0 self end #-------------------------------------------------------------------------- # * Close Window #-------------------------------------------------------------------------- def close @show_count = 0 self end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh contents.clear unless $game_map.display_name.empty? draw_background(contents.rect) draw_text(contents.rect, $game_map.display_name, 1) end end #-------------------------------------------------------------------------- # * Draw Background #-------------------------------------------------------------------------- def draw_background(rect) temp_rect = rect.clone temp_rect.width /= 2 contents.gradient_fill_rect(temp_rect, back_color2, back_color1) @map_name_back = Sprite.new @map_name_back.bitmap = Cache.system("Map_Name_Back.png") @map_name_back.z = 0 @map_name_back.x = 370 @map_name_back.y = 7 @map_name_back.opacity = 0 temp_rect.x = temp_rect.width contents.gradient_fill_rect(temp_rect, back_color1, back_color2) end #-------------------------------------------------------------------------- # * Get Background Color 1 #-------------------------------------------------------------------------- def back_color1 Color.new(0, 0, 0, 0) end #-------------------------------------------------------------------------- # * Get Background Color 2 #-------------------------------------------------------------------------- def back_color2 Color.new(0, 0, 0, 0) endendIt replaces the original map display with a custom graphic of your choice. One issue is, when I enter a new map, if I open the menu immediately, I would get a bug like this:
This script was made in 2012, and the author hasn't fixed the bug yet. I posted this in his thread, but he still hasn't replied. Can someone help me figure out how to fix this?
Thanks. 🙂
I am currently using a map name display script for RPG Maker VX Ace.
#==============================================================================# Window Map Name+# by Enterbrain# edited by LUSHI# Date 04/04/2012#------------------------------------------------------------------------------# **WHAT IT DOES**# This edit is simple I'm no pro but wanted my have my one image in the# background of the map name so I edited Window_MapName.# This adds a background image to the map name and moves it to the right of the# screen.#------------------------------------------------------------------------------# **WHERE THINGS GO**# place this scrip ether in the materials section or overright Window_MapName# with this one. If using the map name fix By Crazyninjaguy place this above it.## Must have "Map_Name_Back.png" in Graphics/System folder## thats it run your game.##------------------------------------------------------------------------------# **HOW TO EDIT**# To change the locaton of the name change the values of lines,## 49# 122# 123## to change the name of the png file find line,## 120## and edit as you need.## **THE END**# Thats all there is. I hope That helps.#------------------------------------------------------------------------------# This window displays the map name.#==============================================================================class Window_MapName < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, window_width, fitting_height(1)) self.opacity = 0 self.contents_opacity = 0 self.x = 340 @map_name_back = Sprite.new @show_count = 0 refresh end #-------------------------------------------------------------------------- # * Get Window Width #-------------------------------------------------------------------------- def window_width return 240 end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super if @show_count > 0 && $game_map.name_display update_fadein @show_count -= 1 else update_fadeout end end #-------------------------------------------------------------------------- # * Update Fadein #-------------------------------------------------------------------------- def update_fadein self.contents_opacity += 16 @map_name_back.opacity += 16 end #-------------------------------------------------------------------------- # * Update Fadeout #-------------------------------------------------------------------------- def update_fadeout self.contents_opacity -= 16 @map_name_back.opacity -= 16 end #-------------------------------------------------------------------------- # * Open Window #-------------------------------------------------------------------------- def open refresh @show_count = 150 self.contents_opacity = 0 self end #-------------------------------------------------------------------------- # * Close Window #-------------------------------------------------------------------------- def close @show_count = 0 self end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh contents.clear unless $game_map.display_name.empty? draw_background(contents.rect) draw_text(contents.rect, $game_map.display_name, 1) end end #-------------------------------------------------------------------------- # * Draw Background #-------------------------------------------------------------------------- def draw_background(rect) temp_rect = rect.clone temp_rect.width /= 2 contents.gradient_fill_rect(temp_rect, back_color2, back_color1) @map_name_back = Sprite.new @map_name_back.bitmap = Cache.system("Map_Name_Back.png") @map_name_back.z = 0 @map_name_back.x = 370 @map_name_back.y = 7 @map_name_back.opacity = 0 temp_rect.x = temp_rect.width contents.gradient_fill_rect(temp_rect, back_color1, back_color2) end #-------------------------------------------------------------------------- # * Get Background Color 1 #-------------------------------------------------------------------------- def back_color1 Color.new(0, 0, 0, 0) end #-------------------------------------------------------------------------- # * Get Background Color 2 #-------------------------------------------------------------------------- def back_color2 Color.new(0, 0, 0, 0) endendIt replaces the original map display with a custom graphic of your choice. One issue is, when I enter a new map, if I open the menu immediately, I would get a bug like this:
This script was made in 2012, and the author hasn't fixed the bug yet. I posted this in his thread, but he still hasn't replied. Can someone help me figure out how to fix this?
Thanks. 🙂