User:Nescius/sandbox/test9: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Blanked the page)
Tag: Blanking
 
Line 1: Line 1:
{{tabs|CBaseAnimating|goldsrc=1|source=1|main=source}}
{{CD|CBaseAnimating|file1=[https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/baseanimating.cpp baseanimating.cpp]}}
{{seealso|[[:Category:CBaseAnimating]]}}


'''<code>CBaseAnimating</code>''' is the C++ class from which all entities with [[model]]s inherit, even if they don't actually move.
This category also covers '''<code>CBaseAnimatingOverlay</code>''', which provides animation blending.
{{important|Following Keyvalues / Inputs / Outputs are available for all entities that inherit this class, but may be overwritten by game code.}}
== Keyvalues ==
{{User:Nescius/sandbox/test8|World Model|intn=model|string|The [[model]] this entity should appear as. 128-character limit.}}
{{User:Nescius/sandbox/test8|[[Skin]]|intn=skin or ModelSkin {{as}}|int|Some models have multiple skins. This value selects from the index, starting with 0.}}
{{User:Nescius/sandbox/test8|Collisions|intn=solid|choices|Method of collision for this entity.<!--
-->{{Expand|title=Choices|margin_left=2em|
:*'''0''': None
:*'''1''': BSP ([[QPhysics]])
{{Bug|In {{portal2|4}}, if an entity using QPhysics collisions is hit by [[Gel]], the game will crash!}}
:*'''2''': [[Bounding box|Bounding Box]]
:*'''3''': Oriented Bounding Box (Use for runtime spawned rotated brush entities)
:*'''4''': Oriented Bounding Box, constrained to [[QAngle|Yaw]] only
:*'''5''': Custom/Test (Usually no collision with anything)
:*'''6''': [[VPhysics]]}}
}}
{{User:Nescius/sandbox/test8|[[Hitbox]] Set|intn=hitboxset|string|Sets the {{Ent|$hboxset}} to use.|nofgd=1}}
{{User:Nescius/sandbox/test8|Body Group|intn=body or SetBodyGroup|int|Sets the the active {{Ent|$bodygroup}}.|nofgd=1}}
<!-- We should make a new page for "model index"? -->
{{User:Nescius/sandbox/test8|Model Index|intn=modelindex|short|Given the number index from dumping the <code>cl_precacheinfo modelprecache</code> table, sets entity model to 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}}
{{User:Nescius/sandbox/test8|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.{{warning|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}}
<!--
  ++ Animating ++
-->
{{style|color:white;font-size:14px;padding-bottom:5px|'''Animating'''}}
{{User:Nescius/sandbox/test8|Sequence|intn=sequence|int|Default animation sequence for the model to be playing after spawning.|nofgd=1}}
{{User:Nescius/sandbox/test8|Playback Rate|intn=playbackrate|float|A multiplier of the [[framerate]] at which animations are played, negative values are accepted. Default is 1.0.|nofgd=1}}
{{User:Nescius/sandbox/test8|Cycle|intn=cycle|float|The current frame of the current animation, on a range from 0-1.|nofgd=1}}
{{User:Nescius/sandbox/test8|Texture Frame|intn=texframeindex|int|The initial frame number for all animated textures on this entity.|nofgd=1}}
<!--
  ++ Effects - Render ++
-->
{{style|border-bottom:1px solid #3A3937;display:block;  color:white;font-size:16px;padding-bottom:6px|'''Effects - Render'''}}
{{User:Nescius/sandbox/test8|Start Fade Distance|intn=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]].}}
{{User:Nescius/sandbox/test8|End Fade Distance|intn=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.}}
{{User:Nescius/sandbox/test8|Fade Scale|intn=fadescale|float|If specified in the {{Ent|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 {{Ent|$noforcedfade}}.}}
{{User:Nescius/sandbox/test8|FX Amount/Transparency (0–255)|intn=renderamt|int|Transparency amount, requires a Render Mode other than '''Normal'''. 0 is invisible, 255 is fully visible.}}
{{User:Nescius/sandbox/test8|Render Color (R G B)|intn=rendercolor|color255|Color tint.}}
{{User:Nescius/sandbox/test8|Render FX|intn=renderfx|choices|Various somewhat legacy alpha effects.}}
{{Expand|title=Render Effects|margin_left=2em|
{{bug|Alpha effects from 0 to 10 are unavailable due to the bug in code in {{csgo|4.1}}}}
:*'''0:''' None
:*'''1:''' Slow Pulse (varies alpha by ±16 over a period of 1.5 s)
:*'''2:''' Fast Pulse (varies alpha by ±16 over a period of 0.4 s)
:*'''3:''' Slow Wide Pulse (varies alpha by ±64 over a period of 1.5 s)
:*'''4:''' Fast Wide Pulse (varies alpha by ±64 over a period of 0.4 s)
{{#switch: {{{l4d}}}
|b4=:*'''5:''' Slow Fade Away (decreases alpha by -1 per frame/{{l4d|since}} Fades out over 4 s)
<!---->:*'''6:''' Fast Fade Away (decreases alpha by -4 per frame/{{l4d|since}} Fades out over 1 s)
<!---->:*'''7:''' Slow Become Solid (increases alpha by +1 per frame/{{l4d|since}} Fades in over 4 s)
<!---->:*'''8:''' Fast Become Solid (increases alpha by +4 per frame)
|onlyafter=:*'''5:''' Slow Fade Away (Fades out over 4 s)
<!---->:*'''6:''' Fast Fade Away (Fades out over 1 s)
<!---->:*'''7:''' Slow Become Solid (Fades in over 4 s)
<!---->:*'''8:''' Fast Become Solid (Fades in over 1 s)
|:*'''5:''' Slow Fade Away (decreases alpha by -1 per frame/{{l4d|since}} Fades out over 4 s)
<!---->:*'''6:''' Fast Fade Away (decreases alpha by -4 per frame/{{l4d|since}} Fades out over 1 s)
<!---->:*'''7:''' Slow Become Solid (increases alpha by +1 per frame/{{l4d|since}} Fades in over 4 s)
<!---->:*'''8:''' Fast Become Solid (increases alpha by +4 per frame/{{l4d|since}} Fades in over 1 s) }}
:*'''9:''' Slow Strobe (transparent 0.8 s, visible 0.8 s, repeat)
:*'''10:''' Fast Strobe (transparent 0.2 s, visible 0.2 s, repeat)
:*'''11:''' Faster Strobe (transparent 0.09 s, visible 0.09 s, repeat)
:*'''12:''' Slow Flicker (transparent 0.18 s, visible 1.5 s, repeat)
:*'''13:''' Fast Flicker (transparent 0.14 s, visible 0.2 s, repeat)
:*'''14:''' Constant Glow ("NoDissipation;" purpose uncertain—for sprites?) {{csgo|not}}
{{#switch: {{{l4d}}}
|b4=:*'''15:''' Distort (causes unnatural flickering and position shifting)
<!---->:*'''16:''' Fade In (instant; not very useful outside of code)
<!---->:*'''17:''' Scale Up ("Explode"/"scale up really big!" causes wild stretching of model parts) {{src13|in}} {{confirm|which branches/games is it available in, and where does it do what?}}
|onlyafter=:*'''15:''' Fade Out (instant; not very useful outside of code)
<!---->:*'''16:''' Hologram (Distort + "distance fade")
<!---->:*'''17:''' Fade Wider Pulse (varies alpha by ±255 over a period over a period of 0.26 s) {{confirm|which branches/games is it available in, and where does it do what?}}
|:*'''15:''' Distort (causes unnatural flickering and position shifting)/{{l4d|since}} Fade Out (instant; not very useful outside of code)
<!---->:*'''16:''' Hologram (Distort + "distance fade")/{{l4d|since}} Fade In (instant; not very useful outside of code)
<!---->:*'''17:''' Scale Up ("Explode"/"scale up really big!" causes wild stretching of model parts) {{src13|in}}/Fade Wider Pulse (varies alpha by ±255 over a period over a period of 0.26 s) {{l4d|since}} {{confirm|which branches/games is it available in, and where does it do what?}} }}
:*'''18:''' Glow Shell (purpose unclear) {{#ifeq: {{{l4d}}}|onlyafter||{{src13|since}} {{csgo|not}} }} {{confirm|what does this do? and which games is it in?}}
:*'''19:''' Clamp Minimum Scale ("keep this sprite from getting very small (SPRITES only!)") {{csgo|not}}
{{#ifeq: {{{l4d}}}|onlyafter||:*'''20:''' Environmental Rain ("for [[Render Modes#Environmental|environmental rendermode]], make rain") {{src13|in}} {{csgo|not}} {{confirm|which games? may be nonfunctional.}}
:*'''21:''' Environmental Snow ("for [[Render Modes#Environmental|environmental rendermode]], make snow") {{src13|in}} {{csgo|not}} {{confirm|which games? may be nonfunctional.}}
:*'''22:''' Spotlight FX ("TEST CODE for experimental spotlight") {{src13|in}} {{csgo|not}}
:*'''23:''' Ragdoll ("HACKHACK: TEST CODE for signalling death of a ragdoll character;" ragdolls an entity but doesn't kill it) {{src13|in}} {{csgo|not}} {{confirm|which games? may be nonfunctional?}}
:*'''24:''' Fade Wider Pulse (varies alpha by ±255 over a period over a period of 0.26 s) {{src13|in}} {{csgo|not}} }}
{{#switch: {{{l4d}}}
|b4=:*'''25:''' <code>kRenderFXMax</code>/Fade Near
:::{{Todo|what does this do? may be nonfunctional}}
|onlyafter=|:*'''25:''' <code>kRenderFXMax</code>/Fade Near {{l4d|removed}} {{csgo|not}}
:::{{Todo|what does this do? may be nonfunctional}} }}}}
{{User:Nescius/sandbox/test8|[[Render Mode]]|intn=rendermode|choices|Set a non-standard rendering mode on this entity.|nofgd=}}
{{Expand|title=Render Modes|margin_left=2em|
:*0: Normal
:*1: Color
:*2: Texture
:*3: Glow
:*4: Solid/Alphatest {{obs}}
:*5: Additive
:*6: Removed, does nothing {{obs}}
:*7: Additive Fractional Frame
:*8: Alpha Add
:*9: World Space Glow
:*10: Don't Render}}
<!--
  ++ Effects - Environment ++
-->
{{style|border-bottom:1px solid #3A3937;display:block;  color:white;font-size:16px;padding-bottom:6px|'''Effects - Environment'''}}
{{User:Nescius/sandbox/test8|Disable Shadows|intn=disableshadows|boolean|Prevent the entity from creating cheap render-to-texture shadows. Does not affect [[shadow mapping]].}}
{{User:Nescius/sandbox/test8|Disable Receiving Shadows|intn=disablereceiveshadows|boolean|Prevent the entity from receiving shadows on itself.}}
{{User:Nescius/sandbox/test8|Shadow Cast Distance|intn=shadowcastdist|int|Sets how far the entity casts dynamic shadows. 0 means default distance from the {{Ent|shadow_control}} entity.}}
{{User:Nescius/sandbox/test8|Lighting Origin|intn=LightingOrigin|targetname|Select an entity (not {{Ent|info_lighting}}!) from which to sample lighting instead of the entity's [[origin]].}}
{{User:Nescius/sandbox/test8|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}}
{{User:Nescius/sandbox/test8|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}}
{{User:Nescius/sandbox/test8|Disable ShadowDepth|intn=disableshadowdepth|boolean|Makes this entity not cast a shadow from {{Ent|env_projectedtexture}} entities. Identical to <tt>[[Effect flags|EF_NOSHADOWDEPTH]]</tt>.|since=P2}}
{{User:Nescius/sandbox/test8|Projected Texture Cache|intn=shadowdepthnocache|choices|Used to hint [[env_projectedtexture|projected texture system]] whether it is sufficient to cache shadow volume of this entity or to force render it every frame instead. Identical to<code>[[Effect flags|EF_SHADOWDEPTH_NOCACHE]]</code>.
:*0: Default
:*1: No cache—render every frame
:*2: Cache it—render only once|since=P2}}
<!--
  ++ Misc ++
Game-Specific Configs
-->
{{style|border-bottom:1px solid #3A3937;display:block;  color:white;font-size:16px;padding-bottom:6px|'''Miscellaneous'''}}
{{User:Nescius/sandbox/test8|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}}}}
{{User:Nescius/sandbox/test8|Move Type|intn=MoveType|choices|Sets a movetype for this entity, which changes its movement behavior.<!-- BREAK -->
{{Expand|title=Move Types|margin_left=2em|
:*'''0''': None, don't move
:*'''1''': Isometric
:*'''2''': Walk, player only, moving on ground
:*'''3''': NPC, movement
:*'''4''': Fly, no gravity
:*'''5''': Fly, with gravity
:*'''6''': Physics
:*'''7''': Push
:*'''8''': [[Noclip]]
:*'''9''': Ladder, for players on ladders
:*'''10''': Spectator
:*'''11''': Custom}}
|since={{as}}|nofgd=1}}
{{User:Nescius/sandbox/test8|Collision Group|intn=CollisionGroup|choices|Sets a collision group for this entity, which changes its collision behavior.<!-- BREAK -->
{{Expand|title=Groups|margin_left=2em|
:*'''0''': None
:*'''1''': Debris, collides only with the world and static props
:*'''2''': Debris, with trigger interaction
:*'''3''': Interactive Debris, doesn't collide with other debris
:*'''4''': Interactive, collides with everything except debris
:*'''5''': Player
:*'''6''': Breakable Glass
:*'''7''': Vehicle
:*'''8''': Player Movement
:*'''9''': In-Vehicle
:*'''10''': Weapon
:*'''11''': Vehicle Clip
:*'''12''': Projectile
:*'''13''': Door blocker, not permitted to go near doors
:*'''14''': Passable Door
:*'''15''': Dissolving
:*'''16''': Pushaway
:*'''17''': NPC Actor, NPCs ignore the player
:*'''18''': NPC Scripted, NPCs do not collide with each other}}
|since={{as}}|nofgd=1}}
{{User:Nescius/sandbox/test8|No Animation Sounds|intn=SuppressAnimSounds|boolean|Silences sounds linked to animations.|since=P2|nofgd=1}}
{{minititle|DXLevelChoice}}
{{User:Nescius/sandbox/test8|Minimum / Maximum DX Level|intn=mindxlevel / maxdxlevel|choices|The entity will not exist if the engine is running outside the given range of [[DirectX Versions]].
{{Expand|title=Choices|margin_left=2em|
{{warning|If these are used, the object may break when the user switches their DirectX settings.}}
:* 0 - Default (no bounding)
:* [[DirectX_Versions#DirectX_6|60 - DirectX 6]] ({{!fgd}} for {{mono|mindxlevel}})
:* [[DirectX_Versions#DirectX_7|70 - DirectX 7]]
:* [[DirectX_Versions#DirectX_8.0|80 - DirectX 8]] (Geforce4 Ti 4600) <!-- from fgd -->
:* [[DirectX_Versions#DirectX_8.1|81 - DirectX 8.1]] (GeForce FX 5200) <!-- from fgd -->
:* [[DirectX_Versions#DirectX_9_.28Shader_Model_2.29|90 - DirectX 9 Shader Model 2]]
:* [[OpenGL#Dxlevel_92|92 - OpenGL equivalent to DirectX 9 Shader Model 2]] (using [[ToGL]]; {{Linux}}{{MacOS}} only) {{!fgd}}
:* [[DirectX_Versions#DX9_Shader_Model_3|95 - DirectX 9 Shader Model 3]] and [[DXVK]]
:* [[DirectX_Versions#DX9Ex|98 - DX9Ex]] ({{x360}} only) {{!fgd}}
}}|removed={{l4d}}}}
{{minititle|SystemLevelChoice}}
{{User:Nescius/sandbox/test8|Minimum / Maximum Effect Details Level|intn=mincpulevel / maxcpulevel|choices|Don't render for players with Effect Details levels that exceed the minimum or maximum.{{inline note|name=[[file:note.png|10px|link=]]Key names are related to '''<code>cpu_level</code>''' cvar used by Effect Details.|color=#e6e9be}}
{{Expand|title=Choices|margin_left=2em|
:*'''0''': Default ("Low" for<code>mincpulevel</code>, "High" for<code>maxcpulevel</code>)
:*'''1''': Low
:*'''2''': Medium
:*'''3''': High}}
|since={{l4d}}|nofgd=}}
{{User:Nescius/sandbox/test8|Minimum / Maximum Shader Details Level|intn=mingpulevel / maxgpulevel|choices|Don't render for players with Shader Details levels that exceed the minimum or maximum.{{inline note|name=[[file:note.png|10px|link=]]Key names are related to '''<code>gpu_level</code>''' cvar used by Shader Details.|color=#e6e9be}}
{{Expand|title=Choices|margin_left=2em|
:*'''0''': Default ("Low" for<code>mingpulevel</code>, "Very High" for<code>maxgpulevel</code>)
:*'''1''': Low
:*'''2''': Medium
:*'''3''': High
:*'''4''': Very High}}|since={{l4d}}|nofgd=}}
== Inputs ==
{{User:Nescius/sandbox/test7|skin|param=int|Selects a [[skin]] from the model's index, starting with 0.}}
{{User:Nescius/sandbox/test7|SetBodyGroup|param=int|Sets the the active {{ent|$bodygroup}}.}}
{{User:Nescius/sandbox/test7|Ignite|Makes the entity catch on fire indefinitely.}}
{{User:Nescius/sandbox/test7|IgniteLifetime|param=float|Makes the entity catch on fire for a given amount of time.}}
{{User:Nescius/sandbox/test7|IgniteNumHitboxFires|param=int|Makes the entity catch on fire with a given number of [[hitbox]] fire particles. Does not function correctly in {{l4d2}} onward.|removed={{l4d2}}}}
{{User:Nescius/sandbox/test7|IgniteHitboxFireScale|param=float|Makes the entity catch on fire with a given scale for [[hitbox]] fire particles. Does not function correctly in {{l4d2}} onward.|removed={{l4d2}}}}
{{User:Nescius/sandbox/test7|BecomeRagdoll|Kills the entity and creates a client-side ragdoll from the model. Input is only passed if the model contains {{ent|$collisionjoints}}. For other models, {{ent|phys_convert}} can be used instead.}}
{{User:Nescius/sandbox/test7|SetLightingOrigin|param=targetname|Sets the entity's lighting origin to use this entity's position.}}
{{User:Nescius/sandbox/test7|SetLightingOriginHack|param=targetname|Offsets the entity's lighting origin by their distance from an {{ent|info_lighting_relative}}. Use <code>SetLightingOrigin</code> instead.|deprecated=1|removed={{l4d}}}}
{{User:Nescius/sandbox/test7|fademindist|param=float|Sets distance at which the entity starts fading. If <0, the entity will disappear instantly when end fade is hit. The value will scale appropriately if the entity is in a [[3D Skybox]].}}
{{User:Nescius/sandbox/test7|fademaxdist|param=float|Sets distance at which the entity ends fading. If <0, the entity won't disappear at all. The value will scale appropriately if the entity is in a [[3D Skybox]].}}
{{User:Nescius/sandbox/test7|SetModelScale|param=vector|only={{src13}}|Multiplies the size of the model. Does not alter the physics collisions in most cases. Can take two values separated by a space, in which case the first value would be the target model scale and the second value would be the number of seconds the change in scale will be spread over. If there is no second value, the model will scale instantly.{{tip|The <code>modelscale</code> keyvalue can be [[AddOutput]]ed as a workaround for other games with this input missing.}}
{{warning|Negative or extremely high values can cause crashes!}}}}
{{User:Nescius/sandbox/test7|SetCycle|param=float|Skip to a specific point in the current animation.|only={{tf2}}}}
{{User:Nescius/sandbox/test7|SetModel|param=string|Changes the model to the specified path. Form of <tt>models/ammo/ammo_us.mdl</tt>.
{{important|Absolutely NO quotes! Make sure you use the forward slash '/'. [[Merasmus]] says to heed this advice, else thou shalt corrupt the VMF.}}|only={{tf2}}}}
{{User:Nescius/sandbox/test7|SetPlayBackRate|param=float|Change the animation speed multiplier.}}
{{User:Nescius/sandbox/test7|Alpha|param=int|Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its '''[[Render Mode]] (rendermode)''' set to a number other than <tt>0</tt>.}}
{{User:Nescius/sandbox/test7|AlternativeSorting|param=bool|Swaps the rendering order of the entity. Used to attempt to fix sorting problems when rendering, for example an object rendering in front of translucent materials.}}
{{User:Nescius/sandbox/test7|Color|param=color255|Sets an RGB color for the entity.}}
{{User:Nescius/sandbox/test7|SetDamageFilter|param=targetname|Sets a [[filter]] for this entity for when it receives damage.}}
{{User:Nescius/sandbox/test7|EnableDamageForces|Allows the entity to be pushed by damage done to it (usually force amount correlates with the damage done).}}
{{User:Nescius/sandbox/test7|DisableDamageForces|Prevents the entity from being pushed by damage done to it.}}
{{minititle|Reflection}}
{{User:Nescius/sandbox/test7|DisableDrawInFastReflection|Turns off rendering of this entity in reflections when using <code>$reflectonlymarkedentities</code> in water material.|since=P2}}
{{User:Nescius/sandbox/test7|EnableDrawInFastReflection|Turn on rendering of this entity in reflections when using <code>$reflectonlymarkedentities</code> in water material.|since=P2}}
{{minititle|Shadow}}
{{User:Nescius/sandbox/test7|DisableShadow|Turn [[Lighting#Dynamic_shadows|dynamic shadows]] off for this entity. Identical to applying &thinsp;{{ent|EF_NOSHADOW}}.}}
{{User:Nescius/sandbox/test7|EnableShadow|Turn dynamic shadows on for this entity.}}
{{#if:  | |{{User:Nescius/sandbox/test7|DisableReceivingFlashlight|This object will not receive light or shadows from [[env_projectedtexture|projected textures]].|since=P2}}
{{User:Nescius/sandbox/test7|EnableReceivingFlashlight|This object may receive light or shadows from projected textures.|since=P2}} }}
== Outputs ==
{{User:Nescius/sandbox/test7|OnIgnite|nofgd=1|Fired when the entity catches fire, such as from an {{ent|env_entity_igniter}} or the <code>Ignite</code> inputs.}}
{{User:Nescius/sandbox/test7|OnFizzled|only={{portal2}}|Fired when this entity is fizzled by a {{ent|trigger_portal_cleanser}} or, for {{ent|prop_weighted_cube}}, the Dissolve or SilentDissolve inputs. :{{bug|It does not fire when the object is fizzled by other means such as {{ent|env_entity_dissolver}}.}}
}}
[[Category:Classes|B]]

Latest revision as of 14:32, 1 October 2024