This article relates to the game "Counter-Strike: Source". Click here for more information.

Counter-Strike: Source Level Creation: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m ('Amount' was spelt wrong!)
m (Nesciuse moved page Counter-Strike: Source Level Creation/en to Counter-Strike: Source Level Creation without leaving a redirect: Move en subpage to basepage)
 
(72 intermediate revisions by 28 users not shown)
Line 1: Line 1:
[[Category:Tutorials]]
{{LanguageBar}}
This document describes the basics entities needed to make levels for Counter-Strike: Source. It assumes you already have knowledge of basic Hammer functions and CS:S gameplay. See the [[:Category:Hammer|Hammer Editor Documentation]] for information on basic Hammer functions such as geometry creation and entity placement.
__NOTOC__
This article focuses on {{css|4}} level design. For general mapping tutorials, see [[:Category:Level Design]].


==Basic CS:S entities==
{{category header|background-color=#E0E0E0|border-color=lightgray}}
{|
{{category newcolumn|rowspan=1|width=50%|background-color=#F7F7F7|border-color=lightgray}}
| [[info_player_terrorist]] || Start points for the terrorist team. One of these needs to be placed for each team member. 20 start points is typical. Should be placed at least 128 units apart.
|-
| [[info_player_counterterrorist]] || Start points for the counter-terrorist team. One of these needs to be placed for each team member. 20 start points is typical. Should be placed at least 128 units apart.
|-
| [[func_buyzone]] || Brush entity that defines the area where the team can purchase equipment. Should have the <code>tools\toolstrigger</code> material applied to all sides, completely cover the spawn area, and be set for the correct team.
|-
| [[prop_physics_multiplayer]] || Models that have physics properties (i.e., barrels, debris, etc). Must not be intersecting any other geometry where it’s placed.
|-
| [[func_ladder]] || Climbable ladder brush. Not rendered, but allows players to climb up the brush surface. Should have the <code>tools\toolsinvisibleladder</code> material assigned to all sides of the brush.
|-
| [[point_viewcontrol]] || Point entity use for camera locations when players join the game. Should be set to look at another point entity, typically an [[info_target]].  This is the same as the [[Goldsource]] entity '''trigger_camera'''
|-
| [[info_no_dynamic_shadow]] || Point entity to stop player shadows from being applied to a particular set of brush faces. Sometimes needed when player shadows get cast on ceilings when players walk above. Open the entity properties, click the Pick… button, and then click to add a face to prevent that surface from getting shadows. Hold down CTRL to for additional faces, then click the Pick… button again when you're done.
|}


==Bomb Defusion gameplay entities==
==Getting Started==
{|
* [[How to Develop a Map That Works|Develop A Map That Works]]
| [[func_bombtarget]] || Brush entity that determines where the bomb can be planted. When the bomb is planted then explodes inside the area, the <code>BombExplode</code> outputs are fired. The game handles all of the bomb planting and scoring logic – the <code>BombExplode</code> outputs are purely to add visual and damage effects.
* [[CSS_Bugs|Game and SDK bugs]]
|-
| [[env_explosion]] || Point entity for explosion effects when a bomb explodes. Creates a fireball sprite effect and will also effect physics models. Can also apply damage. A single [[env_explosion]] is typically placed at the center of the bomb site, triggered from the <code>BombExplode</code> outputs on the [[func_bombtarget]].
|-
| [[env_fire]] || Point entity for secondary fire effects when a bomb explodes. Can also apply damage. Several <code>env_fire</code> entities are typically scattered around the bomb site, triggered from the <code>BombExplode </code> outputs on the [[func_bombtarget]].
|-
| [[ambient_generic]] || Point entity that plays a .wav sound from the entity location. Can be used to play burning fire sound after the bomb explodes.
|}


==Hostage Rescue gameplay entities==
==General==
{|
* [[Counter-Strike Source Entity Overview|Entity Overview]]
| [[hostage_entity]] || Point entity that is placed for each hostage to be rescued in the map. A hostage NPC will spawn at this point. There are usually four hostages placed in each hostage rescue map.
* [[CSS/Animated Clouds|Animated Clouds]]
|-
* [[Bullet Penetration in Counter-Strike: Source|Bullet Penetration]]
| [[func_hostage_rescue]] || Brush entity that defines the area where hostages are rescued. Hostages that get led into this area will be marked as rescued.
* [[Level Overviews]]
|-
* [[Map Prefixes]]
| [[info_node]] || Point entity used for navigation of the hostage NPCs. <code>info_node</code> entities need to be placed in all areas where the hostages need to move. Paths are drawn between each node point. One node needs to be visible by the next node point to connect properly.  {{note|This is now obsolete for hostage NPCs.  Hostages now rely on the [[Navigation Meshes|bot navigation mesh]]}}.
* [[Both Teams are Full error]]
|}


==FY Maps==
==Bots==
===Weapon Ammo List===
* [[Nav Mesh|Navigation Meshes]]
{|
* [[CSS/Editing Bot Navigation CFG File]]
! SHORTAMMONAME || AMOUNT || WEAPONENT || NUMTOFILL
|-
| 338mag || [[ammo_338mag]] || [[weapon_awp]] || 3
|-
| 357sig || [[ammo_357sig]] || [[weapon_p228]] || 4
|-
| 45acp || [[ammo_45acp]] || [[weapon_mac10]] || 4
|-
| ↑|| ↑|| [[weapon_ump45]] || 4
|-
| ↑|| ↑|| [[weapon_usp]] || 5
|-
| 50ae || [[ammo_50ae]] || [[weapon_deagle]] || 5
|-
| 556mm || [[ammo_556mm]] || [[weapon_famas]] || 3
|-
| ↑|| ↑|| [[weapon_galil]] || 3
|-
| ↑|| ↑|| [[weapon_m4a1]] || 3
|-
| ↑|| ↑|| [[weapon_sg550]] || 3
|-
| ↑|| ↑|| [[weapon_sg552]] || 3
|-
| 556mm_box || [[ammo_556mm_box]] || [[weapon_m249]] || 7
|-
| 57mm || [[ammo_57mm]] || [[weapon_fiveseven]] || 2
|-
| ↑|| ↑|| [[weapon_p90]] || 2
|-
| 762mm || [[ammo_762mm]] || [[weapon_ak47]] || 3
|-
| ↑|| ↑|| [[weapon_aug]] || 3
|-
| ↑|| ↑|| [[weapon_g3sg1]] || 3
|-
| ↑|| ↑|| [[weapon_scout]] || 3
|-
| 9mm || [[ammo_9mm]] || [[weapon_elite]] || 4
|-
| ↑|| ↑|| [[weapon_glock]] || 4
|-
| ↑|| ↑|| [[weapon_mp5navy]] || 4
|-
| ↑|| ↑|| [[weapon_tmp]] || 4
|-
| buckshot || [[ammo_buckshot]] || [[weapon_m3]] || 4
|-
| ↑|| ↑|| [[weapon_xm1014]] || 4
|}
===Setting up ammo===
{{note|This requires you to edit your base.fgd and add a '''"Use"''' input to [[game_player_equip]].}}


<code>input Use(void) : "Equip player"</code>
==Game Modes==
* Add your '''WEAPONENT''' into the world
* [[Creating a Classic Counter-Strike Map]]
* If a game_player_equip with targetname '''SHORTAMMONAME''' does not exist yet, create one and do the following two steps.
** [[Creating a Bomb Defusal Map]]
** Set the '''Use Only''' flag on the game_player_equip
** [[Creating a Hostage Rescue Map]]
** Add a keyvalue with the keyname '''AMMOENT''' and the value '''NUMTOFILL'''
* Add an output to your '''WEAPONENT''' named '''OnPlayerPickup''' with target '''SHORTAMMONAME''' and the input '''Use'''


==VIP (as_) Maps==
{{category newcolumn|rowspan=6|width=50%|background-color=white|border-color=lightgray}}
Both the VIP mod and the Mani Admin Plugin are required to run VIP maps. Learn more about creating a VIP map [[Creating a VIP Map Tutorial|here]]


==CS:S gameplay decals==
==References==
* [[List of CS:S_entities | List of Entities]]
* [[List_of_CSS_Particles | List of Particles]]
* [[Counter-Strike Source Sky List | List of Skies]]
* [[List of CS:S Soundscapes | List of Soundscapes]]
* [[List of CSS Fog Settings | List of Fog Settings]]
* [[Radio console commands (Counter Strike: Source) | List of Radio Commands]]
* [[List_of_Counter-Strike:_Source_console_commands_and_variables | List of Console Variables]]


Here is a list of some of the special materials that are used to mark gameplay areas in CS:S maps. They can be used as [[Hammer Decal Tool|Decals]] or [[Hammer Overlay Tool|Overlays]].
==External links==
===Bomb target decals===
* [https://www.moddb.com/games/counter-strike-source Moddb] - Community Modding Website.
* decals/target
* [https://gamebanana.com/games/2 Gamebanana] - Game Modding Community.
===Directional decals===
* [https://www.mobygames.com/game/windows/counter-strike-source MobyGames] - Videogame Database
* decals/sitea
* {{wiki|Counter-Strike: Source}} (Wikipedia article)
* decals/siteb
* [https://www.youtube.com/watch?v=bvI62FUDpKA Game Trailer]
* decals/arrowlf
* [https://store.steampowered.com/app/240 Buy the game]
* decals/arrowrt
* decals/arrowuplf
* decals/arrowuprt
* cstrike/{sitea
* cstrike/{siteb
===Hostage rescue point decal===
* decals/hrpoint


==Counter-Strike Round Restarts==
==See also==
* {{css|4}}
* {{csgo|4}}
* {{cs2|4}}
* {{cs|4}}
* {{cscz|4}}
* {{czds|4}}


At the end of each Counter-Strike: Source gameplay round, when end-of-round game conditions are met, the game resets itself for the next round. When this happens, most of the entities in the map reset to their original state, just as if the map was just loaded. However, the following list of entities are not reset, and continue in the same state in the all consecutive rounds:
{{category end}}{{css topicon}}
    * [[point_devshot_camera]]
    * [[predicted_viewmodel]]
    * [[viewmodel]]
    * [[trigger_soundscape]]
    * [[soundent]]
    * [[sky_camera]]
    * [[shadow_control]]
    * [[scene_manager]]
    * [[point_viewcontrol]]
    * [[info_ladder]]
    * [[move_rope]]
    * [[keyframe_rope]]
    * [[info_map_parameters]]
    * [[info_node_hint]]
    * [[info_target]]
    * [[info_node]]
    * [[info_projecteddecal]]
    * [[infodecal]]
    * [[func_illusionary]]
    * [[func_buyzone]]
    * [[func_wall]]
    * [[func_brush]]
    * [[env_fog_controller]]
    * [[env_wind]]
    * [[env_sun]]
    * [[env_soundscape_triggerable]]
    * [[env_soundscape_proxy]]
    * [[env_soundscape]]
    * [[cs_player_manager]]
    * [[cs_team_manager]]
    * [[cs_gamerules]]
    * [[ai_hint]]
    * [[ai_network]]
All other entities are reset to their original state at the beginning of the next round, and all pending outputs are cancelled.
 
You can use a [[logic_auto]] point entity to trigger additional events to occur at the start of the round. The <code>OnMapSpawn</code> output of the logic_auto will be fired when the map is first loaded, and at the beginning of the each round thereafter, after the reset. For example, in the map cs_havana, at the start of each round, a logic_auto has an <code>OnMapSpawn</code> output to a [[logic_case]] entity that randomly sets the routes open to the players each round. The logic_case enables and disables a series of [[func_wall]] brush entities that determines which routes are open and closed. For more information on how to use outputs, see Entity I/O.
 
==Other important components==
 
There are other entities and materials that are commonly used in Counter-Strike: Source maps. Here is a list of some of the most prominent ones.
 
{|
| [[trigger_multiple]]<br>[[trigger_once]] || Brush entities used to activate events, set soundscapes, etc. See the <code>Entity Guide</code> in the Hammer User's Guide for further details on specific entities.
|-
| [[filter_activator_name]]<br>[[filter_activator_team]]|| Point entities that are used to determine what entities or players can activate a trigger. See the Entity Guide in the Hammer User's Guide for further details on specific entities.
|-
| [[Tool textures#clip|Clip brushes]] – brushes with the <code>tools\toolsclip</code> material applied to all sides. || Used to block off areas from players.
|-
| [[Tool textures#playerclip|Player clip brushes]] – brushes with the <code>tools\toolsplayerclip</code> material applied to all sides. || Used to block off areas from players. Blocks players only – not hostages or grenades.
|-
| [[Tool textures#nodraw|Nodraw brushes]] – brushes with the <code>tools\toolsnodraw</code> material applied to all sides. || Nodraw faces do not render, but the brushes still seal areas and cast shadows. Useful to put behind non-sealing geometry, such as models or displacements, to seal the map without rendering extra faces.
|-
| [[Water|Water brushes]] – brushes with a water material applied to to the top surface. || Water is created by making a brush volume and applying one of the water materials to the top surface and <code>tools\toolsnodraw</code> to all the other sides. See [[Adding Water]] for further details on how to create water volumes.
|-
| [[env_cubemap]] || Need to be placed around the level for proper rendering of reflection/specular materials. See [[Cubemaps]] for further details on how to use env_cubemap.
|-
| [[env_soundscape]] || Placed within a level to trigger different DSP (echo) effects and sound settings. See [[Soundscapes]] for further details on how to use env_soundscape.
|-
| [[func_clip_vphysics]] || Brush-based entity that is used to block grenades and physics objects.
|-
|}
 
==See Also==
* [[Navigation Meshes]]
* [[Bullet Penetration in Counter-Strike: Source]]
[[Category:Level Design]]
[[Category:Level Design]]
[[Category:Counter-Strike: Source]]

Latest revision as of 05:51, 12 July 2024