Skip to content

Commit

Permalink
Generalize FGD Formatting (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmob03 authored Sep 10, 2022
1 parent c1b0f2b commit 98f15d1
Show file tree
Hide file tree
Showing 276 changed files with 594 additions and 451 deletions.
4 changes: 3 additions & 1 deletion fgd/base_entity.fgd
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// For use in the engine dump, the keyvalues available on CBaseEntity and therefore on all entities.
// This way they don't need to be re-declared on every ent.

@PointClass appliesto(engine) = _CBaseEntity_
@PointClass
appliesto(engine)
= _CBaseEntity_
[
classname(string) : "Classname" : : "The class of the entity, and is changed."
origin(origin) : "Position" : "0 0 0"
Expand Down
1 change: 0 additions & 1 deletion fgd/bases/AlyxInteractable.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

@BaseClass = AlyxInteractable
[
// Inputs
Expand Down
4 changes: 2 additions & 2 deletions fgd/bases/BaseActBusy.fgd
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@BaseClass base(BaseEntityPoint)
line(255 255 255, targetname, actor) = BaseActBusy
line(255 255 255, targetname, actor)
= BaseActBusy
[
actor(target_name_or_class) : "Actor(s) to affect" : : "NPC's that should act busy"
startactive(boolean) : "Start Active" : 0
Expand All @@ -9,7 +10,6 @@ line(255 255 255, targetname, actor) = BaseActBusy
0: "Entity Name"
1: "Classname"
]

busysearchrange(float) : "Search Range for Busy Hints" : 2048
visibleonly(boolean) : "Visible Busy Hints Only" : 0

Expand Down
7 changes: 4 additions & 3 deletions fgd/bases/BaseBeam.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
= BaseBeam: "This is the definition of the 'beam' class, but we don't want that in the entity list."
[
rendermode[engine](integer) readonly : "Render Mode" : 2 : "Render mode is forced to Texture."
rendermode(choices) readonly : "Render Mode" : 1 : "Render mode is forced to Texture, but set to Color in Hammer to ensure correct rendering." = [
rendermode(choices) readonly : "Render Mode" : 1 : "Render mode is forced to Texture, but set to Color in Hammer to ensure correct rendering." =
[
1: "Color"
]
]
renderamt(integer) : "Brightness (1 - 255)" : 100
rendercolor(color255) : "Beam Color (R G B)" : "255 255 255"

Expand Down Expand Up @@ -38,7 +39,7 @@
input Width(float) : "Set the width of the beam, in pixels."
input ScrollSpeed(float) : "Set the scroll speed in units per second (0 - 100)."
input Alpha(integer) : "Sets the beam's alpha (0 - 255)."

input Color(color255) : "Sets the beam's render color (R G B)."
input ColorRedValue(float) : "Sets the red color channel's value (0 - 255)."
input ColorGreenValue(float) : "Sets the green color channel's value (0 - 255)."
Expand Down
1 change: 0 additions & 1 deletion fgd/bases/BaseBrush.fgd
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@BaseClass = BaseBrush
[

// Inputs
input SetTextureIndex(integer) : "Used by HL1Port. Sets the brush texture index. Use a material_modify_control entity instead."
input IncrementTextureIndex(void) : "Used by HL1Port. Increments the brush texture index. Use a material_modify_control entity instead."
Expand Down
1 change: 0 additions & 1 deletion fgd/bases/BaseEffectBrush.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
globalname(string) : "Global Entity Name" : : "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."

parentname[!srctools](target_destination) : "Parent" : : "The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. Set an attachment point via 'parentname,attachment'."
parentname[srctools](target_destination) : "Parent" : : "The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent."
parent_attachment_point[srctools](string) : "Attachment Point" : : "If set, attach to this attachment point on the parent during spawn."
Expand Down
15 changes: 7 additions & 8 deletions fgd/bases/BaseEntity.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,8 @@
input RunScriptCode[+VSCRIPT, -srctools](script) : "Execute a string of script source code."
input RunScriptCode[+VSCRIPT, +srctools](script) : "Execute a string of script source code. Backtick ( ` ) characters will be converted to quotes in-game for strings."
input CallScriptFunction[VSCRIPT](string) : "Execute the given function name."

input CancelPending(void) : "Cancel any events fired by this relay that are currently pending in the I/O event queue."

// Outputs
output OnUser1(void) : "Fired in response to FireUser1 input."
output OnUser2(void) : "Fired in response to FireUser2 input."
output OnUser3(void) : "Fired in response to FireUser3 input."
output OnUser4(void) : "Fired in response to FireUser4 input."

// Mapbase BaseEntity changes:
input PassUser1(string) : "Causes this entity's OutUser1 output to be fired, passing along the parameter unchanged."
input PassUser2(string) : "Causes this entity's OutUser2 output to be fired, passing along the parameter unchanged."
input PassUser3(string) : "Causes this entity's OutUser3 output to be fired, passing along the parameter unchanged."
Expand Down Expand Up @@ -74,6 +67,12 @@

input Use(void) : "More or less replicates the player interacting with an entity. (+USE)"

// Outputs
output OnUser1(void) : "Fired in response to FireUser1 input."
output OnUser2(void) : "Fired in response to FireUser2 input."
output OnUser3(void) : "Fired in response to FireUser3 input."
output OnUser4(void) : "Fired in response to FireUser4 input."

output OutUser1(string) : "Fires in response to PassUser1 input, with the parameter passed through unchanged."
output OutUser2(string) : "Fires in response to PassUser2 input, with the parameter passed through unchanged."
output OutUser3(string) : "Fires in response to PassUser3 input, with the parameter passed through unchanged."
Expand Down
15 changes: 7 additions & 8 deletions fgd/bases/BaseEntityBrush.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,7 @@
input RunScriptCode[+VSCRIPT, -srctools](script) : "Execute a string of script source code."
input RunScriptCode[+VSCRIPT, +srctools](script) : "Execute a string of script source code. Backtick ( ` ) characters will be converted to quotes in-game for strings."
input CallScriptFunction[VSCRIPT](string) : "Execute the given function name."

// Outputs
output OnUser1(void) : "Fired in response to FireUser1 input."
output OnUser2(void) : "Fired in response to FireUser2 input."
output OnUser3(void) : "Fired in response to FireUser3 input."
output OnUser4(void) : "Fired in response to FireUser4 input."

// Mapbase BaseEntity changes:

input PassUser1(string) : "Causes this entity's OutUser1 output to be fired, passing along the parameter unchanged."
input PassUser2(string) : "Causes this entity's OutUser2 output to be fired, passing along the parameter unchanged."
input PassUser3(string) : "Causes this entity's OutUser3 output to be fired, passing along the parameter unchanged."
Expand Down Expand Up @@ -123,6 +116,12 @@
input Use(void) : "More or less replicates the player interacting with an entity. (+USE)"
input Touch(target_destination) : "Simulates this entity touching the specified entity."

// Outputs
output OnUser1(void) : "Fired in response to FireUser1 input."
output OnUser2(void) : "Fired in response to FireUser2 input."
output OnUser3(void) : "Fired in response to FireUser3 input."
output OnUser4(void) : "Fired in response to FireUser4 input."

output OutUser1(string) : "Fires in response to PassUser1 input, with the parameter passed through unchanged."
output OutUser2(string) : "Fires in response to PassUser2 input, with the parameter passed through unchanged."
output OutUser3(string) : "Fires in response to PassUser3 input, with the parameter passed through unchanged."
Expand Down
15 changes: 7 additions & 8 deletions fgd/bases/BaseEntityPoint.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,7 @@
input RunScriptCode[+VSCRIPT, -srctools](script) : "Execute a string of script source code."
input RunScriptCode[+VSCRIPT, +srctools](script) : "Execute a string of script source code. Backtick ( ` ) characters will be converted to quotes in-game for strings."
input CallScriptFunction[VSCRIPT](string) : "Execute the given function name."

// Outputs
output OnUser1(void) : "Fired in response to FireUser1 input."
output OnUser2(void) : "Fired in response to FireUser2 input."
output OnUser3(void) : "Fired in response to FireUser3 input."
output OnUser4(void) : "Fired in response to FireUser4 input."

// Mapbase BaseEntity changes:

input PassUser1(string) : "Causes this entity's OutUser1 output to be fired, passing along the parameter unchanged."
input PassUser2(string) : "Causes this entity's OutUser2 output to be fired, passing along the parameter unchanged."
input PassUser3(string) : "Causes this entity's OutUser3 output to be fired, passing along the parameter unchanged."
Expand Down Expand Up @@ -102,6 +95,12 @@
input Use(void) : "More or less replicates the player interacting with an entity. (+USE)"
input Touch(target_destination) : "Simulates this entity touching the specified entity."

// Outputs
output OnUser1(void) : "Fired in response to FireUser1 input."
output OnUser2(void) : "Fired in response to FireUser2 input."
output OnUser3(void) : "Fired in response to FireUser3 input."
output OnUser4(void) : "Fired in response to FireUser4 input."

output OutUser1(string) : "Fires in response to PassUser1 input, with the parameter passed through unchanged."
output OutUser2(string) : "Fires in response to PassUser2 input, with the parameter passed through unchanged."
output OutUser3(string) : "Fires in response to PassUser3 input, with the parameter passed through unchanged."
Expand Down
4 changes: 2 additions & 2 deletions fgd/bases/BaseHeadcrab.fgd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

@BaseClass base(BaseNPC) = BaseHeadcrab
@BaseClass base(BaseNPC)
= BaseHeadcrab
[
startburrowed(boolean) : "Start burrowed" : 0

Expand Down
4 changes: 2 additions & 2 deletions fgd/bases/BaseLight.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

style[engine](integer) : "Appearance" : 0
style(choices) : "Appearance" : 0 =
[
[
0 : "Normal"
10: "Fluorescent flicker"
2 : "Slow, strong pulse"
Expand All @@ -25,7 +25,7 @@
4 : "Fast strobe"
9 : "Slow strobe"
12 : "Underwater light mutation"
]
]
pattern(string) : "Custom Appearance" : "" : "Set a custom pattern of light brightness for this light. Pattern format is a string of characters, where 'a' is total darkness, 'z' fully bright. i.e. 'aaggnnttzz' would be a steppy fade in from dark to light."
fadetickinterval(float) : "Fade Tick Interval" : 0.1 : "The tick interval of the light's fade, in seconds. Lower values cause a faster fade."
_constant_attn(string) : "Constant" : "0"
Expand Down
4 changes: 2 additions & 2 deletions fgd/bases/BaseNPC.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

DontUseSpeechSemaphore[engine](boolean) : "Don't Use Speech Semaphore?" : 0
DontUseSpeechSemaphore(choices) : "Don't Use Speech Semaphore?" : 0 : "Friendly NPCs are not allowed to speak if another friendly NPC is speaking. In some cases we don't want speaking NPCs to prevent other NPCs from speaking (for instance, if there is a friendly NPC speaking for a long time on a monitor). To make this NPC not prevent other NPCs from talking, make it not grab the semaphore when it speaks." =
[
[
0 : "No (Use speech semaphore)"
1 : "Yes (Don't use speech semaphore)"
]
]

linedivider_npc[!engine](string) readonly : "----------------------------------------------------------------------------------------------------------" : ""

Expand Down
3 changes: 2 additions & 1 deletion fgd/bases/BaseNPCAssault.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@BaseClass base(BaseNPC) = BaseNPCAssault
@BaseClass base(BaseNPC)
= BaseNPCAssault
[
input Assault(string) : "Start an assault. Parameter passed in should be the name of the rally point."
]
1 change: 0 additions & 1 deletion fgd/bases/BasePaintType.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

@BaseClass = BasePaintType: "Paint Type property."
[
painttype[engine](integer) : "Paint Type" : 0
Expand Down
3 changes: 2 additions & 1 deletion fgd/bases/BaseProjector.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@BaseClass base(BaseEntityAnimating) = BaseProjector: "The base for all the different projectors (wall & tractor beam)."
@BaseClass base(BaseEntityAnimating)
= BaseProjector: "The base for all the different projectors (wall & tractor beam)."
[
startenabled(boolean) : "Start Enabled" : 1 : "If the projector should start enabled."
disablehelper(boolean) : "Disable Placement Helper" : 0 : "Disable the automatically created placement helper to prevent it from fighting with a custom one."
Expand Down
4 changes: 3 additions & 1 deletion fgd/bases/BaseRedirectFilter.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@BaseClass base(filter_base) line(255 0 0, targetname, damagefilter) = BaseRedirectFilter
@BaseClass base(filter_base)
line(255 0 0, targetname, damagefilter)
= BaseRedirectFilter
[
damagefilter(filterclass) : "Target Filter" : "" : "The filter to pass to. You can also use the 'SetField' input."
input SetField(target_destination) : "Sets the filter to pass to."
Expand Down
3 changes: 2 additions & 1 deletion fgd/bases/BaseZombie.fgd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@BaseClass base(BaseNPC) = BaseZombie
@BaseClass base(BaseNPC)
= BaseZombie
[
]
5 changes: 4 additions & 1 deletion fgd/bases/Breakable.fgd
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Use BreakableBrush/Prop instead!
@BaseClass sphere(exploderadius) = _Breakable
@BaseClass
sphere(exploderadius)
= _Breakable
[
explodedamage(float) : "Explosion Damage" : 0 : "If non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage. See also 'Explosion Radius'."
exploderadius(float) : "Explosion Radius" : 0 : "If non-zero, when this entity breaks it will create an explosion with a radius of the specified amount. See also 'Explosion Damage'."
Expand All @@ -20,6 +22,7 @@
minhealthdmg(integer) : "Minimum Damage to Hurt" : 0 : "The entity will ignore any damage events if the damage is less than this amount."
health(integer) : "Health" : 0 : "Number of points of damage to take before breaking. 0 means don't break."
physdamagescale(float) : "Physics Impact Damage Scale" : "1.0" : "Scales damage energy when this object is hit by a physics object. Set to 1.0 for materials as strong as flesh, smaller numbers indicate stronger materials."

// Inputs
input Break(void) : "Breaks the breakable."
input SetHealth(integer) : "Sets a new value for the breakable's health. If the breakable's health reaches zero it will break."
Expand Down
3 changes: 2 additions & 1 deletion fgd/bases/BreakableBrush.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@BaseClass base(BaseEntityVisBrush, _Breakable, DamageFilter) = BreakableBrush
@BaseClass base(BaseEntityVisBrush, _Breakable, DamageFilter)
= BreakableBrush
[
spawnflags(flags) =
[
Expand Down
11 changes: 7 additions & 4 deletions fgd/bases/BreakableProp.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@BaseClass base(_Breakable, DamageFilter) = BreakableProp
@BaseClass base(_Breakable, DamageFilter)
= BreakableProp
[
spawnflags(flags) =
[
Expand All @@ -7,9 +8,11 @@
]

exploitablebyplayer[engine](integer) : "Exploitable by Player" : 0

output OnTakeDamage(void) : "Fired each time this breakable takes any damage."


// Inputs
input EnableDamageForces(void) : "Damaging the entity applies physics forces to it."
input DisableDamageForces(void) : "Damaging the entity does *not* apply physics forces to it."

// Outputs
output OnTakeDamage(void) : "Fired each time this breakable takes any damage."
]
1 change: 0 additions & 1 deletion fgd/bases/DetailPropBase.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

@BaseClass = DetailPropBase
[
detailOrientation[engine](integer) : "Orientation" : 0
Expand Down
1 change: 0 additions & 1 deletion fgd/bases/FadeDistance.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

@BaseClass
sphere(fademindist)
sphere(fademaxdist)
Expand Down
3 changes: 2 additions & 1 deletion fgd/bases/FollowGoal.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@BaseClass base(BaseEntityPoint) = FollowGoal
@BaseClass base(BaseEntityPoint)
= FollowGoal
[
actor(target_name_or_class) : "Actor(s) to affect"
goal(string) : "Target Entity" : : "The name of the entity to follow. If blank, and the actor likes the player, then defaults to player"
Expand Down
3 changes: 2 additions & 1 deletion fgd/bases/Item.fgd
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@BaseClass base(BaseEntityPhysics, TeamNum, EnableDisable, Toggle, FadeDistance)
color(0 0 200)
sphere(fademindist)
sphere(fademaxdist) = Item
sphere(fademaxdist)
= Item
[
spawnflags(flags) : "spawnflags" =
[
Expand Down
4 changes: 2 additions & 2 deletions fgd/bases/LeadGoalBase.fgd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

@BaseClass base(BaseEntityPoint) = LeadGoalBase
@BaseClass base(BaseEntityPoint)
= LeadGoalBase
[
actor(target_name_or_class) : "Actor(s) to affect"
goal(string) : "Target Entity"
Expand Down
4 changes: 3 additions & 1 deletion fgd/bases/MasterEnt.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@BaseClass line(255 255 255, targetname, master) = MasterEnt
@BaseClass
line(255 255 255, targetname, master)
= MasterEnt
[
master(target_destination) : "Master (Obsolete)" : : "Legacy support: The name of a master entity. If the master hasn't been activated, this entity will not activate."
]
3 changes: 2 additions & 1 deletion fgd/bases/NavCost.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@BaseClass base(BaseEntityBrush, TeamNum) = NavCost
@BaseClass base(BaseEntityBrush, TeamNum)
= NavCost
[
start_disabled(boolean) : "Start Disabled" : 0

Expand Down
3 changes: 2 additions & 1 deletion fgd/bases/PlayerCompanion.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@BaseClass base(BaseNPC) = PlayerCompanion
@BaseClass base(BaseNPC)
= PlayerCompanion
[
alwaystransition(boolean) : "Always transition" : 0 : "If yes, this NPC will always teleport to a Player Squad Transition Point if they're not within the trigger_transition volume."
dontpickupweapons(boolean) : "Prevent picking up weapons?" : 0 : "If yes, this NPC will NOT be allowed to pick up weapons they find on the ground."
Expand Down
3 changes: 2 additions & 1 deletion fgd/bases/PortalBase.fgd
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@BaseClass
appliesto(P2CE) = PortalBase
appliesto(P2CE)
= PortalBase
[
activated[engine](boolean) : "Start Activated" : 0
activated(choices) : "Start Activated" : 0 : "An inactive portal will not be drawn and will not teleport entities." =
Expand Down
1 change: 0 additions & 1 deletion fgd/bases/Reflection.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

@BaseClass = Reflection
[
drawinfastreflection(boolean) : "Render in Fast Reflections" : 0 : "If enabled, causes this entity/prop to to render in fast water reflections (i.e. when a water material specifies $reflectonlymarkedentities) and in the world impostor pass."
Expand Down
1 change: 0 additions & 1 deletion fgd/bases/ResponseContext.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

@BaseClass = ResponseContext
[
responsecontext(string) : "Response Contexts" : : "Response system context(s) for this entity. Format should be: 'key:value,key2:value2,etc'. When this entity speaks, the list of keys & values will be passed to the response rules system."
Expand Down
14 changes: 8 additions & 6 deletions fgd/bases/RopeKeyFrame.fgd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

@BaseClass base(SystemLevelChoice) = RopeKeyFrame
@BaseClass base(SystemLevelChoice)
= RopeKeyFrame
[
spawnflags(flags) : "spawnflags" =
[
Expand All @@ -24,16 +24,18 @@
collide(boolean) : "Collide with world" : 0

dangling[engine](boolean) : "Start Dangling" : 0
dangling(choices) : "Start Dangling" : 0 : "When set to Yes, the rope starts out detached from its target endpoint." = [
dangling(choices) : "Start Dangling" : 0 : "When set to Yes, the rope starts out detached from its target endpoint." =
[
0 : "Start Attached"
1 : "Start Dangling"
]
]

breakable[engine](boolean) : "Breakable" : 0
breakable(choices) : "Breakable" : 0 : "When set to yes, the rope can be detached from either endpoint when shot." = [
breakable(choices) : "Breakable" : 0 : "When set to yes, the rope can be detached from either endpoint when shot." =
[
0 : "Indestructible"
1 : "Breakable"
]
]

ropematerial(material) : "Rope Material" : "cable/cable.vmt" : "The material to use when rendering the rope."

Expand Down
4 changes: 3 additions & 1 deletion fgd/bases/SetModel.fgd
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Entities with a settable model.
@BaseClass base(SetSkin) studioprop() = SetModel
@BaseClass base(SetSkin)
studioprop()
= SetModel
[
model(studio) : "World Model" : : "The model to use for this entity."
]
1 change: 0 additions & 1 deletion fgd/bases/SystemLevelChoice.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

@BaseClass = SystemLevelChoice
[
mincpulevel(choices) : "Minimum CPU Level" : 0 =
Expand Down
1 change: 0 additions & 1 deletion fgd/bases/TalkNPC.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

@BaseClass base(BaseNPC) = TalkNPC
[
usesentence(string) : "Use Sentence"
Expand Down
Loading

0 comments on commit 98f15d1

Please sign in to comment.