Hi again,
I need your help also for another problem with scripts.
To avoid creating too many maps, I use one map by place. For example, I create one map for my town and each habitation/shop/building...
To display correctly the name of the map, I use the script made by Shaz :
But I have a problem with another script that I use to change the appearance of the display name. This script is here :
The script of Shaz doesn't work because there is the script of Bigace. Can you help me to modify one of these scripts please ?
I need your help also for another problem with scripts.
To avoid creating too many maps, I use one map by place. For example, I create one map for my town and each habitation/shop/building...
To display correctly the name of the map, I use the script made by Shaz :
# To change the display name, you do a Script command like this :# set_map_name("My Map Name")
# which changes the name of the current map, or
# set_map_name("My Map Name", 10)
# which changes the name of a different map (10 being the map id, no leading
# zeros)
class Game_System
#--------------------------------------------------------------------------
# * Set Map Display Name
#--------------------------------------------------------------------------
def set_map_name(display_name, map_id = $game_map.map_id)
@map_names ||= {}
@map_names[map_id] = display_name
end
#--------------------------------------------------------------------------
# * Get Map Display Name
#--------------------------------------------------------------------------
def get_map_name(map_id = $game_map.map_id)
@map_names ||= {}
return @map_names[map_id] if @map_names.has_key?(map_id)
return $game_map.display_name if map_id == $game_map.map_id
return ''
end
end
class Window_MapName < Window_Base
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
unless $game_system.get_map_name.empty?
draw_background(contents.rect)
draw_text(contents.rect, $game_system.get_map_name, 1)
end
end
end
class Game_Interpreter
#--------------------------------------------------------------------------
# * Set Map Display Name
#--------------------------------------------------------------------------
def set_map_name(display_name, map_id = $game_map.map_id)
$game_system.set_map_name(display_name, map_id)
end
end
# which changes the name of the current map, or
# set_map_name("My Map Name", 10)
# which changes the name of a different map (10 being the map id, no leading
# zeros)
class Game_System
#--------------------------------------------------------------------------
# * Set Map Display Name
#--------------------------------------------------------------------------
def set_map_name(display_name, map_id = $game_map.map_id)
@map_names ||= {}
@map_names[map_id] = display_name
end
#--------------------------------------------------------------------------
# * Get Map Display Name
#--------------------------------------------------------------------------
def get_map_name(map_id = $game_map.map_id)
@map_names ||= {}
return @map_names[map_id] if @map_names.has_key?(map_id)
return $game_map.display_name if map_id == $game_map.map_id
return ''
end
end
class Window_MapName < Window_Base
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
unless $game_system.get_map_name.empty?
draw_background(contents.rect)
draw_text(contents.rect, $game_system.get_map_name, 1)
end
end
end
class Game_Interpreter
#--------------------------------------------------------------------------
# * Set Map Display Name
#--------------------------------------------------------------------------
def set_map_name(display_name, map_id = $game_map.map_id)
$game_system.set_map_name(display_name, map_id)
end
end
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+# ■ Window_MapName Plus+
# ■ Author: Bigace360
# ■ Version: 1.0
# ■ Date: April 26, 2012
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
# v1.0 (4.26.2012) ● Original script completed
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
module ACE
module MAPNAME
NAME_ALIGN = 1
FONT_SIZE = 24
FONT_TYPE = 'Verdana'
end
end
class Window_MapName < Window_Base
include ACE::MAPNAME
def initialize
super(0, 0, Graphics.width, fitting_height(1))
self.opacity, self.contents_opacity, @show_count = 0, 0, 0
self.contents.font.size, self.contents.font.name = FONT_SIZE, FONT_TYPE
refresh
end
def update_fadein
self.opacity += 32 unless $game_map.display_name.empty?
self.contents_opacity += 16
end
def update_fadeout
self.opacity -= 16 unless $game_map.display_name.empty?
self.contents_opacity -= 16
end
def refresh
contents.clear
self.visible = true
if $game_map.display_name.empty?
self.visible = false
return
end
draw_text(contents.rect, $game_map.display_name, NAME_ALIGN)
end
end
# ■ Author: Bigace360
# ■ Version: 1.0
# ■ Date: April 26, 2012
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
# v1.0 (4.26.2012) ● Original script completed
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
module ACE
module MAPNAME
NAME_ALIGN = 1
FONT_SIZE = 24
FONT_TYPE = 'Verdana'
end
end
class Window_MapName < Window_Base
include ACE::MAPNAME
def initialize
super(0, 0, Graphics.width, fitting_height(1))
self.opacity, self.contents_opacity, @show_count = 0, 0, 0
self.contents.font.size, self.contents.font.name = FONT_SIZE, FONT_TYPE
refresh
end
def update_fadein
self.opacity += 32 unless $game_map.display_name.empty?
self.contents_opacity += 16
end
def update_fadeout
self.opacity -= 16 unless $game_map.display_name.empty?
self.contents_opacity -= 16
end
def refresh
contents.clear
self.visible = true
if $game_map.display_name.empty?
self.visible = false
return
end
draw_text(contents.rect, $game_map.display_name, NAME_ALIGN)
end
end