Generic Keyvalues, Inputs and Outputs/Keyvalues: Difference between revisions
Jump to navigation
Jump to search
(csgo was missing the l4d2 kvs for some reason) |
(Re-added 'Classname' and 'Flags', but under !FGD; Added !FGD to certain 'Collisions' choices, Moved 'Parent' above 'Global Entity Name'; Replaced check for {{csgo}} with a check to look for {{base}} instead) |
||
Line 9: | Line 9: | ||
:{{note|To translate a brush's size in Hammer to these keys, first divide the size value shown in Hammer by 2. Then, apply the result to the<code>maxs</code>key, and invert the number (Multiply / Divide by -1) and apply it for the<code>mins</code>key.}} | :{{note|To translate a brush's size in Hammer to these keys, first divide the size value shown in Hammer by 2. Then, apply the result to the<code>maxs</code>key, and invert the number (Multiply / Divide by -1) and apply it for the<code>mins</code>key.}} | ||
:{{note|If collisions is already set, it must be set back to Bounding Box (solid 2).}} | :{{note|If collisions is already set, it must be set back to Bounding Box (solid 2).}} | ||
{{KV|Collisions|intn=solid|choices|Method of collision for this entity. | {{KV|Collisions|intn=solid|choices|Method of collision for this entity. | ||
:*0: None | :*0: None | ||
:*1: BSP ([[QPhysics]]) | :*1: BSP ([[QPhysics]]) {{bug|In {{p2}}, if an entity using QPhysics collisions is hit by [[Gel]], the game will crash!}} {{Not in FGD}} | ||
:*2: [[Bounding box|Bounding Box]] | :*2: [[Bounding box|Bounding Box]] | ||
:*3: [[Bounding box|Oriented Bounding Box]] (Use for runtime spawned rotated brush entities) | :*3: [[Bounding box|Oriented Bounding Box]] (Use for runtime spawned rotated brush entities) {{Not in FGD}} | ||
:*4: [[Bounding box|Oriented Bounding Box]], constrained to [[QAngle|Yaw]] only | :*4: [[Bounding box|Oriented Bounding Box]], constrained to [[QAngle|Yaw]] only {{Not in FGD}} | ||
:*5: Custom/Test (Usually no collision with anything) | :*5: Custom/Test (Usually no collision with anything) {{Not in FGD}} | ||
:*6: [[VPhysics]] | :*6: [[VPhysics]] | ||
| }} | |||
<!-- We should make a new page for "model index"? --> | <!-- We should make a new page for "model index"? --> | ||
{{KV|Model Index|intn=modelindex|short|Given the number index from dumping the<code>cl_precacheinfo modelprecache</code>table, sets entity model to of the index. {{warning|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 of the index. {{warning|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}} | ||
Line 25: | Line 26: | ||
{{minititle|Base}} | {{minititle|Base}} | ||
{{KV|[[targetname|Name]]|intn=targetname|string|The name that other entities refer to this entity by.}} | {{KV|[[targetname|Name]]|intn=targetname|string|The name that other entities refer to this entity by.}} | ||
{{KV|[[Parent]]|intn=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 {{ent|trigger_transition}}. Some entities which aren't intended to be parented may not function correctly. {{ent|phys_constraint}} can be used as a workaround to parenting.}} | |||
{{KV|Global Entity Name|intn=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.}} | {{KV|Global Entity Name|intn=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.}} | ||
{{KV|[[Origin]] (X Y Z)|intn=origin|coordinates|The position of this entity's center in the world. Rotating entities typically rotate around their origin.{{note|While this can override positions of where some entities spawn at, Hammer does not move the entities accordingly.}}}} | {{KV|[[Origin]] (X Y Z)|intn=origin|coordinates|The position of this entity's center in the world. Rotating entities typically rotate around their origin.{{note|While this can override positions of where some entities spawn at, Hammer does not move the entities accordingly.}}}} | ||
{{KV|[[Pitch Yaw Roll]] (X Y Z)|intn=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|This works on brush entities, although Hammer doesn't show the new angles.}}}} | {{KV|[[Pitch Yaw Roll]] (X Y Z)|intn=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|This works on brush entities, although Hammer doesn't show the new angles.}}}} | ||
{{KV|[[ResponseContext|Response Contexts]]|intn=ResponseContext|string|Pre-defined response system contexts; Format is <code>key:value,key:value,...</code>and so on. Can also be [[filter_activator_context|filtered for or against]].}} | {{KV|[[ResponseContext|Response Contexts]]|intn=ResponseContext|string|Pre-defined response system contexts; Format is <code>key:value,key:value,...</code>and so on. Can also be [[filter_activator_context|filtered for or against]].}} | ||
{{KV|[[Classname]]|intn=classname|string|The classname defines the type of entity. Classnames can be changed using{{ent|AddOutput}}input, which may influence how the engine deals with the entity in certain circumstances.|nofgd=1}} | |||
{{KV|[[Flag|Flags]]|intn=spawnflags|integer|Toggles exclusive features of an entity, its specific number is determined by the combination of flags added.|nofgd=1}} | |||
{{KV|[[Effect flags|Effects]]|intn=effects|int|Combination of effect flags to use.|nofgd=1}} | {{KV|[[Effect flags|Effects]]|intn=effects|int|Combination of effect flags to use.|nofgd=1}} | ||
<!-- I'm not sure what the use cases of these 2 are, so ill hide them for now. Not too much of a harm to show "hammerid" for the plugin / sourcepawn peeps | <!-- I'm not sure what the use cases of these 2 are, so ill hide them for now. Not too much of a harm to show "hammerid" for the plugin / sourcepawn peeps | ||
Line 47: | Line 47: | ||
{{KV|[[Lag Compensation]]|intn=LagCompensate|boolean|Set to '''Yes''' to lag compensate this entity. Should be used very sparingly!|nofgd=1|since=L4D2}} | {{KV|[[Lag Compensation]]|intn=LagCompensate|boolean|Set to '''Yes''' to lag compensate this entity. Should be used very sparingly!|nofgd=1|since=L4D2}} | ||
{{KV|Disable for Xbox 360|intn=disableX360|bool|If this entity should automatically be given the 'Disable' input on the Xbox 360 version of Source.|nofgd=1|since=L4D2}} | {{KV|Disable for Xbox 360|intn=disableX360|bool|If this entity should automatically be given the 'Disable' input on the Xbox 360 version of Source.|nofgd=1|since=L4D2}} | ||
| <!-- ELSE IF: CSGO | | <!-- ELSE IF: NOT BASE [CSGO] -->{{#if:{{{base|}}}|| | ||
{{KV|Entity Scripts|intn=vscripts|scriptlist|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.|since=L4D2}} | {{KV|Entity Scripts|intn=vscripts|scriptlist|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.|since=L4D2}} | ||
{{KV|Script think function|intn=thinkfunction|string|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.|since=L4D2}} | {{KV|Script think function|intn=thinkfunction|string|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.|since=L4D2}} | ||
Line 59: | Line 53: | ||
{{KV|Disable for Xbox 360|intn=disableX360|bool|If this entity should automatically be given the 'Disable' input on the Xbox 360 version of Source.|nofgd=1|since=L4D2}} | {{KV|Disable for Xbox 360|intn=disableX360|bool|If this entity should automatically be given the 'Disable' input on the Xbox 360 version of Source.|nofgd=1|since=L4D2}} | ||
{{KV|Is Automatic-Aim Target|intn=is_autoaim_target|bool|If set to 1, this entity will slow down aiming movement for consoles and joystick controllers when the entity is under the crosshairs.|nofgd=1|since=CSGO}} | {{KV|Is Automatic-Aim Target|intn=is_autoaim_target|bool|If set to 1, this entity will slow down aiming movement for consoles and joystick controllers when the entity is under the crosshairs.|nofgd=1|since=CSGO}} | ||
| | | }} }}</includeonly> | ||
<noinclude> | <noinclude> | ||
{{documentation}} | {{documentation}} | ||
<!-- Add categories to the /doc subpage, not here --> | <!-- Add categories to the /doc subpage, not here --> | ||
</noinclude> | </noinclude> |