[CSS] aim_attackbunkerv2 [CSS] aim_attackbunkerv3 [CSS] aim_bioko_gallery [CSS] ba_jail_BIOKO_Prison [CSS] dr_xtra_world [CSS] glass_structure [CSSAW] aw_cs_invaded_city [CSSAW] aw_parking_off [CSSAW] aw_camp_8804w [CSSAW] aw_lost_at_desert [CSSAW] aw_office_invasion [CSSAW] aw_de_silentfield [CSSZM] zm_BIOKO_hellzone [CSSZM] zm_lost-base-fix [CSSZM] zm_desert_panic [CSSZM] ze_contamined-island [TF2] cp_fortassault
Some people think that editing a VMF (the format of a map by which Hammer can works) is only reserved for elites mappers and that the code used would be like the Assembly. I can assure you that in fact, it is mostly easy ! And good new, here I will teach you how to understand and edit a VMF !
When you start making a map, Hammer creates by default 2 files, a VMF and a VMX. The VMF is ready to be used by Hammer and the VMX is used for recovery, like if your VMF has been completely broken or lost (just replace the x of .VMX by a f and you will be able to open it again with Hammer). Few other files are also created during the compilation of your map (the BSP, who is used by the game, the LOG of compilation and it can also generate a LIN if you got leaks).
What is interesting us here is of course the VMF file. Note that it does often contains a very lot of lines in it's code. For instance, my TF2 map named cp_fortassault, who is not so big in-game (a small fort surrounded by desert) has 48528 lines ! So you better don't plan about exploring each one of them or you will certainly try to kill yourself.
The first question you may have now is how the hell are we going to open a VMF ? Well it's easy ! Double click on a VMF and open it with notepad or any other text editor ! Note that I highly recommend you to install Notepad++ which is - for me - the best text editor !
Even empty, so without any blocks or entities, a map does already contains some code ! This code is the base one and the will not works without. So give it a look, it is better that you see how does look like the code of an empty map so you can understand more easely the rest.
When you create an entity, it does not fall in any groups which I show you right before ! Here are few explanations about :
It may have seems a bit short, but if you have correctly read the beginning, you should be able to solve the most common problems you may encounter.
Okay so let's imagine that you have just opened with hammer sdk_cp_dustbowl and you want to see how Valve has configured the light_environment (because you are making a TF2 map who has the same sky as cp_dustbowl, of course !). So here is a screenshot of the situation you will be confronted :
So now you have two choices, you can either try to find the light_environment by exploring the map with Hammer OR looking for it in the VMF ! Of course you will choose the second choice because you are now a l33t modder hax0r dud3 and you are now running to the VMF of sdk_cp_dustbowl. After opening the VMF with your favourite text editor, you have a big problem...
Well in fact, when I was talking about a big problem, I was joking because the computer will do the crap work for you, and thanks god the computer is still our slave. Just press Ctrl and F and your text editor will show you a window where you can enter the word you are searching for ! We are looking here for an entity who defines the light_environment, so let's type light_environment in the field and let's see what is going to happen.
Here it is ! You can now edit the VMF of your map and copy/past this piece of code from sdk_cp_dustbowl to have the same lighting ! You can also do the same research for the env_sun.
One day you opened a map you were working on for 1 month when suddenly, you received this message :
Damned ! You can't work any more on your map because of this crap ! But no problems because for the first time, reading the error message will help us ! It is saying that there is something wrong at line 15740, so why shouldn't we check it ?
This kind of problem is often due when Hammer crashs while attempting to create a new entity. You can delete the bloody entity or you can either try to finish it (see how the other entities of the same class are made to take example of)
As you can see, editing the VMF with a text editor is not so hard ! You can always learn by yourself the rest and if you have a problem, try to google it. Have nice mapping !
You can also find this tutorial in those places :