Skip to main content

CS:S map making with Hammer editor

Links
  • Valve's definitive guide is here.
  • A nice set of tutorials here.
  • Entity guide
  • Navigation point helper guide.
Notes


CT/T spawn
  1. Insert entities "info_player_counterterrorist" or "info_player_terrorist". 
  2. The number of entities you place is the max number of player spawn
  3. Valve suggests about 20 points per team 128 units apart
Placing lights
  • Do this in the end - debugging is harder with all those fancy lights
  • Make sure they are not recessed into ceilings/walls - use the 3D camera view to place light.
  • Do not name lights (if you do you should know what you are doing).
Buy Zones/Bomb plant zones
  1. Select tools/toolstrigger for texture, make a block with this texture where you want the buy zone. 
  2. Click "toEntity", select "func_buyzone" from the dropdown list. 
  3. Set the appropriate team name from the drop down.
For bomb zones, do the same first step, then select "func_bomb".  

Texture one face of a solid
  1. Press shift + A to bring up texture application tool 
  2. Select your texture and click on the surface you want textured
Making ramps
  1. Select the object
  2. Use the vertex tool to move the sides as needed
Props
  1. Select entity
  2. Select prop_dynamic, prop_static or prop_physics depending on the model you want
  3. When you select the model verify on the "info" tab that it's type is the same as the entity.
  4. Mismatch between the model type and prop type will cause the model not to appear on the map
Sounds
The way sounds work is that there are triggers (env_soundscape) that start the playing of a sound when a player gets within their radius and has line of sight with them. The sound then keeps playing for ever (for that player) until the player trips a different soundscape. The way to set up soundscapes, then, is to set them at doorways and other entrance/exits. 
  • soundscape descriptions
  • List of CS:S soundscapes 
Navigation
  1. Only edit the mesh once you are done laying out the map
  2. Load the map in CS:S, go into spectate and bring up the console
  3. sv_cheats 1
  4. nav_edit 1 (to see the mesh)  
  5. Usually upstairs areas only connected by ladders/ramps/stairs will not be connected by the automatically generated mesh
  6. Go to the highest navigable point, point at a spot and type nav_make_walkable. A blue pyramid will appear
  7. Go to each ladder in turn, point to it and type nav_make_ladder
  8. Now type nav_generate to regenerate the mesh. The top walkable should propagate everywhere
  9. Sometimes some ledges may not be included in the jump calculations: you can forcibly join the ledge: point at the top part, type nav_mark, then point at the landing point and then type nav_connect.
  10. Type nav_save to save the mesh  
Mini-Map
Follow instructions here.

Introtext
Type your intro text into a text file. Name the text file as map_name.txt (map_name being your exact map name) and save it in the same directory as the map file.


Debugging tips
  • sv_cheats 1
  • mat_wireframe 1
  • cl_leveloverview 8 (or whatever scale factor works)
  • nav_edit 1 (To see nav meshes, helpful to see jumps etc.)
  • mat_fullbright 1 (To remove lighting and see everything) 
  • compile with "rad" set to "no" - faster compilation with no lightmaps
Misc stuff
  • Night Vision does not amplify red
  • Grouping lights lets you change their properties together

Comments

Popular posts from this blog

A note on Python's __exit__() and errors

Python's context managers are a very neat way of handling code that needs a teardown once you are done. Python objects have do have a destructor method ( __del__ ) called right before the last instance of the object is about to be destroyed. You can do a teardown there. However there is a lot of fine print to the __del__ method. A cleaner way of doing tear-downs is through Python's context manager , manifested as the with keyword. class CrushMe: def __init__(self): self.f = open('test.txt', 'w') def foo(self, a, b): self.f.write(str(a - b)) def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): self.f.close() return True with CrushMe() as c: c.foo(2, 3) One thing that is important, and that got me just now, is error handling. I made the mistake of ignoring all those 'junk' arguments ( exc_type, exc_val, exc_tb ). I just skimmed the docs and what popped out is that you need to return True or

Using adminer on Mac OS X

adminer is a nice php based sqlite manager. I prefer the firefox plugin "sqlite manager" but it currently has a strange issue with FF5 that basically makes it unworkable, so I was looking for an alternative to tide me over. I really don't want apache running all the time on my computer and don't want people browsing to my computer, so what I needed to do was: Download the adminer php script into /Library/WebServer/Documents/ Change /etc/apache2/httpd.conf to allow running of php scripts (uncomment the line that begins: LoadModule php5_module Start the apache server: sudo apachectl -k start Operate the script by going to localhost Stop the server: sudo apachectl -k stop