- Oct 26, 2007
- 491
- 168
Remember those map overviews Valve released that showed where in the map people died the most? Wish you too had the ability to make those things? Do you want to make cool death maps for strategic analysis like I do? Well now you can! And here's the trick!
First, you must file a requisition order to your local goods and products distribution officiztat
Or in other words, ask one of the server admins for a log of your map being played.
While you're waiting for your file, I recommend downloading Notepad++ for the purposes of this tutorial.
http://notepad-plus.sourceforge.net/uk/site.htm
Now, if you have your log, use Notepad ++ to open it and it should resemble something like this.
Now what we are looking for is the messages created when one guy kills another. As you can see in the pic, they contain vital information such as the attacker's and victim's respective coordinates.
Now somehow get "victim" without quotes into your clipboard. Go ahead. Select all the text with ctrl+A. Now go TextFX > TextFX Viz > Hide Lines Without (Clipboard) Text. Now select all agaim and return to that same submenu again and click Copy Visible Selection.
Create two new files and paste into each of them. The first file is going to be just for attackers and the other just for victims.
in the attacker file, make sure the cursor is at the start. Press ctrl+r. In the first box put in
and in the second box put
Make sure that Regular Expr is checked and hit Find. Once the proper selection is highlighted hit Replace Rest.
Now all you attacker coordinates should start looking like entities. Go to the top of the file and delete the stuff before "entity". Press ctrl+r again. In the first box put in
and put in the second box
notice the extra line break. Use the Find and Replace Rest Functions again. Yay, now it should resemble a list of entities in the end! The attacker's coordinates have been made into a bunch of info_targets.
Now go into the tab for victims. Once again using the Find/Replace dialog, put in the first box
and in the second box
Do that replacement. Now if you find some lines don't get converted, bring your cursor back to the start and do the find/replace rest function once again. And also delete the junk before the first entity.
Now for another replacement, in the first box put
and in the second box put
Find and replace until your doc looks like this
Now open your map in Hammer, save a copy named mymapkillersanddeath.vmf with all the extra junk besides basic geometry deleted. Now open that vmf in notepad++.
In the visgroups section, put in two new visgroups
Scroll down until you get to camera, put a little space above it, and paste in everything from your attackers and victims docs.
Save it and load the map in hammer.
Behold! Now your map is filled with little targets representing killers and little giblits representing killees!
And since these items are in their own visgroups, you could turn the 2D overhead virews into photoshop layers, do a little hues adjustment, overlay that onto your map overview, and boom, you have a death map!
First, you must file a requisition order to your local goods and products distribution officiztat
Or in other words, ask one of the server admins for a log of your map being played.

While you're waiting for your file, I recommend downloading Notepad++ for the purposes of this tutorial.
http://notepad-plus.sourceforge.net/uk/site.htm
Now, if you have your log, use Notepad ++ to open it and it should resemble something like this.

Now what we are looking for is the messages created when one guy kills another. As you can see in the pic, they contain vital information such as the attacker's and victim's respective coordinates.

Now somehow get "victim" without quotes into your clipboard. Go ahead. Select all the text with ctrl+A. Now go TextFX > TextFX Viz > Hide Lines Without (Clipboard) Text. Now select all agaim and return to that same submenu again and click Copy Visible Selection.

Create two new files and paste into each of them. The first file is going to be just for attackers and the other just for victims.

in the attacker file, make sure the cursor is at the start. Press ctrl+r. In the first box put in
Code:
L.*attacker_position
and in the second box put
Code:
entity
{
"id" "3"
"classname" "info_target"
"angles" "0 0 0"
"spawnflags" "0"
"targetname" "attackers"
"origin"

Now all you attacker coordinates should start looking like entities. Go to the top of the file and delete the stuff before "entity". Press ctrl+r again. In the first box put in
Code:
\).*$
Code:
editor
{
"color" "220 30 220"
"visgroupid" "51"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}

Now go into the tab for victims. Once again using the Find/Replace dialog, put in the first box
Code:
L.*victim_position
Code:
entity
{
"id" "26"
"classname" "gibshooter"
"angles" "0 0 0"
"delay" "0"
"gibangles" "0 0 0"
"gibanglevelocity" "0"
"m_flGibLife" "4"
"m_flVariance" "0.15"
"m_flVelocity" "200"
"m_iGibs" "3"
"spawnflags" "0"
"targetname" "victims"
"origin"
Now for another replacement, in the first box put
Code:
\)
Code:
editor
{
"color" "220 30 220"
"visgroupid" "52"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}

Now open your map in Hammer, save a copy named mymapkillersanddeath.vmf with all the extra junk besides basic geometry deleted. Now open that vmf in notepad++.
In the visgroups section, put in two new visgroups
Code:
visgroup
{
"name" "attackers"
"visgroupid" "51"
"color" "0 255 0"
}
visgroup
{
"name" "victims"
"visgroupid" "52"
"color" "255 0 0"
}

Scroll down until you get to camera, put a little space above it, and paste in everything from your attackers and victims docs.

Save it and load the map in hammer.

Behold! Now your map is filled with little targets representing killers and little giblits representing killees!

And since these items are in their own visgroups, you could turn the 2D overhead virews into photoshop layers, do a little hues adjustment, overlay that onto your map overview, and boom, you have a death map!
