An FGD Fit for a LORD

An FGD Fit for a LORD V3b

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
An FGD Fit for a LORD - Oh god not another one of these do we not already have enough jfc

Hey you! Remember me, that guy that's made only one finished map, which was two years ago and kinda mediocre? Oh yea, I also made that one April Fools map that was almost unplayable due to lag! Now I've made an FGD for TF2, because I'm clearly a professional and I definitely know what I'm doing! Check it out!
FGD_Promo_1.png
FGD_Promo_2.png
FGD_Promo_3.png
FGD_Promo_4.png


This is a Forge Game Definition file (FGD) for Team Fortress 2, created by Da Spud Lord. All of the information has been taken from other FGDs, the Valve Developer Community, and my own research under the goal of stripping out nonfunctional keyvalues while including and better documenting functional features, including any obscure yet potentially useful features.

Follow these steps to install this FGD and necessary files. These instructions are also listed at the top of the FGD file.
  1. If you have not already installed A Boojum Snark's Ultimate Mapping Resource Pack, download and install it from here. My FGD references a number of resources from ABS' pack, and in general the pack will greatly improve your TF2 mapping experience. If you already have this pack installed, skip this step.
  2. Download my FGD. Copy the FGD file (tf2_spud.fgd) as well as the included folder (tf2_spud) from the ZIP to your /Team Fortress 2/bin folder*. The /Team Fortress 2 folder can be located by right-clicking on Team Fortress 2 in your Steam Library and selecting Properties > Local Files > Browse Local Files. If you are not using the Team Fortress 2 Hammer, instead copy this FGD file to your hammer.exe's /bin folder.
  3. Copy the included VPK file (tf2_spud_fgd.vpk) to your /Team Fortress 2/tf/custom folder.
  4. Launch/restart Hammer. Go to Tools > Options > Configurations. Under Game Data files, remove all other files. Then use the Add button and the file browser popup to find and select the tf2_spud.fgd file which you just downloaded. (The other files do not need to be selected and will be included automatically.) Select "Ok" before exiting your Hammer options, and restart Hammer. The FGD is now fully installed.
*This exact folder is not required, this FGD file and included folder can go anywhere as long as the relative structure is maintained. The /Team Fortress 2/bin folder is the standard for storing FGD files and where Hammer will first look in when searching for new FGD files, but there is no technical requirement that this folder be used and Hammer can locate FGD files virtually anywhere on your PC. On the contrary, the VPK file MUST go in the specified location; the location of the VPK file is NOT arbitrary.

To change any settings within the FGD file as of Version 3, such as hiding/showing line dividers, open the tf2_spud.fgd file in a plain text editor, scroll down to the "USER SETTINGS" header (line 37), and follow the instructions there.

CREDITS:
Engineer spawnpoint model and some icons created by A Boojum Snark (not included; see installation instructions)
 
Last edited:

Izotope

Sourcerer
aa
May 13, 2013
699
763
The keyvalues seen in the "useless keyvalues begone" bit aren't even there normally, did you just change to teamflag from another entity that had these without confirming? False advertising :thinking:

Also I'm personally not a fan of the lines in the entity properties like all these FGDs seem to do.
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
The keyvalues seen in the "useless keyvalues begone" bit aren't even there normally, did you just change to teamflag from another entity that had these without confirming? False advertising :thinking:

Also I'm personally not a fan of the lines in the entity properties like all these FGDs seem to do.
Those keyvalues are from Ficool's FGD, which mine is roughly based on. I removed them because, after testing each individually, I determined they had no functionality.

The line dividers can be removed by opening the FGD in a text editor and using the editor's Replace function to replace "linediv" with "//linediv". Reverse to re-add the lines.
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
Version 1a: trainnning_annotation

-Fixed a typo in the training_annotation icon
-Fixed typos in the Detail Material File dropdown options in Map Properties
-Fixed a typo in game_text's Message Text description
-Added "Decals" and "Overlays" auto visgroups under "World Details"

Go to the update entry...
Download this version
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
Version 2

I realized approximately 40 seconds after publishing the first version of this FGD that I probably shouldn't include version numbers in the filename, since that's just going to make it slightly annoying for anyone subsribed when I release an update... So here's to rectifying that absolutely pea-brained idea. You'll need to change the FGD referenced under Tools > Options after copying it over, but just this once! Last time! I promise! PLEASE! PLEASE FORGIVE MY SINS! I'M JUST A HUMBLE BOY I DONT KNOW WHAT IM DOING AAAAAA (also delete the V1 VPK from your /tf/custom folder so you don't get conflicting icons)
Oh, also I did some kinda noticeable reshuffling of keyvalues so the useful keyvalues are easier to find. You no longer have to scroll past half a Wikipedia article to change the team of an item_teamflag, which is pretty cool I think.

-Fixed various typos
-Updated various entities' documentation to reflect new research/information
-Fixed the obj_dispenser model constantly looping its upgrade animation
-The obj_teleporter model no longer includes the toolbox
-Fixed occluder brushes being teleported to the world origin on map load
-Adjustments to the default settings of some keyvalues
-Reorganized some entities' keyvalues and spawnflags; in entities with lots of keyvalues, more commonly used and entity-specific keyvalues are now sorted to the top
-Large overhaul of BaseClasses and organization
-Line dividers will no longer ever be listed as the last keyvalue in an entity's properties
-FGD version is now listed at the top of the FGD file, and is no longer appended to the end of the file names
-Fixed func_train missing certain keyvalues/inputs/outputs
-Added optional Hammer-only Helper Model options to info_null, info_target, info_teleport_destination, obj_sentrygun, obj_dispenser, obj_teleporter, path_track, point_teleport, and team_control_point
-Fixed the first path_track in a chain not visually connecting to its next paths if it was unnamed
-Fixed improperly sized radius helper on prop_sphere
-Added sentry range helper to bot_hint_sentrygun
-Radius helpers are no longer read-only, so they can be reset in case the mapper accidentally changes them (the value can still be changed via the helper even if the keyvalue is flagged as read-only)
-Extended the line dividers to fill the entire width of the keyvalue list in stock Hammer at the default window size

Go to the update entry...
Download this version
 
Last edited:

Berke

L1: Registered
Sep 23, 2017
11
35
Pretty good FGD, though I found some missing stuff that was missing in ficool2's FGD too. They are:
"env_shooter" is missing the input: "Shoot".
"env_soundscape_triggerable" is missing the keyvalue: "radius".
"env_spark" is missing the output: "OnSpark".
"spark_shower" is missing the output: "OnSpark"? I am not too sure about this one but since it's still a spark entity...
"entity_bird" is missing, which is just an entity with the model "models/props_forest/bird.mdl" that explodes upon touching or damaging it.
Other than that, looks pretty good!
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
"env_shooter" is missing the input: "Shoot".
"env_soundscape_triggerable" is missing the keyvalue: "radius".
"env_spark" is missing the output: "OnSpark".
"spark_shower" is missing the output: "OnSpark"? I am not too sure about this one but since it's still a spark entity...
"entity_bird" is missing, which is just an entity with the model "models/props_forest/bird.mdl" that explodes upon touching or damaging it.
Thanks for the feedback! I'll be updating the FGD to include these fixes in a few days. One note though: spark_shower does not have an OnSpark output (checked using ent_info in-game, its a very useful console command for this kind of stuff). spark_shower is actually fairly different from env_spark. The rest of these fixes/changes will be implemented.

Also kinda unrelated, but I was scrolling through the source code for env_spark researching how the "Magnitude" keyvalue works and found this comment above the constructor:
Code:
// Purpose: Constructor! Exciting, isn't it?
Just... something about the sarcastic energy emitted by this quote was so endearing that I just had to share it.

That's all.
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
Version 2a

-Fixed various missing inputs/outputs on various entities
-Added cone helper model to env_shooter, env_rotorshooter, gibshooter, and env_spark
-Updated various entities' documentation to reflect new research/information
-Added new entity class entity_bird
-Fixed entity_soldier_statue and cycler_flex having duplicated line dividers
-Fixed various typos

Go to the update entry...
Download this version
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
Version 2b

-Fixed various typos
-Fixed various inconsistencies with keyvalue arrangements
-Adjusted divider placements in some entities
-Updated various entities' documentation to reflect new research/information
-Rearranged various entities' spawnflags and keyvalues
-Fixed missing "Start Branch Path Enabled" spawnflag in path_track
-Added line helper for point_tesla's "Source Entity" keyvalue
-Added missing entity class func_passtime_no_ball_zone

Go to the update entry...
Download this version
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
Version 3: The update I started making out of boredom
Alright, so I know what you're all thinking. "Spud, this FGD looks cool, but I have a violent fear of organization and cleanliness. I'd like this FGD a lot better if I could easily get rid of the line dividers. Like, just by pressing a button. Twice. And I really want that button to be the forward slash key on my keyboard, for some reason." If that was your thought process upon first seeing this FGD, then this is the update for you! And if that was not your thought process, well you might still like this update anyway, so check it out!

-Added a "User Settings" section at the top of the FGD: In this section, certain parts of the FGD can easily be customized by commenting/uncommenting lines of FGD code. Currently available settings are "Line Dividers" and "Pitch Keyvalue in Lights".
-keyframe_rope and move_rope now have identical functionality and can be used interchangeably
-Increased the default "Slack" value in keyframe_rope and move_rope to 50 (previously 25)
-Improved documentation of PASStime entities (Thanks to 14bit for the improved PASStime prefab which I could use for testing)
-Broken/nonfunctional entities are now re-included in the FGD, with a message at the top of their keyvalues list indicating their broken status
-team_control_point now properly lists dynamic model keyvalues, inputs, and outputs
-NPC entities have been updated to follow the keyvalue organization scheme established in Version 2
-Range helpers that are not intended to be changed can now be reset to their intended value using the dropdown
-Removed "Direction to Suppress Air Control" and "Air Control Suppression Time" keyvalues from trigger_catapult, and "<Team> Model Bodygroup" keyvalues from team_control_point, as they have no effect in code
-Removed "Skin", "Body Group", "Hitbox Set", and "Texture Frame" keyvalues from various entities which override these values on spawn or otherwise do not use these values
-Removed "Helper Model" keyvalue from team_control_point
-Removed dynamic model keyvalues from npc_vehicledriver
-Fixed "_DisableUpdateTarget" and "_EnableUpdateTarget" in momentary_rot_button being erroneously flagged as outputs instead of inputs, and added proper descriptions for them
-Updated various entities' documentation to reflect new research/information
-Fixed various missing keyvalues
-Fixed missing line dividers in various entities
-Fixed some entities still having a line divider as their last keyvalue
-Fixed missing fade distance sphere helpers on some entities
-Fixed various typos

Go to the update entry...
Download this version
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
Also, while making version 3, I discovered a neat fix for using light_spot in instances, and I dunno where to put it so I'll just put it here: Just set the light's pitch in the Pitch Yaw Roll to the negation of the Pitch override. (If you're using this FGD, you'll need to enable the Pitch Override keyvalue in the FGD's User Settings.)
unknown.png

This fixes the issue of light_spots rotating improperly in instances.
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
Version 3a
I spent 4 late nights experimenting with point_viewcontrol because i'm a huge nerd and that's what I do for fun. I'm sure this research will be incredibly useful to mappers and certainly won't go totally unnoticed at all haha

-Reverted the color of func_detail entities in the 2D views to the color in base.fgd to be more visually distinct from prop_static
-Added missing entity classes point_message, target_changegravity, and tf_point_weapon_mimic
-Improved documentation of triggers, filter_enemy, func_flag_alert, func_flagdetectionzone, and point_viewcontrol
-Added a list of supported localized strings (in English) for the Print Name in team_control_point
-filter_activator_class' filterclass and entity_spawn_manager's entity_name keyvalues now list every class supported by Team Fortress 2 (not including internal entities)
-Added info_overlay_transition to the Overlays auto-visgroup
-Fixed func_tanktrain, prop_detail, prop_physics_multiplayer, prop_physics_override, prop_physics_respawnable, prop_soccer_ball, tf_generic_bomb, and trigger_look missing various keyvalues/spawnflags/outputs
-Fixed improperly listed Message Text options in env_message
-Removed nonfunctional/unnecessary keyvalues from func_clip_vphysics
-Added Helper Model keyvalue to path_corner and path_corner_crash
-The default Helper Model of obj_sentrygun and obj_dispenser now match the default Starting Upgrade Level
-"ENTITY DOES NOT FUNCTION" keyvalue is now read-only
-tf_spawner is now marked as "DOES NOT FUNCTION", as the entity is only able to be used in tandem with special entity classes which do not exist in-game
-Added a warning at the top of the player entity's keyvalues indicating that it should not be manually placed
-Default health of func_physbox, func_physbox_multiplayer, func_pushable, prop_dynamic_override, and prop_physics_override is now 0
-Updated func_door_rotating's default spawnflags
-Rearranged 2D Skybox Material list in worldspawn to be alphabetical
-Re-added Map Title/Description keyvalue to worldspawn
-Removed origin keyvalue from env_embers, as that breaks the entity
-Added angles keyvalue to info_overlay
-Updated various entities' documentation to reflect new research/information
-Fixed various typos

Go to the update entry...
Download this version
 

Yaki

aa
Sep 3, 2018
416
254
Wanted to point out here and not keep bugging you on Discord.

  • The entity "math_colorblend" is missing from your FGD.
Keyvalues for this are:

targetname <string>
colormax <color255> (default: 255 255 255)
colormax <color255> (default: 0 0 0)
inmax <integer>
inmin <integer>

It also has a single flag: (1) Ignore out of range input values

page on VDC for I/O's: https://developer.valvesoftware.com/wiki/Math_colorblend
 
Last edited:

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
Version 3b: a random assortment of improvements
For the past 4 months now, I've just been accumulating various changes, fixes, and improvements I've made. Honestly some of these fixes are like... long overdue. So here you go.
...
I hope I'm not forgetting anything. EDIT: I did forget something, I added math_colorblend to the FGD and didn't add it to the changelog. Dolt.

-Added an option to the Line Dividers setting to show line dividers as blank lines instead of dashed lines
-Added Map Author keyvalue to worldspawn
-Added more Helper Model options
-Improved documentation of damage types
-Improved documentation of game_round_win and halloween_zapper
-Improved spawnflag inheritance
-Added default trigger size helper to dispenser entities
-Added a list of player/weapon attributes to trigger_add_or_remove_tf_player_attributes' Attribute Name keyvalue
-Combined Decal and Overlay visgroups
-Added Helper Model keyvalue to env_entity_maker
-Added radius helper for info_projecteddecal's Distance keyvalue
-Updated soundscape list to fix missing soundscapes
-Fixed missing entity class math_colorblend
-Fixed func_breakable_surf not rendering after being broken
-Fixed missing spawnflags in prop_dynamic_override
-Fixed missing Global State keyvalue in env_global
-Fixed missing Damage Filter keyvalue in func_button and func_rot_button
-Fixed missing Team keyvalues in projectile entities
-Fixed missing dynamic model keyvalues on item_teamflag and some other entities
-Fixed missing line dividers in tank_boss
-Fixed BaseTriggerPhysics improperly being listed as a brush entity
-Fixed logic_measure_movement's SetTarget input being improperly listed as simply Target
-Fixed missing func_brush keyvalues in func_respawnroomvisualizer
-Renamed all BaseClasses for improved searchability and to reduce conflict with other FGDs
-Updated various entities' documentation to reflect new research/information
-Fixed various typos

Go to the update entry...
Download this version
 
Last edited:

Yaki

aa
Sep 3, 2018
416
254
In one of the latest H++ updates, it changes the blank model keyvalue for Helper Models into a cube. This cube covers the logic entities' icons that use the Helper Model, which can be pretty unfortunate.

To fix this, I used model/empty.mdl and placed this directory here in your FGD:
1647375525751.png
 
Last edited:

Yaki

aa
Sep 3, 2018
416
254
Writing another comment about how I love this FGD and wanted to help update it.
  • Entity logic_playerproxy doesn't exist in TF2.
  • Output OnTrigger only works on trigger_multiple.
  • Brush ent func_regenerate does not support of outputs like OnStartTouch, OnTrigger, etc. like trigger_multiple does.
  • I think I added these keyvalues powerup_model to your FGD (aka they're missing to the public):
    • entities missing keyvalue powerup_model :
      • item_healthkit* and the like
      • item_ammopack* ^
      • item_currencypack* ^
      • tf_halloween_pickup
      • tf_spell_pickup
      • probably tf_bonus_duck_pickup and tf_halloween_gift_pickup but I'm not sure
  • tf_spell_pickup doesn't have a teamnum option
  • rd_robot_dispenser is an entity, similar to pd_dispenser, but gives only 5 HP/sec and no ammo whatsoever. Used for the RD Robots in your base.
    • Keyvalues:
      • targetname
      • touch_trigger
      • spawnflags (4)
      • does not have defaultupgrade

Random notes
  • Can use logic_relay with a blank output and delay to add a buffer to any I/O chain
  • math_counter's OnGetValue fires after OutValue. This is always true if you chain OutValue -> GetValue -> OnGetValue.
 

kamuixmod

L1: Registered
Mar 27, 2013
11
0
Been meaning to ask but is it possible to add a flag to the point_viewport to affect all players?
 
Apr 18, 2019
5
4
Been meaning to ask but is it possible to add a flag to the point_viewport to affect all players?
I know it's super late but you can't add a flag that doesn't exist for an entity. The fdg just defines what you can see in hammer for stuff that already exists, it doesn't create new stuff for entities.

Use this if you want it to work for multiple people.