Minimap Plugin

Discussion in 'JS Plugin Releases (RMMV)' started by TheUnproPro, Aug 7, 2016.

  1. TheUnproPro

    TheUnproPro Veteran Veteran

    Messages:
    16
    Likes Received:
    21
    Location:
    Bradenton, FL
    First Language:
    English
    Hi there! This is my first (Technically second since I re-wrote the older code), plugin for RPG Maker MV. I've been working a lot on it and have improved it since its original release, thus I give you this Minimap Plugin. I will say this for people who make plugins, you might not wanna read my code... while the performance is about as optimized as I can get it, reducing the amount of looping required by storing things in arrays and only drawing the map once, etc, the code might look a bit messy, so if you're picky about that try to avoid looking at my code :p


    Download:


    Bug was fixed which hid the minimap.  View attachment UPP_MINIMAP.js

    FEATURES

    • Automatic mini-map drawing (optional), draws the map based on the collision map.
    • Optional Region drawing for height-map effects or various other mini-map art.
    • Event Display for events that have the note-tag <mm_setColor: color>
    • Option to change the way the player or events are drawn, from square to circle shape
    • Events can have a beacon effect applied to them via a plugin command.
    • Endless event colors, as each events color is set via the note tag, but you're also able to change an events color via plugin command as well. 
    • Pressing Q (Customizable) will toggle the zoom mode based on your settings.
    • Optional border drawing around the minimap for decoration, it uses the window border.
    • Optional display name for the area using the note tag <mm_areaname: Name> in the map properties.
    • Option to change display name via plugin command
    • Font color and size can be set via the settings.

    Screenshot:
     

    [​IMG]


    [​IMG]



    Help:

    Code:
    This plugin will display a  mini-map for your game.
    
    Custom Name Location - This parameter lets you define the
    location of the minimaps name display.
    
    Possible locations:
    ABOVE, TOP, MID, BOTTOM, BELOW, ABOVERIGHT, TOPRIGHT, MIDRIGHT,
    BOTTOMRIGHT, BELOWRIGHT, ABOVELEFT, TOPLEFT, MIDLEFT,
    BOTTOMLEFT, BELOWLEFT
    
    NOTE TAGS
    In map properties, if you add <mm_areaname: Name> to the notes (Where
    Name is the name of the area), you'll set the display name for the
    mini map.
    
    If you want an event to be displayed on the minimap, you can type
    this in the events note tag.
    <mm_setColor: rgba(0, 255, 0, 0.8)>
    Alternatively, you can use rgb and hex as a color source as well.
    
    PLUGIN COMMANDS
    upp_minimap - set values to show / hide to hide or show the minimap.
    || Example:
    ||  upp_minimap show
    
    upp_m_useCM - This decides rather or not to use the default
    				Collision Mapping or strictly use region drawing.
    || Example:
    ||  upp_m_useCM true
    
    || Example:
    ||  upp_m_hideEventDrawing 1
    
    upp_m_showplayer - set values to true / false to hide or show the player.
    || Example:
    ||  upp_m_showplayer true
    
    upp_m_showEvents - set values to true / false to hide or show the events.
    || Example:
    ||  upp_m_showEvents true
    
    upp_m_border - set values to true / false to hide or show the border
    || Example:
    ||  upp_m_border true
    
    upp_m_name - Setting this to true/false will show or hide the minimap
    display name, however, using the set option, you can change the area
    name display.
    || Example:
    ||  upp_m_border true
    ||  upp_m_border set Map Name
    
    upp_m_setScale - sets the minimap size.
    || Example:
    ||  upp_m_setScale 5
    
    upp_m_setZoom - sets the minimap zoom size.
    || Example:
    ||  upp_m_setZoom 10
    
    upp_m_changeImpassColor - Changes the impassable tile color.
    || Example:
    ||  upp_m_changeImpassColor #11aaff
    ||  upp_m_changeImpassColor rgb(25, 150, 255)
    ||  upp_m_changeImpassColor rgba(25, 150, 255, 0.5);
    
    upp_m_changePassColor - Changes the passable tile color.
    || Example:
    ||  upp_m_changePassColor #11aaff
    ||  upp_m_changePassColor rgb(25, 150, 255)
    ||  upp_m_changePassColor rgba(25, 150, 255, 0.5);
    
    upp_m_relocate - Relocates the minimap.
    || Example:
    ||  upp_m_relocate 24 24
    
    upp_m_namePosition - Changes where the minimap name is drawn.
    || Example:
    ||  upp_m_namePosition TOP
    
    upp_m_nameOffset - Changes the map names X/Y Offset.
    || Example:
    ||  upp_m_nameOffset 24 24
     
    upp_m_nameBGColor - Changes the BG color of the name window.
    || Example:
    ||  upp_m_nameBGColor #11aaff;
    ||  upp_m_nameBGColor rgb(25, 150, 255);
    ||  upp_m_nameBGColor rgba(25, 150, 255, 0.5);
     
    upp_m_setRegion - Changes the color of the specified region ID.
    || Example:
    ||  upp_m_setRegion 1 color #11aaff;
    ||  upp_m_setRegion 1 color rgb(25, 150, 255);
    ||  upp_m_setRegion 1 color rgba(25, 150, 255, 0.5);
    
    upp_m_regionClear - you can clear a range of regions, clear a
    					  single region, or clear all the regions to
    					  stop them from being drawn on the minimap.
    || Example:
    ||  upp_m_regionClear single 1
    ||  upp_m_regionClear range 1 4
    ||  upp_m_regionClear all
    
    upp_m_hideEventDrawing - Hides the event from the minimap by setting
    						   its color to rgba(0, 0, 0, 0).
    || Example:
    ||  upp_m_hideEventDrawing 1
    
    
    upp_m_playerCircle - Setting this to true/false will set if the player
    					   icon is a circle or a square.
    || Example:
    ||  upp_m_playerCircle true
    
    upp_m_eventCircle - Same thing as upp_m_playerCircle, only with events.
    
    upp_m_setBeacon - Use this to turn an event into a blinking beacon.
                      Order: upp_m_setBeacon eventId show expand_speed
                      start_opacity opacity_fade_speed delay
    || Example:
    ||  upp_m_setBeacon 2 true 0.2 255 4 60
    
    upp_m_changePlayerColor - Changes the color of the player indicator.
    || Example:
    ||  upp_m_changePlayerColor rgba(150, 255, 255, 0.5)
    
    upp_m_changeEventColor - Changes the color of the event.
    || Example:
    ||  upp_m_changeEventColor 1 rgba(150, 255, 255, 0.5)
    
    REGION COLORS:
    By default, the region colors are set to NONE which makes the map
    not render them. Simply change NONE to a hex color, rgb, or rgba.
    Example: rgba(0, 0, 0, 0.5)
    
    There are a total of 255 regions, so be sure to use ones that you
    aren't already using for other scripts, or at least find a way to
    make them co-exist if you want to add a little extra detail to your
    mini-maps.
    NOTE:
    Please report any bugs you happen to find. Hopefully I'll be able to fix them, I'm still kind of fresh to making Plugins, but I have some tiny experience in javascript.
     
    Last edited by a moderator: Aug 7, 2016
    #1
  2. shayoko

    shayoko Veteran Veteran

    Messages:
    208
    Likes Received:
    121
    First Language:
    English
    All your hard worked payed off! good job!
     
    #2
    Andoru64 likes this.
  3. TheUnproPro

    TheUnproPro Veteran Veteran

    Messages:
    16
    Likes Received:
    21
    Location:
    Bradenton, FL
    First Language:
    English
    Thanks :D
     
    #3
  4. Coopziana

    Coopziana Veteran Veteran

    Messages:
    115
    Likes Received:
    43
    First Language:
    English
    Fantastic script, of all the mini map scripts out there this one tops the bill IMO. I'm just having a little problem with the change region colour command.


    I've used all 3 of the example calls you provided in your help file and none of them work... well they do work but instead of changing the area's to the defined colour they change them to black.


    Just for clarification, it's this script call:


    || upp_m_setRegion 1 color #11aaff;


    || upp_m_setRegion 1 color rgb(25, 150, 255);


    || upp_m_setRegion 1 color rgba(25, 150, 255, 0.5);


    So basically no matter which one I use the result is that the region turns black on the minimap. :(
     
    #4
  5. masterlobo

    masterlobo Veteran Veteran

    Messages:
    144
    Likes Received:
    77
    Location:
    Seattle, WA
    Digging this script, but two questions:


    1. What are the terms of use?


    2. Are you going to add more features or are you taking feature requests?
     
    #5
    RoadKillCandy likes this.
  6. Coopziana

    Coopziana Veteran Veteran

    Messages:
    115
    Likes Received:
    43
    First Language:
    English
    I guess the owner of this script doesn't provide support... shame!
     
    Last edited by a moderator: Nov 2, 2016
    #6
  7. Ahuramazda

    Ahuramazda Veteran Veteran

    Messages:
    195
    Likes Received:
    60
    Location:
    China Grove, North Carolina
    First Language:
    English
    Just checked this out and im pretty sure he was using the "||" as bullet points in his examples, so instead of how you asked this a while back



    It would have actually been like this for the plugin commands:


    upp_m_setRegion 1 color #11aaff


    upp_m_setRegion 1 color rgb(25, 150, 255)


    upp_m_setRegion 1 color rgba(25, 150, 255, 0.5)


    Try it like that and if it still doesn't work Ill look in more detail :D
     
    #7
  8. Coopziana

    Coopziana Veteran Veteran

    Messages:
    115
    Likes Received:
    43
    First Language:
    English


    Lol, yes I am aware that the || is a bullet point, naturally I didn't put that in the plugin command line.

    Untitled.png
     
    #8
  9. Coopziana

    Coopziana Veteran Veteran

    Messages:
    115
    Likes Received:
    43
    First Language:
    English
    Just in case, I though that perhaps removing the ";" at the end of each command might help... but no change! :(
     
    #9
  10. Ahuramazda

    Ahuramazda Veteran Veteran

    Messages:
    195
    Likes Received:
    60
    Location:
    China Grove, North Carolina
    First Language:
    English
    Took some time and looking at the code and the plugin command is explained wrong... and its neither of our faults.


    upp_m_setRegion 29 #ff0000


    This plugin command will change your region color to the red you are wanting... no clue why that extra word "color" was in the examples. I did notice since my default project is using several Yanfly plugins I was getting an error dealing with 'toUpperCase' and I couldn't figure out why, but hopefully you wont have that problem.


    If you need anything else ask and Ill see if I can help further if the plugin author can't/won't :D


    EDIT: If you do use this with Yanfly stuff make sure it is above all things Yanfly.  Figured it out at least, lol
     
    Last edited by a moderator: Nov 4, 2016
    #10
    Eliaquim likes this.
  11. Coopziana

    Coopziana Veteran Veteran

    Messages:
    115
    Likes Received:
    43
    First Language:
    English
    @ahuramazda I could kiss you. Worked perfectly. Thanks very much!
     
    #11
    Ahuramazda likes this.
  12. Marillmau5

    Marillmau5 Veteran Veteran

    Messages:
    79
    Likes Received:
    9
    First Language:
    English
    great script, using it for sure. but i have a problem.


    how can i hide the map name completely, no bars or borders. I tried taking all that off and i still get a black border where the map name would be.


    I guess i could add values to make it completely transparent but i want it gone not even existing.
     
    Last edited by a moderator: Nov 4, 2016
    #12
  13. Ahuramazda

    Ahuramazda Veteran Veteran

    Messages:
    195
    Likes Received:
    60
    Location:
    China Grove, North Carolina
    First Language:
    English
    Unless you want to edit the actual script you can just set up the plugin parameters to do it... yes, the window is still there, no it wont have any color or words in it.


    Custom Name Border = false


    Custom Name BG = (0,0,0,0)


    Custom Name Show Window BG = false


    If you want the code edited so it wont be there I can do that too... open the plugin in a program like notepad++ and comment out lines 1962, 1966, and 1970 and that will make the window skip drawing all together


    here is what the section of code should look like.


    Untitled-2.png
     
    #13
    Marillmau5 likes this.
  14. Marillmau5

    Marillmau5 Veteran Veteran

    Messages:
    79
    Likes Received:
    9
    First Language:
    English
    thanks it worked but with Custom Name BG = rgba(0,0,0,0)   instead of without rgba, because the transparency i guess.


    BTW if anyone is having problems with this and the map zoom script just put the minimap script at the top of the plugins list and everything will work.
     
    Last edited by a moderator: Nov 6, 2016
    #14
  15. CielRpg

    CielRpg Veteran Veteran

    Messages:
    34
    Likes Received:
    1
    First Language:
    English
    Hi. I'm using your minimap plugin but I don't know what I'm doing wrong because there is no minimap showing up on the screen. Can someone pls tell me what I'm doing wrong.

    Screenshot (137).png

    Screenshot (138).png
     
    #15
  16. Coopziana

    Coopziana Veteran Veteran

    Messages:
    115
    Likes Received:
    43
    First Language:
    English


    have you tried calling the minimap using a plugin command?

    Code:
    PLUGIN COMMANDS
    upp_minimap - set values to show / hide to hide or show the minimap.
    || Example:
    ||  upp_minimap show
     
    #16
  17. Astro86

    Astro86 Villager Member

    Messages:
    18
    Likes Received:
    0
    First Language:
    Italian
    when I press down, I select the minimap


    dde.PNG


    how to fix?
     
    #17
  18. CielRpg

    CielRpg Veteran Veteran

    Messages:
    34
    Likes Received:
    1
    First Language:
    English
    I did the event but it isn't showing up.

    Screenshot (139).png
     
    #18
  19. PaybacK

    PaybacK Fire Crazed Veteran

    Messages:
    64
    Likes Received:
    12
    Location:
    United States
    First Language:
    English
    Excellent plugin bro! Really customizable. I do have a weird problem though. When I move my character up, the mimimap is selected, as if it were a selection in a window. Any way to clear that?
     
    #19
  20. shinichi999

    shinichi999 Veteran Veteran

    Messages:
    134
    Likes Received:
    13
    First Language:
    Spanish
    How can I turn an event into a blinking beacon?

    I used the command "upp_m_setBeacon 2 true 0.2 255 4 60", but I got an "Unexpected number" error.

    Where should I write the event ID?

    EDIT: It's Fixed... I needed to write "EV" before the number of the event and not just the number.
     
    Last edited: Mar 10, 2017
    #20

Share This Page