Prop Hunt map config


Fri Jun 03, 2016 5:18 pm
Site Owner
1645 Posts
Ok folks, so I have occasionally been asked about prop hunt map config files and I thought I would share what I do to make a map config file.
Prop hunt maps are arena maps, but for the Prophunt gametype, we need a config file that is a list of possible props to become when you are on team Red.  Now we do not want random props (static models) because they would be hard to blend in. Ideally, there will be at least a dozen or more common props in the map in question, and we want to be one of these existing models.

To me, the easiest thing to do is to try to decompile the map

BSPSource is a map decompiler for [Source engine]( maps, written in Java.
It decompiles .bsp map files back to .vmf files that can be loaded in Hammer, Valve's official level editor.

*Decompiling maps may not always result in 100% accurate builds. Some differences (keyvalues, materials, etc.) may not be an exact match as the original map.

Once you have the map decompiled, you have a text file that is totally readable.
Some maps do not decompile well.  For example, some mappers put a broken model in the maps somewhere to prevent successful decompiling (but I don't want to drift off topic).

As an example, and this example is a "works in progress" and therefore subject to change. The map ph_doublecross_a2 was a map we had a copy of but did not have a prop menu config file custom for that map. I got a damaged decompile on this particular example.

the decompiled map is here: ph_doublecross_a2_d.vmf
the config file is here: ph_doublecross.cfg

*note the config file is named ph_doublecross.cfg and would thus work with any rev of map  (ex ph_doublecross_a1.bsp, ph_doublecross_a2.bsp, ...etc)

So, with the decompiled text file of map (hammer uncompiled map work) I can perhaps run the particular map on the server, and look around in-game and make a list of common props that would make up a good selection of props for the custom config file

If I had a good decompile, I might look at the model info in Hammer. Otherwise, I might just search for  things like wood, chair, etc and get the model info

Here is a further example.  The config file for ph_doublecross (at this snapshot in time) in the proper format is:

Code: [ Select all ]

      "doors" "1"
      "relay" "0"
      "round" "150"
      "freeze" "0"
      "alt" ""

the first entry is a computer cart.  I had ph_doublecross_a2_d.vmf open in Notepad++ and searched for the word "cart" and first result on line 335463 is this:

Code: [ Select all ]

   "id" "7887"
   "classname" "prop_static"
   "origin" "-1138.06 -2681.16 -31.75"
   "angles" "0.0 150.0 0.0"
   "skin" "0"
   "fademindist" "-1.0"
   "fademaxdist" "0.0"
   "solid" "6"
   "model" "models/props_well/computer_cart01.mdl"
   "disableshadows" "false"
   "fadescale" "1.0"
   "disableselfshadowing" "false"
   "disablevertexlighting" "false"
   "ignorenormals" "false"
   "rendercolor" "0 1 0"
   "renderamt" "0"
   "maxcpulevel" "0"
   "mincpulevel" "0"
   "maxgpulevel" "0"
   "mingpulevel" "0"
   "disableX360" "false"

to me, this part is of interest :

Code: [ Select all ]

and you will see this appear in the config file in the first line of the "Props" array on line 5

hope this post makes sense to anyone interested in PropHunt map config files that goes in /tf/addons/sourcemod/data/prophunt/maps folder of the PropHunt server

Fri Jun 03, 2016 5:42 pm
Site Owner
1645 Posts
Reserved for possible follow up    :discuss:

Fri Jun 03, 2016 5:43 pm
Game Server Admin
156 Posts
Hmm... There is another way to get around a broken decompile, if its totally unusable. If you go into tf2's files via gmod's prop spawn menu, you can find every prop and the filepath for each prop. Its not as quick, but it does work.(Note, not for a per map basis, as you need to find the specific prop on the map itself first, but it also gives you a visual indicator if its a good prop to use or not)
Mon Jun 20, 2016 9:12 pm
Game Server Admin
46 Posts
Hey Big, is it possible to get a guide on how to convert a map to prop hunt?
Wed Jun 22, 2016 9:02 pm
Site Owner
1645 Posts
— Keen wrote
Hey Big, is it possible to get a guide on how to convert a map to prop hunt?

Keen, there is not a easy answer to that in that it would be a Hammer issue. There are game logic entities for the different game types.
You would basically remove all game logic entities in the map and then place the "tf2_logic_arena" entity in the map.  There are many other issues to deal with however, like a working control point for example.

The picture attached is a snapshot of Hammer open with the game logic entity highlighted and showing it's properties

Forums ©