Source SDK

Source SDK

306 ratings
Source Engine Repository
By Zaeryn and 4 collaborators
This is an index of guides/tutorials for modding Source engine games.
Also a big ol' repository of random info I find useful.
2
   
Award
Favorite
Favorited
Unfavorite
Recommended Tools
  • Crowbar
    Compile, decompile, preview models, and more. Highly recommended over older tools like MDL Decompiler, StudioCompiler, and GUI StudioMDL.

  • GCFScape*[nemesis.thewavelength.net]
    Browse or extract VPK, GCF, and other Source archive formats

  • VTFEdit*[nemesis.thewavelength.net]
    Create, convert, and tweak VTFs, Source's texture format

    *Nemstools Website is down. This Gamebanana Submission[gamebanana.com] Acts as a backup of all his useful tools, including GCFScape and VTFEdit.

  • Notepad++[notepad-plus-plus.org]
    You'll need a text editor for VMTs, QCs and scripts. Windows Notepad will work, but Notepad++ has features, such as syntax highlighting and split view, that makes editing a lot easier.
    Plugin: Source-engine syntax highlighting

  • 7-zip[www.7-zip.org]
    Most mods are compressed into ZIP, RAR or 7Z files in order to save space. You'll need an archive extractor to open and create these. 7-zip supports all 3 types of compression types mentioned, as well as others. The 7z compression format usually compresses addon files to a smaller size than the others.

What about a 3d modeling program?

How about texture creation and editing?

Those are the essentials. How about some optional things to make life a little easier?
  • VMT Editor[gira-x.github.io]
    Auto-create VMTs with many presets and options to choose from

  • VTF shell extensions[www.wunderboy.org]
    This shows thumbnails for VTFs, as long as you're running Windows Vista or later.

  • SageThumbs[sourceforge.net]
    This shows thumbnails for many non-standard image formats. I like it for its DDS support, used by many non-Source engine games.
Models
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=342267049
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=142457190
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=250723629
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2415253996
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1776518541
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1670231400
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1464152705
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1483047118
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1904313136
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1946053787

Custom Playermodels (Proportiontrick & Face Flex)
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2225904754
Creating Collisionmodels + Collisionjoints
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2171689754
Easy Source Engine Armature Rigging.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2101474513

Making Jigglebones (Video)
Pose Parameters (Text)[gamebanana.com]
Face Flexes from rigged face (Video)



QC Commands
$AmbientBoost
Makes model more evenly lighted from all angles

$Animation "idle" "myanim.smd"

$Attachment "MyAttachmentName" "ValveBiped.weapon_bone" 0 0 0 rotate 0 0 0
Sets a point on your model used for attaching muzzle flash, flashlight etc.

$Body "studio" "myref.smd"
Adds a reference model. Most of the time, you should use this instead of $Model.

$BoneMerge "ValveBiped.weapon_bone"

$CDMaterials "models/weapons/stuff"
Look for materials in this path relative to the game's materials folder.

$CollisionModel "MyCollision.smd" {
}
Collision Options:
$Mass 20 - Sets mass in lbs(?)
$Concave - Marks as concave
$RotDamping 3 - Rotational damping

$Hierarchy "child bone" "parent bone"

$IllumPosition 0 0 0 "ParentBone"
Sets the lighting origin of this model. The three numbers are x, y, z positions and "ParentZone" is an optional parent bone.

$KeyValues {
}
KeyValues Options

$Model "studio" "myref.smd" {
blahblah
}
Adds a reference model. Identical to $Body, except you can add additional parameters, mostly for flexes.

$MostlyOpaque
Used when your model has transparent parts. It's good practice to include this OR $MostlyOpaque in all your QCs.

$Opaque
Used when model is fully/mostly opaque.

$Origin 0 0 0 0
Tweak this to adjust the relative position of a first-person ViewModel.
In order, these four numbers are X, Y, Z positions, horizontal rotation.

$RenameBone "CurrentBone" "NewBone"
Renames specified bone (IE ValveBiped.weapon_bone) to something else. Should be specified AFTER any $Body/$Model lines.

$RenameMaterial "CurrentMaterial" "NewMaterial"
Renames specified material (VMT) to something else. Should be specified AFTER any $Body/$Model lines.

$Root "BoneName"
Sets the root bone.

$Scale #
Sets the thickness of geometry weighted to each bone. Can be 0.5 (half thickness), 1.0 (normal) 2.0 (dummy thicc)

$Sequence "SequenceName" "mystuff.smd"
Adds a sequence. In this example, "SequenceName" is merely there for your organizational convenience and can be named anything. "mystuff.smd" Is the name of the skeletal animation smd used. DMX can be substituted.
Sequence Options
addlayer sequencename - adds a second sequence as a layer. Used for look poses.
autoplay - sequence always plays. Useful for layer stuff.
delta - this sequence is added onto another later
fadein # - fades in by this many seconds. Default value is 0.2
fadeout # - same as above
hidden - sequence doesn't appear in HLMV
loop - sequence loops
snap - doesn't fade in or out. Same as using fadein 0/fadeout 0(?)
subtract SequenceName 0 - subtracts a second sequence from this

$SurfaceProp "weapon"
Set this model's surface property. Only useful on world models/props.

$UpAxis y
Valid values are x, y or z

$WeightList

Sound Events
When specified in the QC, it tells the game that a sound script event plays on a specified frame # of your sequence. Here are some I make use of.
Weapon.ImpactSoft - I use these two to imply the dropping of a gun's magazine on the ground. Soft for pistols/smgs, hard for rifles etc.
Weapon.ImpactHard
SMG.ItemPickupExtend - These are the sound of your survivors arm extending or retracting to grab something. I put these at the beginning and end of a sequence respectively. There are two functional pairs of these, the SMG (for lighter weaponry) and rifle (heavier)
SMG.ItemPickupRetract
Rifle.ItemPickupExtend
Rifle.ItemPickupRetract
Console Commands
various Source engine games
  • changelevel [map] // Changes to specified map. Used when you're already loaded into a map. Use "map" command to launch from main menu.
  • connect [ip:port] // Join a server
  • cl_ragdoll_fade_time [#] // Seconds before ragdolls disappear
  • differences // Shows all CVars which are not at their default values
  • disconnect // Disconnect from server
  • ent_fire <entity> <commands> // Cheat. Executes commands on specified entity. Use "ent_fire !picker" to choose entity at crosshair.
  • ent_remove // Cheat. Removes targeted entity
  • ent_setname <name> // Cheat. Sets name of targeted entity (even a player)
  • ent_text // Cheat. Displays info (including model) on entity under crosshair.
  • exec [file].cfg // Executes any commands in example.cfg located in left4dead2/cfg directory.
  • give [item] // Cheat. Gives you an item.
  • give health // Cheat. Gives you full health and revives you if incapped
  • god [0/1] // Cheat. Disable/enable god mode (can't die)
  • firstperson // Cheat. Switch to first-person view
  • hidehud 4 // Cheat. Hides the whole HUD. Use hidehud 0 to reenable.
  • host_timescale [#] // Cheat. Changes time scale. Example: 0.5 half speed, 1.0 normal, 2.0 double
  • impulse 107 // Cheat. Prints to console the material player is aiming at. Only works on brushes (not models). Use mat_crosshair instead, which works on displacements too.
  • kill // Commit suicide
  • map [map_name] // Launches listen server on specified map
  • mat_crosshair // Cheat. Identify material under crosshair.
  • mat_reloadallmaterials // Cheat. Reloads all materials and textures.
  • mat_reloadmaterial models/props_junk/gnome // Cheat. Reloads a material (VMT) and texture (VTF) by name. Path is relative to materials folder.
  • mat_surfacemat [0/1] // Displays brush material names.
  • mp_decals [#] // Maximum # of decals allowed on server
  • noclip // Toggle no clipping mode
  • openserverbrowser // Cheat. Open old server browser interface
  • picker // Cheat. Highlights entity you're aiming at
  • prop_crosshair // Shows info about prop under crosshair
  • prop_dynamic_create props_fortifications/fencesmash.mdl // Cheat. Create dynamic prop at crosshair
  • prop_physics_create props_junk/wood_crate001a.mdl // Cheat. Create physics prop at crosshair
  • r_decals [#] // Def 2048. Maximum # of decals
  • r_drawvgui [0/1] // Cheat. Hides all HUD elements, including the console, so be sure to bind "r_drawvgui 1" to get it back. Useful because you can still change weapons.
  • r_drawviewmodel [0/1] // Cheat. Disable/enable viewmodel
  • r_farz [#] // Cheat, Def -1. Stops rendering anything at specified distance from you. Default -1 uses map-specific value in env_fog_controller entity.
  • respawn // Respawns you
  • snd_restart // Restarts the sound system. Great for testing replaced sounds in GMod, doesn't work for games like L4D2 with load them from VPKs.
  • snd_show 1 // Displays info about currently playing sounds
  • snd_visualize 1 // Displays info about currently playing sounds
  • status // Displays info about current server, including players, map and IP address
  • sv_cheats 1 // Enable cheat commands
  • thirdperson // Cheat. Enables third-person camera
  • thirdpersonshoulder // Toggles third-person-shoulder view

  • script Convars.SetValue("fps_max",60) // Forces specified CVar to a value. For example, just entering "fps_max 60" won't do anything. This command does.

Left 4 Dead series specific
  • boom // Cheat. Drops pipebomb at your feet
  • cl_glow_brightness [0-2] // Control intensity of item outline glow. 0 disables.
  • director_stop // Stops infected from spawning
  • mm_dedicated_force_servers ip:port // Forces connecting to the specified server when using "Best Available Dedicated" from lobby. Can use multiple IPs separated by semicolons.
  • nb_blind 1 // Cheat. Bots won't attack
  • nb_delete_all // Cheat. Deletes all non-player characters
  • nb_stop 1 // Cheat. Stops all characters from moving, animating or attacking
  • sb_add // Cheat. Adds a survivor bot.
  • sb_stop 1 // Cheat. Stops survivor bots from moving or attacking.
  • sb_takecontrol [survivor] // Cheat. Take control of specified survivor character. Example: sb_takecontrol Bill
  • warp_all_survivors_here // Teleports all survivors to you
  • z_spawn [infected] // Spawns an infected bot at crosshair
Launch Options
-allowdebug // Shows enhanced info in console and on screen, and writes to debug.log
-dev // Enables enhanced developer functions
-full // Launches game in fullscreen mode
-noborder // Uses borderless mode when windowed
-novid // Skips intro cinematics
-sw // Launches game in windowed mode
+exec YourCFGHere // Executes specified CFG file from the game's cfg folder
+map // Launches game on specified map
Links
Tutorials/Wikis
Valve Developer Community // Wikipedia-like repository of information
ZeqMacaw's Tidbits[sites.google.com] // misc tutorials
TopHATTWaffle[www.tophattwaffle.com] // mapping tutorials
World of Level Design[www.worldofleveldesign.com] // mapping tutorials

Discussion/Forums
Discord: Dead 4 Mods[discord.gg]
Reddit: Source Engine Design
Reddit: Valve Hammer Editor


Resources
Models:
https://sketchfab.com (some premium)

Textures
https://www.tilingtextures.com
https://freestocktextures.com
https://www.deviantart.com/resources/textures
https://www.textures.com (AKA CGTextures) (account needed)
https://www.psdcovers.com/top-20-royalty-free-texture-sites

Sounds
https://freesound.org (account needed)
11 Comments
❄ FrostyHoneyJuicy ❄ 26 Apr @ 12:29pm 
Ya have to add Hammer++ to this list 100%.
StealthMode℠™©® 3 Jan, 2023 @ 1:57am 
Yeah, most of that can be found on the Valve Developer Wiki.
except the non Valve stuff.
FineAxis 2 Nov, 2022 @ 2:55pm 
You won't find this gem on reddit
perpaon 15 Aug, 2022 @ 5:05pm 
the links to the vtf plugins are unacsessable for some reason
J 11 Oct, 2021 @ 9:15am 
https ://web. archive.org/web /20180817182737/ http://nemesis . thewavelength.net/

For nem's tools, (Remove the spaces)
gwen ☿ 11 Oct, 2021 @ 3:29am 
thank you lad i need to make a fucking tf2 map already
J 8 Sep, 2021 @ 7:35pm 
And to this day, nemstools is still down...
F3Piey (dessert gaming) 4 Jun, 2021 @ 8:18am 
how do you make portal 2 plugins
Programming King 1 Nov, 2020 @ 5:51pm 
Favorited. Thanks.
aloegarten ☆ 19 Sep, 2020 @ 2:16pm 
awesome