Skip to content

Custom Weapon Attributes

wootguy edited this page May 23, 2026 · 9 revisions

Weapon attributes define basic weapon/entity appearance and behaviors. Attributes are grouped into sections. Each section can appear only once in the config file unless stated otherwise.

[General]

This section is required to register the weapon.

Attribute Type Default Description
classname string "" Entity name for spawning the weapon as an entity or via the map CFG.
hl_client_classname string "" Replacement weapon given to players who don't have the SevenKewp client. Don't use aliases here (use weapon_9mmhandgun and weapon_9mmAR, not weapon_glock or weapon_mp5).
kill_feed_icon string "" Icon to use in the kill feed. This should be the classname of a Half-Life weapon similar to the one you're making ("weapon_357" to use the revolver icon). You can't use custom icons yet.
display_name string "" Descriptive name for the weapon. Used in text messages.
flags List of flags "" Valid flags:
dynamic_accuracy = Crosshair widens with movement and shrinks when crouched.
empty_idles = The last half of idles are used when the clip is empty.
exclusive_hold = Weapon must be dropped before switching to other weapons.
exhaustible = Remove the weapon when out of ammo.
force_zoom_sprite = Force use of zoom crosshair sprite when using dynamic crosshairs.
has_hand_models = Default model supports alternate hand models (op4/bshift).
hide_secondary_ammo = Hide secondary ammo on HUD.
hl_client_can_use = Allow the weapon to be used by vanilla HL clients without prediction. Not recommended for hitscan weapons.
keep_zoom_sprite_aspect = Zoom crosshair keeps its aspect ratio when stretched to fit the screen. Empty space is colored black.
link_chargeups = Primary and secondary chargeup state and events are shared (minigun behavior).
no_autoreload = Don't reload the weapon automatically.
no_autoswitch_empty = Don't switch to another weapon when out of ammo.
no_prediction = Disable client prediction entirely. This allows vanilla HL clients to use the weapon. Not recommended for hitscan weapons.
primary_priority = Primary fire has priority over secondary when both attack buttons are pressed.
select_on_empty = Allow selecting the weapon when empty.
strech_zoom_sprite = Zoom crosshair stretches to fit the screen.
unlink_cooldowns = Primary and secondary attacks cooldown independently.
use_only = Weapon is collected with the use key, not by touching.
v_model string "" Path to the firstperson view model.
p_model string "" Path to the thirdperson model.
p_model_akimbo string "" Path the thirdperson model which is used only when the weapon is in akimbo mode.
w_model string "" Path to the world model.
w_model_akimbo string "" Path to the world model which is used only when the weapon is in akimbo mode.
hud_folder string "" Path to the folder containing the HUD config. Don't include sprites/ nor a trailing slash.
slot integer 0 Weapon slot to place the weapon in.
slot_position integer -1 Position in the slot to place the weapon. -1 = Automatic.
weight integer 0 Importance for auto weapon switching. See here for the default weapon weights.
deploy_anim integer 0 Animation to play when deploying the weapon.
deploy_time time 0 Time before you can start shooting.
deploy_anim_time time 0 Time before an idle animation can play after deployment. This should match or exceed the duration of the animation.
thirdperson_anims string "" Thirdperson animation set to use. Valid values for Half-Life player models:
crowbar = Crowbar
trip = Tripmine / Medkit.
onehanded = Weak pistol.
python = Strong pistol.
shotgun = Shotgun.
gauss = Gauss / Tau cannon.
mp5 = MP5.
rpg = RPG.
egon = Gluon gun.
squeak = Snarks.
hive = Hornet gun.
bow = Crossbow.

Additional values for Sven Co-op player models:
wrench = Pipe wrench.
gren = Grenade.
bowscope = Zoomed crossbow.
minigun = Minigun.
uzis = Akimbo uzis.
m16 = M16.
sniper = Sniper rifle.
sniperscope = Zoomed sniper rifle.
saw = M249.

Half-Life player models use similar-looking animations when a Sven Co-op value is used.
thirdperson_anims_zoom string "" Animation set to use when zoomed in.
thirdperson_anims_akimbo string "" Animation set to use when akimbo mode is active.
move_speed float 1.00 Movement speed multiplier. Applied while the weapon is deployed.
jump_power integer 800 Upward velocity added from jumping while the weapon is deployed.

[ammo_primary] / [ammo_secondary]

Configures primary/secondary ammo.

Attribute Type Default Description
type string "" Name of a registered ammo type. Can be your own custom ammo type or one of the defaults.

Clone this wiki locally