// nm_sample_npc.fgd - the FGD GenerateCustomEntityFgd produces for this sample on its own. // In the monorepo, do not hand-edit: add the class, then run // .claude/scripts/build-gate.sh ./build.sh GenerateCustomEntityFgd // and the block lands in NewMoon.Plugins.TF2Helpers.Api/Fgd/newmoon_custom_entities.fgd. // Load it in Hammer under Tools > Options > Game Configurations > Game Data files, after TF2's own FGDs. // Common base classes for the NewMoon custom entity FGD (AB#29812). // Hand-maintained. Derived from the CBaseEntity data description (BEGIN_DATADESC_NO_BASE( CBaseEntity ) in // src/game/server/baseentity.cpp) and the key handling in CBaseEntity::KeyValue (src/game/shared/baseentity_shared.cpp) // of the Source SDK 2013. Refresh it from a GetDataDescMap dump of a live entity when the engine surface changes. // The nm_ prefix keeps these names from colliding with the host FGD names; this file is self-contained and inherits nothing. @BaseClass = nm_Targetname [ targetname(target_source) : "Name" : : "The name other entities use to refer to this entity." input Kill(void) : "Remove this entity from the world." input KillHierarchy(void) : "Remove this entity and all of its children from the world." input AddOutput(string) : "Add an output connection at run time. Format: ::::." input FireUser1(string) : "Fire this entity's OnUser1 output." input FireUser2(string) : "Fire this entity's OnUser2 output." input FireUser3(string) : "Fire this entity's OnUser3 output." input FireUser4(string) : "Fire this entity's OnUser4 output." output OnUser1(void) : "Fired by the FireUser1 input." output OnUser2(void) : "Fired by the FireUser2 input." output OnUser3(void) : "Fired by the FireUser3 input." output OnUser4(void) : "Fired by the FireUser4 input." ] @BaseClass = nm_Origin [ origin(origin) : "Origin (X Y Z)" : : "Where the entity is placed in the world." ] @BaseClass = nm_Angles [ angles(angle) : "Pitch Yaw Roll (Y Z X)" : "0 0 0" : "The orientation of the entity in the world." ] @BaseClass = nm_Parentname [ parentname(target_destination) : "Parent" : : "The name of the entity this one is parented to. A child moves with its parent." input SetParent(string) : "Parent this entity to the named entity." input SetParentAttachment(string) : "Attach this entity to the named attachment point of its parent. The entity must already be parented." input SetParentAttachmentMaintainOffset(string) : "Attach this entity to the named attachment point of its parent and keep its current offset." input ClearParent(void) : "Detach this entity from its parent." ] @BaseClass = nm_RenderFields [ rendermode(choices) : "Render Mode" : 0 : "Overrides how the entity is drawn. Used together with FX Amount and FX Color." = [ 0 : "Normal" 1 : "Color" 2 : "Texture" 3 : "Glow" 4 : "Solid" 5 : "Additive" 7 : "Additive Fractional Frame" 9 : "World Space Glow" 10 : "Do Not Render" ] renderamt(integer) : "FX Amount (0 - 255)" : 255 : "How opaque the entity is, as read by the Render Mode." rendercolor(color255) : "FX Color (R G B)" : "255 255 255" : "The tint applied to the entity." renderfx(choices) : "Render FX" : 0 : "A render effect applied to the entity." = [ 0 : "Normal" 1 : "Slow Pulse" 2 : "Fast Pulse" 3 : "Slow Wide Pulse" 4 : "Fast Wide Pulse" 5 : "Slow Fade Away" 6 : "Fast Fade Away" 7 : "Slow Become Solid" 8 : "Fast Become Solid" 9 : "Slow Strobe" 10 : "Fast Strobe" 11 : "Faster Strobe" 12 : "Slow Flicker" 13 : "Fast Flicker" 14 : "Constant Glow" 15 : "Distort" 16 : "Hologram (Distort + Fade)" 17 : "Explode" 18 : "Glow Shell" 19 : "Clamp Minimum Scale" 24 : "Fast Wider Pulse" ] disableshadows(choices) : "Disable Shadows" : 0 : "Turns off the dynamic shadow of this entity." = [ 0 : "No" 1 : "Yes" ] disablereceiveshadows(choices) : "Disable Receiving Shadows" : 0 : "Stops shadows from falling on this entity." = [ 0 : "No" 1 : "Yes" ] input Alpha(integer) : "Set the opacity of the entity, 0 to 255." input Color(color255) : "Set the tint of the entity. Format: ." input AlternativeSorting(bool) : "Try to fix draw-order problems. True turns the alternative sorting on and false turns it off." input EnableShadow(void) : "Turn the shadow of this entity on." input DisableShadow(void) : "Turn the shadow of this entity off." ] @BaseClass base(nm_Targetname, nm_Origin, nm_Angles, nm_Parentname, nm_RenderFields) = nm_entity_base [ teamnumber(integer) : "Team Number" : 0 : "The team this entity starts on. 0 is unassigned, 2 is RED and 3 is BLU." vscripts(string) : "Entity Scripts" : : "Space-delimited list of VScript files run on this entity at spawn." thinkfunction(string) : "Script think function" : : "The VScript function called on every think of this entity." input Use(void) : "Act as if a player pressed the use key on this entity." input SetTeam(integer) : "Move this entity to the given team number." input SetDamageFilter(string) : "Set the filter entity that decides which damage this entity takes. An empty parameter clears it." input EnableDamageForces(void) : "Let damage push this entity around." input DisableDamageForces(void) : "Stop damage from pushing this entity around." input DispatchEffect(string) : "Dispatch the named particle effect from this entity." input DispatchResponse(string) : "Run the named response concept on this entity." input AddContext(string) : "Add a response context to this entity. Format: :." input RemoveContext(string) : "Remove the named response context from this entity." input ClearContext(void) : "Remove every response context from this entity." input RunScriptFile(string) : "Run a VScript file in this entity's script scope." input RunScriptCode(string) : "Run a line of VScript in this entity's script scope." input CallScriptFunction(string) : "Call the named VScript function in this entity's script scope." input TerminateScriptScope(void) : "Destroy this entity's VScript scope." ] // nm-fgd-appearance: studio() // Curated base class for custom entities that front base_boss (AB#29812). // Hand-maintained. Derived from the data description of the Source SDK 2013 class CTFBaseBoss // (src/game/server/tf/player_vs_environment/tf_base_boss.cpp) plus the inherited CBaseCombatCharacter // (src/game/server/basecombatcharacter.cpp), CBaseAnimating (src/game/server/baseanimating.cpp) and CBaseEntity // (src/game/server/baseentity.cpp) rows. One row per key name, the most-derived class wins. // Refresh it from a GetDataDescMap dump of a live base_boss when the engine surface changes. @BaseClass base(nm_entity_base) = nm_base_boss_base [ health(integer) : "Health" : 0 : "Starting and maximum health of the boss." model(studio) : "World Model" : : "The model the boss uses." speed(float) : "Speed" : 75 : "Movement speed of the boss, in units per second." start_disabled(choices) : "Start Disabled" : 0 : "Spawn the boss disabled until it gets the Enable input." = [ 0 : "No" 1 : "Yes" ] skin(integer) : "Skin" : 0 : "Which skin of the model to use." body(integer) : "Body Group" : 0 : "Which body group value of the model to show." hitboxset(integer) : "Hitbox Set" : 0 : "Which hitbox set of the model to use." modelscale(float) : "Model Scale" : "1.0" : "A multiplier for the size of the model." playbackrate(float) : "Playback Rate" : "1.0" : "How fast animations play. 1 is normal speed." fademindist(float) : "Start Fade Distance" : -1 : "Distance at which the boss starts to fade. Below 0 uses the end distance." fademaxdist(float) : "End Fade Distance" : 0 : "Distance at which the boss is fully faded. 0 turns fading off." fadescale(float) : "Fade Scale" : 1 : "Scales the forced engine fade. 0 turns the forced fade off." LightingOrigin(target_destination) : "Lighting Origin" : : "Name of an entity to sample lighting from instead of the boss origin." Relationship(string) : "Relationship" : : "Relationship rules for the boss. Format: ." physdamagescale(float) : "Physics Impact Damage Scale" : "1.0" : "Scales damage taken from physics impacts. 0 turns the feature off." input Enable(void) : "Enable the boss." input Disable(void) : "Disable the boss." input SetSpeed(float) : "Set the movement speed of the boss." input SetStepHeight(float) : "Set the highest step the boss walks up." input SetMaxJumpHeight(float) : "Set the highest jump the boss makes." input SetHealth(integer) : "Set the health of the boss." input SetMaxHealth(integer) : "Set the maximum health of the boss." input AddHealth(integer) : "Add to the health of the boss." input RemoveHealth(integer) : "Remove health from the boss." input Skin(integer) : "Change the model skin to this number." input SetBodyGroup(integer) : "Show the body group with this index." input SetModel(string) : "Change the model of the boss to the named one." input SetModelScale(string) : "Change the model scale. Format: ." input SetCycle(float) : "Set the position in the current animation, from 0 to 1." input SetPlaybackRate(float) : "Set the animation playback rate." input physdamagescale(float) : "Set the physics impact damage scale." input fademindist(float) : "Set the start fade distance." input fademaxdist(float) : "Set the end fade distance." input Ignite(void) : "Set the boss on fire." input IgniteLifetime(float) : "Set the boss on fire for this many seconds." input IgniteNumHitboxFires(integer) : "Set the boss on fire with this many hitbox fires." input IgniteHitboxFireScale(float) : "Set the boss on fire with this hitbox fire scale." input BecomeRagdoll(void) : "Turn the boss into a ragdoll." input SetLightingOrigin(string) : "Sample lighting from the named entity." input SetLightingOriginHack(string) : "Sample lighting from the named entity, relative to the boss." input KilledNPC(void) : "Tell the boss that an NPC was killed." output OnHealthBelow90Percent(void) : "Fired when the health drops below 90 percent." output OnHealthBelow80Percent(void) : "Fired when the health drops below 80 percent." output OnHealthBelow70Percent(void) : "Fired when the health drops below 70 percent." output OnHealthBelow60Percent(void) : "Fired when the health drops below 60 percent." output OnHealthBelow50Percent(void) : "Fired when the health drops below 50 percent." output OnHealthBelow40Percent(void) : "Fired when the health drops below 40 percent." output OnHealthBelow30Percent(void) : "Fired when the health drops below 30 percent." output OnHealthBelow20Percent(void) : "Fired when the health drops below 20 percent." output OnHealthBelow10Percent(void) : "Fired when the health drops below 10 percent." output OnKilled(void) : "Fired when the boss is killed." output OnIgnite(void) : "Fired when the boss catches fire." ] @PointClass base(nm_base_boss_base) studio() = nm_sample_npc : "Custom entity (fronts base_boss), declared by NewMoon.Samples.CustomNpc.SampleNpc" [ ]