GGZiron's Minimap V.1.2.3

GGZirons's Minimap​
  • Script name: GGZiron's Minimap

  • Author: GGZiron

  • Get the script: From GitHub.

  • The previous version(just in case): From GitHub

  • Purpose: Adds Minimap on the Scene Map, to be used for navigation.

  • Engine: RPG Maker VX Ace

  • Compatibility: Check it yourself, for your project 🙂.

  • Version: 1.2.3

  • Last Update:
    Spoiler
    Version 1.2.2 Released on 09/12/2020
    And again, forgot to fix same issue if player continue from save file
    instead to start new game..Now should be really fixed.

    Version 1.2.1 Released on 08/12/2020:
    Upon pressing f12(and maybe under other circumstances too), my minimap
    window would stay blank. Connected with not initializing everything
    upon starting new game. Now that should be fixed.
  • How easy to use:
    Spoiler
    From medium to hard, depending how much of the settings
    you plan to change. Even if none, you gotta place comment tags for events,
    if you want them drawn on minimap, and check the toggle option with button,
    as the probability to like the default is not too high, especially if you
    love to dash in debug through during play test.

  • Comment tags(used within events):
    Spoiler
    <minimap normal color>
    Will draw default color for the event, if that comment tag is on the active page.

    <minimap color n>
    Will draw color n from COLORS hash for the event, if that comment tag is on the active page.You can add more entries in the COLORS hash. The letter n is the key for the color.
    Example:
    <minimap color 6>
    Will use color with key 6 from the COLORS hash.

    Comment tags are case sensitive, and spacing between characters must remain same.

  • Script calls:
    Spoiler
    Asside of Input buttons, minimap visibility can be
    changed with script call too. It is one if those two:

    Minimap::enabled = true
    Minimap::enabled = false

    The first one enables it, the second one disables it.

    Minimap::map_list_add(map_id)
    Minimap::map_list_add(map_id_1, map_id_2, map_id_3, ... map_id_n)

    Adds to the maps list(see more about it in general options) all the entries. Would those maps be displayed or ignored, depends from MAPS_LIST_FORBID, which you set in settings.

    Minimap::map_list_drop(map_id)
    Minimap::map_list_drop(map_id_1, map_id_2, map_id_3, ... map_id_n)

    Drops entries from the maps list.

    Minimap::update_when_disabled = false
    Won't draw and update maps when they are hidden.

    Minimap::update_when_disabled = true
    Will draw and update maps even when they are hidden.
    If currently hidden, the minimap will be drawn on that script call,
    unless is forbiden to show by maps list.

    If you need to redraw minimap entirely, because it happens something that
    my minimap didn't react on, you can use this script call:
    Minimap::redraw_area
    Redraws entire map.
    In earlier versions i provided Minimap::draw_map, but that will not work
    anymore. That so because while it will draw map again, it will use the old
    passability data. So, use Minimap::redraw_area instead, if other script
    changed terrain, regions, terrain tag or damage floors.


    Minimap::set_refresh_flag
    Also redraws the minimap, but is done on the next Minimap update.
    Uses old passability data, so will not redraw map.

    Minimap::redraw_area(x1, y1, x2, y2)
    Doing that, the script will redraw only tiles between x1 and x2,
    and tiles between y1 and y2 (An rectangle area).
    The coordinate x2 can be same as x1, and y2 can be same as y1, so to redraw
    only one tile. Coordinates x1 and y1 must be same or smaller value than x2
    and y2, otherwise the redraw request will be ignored.
    With version 1.2.0, that script call is tested and fixed.

    There are more script calls, which you can find in the Script calls header inside the script.

  • Features:
    Spoiler
    *Kinda simplified minimap, but not simple on features.
    *Draws passable area.
    *Draws impassable area.
    *Option to set or unset buttons for toggling minimap visibility.
    *Draws partly passable as passable, but then draw impassable line on the
    edge of the tile. You will see what I mean if you test ladders, walls
    with walk-able upper floor, ladders, bridges and so on.
    *Draws events, but not by default. You need to put comments with certain
    formation, similar like in the notetags. Also, while there is default color
    for the events characters, you can set to use different one, to make
    characters standing out of the crowd(quest NPC, point of special interest).
    *Player input options.
    *Option to draw regions and terrain tags too.
    *Draws damage floor.
    *Updates player and event movement on straight move, diagonal move, jump,
    set position.
    *Redraws passage map on changing vehicle, according the new passability.
    For example, riding boat will turn all water tiles as passable, and all
    ground as impassable. Region and terrain tag, same as damage floor,
    remain unchanged.
    When using airship, will draw the land ok tiles, instead passable tiles.
    Otherwise riding airship would mean to have one color minimap, with no tiles
    within, as airship can pass through everything.
    *Option to change the character object priority. Priority is used so if
    two objects are within same tile, it will draw the color of the one with
    higher priority. Objects are: player, events, damage floor, region,
    terrain_tag, vehicle. When two events share a tile, it will draw the one
    with higher id number.
    With version 1.1.0, objects are on two groups: characters and tiles.
    *Configurable minimap size; transparency; x, y and z coordinates.
    *Reacts on loop maps, as then the minimap loops too.
    *Option to determine how deep to look in event commands for the needed
    comment tags. In ideal case, should be set to look only the top one
    comment, but if there is other script requiring comments to be on top,
    then you can set to look for second command or third and so on.
    Merging same comment to have many tags for the different scripts is option
    too.
    *With version 1.1.0: Maps List. See in general options about it.

    One feature that is NOT included (for now), is drawing the followers.

  • Screen Shots:
    Spoiler
    Indoor. See wall and ceiling floors.
    MM1.png

    Outside. See wall here too. Ladder is reflected.
    MM2.png

    About to ride a boat.
    MM3.png

    On boat now. Map redrawn with new passability.
    MM4.png

    And now, on airship. As on airship everything is passable, the black tiles here are the tiles
    where the ship cannot land.
    MM5.png

  • Author notes:
    Spoiler
    Why I made minimap script: Just recalled how much I wanted to have one before, but couldn't find.
    I recalled that after trying to do fix for other minimap script, but didn't got anything from there.
    My script works differently.
    As that is my initial version, you might want me to patch it a little before including that into your project.
    As my University semester starts, I won't be able to do big fixes for some time, but might be able to do minor ones.

  • Possible issues:
    Spoiler
    Aside everything else that could go wrong, it could affect the game performance. But if it is affected too much, then there is incompatibility with other script, or flaw in my script design, that is triggered from other script.
  • Known script flaws:
    Spoiler
    Works kinda slow for very big maps. Also, it consumes a lot of memory. With the default TILE_SIZE (given in settings) in 500 x 500 map, a default project would eat nearly 80 mb operative memory, when without my script on same map it takes only 35 mb. That is so because it draws one large bitmap. To prevent that, I guess I should write some sorta tile map, but so far I couldn't figure how to make one, and cannot use the engine's Tilemap for the minimap. With not too big maps I believe this flaw won't be a deal breaker.

    Other known flaw is with the looping maps. While minimap itself will loop properly, the event characters will not. They would appear suddenly on their spots only after the player is relocated at the oposite end.

  • Terms(updated):
    Spoiler
    Free for non commercial and commercial projects.
    Sending me a copy of your game would be very appreciated,
    but is not mandatory. With terms update, that so even for commercial
    projects. You have to credit me as GGZiron.

    Not allowed to repost, only allowed to post link to this script tread in
    RPG maker forum.
    Allowed to edit, and allowed to post your edit, but together with link to this
    script tread in RPG Maker forums. Not the case if the very post is within
    the tread of this script in RPG Maker forums, then link not needed.
Looks REALLY cool! Congratulations!!
This is a step up from another mini-map I use, but it is missing one thing that would prevent me from using it in my project.
The other mini-map script lets you specify what maps to hide it on by specifying <> tag in the map note-box.
If you can put that in then I'll certainly look into adding it to my project.
Otherwise, this looks pretty nice.
Well done
Thank you for the feedback.
@Wavelength: Hope it behaves as it looks. I am really glad you like it.
@Roninator2 , I had exactly that feature in mind to add in future updates. Just still thinking how exactly to do it.
In some games (like Kingdom Hearts), the minimap won't display until you get a "map" item. I definately would add it in one way or another, so be sure to look for updates.
I am glad you like it too 🙂.

Edit: Just realised the player on minimap doesn't move smoothly.
That made me realise the way I add objects in the minimap is wrong. Will work on it when I get the time.

New edit: With my new update, player moves smootly. Changed terms(little less demanding).

@Roninator2 , added the feature you mentioned, but in my script is array with map ids, and additional variable that set if maps within to be allowed, or forbiden. The map list can be changed in game too, via script calls. Forbiden maps will not update and not draw until you unforbid.

So many new stuffs, so I would be more surprised if there is not some lurking bug, but so far didn't found any.
Apologies for necroposting, but I have to say, this script is absolutely wonderful!
I have noticed one compatibility issue with Victor's Light Effects and Fog Effects script, where using a shaded lighting or fog effect would overlay on top of the Minimap window, but it's easily fixed by setting the z coordinate of the minimap to be higher than the z coordinate of the shade effects.

Awesome script! For a while I was panicking about how I would go about making an at least 90x90 maze be traversed easily, and then I found this.

I cannot express enough praise of this awesome script!
Hello! First, thanks for the feedback!

I am not a mod, but overheard necropost rule doesn't apply for script treads. If I am wrong, hope a mod would correct me.

Will look on the compitability issue you mention when time permits 🙂.

Edit: Victor's shades are bound to Spriteset's instance variable @viewport2, which have z value of 50. I edited my minimap's default z to be 60. While doing so, found another bug, that hopefully is fixed now.
After I install the v1.2.2's script to new project directly, it occur the following error,

Line 1067 TypeError occur
can't convert Array into Integer

How can I fix this error?
Your prompt reply would be highly appreciated.

p.s. v1.1.1 works normally
After I install the v1.2.2's script to new project directly, it occur the following error,

Line 1067 TypeError occur
can't convert Array into Integer

How can I fix this error?
Your prompt reply would be highly appreciated.

p.s. v1.1.1 works normally
In an empty project it works fine.
Are you loading a save game or starting a new game?
In an empty project it works fine.
Are you loading a save game or starting a new game?
starting a new game in an empty project.
My method set_passage_color, doesn't handle all possible situations. The return statement inside the loop in some cases is never reached, and I forgot to put a return outside the loop. For what I seen, if inside loop return never reached, then tile should be not passable color.

Will try to find time to post a hotfix tomorrow.

And it really looks as if it work on new project, because the sample maps I used or my own never had tile that doesn't reach to the return statement. But seems is some situations, it doesn't.

Edit: Updated my script to 1.2.3. Now it shouldn't give this error anymore.

Original thread: https://forums.rpgmakerweb.com/threads/ggzirons-minimap-v-1-2-3.112678/