ImgMap
ImgMap: Render any image on an in-game map!
By Evangon, Maximvdw, and JohnnyBlu
Originally coming from a picture of a troll face by md_5, this plugin allows a user with a map in hand (obviously with the proper permissions) to essentially put an image onto the map. The image could be anything: Instructions, rules, messages, warnings, a very nice picture of a cat, whatever you want! All images are resized to the proper dimension of 128x128. The image is then sent over to a rendering process (Devs: Check the source on how it's done if you want), which then the map renders the image for that map. Anyone with a map with the same ID (Typically, it says when you hover over it, e.g "Map #0") to see the same image too! The only downside to all of this is that due to the nature of Minecraft maps, they do not support full color. This is due to a limitation on the clients themselves.
Installation
Just drop it into the /plugins/ folder! No special configuration needed!
How to use
- Give yourself a map with a specific ID. This ID can be anything, but remember, once you draw an image on it, it will pertain only to that specific ID!
- Get the URL of the desired image! This is where some people mess up. In order for the plugin to successfully render it, it has to be a direct link to the image. Simply right click on the image and hit "Copy Image Location".
- Hold the map with the super specific ID and type in "/drawimage" and paste it! For most users, to paste, you do "CTRL+V".
- Wait a bit; rendering can take a bit. You'll notice several segments appear on the map; this it indicating that it's loading. If nothing happens, you're either met with a message that says something along the lines of "Server Internal Error" or you're staring a blank map. If you get kicked with the message with "Server Internal Error", simply type, in console, "fixmap <your super specific id>". This basically fixes the map with the old over world rendering. Try again; if it doesn't work, report it in the comments! However, if you are getting nothing, be sure the image is accessible directly from your browser (clear your cache before you do so!) Sometimes, what happens is that the owner of the website has set privileges denying anyone from accessing the image directly. A bit bothersome, but you can probably save the image and upload it somewhere else. However, when doing so, please follow the copyright usage on said images!
- Viola! Your map now has that pretty picture of a kitty or something!
Commands
- /drawimage <image url> Draws the specified image to the map you're holding. If you want to "save" the picture to the map, you add "-s" to the end of the command. The reason why "save" is written in quotations is because it doesn't actually save the map's picture; it simply saves the URL and it's corresponding ID to a flatfile and is loaded on start up.
- /drawanimatedimage <gif url> Attempts to draw an animated gif image. A little buggy here and there, but it works for the most part! Please be warned that this takes up a lot of bandwith (You're sending anywhere between 0 to 16kilobytes nearly every second!) and that it also is resource intensive!
- /drawytvideo <yt-ID> Experimental. Downloads a video and converts it to a GIF format. See /drawanimatedimage for more information as the same process is used.
- /emulategb <rom name> Highly experimental. Emulates a GameBoy (only GameBoy, not GameBoy Advanced or GameBoy Color) game on a map. Fully integrated, no client mods needed! Click on the chat messages given in chat to control the emulator.
- /emuaction <save|load|a|b|left|right|up|down|holdinput> Simulates input for emulated GameBoy games on a map. Used by the gamepad, you can also use it as a command if you wish. Note that "save" and "load" do not work as of current. Any input button just simulates input. "holdinput" makes the emulator act as if the person is holding down a directional button and directional only.
- /clearmap With a map in hand, this command wipes the image off of it and puts the old Minecraft map rendering back.
- /fixmap <id> A debug command, Caused an issue with a map that psudo-bans them? No worries! Simply get the ID of the problematic map, and type this command in, replacing <id> with the map's id. It's like /clearmap, only this time, you can target maps!
- /getmap <id> More of a debug command, but can be helpful for some, it allows you to get a map by almost any ID. The reason why this is "almost" is because if you try to get a map that is above the number that exists, it merely just goes over and gets the next ID, rather than the one you want. This is something that's within Minecraft that I cannot fix.
Permissions
- imgmap.*: Grants almost all rights to ImgMap. This does not include debug commands.
- imgmap.debug: Grants debugging rights to ImgMap. Does not include drawing or restoring capabilities.
- imgmap.drawimage: Allows you to draw an image to a map.
- imgmap.drawanimatedimage: Allows you to draw an animated image to a map.
- imgmap.clearmap: Allows you to clear a map and restores the overworld rendering.
- imgmap.debug.fixmap: Debug command. Allows you to remove all renderers on a given map ID.
- imgmap.debug.getmap: Debug command. Allows you to get a map by any ID.
Source for Developers/Contributors
Found a bug that you want to squash yourself? Go ahead and fork me! (Please don't actually stab me with a fork!) https://github.com/CirnoTheGenius/ImgMap-LosingPixels
Examples
@codydbgt
That's... new. Never heard of that. I'll look into it.
@CaptainJohnnyBlu
I like the slideshow idea, just one obstacle is that the bandwith usage...
This is awesome! I have an epic feature request, here goes:
An admin puts compatible images in his plugins/ImgMap/ folder or on some other http server. The plugin then fetches those images on startup or upon command and displays them on a map each OR even better, displays them in turn as a slideshow on one specified map!
I figured the slideshow idea would be best and the easiest to code for since the veritcal bars transition is taken care of already. All the plugin would have to do is whatever it does for /map image1.png and then 5 seconds later, do /map image2.png. Would be ideal if images could be stored all together in the plugins folder or fetched from a PHP script..
The best of luck, Alex. :)
@Byamarro
They restore cuz they are saved and Rendered at startup
@codydbgt
So you mean people that do not use the /map www.xxx.xxx command?
its not upadting the map fully for new players :\ .... not like new new but people the make a map for the first time or its givent o them all they get are lines .... this is of corse for the map that i used /map on
Fixed the huge bandwith/memory hogger leak, thanks to @Maximvdw!
@kmccmk9
I have looked into this and found that the render() statement causes the server to both use a huge amount of bandwith and also a huge amount of memory. I'm attempting to find a solution, but no anvil. I will make the warning a public one.
Hello, I'm having a problem with this plugin. It lags and eventually causes the server to crash due to the server running of memory. I tried to get the official error the console gave me but it really toasted the server. If I am able to retrieve it, I will post for you. I know you would think it would be on my end with my server but all my other plugins work and as a developer myself sometimes there can be memory leaks. Thank you.
@Byamarro
I'll work on a configuration file for ImgMap to toggle that.
Edit: That's funny. The plugin never has any line, besides in the restoremap command, to restore the old renderer. I'll work on it.
@FrauKoujiro
I mean that ImgMaps have one main problem. Server restart deletinv every maps.
@Byamarro
I can't really understand your English. Are you saying that the maps don't reset? My goal is to get the maps to reset, not keep the map the same.
Well in this plugin maps not reset after restart: http://dev.bukkit.org/server-mods/courier/ Maybe You should ask authors about your problem?
Fixed @kahlilnc's issue with multiple maps. Version 2 will come out when I can figure out how the heck to use WorldMap :/
Wow! Great job done on this! Keep it up, can't wait for version 2
When 2.0 will out? I really need it to make spell scrolls :(
Hm seems like you can only keep one map image at a time :( Is it possible to have different images for different map ids? Such as having map id 0 with a denied image and map id 1 with a accepted image because every time I try to have 2 images on 2 seperate map ids it doesnt work and they both change to 1 image which was the last one. Idk if that made sense to you lol
Your Awesome Evangon Sorry i had to be so blunt but legit i installed got on was stoked to try and then shit all work hopefully its all good now ! THANKS AGAIN!
I had uploaded 1.5 that fixes both of @jigga_jones's issues. It's getting approval sooner or later.
@jigga_jones
Thanks for notifying. I'm fixing and pushing out a new version.
@YoshiGenius
Maybe a bug or something killed the download counter :/
It says there havent been any downloads. Are you sure you actually downloaded it? :P