Mini Map Generator

by Zaltron
Generates minimaps [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Zaltron.MiniMapGenerator##version=5

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Zaltron.MiniMapGenerator##version=5

1033 downloads
Version 3.00
Date added: May 30 2008
Last updated: Aug 28 2011
8 fans
To load a map you must first generate 'MiniMaps.dmi' which you will
be prompted to do when you run a minimap function. You
only have to generate the graphics for your minimaps once. If you
update your map files you will want to delete 'MiniMaps.dmi' and
generate a new 'MiniMaps.dmi'.

//If you're going to use loc = locate(#, #, #) anywhere you need to put
//updatePointerLocation() after it if the atom/movable being relocated
//has a pointer.

//map_controller: The name of the Map control/element in the interface
// want to load the map to.
//name: The name of the icon_state/map you wish to load.
// It will have a value of 1-#? as text
// 1 being the map for the first zlevel 2 being the 2nd
// ect...
mob/proc/showMap(map_controller, name = "")

//name: The map(1-#?) you wish to unload.
mob/proc/hideMap(name = "")

mapToggle() allows you to turn on and off specific pointers on a minimap.

Examples:[mapToggle("[zlevel/minimap].[category]", TRUE/FALSE/NULL)]
mapToggle("1.All", TRUE)//Makes everything on minimap1 visible.
mapToggle("1.Red", TRUE)//Makes everything that is in the Red category of minimap 1 visible.
mapToggle("All", TRUE)//Makes everything visible.
mapToggle("All.Red", TRUE)//Makes everything that is in the Red category of all minimaps visible.
mapToggle("All")//Makes everything on all minimap that is invisible visible and everything that's visible invisible.

//x: x location pressed
//y: y location pressed
//z: z location pressed
//a: atom at location pressed
minimap_pointer/Pressed(x, y, z, atom/a)

//x: x location pressed
//y: y location pressed
//z: z location pressed
minimap/Pressed(x, y, z)

Comments

Albro1: (Jan 2 2014, 8:45 pm)
I'm getting the same issue on line 303 "bad index". I removed all PNG files from my project and it still does it.

Is there a chance this is caused by icons with large dimensions?
Zaltron: (Feb 22 2012, 9:56 pm)
I didn't notice that you replied. Did you ever get the problem resolved? I tried looking at the post you linked but it redirected me to the forums front page.
Unwanted4Murder: (Jan 23 2012, 10:30 pm)
I don't see what reinstalling BYOND would help, but I can try if you really think that's the issue. See this post for more info.
Zaltron: (Jan 23 2012, 9:40 am)
Have you tried re-installing BYOND? Also, what version are you using?
Unwanted4Murder: (Jan 22 2012, 9:42 am)
Whenever I try to use this, I get a bad index error on line 303 in MiniMap.dm. I tried it in three different projects and I get the same result every time. Any suggestions?

Edit: Seems like the problem was that I changed the directory it searched. I suppose the problem is that it needs the PNG files from a different folder, but I get "bad text or out of bounds" on line 215 if I include the PNG files.

Edit 2: I fixed the problem by adding if(length(i)>length(fileType)+1) to line 215, but I'm still getting the bad index error.