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

Flowing text in inkscape (Poster making)

You can flow text into arbitrary shapes in inkscape. (From a hint here).

You simply create a text box, type your text into it, create a frame with some drawing tool, select both the text box and the frame (click and shift) and then go to text->flow into frame.

UPDATE:

The omnipresent anonymous asked:
Trying to enter sentence so that text forms the number three...any ideas?
The solution:
Type '3' using the text toolConvert to path using object->pathSize as necessaryRemove fillUngroupType in actual text in new text boxSelect the text and the '3' pathFlow the text

Drawing circles using matplotlib

Use the pylab.Circle command

import pylab #Imports matplotlib and a host of other useful modules cir1 = pylab.Circle((0,0), radius=0.75, fc='y') #Creates a patch that looks like a circle (fc= face color) cir2 = pylab.Circle((.5,.5), radius=0.25, alpha =.2, fc='b') #Repeat (alpha=.2 means make it very translucent) ax = pylab.axes(aspect=1) #Creates empty axes (aspect=1 means scale things so that circles look like circles) ax.add_patch(cir1) #Grab the current axes, add the patch to it ax.add_patch(cir2) #Repeat pylab.show()

Running a task in a separate thread in a Tkinter app.

Use Queues to communicate between main thread and sub-threadUse wm_protocol/protocol to handle quit eventUse Event to pass a message to sub-threadimport Tkinter as tki, threading, Queue, time def thread(q, stop_event): """q is a Queue object, stop_event is an Event. stop_event from http://stackoverflow.com/questions/6524459/stopping-a-thread-python """ while(not stop_event.is_set()): if q.empty(): q.put(time.strftime('%H:%M:%S')) class App(object): def __init__(self): self.root = tki.Tk() self.win = tki.Text(self.root, undo=True, width=10, height=1) self.win.pack(side='left') self.queue = Queue.Queue(maxsize=1) self.poll_thread_stop_event = threading.Event() self.poll_thread = threading.Thread(target=thread, name='Thread', args=(self.queue,self.poll_thread_stop_event)) self.poll_thread.start() self.poll_interval = 250 self.poll() self.root.wm_protocol("WM_DELETE…