Model entity/Generic Keyvalues, Inputs and Outputs/Keyvalues: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (fixed in h++)
(Added two missing closing braces where I think they were missing. Used more comments.)
Line 7: Line 7:
{{KV|end}}
{{KV|end}}


<includeonly><onlyinclude>{{#if:{{{new|}}}
<includeonly><onlyinclude><!--
|{{KV|new=1|model|string|src=BaseAnimating|World Model|The [[model]] this entity should appear as. 128-character limit.}}
 
-->{{#ifeq:{{{new|0}}}|0||
{{KV|new=1|model|string|src=BaseAnimating|World Model|The [[model]] this entity should appear as. 128-character limit.}}


{{KV|new=1|skin or ModelSkin {{as}}|int|src=BaseAnimating|[[Skin]]|value=0|nofgd={{{nofgd|}}}|Some models have multiple skins. This value selects from the index, starting with 0.}}
{{KV|new=1|skin or ModelSkin {{as}}|int|src=BaseAnimating|[[Skin]]|value=0|nofgd={{{nofgd|}}}|Some models have multiple skins. This value selects from the index, starting with 0.}}
Line 129: Line 131:
  ==================================================================
  ==================================================================


-->{{#if:{{{new|}}}||{{ScrollBox|title=BaseAnimating|noscroll={{{noscroll|}}}|
-->{{#ifeq:{{{new|0}}}|0|
{{ScrollBox|title=BaseAnimating|noscroll={{{noscroll|}}}|
{{KV|World Model|intn=model|string|The [[model]] this entity should appear as. 128-character limit.}}
{{KV|World Model|intn=model|string|The [[model]] this entity should appear as. 128-character limit.}}
{{KV|[[Skin]]|intn=skin or ModelSkin {{as}}|int|Some models have multiple skins. This value selects from the index, starting with 0.|nofgd={{{nofgd|}}}}}
{{KV|[[Skin]]|intn=skin or ModelSkin {{as}}|int|Some models have multiple skins. This value selects from the index, starting with 0.|nofgd={{{nofgd|}}}}}
Line 140: Line 143:
:*'''4''': Oriented Bounding Box, constrained to [[QAngle|Yaw]] only {{#if: {{{nofgd|}}}||{{Not in FGD}} }}
:*'''4''': Oriented Bounding Box, constrained to [[QAngle|Yaw]] only {{#if: {{{nofgd|}}}||{{Not in FGD}} }}
:*'''5''': Custom/Test (Usually no collision with anything) {{#if: {{{nofgd|}}}||{{Not in FGD}} }}
:*'''5''': Custom/Test (Usually no collision with anything) {{#if: {{{nofgd|}}}||{{Not in FGD}} }}
:*'''6''': [[VPhysics]]}}|nofgd={{{nofgd|}}}}}
:*'''6''': [[VPhysics]]}}|nofgd={{{nofgd|}}}
}}
{{KV|[[Hitbox]] Set|intn=hitboxset|string|Sets the {{Ent|$hboxset}} to use.|nofgd=1}}
{{KV|[[Hitbox]] Set|intn=hitboxset|string|Sets the {{Ent|$hboxset}} to use.|nofgd=1}}
{{KV|Body Group|intn=body or SetBodyGroup|int|Sets the the active {{Ent|$bodygroup}}.|nofgd=1}}
{{KV|Body Group|intn=body or SetBodyGroup|int|Sets the the active {{Ent|$bodygroup}}.|nofgd=1}}
Line 146: Line 150:
{{KV|Model Index|intn=modelindex|short|Given the number index from dumping the <code>cl_precacheinfo modelprecache</code> table, sets entity model to the index. {{ModernWarning|If an entity has animations that ''will be'' played, then the set model also must have its own sequences, else the game crashes.}}|nofgd=1}}
{{KV|Model Index|intn=modelindex|short|Given the number index from dumping the <code>cl_precacheinfo modelprecache</code> table, sets entity model to the index. {{ModernWarning|If an entity has animations that ''will be'' played, then the set model also must have its own sequences, else the game crashes.}}|nofgd=1}}
{{#if: {{{l4d|}}}{{{l4d2|}}}||{{KV|Model Scale|intn=modelscale|float|A multiplier for the size of the model. Negative values are accepted. Does not alter the physics collisions in most cases, however.{{ModernWarning|Negative or extremely high values can cause crashes!}}{{note|Scale may not appear in {{hammer4|2}}, but will appear in-game (tested in {{dods}}). This is fixed in {{hammer++|2}}.}}|since=EP2}}
{{#if: {{{l4d|}}}{{{l4d2|}}}||{{KV|Model Scale|intn=modelscale|float|A multiplier for the size of the model. Negative values are accepted. Does not alter the physics collisions in most cases, however.{{ModernWarning|Negative or extremely high values can cause crashes!}}{{note|Scale may not appear in {{hammer4|2}}, but will appear in-game (tested in {{dods}}). This is fixed in {{hammer++|2}}.}}|since=EP2}}
}}
{{#if: {{{base|}}} | {{KV DXLevelChoice}} }}
{{#if: {{{base|}}} | {{KV DXLevelChoice}} }}
<!--
<!--
Line 165: Line 170:
{{KV|FX Amount/Transparency (0–255)|intn=renderamt|int|Transparency amount, requires a Render Mode other than '''Normal'''. 0 is invisible, 255 is fully visible.|nofgd={{{nofgd|}}}}}
{{KV|FX Amount/Transparency (0–255)|intn=renderamt|int|Transparency amount, requires a Render Mode other than '''Normal'''. 0 is invisible, 255 is fully visible.|nofgd={{{nofgd|}}}}}
{{KV|Render Color (R G B)|intn=rendercolor|color255|Color tint.|nofgd={{{nofgd|}}}}}
{{KV|Render Color (R G B)|intn=rendercolor|color255|Color tint.|nofgd={{{nofgd|}}}}}
{{#if: {{{base|}}}|{{KV Render FX|l4d=b4}}|{{#if: {{{l4d|}}}{{{l4d2|}}}{{{as|}}}{{{portal2|}}} | {{kV Render FX|l4d=onlyafter}} | {{KV Render FX}} }} }}
{{#if: {{{base|}}}
| {{KV Render FX|l4d=b4}}
| {{#if: {{{l4d|}}}{{{l4d2|}}}{{{as|}}}{{{portal2|}}} | {{kV Render FX|l4d=onlyafter}} | {{KV Render FX}} }}
}}
{{KV|[[Render Mode]]|intn=rendermode|choices|Set a non-standard rendering mode on this entity.<!-- BREAK -->{{ExpandBox|
{{KV|[[Render Mode]]|intn=rendermode|choices|Set a non-standard rendering mode on this entity.<!-- BREAK -->{{ExpandBox|
:*'''0''': Normal
:*'''0''': Normal
Line 177: Line 185:
:*'''8''': Alpha Add {{#if: {{{nofgd|}}}||{{not in FGD}} }}
:*'''8''': Alpha Add {{#if: {{{nofgd|}}}||{{not in FGD}} }}
:*'''9''': World Space Glow
:*'''9''': World Space Glow
:*'''10''': Don't Render}}|nofgd={{{nofgd|}}}}}
:*'''10''': Don't Render}}|nofgd={{{nofgd|}}}
}}
<!--
<!--
   ++ Effects - Environment ++
   ++ Effects - Environment ++
Line 187: Line 196:
{{KV|Shadow Cast Distance|intn=shadowcastdist|int|Sets how far the entity casts dynamic shadows. 0 means default distance from the {{Ent|shadow_control}} entity.|nofgd={{{nofgd|}}}}}
{{KV|Shadow Cast Distance|intn=shadowcastdist|int|Sets how far the entity casts dynamic shadows. 0 means default distance from the {{Ent|shadow_control}} entity.|nofgd={{{nofgd|}}}}}
{{KV|Lighting Origin|intn=LightingOrigin|targetname|Select an entity (not {{Ent|info_lighting}}!) from which to sample lighting instead of the entity's [[origin]].|nofgd={{{nofgd|}}}}}
{{KV|Lighting Origin|intn=LightingOrigin|targetname|Select an entity (not {{Ent|info_lighting}}!) from which to sample lighting instead of the entity's [[origin]].|nofgd={{{nofgd|}}}}}
{{#if: {{{l4d|}}}{{{l4d2|}}}||{{KV|Lighting Origin Offset|intn=LightingOriginHack|targetname|The {{Ent|info_lighting_relative}} from which to sample lighting instead of the entity's origin. Use <tt>Lighting Origin</tt> instead.|not={{l4ds}}|nofgd=1|deprecated=1}} }}<!-- will show as long as neither l4d nor l4d2 are 1-->
{{#if: {{{l4d|}}}{{{l4d2|}}}||<!--
-->{{KV|Lighting Origin Offset|intn=LightingOriginHack|targetname|The {{Ent|info_lighting_relative}} from which to sample lighting instead of the entity's origin. Use <tt>Lighting Origin</tt> instead.|not={{l4ds}}|nofgd=1|deprecated=1}}
}}<!-- will show as long as neither l4d nor l4d2 are 1-->
{{#if: {{{l4d|}}}{{{l4d2|}}}{{{as|}}}{{{base|}}}|<!--will show as long as nothing other than portal2 is checked
{{#if: {{{l4d|}}}{{{l4d2|}}}{{{as|}}}{{{base|}}}|<!--will show as long as nothing other than portal2 is checked
-->|{{KV|Disable Flashlight|intn=disableflashlight|boolean|Used to disable [[env_projectedtexture|projected texture]] lighting and shadows on this entity. Identical to <tt>[[Effect flags|EF_NOFLASHLIGHT]]</tt>.|since=P2|nofgd={{{nofgd|}}}}}
-->|{{KV|Disable Flashlight|intn=disableflashlight|boolean|Used to disable [[env_projectedtexture|projected texture]] lighting and shadows on this entity. Identical to <tt>[[Effect flags|EF_NOFLASHLIGHT]]</tt>.|since=P2|nofgd={{{nofgd|}}}}}
Line 194: Line 205:
:*0: Default
:*0: Default
:*1: No cache—render every frame
:*1: No cache—render every frame
:*2: Cache it—render only once|since=P2|nofgd={{{nofgd|}}}}} }}
:*2: Cache it—render only once|since=P2|nofgd={{{nofgd|}}}}}
}}
<!--
<!--
   ++ Misc ++
   ++ Misc ++
Game-Specific Configs
Game-Specific Configs
-->
-->
{{#if: {{{base|}}}|<!--nothing if base is checked; following ifs don't need to check it
{{#if: {{{base|}}}||<!--nothing if base is checked; following ifs don't need to check it
-->|{{style|border-bottom:1px solid #3A3937;display:block;  color:white;font-size:16px;padding-bottom:6px|'''Miscellaneous'''}}
-->{{style|border-bottom:1px solid #3A3937;display:block;  color:white;font-size:16px;padding-bottom:6px|'''Miscellaneous'''}}<!--
{{#if: {{{l4d|}}}{{{as|}}}{{{portal2|}}} |<!--won't show if anything other than l4d2 is set, but WILL show if all are left blank-->| {{KV|Glow Backface Multiple|intn=glowbackfacemult|float|nofgd=1|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.|only={{l4d2}}}}
-->{{#if: {{{l4d|}}}{{{as|}}}{{{portal2|}}} ||<!--won't show if anything other than l4d2 is set, but WILL show if all are left blank--><!--
}}{{#if: {{{l4d|}}}{{{l4d2|}}}|<!--these two will show if none of the pre-AS ones are checked
  -->{{KV|Glow Backface Multiple|intn=glowbackfacemult|float|nofgd=1|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.|only={{l4d2}}}}<!--
-->|{{KV|Move Type|intn=MoveType|choices|Sets a movetype for this entity, which changes its movement behavior.<!-- BREAK -->{{ExpandBox|
-->}}<!--
 
-->{{#if: {{{l4d|}}}{{{l4d2|}}}||<!--these two will show if none of the pre-AS ones are checked
  -->{{KV|Move Type|intn=MoveType|choices|Sets a movetype for this entity, which changes its movement behavior.<!-- BREAK -->{{ExpandBox|
:*'''0''': None, don't move
:*'''0''': None, don't move
:*'''1''': Isometric
:*'''1''': Isometric
Line 216: Line 231:
:*'''10''': Spectator
:*'''10''': Spectator
:*'''11''': Custom}}
:*'''11''': Custom}}
|since={{as}}|nofgd=1}}
|since={{as}}|nofgd=1<!--
{{KV|Collision Group|intn=CollisionGroup|choices|Sets a collision group for this entity, which changes its collision behavior.<!-- BREAK -->{{ExpandBox|
  -->}}<!--
 
  -->{{KV|Collision Group|intn=CollisionGroup|choices|Sets a collision group for this entity, which changes its collision behavior.<!-- BREAK -->{{ExpandBox|
:*'''0''': None
:*'''0''': None
:*'''1''': Debris, collides only with the world and static props
:*'''1''': Debris, collides only with the world and static props
Line 237: Line 254:
:*'''17''': NPC Actor, NPCs ignore the player
:*'''17''': NPC Actor, NPCs ignore the player
:*'''18''': NPC Scripted, NPCs do not collide with each other}}
:*'''18''': NPC Scripted, NPCs do not collide with each other}}
|since={{as}}|nofgd=1}}
|since={{as}}|nofgd=1<!--
}}{{#if: {{{l4d|}}}{{{l4d2|}}}{{{as|}}}|<!--will show as long as nothing other than portal2 is checked
  -->}}<!--
-->|{{KV|No Animation Sounds|intn=SuppressAnimSounds|boolean|Silences sounds linked to animations.|since=P2|nofgd=1}} }}
-->}}<!-- ENF #IF L4D/L4D2
{{#if: {{{l4d|}}}{{{l4d2|}}}{{{as|}}}{{{portal2|}}}|<!--will only show if none are checked-->|{{KV DXLevelChoice}} }}
-->{{#if: {{{l4d|}}}{{{l4d2|}}}{{{as|}}}||<!--will show as long as nothing other than portal2 is checked
{{KV SystemLevelChoice|nofgd={{{nofgd|}}}}} }} }} }}</onlyinclude></includeonly>
  -->{{KV|No Animation Sounds|intn=SuppressAnimSounds|boolean|Silences sounds linked to animations.|since=P2|nofgd=1}}<!--
-->}}<!--
-->{{#if: {{{l4d|}}}{{{l4d2|}}}{{{as|}}}{{{portal2|}}}|<!--will only show if none are checked-->|{{KV DXLevelChoice}} }}<!--
-->{{KV SystemLevelChoice|nofgd={{{nofgd|}}}}}<!--
 
-->}}<!-- END #IF base
-->}}<!-- END ScrollBox
-->}}<!-- END #IFEQ new == 0
 
--></onlyinclude></includeonly>

Revision as of 08:43, 8 September 2023

English (en)Translate (Translate)
English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Icon-translate.png Available doc translations
Info.png
The Model entity/Generic Keyvalues, Inputs and Outputs/Keyvalues/doc documentation page does not exist.
English documentation will be displayed instead, which you can translate using Google Translate (or similar software). If there is nothing after this message, most likely the documentation does not exist even in English.
Model entity/Generic Keyvalues, Inputs and Outputs/Keyvalues/doc

Tests

start ([todo internal name (i)])
Note.pngNote:Content moved to Rendering and studio model related KIO/Keyvalues for continuation of page history
end ([todo internal name (i)])