Self made KOTH map has broken TF2

The Rev

L1: Registered
Jul 15, 2012
2
0
I've messed around with Hammer for a while now and recently stated a new TF2 map and decided to make it a KOTH game mode. Before I'd decided on the game mode I had a basic layout for the centre of the map and had compiled it without error numerous times. In terms of entities, it only contained

info_player_teamspawn
info_observer_point
light_environment
a few light_spots
a few info_overlays
and a few prop_statics

I then tried to add a KOTH point following a few different walkthroughs. I'd seen conflicting advice on whether to add a tf_gamerules entity but I decided to add one to make the various outputs work. After I'd set up the KOTH point I compiled the map in VBCT and as usual told it to run the map after it had done compiling. It complied fine, but when it came to running the map TF2 just hung on the main screen. After forcing TF2 to quit I tried opening it normally and testing the map by creating a server, but this also made the game hang.

I then tried removing tf_gamerules and recompiling, but it still crashed. Even taking out all the KOTH point stuff didn't work. What's really odd is that now I can't create a server using any map, even the official ones, but luckily I can still join servers.

I put my compile log through interlopers.net but it didn't turn up anything unexpected. I've posted it below for reference.

Update 1: Changing the compile setting has no effect

Update 2: Refreshing the SDK content and resetting the game configuration in the Source SDK has no effect.

-------------- Start Compile BSP ----------------
VBSP Started, Please Wait!

VBSP: c:\program files (x86)\steam\steamapps\the_rev_1989\sourcesdk\bin\orangebox\bin\vbsp.exe -game "c:\program files (x86)\steam\steamapps\the_rev_1989\team fortress 2\tf" "C:\Program Files (x86)\Steam\steamapps\the_rev_1989\sourcesdk_content\tf\mapsrc\Union"

Valve Software - vbsp.exe (Apr 26 2012)
4 threads
materialPath: c:\program files (x86)\steam\steamapps\the_rev_1989\team fortress 2\tf\materials
Loading C:\Program Files (x86)\Steam\steamapps\the_rev_1989\sourcesdk_content\tf\mapsrc\Union.vmf
fixing up env_cubemap materials on brush sides...
ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (0)
ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (0)
Processing areas...done (0)
Building Faces...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
done (0)
writing C:\Program Files (x86)\Steam\steamapps\the_rev_1989\sourcesdk_content\tf\mapsrc\Union.prt...Building visibility clusters...
done (0)
Creating default LDR cubemaps for env_cubemap using skybox materials:
skybox/sky_hydro_01*.vmt
! Run buildcubemaps in the engine to get the correct cube maps.
Creating default HDR cubemaps for env_cubemap using skybox materials:
skybox/sky_hydro_01*.vmt
! Run buildcubemaps in the engine to get the correct cube maps.
Finding displacement neighbors...
Finding lightmap sample positions...
Displacement Alpha : 0...1...2...3...4...5...6...7...8...9...10
Building Physics collision data...
done (0) (214325 bytes)
Placing detail props : 0...1...2...3...4...5...6...7...8...9...10
Compacting texture/material tables...
Reduced 120 texinfos to 104
Reduced 43 texdatas to 40 (992 bytes to 881)
Writing C:\Program Files (x86)\Steam\steamapps\the_rev_1989\sourcesdk_content\tf\mapsrc\Union.bsp
1 second elapsed

Compile Complete for this module.
VBSP Completed: 15 July 2012, 18:27:13
VBSP: Compile time: 1 second elapsed

-------------- Start Compile VVIS ----------------
VVIS Started, Please Wait!

VVIS: c:\program files (x86)\steam\steamapps\the_rev_1989\sourcesdk\bin\orangebox\bin\vvis.exe -fast -game "c:\program files (x86)\steam\steamapps\the_rev_1989\team fortress 2\tf" "C:\Program Files (x86)\Steam\steamapps\the_rev_1989\sourcesdk_content\tf\mapsrc\Union"

Valve Software - vvis.exe (Apr 26 2012)
fastvis = true
4 threads
reading c:\program files (x86)\steam\steamapps\the_rev_1989\sourcesdk_content\tf\mapsrc\Union.bsp
reading c:\program files (x86)\steam\steamapps\the_rev_1989\sourcesdk_content\tf\mapsrc\Union.prt
1292 portalclusters
4137 numportals
BasePortalVis: 0...1...2...3...4...5...6...7...8...9...10 (0)
Optimized: 50426 visible clusters (3.68%)
Total clusters visible: 1370912
Average clusters visible: 1061
Building PAS...
Average clusters audible: 1292
visdatasize:419364 compressed from 434112
writing c:\program files (x86)\steam\steamapps\the_rev_1989\sourcesdk_content\tf\mapsrc\Union.bsp
1 second elapsed

Compile Complete for this module.
VVIS Completed: 15 July 2012, 18:27:15
VVIS: Compile time: 1 second elapsed

-------------- Start Compile VRAD ----------------
VRAD Started, Please Wait!

VRAD: c:\program files (x86)\steam\steamapps\the_rev_1989\sourcesdk\bin\orangebox\bin\vrad.exe -game "c:\program files (x86)\steam\steamapps\the_rev_1989\team fortress 2\tf" "C:\Program Files (x86)\Steam\steamapps\the_rev_1989\sourcesdk_content\tf\mapsrc\Union"

Valve Software - vrad.exe SSE (Apr 26 2012)

Valve Radiosity Simulator
4 threads
[Reading texlights from 'lights.rad']
[34 texlights parsed from 'lights.rad']

Loading c:\program files (x86)\steam\steamapps\the_rev_1989\sourcesdk_content\tf\mapsrc\Union.bsp
Setting up ray-trace acceleration structure... Done (0.63 seconds)
4512 faces
137 degenerate faces
598322 square feet [86158480.00 square inches]
0 Displacements
0 Square Feet [0.00 Square Inches]
4375 patches before subdivision
zero area child patch
zero area child patch
zero area child patch
54993 patches after subdivision
6 direct lights
BuildFacelights: 0...1...2...3...4...5...6...7...8...9...10 (5)
BuildVisLeafs: 0...1...2...3...4...5...6...7...8...9...10 (8)
transfers 13748167, max 1506
transfer lists: 104.9 megs
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #1 added RGB(209914, 174481, 192179)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #2 added RGB(46916, 34870, 32642)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #3 added RGB(13019, 8968, 7330)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #4 added RGB(3855, 2504, 1824)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #5 added RGB(1171, 718, 469)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #6 added RGB(359, 210, 124)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #7 added RGB(111, 62, 33)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #8 added RGB(34, 18, 9)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #9 added RGB(11, 5, 2)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #10 added RGB(3, 2, 1)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #11 added RGB(1, 0, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #12 added RGB(0, 0, 0)
Build Patch/Sample Hash Table(s).....Done<0.0146 sec>
FinalLightFace: 0...1...2...3...4...5...6...7...8...9...10 (2)
FinalLightFace Done
0 of 0 (0% of) surface lights went in leaf ambient cubes.
ThreadComputeLeafAmbient: 0...1...2...3...4...5...6...7...8...9...10 (2)
Writing leaf ambient...done
Ready to Finish

Object names Objects/Maxobjs Memory / Maxmem Fullness
------------ --------------- --------------- --------
models 1/1024 48/49152 ( 0.1%)
brushes 549/8192 6588/98304 ( 6.7%)
brushsides 7435/65536 59480/524288 (11.3%)
planes 6718/65536 134360/1310720 (10.3%)
vertexes 6379/65536 76548/786432 ( 9.7%)
nodes 2251/65536 72032/2097152 ( 3.4%)
texinfos 104/12288 7488/884736 ( 0.8%)
texdata 40/2048 1280/65536 ( 2.0%)
dispinfos 0/0 0/0 ( 0.0%)
disp_verts 0/0 0/0 ( 0.0%)
disp_tris 0/0 0/0 ( 0.0%)
disp_lmsamples 0/0 0/0 ( 0.0%)
faces 4512/65536 252672/3670016 ( 6.9%)
hdr faces 0/65536 0/3670016 ( 0.0%)
origfaces 1799/65536 100744/3670016 ( 2.7%)
leaves 2253/65536 72096/2097152 ( 3.4%)
leaffaces 5249/65536 10498/131072 ( 8.0%)
leafbrushes 2100/65536 4200/131072 ( 3.2%)
areas 2/256 16/2048 ( 0.8%)
surfedges 29922/512000 119688/2048000 ( 5.8%)
edges 16414/256000 65656/1024000 ( 6.4%)
LDR worldlights 6/8192 528/720896 ( 0.1%)
HDR worldlights 0/8192 0/720896 ( 0.0%)
leafwaterdata 0/32768 0/393216 ( 0.0%)
waterstrips 567/32768 5670/327680 ( 1.7%)
waterverts 0/65536 0/786432 ( 0.0%)
waterindices 9867/65536 19734/131072 (15.1%)
cubemapsamples 0/1024 0/16384 ( 0.0%)
overlays 9/512 3168/180224 ( 1.8%)
LDR lightdata [variable] 1725048/0 ( 0.0%)
HDR lightdata [variable] 0/0 ( 0.0%)
visdata [variable] 419364/16777216 ( 2.5%)
entdata [variable] 1741/393216 ( 0.4%)
LDR ambient table 2253/65536 9012/262144 ( 3.4%)
HDR ambient table 2253/65536 9012/262144 ( 3.4%)
LDR leaf ambient 8680/65536 243040/1835008 (13.2%)
HDR leaf ambient 2253/65536 63084/1835008 ( 3.4%)
occluders 0/0 0/0 ( 0.0%)
occluder polygons 0/0 0/0 ( 0.0%)
occluder vert ind 0/0 0/0 ( 0.0%)
detail props [variable] 1/12 ( 8.3%)
static props [variable] 1/1294 ( 0.1%)
pakfile [variable] 211837/0 ( 0.0%)
physics [variable] 214325/4194304 ( 5.1%)
physics terrain [variable] 2/1048576 ( 0.0%)

Level flags = 0

Total triangle count: 13582
Writing c:\program files (x86)\steam\steamapps\the_rev_1989\sourcesdk_content\tf\mapsrc\Union.bsp
21 seconds elapsed

If anyone can help it would be greatly appreciated.
 
Last edited:

phi

aa
Nov 6, 2011
832
1,815
Edit: Interlopers says this:
You seem to be running vvis in -fast mode. This is okay for testing purposes, but mind that this will cause:

Strange compile errors, like 'cluster saw into cluster' errors
Strange errors ingame (including unexpected crashes)
Hitting limits ingame, by skipping essential optimization processses
Lower performance ingame

I don't know much about -fast and if it is used for anything specifically, but that *may* be the cause.

Second edit: Interlopers says something about "zero area child patch" as well.
Description:
A solid in your level has a face with no area. My guess is that vrad.exe is trying to create a lightmap for a face that doesn't exist. Maybe you have an invalid brush?

Solution:
First check Hammers problemchecker (alt+p). If that doesn't solve your problems, you can either ignore the error, or try to find it anyway using cordon tools. You would be looking for brushes which might be too complex. I wouldn't recommend the second option.

I have no idea what I'm doing but I hope that helps in the least sense.
 
Last edited:

Another Bad Pun

In the shadows, he saw four eyes lit by fire
aa
Jan 15, 2011
801
1,845
Do not run VVIS on "fast" if you want to test your map ingame. Run everything on normal.
Running VVIS on fast can cause errors and crashes when you try to load your map ingame.

VVIS when ran on fast can cause a few errors, but I don't think it would cause an error like this. Fast VVIS just means less optimization for faster compilation. (Rhyme intended?)

About the problem... It's probably something wrong with your koth logic entities. I recommend installing Boojum's Ultimate Mapping Resource pack. It has a lot of things that would be challenging/time consuming to do already done, and most TF2 mappers use it.

In it, there are door prefabs, resupply lockers, an improved texture browser, new icons for some entities, and a nice gametype library. Use the gametype library and copy the koth setup into your map. :)

If all else fails, double check your compile settings and make sure your map has no leaks or corrupted entities. You can find leaks by going to the top toolbar, (near the file button) and clicking Map / Load pointfile. If there's a leak, you will need to press okay and look the red line pointing out into "the void." close the gap, and check for leaks again if needed. I think CTRL + P can be used to find corrupted entities.

Also, I recommend you take a look at this if you have any questions on what VVIS is and how optimization works in Source.

I hope this helps, and good luck with your map. ;)
 

The Rev

L1: Registered
Jul 15, 2012
2
0
About the problem... It's probably something wrong with your koth logic entities. I recommend installing Boojum's Ultimate Mapping Resource pack. It has a lot of things that would be challenging/time consuming to do already done, and most TF2 mappers use it.

Before posting here I was looking for fixes and stumbled across that, so I'll give it a look.

I'm currently compiling in non-fast mode, but as people have said I doubt it will make any difference, I've done it in fast mode in the past and it's worked fine.

What's really confusing me is that any map I try and run from Hammer or from creating my own server, either inside TF2 or from the Source Server, crashes the game. I could be just a coincidence that this has happened at the exact same time I stated messing around with tf_gamerules.

Update: Compiling in Full mode makes no difference, TF2 still crashes when it tries to run it and any others.
 
Last edited: