Jump to content
 Share

Vanya

How to make minimaps / radars in Counter-Strike: Source

Recommended Posts

Posted  Edited by Vanya

Hello everyone. :nepsmug:

 

In this quick tutorial I'll show you how to make a working mini-map / radar for your maps in Counter-Strike: Source. (This tutorial uses a Zombie Escape [ze_] map as an example, but you can use this to make minimaps for any map that you'd like.)

 

Note that minimaps for Counter-Strike: Global Offensive are made in almost the same way, but the process changes at one point so consider this as a CS:S only tutorial.

Also note that if your map has a lot of overlapping areas (for example Frostdrake, Santa or Mako v5) then the end result may not look as good.

 

Things you need:

  • Paint.NET or any image editing software that isn't MS Paint
  • Notepad++
  • VTFEdit
  • The damn game

Steps:

  • Step #1:

First, go to your game's video options and set the display options to the following:

  • 4:3 Aspect Ratio - 1280 x 1024 Resolution - Windowed Display Mode

cTzARQv.jpg

  • Step #2:

Load your map, once you're in type the following commands in the console:

  • sv_cheats 1, cl_leveloverviewmarker 1024, noclip

5cw0o1w.jpg

Note: You can see from this screen that I do NOT have a minimap for this map. However, if I do the rest of this tutorial correctly then I will have one.

  • Step #3:

Now that you see that red line across your screen, you need to type "cl_leveloverview X" into the console, where X can be any number you want.

  • The goal here is to fit your map within the red square (since a minimap needs to be 1024 x 1024), you also need noclip to fly up or down so that more of your map is visible at once.

Tips:

  • Before typing cl_leveloverview X, go into noclip mode and fly very high above your level, then mess around with the command, if you want to go back to your normal view, type "cl_leveloverview 0"
  • You can also type decimal values, such as "cl_leveloverview 29.4" for a more accurate minimap, just remember the whole map has to fit inside the red square!
  • If parts of your level aren't being rendered, you may need to fly higher / lower
  • If your map has HDR lighting, type "mat_hdr_level 0" in console to remove it until you take the screenshot, otherwise it can lead to weird results where, if the void of your map is green, some of that will get in the way of the image.

OEjibVE.jpg

(Note: The void can sometimes be green [like in the example] and sometimes it can be fully black)

  • Step #4:

With cl_leveloverview still on, once you're happy with what you see on screen, you should see that a spam of the same command has generated due to you moving around with cl_leveloverview on, copy the last command that was generated and paste it where you won't forget about it, we will need this info for later.

RSvvaYu.jpg

  • Step #5:

Once you have the command copied somewhere, type "r_drawvgui 0" in the console, and everything should be gone from the screen except the overview of the map, at this point, you're free to take a picture of this. It is VERY important that you don't move.

  • Tips: Hitting Alt + PrintScreen gives a more high-res screenshot of the map than taking a screenshot through Steam

SX3kYhy.jpg

  • Step #6:

Once you hit Alt + PrintScreen, open your image editing software (for this example I will use Paint.NET) and make a new canvas, when prompted if you want to resize the window or not, hit yes.

pU9WPFK.png

Tips:

  • Because you hit Alt + PrintScreen, if your game was being blocked by your taskbar, it is very important that you move the taskbar to the side AND THEN hit the key combination, otherwise your taskbar will get on the way of the image, as shown here.
  • This step is done to confirm that you have an image of your minimap, and also to keep a back-up of it just in case.

 

  • Step #7:

Once you have imported your image file to Paint.NET without anything in the way other than the game, now we have to make it a 1024 x 1024 image.

66eyEQC.png

  • Select all of your image with Windows' borders and everything, hit Ctrl + C and then hit Ctrl + N to make a new canvas, set the size to 1024 x 1024. Paste your image in there and when prompted to resize the canvas, press No.
  • Of course, because your image is larger than the canvas, some of your minimap will be off.
  • To fix this, zoom in to the top left corner, and move your image ever so slightly in a way that all of the border is gone

QLNqQ9n.png

 

3ondAuf.png

As you can see, all that's left out of the canvas is the silhouette of Windows' window, this is what we want.

Tips:

  • I recommend zooming in as much as possible to move the image, since you really only want to move the image until the borders of the Windows' window are completely gone

If done correctly, our image will look like this:

W3zfn5a.png

 

  • Step #8:

For some reason, CS:S sometimes turns the void into green, as seen in this example.

  • If the background color of your minimap was black then feel free to skip this step, if the background color was green, as seen in this example, we'll color it to black.
  • All we need for this is the paint bucket tool, color the green void to black until you are happy with the results:

vrWFgjo.png

Tips: Some mappers prefer removing the background color completely and leaving it transparent (minimaps like Totemo Roka, Santassination and Westersand do this), personally I prefer coloring the background to black since that helps with visibility in the minimap, but that decision is up to you.

  • Step #9:

Once you are done with editing your minimap file, save it with any name as a .png file.

After this, open VTFEdit and import your minimap's png file.

iLMxiw0.png

Once we have imported it into VTFEdit, make sure to tick these two options to the left of the image to prevent your minimap from glitching (making it repeat itself over and over even if you are outside of your level).

KkK1EWT.png

 

Now we need to save this as a texture file, for this, we're gonna hit click "Save as", and we're gonna save this VTF into the following directory:

 

> C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Source\cstrike\materials\overviews

 

Note that the directory can be different depending on where you installed the game.

The name of the vtf has to be the exact same as your map, for this example I'm working with a map named ze_LOTR_Isengard_v1_5 so I will name my vtf "ze_LOTR_Isengard_v1_5"

If your map name is "ze_i_love_MaKo_AnD_WeSTeRsAnd" then your vtf HAS to be named this, NAME IS CASE SENSITIVE, SO MAKE SURE TO INCLUDE UPPERCASE LETTERS TOO

  • Step #10:

Once you have saved the .vtf file, now we need to make a .vmt file, this file tells the texture how to appear in-game.

While in VTFEdit, press Ctrl + N and this should come up to your screen:

5XF4VIl.png

When you are here, you will need to have some text written in here so that your texture can appear in the minimap, the text that you need will be hidden inside this spoiler:

 

"UnlitGeneric"


{
"$translucent" "1"
"$basetexture" "overviews/yourmapname"
"$no_fullbright" "1"
"$ignorez" "1"
}

  • In my case, because my map name is ze_LOTR_Isengard_v1_5, the text that I will have to write in this file has to look like this:
 

"UnlitGeneric"


{
"$translucent" "1"
"$basetexture" "overviews/ze_LOTR_Isengard_v1_5"
"$no_fullbright" "1"
"$ignorez" "1"
}

  • Tip: EVERYTHING here is case sensitive, so if the name of your map has caps (which it shouldn't) then you need to include those too
  • Once this is done, save this .vmt with the exact same name of the map, just like we did for the vtf file.

IMPORTANT:
Once you have saved the .vmt file, you need to make another copy of it, but this copy needs to end with the word "_radar".

FeKe0jl.png

So you need two .vmt files (one with mapname and one with mapname and that ends with "_radar") and one .vtf file, if you don't do this then your minimap won't look clear and it will have some rubbish green tint to it.

  • Step #11:

Once we're done with this, we need to open Notepad++ to generate a text file that we need.

Remember the series of numbers that came up when we did "cl_leveloverview"? This is what we need them for.

You will need this format when making this .txt file:

 

"yourmapname"


{
"material" "overviews/yourmapname"

"pos_x" "Number In X Pos"
"pos_y" "Number In Y Pos"
"scale" "Number you typed in cl_leveloverview"
}

 

  • In my case, based on the results I got with cl_leveloverview, this is how my txt file should look:

 

 

"ze_LOTR_Isengard_v1_5"


{
"material" "overviews/ze_LOTR_Isengard_v1_5"

"pos_x" "-15882"
"pos_y" "14977"
"scale" "32.0"
}

 

  • Once you're done with this, save this txt file into this directory with THE EXACT SAME NAME as your map, caps and all:

 

> C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Source\cstrike\resource\overviews

 

  • You are done!

 

If you did everything correctly (and I'm good at explaining), when you load your map in the game again you should be able to see a fully working minimap:

QMWbYWM.jpg

 

grLGiyl.jpg

 

DRzzTna.jpg

 

Don't forget to pack all the folders and stuff when you are packing the files for your map, otherwise the minimap won't work!

 

Disclaimers / Things to keep in mind

  • If you move around with cl_leveloverview on, you ALWAYS need to keep the last generated command, if you copy the wrong command, or you copy the command, move the image in CS:S and then forget to copy the last generated command again, then the minimap will not be accurate
  • Stuff like water will appear as fully black in the minimap
  • Doors, elevators, props and things that move will turn invisible when you fly out of the world in noclip
  • If you are updating your map (but there are no changes to geometry), you NEED to change the names AND the contents of ALL your files (vmt's, vtf's and .txt and the text you wrote in them) to include the updated mapname, otherwise your minimap won't work
  • Resolutions HAVE to be what I typed, otherwise this may not work.
  • A good way to test if you packed your minimap files properly is to remove the "materials/overviews" and "resource/overviews" folders from your root folder and then test the map.

This may seem like too much work, but in practice and once you get the hang of it, making minimaps won't take you more than two minutes to make.

They can provide great visual queue to help visualize where the zombies actually are if you can't make it up for yourself in-game (or, say, if everyone's stacking, a minimap can help you know where zombies actually are or from where are they coming from).

If you'd like to report something or have any questions feel free to let me know!

 

Thanks to Moltard and j0ueurnul for pointing out a few things that were added in this tutorial.

 

:nepsmug:

Edited by Vanya

Share this post


Link to post
Share on other sites




×
×
  • Create New...