Napoleon's Minimap

Shion Kreth

White Knight
Veteran
Joined
Jan 28, 2013
Messages
281
Reaction score
47
First Language
English
Primarily Uses
Upped version 1.02a that is now also compatible with tiny maps in a larger minimap. It won't look nice if you have a tiny minimap in a larger map with opacity < 255 but you could simply edit your map and color it manually in ms paint or something. You shouldn't attempt to cramp small maps into a large minimap window anyway in scroll-mode. I also made the npc's in the demo animate so people won't overlook them anymore.

@Shionkreth

By now I understand that you meant well. So my apologies for reacting a bit rude, I was in doubt whether or not I should ignore you (I should have). But I found your post a bit rude as well. This because I just could not even remotely imagine that you overlooked the following:

- the screenshots

- the npc's in the demo

- only tried increasing the zoom factor (not decreasing)

- did not try out (probably didn't even look at or didn't know) any settings nor instructions from the script itself

- did not see the other map(s) in the demo.

From this I concluded that you were either just rude, dumb or lazy. But let's just say that I drew my conclusion too quickly and perhaps you are just new to this and just happened to overlook things on top of that and that some of my instructions were vague. But I do not feel superior if that matters, just slightly annoyed sometimes when it comes to users and writing documentation.

About the 'jumping minimap'

Your last question is answered in the FAQ (which I removed now in 1.02a because I was to lazy to address it before :p ) but I understand it if you missed that one because it was a bit vague in version 1.01 because I forgot to update the FAQ. But even that was also included in the demo on the map "Won't work properly" in versions 1.00 to 1.02. But if you posted during version 1.00 then you also didn't read/understand the FAQ as well.

About the zooms

zoom_x = 1.0 means 100% x-axis zoom (no zoom)

zoom_x = 0.2 means 20% x-axis zoom. 0.2 = 20%. Anything smaller than 100% means zooming out, anything > 100% means zooming in. The % actually just divides the number by 100 in mathematics. See: https://en.wikipedia.org/wiki/Percentage

I do not document everything to the last detail (even though I should) because I just hate writing 5-15 lines of comments for each setting and parameter with samples and type and god knows what. I mean, I could probably fill up 20 lines of text just for the zoom_x setting. If you don't understand you can ask here and if it's really too complicated then I will simply tell you that I won't support you ;) . I expect a certain amount of 'basic knowledge'. If you can't edit an array, hash, switch a symbol then you should not use my scripts. But I wrote this script relatively fast so I understand it if my instructions are a bit vague here and there. My apologies for that.
Lol, thank you for explaining what a percentage is. That I understood, I just had an inconsistency I'm not sure how I achieved, as it was zoomed out more at 1.0 than 0.3, which didn't make any sense(and good to know now it wasn't supposed to).

I got version 1.01 before seeing there was a 1.02, but the faq from 1.01 only says 'i changed the map size but now i see 2 maps semi on top of eachother' which I took to mean, well, two maps overlapping. The npc in 'won't work properly' does inform me: 'I change the minimap location and size but it will not work properly because of the zoom factors.' 'It'll make the map sprite smaller than th', which is the same for 1.01 and 1.02, maybe that doesn't translate well enough with what's there for me due to my lack of 'basic knowledge'. but likewise the stuff in the script options honestly weren't that descriptive to me, in this specific area at least, cursor size in pixels is crystal clear, but all it says for map zoom x & y is: '# must be a float! Use 1.0 instead of 1 for example', I've been able to change or remove options from Yanfly's scripts so I didn't think I was completely inept at managing these things.

Regardless, yes I did miss the npcs and didn't examine the screenshot tab in detail, so my apologies for wasting your time with asking. Lastly, I apologize for my initial post, I did not mean for it to come across as rude.
 

Napoleon

Veteran
Veteran
Joined
Dec 29, 2012
Messages
869
Reaction score
97
First Language
Dutch
Primarily Uses
We are getting really off-topic.

But I'm not saying that you specifically lack 'basic knowledge', but some people do. You know, writing short but proper documentation for code is harder than writing the code itself... Especially because from our point of view everything is 'crystal clear and obvious and logical' because we are so used to it. I wonder if more people are having trouble with this script and it's configuration...

They overlapped in 1.00 I believe. But who cares, I'm done with this conversation :p . Waste of time, no offense to you but just in general and way too off topic too. Let's just post about the minimap again and possible bugs and such.
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,309
Reaction score
531
First Language
indonesian
@napoleon: yes it's hard to create clear and easy to understand documentation.... been having hard time creating documentation for my decoration script series >.<. i totally agree with your opinion. i also like the phrase you said "Especially because from our point of view everything is 'crystal clear and obvious and logical' because we are so used to it"

Epic and touch my heart. Thumbs up !!

sidetracked a bit... okay back to topic.

is there a possibility to extend this script.so we can have event blip in map. it will make this script look like MMORPG mini map :D .

maybe tag the event page with comment. <blip: image_name>

just suggestion. :D .
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
"A script is meaningless if no one knows how to use it." - unclaimed quote


I've been wondering how easy it would be to say, draw stuff on the minimap.


Like maybe I want to draw key locations or something? Transfer points perhaps? That blink as well?


It would be nice if there was a standard way to do it as well. Like "add_location_of_interest( ... )", or if not using script calls, maybe in the note-tag I can choose a specific location, or event, and choose an icon or graphic or something...
 
Last edited by a moderator:

Napoleon

Veteran
Veteran
Joined
Dec 29, 2012
Messages
869
Reaction score
97
First Language
Dutch
Primarily Uses
Thanks.

Yes I already had that on my todo-list:

  • Only show minimap when party has specific item
  • Refactor & better documentation
  • Override the displayed map (ex: show map005.png on map010)
  • Allow the player blip to blink
  • Add static icons (poi's) as a well as events to the minimap (with the option to blink). The minimap then checks all events on the map when loading the map and checks if they contain a specific tag. However, I must also hook onto the event's 'erase' and switch page to make sure that the event is removed from the map when the event is removed. This can be a pain.
  • Add arrows on the minimap pointing to specific icons on the minimap that are not visible on the minimap (out of visible range)
  • Allow changing the zoom factor on the map during runtime
  • Add zoom in/out button (not sure about this one yet, depends on whether or not my game will be using this feature :p ).

Drawing stuff on the minimap should be really easy. It's just that I need to change the design a bit to also include events.
 
Last edited by a moderator:

Napoleon

Veteran
Veteran
Joined
Dec 29, 2012
Messages
869
Reaction score
97
First Language
Dutch
Primarily Uses
- Version 1.03 is now live.

- With the exception of the zooming I did all of the above in version 1.03 and more.

- I do expect some bugs because I re-wrote some of it and haven't tested it as much as I should have. But I fear that the documentation only got worse :( . I had to add so many settings and such.

- Thanks to Tsukihime for answering some of my Ruby questions.
 
Last edited by a moderator:

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,309
Reaction score
531
First Language
indonesian
nice update. liked the arrow function :D

edit: the treasure chest didn't show.

also i realize there's some bugs where when your event change page. the event didn't update the minimap event.

you might want to 'move' the create minimap event code to:

class Game_Event < Game_Character
def setup_page_settings
 

inside that method

first delete the event minimap if exist...

then draw the event minimap...

so everytime page changes. the minimap will refresh.

victor used that method in his actor event script.
 
Last edited by a moderator:

Napoleon

Veteran
Veteran
Joined
Dec 29, 2012
Messages
869
Reaction score
97
First Language
Dutch
Primarily Uses
The treasure chests aren't supposed to be shown on the minimap. You must set the minimap setting REQUIRE_ITEM to true. Then the minimap will only show after obtaining a matching item from the chests. Now you can create a map item/weapon/armor and then the minimap is only shown when you possess that item/armor/weapon. The problem is that I actually need multiple demo projects but that's such a pain to maintain.
If you DO want to show the treasure chests then you must add the minimap-comment-tag to them.


I would need to see the code for changing the event page. I added 3 pages to an event and switched between them. The minimap graphics updated automatically for me. Note that only 1 page needs the minimap-tag for it to be shown on the minimap. Even if that page is not active.
 

class Game_Event < Game_Character
def setup_page_settings
That won't work because this is sometimes executed like 6-10 times when loading a map (I put a print in it). It would consume unnecessary resources.


- I did find another bug causing the events on the minimap to be slightly misplaced. I fixed it in the new version.
- But I found a more serious bug that doesn't update the minimap correctly after transferring the player to another map... aliasing the Scene_Map.post_transfer() doesn't work because the character_sprites have not yet been initialized. I don't know where to alias my minimap so that it updates it's contents for the newly loaded map. RM seems to cache a lot of maps and character_sprites so simply aliasing the post_transfer() or their main() won't work. And if I call i too early then the minimap will be rendered for the previous map (where the player transferred from) and aliasing it after the new scene is already visible will look weird.
 
Last edited by a moderator:

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,309
Reaction score
531
First Language
indonesian
for the only ONE page with comment needed to make the minimap drawn even that page not active..... it could cause some issues.

for example you want that event to disappear later (using self switch). then the minimap event will still there.

yes you could create some code to erase it

then you want it to show again when another page. you need to create another code to show it again. and it's not user friendly instead just give

that's why creating the minimap event at the setup_page_settings is the best approach.

i think that method only called ONCE everytime we load the map. for it showing 6-10 times it's because it's 'different' event.

try changing your print inside setup_page_settings to:

puts self

and you'll see EACH event will only called that method once.

that method will be called everytime the page change. so it's the best approach.

maybe you could also look at how victor access his comment. he only access the active page comment. so when combined with setup_page_settings it make you able to create:

unique setting each event page. (page 1 show minimap, page 2 don't show, page 3 blinkking)

also you must NOT create the complete set of mini map event in the setup page settings. but only create THAT event minimap event. so it won't waste resource.

if you use that method. even when transferring to another map will fixed by itself. :D .

here's some example on how i implement victor comment grabbing + using setup_page_settings

this script change the event z above 100++. (requested by Daemonium in www.rpgmakervxace.net)

class Spriteset_Map  alias est_event_z_mod_create_characters create_characters  def create_characters  est_event_z_mod_create_characters  recreate_event  end  def recreate_event    i = 0    $game_map.events.values.each do |event|            @character_sprites.viewport = @viewport1 if @character_sprites &&                                                     !@character_sprites.disposed? &&                                                     !event.note["<zmod>"]      @character_sprites.viewport = @viewport9 if @character_sprites &&                                                    !@character_sprites.disposed? &&                                                     event.note["<zmod>"]            i = i+1    end  end  alias est_event_z_mod_create_viewports create_viewports  def create_viewports    est_event_z_mod_create_viewports    @viewport9 = Viewport.new    @viewport9.z = 100  end  end class Game_Event < Game_Character  alias est_event_zmod_setup_page_settings setup_page_settings  def setup_page_settings    est_event_zmod_setup_page_settings    return unless SceneManager.scene.is_a?(Scene_Map)    return unless SceneManager.scene.spriteset    SceneManager.scene.spriteset.recreate_event  end  #below taken from victor basic module to grab event note too lazy to write my own.   def note    return "" if !@page || !@page.list || @page.list.size <= 0    comment_list = []    @page.list.each do |item|      next unless item && (item.code == 108 || item.code == 408)      comment_list.push(item.parameters[0])    end    comment_list.join("\r\n")  endendclass Scene_Map < Scene_Base  attr_reader :spritesetendanother example script that utilize setup_page_settings (beside victor actor event)

MOGHUNTER Event Text Popup script (the one so we can create label above event)

also hijack that method :D

btw this script is the closest thing to mmorpg mini map. so i hope this can be perfected :D .

also i didn't said you SHOULD follow victor's method. just saying his method currently is the most efficient (less code and less bug) to execute. maybe if you found some other way which better than victor's it's okay.

hope this help.
 
Last edited by a moderator:

Napoleon

Veteran
Veteran
Joined
Dec 29, 2012
Messages
869
Reaction score
97
First Language
Dutch
Primarily Uses
I didn't had a lot of time but I hope that it works right away. I upped version 1.03a that includes 1 bug fix, 1 crash fix and now it should only render events when their 'command-tag' is on the active page of the event.
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,309
Reaction score
531
First Language
indonesian
great! i will test it tonight. maybe tomorrow i can online and tell you the result

also some suggestion for you. you might want to use dropbox as demo hosting. you only need to copy the new demo overwriting the old demo in the dropbox folder in your computer. then after the dropbox finish synching. it will use the same link. no need to edit the link. :D . (also as far as i know drop box link never expire)

if you're interested use my referral please :D . so i can get extra 250 mb.

http://db.tt/a6RYArgK

i also use drop box to upload demo for my scripts :D .
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,309
Reaction score
531
First Language
indonesian
bug report + fixes (i have some time and playing with your script a little :D ):
bugs in 1.03a:
1) crash when opening menu
2) crash when returning to title (f12 or event command or menu command)
3) crash when loading a game after returning to title
4) minimap still shown in battle.
 
here's the fix (with documentation what i did

module Nap  module Event    #failsafe method to prevent error. the raise can be removed actually.    def self.get_event_character_sprite(ev_id)            return if !SceneManager.scene.is_a?(Scene_Map)      raise 'Can only be called on a Scene_Map' if !SceneManager.scene.is_a?(Scene_Map)      return if !SceneManager.scene.spriteset      SceneManager.scene.spriteset.character_sprites.find{|e| e.character.id == ev_id}    end    #failsafe method to prevent error. the raise can be removed actually.    def self.get_player_character_sprite      return if !SceneManager.scene.is_a?(Scene_Map)      raise 'Can only be called on a Scene_Map' if !SceneManager.scene.is_a?(Scene_Map)      return if !SceneManager.scene.spriteset      SceneManager.scene.spriteset.character_sprites.find{|c| c.character.respond_to?('followers') }    end  endendmodule Nap  class Minimap    #patch to not updating minimap when not in scene_map    #it's one liner and i actually can just alias it but i decide to include the whole class instead    #since you could add the code in the main script later.    def update      return if !SceneManager.scene.is_a?(Scene_Map) #only add this line      if (SceneManager.scene.is_a?(Scene_Map) || @visibility_override == :show) && @visibility_override != :hide && @enabled && @has_image        set_visibility(true) if !@visible                MM_Event.update_blink        blink_cursor        update_player_cursor if USE_PLAYER_GRAPHIC                case @mode        when :default          set_cursor_location        when :scroll          set_scroll        else          raise "update: Unknown @mode (#{@mode})"        end                    render_events        @icons.each { |i| i.render(self, @sprite.bitmap) } if @show_icons        @visible = true      else        set_visibility(false) if @visible        @visible = false      end    end        #not refreshing minimap when not in scene_map. same as above    def refresh      return if !SceneManager.scene.is_a?(Scene_Map) #only add this line      create_minimap_events      create_overlay if OVERLAY_IMG      create_sprite      reset_cursor_location if @player_sprite    end    #failsafe dispose method. only dispose if the object exist and not disposed already    def dispose      @sprite.dispose if @sprite && !@sprite.disposed?      @player_sprite.dispose if @player_sprite && !@player_sprite.disposed?            @border.dispose if @border && !@border.disposed?      @border_img.dispose if @border_img && !@border_img.disposed?      @cursor_img.dispose if @cursor_img && !@cursor_img.disposed?      @overlay.dispose if @overlay && !@overlay.disposed?      @base_map.dispose if @base_map && !@base_map.disposed?      @arrows_src_img.dispose if @arrows_src_img && !@arrows_src_img.disposed?      @icons.each { |i| i.dispose if i && !i.disposed?}    end  endend#i change the patch to dispose the previous $minimap and recreate new minimap instead#it solve f12 then f12 again bugs.# Creates the minimapclass Scene_Base#  alias nap_minimap_post_start post_start. the alias already in the main script  def post_start    $minimap.dispose if $minimap    $minimap = nil    $minimap ||= Nap::Minimap.new    $minimap.refresh    nap_minimap_post_start  endend#no need to dispose at terminate since it already handled in post start of each scene. 
i don't want to alter your script so i extract the faulty function and then overwriting it.

edit: the code earlier still have problem with f12 reset when at title screen then start new game / load game.

fixed it.
 
Last edited by a moderator:

Napoleon

Veteran
Veteran
Joined
Dec 29, 2012
Messages
869
Reaction score
97
First Language
Dutch
Primarily Uses
Upped version 1.04 and updated the screenshots.

Patch notes:

Code:
1.04 (20 June 2013) (Mainly by estriole)  - Fixed [F12] crash.  - Never updates the minimap when not in Scene_Map.  - Made the dispose method 'failsafe'.  - Disposes the minimap instead of hiding it.  - Added new setting: SCALE_OVERLAY = true/false.  - You can now use a switch to turn on/off the minimap.
 
Last edited by a moderator:

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,309
Reaction score
531
First Language
indonesian
thank you for the update :D . gonna test the overlay scale and switch feature tonight... i'll report it tomorrow if possible :D .
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,309
Reaction score
531
First Language
indonesian
tested and work beautifully. :D . no bug so far...
 

ACE RyanAnayaMc

New to Game Making
Veteran
Joined
Jul 8, 2013
Messages
48
Reaction score
1
First Language
English
Primarily Uses
Great minimap! Now the races in my game have a real Mario Kart Wii feel!!!
 

ShinGamix

DS Style 4Ever!
Veteran
Joined
Mar 18, 2012
Messages
3,905
Reaction score
451
First Language
April Fools
Primarily Uses
N/A
Is this the same minimap from tomoaky and whiteflute's MMO_HUNT_Ace Demo?

Cause it looks identical almost.
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,309
Reaction score
531
First Language
indonesian
@shingamix: it's different script... i guarantee :D ...

napoleon have more feature like arrow to event (gta like). event shown in minimap (like mmorpg minimap). resize minimap. change opacity. etc.

but the one that make me sure it's a different script is because the basic of the minimap itself:

in mmoace. the minimap is a Sprite.

lines that back that statementclass Sprite_MiniMap < Sprite and  @minimap_sprite = Sprite_MiniMap.new
in napoleon. the minimap is a Class with Sprite inside it.

lines that back that statementmodule Napclass Minimap and $minimap ||= Nap::Minimap.new
if you wonder why the mapping is the same? it's because it's sample map (Cave Entrance)

just right click and choose load sample map. :D .

maybe that sample map is prefered by scripter that make minimap? :D .

or napoleon too lazy to screenshot and took the screenshot from mmoace folder ? (but i doubt this :D )
 
Last edited by a moderator:

Napoleon

Veteran
Veteran
Joined
Dec 29, 2012
Messages
869
Reaction score
97
First Language
Dutch
Primarily Uses
I never even saw the mmohutace  minimap (or whatever it is called). But it's highly unlikely that it's the same because I created this script from scratch and some code is even from another guy on these forums that he added to it (which mostly proves that it is original because it's not solely build by me). So if it is the same then mmohutace simply took the code from my minimap.

Yes I used sample maps.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Is this the same minimap from tomoaky and whiteflute's MMO_HUNT_Ace Demo?


Cause it looks identical almost.
What do you mean?


Like, an RTP map happens to look like another RTP map?


That should not be something new since RM's had RTP since whenever...
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,845
Messages
1,016,961
Members
137,561
Latest member
JaCrispy85
Top