Difference between revisions of "Template:KV WeaponSpawnSingle"

From Valve Developer Community
Jump to: navigation, search
(Updated KV Template)
m (Model warning conditional field added, cause well, it doesn't apply to all ents)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{ScrollBox|title=WeaponSpawnSingle|noscroll=1|
 
{{ScrollBox|title=WeaponSpawnSingle|noscroll=1|
{{KV|Weapon Skin|integer|Some weapons have multiple versions of their textures, called skins. Set this to a number other than -1 to make the given weapon use that skin instead of the default.}}
+
{{KV|Weapon Skin|integer|intn=weapon_skin|Some weapons have multiple versions of their textures, called skins. Set this to a number other than -1 to make the given weapon use that skin instead of the default.}}
{{KV|Glow Range|float|Set a custom glow range for this spawner. 0 means use the default range.}}
+
{{KV|Glow Range|float|intn=glowrange|Set a custom glow range for this spawner. 0 means use the default range.}}
{{KV|Collisions|choices|Collision box type.}}
+
{{KV|Collisions|choices|intn=solid|Collision box type.}}
 
:* 0 : Not Solid
 
:* 0 : Not Solid
 
:* 2 : Use Bounding Box
 
:* 2 : Use Bounding Box
 
:* 6 : Use VPhysics
 
:* 6 : Use VPhysics
{{KV Parentname}}
+
{{#if:{{{optionalscavenge|}}}|{{Fl WeaponSpawnOptionalScavenge}}}}
{{KV Global}}
+
{{#if:{{{modelwarning|}}}|{{todo|The model set doesn't update in Hammer, requiring a workaround. But this entity does inherit {{ent|CBaseAnimating}}. ''Can we edit its CBaseAnimating keys in Hammer without any issues?''}}}}
{{KV Targetname}}
+
{{KV BaseAnimating|l4d2=1}}
{{KV Angles}}
+
{{KV BaseEntity|l4d2=1}}
{{KV Studiomodel}}
 
 
}}<noinclude>
 
}}<noinclude>
 
[[Category:Keyvalue Templates|WeaponSpawnSingle]]
 
[[Category:Keyvalue Templates|WeaponSpawnSingle]]
 
</noinclude>
 
</noinclude>

Latest revision as of 11:09, 22 March 2021

WeaponSpawnSingle:

Weapon Skin (weapon_skin) <integer>
Some weapons have multiple versions of their textures, called skins. Set this to a number other than -1 to make the given weapon use that skin instead of the default.
Glow Range (glowrange) <float>
Set a custom glow range for this spawner. 0 means use the default range.
Collisions (solid) <choices>
Collision box type.
  • 0 : Not Solid
  • 2 : Use Bounding Box
  • 6 : Use VPhysics


Model:

World Model (model) <string>
The model this entity should appear as. 128-character limit.
Skin (skin or ModelSkin <Alien Swarm>) <integer>
Some models have multiple skins. This value selects from the index, starting with 0.
Collisions (solid) <choices>
Method of collision for this entity.
Hitbox Set (hitboxset) <string> !FGD
Sets the $hboxset to use.
Body Group (body or SetBodyGroup) <integer> !FGD
Sets the the active $bodygroup.
Model Index (modelindex) <short> !FGD
Changes the entity's model to a precached model on the map.
Warning.png Warning: Using an invalid value will instantly crash the game, this includes 0 and 1.
Model Scale (modelscale) <float> (in all games since <Half-Life 2: Episode Two><Half-Life 2: Episode Two>) (not in [Portal] <Left 4 Dead> <Left 4 Dead 2> <Source><Source>) !FGD <Obsolete>
Deprecated. A multiplier for the size of the model. Negative values are accepted. Does not alter the physics collisions in most cases, however.
Warning.png Warning: Negative or extremely high values can cause crashes!

Animating

Sequence (sequence) <integer> !FGD
Default animation sequence for the model to be playing after spawning.
Playback Rate (playbackrate) <float> !FGD
A multiplier of the framerate at which animations are played, negative values are accepted. Default is 1.0
Cycle (cycle) <float> !FGD
The current frame of the currently playing animation, on a range from 0-1.
Texture Frame (texframeindex) <integer> !FGD
The frame number for any animated textures on this entity.

Effects - Render

Start Fade Distance (fademindist) <float>
Distance at which the entity starts fading. If 0 or less, the entity will disappear instantly when end fade is hit. The value will scale appropriately if the entity is in a 3D Skybox.
End Fade Distance (fademaxdist) <float>
Distance at which the entity ends fading. If 0 or less, the entity won't disappear at all. The value will scale appropriately if the entity is in a 3D Skybox.
Fade Scale (fadescale) <float>
If specified in the worldspawn, or if the engine is running below DirectX 8, entities will fade out even if the fade distances above aren't specified. This value gives more control over when this happens: numbers smaller than 1 cause the entity to fade out at further distances, and greater than 1 cause it to fade out at closer distances. Using 0 turns off the forced fade altogether. See also $noforcedfade.
Render Mode (rendermode) <choices>
Set a non-standard rendering mode on this entity.


Render FX / Transparency (0 - 255) (renderamt) <integer>
Transparency amount, requires a Render Mode other than Normal. 0 is invisible, 255 is fully visible.
Render Color (R G B) (rendercolor) <color255>
Color tint.
Render FX (renderfx) <choices>
Preset pattern of appearance effects.

Effects - Environment

Disable Shadows (disableshadows) <boolean>
Prevent the entity from creating cheap render-to-texture shadows. Does not affect shadow mapping.
Disable Receiving Shadows (disablereceiveshadows) <boolean>
Prevent the entity from receiving shadows on itself.
Shadow Cast Distance (shadowcastdist) <integer>
Sets how far the entity casts dynamic shadows. 0 means default distance from the shadow_control entity.
Note.png Note: Further research needed for this key, as inconsistencies like unavailability for prop_dynamic in <Source><Source> exists.
Lighting Origin (LightingOrigin) <targetname>
Select an entity (notinfo_lightingentity!) from which to sample lighting instead of the entity's origin.
Lighting Origin Offset (LightingOriginHack) <targetname> (not in <Left 4 Dead> <Left 4 Dead 2>) !FGD <Obsolete>
Deprecated. Theinfo_lighting_relativefrom which to sample lighting instead of the entity's origin.

Miscellaneous

SystemLevelChoice (in all games since <Left 4 Dead>) :

Minimum Effect Details Level (mincpulevel) <choices> (in all games since <Left 4 Dead>)
Effect Details level of a user's lower than this will not render this entity.
Maximum Effect Details Level (maxcpulevel) <choices> (in all games since <Left 4 Dead>)
Effect Details level of a user's higher than this will not render this entity.
  • 0: Default ("Low" formincpulevel, "High" formaxcpulevel)
  • 1: Low
  • 2: Medium
  • 3: High
Note.png Note: The commandcpu_levelrelates to Effect Details, thus the keys's names.
Minimum Shader Details Level (mingpulevel) <choices> (in all games since <Left 4 Dead>)
Shader Details levels (orgpu_levelcommand) lower than this will not render this object.
Maximum Shader Details Level (maxgpulevel) <choices> (in all games since <Left 4 Dead>)
Shader Details levels (orgpu_levelcommand) higher than this will not render this object.
  • 0: Default ("Low" formingpulevel, "Very High" formaxgpulevel)
  • 1: Low
  • 2: Medium
  • 3: High
  • 4: Very High
Note.png Note: The commandgpu_levelrelates to Shader Details, thus the keys's names.
Glow Backface Multiple (glowbackfacemult) <float> (in all games since <Left 4 Dead 2>) !FGD
If this object has a glow effect, multiply the effect by this much on the sides of the object that are facing away from the viewer.


Base:

Classname (classname) <string>
The classname defines the type of entity. Classnames can be changed using AddOutput, which will influence how the engine deals with the entity in certain circumstances.
Name (targetname) <string>
The name that other entities refer to this entity by.
Global Entity Name (globalname) <string>
Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.
Parent (parentname) <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma. Every entity can be parented, even point entities. Entities which are parented will be forced to transition to the next map, such as from a trigger_transition. Some entities which aren't intended to be parented may not function correctly. phys_constraint can be used as a workaround to parenting.
Origin (X Y Z) (origin) <coordinates>
The position of this entity's center in the world. Rotating entities typically rotate around their origin.
Pitch Yaw Roll (X Y Z) (angles) <angle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
Note.png Note: This works on brush entities, although Hammer doesn't show the new angles.
Flags (spawnflags) <integer>
Toggles features of an entity, its specific number is determined by the combination of flags added.
Response Contexts (ResponseContext) <string>
Pre-defined response system contexts for this entity. Format is key:value,key:value,.... Contexts may be filtered.
Effects (effects) <integer> !FGD
Combination of effect flags to use.
Hammer ID (hammerid) <integer> !FGD
The entity's Hammer ID. Mainly used by plugins and debugging commands, such as ent_keyvalue. Entities spawned at run-time are not assigned any Hammer ID.
Entity Scripts (vscripts) <scriptlist> (in all games since <Left 4 Dead 2>)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Script think function (thinkfunction) <string> (in all games since <Left 4 Dead 2>)
Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call. Try to avoid expensive operations in this function, as it may cause performance problems.
Lag Compensation (LagCompensate) <boolean> (in all games since <Left 4 Dead 2>) !FGD
Set to Yes to lag compensate this entity. Should be used very sparingly!
Disable for Xbox 360 (disableX360) <boolean> (in all games since <Left 4 Dead 2>) !FGD
If this entity should automatically be given the 'Disable' input on the Xbox 360 version of Source.