Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/archive/global.php(40) : eval()'d code on line 2
Deathmap Tutorial [Archive] - TF2Maps.net Forums

PDA

View Full Version : Deathmap Tutorial


TheBladeRoden
04-23-2008, 02:48 AM
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.

http://students.uww.edu/rodenja10/deathmaptut1.jpg

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.

http://students.uww.edu/rodenja10/deathmaptut2.jpg

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.

http://students.uww.edu/rodenja10/deathmaptut3.jpg

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.

http://students.uww.edu/rodenja10/deathmaptut4.jpg

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.

http://students.uww.edu/rodenja10/deathmaptut5.jpg

in the attacker file, make sure the cursor is at the start. Press ctrl+r. In the first box put in

L.*attacker_position

and in the second box put

entity
{
"id" "3"
"classname" "info_target"
"angles" "0 0 0"
"spawnflags" "0"
"targetname" "attackers"
"origin"Make sure that Regular Expr is checked and hit Find. Once the proper selection is highlighted hit Replace Rest.

http://students.uww.edu/rodenja10/deathmaptut6.jpg

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



editor
{
"color" "220 30 220"
"visgroupid" "51"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}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.

http://students.uww.edu/rodenja10/deathmaptut7.jpg

Now go into the tab for victims. Once again using the Find/Replace dialog, put in the first box

L.*victim_positionand in the second box

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"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



editor
{
"color" "220 30 220"
"visgroupid" "52"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}Find and replace until your doc looks like this

http://students.uww.edu/rodenja10/deathmaptut8.jpg

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

visgroup
{
"name" "attackers"
"visgroupid" "51"
"color" "0 255 0"
}
visgroup
{
"name" "victims"
"visgroupid" "52"
"color" "255 0 0"
}http://students.uww.edu/rodenja10/deathmaptut9.jpg

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

http://students.uww.edu/rodenja10/deathmaptut10.jpg

Save it and load the map in hammer.

http://students.uww.edu/rodenja10/deathmaptut11.jpg

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

http://students.uww.edu/rodenja10/deathmaptut12.jpg

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!

http://forums.tf2maps.net/downloads/complexdeathmap1_00M.jpg

Spike
04-23-2008, 03:26 AM
I'm not going to use it but l33t tutorial. You got skills man.

ryodoan
04-23-2008, 09:24 AM
Ok, I think I am going to look into writing a program that will automate the text portion, seems simple enough.

DJive
04-23-2008, 12:23 PM
If you do that Paul next step could be working it right into the website. IE upload a log and it will produce a downloadable .vmf =p

Amazing work Roden, i've said this in a different thread before but i was complaining that this would be the single most useful tool for mappers and Valve didn't make it available..

You just did, VERY impressive.

TotalMark
04-23-2008, 01:52 PM
You got some mad skills... :w00t:

TheBladeRoden
04-23-2008, 02:01 PM
Ok, I think I am going to look into writing a program that will automate the text portion, seems simple enough.

Roden also humbly requests that you make check boxes for weapon type filters and buildings built.

MacNetron
04-23-2008, 02:20 PM
That last request looks like a separate program like, for instance, FOoM Logalyzer (http://www.foom.net/content/view/14/29/).
But should not be too difficult, as everything is in the log.

Question: are the logs rotated and yes, how? After every map change? In that case, the server could generate death files after every map change...

ryodoan, give a shout if you really want to build a "death file generator". Would be a shame if we both would program the same stuff separately. Might be better to join forces.

Will take a quick look to see if I can make my local CVS-repository available to the outside world...

dirtyminuth
04-23-2008, 05:35 PM
This could emerge as a superior analysis tool. Notable ways to view data:

* Sort deaths and kills by team.
* Time-lapse analysis.
* Sort by class activity.
* Sort by player activity.
* View CP / CTF events and possibly extract context of said events.

And of course, your standard flow / balance issues can be viewed. Now, if there was an automated way to extract a map overview that can be overlayed with non Hammer output, we'd be golden.

Either Jive or I can handle your log requests. There doesn't appear to be any sensitive data in the logs; the worst I can think of are SteamIDs, but you can 'status' those in game anyways.

DJive
04-23-2008, 05:44 PM
Either Jive or I can handle your log requests. There doesn't appear to be any sensitive data in the logs; the worst I can think of are SteamIDs, but you can 'status' those in game anyways.

Ya after looking into it SteamID's are harmless. the log will mention Rcon but not put up the password which is good =)

ryodoan
04-23-2008, 06:02 PM
Woops, I thought we were in a different thread....

Thermopyle
04-24-2008, 12:21 AM
Psychostats 3.1 is going to be doing this (well actually does it already, but it's in alpha stage.)

I haven't bothered to set up heatmaps on my install of PS 3.1 (http://www.smackcentral.net/pstats/), but here is someone else's (http://www.coldfire.info/psycho/mapheat.php?id=13) on the ctf_turbine_v3.

ColdFire
04-24-2008, 08:22 AM
Oh, am I famous now? :)
I did it for most of the maps played or still in the mapcycle of my tf2 server, so feel free if you need informations to contact me

MacNetron
04-27-2008, 02:37 PM
[...]
ryodoan, give a shout if you really want to build a "death file generator". Would be a shame if we both would program the same stuff separately. Might be better to join forces.

Will take a quick look to see if I can make my local CVS-repository available to the outside world...

My CVS-repository can be shared...

Thermopyle
05-09-2008, 02:40 PM
This is now working in Psychostats 3.1

Here's the heatmap for ctf_mach4 (http://www.smackcentral.net/pstats/mapheat.php?id=7) on my server.

ryodoan
05-09-2008, 05:04 PM
Yeah, I looked over Psychostats and I think that what would be nice to have is something simple that any mapper can use.

Psychostats is really cool, but it takes a bit of know-how to get set up and working correctly, not to mention access to a webserver (personal, or otherwise)

VeryBad
05-26-2008, 05:30 AM
As someone who is just starting to learn to map, I feel the Heat Maps do not provide all the info needed. All it seems to show is the most chosen place to die. Like ctf_2fort, the main 2 doors are very hot, but I wouldn't say it's a choke point. Also there is no feeling of what killed people. So you cannot infer if say a demoman has some ungodly advantage that could be fixed by making it a bit harder to lob grenades or remotes to the death spot. Or if your map is just a sniper heaven. I think a tool showing attackers and victims with maybe a connecting line describing what method of dispatchment used would provide more valuable data. Also something that comes to mind is the whole issue of engineer buildings and how well they work. Say showing how many kills a Sentry gets before being destroyed, if it was destroyed. Possibly showing how much healing the engineer did to it would be nice too, so you can find those spots where the engineer is ridiculously too safe to repair his toy. The last one is just an idea, not sure it can be deduced from logs. Again these are just some thoughts from someone who is just starting to map.

ColdFire
05-26-2008, 06:22 AM
Heatmaps by weapons (including sentries) should be available in psychostats later. I know one of the devs is working on many improvements to heatmaps.
About healing, it doesn't appear in logs so unless someone makes a server plugin which adds this info in the logs, it'll be impossible.

ColdFire
05-26-2008, 06:23 AM
Yeah, I looked over Psychostats and I think that what would be nice to have is something simple that any mapper can use.

Psychostats is really cool, but it takes a bit of know-how to get set up and working correctly, not to mention access to a webserver (personal, or otherwise)

Did you looked at Psychostats 3.1? There's an installer for the web part, it's really easy. All you have to do is have a mysql database, a database user, and put that info in 2 files before going to http://your_psychostats/install

ryodoan
05-26-2008, 12:59 PM
However, I was reading on the install manual that while, yes the main install is relatively easy, if you want the heatmaps you need to install several non-standard perl libraries. However they are outdated perl libraries that are no longer provided (as far as I can tell) in the latest perl download. I searched through the perl package manager and could not find the libraries they were talking about.

ColdFire
05-26-2008, 04:28 PM
In PS wiki it's explained how to get them. If you use CPAN it's really easy to get those libraries.

perl -MCPAN -e 'install GD' for example.

DJive
05-26-2008, 05:02 PM
As someone who is just starting to learn to map, I feel the Heat Maps do not provide all the info needed. All it seems to show is the most chosen place to die. Like ctf_2fort, the main 2 doors are very hot, but I wouldn't say it's a choke point. Also there is no feeling of what killed people.

The point of a heat map is to see where most activity is taking place, not to see whos not balanced. Balance in a class can be on the player side most of the times,

As a mapper you need to know what areas are under and over used and add or take away alternate routes.

Besides, Tf2 was released Oct 10th.... we are just now getting heatmaps and such so for us long time mappers this is GREAT.

Ace
05-28-2008, 12:17 AM
This is very nice.

Now all I need is a map...

VeryBad
05-28-2008, 06:19 AM
The point of a heat map is to see where most activity is taking place, not to see whos not balanced. Balance in a class can be on the player side most of the times,

As a mapper you need to know what areas are under and over used and add or take away alternate routes.

Besides, Tf2 was released Oct 10th.... we are just now getting heatmaps and such so for us long time mappers this is GREAT.

I am only arguing for more information. While I understand that heatmaps are a vast improvement to what tools Valve provided with the SDK (IE Nothing), how could you not want more detailed data when making decisions about how to revise your maps? You would still clearly have the overall picture, giving you the idea of what areas of a map see the most use. Yet with some additional data you can see where the ever-clever play has found ways to kill you may not have expected. From that data you can then decide if it’s acceptable or not, if you need to make a revision to stop it or not, or in the worst case if it is an exploit of some form. More detailed information will only assist not harm imo.

P.S. I know you've played maps where one class is favored despite any skill from the players. If there are insanely long sightlines and little cover snipers will be the bread and butter.

ryodoan
05-29-2008, 09:24 AM
With the utility I am creating (albeit slowly) you will be able to generate different heatmaps based on the killing weapon, killing team, dieing team, and more.

I am trying to keep the stored data as general as possible so that in the future additional restrictions can be added to the program such as the possibility of filtering by the distance between two killers.

This is one of the reasons why I want to make my own utility. I want to create something that is easy to use that can give fast results. Just download, run, pick your filters and then check the result.

TF2Maps.net is proudly hosted by