Npc citizen: Difference between revisions
Jump to navigation
Jump to search
(Fixed.) |
m (→Keyvalues: Btw Ted = Ted Backman lololololol. (It's true! He's everywhere!)) |
||
Line 142: | Line 142: | ||
| models/humans/group01/male_01.mdl || Male 1 || Van. Black wearing a blue suit. | | models/humans/group01/male_01.mdl || Male 1 || Van. Black wearing a blue suit. | ||
|- | |- | ||
| models/humans/group01/male_02.mdl || Male 2 || | | models/humans/group01/male_02.mdl || Male 2 || Ted. Caucasian wearing a white jacket. | ||
|- | |- | ||
| models/humans/group01/male_03.mdl || Male 3 || Joe. Black wearing a blue suit. | | models/humans/group01/male_03.mdl || Male 3 || Joe. Black wearing a blue suit. | ||
|- | |- | ||
| models/humans/group01/male_07.mdl || Male 4 || | | models/humans/group01/male_07.mdl || Male 4 || Mike. Caucasian wearing a blue suit. | ||
|- | |- | ||
| models/humans/group01/male_08.mdl || Male 5 || Vance. Caucasian wearing a white jacket. Old. | | models/humans/group01/male_08.mdl || Male 5 || Vance. Caucasian wearing a white jacket. Old. | ||
|- | |- | ||
| models/humans/group01/male_09.mdl || Male 6 || | | models/humans/group01/male_09.mdl || Male 6 || Erdim. Caucasian wearing a blue suit. | ||
|- | |- | ||
| models/humans/group01/female_01.mdl || Female 1 || | | models/humans/group01/female_01.mdl || Female 1 || Joey. Caucasian wearing a blue suit. | ||
|- | |- | ||
| models/humans/group01/female_02.mdl || Female 2 || | | models/humans/group01/female_02.mdl || Female 2 || Kanisha. Caucasian wearing a white jacket. | ||
|- | |- | ||
| models/humans/group01/female_03.mdl || Female 3 || Kim. Black wearing a blue suit. Has a red scarf in-game - cyan if she's a medic. | | models/humans/group01/female_03.mdl || Female 3 || Kim. Black wearing a blue suit. Has a red scarf in-game - cyan if she's a medic. | ||
Line 160: | Line 160: | ||
| models/humans/group01/female_04.mdl || Female 4 || Chau. Asian wearing a white jacket. | | models/humans/group01/female_04.mdl || Female 4 || Chau. Asian wearing a white jacket. | ||
|- | |- | ||
| models/humans/group01/female_06.mdl || Female 5 || | | models/humans/group01/female_06.mdl || Female 5 || Naomi. Caucasian wearing a blue suit. | ||
|- | |- | ||
| models/humans/group01/female_07.mdl || Female 6 || | | models/humans/group01/female_07.mdl || Female 6 || Lakeetra. Black wearing a white jacket. | ||
|- | |- | ||
| models/humans/group01/male_cheaple.mdl || Cheaple Male 1 || Low-detail caucasian wearing a blue suit. Only works if ''Type'' is set to ''Default'' or ''Downtrodden''. (Otherwise you will just get the "ERROR" model.) | | models/humans/group01/male_cheaple.mdl || Cheaple Male 1 || Low-detail caucasian wearing a blue suit. Only works if ''Type'' is set to ''Default'' or ''Downtrodden''. (Otherwise you will just get the "ERROR" model.) |
Revision as of 14:36, 10 September 2008
Entity description
The downtrodden citizens of City 17.
- For code see
src/game/server/hl2/npc_citizen17.cpp
Dedicated CVars
- ai_citizen_debug_commander (Default: 1)
- <boolean>
- g_ai_citizen_show_enemy (Default: 0)
- <boolean>
- npc_citizen_auto_player_squad (Default: 1)
- <boolean>
- npc_citizen_auto_player_squad_allow_use (Default: 0)
- <boolean>
- npc_citizen_explosive_resist (Default: 0)
- <boolean>
- npc_citizen_insignia (Default: 0)
- <boolean>
- npc_citizen_squad_marker (Default: 0)
- <boolean>
- sk_citizen_giveammo_player_delay (Default: 10.0)
- <float> The amount of time between ammo assistances.
- sk_citizen_heal_ally (Default: 30)
- <integer>
- sk_citizen_heal_ally_delay (Default: 20.0)
- <float> The amount of time between medical assistances.
- sk_citizen_heal_player (Default: 35)
- <integer>
- sk_citizen_heal_player_delay (Default: 25.0)
- <float> The amount of time between medical assistances.
- sk_citizen_heal_player_min_forced (Default: 10)
- <integer>
- sk_citizen_heal_player_min_pct (Default: 0.60)
- <float>
- sk_citizen_health (Default: 40)
- <integer> A citizen's spawn health.
- sk_citizen_player_stare_dist (Default: 72.0)
- <float>
- sk_citizen_player_stare_time (Default: 1.0)
- <float>
- sk_citizen_stare_heal_time (Default: 5.0)
- <float>
Keyvalues
- additionalequipment
- <choices> Weapons - Allows any weapon
- Pick one that is made to function for NPCs
Literal Value Description weapon_smg1 SMG1 weapon_ar2 AR2 weapon_stunstick Stun Stick weapon_crowbar Crow Bar weapon_shotgun Shotgun weapon_beerbottle Beer bottle (Not coded - Don't use) weapon_beerbottle2 Beer bottle2 (Not coded - Don't use) weapon_rpg RPG 0 Nothing
- Ammo To Resupply
- <choices> Ammo to Resupply (if spawnflag set)
Literal Value Description Pistol Pistol SMG1 SMG1 SMG1_Grenade SMG1 Grenade AR2 AR2 Buckshot Shotgun RPG_Round RPG Grenade Grenade XBowBolt Crossbow Bolt
- Amount Of Ammo To Give
- <integer> This is the amount of ammo the NPC has, to give to the player
- citizentype
- <choices>
Literal Value Description Outfit 0 Default The normal blue civil outfit. This is the same as Downtrodden, but with default for the basic entity. 1 Downtrodden The normal blue civil outfit. 2 Refugee A somewhat torn civil outfit, either blue or white. (See model entry below.) 3 Rebel The rebel outfit. 4 Unique The normal blue civil outfit. This can be used if you edit a Citizen to look different, or to be an enemy of a sort.
- This variable affects the model used in-game. See Model entry below.
- Expression Type
- <choices>
Literal Value Description 0 Random 1 Scared 2 Normal 3 Angry
- Model
- <string/choices>
Literal Value Description Details models/humans/group01/male_01.mdl Male 1 Van. Black wearing a blue suit. models/humans/group01/male_02.mdl Male 2 Ted. Caucasian wearing a white jacket. models/humans/group01/male_03.mdl Male 3 Joe. Black wearing a blue suit. models/humans/group01/male_07.mdl Male 4 Mike. Caucasian wearing a blue suit. models/humans/group01/male_08.mdl Male 5 Vance. Caucasian wearing a white jacket. Old. models/humans/group01/male_09.mdl Male 6 Erdim. Caucasian wearing a blue suit. models/humans/group01/female_01.mdl Female 1 Joey. Caucasian wearing a blue suit. models/humans/group01/female_02.mdl Female 2 Kanisha. Caucasian wearing a white jacket. models/humans/group01/female_03.mdl Female 3 Kim. Black wearing a blue suit. Has a red scarf in-game - cyan if she's a medic. models/humans/group01/female_04.mdl Female 4 Chau. Asian wearing a white jacket. models/humans/group01/female_06.mdl Female 5 Naomi. Caucasian wearing a blue suit. models/humans/group01/female_07.mdl Female 6 Lakeetra. Black wearing a white jacket. models/humans/group01/male_cheaple.mdl Cheaple Male 1 Low-detail caucasian wearing a blue suit. Only works if Type is set to Default or Downtrodden. (Otherwise you will just get the "ERROR" model.) models/odessa.mdl Odessa. DO NOT USE. Colonel Cubbage. Only works if Type is set to Unique. (Otherwise you will just get "ERROR" in-game.)
- If citizentype is set to 1 (Downtrodden), these are the models used. Other values cause the equivalent models from models/humans/group02/ (for 2 - Refugee) and models/humans/group03/ (for 3 - Rebel) to be used. The clothing changes appear only in-game, and not in Hammer.
- Clothing descriptions apply for group02 only.
- If the Medic flag is set and the citizentype (Type) is set to 3 (Rebel), the equivalent models from models/humans/group03m/ are used.
- If you set model to something else than the default model value ( eg. Male 02), to something like (models/alyx.mdl) and disable random faces in flags, you can override the model inside the game. Note: you might need to set type to unique.
- Expression Override
- <string> Facial expression override
- Fire Output When Nav Is Blocked?
- <boolean> Set keyvalue to either Yes or No
- <boolean> A permanent squad member cannot leave the player's squad unless killed or explicity removed by entity I/O. Only use this if you're sure you want to override the default AI.
- <string> If you want your citizens to squad with the player but not obey commands the player gives to move the squad, put a concept here and this citizen will speak the concept instead of obeying the order.
Flags
- 65536 : Follow player on spawn
- 131072 : Medic
- 262144 : Random Head
- 524288 : Ammo Resupplier
- 1048576 : Not Commandable
- 2097152 : Don't use speech semaphore. Template:Ep1 add
- 4194304 : Random male head
- 8388608 : Random female head
- 16777216 : Use RenderBox in ActBusies.
- This makes the collision hull surround the model rather than using the human hull. It's more computationally expensive, but necessary when ActBusies involve close proximity to other props/geometry or animate the citizens in a more dynamic way.
Inputs
- TalkNPC:
- SpeakResponseConcept <string > (in all games since
)
- Speak the specified response concept immediately.
BaseNPC inputs
CAI_BaseNPC:
- ActivateSpeedModifier !FGD
- DisableSpeedModifier !FGD
- Break
- Smash into pieces. If this is not possible, disappear.
- BecomeRagdoll (in all games since
)
- Remove itself and instantly become a ragdoll with zero force (just go limp). OnDeath, etc. outputs will NOT be fired.
- ForceInteractionWithNPC <string> <string> (in all games since
)
- Force the NPC to use a dynamic interaction with another NPC. Syntax is <targetname> <dynamic interaction>.
- ForgetEntity <targetname >
- Clears out the NPC's knowledge of a named entity.
- UpdateEnemyMemory (in all games since
)
- Update (or create) this NPC's memory of of the given entity.
- GagEnable
- GagDisable
- Gagged NPCs won't speak (or moan, caw, etc.) unless made to be a choreographed scene.
- HolsterWeapon (in all games since
)
- UnholsterWeapon (in all games since
)
- Force the NPC to holster or unholster their weapon. Ignored if the NPC is scripting or if the NPC doesn't use weapons.
- HolsterAndDestroyWeapon (in all games since
)
- Same as
HolsterWeapon
, except the weapon is destroyed once it has been concealed.
- IgnoreDangerSounds <float >
- Ignore danger sounds for the specified number of seconds.
- InsideTransition !FGD
- OutsideTransition !FGD
- SetBodyGroup <integer >
- HACK: Sets this NPC's body group (from 0–n).
- SetEnemyFilter <string >
- SetHealth <integer >
- Set the NPC's health.
- SetRelationship <string|targetname or classname> <string|disposition> <int|rank>
- 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
: HateD_FR
: FearD_LI
: LikeD_NU
: Neutral
- SetSquad <string >
- Change the name of this NPC's squad. Leaving the parameter blank will remove the NPC from any existing squad.
- 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 +Use, don't idle speak or respond to other NPCs' idle speech, and so on.
- Wake
- Wakes up the NPC if it is sleeping.
CBaseCombatCharacter:
- KilledNPC !FGD
- Tells the entity it killed something. Despite the name, this can include a player. This input will be automatically sent by the victim when they die.
- physdamagescale <float >
- Scales damage energy when this character is hit by a physics object. With a value of 0 the NPC will take no damage from physics.
DamageFilter:
- PlayerCompanion:
- OutsideTransition (in all games since
)
- Use this input to teleport the NPC to a hint node with the "Player Squad Transition Point" hint type.
- EnableAlwaysTransition (in all games since
)
- DisableAlwaysTransition (in all games since
)
- If enabled, this NPC will always teleport to a Player Squad Transition Point even if they're not within the trigger_transition.
- MakeGameEndAlly (in all games since
)
- MakeRegularAlly (in all games since
)
- Determines whether the game should end if this character dies.
- EnableWeaponPickup (in all games since
)
- DisableWeaponPickup (in all games since
)
- Enables/disables weapon pickup.
- SetExpressionOverride <string>
- Set facial expression override
- StartPatrolling
- Patrol whenever I'm idle or alert.
- StopPatrolling
- Stop patrolling when I'm idle or alert.
- SetCommandable
- Make a previously uncommandable citizen commandable
- SetMedicOn
- Set the medic flag on. Will not change the model or skin of the citizen.
- SetMedicOff
- Set the medic flag off. Will not change the model or skin of the citizen.
- SetAmmoResupplierOn
- Set the ammo-resupplier flag on. Will not change the model or skin of the citizen.
- SetAmmoResupplierOff
- Set the ammo-resupplier flag off. Will not change the model or skin of the citizen.
- SetReadinessLow
- Set readiness to calmest state (Bored)
- SetReadinessMedium
- Set readiness to moderate (Alert)
- SetReadinessHigh
- Set readiness to highest. (Combat imminent)
- LockReadiness <float>
- Lock readiness at current setting for x seconds -1 = forever, 0 = unlock now
- GiveWeapon <classname>
- Gives the NPC the specified weapon - excluded from FGD
- SpeakIdleResponse
- Forces the NPC to speak an idle response - excluded from FGD
- Remove from player squad, instantly.
- Set readiness to panic state (Special)
Outputs
- OnJoinedPlayerSquad
- Fires when joins player squad
- OnLeftPlayerSquad
- Fires when leaves player squad (doesn't include death or deletion)
- OnFollowOrder
- Fires when ordered to follow player
- OnStationOrder
- Fires when ordered to a location by player
- OnPlayerUse
- Fires when a player +USEs the citizen. Template:Plact
- OnNavFailBlocked
- Fires when this Citizen's movement fails because he/she is blocked by a dynamic object.