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
@Maximvdw
Actually it *seems* that the problem was caused by an image that was 404 not found. Is there a fail-safe in case it fails to find the image?
@FrauKoujiro
Yeah, managed to do that aswell. (Vid: http://www.youtube.com/watch?v=w0uYIpq3GEI) but there seems to be a Lagg spike when it renders (again) if the frame itself is not rendered completly.
Person A: puts an image in item frame and renders a picture Person B: takes the same map and renders a picture at the same time Server: OUCH Im going into SEVERE mode
Don't know if it is a bug in Bukkit tho.
@MastaC1058
Its a bug in the plugin ,Ill try to help Evangon out with that :) Don't worry it will be fixed EDIT: Actually I already did? Are you using the LosingPixel development release? Try that and see if anything changes
@VergilPrime
Currently it does not check for that when it sees its a bitly
@FrauKoujiro
Sure :) Love to. Just wanna say you helped me alot with my 'Calendar' plugin. Hope I can help you now ;)
Supports Bitly how? How do you do it without .jpg at the end?
We used this plugin plus item frames to create an awesome art gallery! The only problem is that with the 20 maps loaded on the wall, my server TPS goes from 20 to 10-12 when anyone has those maps loaded. Is that an issue with this plugin or bukkit itself?
@lol768
I'm currently working on it.
Can you somehow hide the cursors on maps? Especially those placed in item frames?
@Sphax84
I really need to check this thing more. Anyways, forcing the images onto the maps is not possible... yet. Either I just don't know about a method or it it doesn't exist. Looking high and low for it, that is why I use a file to keep all the URLs in.
However, I could not reproduce the your bug. Is there anything else that you might have done for it to cause that?
It seems there is a bug. When I give myself a map with an ID (for example "/give map:2" and if the map:1 has not been crafted legitimately, when I render a picture on it (ok) and then disconnect and reconnect, I have in my inventory a map with another ID without picture on it. If I get back the map with the right ID (with the same command), I get the map without picture on it...
Would it be possible to "force" the picture to be permanent on the corresponding map ID? and why my map ID is replaced by another one when I reconnect?
Thanks a lot for this awesome plugin! I would love to see a set of blocks which would act as a public printer (with permission and an econ hook to make it a payable service). Will be wonderful with Frames on MC1.4! :)
@FrauKoujiro
Ahh that's awesome! I need to compile this myself sometime xD
Good news everyone! When an Item Frame contains a map, it synchronizes the map inside the frame with the ID!
@FrauKoujiro
Thanks! :D
@NyanCraftDe
I'm assuming you meant that are you able to have two different images on two different maps? If so, yes. You can have two different maps with two different images. Make sure they aren't the same ID though (ID is at the top right-hand corner. It says something like "map_#")
@JM120897
I could look into it :3
You could make a printing machine, for example an iron block next to a glass pane, that you have to right click with paper and it would say: Do you want to print something? Type in the chat the URL of the image you want to print. And then the paper would be printed! that would be amazing!
Sorry, I normally dont speak English. I mean: You have a map in your hand, then render an IMG onto it. Then you take another map and render another IMG on it. So that you have two maps with different images on them. Did you mean this?
@FrauKoujiro
Latest update be extremely awesome. :D
@NyanCraftDe
If I'm reading this right, you want the plugin to render more then one map at once? No, I don't think it's possible, in that case, since looking at how a map works, it only starts rendering when the map is called/someone is trying to read the map.
Is this right, you cant make different rendered maps at once? like map if >1?