Day of Defeat: Source (custom).fgd
Jump to navigation
Jump to search
Tip:Select the beginning of the line (usually the "//" comment) by clicking it, scroll down then hold ⇧ Shift, and click at the end of the line to select all.

This is a draft page. It is a work in progress open to editing by anyone.
Remember to check for any notes left by the tagger at this article's talk page.
Remember to check for any notes left by the tagger at this article's talk page.
Unofficial updated version of Day of Defeat: Source.fgd. Requires Hammer++ for some features; not tested in
Hammer 4.x.
This FGD requires a few extra assets; they can be downloaded here (direct download). Extract the VPK from the 7z, and place it in Day of Defeat Source/dod/custom/
.
- Todo: The player models in the above download are rotated either 90° or 270° in the wrong direction; pester the FGD author to fix this
FGD
- This is a FGD (Forge Game Data) file used to define all of the entities of a game for a map editor (such as Hammer).
To add a FGD file to the map editor, copy the following text into a text editor such asNotepad++, and save it with "save as type" being "all files" and .fgd appended to the file name. Then open your map editor and add the FGD to your game configuration.

//====== Copyright © 1996-2005, Valve Corporation, All rights reserved. =======
//
// Purpose: Day of Defeat: Source game definition file (.fgd)
//
// Updated by SirYodaJedi
//
//=============================================================================
@include "base.fgd"
//-------------------------------------------------------------------------
//
// Base Classes
//
//-------------------------------------------------------------------------
@BaseClass = Target
[
// unused leftover from GoldSrc?
target(target_destination) : "Target"
]
@BaseClass = TeamNum
[
TeamNum(choices) : "Team" : 0 =
[
0 : "Neutral"
2 : "Allies"
3 : "Axis"
]
input SetTeam(integer) : "Changes the entity's team (0=Neutral,2=Allies,3=Axis)"
]
@BaseClass base(Targetname, Angles) = DoDSWeapon
[
ammo(integer) : "Ammo to include"
]
@FilterClass base(BaseFilter) size(-8 -8 -8, 8 8 8) = filter_activator_team :
"A filter that filters by the team of the activator."
[
filterteam(choices) : "Filter Team Number" : 2 : "The team number to filter by.\nIf the filter mode is Allow, only entities whose team number matches the given team will pass the filter. If the filter mode is Disallow, all entities EXCEPT those whose team number matches the given team will pass the filter." =
[
2 : "Allies"
3 : "Axis"
]
]
//-------------------------------------------------------------------------
//
// Point Classes
//
//-------------------------------------------------------------------------
// Player spawns
// Attempting to use the actual playermodels causes weird rotation issues
// (and looks weird, because hammer t-poses instead of using default anim)
@PointClass base(Angles,Targetname,EnableDisable) studio("models/editor/american_rifleman.mdl") = info_player_allies :
"This entity marks the start point for Allied players.\nPlace 16 units above the ground to prevent spawn from being invalid." []
// modified playerstart.mdl recolored red
@PointClass base(Angles,Targetname,EnableDisable) studio("models/editor/german_rifleman.mdl") = info_player_axis :
"This entity marks the start point for Axis players.\nPlace 16 units above the ground to prevent spawn from being invalid." []
// Weapons -- TODO (VDC has wrong names for several; fix those first)
@PointClass base(DoDSWeapon) studioprop("models/weapons/w_stick.mdl") = grenade_frag_ger : "" []
@PointClass base(DoDSWeapon) studioprop("models/weapons/w_stick.mdl") = grenade_frag_ger : "" []
// etc...
// DoD game logic
@PointClass base(Targetname, EnableDisable) iconsprite("editor/dod_icon.vmt") = info_doddetect : "DoD Gamerules"
[
//Respawn factor
//==============
detect_allies_respawnfactor(string) : "Allies Respawn delay factor" : "1.0"
detect_axis_respawnfactor(string) : "Axis Respawn delay factor" : "1.0"
// default is 5, because that's the actual default used by game code
detect_allies_startroundvoice(choices) : "Start round command for Allies" : 5 =
[
0 : "Attack"
1 : "Defend"
2 : "Beach"
3 : "Timed Attack"
4 : "Timed Defend"
5 : "Flags"
]
detect_axis_startroundvoice(choices) : "Start round command for Axis" : 5 =
[
0 : "Attack"
1 : "Defend"
2 : "Beach"
3 : "Timed Attack"
4 : "Timed Defend"
5 : "Flags"
]
]
@PointClass base(Targetname,TeamNum) iconsprite("editor/enigma.vmt") = dod_scoring : "Custom Scoring"
[
point_give_delay(integer) : "Seconds between point gives" : 60
point_give_amount(integer) : "Points to give each time" : 1
point_give_max_times(integer) : "Max number of times to give points" : 10
input GiveTickPoints(integer) : "Give tick points to the selected team"
]
@PointClass base(Targetname,EnableDisable) iconsprite("editor/dod_flag.vmt") = dod_control_point_master : "Control Point Master"
[
cpm_use_timer(choices) : "Use round timer?" : 0 =
[
0 : "No"
1 : "Yes"
]
cpm_timer_length(integer) : "Round timer length in seconds" : 300
cpm_timer_team(choices) : "Which team wins when timer expires" : 0 =
[
0 : "Neither"
2 : "Allies"
3 : "Axis"
]
output OnAlliesWin(void) : "Output sent when Allies win the round. Do not use for victory music; overwrite `Game.USWin` soundscript in `maps/<mapname>_sounds.txt` instead."
output OnAxisWin(void) : "Output sent when Axis win the round. Do not use for victory music; overwrite `Game.USWin` soundscript in `maps/<mapname>_sounds.txt` instead."
input AddTimerSeconds(integer) : "Add seconds to the duration of the round timer"
]
@PointClass base(Targetname) iconsprite("editor/dod_location.vmt") = dod_location : "Location"
[
location_name(string) : "Name of this location" : "TODO: Set Name"
]
@PointClass base(Targetname, EnableDisable, Angles) studio() = dod_control_point :
"A Control Point, representing a capturable objective; there can be up to 8 of these in a map.\n\nCan be the visual representation of the control point, or the model can be disabled and a prop_dynamic be used via this entity's outputs instead."
[
spawnflags(flags) =
[
1: "Hide Control Point on HUD" : 0
2: "Start with model hidden" : 0
4: "Give tick points for bombs remaining" : 0
]
point_printname(string) : "Location name" : "TODO: Set Name" : "The control point name displayed on the Hud when captured. Can be either a regular string or a reference to a localization string."
point_timedpoints_axis(integer) : "Time based point value for Axis" : 0 : "Points given to Axis as they own this flag over time."
point_timedpoints_allies(integer) : "Time based point value for Allies" : 0 : "Points given to Allies as they own this flag over time."
point_default_owner(choices) : "Default owner of the control point" : 0 =
[
0 : "Neutral"
2 : "Allies"
3 : "Axis"
]
point_axis_capsound(sound) : "Axis capture sound" : "Voice.German_FlagCapture" : "Sound made when Axis capture this point"
point_allies_capsound(sound) : "Allies capture sound" : "Voice.US_FlagCapture" : "Sound made when Allies capture this point"
point_resetsound(sound) : "Sound made when point resets" : ""
// first, we define some KVs that are used by Hammer++, but ignored by the game, to get around some editor hardcoding
model(studio) : "Editor model" : "models/mapmodels/flags.mdl" : "Model to display in the map editor (no effect in-game). This should match the model used by the default owner."
body(choices) : "Editor model bodygroup" : : "Bodygroup to use for the editor model (no effect in-game). This should match the bodygroup used by the default owner (descriptions given are for models/mapmodels/flags.mdl)." =
[
0 : "0 (Vanilla is German)"
1 : "1 (Vanilla is American)"
2 : "2 (Vanilla is British)"
3 : "3 (Vanilla is Neutral)"
]
// Then, the actual KVs used in-game
point_axis_model(studio) : "Axis model" : "models/mapmodels/flags.mdl" : "Model when Axis own the point"
point_axis_model_bodygroup(integer) : "Axis model bodygroup" : 0
point_allies_model(studio) : "Allies model" : "models/mapmodels/flags.mdl" : "Model to use when Allies own the point"
point_allies_model_bodygroup(integer) : "Allies model bodygroup" : 1
point_reset_model(studio) : "Neutral model" : "models/mapmodels/flags.mdl" : "Model when neither team owns the point"
point_reset_model_bodygroup(integer) : "Neutral model bodygroup" : 3
output OnAxisCap(void) : "Send when owner is changed to Axis (including round resets)"
output OnAlliesCap(void) : "Send when owner is changed to Allies (including round resets)"
output OnCapReset(void) : "Send when owner is changed to Neutral (including round resets)"
output AxisCapturePoint(void) : "Send when Axis capture this point (not triggered on round resets)"
output AlliesCapturePoint(void) : "Send when Allies capture this point (not triggered on round resets)"
point_group(integer) : "Group Index" : 0
point_index(integer) : "Index of this point (unique)" : 0 : "Unique identifier; used with dod_capture_area"
point_hud_icon_neutral(material) : "Hud icon - Neutral" : "sprites/obj_icons/icon_obj_neutral"
point_hud_icon_axis(material) : "Hud icon - Axis" : "sprites/obj_icons/icon_obj_axis"
point_hud_icon_allies(material) : "Hud icon - Allies" : "sprites/obj_icons/icon_obj_allies"
point_hud_icon_timercap(material) : "Hud icon - bomb planted" : "sprites/obj_icons/icon_obj_neutral"
point_hud_icon_bombed(material) : "Hud icon - point destroyed" : "sprites/obj_icons/icon_obj_neutral"
input HideModel(void) : "Hide the control point model"
input ShowModel(void) : "Show the control point model"
input SetOwner(integer) : "Set the current owner of this point (0=Neutral,2=Allies,3=Axis)"
point_num_bombs(choices) : "Number of Bombs required to destroy" : 0 : "The number of bomb required to destroy the point, if used as a bomb objective. Ignore if used as a flag." =
[
0 : "0"
1 : "1"
2 : "2"
3 : "3"
]
// ===== CBaseAnimating KVs and I/O that aren't overridden by dod_control_point =====
solid(choices) : "Collisions" : 0 : "Note that the default model lacks a collision mesh, so VPhysics will be unavailable." =
[
0 : "Not Solid"
2 : "Use Bounding Box"
6 : "Use VPhysics"
]
skin(integer) : "Skin" : : "Some models have multiple versions of their textures, called skins. Set this to a number other than 0 to use that skin instead of the default.\n\nUse the `skin` input with the `OnAxisCap`, `OnAlliesCap`, and `OnCapReset` outputs if you need to use different skins indices per faction."
modelscale(float) : "Model Scale" : : "A multiplier for the size of the model."
sequence(integer) : "Animation Sequence" : : "Default animation sequence for the model to be playing after spawning. (Default 0)"
lightingorigin(target_destination) : "Lighting Origin" : : "Name of entity (not info_lighting!) from which to sample lighting instead of this entity's origin or $illumposition."
disableshadows(choices) : "Disable Shadows" : "" : "Used to disable dynamic shadows on this entity." =
[
"" : "No"
1 : "Yes"
]
disablereceiveshadows(choices) : "Disable Receiving Shadows" : "" : "Prevent the entity from receiving dynamic shadows on itself."=
[
"" : "No"
1 : "Yes"
]
shadowcastdist(integer) : "Shadow Cast Distance" : : "Sets how far the entity casts dynamic shadows. 0 means default distance from the shadow_control entity."
// Inputs
input skin(integer) : "Changes the model skin to the specified number."
input DisableShadow(void) : "Turn shadow off."
input EnableShadow(void) : "Turn shadow on."
input AlternativeSorting(bool) : "Used to attempt to fix sorting problems when rendering. True activates, false deactivates"
input SetModelScale(string) : "Takes two values separated by a space. The first is the target model scale. The second value is the number of seconds the change in scale will be spread over."
// Outputs
output OnIgnite(void) : "Fired when this object catches fire."
]
@PointClass base(Targetname, Angles, EnableDisable) studioprop("models/weapons/w_tnt_red.mdl") line(0 128 0, targetname, target_control_point) = dod_bomb_target : "Bomb Target.\n\nTo create a team-agnostic bomb target, place two dod_bomb_targets in the same location with the same angles. Send the `Disable` input to the opposite team's bomb target via `OnBombPlanted`, and send the `Enable` input to the opposite team's bomb target via `OnBombDefused`."
[
target_control_point(target_destination) report : "Target Control Point" : "Control point to help capture. Leave blank if this is not tied to a control point."
bombing_team(choices) : "Bombing Team" : 2 =
[
2 : "Allies"
3 : "Axis"
]
output OnBombTargetActivated(void) : "Send when bomb target becomes active"
output OnBombTargetDeactivated(void) : "Send when bomb target becomes inactive"
output OnBombPlanted(void) : "Send when bomb is planted at this target"
output OnBombExploded(void) : "Send when timer expires and bomb explodes"
output OnBombDefused(void) : "Send when bomb is completely defused"
add_timer_seconds(integer) : "Add To Timer (sec)" : 0 : "Add this many seconds to the round timer when bomb explodes."
]
//-------------------------------------------------------------------------
//
// Solid Classes
//
//-------------------------------------------------------------------------
// This is not in base.fgd, but is in dod.fgd, so any changes should be made to both files!
@SolidClass = func_ladder : "Brush ladder. Players will be able to freely along this brush, as if it was a ladder.\n\nIf you are using toolsinvisibleladder or any other material with %CompileLadder, use func_detail instead, especially if does not have %CompileDetail as well."
[
targetname(string) : "Name" : : "Name to display in the map editor's 2D views and Entity Report; no effect in-game."
]
@SolidClass base(Targetname,EnableDisable) line(0 128 0, targetname, area_cap_point) = dod_capture_area : "Capture Area"
[
area_allies_cancap(choices) : "Can Allies Cap?" : 1 =
[
0 : "No"
1 : "Yes"
]
area_axis_cancap(choices) : "Can Axis Cap?" : 1 =
[
0 : "No"
1 : "Yes"
]
area_allies_numcap(integer) : "Number of Allies to cap" : 1
area_axis_numcap(integer) : "Number of Axis to cap" : 1
area_time_to_cap(integer) : "Time to cap (sec)" : 5
output OnAlliesStartCap(void) : "Sent when Allies start capture"
output OnAlliesBreakCap(void) : "Sent when Allies break capture"
output OnAlliesEndCap(void) : "Sent when Allies end capture"
output OnAxisStartCap(void) : "Sent when Axis start capture"
output OnAxisBreakCap(void) : "Sent when Axis break capture"
output OnAxisEndCap(void) : "Sent when Axis end capture"
output OnStartCap(void) : "Sent when either team starts capture"
output OnBreakCap(void) : "Sent when either team break capture"
output OnEndCap(void) : "Sent when either team end capture"
input RoundInit(void) : "Re-parse the ''area_allies_numcap'', ''area_allies_numcap'', and ''area_time_to_cap'' KVs"
area_cap_point(target_destination) report : "Linked control point" : "" : "Name of the control point this area is linked to"
]
@SolidClass base(Targetname,EnableDisable) = dod_bomb_dispenser : "Bomb Dispenser Area"
[
dispense_team(choices) : "Team to give bombs to" : 0 =
[
0 : "Both Teams"
2 : "Allies Only"
3 : "Axis Only"
]
]
@SolidClass base(Targetname) = func_team_wall : "Team Blocker Wall.\n\nUnlike func_teamblocker, it is able to be loaded via an ENT file, cannot have its team value changed, and is preserved between rounds."
[
blockteam(choices) : "Team to block" : 0 =
[
0 : "Neither"
2 : "Allies Only"
3 : "Axis Only"
]
warn(choices) : "Show warning" : "" : "Show warning when touching this entity as the enemy team." =
[
"" : "No"
"1" : "Yes"
]
mins(string) : "mins" : : "The uppermost and northernmost point of the bounding box; used instead of bmodel if present."
maxs(string) : "maxs" : : "The bottommost and southernmost point of the bounding box; used instead of bmodel if present."
]
@SolidClass base(Targetname, Parentname, TeamNum) = func_teamblocker :
"Walls that players of a certain team are unable to pass through.\n\nUnlike func_team_wall, it cannot be loaded via an ENT file, can have its team value changed with an input, and is reset between rounds."
[
spawnflags(flags) =
[
2: "Don't show hint when touched" : 0
]
]
//-------------------------------------------------------------------------
//
// Editor stuff
//
//-------------------------------------------------------------------------
@AutoVisGroup = "Entities"
[
"DoD Rules"
[
"info_doddetect"
"dod_scoring"
"dod_control_point_master"
//"dod_control_point"
]
"Objectives"
[
"dod_capture_area"
"dod_bomb_dispenser"
"dod_bomb_target"
"dod_control_point"
]
"Team Clip"
[
"func_teamblocker"
"func_team_wall"
]
]
@MaterialExclusion
[
// want to use custom hl_basics, not broken vanilla hlbasics
"hlbasics"
]