Citizen, UM
npc_pic01_t.png
The master of disguise.
Health 40
First Found… N/A

Description Convars Keyvalues Flags Inputs Outputs Other NPCs

Description

npc_um_citizen ("unique model citizen") is the entity name for a easily customizable citizen clone. The clone has been stripped of dialogue and its default model can be easily changed through the console. In all other respects, it takes after npc_citizen by following your move orders, swapping out weapons, etc.

Don't expect all models to work smoothly with this NPC. If it uses a zombie model for instance, none of the movement sounds will play.

Convars

  • um_citizen_model <string> ( Default: models/Humans/Group01/Male_01.mdl )
    Sets the model used by npc_um_citizen.

Companion NPC:

  • npc_citizen_auto_player_squad <boolean> ( Default: 1 )
    When disabled, companion NPCs will not automatically join the player's squad.
  • npc_citizen_auto_player_squad_allow_use <boolean> ( Default: 0 )
    When enabled, companion NPCs will leave/join the player's squad if the player "uses" them.
  • npc_citizen_explosive_resist <boolean> ( Default: 0 )
    When enabled and a companion is killed by an explosive, the rest of the squad's NPCs will temporarily gain a 50% resistance to explosive damage.
  • npc_citizen_insignia <boolean> ( Default: 0 )
    When enabled, NPCs that have joined the player's squad will don a chef hat. If the model (models/chefhat.mdl ) is not precached, a crash is possible.

(top)

  • sk_citizen_giveammo_player_delay <float> ( Default: 10 )
    Sets how often in seconds that ammo suppliers are willing to give the player ammo.
  • sk_citizen_heal_ally <integer> ( Default: 30 )
    Sets the amount of healing medics do for their squadmates with each kit.
  • sk_citizen_heal_ally_delay <float> ( Default: 20 )
    Sets how often in seconds that medics are willing to give out medical kits to their squadmates.
  • sk_citizen_heal_ally_min_pct <float> ( Default: 0.9 )
    If a squadmate's health percentage is not at least this low, don't bother healing them.

(top)

  • sk_citizen_heal_player <integer> ( Default: 25 )
    Sets the amount of healing medics do for the player with each kit.
  • sk_citizen_heal_player_delay <float> ( Default: 25 )
    Sets how often in seconds that medics are willing to give out medical kits to the player.
  • sk_citizen_heal_player_min_forced <integer> ( Default: 10 )
    If the player "uses" a medic and the player's health is not at least this low, don't bother healing them.
  • sk_citizen_heal_player_min_pct <float> ( Default: 0.6 )
    If the player's health percentage is not at least this low, don't bother healing them.

(top)

  • sk_citizen_player_stare_dist <float> ( Default: 72 )
    The max distance the NPC can be from the player to feel they're being stared at. If they're a medic, they'll figure the player wants health and will check how badly the player is wounded.
  • sk_citizen_player_stare_time <float> ( Default: 1 )
    Similar to the above, but sets how long in seconds the player must stare to tip off the medic.
  • sk_citizen_stare_heal_time <float> ( Default: 5 )
    Sets how often in seconds that medics are willing to heal a staring player.
  • player_squad_autosummon_time <float> ( Default: 5 )
    Sets how long in seconds that the player's squad will stay at a command spot, before attempting to regroup with the player.

(top)

  • player_squad_autosummon_time_after_combat <float> ( Default: 8 )
    Sets how long in seconds after combat before the player's squad attempts to regroup with the player.
  • player_squad_autosummon_move_tolerance <integer> ( Default: 20 )
    Sets how far the squad is willing to move away from the player when commanded to do so.
  • player_squad_autosummon_player_tolerance <integer> ( Default: 10 )
    If the player comes within this distance of a command spot, their squad will attempt to regroup with the player.

(top)

Keyvalues

Companion NPC:

  • AdditionalEquipment <classname>
    Sets the NPC's starting weapon. An example would be weapon_smg1, the MP7.
  • AmmoAmount <integer>
    Sets the amount of ammo the NPC carries for the player, for if the NPC is set as an ammo supplier.
  • AmmoSupply <classname>
    Sets the type of ammo the NPC carries for others.
  • DontPickUpWeapons <boolean>
    If this key is enabled, the NPC will not pick up weapons they've found. This includes trading their current weapon for a more desirable one.
  • ExpressionType <see below>
    Sets the NPC's expression, if they are capable of them.

    0 : Random.
    1 : Scared.
    2 : Normal.
    3 : Angry.
  • NotifyNavFailBlocked <boolean>
    If this key is enabled and the NPC cannot navigate to an ordered location, fire the OnNavFailBlocked output.

Default NPC:

  • target <targetname>
    Upon spawning, NPC will move to the location of this path_corner.
  • targetname <string>
    Assigns the NPC a targetname, used by other entities to refer to the NPC. Can be shared by other entities.
  • squadname <string>
    Assigns NPC to a squad. NPCs with the same squad will report targets to the group and cover each other.

(top)

  • hintgroup <string>
    Gives NPC the name of a hint node group. The NPC will ignore other hint nodes in the map that do not share this group name.
  • hintlimiting <boolean>
    Limits NPC to using the above hint group for navigation requests, but does not limit local navigation.
  • sleepstate <see below]
    Used to set the NPC into stasis and under what conditions it will wake up.

    0 : Awake.
    1 : Wait for a threat. Once found, wake up.
    2 : Wait for PVS.
    3 : Wait for an input.

(top)

  • wakeradius <float>
    The NPC will wake from its sleep if the player comes within this distance.
  • wakesquad <boolean>
    Toggles whether this NPC's squad mates will wake up along with him.
  • lightingoriginhack <targetname>
    Uses an info_lighting_relative to specify a location to sample lighting from, instead of using the NPC's origin.

(top)

  • physdamagescale <float>
    Multiplies damage taken by this NPC when hit with physics objects. 0 will make the NPC immune to this damage.
  • rendermode <0-7, 9, 10>
    Changes how the NPC is rendered in-game. See Render Modes.
  • renderamt <byte>
    The FX amount used by the above rendering mode.

(top)

  • rendercolor <RGB>
    The FX color used by the above rendering mode.
  • disablereceiveshadows <boolean>
    Prevents the NPC from having shadows cast on it.
  • model <string>
    Changes the NPC's model path (ex. models\player\player.mdl).

Flags

Except where noted, flags are OFF by default.

  • 65536 : The NPC will seek out and follow the player upon spawning.
  • 131072 : The NPC will act as a medic to nearby friendlies.
  • 524288 : The NPC will supply ammo to nearby friendlies. Does not work if the AmmoSupply keyvalue is not set.
  • 1048576 : The NPC cannot join the player's squad and is not commandable.

Default NPC:

  • 1 : NPC is inactive until seen.
  • 2 : NPC is muted until it's angry.
  • 4 : NPC falls to ground instead of teleporting to ground. (Default: ON)
  • 8 : NPC drops a health kit (or battery) upon death.
  • 16 : NPC doesn't acquire enemies or avoid obstacles.
  • 128 : NPC is inactive until called by a script.
  • 256 : NPC uses long-range behavior. Sees and shoots farther than normal.
  • 512 : NPC's corpse fades.
  • 1024 : NPC will think outside of their PVS.
  • 2048 : NPC is set up as a template and won't spawn until called by a template maker.
  • 4096 : NPC uses alternate collision (player avoidance).
  • 8192 : NPC doesn't drop weapons upon death.
  • 16384 : NPC won't budge from the player's pushing.

Inputs

Companion NPC:

  • RemoveFromPlayerSquad
    Removes the NPC from the player's squad.
  • StartPatrolling
    Makes the NPC start randomly patrolling the area.
  • StopPatrolling
    Stops the NPC's patrolling behavior.
  • GiveWeapon <classname>
    Gives the NPC the specified weapon.

(top)

  • SetCommandable
    Forces the NPC to be commandable by the player.
  • SetMedicOn
    Sets the NPC to act as a medic to nearby friendlies.
  • SetMedicOff
    Stops the NPC from acting as a medic.
  • SetAmmoResupplierOn
    Sets the NPC to give ammo to friendlies. Won't work if AmmoSupply isn't set.

(top)

  • SetAmmoResupplierOff
    Stops the NPC from acting as an ammo carrier.
  • OutsideTransition
  • SetReadinessLow
    The NPC will act as if the area holds little or no danger, as they do by default. The NPC will be upright with their weapon unshouldered and held across their chest.
  • SetReadinessMedium
    The NPC will act as if the area may be dangerous, such as when they hear shots. The NPC will be upright with their weapon unshouldered and facing out.

(top)

  • SetReadinessHigh
    The NPC will act as if they're in direct danger, such as when they've seen an enemy. The NPC will be hunched over with their weapon shouldered (if possible) and facing out.
  • LockReadiness <float>
    The NPC's current state of readiness is locked in for a number of seconds. A value of -1 will lock it forever.
  • GiveWeapon <classname>
    Gives the NPC the specified weapon.
  • EnableWeaponPickup
    The NPC can swap out or pick up weapons as they normally would.

(top)

  • DisableWeaponPickup
    The NPC cannot pick up other weapons even if they don't have one.
  • SetExpressionOverride
  • SetHealth <integer>
    Sets the health of the NPC.
  • SetSquad <string>
    Sets the squad of the NPC.

(top)

  • Use
    The NPC acts as if the player has "used" them.
  • AddContext <key>:<value>
    Adds to the entity's list of response contexts. See Response System.
  • RemoveContext
    Remove a context from this entity's list. The name should match the key of an existing context.
  • ClearContext
    Removes all contexts from this entity's list.

(top)


Default NPC:

  • SetRelationship <targetname> <disposition> <rank (integer)>
    Changes whether this NPC likes or dislikes certain others. Used like the ai_relationship entity, with this NPC as the subject. Values for disposition are:

    D_HT : Hate the target.
    D_FR : Fear the target.
    D_LI : Treat the target as a friend.
    D_NU : Treat the target as a neutral party.
  • SetHealth <integer>
    Set the NPC's health to this value.
  • physdamagescale <float>
    Scales the damage taken by this NPC when hit with physics objects. 0 will make the NPC immune to this damage.
  • Ignite
    Makes the NPC burst into flames.

(top)

  • Break
    Smash this NPC into pieces. If not possible, just delete it.
  • Kill
    Deletes the NPC.
  • KillHierarchy
    Deletes the NPC along with any children it may have.
  • StartScripting
    StopScripting
    Enter/exit scripting state, where NPCs ignore a variety of stimulus that would make them break out of their scripts. They ignore danger sounds, ignore the player's Use, don't speak idly or respond to other NPC's idle speech, and so on.

(top)

  • Assault <targetname>
    Start an assault at the given rally point.
  • SetSquad <string>
    Change the name of this NPC's squad. Leaving the parameter blank will remove the NPC from any existing squad.
  • Wake
    Wakes up the NPC if it is sleeping.
  • ForgetEntity <targetname>
    Clears out the NPC's knowledge of a named entity.

(top)

  • GagEnable
    GagDisable
    Gagged NPCs won't speak (or moan, caw, etc.) unless made to during a choreographed scene.
  • IgnoreDangerSounds <float>
    Ignore danger sounds for the specified number of seconds.
  • HolsterWeapon
    UnholsterWeapon
    Force the NPC to holster or unholster their weapon. Ignored if the NPC is scripting or if the NPC doesn't use weapons.
  • HolsterAndDestroyWeapon
    Same as HolsterWeapon, except the weapon is destroyed once it has been concealed.

(top)

  • AddOutput <key> <value> OR <output name> <entity>: <input>: <parameter>: <delay>: <fire only once?>
    Evaluates a keyvalue/output on this entity. Not guaranteed to work and can cause problems so handle with care.
  • Color <RGB> (Default: 255 255 255)
    Set the overall color of the NPC.
  • Alpha <byte>
    Sets the transparency of the NPC.
  • SetDamageFilter <targetname>
    Sets the damage filter this NPC will use. If no name is given, it's forced to use no filter at all.

(top)

  • AddContext <key>: <value>
    Adds to the entity's list of response contexts.
  • RemoveContext <string>
    Remove a context from this NPC's list. The name should match the key of an existing context.
  • ClearContext
    Removes all contexts from this NPC's list.
  • EnableShadow
    DisableShadow
    Toggles the NPC's shadow.

(top)

Outputs

Companion NPC:

  • OnJoinedPlayerSquad
    Fires when the NPC joins the player's squad.
  • OnLeftPlayerSquad
    Fires when the NPC has left the player's squad.
  • OnFollowOrder
    Fires when the player orders the NPC to follow them.
  • OnStationOrder
    Fires when the player orders the NPC to move somewhere.
  • OnPlayerUse
    Fires when a player "uses" the NPC.
  • OnNavFailBlocked
    Fires when this NPC's movement fails because he/she is blocked by a dynamic object.
  • OnWeaponPickup
    Fires when this NPC has picked up a weapon.

Default NPC:

  • OnDamaged
    Fired when this NPC takes damage. (!activator is the damage inflicter).
  • OnDeath
    Fired when this NPC is killed. (!activator is the killer).
  • OnHalfHealth
    Fired when this NPC reaches half of its maximum health.
  • OnHearWorld
    Fired when this NPC hears a sound (other than combat or the player).

(top)

  • OnHearPlayer
    Fired when this NPC hears the player.
  • OnHearCombat
    Fired when this NPC hears combat sounds such as shots or bomb explosions.
  • OnFoundEnemy <targetname>
    Fired when this NPC establishes line of sight to its enemy.
  • OnLostEnemyLOS
    Fired when this NPC loses line of sight to its enemy.

(top)

  • OnLostEnemy
    Fired when this NPC loses its enemy. Usually due to the enemy being killed/removed, or because this NPC has selected another target.
  • OnFoundPlayer <targetname>
    Fired when this NPC establishes line of sight to its enemy, and that enemy is a player.
  • OnLostPlayerLOS
    Fired when this NPC loses line of sight to its enemy, and that enemy is a player.
  • OnLostPlayer
    Fired when this NPC loses its enemy, and that enemy was a player. Usually due to the enemy being killed/removed, or because this NPC has selected another target.

(top)

  • OnDamagedByPlayer
    Fired when this NPC is hurt by a player (!activator is the attacker or vehicle driver (if friendly fire).
  • OnDamagedByPlayerSquad
    Fired when this NPC is hurt by a player OR by one of the player's squad mates (!activator is the attacker or vehicle driver (if friendly fire).
  • OnDenyCommanderUse
    Fired when this NPC has refused to join the player's squad.
  • OnWake
    Fired when this NPC comes out of a sleep state.

(top)



SMOD NPCs

Friendlies

     Citizen, Medic  •  Citizen, UM  •  Combine, Cmp.  •  Kleiner, Cmp.  •  Monk, Cmp.  •  Crossbow Turret, Frn.  •  Floor Turret, Frn.  •  Laser Turret, Frn.  •  Rocket Turret, Frn.

Hostiles

     Combine, Ace  •  Combine, Cloaked  •  Combine, Elite  •  Combine, Prison Guard  •  Houndeye  •  Kamikaze Crab  •  K Scanner  •  Laser Turret  •  Rocket Turret  •  Zombie V2

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License