Topic: [Tutorial] Combining a Map to an Image (Very Useful!)
Combining a map with an Image
Time Required: 1-5 minutes
Complexity: Low
Command Prompt: Yes
System Requirements : Vista/XP(I am sure that there are similar commands and ways for Linux and Mac)
Usefulness: 9/10
Result: a map with an image (see image below)
Tutorial
Today, I will be showing you all a cool tip for Windows Vista and XP, etc. You will learn how to give your maps an image. In other words, when you double click the map, it will open in image viewer, instead of the usual “What do you want to open this file with?” The trick is actually very simple, and even a nooby computer user should be able to do this. It does involve command prompt though. I know what you are probably thinking... “Awww NO! Command Prompt!”, but don’t worry, it isn’t that hard.
Notice that the extension of the file in the image above (you can see the extension at the top right in the bar) is a .map file, yet you can open it with the image viewer.
For my sample purposes, the image that I am using is called “ctf1_winter.png”, and the map I am using is called “ctf1_winter.map”. They don’t have to have the same name, but It makes it easier to do the whole process, as you only need to remember 1 name. If you want to do combine a map and an image, then make a back-up of both the image and map just in case you mess up somehow (you really shouldn’t, cuz it’s really hard to mess up something this simple). In the image below, you can see my .map and my .jpg file in the middle of the window.
First thing you need to do is make “Known File Type extensions” Visible. In XP, go to Control Panel -> Folder Options. Click on the “View” tab, and uncheck the “Hide Extension for known file types”. In Vista, go to Control Panel Home -> Appearance & Personalization -> Folder options. Click on the “View” tab, and uncheck the “Hide Extension for known file types”.You are done the first part!
Now move the files you want to combine in a new folder, in our case C:\Users\Magix\Desktop. I used the desktop because it is a pretty short and “easy to type” address, as opposed to C:\Users\Magix\Desktop\Gaming\2D\Teeworlds\data\maps. When you have placed both the image and map in one directory, open Command Prompt by...pressing Start -> Run..., type "cmd" and press Enter. With Vista Home Premuim etc. you can type in cmd in the start bar search and press enter.
When you start Command Prompt, you will see a window like the one below
In Command Prompt, navigate to the folder where your image is by using the cd(change directory) command. If your image is on the desktop, then you would type in cd C:\Users\user_name\Dekstop. Note that "user_name" in the command above is a place holder for your account name. See the image example below as an example if your name was Magix (which it shouldn’t be, because that is me). If all was successful, then no error will show up. If it says “Directory Not Found”, then you did something wrong.
Now use a command to copy both files together. Type copy /b ctf1_winter.png + ctf1_winter.map here ctf1_winter.png is the original picture, ctf1_winter.map is the “.map” file take place, and ctf1_winter.png is the file which contains both. See below for an example of what your command prompt window should look like right now.
Now, this is the part where it gets a little confusing. Type in exit and hit enter to leave command prompt, and go back to your desktop. If all went well...nothing should have changed. If all didn’t go well...then nothing should change. Look at the image below to see what I mean...
The desktop looks exactly like it did before! Don't worry, that is normal. If you open ctf1_winter.png you will see the ctf1_winter.png image. However, rename the file and change the file type to a .map (Rename the end part of it from .png to .map). It will ask you two things. One “Changing the extension may make the file unusable. Do you wish to continue?”. Click yes. Next, it will ask “A ctf1_winter.png file already exists, Do you wish to rename ctf1_winter.png to ctf1_winter(2).png?” Click yes again. See below for an example of the "Do you wish to rename?" window.
Now you are done. Your .map file will have a thumbnail of your png. Delete your original .map file (the one without a thumbnail). Next, double click your .map file. It will tell you it doesn’t know how to open the file, and it will ask you to choose between “Finding a program on the internet” or “Choosing from a list of installed programs”. Click the latter option and press “OK”. Choose “Microsoft Windows Gallery from the list”. Now, whenever you click a .map file, it will open with Windows Gallery, and you are done!
This is an especially useful trick when you have a ton of maps and have trouble remembering which map is which. This map file works perfectly with Teeworlds, because the game doesn’t know the difference. You can even upload the .map file and share it with the world, and everyone else will see the image you added to the map file as well!
I hope you liked my turorial, and I would really appreciate it if a Moderator made this a sticky. I look forward to downloading maps with an image on them!
------------------------------------------------
Tee-City <--------- The one Teeworlds site to rule them all!