Help - Search - Members - Calendar
Full Version: MINImap Script V.1.7
Creation Asylum > Game Making > Scripts & Code Snippets > RPG Maker XP Code > New Functionality/Features Scripts
Pages: 1, 2
Mr. DJ
MiniMapScript V1.7
# Translation by: Mr. DJ
# Request by: KHORN
# Made by: markusmks
CODE
#==============================================================================
# â–  MiniMapScript
#------------------------------------------------------------------------------
# Translation by: Mr. DJ
# Request by: KHORN
# Made by: markusmks
#==============================================================================

class MiniMapScript < Window_Base
 attr_accessor :modus
 #--------------------------------------------------------------------------
 # â—? Initialize
 #--------------------------------------------------------------------------
 def initialize(mapname=nil)
   super(0, 0, 200, 67)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.color = normal_color
   self.contents.font.name = "Arial"
   self.contents.font.size = 20
   self.windowskin = nil
   # ---------------------------OPTIONEN-------------------------
   # Modus 1 = Name of the map as: "mapname.png"
   # Vb: "Dungeon.png"
   # Modus 2 = Id as the name as "mapID.png"
   # Vb: "1.png"
   # Modus 3 = $name_minim[MapID] = "Screen" / screenone ".png"
   # in Modus 3 you save all the images in /pictures/MiniMaps and asign them to the map with call script
   #============================================================
   @modus = 3
   # ------------------------------------------------------------
   @mapname = mapname
   if @modus == 1
     real_map = $game_map.name
   elsif @modus == 2
     real_map = $game_map.map_id.to_s
   elsif @modus == 3
     real_map = $name_minim[$game_map.map_id]
   end
   @real_map = real_map
   if FileTest.exist?("Graphics/Pictures/MiniMaps/"+real_map+".png")
     @mapname = real_map
   end
   if @mapname != nil
     #--<Colors>-- Will be the colors of the player and NPC, but do not change these! see below
     player_color = Color.new(0,0,0)
     npc_color = Color.new(255,0,0)
     #----MAP------------------------#
     @player_color=player_color
     @npc_color=npc_color
     @gra_dir = "Graphics/Pictures/MiniMaps/"
     @mmap = @gra_dir+@mapname+".png"
     map = Bitmap.new(@mmap)
     @map_sprite = Sprite.new
     @map_sprite.bitmap = map
     @map_sprite.x = 0
     @map_sprite.y = 0
     @map_sprite.opacity = 180
     @map_sprite.zoom_x = 0.98
     @map_sprite.zoom_y = 0.98
     #------PLAYER------------#
     @player_sprite = Sprite.new
     @player_sprite.bitmap = Bitmap.new(3,3)
     @player_sprite.bitmap.fill_rect(0,0,3,3,@player_color) #you can change these
     @event_sprite = []
     for i in $game_map.events.keys.sort
       if ($game_map.events[i].is_a?(Game_Event) and $game_map.events[i].list!=nil and $game_map.events[i].list[0].code == 108 and $game_map.events[i].list[0].parameters == ["mm_point"])
         @event_sprite[i] = Sprite.new  
         @event_sprite[i].bitmap = Bitmap.new(3,3)
         if $game_map.events[i].list[1].parameters[0] != nil
           colors = $game_map.events[i].list[1].parameters[0].split
           red = colors[0].to_i
           green = colors[1].to_i
           blue = colors[2].to_i
           @npc_color = Color.new(red,green,blue)
         else
           @npc_color = Color.new(255,0,0)
         end
         @event_sprite[i].bitmap.fill_rect(0,0,3,3,@npc_color)
       end
     end
     refresh
   end
 end
 #--------------------------------------------------------------------------
 # â—? Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   if @event_sprite == []
     renew
   end
   if FileTest.exist?("Graphics/Pictures/MiniMaps/"+@real_map+".png")
     @mapname = @real_map
   else
     @mapname = nil
   end
   if @mapname != nil
     for i in $game_map.events.keys.sort
       if ($game_map.events[i].is_a?(Game_Event) and $game_map.events[i].list!=nil and $game_map.events[i].list[0].code == 108 and $game_map.events[i].list[0].parameters == ["mm_point"])
         if @event_sprite == []
           renew
           return
         end
         @event_sprite[i].x = $game_map.events[i].real_x/16
         @event_sprite[i].y = $game_map.events[i].real_y/16
         @event_sprite[i].opacity = 255
         @event_sprite[i].zoom_x = 1
         @event_sprite[i].zoom_y = 1
       end
       i += 1
     end
     #----PLAYER MOVE---------#
     @player_sprite.x = $game_player.real_x/16
     @player_sprite.y = $game_player.real_y/16
     @player_sprite.opacity = 255
     @player_sprite.zoom_x = 1
     @player_sprite.zoom_y = 1  
     #----------------------------#
   end
 end
 #--------------------------------------------------------------------------
 # â—? Renew Graphics
 #--------------------------------------------------------------------------
 def renew
   dispose
   if @modus == 1
     real_map = $game_map.name
   elsif @modus == 2
     real_map = $game_map.map_id.to_s
   elsif @modus == 3
     real_map = $name_minim[$game_map.map_id]
   end
   @real_map = real_map
   if FileTest.exist?("Graphics/Pictures/MiniMaps/"+@real_map+".png")
     @mapname = real_map
   end
   @gra_dir = "Graphics/Pictures/MiniMaps/"
   @mmap = @gra_dir+@mapname+".png"
   map = Bitmap.new(@mmap)
   @map_sprite = Sprite.new
   @map_sprite.bitmap = map
   @map_sprite.x = 0
   @map_sprite.y = 0
   @map_sprite.opacity = 180
   @map_sprite.zoom_x = 0.98
   @map_sprite.zoom_y = 0.98
   @player_sprite = Sprite.new
   @player_sprite.bitmap = Bitmap.new(3,3) #you can change these
   
   @player_sprite.bitmap.fill_rect(0,0,3,3,@player_color=Color.new(0,0,0)) #you can change these
   @event_sprite = []
   for i in $game_map.events.keys.sort
     if ($game_map.events[i].is_a?(Game_Event) and $game_map.events[i].list!=nil and $game_map.events[i].list[0].code == 108 and $game_map.events[i].list[0].parameters == ["mm_point"])
       @event_sprite[i] = Sprite.new  
       @event_sprite[i].bitmap = Bitmap.new(3,3)
       if $game_map.events[i].list[1].parameters[0] != nil
         colors = $game_map.events[i].list[1].parameters[0].split
         red = colors[0].to_i
         green = colors[1].to_i
         blue = colors[2].to_i
         @npc_color = Color.new(red,green,blue)
       else
         @npc_color = Color.new(255,0,0)
       end
       @event_sprite[i].bitmap.fill_rect(0,0,3,3,@npc_color) #you can change these
     end
   end
 end
 #--------------------------------------------------------------------------
 # â—? Update
 #--------------------------------------------------------------------------
 def update
   if @modus == 3 and $name_minim[$game_map.map_id] != ""
     renew
   end
   refresh
 end
 #--------------------------------------------------------------------------
 # â—? Dispose all
 #--------------------------------------------------------------------------
 def dispose
   if @event_sprite != nil
     for sprite in @event_sprite
       if sprite != nil
         sprite.dispose
       end
     end
   end
   if @player_sprite != nil
     @player_sprite.dispose
   end
   if @map_sprite != nil
     @map_sprite.dispose
   end
 end
end

#==============================================================================
# â–  Game_MiniMap
#------------------------------------------------------------------------------
# © i dont know
#==============================================================================

class Game_MiniMap
 #--------------------------------------------------------------------------
 # â—? Initialize
 #--------------------------------------------------------------------------
 def initialize
   @data = []
 end
 #--------------------------------------------------------------------------
 # â—? Map ID
 #     variable_id : Map ID
 #--------------------------------------------------------------------------
 def [](variable_id)
   if variable_id <= 5000 and @data[variable_id] != nil
     return @data[variable_id]
   else
     return ""
   end
 end
 #--------------------------------------------------------------------------
 # â—? MiniMap Screen declared here
 #     variable_id : Map ID
 #     value       : Screen Name
 #--------------------------------------------------------------------------
 def []=(variable_id, value)
   if variable_id <= 5000
     @data[variable_id] = value
   end
 end
end

# ====================  Read this  =======================================
#
# As i cannot alias, please read this!!
# To make sure the data of the minimaps is saved,
# Copy the text between the edits, to the corresponding place in:
# Scene_Title, Scene_Load, Scene_Save
# After you did that...
# ...Delete all the codes below
# so they wont work here ^^... Mr. DJ
#
# ==================================================================

class Scene_Title
 def command_new_game
   $game_system.se_play($data_system.decision_se)
   Audio.bgm_stop
   Graphics.frame_count = 0
   $game_temp          = Game_Temp.new
   $game_system        = Game_System.new
   $game_switches      = Game_Switches.new
   $game_variables     = Game_Variables.new
   $game_self_switches = Game_SelfSwitches.new
   $game_screen        = Game_Screen.new
   $game_actors        = Game_Actors.new
   $game_party         = Game_Party.new
   $game_troop         = Game_Troop.new
   $game_map           = Game_Map.new
   $game_player        = Game_Player.new
   # EDIT -------------------------------
   $name_minim         = Game_MiniMap.new
   # ------------------------------------
   $game_party.setup_starting_members
   $game_map.setup($data_system.start_map_id)
   $game_player.moveto($data_system.start_x, $data_system.start_y)
   $game_player.refresh
   $game_map.autoplay
   $game_map.update
   $scene = Scene_Map.new
 end
end
class Scene_Save
 def write_save_data(file)
   characters = []
   for i in 0...$game_party.actors.size
     actor = $game_party.actors[i]
     characters.push([actor.character_name, actor.character_hue])
   end
   Marshal.dump(characters, file)
   Marshal.dump(Graphics.frame_count, file)
   $game_system.save_count += 1
   $game_system.magic_number = $data_system.magic_number
   Marshal.dump($game_system, file)
   Marshal.dump($game_switches, file)
   Marshal.dump($game_variables, file)
   Marshal.dump($game_self_switches, file)
   Marshal.dump($game_screen, file)
   Marshal.dump($game_actors, file)
   Marshal.dump($game_party, file)
   Marshal.dump($game_troop, file)

   Marshal.dump($game_map, file)
   Marshal.dump($game_player, file)
   # EDIT ------------------------
   Marshal.dump($name_minim, file)
   # -----------------------------
 end
end
class Scene_Load
 def read_save_data(file)
   characters = Marshal.load(file)
   Graphics.frame_count = Marshal.load(file)
   $game_system        = Marshal.load(file)
   $game_switches      = Marshal.load(file)
   $game_variables     = Marshal.load(file)
   $game_self_switches = Marshal.load(file)
   $game_screen        = Marshal.load(file)
   $game_actors        = Marshal.load(file)
   $game_party         = Marshal.load(file)
   $game_troop         = Marshal.load(file)
   $game_map           = Marshal.load(file)
   $game_player        = Marshal.load(file)
   # EDIT ---------------------------------
   $name_minim         = Marshal.load(file)
   # --------------------------------------
   if $game_system.magic_number != $data_system.magic_number
     $game_map.setup($game_map.map_id)
     $game_player.center($game_player.x, $game_player.y)
   end
   $game_party.refresh
 end
end


Check the Demo :) Click to view attachment
Im not gonna put scrennies, beacuse its a small demo
Howeverm nake sure you read the last comments in the script, regarding about, i cannot alias... :P'

Mr. DJ

[CODEbox]#======================================================================
========
# â– MiniMapScript
#------------------------------------------------------------------------------
# © markusmks
# KHORN
#==============================================================================

class MiniMapScript < Window_Base
attr_accessor :modus
#--------------------------------------------------------------------------
# â—? Initialize
#--------------------------------------------------------------------------
def initialize(mapname=nil)
super(-16, -16, 193, 154)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.color = normal_color
self.contents.font.name = "Arial"
self.contents.font.size = 20
self.windowskin = nil
# OPTIONEN ----------#
# Zeigt schwarze umrandung
@rand = true
# HIER BITTE ANGEBEN,WIE HERO ANGEZEIGT:
# 1 = Normales Kästchen
# 2 = Eigenen Point
# 3 = Meine Version :D > line 247
@hero = 1
# falls 2, dann hier das Bild angeben (in Picture ordner)
@hero_graphic = "sample_point.png"
# -----------------------
@dummy_window = Window_Base.new(-16,-16,195,156)
@dummy_window.contents = Bitmap.new(163,124)
@dummy_window.opacity = 0
@dummy_window.z = 0
# ---------------------------OPTIONEN-------------------------
# Modus 1 = Echter Map name zu "mapname.png" zB: "Dungeon.png"
# Modus 2 = Echte Map ID name zu "mapID.png" zB: "1.png"
# Modus 3 = $name_minim[MapID] = "BILD" / bitte ohne ".png"
# ============================================================
@modus = 3
# ------------------------------------------------------------
@mapname = mapname
if @modus == 1
real_map = $game_map.name
elsif @modus == 2
real_map = $game_map.map_id.to_s
elsif @modus == 3
real_map = $name_minim[$game_map.map_id]
end
@real_map = real_map
if FileTest.exist?("Graphics/Pictures/MiniMaps/"+real_map+".png")
@mapname = real_map
end
if @rand == true
@dummy_window.contents.fill_rect(156,0,2,117,Color.new(0,0,0))
@dummy_window.contents.fill_rect(0,117,157,2,Color.new(0,0,0))
end
if @mapname != nil
#--<Colors>--#
player_color = Color.new(0,0,0)
npc_color = Color.new(255,0,0)
#----MAP-----#
@player_color=player_color
@npc_color=npc_color
@gra_dir = "Graphics/Pictures/MiniMaps/"
@mmap = @gra_dir+@mapname+".png"
map = Bitmap.new(@mmap)
@map_sprite = Sprite.new
@map_sprite.bitmap = map
@map_sprite.src_rect = Rect.new(0,0,161,122)
@map_sprite.x = 0
@map_sprite.y = 0
@map_sprite.opacity = 180
@map_sprite.zoom_x = 0.98
@map_sprite.zoom_y = 0.98
#------PLAYER------------#
@player_sprite = Sprite.new
if @hero == 1
@player_sprite.bitmap = Bitmap.new(3,3)
@player_sprite.bitmap.fill_rect(0,0,3,3,@player_color)
elsif @hero == 2
@player_sprite.bitmap = RPG::Cache.picture(@hero_graphic.to_s)
elsif @hero == 3
@player_sprite.bitmap = fun_hero
end
@event_sprite = []
for i in $game_map.events.keys.sort
if ($game_map.events[i].is_a?(Game_Event) and $game_map.events[i].list!=nil and $game_map.events[i].list[0].code == 108 and $game_map.events[i].list[0].parameters == ["mm_point"])
@event_sprite[i] = Sprite.new
@event_sprite[i].bitmap = Bitmap.new(3,3)
if $game_map.events[i].list[1].parameters[0] != nil
colors = $game_map.events[i].list[1].parameters[0].split
red = colors[0].to_i
green = colors[1].to_i
blue = colors[2].to_i
@npc_color = Color.new(red,green,blue)
else
@npc_color = Color.new(255,0,0)
end
@event_sprite[i].bitmap.fill_rect(0,0,3,3,@npc_color)
end
end
refresh
end
end
#--------------------------------------------------------------------------
# â—? Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@dummy_window.contents.clear
if @event_sprite == []
renew
end
if @rand == true
@dummy_window.contents.fill_rect(156,0,2,117,Color.new(0,0,0))
@dummy_window.contents.fill_rect(0,117,157,2,Color.new(0,0,0))
end
if FileTest.exist?("Graphics/Pictures/MiniMaps/"+@real_map+".png")
@mapname = @real_map
else
@mapname = nil
end
if @mapname != nil
for i in $game_map.events.keys.sort
if ($game_map.events[i].is_a?(Game_Event) and $game_map.events[i].list!=nil and $game_map.events[i].list[0].code == 108 and $game_map.events[i].list[0].parameters == ["mm_point"])
if @event_sprite == []
renew
return
end
@event_sprite[i].x = $game_map.events[i].screen_x/4-3
@event_sprite[i].y = $game_map.events[i].screen_y/4-7
if @event_sprite[i].x > 156 or @event_sprite[i].y > 122-8
@event_sprite[i].opacity = 0
else
@event_sprite[i].opacity = 255
end
@event_sprite[i].zoom_x = 1
@event_sprite[i].zoom_y = 1
end
i += 1
end
#----PLAYER MOVE---------#
@player_sprite.x = $game_player.screen_x/4-3
@player_sprite.y = $game_player.screen_y/4-6
@player_sprite.opacity = 255
@player_sprite.zoom_x = 1
@player_sprite.zoom_y = 1
#----MAP MOVE------------#
x = $game_map.display_x/64
y = $game_map.display_y/64
x *= 4
y *= 4
@map_sprite.src_rect = Rect.new(x,y,161,122)
#------------------------#
end
end
#--------------------------------------------------------------------------
# â—? Renew Graphics
#--------------------------------------------------------------------------
def renew
dispose
if @modus == 1
real_map = $game_map.name
elsif @modus == 2
real_map = $game_map.map_id.to_s
elsif @modus == 3
real_map = $name_minim[$game_map.map_id]
end
@real_map = real_map
if FileTest.exist?("Graphics/Pictures/MiniMaps/"+@real_map+".png")
@mapname = real_map
end
@dummy_window = Window_Base.new(-16,-16,195,156)
@dummy_window.contents = Bitmap.new(163,124)
@dummy_window.opacity = 0
@dummy_window.z = 0
@gra_dir = "Graphics/Pictures/MiniMaps/"
@mmap = @gra_dir+@mapname+".png"
map = Bitmap.new(@mmap)
@map_sprite = Sprite.new
@map_sprite.bitmap = map
@map_sprite.src_rect = Rect.new(0,0,161,122)
@map_sprite.x = 0
@map_sprite.y = 0
@map_sprite.opacity = 180
@map_sprite.zoom_x = 0.98
@map_sprite.zoom_y = 0.98
@player_sprite = Sprite.new
if @hero == 1
@player_sprite.bitmap = Bitmap.new(3,3)
@player_sprite.bitmap.fill_rect(0,0,3,3,@player_color=Color.new(0,0,0))
elsif @hero == 2
@player_sprite.bitmap = RPG::Cache.picture(@hero_graphic.to_s)
elsif @hero == 3
@player_sprite.bitmap = fun_hero
end
@event_sprite = []
for i in $game_map.events.keys.sort
if ($game_map.events[i].is_a?(Game_Event) and $game_map.events[i].list!=nil and $game_map.events[i].list[0].code == 108 and $game_map.events[i].list[0].parameters == ["mm_point"])
@event_sprite[i] = Sprite.new
@event_sprite[i].bitmap = Bitmap.new(3,3)
if $game_map.events[i].list[1].parameters[0] != nil
colors = $game_map.events[i].list[1].parameters[0].split
red = colors[0].to_i
green = colors[1].to_i
blue = colors[2].to_i
@npc_color = Color.new(red,green,blue)
else
@npc_color = Color.new(255,0,0)
end
@event_sprite[i].bitmap.fill_rect(0,0,3,3,@npc_color) #you can change these
end
end
end
#--------------------------------------------------------------------------
# â—? Update
#--------------------------------------------------------------------------
def update
if @modus == 3 and $name_minim[$game_map.map_id] != ""
renew
end
refresh
end
#--------------------------------------------------------------------------
# â—? Dispose all
#--------------------------------------------------------------------------
def dispose
if @event_sprite != nil
for sprite in @event_sprite
if sprite != nil
sprite.dispose
end
end
end
if @player_sprite != nil
@player_sprite.dispose
end
if @map_sprite != nil
@map_sprite.dispose
end
if @dummy_window != nil
@dummy_window.dispose
end
end
#--------------------------------------------------------------------------
# â—? :D
# Draw your own Chara
# (maybe the game lag with this)
#--------------------------------------------------------------------------
def fun_hero
@hero_bitmap = Bitmap.new(4,4)
braun = Color.new(138,67,0)
blau = Color.new(109,189,206)
haut = Color.new(248,169,97)
mund = Color.new(214,109,214)
@hero_bitmap.fill_rect(0,0,3,1,braun)
@hero_bitmap.fill_rect(0,3,3,1,braun)
@hero_bitmap.set_pixel(0,2,braun)
@hero_bitmap.set_pixel(3,2,braun)
@hero_bitmap.set_pixel(0,1,blau)
@hero_bitmap.set_pixel(3,1,blau)
@hero_bitmap.fill_rect(1,1,2,1,braun)
@hero_bitmap.fill_rect(1,2,2,1,mund)
return @hero_bitmap
end
end

#==============================================================================
# â– Game_MiniMap
#------------------------------------------------------------------------------
# © markusmks
#==============================================================================

class Game_MiniMap
#--------------------------------------------------------------------------
# â—? Initialize
#--------------------------------------------------------------------------
def initialize
@data = []
end
#--------------------------------------------------------------------------
# â—? Map ID
# variable_id : Map ID
#--------------------------------------------------------------------------
def [](variable_id)
if variable_id <= 5000 and @data[variable_id] != nil
return @data[variable_id]
else
return ""
end
end
#--------------------------------------------------------------------------
# â—? MiniMap Screen declared here
# variable_id : Map ID
# value : Screen Name
#--------------------------------------------------------------------------
def []=(variable_id, value)
if variable_id <= 5000
@data[variable_id] = value
end
end
end

class Scene_Title
alias scene_title_command_new_game command_new_game
def command_new_game
$name_minim = Game_MiniMap.new
scene_title_command_new_game
end
end
class Scene_Save
alias save_new_game_here write_save_data
def write_save_data(file)
save_new_game_here(file)
Marshal.dump($name_minim, file)
end
end
class Scene_Load
alias read_saved_one read_save_data
def read_save_data(file)
read_saved_one(file)
$name_minim = Marshal.load(file)
end
end[/CODEbox]
ryujijitei
How the crap do you get the screens, does it do it itself, or do you need to take a picture and shrink it or something?
Mr. DJ
QUOTE(ryujijitei @ Jun 14 2005, 03:29 PM)
How the crap do you get the screens, does it do it itself, or do you need to take a picture and shrink it or something?
*


need to take pictures yourself... wich can make you very abstract images from your maps and show them.... i use 1/4 at layer 3 (not the events) then i goto vieuw>dim otherlayers OFF then i do alt+printscreen ... hihi
ryujijitei
Okay, it works now. I also figured out how to do the pixel colors, but it took me a few careful looks.
Mr. DJ
QUOTE(ryujijitei @ Jun 14 2005, 04:19 PM)
Okay, it works now. I also figured out how to do the pixel colors, but it took me a few careful looks.
*


hihi, as the demo says :P
ryujijitei
Now i'm requesting a HUD to go with it in the exact opposite corner of the screen; the bottom-right. The topic is near the top.
Mr. DJ
QUOTE(ryujijitei @ Jun 14 2005, 04:59 PM)
Now i'm requesting a HUD to go with it in the exact opposite corner of the screen; the bottom-right. The topic is near the top.
*

A hud, thats not that hard, but i am not gonna make it... if you want your hud in the left down corner and the minimalp in the right down corner then check this:

search for these...
@event_sprite[i].x = $game_map.events[i].real_x/16 +500
@event_sprite[i].y = $game_map.events[i].real_y/16 +300
and these
@player_sprite.x = $game_player.real_x/16 +500
@player_sprite.y = $game_player.real_y/16 +300

like that :P easy math, i think the iamges wil be near the botomright corner
ryujijitei
How would this work when you're on a really big map? Could there also be an option to extend the map?
Mr. DJ
QUOTE(ryujijitei @ Jun 14 2005, 07:03 PM)
How would this work when you're on a really big map? Could there also be an option to extend the map?
*


i just make sure my pictures are arouind the same size ..., otherwise it looks so crappy, how do you mean extend?
Magna Man
Is it possible to make the mini map scroll so when your on a big map the pic doesnt take up the whole space
Mr. DJ
QUOTE(Magna Man @ Jun 15 2005, 02:37 PM)
Is it possible to make the mini map scroll so when your on a big map the pic doesnt take up the whole space
*


sure it is possible, but don't ask me (i thinkits pretty easy)
im ow going play Tm Sunrise...
ryujijitei
I mean by extend as from a button press it either gets larger and/or it'll fill the whole screen.
thesilentpyro
Can you disable it on certain maps?
ryujijitei
Yes, since you have to use call script for it to show on the map. Look at the demo and see what I mean.
Mr. DJ
QUOTE(ryujijitei @ Jun 15 2005, 05:04 PM)
I mean by extend as from a button press it either gets larger and/or it'll fill the whole screen.
*


yeah, im not gonna make it now, but it would look like

input(B)
rpg::cache.picture(_new)

and that is really short, but calling a picture with the same name but new after the same name..
Endy
That's really cool. It would be quite a find to have a map script where the script captures the map area ur currently at and makes a small version of it that moves as you move.... not that im trying to hint anything to u DJ.....
Mr. DJ
QUOTE(Endy @ Jun 19 2005, 07:10 AM)
That's really cool. It would be quite a find to have a map script where the script captures the map area ur currently at and makes a small version of it that moves as you move.... not that im trying to hint anything to u DJ.....
*


if area is map, and if the script captures is you capture, then this is your script :P, you coul combine the camera script with this for automatic capture
Mat
Is there a way to make this work with Near_Fantastica's 12 script test bed? I've tried filling in all the comments you added and the lines of code in Scene_Map etc. but it wont work. Says that this is wrong:

QUOTE
  def setup(map_id)
    abs_game_map_setup(map_id)
    $ABS.setup
  end
markusmks
What the??!! fight.gif
don't steal script's and give credits only for this little translations!!

Here is a update to v1.9, there are some bugs anyway... icon_yes.gif

CODE
#==============================================================================
# â–  MiniMapScript
#------------------------------------------------------------------------------
# © markusmks
#   KHORN
#==============================================================================

class MiniMapScript < Window_Base
 attr_accessor :modus
 #--------------------------------------------------------------------------
 # â—? Initialize
 #--------------------------------------------------------------------------
 def initialize(mapname=nil)
   super(-16, -16, 193, 154)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.color = normal_color
   self.contents.font.name = "Arial"
   self.contents.font.size = 20
   self.windowskin = nil
   # OPTIONEN ----------#
   # Zeigt schwarze umrandung
   @rand = true
   # HIER BITTE ANGEBEN,WIE HERO ANGEZEIGT:
   # 1 = Normales Kästchen
   # 2 = Eigenen Point
   # 3 = Meine Version :D > line 247
   @hero = 1
   # falls 2, dann hier das Bild angeben (in Picture ordner)
   @hero_graphic = "sample_point.png"
   # -----------------------
   @dummy_window = Window_Base.new(-16,-16,195,156)
   @dummy_window.contents = Bitmap.new(163,124)
   @dummy_window.opacity = 0
   @dummy_window.z = 0
   # ---------------------------OPTIONEN-------------------------
   # Modus 1 = Echter Map name zu "mapname.png" zB: "Dungeon.png"
   # Modus 2 = Echte Map ID name zu "mapID.png" zB: "1.png"
   # Modus 3 = $name_minim[MapID] = "BILD" / bitte ohne ".png"
   # ============================================================
   @modus = 3
   # ------------------------------------------------------------
   @mapname = mapname
   if @modus == 1
     real_map = $game_map.name
   elsif @modus == 2
     real_map = $game_map.map_id.to_s
   elsif @modus == 3
     real_map = $name_minim[$game_map.map_id]
   end
   @real_map = real_map
   if FileTest.exist?("Graphics/Pictures/MiniMaps/"+real_map+".png")
     @mapname = real_map
   end
   if @rand == true
     @dummy_window.contents.fill_rect(156,0,2,117,Color.new(0,0,0))
     @dummy_window.contents.fill_rect(0,117,157,2,Color.new(0,0,0))
   end
   if @mapname != nil
     #--<Colors>--#
     player_color = Color.new(0,0,0)
     npc_color = Color.new(255,0,0)
     #----MAP-----#
     @player_color=player_color
     @npc_color=npc_color
     @gra_dir = "Graphics/Pictures/MiniMaps/"
     @mmap = @gra_dir+@mapname+".png"
     map = Bitmap.new(@mmap)
     @map_sprite = Sprite.new
     @map_sprite.bitmap = map
     @map_sprite.src_rect = Rect.new(0,0,161,122)
     @map_sprite.x = 0
     @map_sprite.y = 0
     @map_sprite.opacity = 180
     @map_sprite.zoom_x = 0.98
     @map_sprite.zoom_y = 0.98
     #------PLAYER------------#
     @player_sprite = Sprite.new
     if @hero == 1
       @player_sprite.bitmap = Bitmap.new(3,3)
       @player_sprite.bitmap.fill_rect(0,0,3,3,@player_color)
     elsif @hero == 2
       @player_sprite.bitmap = RPG::Cache.picture(@hero_graphic.to_s)
     elsif @hero == 3
       @player_sprite.bitmap = fun_hero
     end
     @event_sprite = []
     for i in $game_map.events.keys.sort
       if ($game_map.events[i].is_a?(Game_Event) and $game_map.events[i].list!=nil and $game_map.events[i].list[0].code == 108 and $game_map.events[i].list[0].parameters == ["mm_point"])
         @event_sprite[i] = Sprite.new  
         @event_sprite[i].bitmap = Bitmap.new(3,3)
         if $game_map.events[i].list[1].parameters[0] != nil
           colors = $game_map.events[i].list[1].parameters[0].split
           red = colors[0].to_i
           green = colors[1].to_i
           blue = colors[2].to_i
           @npc_color = Color.new(red,green,blue)
         else
           @npc_color = Color.new(255,0,0)
         end
         @event_sprite[i].bitmap.fill_rect(0,0,3,3,@npc_color)
       end
     end
     refresh
   end
 end
 #--------------------------------------------------------------------------
 # â—? Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   @dummy_window.contents.clear
   if @event_sprite == []
     renew
   end
   if @rand == true
     @dummy_window.contents.fill_rect(156,0,2,117,Color.new(0,0,0))
     @dummy_window.contents.fill_rect(0,117,157,2,Color.new(0,0,0))
   end
   if FileTest.exist?("Graphics/Pictures/MiniMaps/"+@real_map+".png")
     @mapname = @real_map
   else
     @mapname = nil
   end
   if @mapname != nil
     for i in $game_map.events.keys.sort
       if ($game_map.events[i].is_a?(Game_Event) and $game_map.events[i].list!=nil and $game_map.events[i].list[0].code == 108 and $game_map.events[i].list[0].parameters == ["mm_point"])
         if @event_sprite == []
           renew
           return
         end
         @event_sprite[i].x = $game_map.events[i].screen_x/4-3
         @event_sprite[i].y = $game_map.events[i].screen_y/4-7
         if @event_sprite[i].x > 156 or @event_sprite[i].y > 122-8
           @event_sprite[i].opacity = 0
         else
           @event_sprite[i].opacity = 255
         end
         @event_sprite[i].zoom_x = 1
         @event_sprite[i].zoom_y = 1
       end
       i += 1
     end
     #----PLAYER MOVE---------#
     @player_sprite.x = $game_player.screen_x/4-3
     @player_sprite.y = $game_player.screen_y/4-6
     @player_sprite.opacity = 255
     @player_sprite.zoom_x = 1
     @player_sprite.zoom_y = 1  
     #----MAP MOVE------------#
     x = $game_map.display_x/64
     y = $game_map.display_y/64
     x *= 4
     y *= 4
     @map_sprite.src_rect = Rect.new(x,y,161,122)
     #------------------------#
   end
 end
 #--------------------------------------------------------------------------
 # â—? Renew Graphics
 #--------------------------------------------------------------------------
 def renew
   dispose
   if @modus == 1
     real_map = $game_map.name
   elsif @modus == 2
     real_map = $game_map.map_id.to_s
   elsif @modus == 3
     real_map = $name_minim[$game_map.map_id]
   end
   @real_map = real_map
   if FileTest.exist?("Graphics/Pictures/MiniMaps/"+@real_map+".png")
     @mapname = real_map
   end
   @dummy_window = Window_Base.new(-16,-16,195,156)
   @dummy_window.contents = Bitmap.new(163,124)
   @dummy_window.opacity = 0
   @dummy_window.z = 0
   @gra_dir = "Graphics/Pictures/MiniMaps/"
   @mmap = @gra_dir+@mapname+".png"
   map = Bitmap.new(@mmap)
   @map_sprite = Sprite.new
   @map_sprite.bitmap = map
   @map_sprite.src_rect = Rect.new(0,0,161,122)
   @map_sprite.x = 0
   @map_sprite.y = 0
   @map_sprite.opacity = 180
   @map_sprite.zoom_x = 0.98
   @map_sprite.zoom_y = 0.98
   @player_sprite = Sprite.new
   if @hero == 1
     @player_sprite.bitmap = Bitmap.new(3,3)
     @player_sprite.bitmap.fill_rect(0,0,3,3,@player_color=Color.new(0,0,0))
   elsif @hero == 2
     @player_sprite.bitmap = RPG::Cache.picture(@hero_graphic.to_s)
   elsif @hero == 3
     @player_sprite.bitmap = fun_hero
   end    
   @event_sprite = []
   for i in $game_map.events.keys.sort
     if ($game_map.events[i].is_a?(Game_Event) and $game_map.events[i].list!=nil and $game_map.events[i].list[0].code == 108 and $game_map.events[i].list[0].parameters == ["mm_point"])
       @event_sprite[i] = Sprite.new  
       @event_sprite[i].bitmap = Bitmap.new(3,3)
       if $game_map.events[i].list[1].parameters[0] != nil
         colors = $game_map.events[i].list[1].parameters[0].split
         red = colors[0].to_i
         green = colors[1].to_i
         blue = colors[2].to_i
         @npc_color = Color.new(red,green,blue)
       else
         @npc_color = Color.new(255,0,0)
       end
       @event_sprite[i].bitmap.fill_rect(0,0,3,3,@npc_color) #you can change these
     end
   end
 end
 #--------------------------------------------------------------------------
 # â—? Update
 #--------------------------------------------------------------------------
 def update
   if @modus == 3 and $name_minim[$game_map.map_id] != ""
     renew
   end
   refresh
 end
 #--------------------------------------------------------------------------
 # â—? Dispose all
 #--------------------------------------------------------------------------
 def dispose
   if @event_sprite != nil
     for sprite in @event_sprite
       if sprite != nil
         sprite.dispose
       end
     end
   end
   if @player_sprite != nil
     @player_sprite.dispose
   end
   if @map_sprite != nil
     @map_sprite.dispose
   end
   if @dummy_window != nil
     @dummy_window.dispose
   end
 end
 #--------------------------------------------------------------------------
 # â—? :D
 #    Draw your own Chara
 #    (maybe the game lag with this)
 #--------------------------------------------------------------------------
 def fun_hero
   @hero_bitmap = Bitmap.new(4,4)
   braun = Color.new(138,67,0)
   blau  = Color.new(109,189,206)
   haut  = Color.new(248,169,97)
   mund  = Color.new(214,109,214)
   @hero_bitmap.fill_rect(0,0,3,1,braun)
   @hero_bitmap.fill_rect(0,3,3,1,braun)
   @hero_bitmap.set_pixel(0,2,braun)
   @hero_bitmap.set_pixel(3,2,braun)
   @hero_bitmap.set_pixel(0,1,blau)
   @hero_bitmap.set_pixel(3,1,blau)
   @hero_bitmap.fill_rect(1,1,2,1,braun)
   @hero_bitmap.fill_rect(1,2,2,1,mund)
   return @hero_bitmap
 end
end

#==============================================================================
# â–  Game_MiniMap
#------------------------------------------------------------------------------
# © markusmks
#==============================================================================

class Game_MiniMap
 #--------------------------------------------------------------------------
 # â—? Initialize
 #--------------------------------------------------------------------------
 def initialize
   @data = []
 end
 #--------------------------------------------------------------------------
 # â—? Map ID
 #     variable_id : Map ID
 #--------------------------------------------------------------------------
 def [](variable_id)
   if variable_id <= 5000 and @data[variable_id] != nil
     return @data[variable_id]
   else
     return ""
   end
 end
 #--------------------------------------------------------------------------
 # â—? MiniMap Screen declared here
 #     variable_id : Map ID
 #     value       : Screen Name
 #--------------------------------------------------------------------------
 def []=(variable_id, value)
   if variable_id <= 5000
     @data[variable_id] = value
   end
 end
end

class Scene_Title
 alias scene_title_command_new_game command_new_game
 def command_new_game
   $name_minim = Game_MiniMap.new
   scene_title_command_new_game
 end
end
class Scene_Save
 alias save_new_game_here write_save_data
 def write_save_data(file)
   save_new_game_here(file)
   Marshal.dump($name_minim, file)
 end
end
class Scene_Load
 alias read_saved_one read_save_data
 def read_save_data(file)
   read_saved_one(file)
   $name_minim = Marshal.load(file)
 end
end


If your map is bigger than it can be shown in maker (use alt+printscreen), cut it with paint (scroll a little pit and make screenshot etcetera...)
!~hope u understand~!
German tutorial (it is no advertisement XD)
rpgxp.de//MINI MAP SCRIPT v1.8
You can use a translator...
Mr. DJ
QUOTE(markusmks @ Jun 19 2005, 09:32 PM)
What the??!! fight.gif
don't steal script's and give credits only for this little translations!!

Here is a update to v1.9, there are some bugs anyway...  icon_yes.gif
If your map is bigger than it can be shown in maker (use alt+printscreen), cut it with paint (scroll a little pit and make screenshot etcetera...)
!~hope u understand~!
German tutorial (it is no advertisement XD)
rpgxp.de//MINI  MAP SCRIPT v1.8
You can use a translator...
*


well no you dident make it, or you are just coding like that other person , wich name is starting by a Y... im sure its a japanese, at leat, he said he made it.. but if he stole it from you, then im srr...., and no im not giving crdedrits to myself for the whole script you punisher.gif nvm...

what is so different on version 1.9

on rmxp.de, alleein die tutorial is jetzt neu gemacht ??
und was ist : # OPTION -show black bar-
markusmks
ITS MY SCRIPT! I PROGRAMMED IT ON MAY, because KHORN wanted it!!

there are some edits...
And maybe the old version function better than this, but yet, you can make really big maps (but maybe the computer/game sucks)

so, test it, if you want to know what the "black bar" is eusa_whistle.gif
Endy
Oh yea diddnt think of that... lol
makeamidget
QUOTE(markusmks @ Jun 19 2005, 04:26 PM)
ITS MY SCRIPT! I PROGRAMMED IT ON MAY, because KHORN wanted it!!

there are some edits...
And maybe the old version function better than this, but yet, you can make really big maps (but maybe the computer/game sucks)

so, test it, if you want to know what the "black bar" is  eusa_whistle.gif
*


calm down buddy, i'll give you credit in the archive the next time i update it (soon)..
but uh, DJ when you put out a script, make sure that you tell the people whose script it is (i know you have been) ... just so people don't think your tryin to steal credit...
Mr. DJ
QUOTE(makeamidget @ Jun 20 2005, 05:10 AM)
calm down buddy, i'll give you credit in the archive the next time i update it (soon)..
but uh, DJ when you put out a script, make sure that you tell the people whose script it is (i know you have been) ... just so people don't think your tryin to steal credit...
*


cugh first 6 lines of the code..., but oke il put it into the topic
@marcus, you are in the credits eusa_silenced.gif
makeamidget
i know its there, but before he was lumped in with KHORN, and i didn't know who made it...
Hypershadow180
im kinda brain dead...how do u make the map sho up...and where do u put and what do u name ur maps
all i get is that there are three different methods

also check out the game im making (file is attached)
Mr. DJ
QUOTE(Hypershadow180 @ Jun 27 2005, 09:19 PM)
im kinda brain dead...how do u make the map sho up...and where do u put and what do u name ur maps
all i get is that there are three different methods

also check out the game im making (file is attached)
*


yo we cant play that, u need to give ur whole project...
Hypershadow180
QUOTE(Mr. DJ @ Jun 27 2005, 02:57 PM)
yo we cant play that,  u need to give ur whole project...
*


sry...my bad...dont kno where to upload game data...can u still help me with how to make the map sho up?
Killswitch_Engage
How can you make the map only show up when you use the item "Map"?

Ok, I figured that out but then how do you make it go away?
Mr. DJ
QUOTE(Killswitch_Engage @ Jun 30 2005, 01:38 AM)
How can you make the map only show up when you use the item "Map"?

Ok, I figured that out but then how do you make it go away?
*



u do the smae but then replae the
CODE
"nameoftheimage"
with
CODE
""
(including quotes...)
Killswitch_Engage
Well, thats fine if you use an event but how would i make it go away if its an item?
OblivionDMD
can you explain better how to get the map pictures,

you said something about it before but i didnt understand, can you tell me more about how to do it please??????
Killswitch_Engage
Ok, to import an image, the pic must be a .PNG Mpve the map pic in the directory Graphics>Pictures>Minimap

Then in your event, use the call script and add this:

$name_minim[1] = "Picturename"
$name_minim[2] = "Picturename"
$name_minim[3] = "Picturename"
$name_minim[4] = "Picturename"

For the nubers, it will be the name of the map Example:



For Map001, It would be
$name_minim[1] = "Picturename"

For map002 it would be
$name_minim[2] = "Picturename"

And so on....You just put in a number that the map order is in. So if the map is the third one down in the map list (MAP003) You make it
$name_minim[3] = "Picturename"

Make sense?
OblivionDMD
ya i got that, but how do you get map pictures, like

say i have the map picture as a deseert, k, how do I get that picture.

like on the screen, i am using rpg maker xp, it shows eveyrthing, and my desert,

how do I make the desert into a png and have everything still work as well????
OblivionDMD
i need help alot, this min map thing not working, the demo thing works but it not working for me!!!

error keep coming up something about no nil class [] something like that
Killswitch_Engage
You will have to take a screenshot
OblivionDMD
ok,

i have a problem though, it wont show up on the screen,
OblivionDMD
like the demo worked, and i copied everything on it to my game,

and it didnt work, then I copied all the maps and everything on the demo to my game, and it still wont work????

help please
Killswitch_Engage
You have your pictures in the minimap folder? And dont double post, theres an edit button alright.gif
OblivionDMD
lol, just got it to work, had script call thing wrong, all I need help with is getting my pictures lol...

can you explain to me step by step how to get the picture...

you said something about screen shots????
Killswitch_Engage
You need to take screenshots of your map and thats the image thats going to show
OblivionDMD
how do I do that, like what buttons do I press???
Killswitch_Engage
You can get a nice program from download.com

http://www.download.com/CaptureWizPro-Scre...4-10350494.html
OblivionDMD
k
OblivionDMD
HELP!!!!

i got everything working, but I am using thw world map script thing,...

and when I use it and, cancle out of it to got back to the screen,

i get an errror saying on Scene_Map " dispose....



it points out to line 302 for me

@spriteset.dispose

Please help how do i fix it to make both work together?????
OblivionDMD
QUOTE(OblivionDMD @ Jul 2 2005, 09:31 PM)
HELP!!!!

i got everything working, but I am using thw world map script thing,...

and when I use it and, cancle out of it to got back to the screen,

i get an errror saying on Scene_Map " dispose....
it points out to line 302 for me

    @spriteset.dispose

Please help how do i fix it to make both work together?????
*



Please Help guys... please Help!!!!

Lost here, dont know how to fix....


If you want to see my scripts here is my Scene_Map, which on like 302 is the problem , lik as said in the quote..... [i got the scene_map edit from the demo of mini map thing....]


CODE
#==============================================================================
# â–  Show Map .name
#------------------------------------------------------------------------------
#  shows map name
#==============================================================================

class Game_Map
def name
  $map_infos[@map_id]
end
end

class Scene_Title
$map_infos = load_data("Data/MapInfos.rxdata")
for key in $map_infos.keys
  $map_infos[key] = $map_infos[key].name
end
end

#==============================================================================
# â–  Scene_Map
#------------------------------------------------------------------------------
#  einige edits für minimap, von markusmks
#   1) line 1-18
#   2) line 43
#   3) line 65
#   4) line 85-89
#   5) line 304-305
#  
#   Diese Codes in schon editierte Scene_Maps einfügen, oder wenn man nichts
#   editiert hat, einfach Scene_Map ersetzen
#==============================================================================

class Scene_Map
 #--------------------------------------------------------------------------
 # â—? メイン処ç?â€
 #--------------------------------------------------------------------------
 def main
   # スプライトãâ
€šÂ»Ã£Æ’ƒãƒˆã‚’作æˆ?
   @spriteset = Spriteset_Map.new
   # メッセージãâ€
¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚â€
™Ã¤Â½Å“æˆ?
   @message_window = Window_Message.new
   @mini_map = MiniMapScript.new
   # トランジシãƒ
§Ã£Æ’³å®Ÿè¡Œ
   Graphics.transition
   # メインルーãƒâ

   loop do
     # ゲーム画é?¢ã‚’æ›´æ–°
     Graphics.update
     # 入力情報を更新
     Input.update
     # フレーム更新
     update
     # ç”»é?¢ã?Œåˆ‡ã‚Šæ›¿ã‚?ã?£ã?Ÿã‚‰ãƒ«ãƒ¼ãƒ—ã‚â
™Ã¤Â¸Â­Ã¦â€“­
     if $scene != self
       break
     end
   end
   # トランジシãƒ
§Ã£Æ’³æº–å‚™
   Graphics.freeze
   # スプライトãâ
€šÂ»Ã£Æ’ƒãƒˆã‚’解æ”
¾
   @spriteset.dispose
   # メッセージãâ€
¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚â€
™Ã¨Â§Â£Ã¦â€Â¾
   @message_window.dispose
   @mini_map.dispose
   # タイトル画é?¢ã?«åˆ‡ã‚Šæ›¿ã?ˆä¸­ã?®å ´å?ˆ
   if $scene.is_a?(Scene_Title)
     # ç”»é?¢ã‚’フェーãƒâ
°Ã£â€šÂ¢Ã£â€šÂ¦Ã£Æ’ˆ
     Graphics.transition
     Graphics.freeze
   end
 end
 #--------------------------------------------------------------------------
 # â—? フレーム更新
 #--------------------------------------------------------------------------
 def update
   # ループ
   loop do
     # マップã€?インタプリãâ
šÂ¿Ã£â‚¬?プレイヤーã?®é †ã?«æ›´æ–°
     # (ã?“ã?®æ›´æ–°é †åº?ã?¯ã€?イベントをÃ
®Ÿè¡Œã?™ã‚‹æ?¡ä»¶ã?Œæº€ã?Ÿã?•ã‚Œã?¦ã?„ã‚‹ã?¨ã??ã?«
     #  Ã£Æ’—レイヤーã
?«ä¸€çž¬ç§»å‹•ã?™ã‚‹æ©Ÿä¼šã‚’与
�������由���)
     $game_map.update
     $game_system.map_interpreter.update
     $game_player.update
     if @mini_map != nil
       @mini_map.update
     else
       @mini_map = MiniMapScript.new
     end
     # システム (タイマー)ã€?ç”»é?¢ã‚’æ›´æ–°
     $game_system.update
     $game_screen.update
     # プレイヤーã?®å ´æ‰€ç§»å‹•ä¸­ã?§ã?ªã?‘ã‚Œã?°ãƒ«ãƒ¼ãƒ—を中Ã
¦â€“­
     unless $game_temp.player_transferring
       break
     end
     # 場所移動をå®
¸Ã¨Â¡Å’
     transfer_player
     # トランジシãƒ
§Ã£Æ’³å‡¦ç?†ä¸­ã?®å ´å?ˆã€?ループを中æâ
€“­
     if $game_temp.transition_processing
       break
     end
   end
   # スプライトãâ
€šÂ»Ã£Æ’ƒãƒˆã‚’æ›´æâ€
“°
   @spriteset.update
   # メッセージãâ€
¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚â€
™Ã¦â€ºÂ´Ã¦â€“°
   @message_window.update
   # ゲームオーãƒ?ーã?®å ´å?ˆ
   if $game_temp.gameover
     # ゲームオーãƒ?ー画é?¢ã?«åˆ‡ã‚Šæ›¿ã?ˆ
     $scene = Scene_Gameover.new
     return
   end
   # タイトル画é?¢ã?«æˆ»ã?™å ´å?ˆ
   if $game_temp.to_title
     # タイトル画é?¢ã?«åˆ‡ã‚Šæ›¿ã?ˆ
     $scene = Scene_Title.new
     return
   end
   # トランジシãƒ
§Ã£Æ’³å‡¦ç?†ä¸­ã?®å ´å?ˆ
   if $game_temp.transition_processing
     # トランジシãƒ
§Ã£Æ’³å‡¦ç?†ä¸­ãƒ•ãƒ©ã‚°ã‚’ã
€šÂ¯Ã£Æ’ªã‚¢
     $game_temp.transition_processing = false
     # トランジシãƒ
§Ã£Æ’³å®Ÿè¡Œ
     if $game_temp.transition_name == ""
       Graphics.transition(20)
     else
       Graphics.transition(40, "Graphics/Transitions/" +
         $game_temp.transition_name)
     end
   end
   # メッセージãâ€
¦ã‚£ãƒ³ãƒ‰ã‚¦è¡¨ç
¤ºä¸­ã?®å ´å?ˆ
   if $game_temp.message_window_showing
     return
   end
   # エンカウンãƒ
ˆ カウントã?Œ 0 ã?§ã€?エンカウンãƒ
ˆãƒªã‚¹ãƒˆã?Œç©ºã?§ã?¯ã?ªã?„å ´å?ˆ
   if $game_player.encounter_count == 0 and $game_map.encounter_list != []
     # イベント実è¡Å
’中ã?‹ã‚¨ãƒ³ã‚«ã‚¦ãƒ³Ã
£Æ’ˆç¦?止中ã?§ã?ªã?‘ã‚Œã?°
     unless $game_system.map_interpreter.running? or
            $game_system.encounter_disabled
       # トループをæ
±ºå®š
       n = rand($game_map.encounter_list.size)
       troop_id = $game_map.encounter_list[n]
       # トループã?Œæœ‰åŠ¹ã?ªã‚‰
       if $data_troops[troop_id] != nil
         # ãƒ?トル呼ã?³å‡ºã?—フラグをãâ€
šÂ»Ã£Æ’ƒãƒˆ
         $game_temp.battle_calling = true
         $game_temp.battle_troop_id = troop_id
         $game_temp.battle_can_escape = true
         $game_temp.battle_can_lose = false
         $game_temp.battle_proc = nil
       end
     end
   end
   # B ボタンã?ŒæŠ¼ã?•ã‚Œã?Ÿå ´å?ˆ
   if Input.trigger?(Input::B)
     # イベント実è¡Å
’中ã?‹ãƒ¡ãƒ‹ãƒ¥ãƒ¼ç¦?止中ã?§ã?ªã?‘ã‚Œã?°
     unless $game_system.map_interpreter.running? or
            $game_system.menu_enabled
       # メニュー呼ã?³å‡ºã?—フラグã?¨ SE æ¼”å¥?フラグをセÃ
£Æ’ƒãƒˆ
       $game_temp.menu_calling = true
       $game_temp.menu_beep = true
     end
   end
   # デãƒ?ッグモードã?Å’ ON ã?‹ã?¤ F9 キーã?ŒæŠ¼ã?•ã‚Œã?¦ã?„ã‚‹å ´å?ˆ
   if $DEBUG and Input.press?(Input::F9)
     # デãƒ?ッグ呼ã?³å‡ºã?—フラグをãâ€
šÂ»Ã£Æ’ƒãƒˆ
     $game_temp.debug_calling = true
   end
   # プレイヤーã?®ç§»å‹•ä¸­ã?§ã?¯ã?ªã?„å ´å?ˆ
   unless $game_player.moving?
     # Ã¥?„種画é?¢ã?®å‘¼ã?³å‡ºã?—を実行
     if $game_temp.battle_calling
       call_battle
     elsif $game_temp.shop_calling
       call_shop
     elsif $game_temp.name_calling
       call_name
     elsif $game_temp.menu_calling
       call_menu
     elsif $game_temp.save_calling
       call_save
     elsif $game_temp.debug_calling
       call_debug
     end
   end
 end
 #--------------------------------------------------------------------------
 # â—? ãƒ?トルã?®å‘¼ã?³å‡ºã?—
 #--------------------------------------------------------------------------
 def call_battle
   # ãƒ?トル呼ã?³å‡ºã?—フラグをãâ€
šÂ¯Ã£Æ’ªã‚¢
   $game_temp.battle_calling = false
   # メニュー呼ã?³å‡ºã?—フラグをãâ€
šÂ¯Ã£Æ’ªã‚¢
   $game_temp.menu_calling = false
   $game_temp.menu_beep = false
   # エンカウンãƒ
ˆ カウントをä
½œæˆ?
   $game_player.make_encounter_count
   # マップ BGM を記憶ã?—ã€?BGM ã‚’å?œæ­¢
   $game_temp.map_bgm = $game_system.playing_bgm
   $game_system.bgm_stop
   # ãƒ?トル開始 SE ã‚’æ¼”å¥?
   $game_system.se_play($data_system.battle_start_se)
   # ãƒ?トル BGM ã‚’æ¼”å¥?
   $game_system.bgm_play($game_system.battle_bgm)
   # プレイヤーã?®å§¿å‹¢ã‚’矯正
   $game_player.straighten
   # ãƒ?トル画é?¢ã?«åˆ‡ã‚Šæ›¿ã?ˆ
   $scene = Scene_Battle.new
 end
 #--------------------------------------------------------------------------
 # â—? ショップã?®å‘¼ã?³å‡ºã?—
 #--------------------------------------------------------------------------
 def call_shop
   # ショップ呼ã?³å‡ºã?—フラグをãâ€
šÂ¯Ã£Æ’ªã‚¢
   $game_temp.shop_calling = false
   # プレイヤーã?®å§¿å‹¢ã‚’矯正
   $game_player.straighten
   # ショップ画é?¢ã?«åˆ‡ã‚Šæ›¿ã?ˆ
   $scene = Scene_Shop.new
 end
 #--------------------------------------------------------------------------
 # â—? Ã¥??å‰?入力ã?®å‘¼ã?³å‡ºã?—
 #--------------------------------------------------------------------------
 def call_name
   # Ã¥??å‰?入力呼ã?³å‡ºã?—フラグをãâ€
šÂ¯Ã£Æ’ªã‚¢
   $game_temp.name_calling = false
   # プレイヤーã?®å§¿å‹¢ã‚’矯正
   $game_player.straighten
   # Ã¥??å‰?入力画é?¢ã?«åˆ‡ã‚Šæ›¿ã?ˆ
   $scene = Scene_Name.new
 end
 #--------------------------------------------------------------------------
 # â—? メニューã?®å‘¼ã?³å‡ºã?—
 #--------------------------------------------------------------------------
 def call_menu
   # メニュー呼ã?³å‡ºã?—フラグをãâ€
šÂ¯Ã£Æ’ªã‚¢
   $game_temp.menu_calling = false
   # メニュー SE æ¼”å¥?フラグã?Œã‚»ãƒƒãƒˆã?•ã‚Œã?¦ã?„ã‚‹å ´å?ˆ
   if $game_temp.menu_beep
     # 決定 SE ã‚’æ¼”å¥?
     $game_system.se_play($data_system.decision_se)
     # メニュー SE æ¼”å¥?フラグをクÃ
£Æ’ªã‚¢
     $game_temp.menu_beep = false
   end
   # プレイヤーã?®å§¿å‹¢ã‚’矯正
   $game_player.straighten
   # メニュー画é?¢ã?«åˆ‡ã‚Šæ›¿ã?ˆ
   $scene = Scene_Menu.new
 end
 #--------------------------------------------------------------------------
 # â—? セーブã?®å‘¼ã?³å‡ºã?—
 #--------------------------------------------------------------------------
 def call_save
   # プレイヤーã?®å§¿å‹¢ã‚’矯正
   $game_player.straighten
   # セーブ画é?¢ã?«åˆ‡ã‚Šæ›¿ã?ˆ
   $scene = Scene_Save.new
 end
 #--------------------------------------------------------------------------
 # â—? デãƒ?ッグã?®å‘¼ã?³å‡ºã?—
 #--------------------------------------------------------------------------
 def call_debug
   # デãƒ?ッグ呼ã?³å‡ºã?—フラグをãâ€
šÂ¯Ã£Æ’ªã‚¢
   $game_temp.debug_calling = false
   # 決定 SE ã‚’æ¼”å¥?
   $game_system.se_play($data_system.decision_se)
   # プレイヤーã?®å§¿å‹¢ã‚’矯正
   $game_player.straighten
   # デãƒ?ッグ画é?¢ã?«åˆ‡ã‚Šæ›¿ã?ˆ
   $scene = Scene_Debug.new
 end
 #--------------------------------------------------------------------------
 # â—? プレイヤーã?®å ´æ‰€ç§»å‹•
 #--------------------------------------------------------------------------
 def transfer_player
   # プレイヤー場所移動フãƒÂ
グをクリア
   $game_temp.player_transferring = false
   # 移動先ã?΍?¾åœ¨ã?®ãƒžãƒƒãƒ—ã?¨ç•°ã?ªã‚‹å ´å?ˆ
   if $game_map.map_id != $game_temp.player_new_map_id
     # æ–°ã?—ã?„マップをãâ€
»ãƒƒãƒˆã‚¢ãƒƒãƒ—
     $game_map.setup($game_temp.player_new_map_id)
   end
   # プレイヤーã?®ä½?置を設定
   $game_player.moveto($game_temp.player_new_x, $game_temp.player_new_y)
   # プレイヤーã?®å?‘ã??を設定
   case $game_temp.player_new_direction
   when 2  # 下
     $game_player.turn_down
   when 4  # å·¦
     $game_player.turn_left
   when 6  # Ã¥?³
     $game_player.turn_right
   when 8  # ä¸Å
     $game_player.turn_up
   end
   # プレイヤーã?®å§¿å‹¢ã‚’矯正
   $game_player.straighten
   # マップを更Ã
¦â€“° (並列イベンÃ
ƒˆå®Ÿè¡Œ)
   $game_map.update
   # スプライトãâ
€šÂ»Ã£Æ’ƒãƒˆã‚’å†?作æˆ?
   @spriteset.dispose
   @spriteset = Spriteset_Map.new
   @mini_map.dispose
   @mini_map = MiniMapScript.new
   # トランジシãƒ
§Ã£Æ’³å‡¦ç?†ä¸­ã?®å ´å?ˆ
   if $game_temp.transition_processing
     # トランジシãƒ
§Ã£Æ’³å‡¦ç?†ä¸­ãƒ•ãƒ©ã‚°ã‚’ã
€šÂ¯Ã£Æ’ªã‚¢
     $game_temp.transition_processing = false
     # トランジシãƒ
§Ã£Æ’³å®Ÿè¡Œ
     Graphics.transition(20)
   end
   # マップã?«è¨­å®šã?•ã‚Œã?¦ã?„ã‚‹ BGM ã?¨ BGS ã?®è‡ªå‹•åˆ‡ã‚Šæ›¿ã?ˆã‚’実行
   $game_map.autoplay
   # フレームリセット
   Graphics.frame_reset
   # 入力情報を更新
   Input.update
 end
end


And here is the world Map script......

CODE
#==============================================================================
# â–  World Map
#------------------------------------------------------------------------------
#  Near Fantastica
#   19/12/04
#   Note: well not work unless you remove the @spriteset.dispose from the transfer_player of the Scene_Map
#   Script use 2 graphics Characters/cursor and Tilesets/WorldMap
#==============================================================================

#==============================================================================
# â–  Game_Map
#------------------------------------------------------------------------------
#  Add defenision of the names to Game Map Class
#==============================================================================

class Game_Map
 #--------------------------------------------------------------------------
 # â—? Refer setup to Game Map
 #--------------------------------------------------------------------------
 attr_accessor   :number_events
 alias game_map_setup setup
 #--------------------------------------------------------------------------
 # â—? Loads Event names
 #--------------------------------------------------------------------------
 def setup(map_id)
   @name = {}
   @number_events = 0
   game_map_setup(map_id)
   for i in @map.events.keys
     @number_events = @number_events + 1
     @name[i] = @map.events[i].name
   end
 end
 #--------------------------------------------------------------------------
 # â—? Displays Event names
 #--------------------------------------------------------------------------
 def event_name(event)
   @event_id = event
   @name[@event_id]
 end
 #--------------------------------------------------------------------------
 # â—? Loads Map Names
 #--------------------------------------------------------------------------
 #Dubealex Addition (from XRXS) to show Map Name on screen
 def map_name
   $map_infos[@map_id]
 end
end

#==============================================================================
# â–  Scene_Title
#------------------------------------------------------------------------------
#  Add load map names and event names
#==============================================================================

class Scene_Title
 # active world map to false
 $world_map_active = false
 #Dubealex Addition (from XRXS) to show Map Name on screen
  $map_infos = load_data("Data/MapInfos.rxdata")
  for key in $map_infos.keys
    $map_infos[key] = $map_infos[key].name
  end
end

#==============================================================================
# â–  Game_Character
#------------------------------------------------------------------------------
#  Redefine the character_name to attr_accessor
#==============================================================================

class Game_Character
 attr_accessor   :character_name
end

#==============================================================================
# â–  World_Map
#------------------------------------------------------------------------------
#  Find players curent location on maps and displays it to world map
#==============================================================================

class World_Map
 #--------------------------------------------------------------------------
 # â—? Object initialization
 #--------------------------------------------------------------------------
 def initialize
 $last_map_name = $game_map.map_name
 $restore_map_id = $game_map.map_id
 $restore_player_x = $game_player.x
 $restore_player_y = $game_player.y
 $restore_player_direction = $game_player.direction
 $game_player.transparent = true
 $game_map.setup(1)
  for i in 1...($game_map.number_events+1)
     if $game_map.event_name(i) == $last_map_name
       $game_map.events[i].character_name = "cursor"
       x = $game_map.events[i].x
       y = $game_map.events[i].y
       $game_temp.player_new_x = x
       $game_temp.player_new_y = y
       $game_temp.player_new_map_id = 1
       $game_temp.player_transferring = true
       $scene = Scene_World_Map.new
       $scene.transfer_player
     end
   end
 end
end

#==============================================================================
# â–  Window_Location
#------------------------------------------------------------------------------
#  display curcent loaction
#==============================================================================

class Window_Location < Window_Base
 #--------------------------------------------------------------------------
 # â—? Object initialization
 #--------------------------------------------------------------------------
 def initialize
   super(10, 10, 160, 96)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = $defaultfonttype  # "Number of Steps" window font
   self.contents.font.size = $defaultfontsize
   refresh
 end
 #--------------------------------------------------------------------------
 # â—? Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   self.contents.font.color = system_color
   self.contents.draw_text(4, 0, 120, 32, "Location")
   self.contents.font.color = normal_color
   self.contents.draw_text(4, 32, 120, 32, $last_map_name.to_s, 2)
 end
end

#==============================================================================
# â–  Scene_World_Map
#------------------------------------------------------------------------------
#  It is the class which processes the World Map picture
#==============================================================================

class Scene_World_Map
 #--------------------------------------------------------------------------
 # â—? Main processing
 #--------------------------------------------------------------------------
 def main
   # Drawing up sprite set
   @spriteset = Spriteset_Map.new
   # Drawing up loaction window
   @location_window = Window_Location.new
   @location_window.opacity = 125
   # Transition execution
   Graphics.transition
   # Main loop
   loop do
     # Renewing the game picture
     Graphics.update
     # Updating the information of input
     Input.update
     # Frame renewal
     update
     # When the picture changes, discontinuing the loop
     if $scene != self
       break
     end
   end
   # Transition preparation
   Graphics.freeze
   # スプライトãâ
€šÂ»Ã£Æ’ƒãƒˆã‚’解æ”
¾
   @spriteset.dispose
   # Releasing the location window
   @location_window.dispose
   # When it changes to the title picture and it is in
   if $scene.is_a?(Scene_Title)
     # Fading out picture
     Graphics.transition
     Graphics.freeze
   end
 end
 #--------------------------------------------------------------------------
 # â—? Frame renewal
 #--------------------------------------------------------------------------
 def update
   # Loop
   loop do
     #The map, in order of the interpreter and the prayer renewal (as for this renewal order,
     #when the condition for executing the event is satisfied, in the reason such that the opportunity
     #which instant is moved in the prayer is not given the importance)
     $game_map.update
     $game_system.map_interpreter.update
     $game_player.update
     # The system (the timer), renewing the picture
     $game_system.update
     $game_screen.update
     # If it is not the place on the move of the prayer, discontinuing the loop
     unless $game_temp.player_transferring
       break
     end
     # Executing place movement
     transfer_player
     # When it is in the midst of transition processing, discontinuing the loop
     if $game_temp.transition_processing
       break
     end
   end
   # Renewing sprite set
   @spriteset.update
   # When it is in the midst of transition processing,
   if $game_temp.transition_processing
     #During transition processing clearing the flag
     $game_temp.transition_processing = false
     #Transition execution
     if $game_temp.transition_name == ""
       Graphics.transition(20)
     else
       Graphics.transition(40, "Graphics/Transitions/" +
         $game_temp.transition_name)
     end
   end
   # The B when button is pushed
   if Input.trigger?(Input::B)
     $world_map_active = false
     $game_temp.player_new_map_id = $restore_map_id
     $game_temp.player_new_x = $restore_player_x
     $game_temp.player_new_y = $restore_player_y
     $game_temp.player_new_direction = $restore_player_direction
     $game_temp.player_transferring = true
     $scene = Scene_Map.new
     $scene.transfer_player
     $game_player.transparent = false
   end
 end
 #--------------------------------------------------------------------------
 # â—? Place movement of player
 #--------------------------------------------------------------------------
 def transfer_player
   # Clearing the prayer place portable flag
   $game_temp.player_transferring = false
   # When the tip of moving differs from the present map,
   if $game_map.map_id != $game_temp.player_new_map_id
     # Setting up the new map
     $game_map.setup($game_temp.player_new_map_id)
   end
   # Setting the position of the prayer
   $game_player.moveto($game_temp.player_new_x, $game_temp.player_new_y)
   # Setting the direction of the prayer
   case $game_temp.player_new_direction
   when 2  # 2
     $game_player.turn_down
   when 4  # 4
     $game_player.turn_left
   when 6  # 6
     $game_player.turn_right
   when 8  # 8
     $game_player.turn_up
   end
   # Reforming the attitude of the prayer
   $game_player.straighten
   # Map renewal (parallel event execution)
   $game_map.update
   # Rewriting sprite set
   @spriteset = Spriteset_Map.new
   # When it is in the midst of transition processing,
   if $game_temp.transition_processing
     # During transition processing clearing the flag
     $game_temp.transition_processing = false
     # Transition execution
     Graphics.transition(20)
   end
   # Executing the automatic operation change of BGM and BGS which are set to the map
   $game_map.autoplay
   # Frame reset
   Graphics.frame_reset
   # Updating the information of input
   Input.update
 end
end



When I use the world map it works, but when I press the cancle button and exit it,

i get the prblem from the Scene Map script on line 302.... Please can anyone help!!! crybaby.gif
makeamidget
um just so you know.. i don't think theres anyone here who is going to count to line 302... so it would help if you told which line that was...

EDIT: wow do i feel like a dick... i missed where it says it in the quote... sorry..
OblivionDMD
@spriteset.dispose

close to the bottom

sry
makeamidget
okay.. well as previously stated.. i feel like a dick... but oh well i will get over it... and just wondering if you did this..

QUOTE
#  Note: well not work unless you remove the @spriteset.dispose from the transfer_player of the Scene_Map
#  Script use 2 graphics Characters/cursor and Tilesets/WorldMap


its at the top of the script and it will give you the error that you are getting.. because its trying to dispose of something twice... and that just don't happen...
OblivionDMD
k i deleted that,

now i get an error below that line...

saying this


@mini_map.dispose


do i delte that too???
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.