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
OblivionDMD
edit

well, i dont really understand what you meant makeamedget ,

but what i did is by the bottom in def_transfer player , where on line 302 where i had the prblem... well i delte that line

" @spriteset.dispose" (that thing)

and when i tried to see if it worked, i got a problem 2 lines down ....

saying

"@mini_map.dispose " (that thing)



so, i thought to delete that... well i did... and It WORK!!!!

except.....



now, the cursor on the world map thing, when i exit, the cursor still there......


heres a screen shot of what i mean


icon_fleche_ff3.gif

Pic 1

Pic 2

Pic 3


And that cursor just stays there...


Help.....

Here is the script of my scene_map ...... now, when i delted the stufff


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 = Spriteset_Map.new
   
   @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



So, can anyone help me????
OblivionDMD
help
prepe
Ok Sorry To Bump An Old Topic But I Am having a problem i am using a 500 X 500 Map and if i walk to the midle of the map i my little dot is all ready at the eadg and evenchale gose of the map and i don't know what to do


Hear are to screen shots

Small Map

Big Map

Is it posable to use this with a 500 X 500 Map if so please help tell me what i did
rong
hjuibn
prepe,to edit how fast/far the dot moves find
@player_sprite.x = $game_player.real_x/16
@player_sprite.y = $game_player.real_y/16
in the MiniMap script then replace the 16's with 500 or watever map size u got. this can work better if u edit the map size to a size that is consistent with ur code. so basically setting the 16 to 500 is just a start, its up to u 2 figure out the png image sizes.

o and one more thing,if u cant find that code that i got above jsut try searching for
@player_sprite.x = $game_player.real_x/
wind blazer7
i put in the script, but how do i get the minimap to appear? I got a picture of the map, but i dont know how to get it in the game, can you help?
YNG
Excuse me for bumping the topic, but I can't figure how to close the minimap :help: . Earlier in the topic someone say'd I'd just had to event-script this: $name_minim[1] = "" to deactivate it but thats not really working out (the minimap stays there). So it'd be helpfull if someone told me the correct way.
Grandor
Alright I got the Scripts in where their supposed to go, but the map isn't showing up. What do I do?
dog199200
CODE
um site newbie here and I'm having the same problem as the dude who posted above me. I have made sure several times that everything is right, but still it doesn't show the mini map, and before you ask yes I have the images and no I can't give you my files you you can see the script set up to see if it works, I don't have a host or know how to zip files. If someone can help me I would appreciate it and I'm willing to work with any one to get help ^^ :) :P


Ok I got that all to work finally, but what does it mean by what it says at the bottom of the code?
[spoiler=Code Fragment]
# ==================== 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[/spoiler]

and one more thing, I know someone has already asked this but they weren't answered. Is there any way to make big maps scroll? I will install the code my self and all that, I just need the code to do so.
kain19kain18
Can someone explain to me from the beginning how it works cause im lost..sorry..
reon
well i wanted somthing like ths for my world map but its 500x500 tiles and u cant prntscreen all that (well if u did it piece by piece then maybe...).

one question do i have to make the edits (to other classes) u made in the demo(v1.7) if i use the v1.9 script?
Dark shadow
Is it possible to change the "refresh rate" of the minimap: it lags a lot...
Helladen
I am lost, seems like to much work for just a mini map eusa_wall.gif
noobo
Hey, nice script, I my use this.
Mr01sam
Ya could I please have a Demo for this?
Its a little to confusing for me and Im more of a visual learner.
calvin624
I just tried this in my XAS ABS game (like Zelda, Mana styled).

On the face of it I really like it, but as I began to implement it a little more some issues arose which I think I'll share for anyone thinking of using this script and custom minimaps within their game.

First of all, please don't let my comments and findings put you off, I only list them here as food for thought. As I said I really did like the script.

Ok ...

[Spoiler="Click here for 'Problems'"]

Lingering enemies on map -

A good utility within this script is the ability to assign colours to different objects, NPCs or enemies. Please bear in mind that all my enemies are on the map itself so this may not apply to everyone:

I assigned my enemies with red which looked really great on the minimap and worked perfectly, however, once I destroyed an enemy it lingered on the minimap for quite some time before disappearing (probably a refresh rate issue).

Infinite lingering? -

This problem was to do with chests. I thought it'd be neat if I coloured them green hoping that once I'd opened the chest the indicator would disappear (letting the hero know there was no treasure left on that map) but it stayed green, which could be confusing I guess. I'm sure there is an easy workaround for that (I remind you that these are just my initial findings upon using this script).

The screenshots I took tend to show off the secrets within the maps -

Now this is probably the main reason I won't be using this script.

As I'm using a XAS system I have a lot of caverns and caves that can only be found by blowing up walls with bombs. The solid walls hiding the secret entrances are "events" within my game, and so taking pictures of the third layer is no good since it shows off the secrets on the minimap.

This is not so much the script's fault as a shout out to those that are thinking of implementing it to be wary that you may have to compile a "spoiler-free" version of your map then take a screenshot. But this in itself causes an issue as once you do blow up the wall the minimap will still show it as a solid wall.
[/Spoiler]

Alright, I hope my ramblings have been some use for you haha, feel free to either reply with your workaround for said problems (although I won't be using the script the solutions to those problems would be nice to have archived for those that will be).

Take care all.
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.