Garrys Mod.fgd/Trouble in Terrorist Town.fgd: Difference between revisions
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.
Thunder4ik (talk | contribs) m (→top: clean up, added orphan, underlinked tags) |
m (Updated to the latest version of the FGD as of March 29th, 2025.) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LanguageBar}} | ||
{{ | This is the {{hammer|1}} FGD from {{gmod|4}} ({{code|garrysmod.fgd}}). It is located in {{code|...\common\Garry's Mod\garrysmod\gamemodes\terrortown\ttt.fgd}}. | ||
{{ | |||
}} | |||
This FGD is used for the '''Trouble in Terrorist Town''' gamemode in {{gmod|1}}. | |||
==FGD== | |||
< | {{TextFile|FGD}} | ||
{{codeblock|src=ttt.fgd|lang=fgd|<nowiki> | |||
//------------------------------------------------------------------------- | //------------------------------------------------------------------------- | ||
// | // | ||
Line 14: | Line 13: | ||
//------------------------------------------------------------------------- | //------------------------------------------------------------------------- | ||
@include "base.fgd" | @include "base.fgd" | ||
@BaseClass color(0 0 200) base(Targetname, Angles, Shadow) = | @BaseClass color(0 0 200) base(Targetname, Angles, Shadow) = TTTItem | ||
[ | [ | ||
output OnPlayerTouch(void) : "Fires when the player touches this object" | output OnPlayerTouch(void) : "Fires when the player touches this object" | ||
] | ] | ||
@PointClass base( | @PointClass base(TTTItem) studio("models/items/boxsrounds.mdl")= item_ammo_pistol_ttt : "Box of Pistol ammo" [] | ||
@PointClass base( | @PointClass base(TTTItem) studio("models/items/boxmrounds.mdl")= item_ammo_smg1_ttt : "MAC10 ammo" [] | ||
@PointClass base( | @PointClass base(TTTItem) studio("models/items/357ammo.mdl")= item_ammo_357_ttt : "Box of Carbine ammo" [] | ||
@PointClass base( | @PointClass base(TTTItem) studio("models/items/BoxBuckshot.mdl")= item_box_buckshot_ttt : "Box Buckshot" [] | ||
@PointClass base( | @PointClass base(TTTItem) studio("models/items/357ammo.mdl")= item_ammo_revolver_ttt : "Box of Deagle ammo" [] | ||
@PointClass base( | @PointClass base(TTTItem) studio("models/items/boxflares.mdl")= ttt_random_ammo : "Random ammo" [] | ||
@PointClass base( | @PointClass base(TTTItem) studio("models/weapons/w_shotgun.mdl")= ttt_random_weapon : "Random weapon" [ | ||
auto_ammo(integer) : "Autospawn ammo items" : 0 : "Number of matching ammo entities to spawn around the weapon. Leave some room above this entity for the ammo, it will be spawned there, fall and end up around the gun. Set to 0 to disable." | auto_ammo(integer) : "Autospawn ammo items" : 0 : "Number of matching ammo entities to spawn around the weapon. Leave some room above this entity for the ammo, it will be spawned there, fall and end up around the gun. Set to 0 to disable." | ||
] | ] | ||
Line 61: | Line 60: | ||
@PointClass base(Weapon) studio("models/weapons/w_physics.mdl") = weapon_ttt_push : "Newton launcher" [] | @PointClass base(Weapon) studio("models/weapons/w_physics.mdl") = weapon_ttt_push : "Newton launcher" [] | ||
@PointClass base(Weapon) studio("models/weapons/w_IRifle.mdl") = weapon_ttt_phammer : "Poltergeist" [] | @PointClass base(Weapon) studio("models/weapons/w_IRifle.mdl") = weapon_ttt_phammer : "Poltergeist" [] | ||
@PointClass base(Weapon) studio("models/weapons/w_c4.mdl") = weapon_ttt_c4 : "C4" [] | |||
@PointClass base(Weapon) studio("models/weapons/w_slam.mdl") = weapon_ttt_teleport : "Teleporter" [] | |||
@PointClass base(Weapon) studio("models/weapons/w_smg_ump45.mdl") = weapon_ttt_stungun : "UMP Prototype" [] | |||
@PointClass base(Weapon) studio("models/props/cs_office/microwave.mdl") = ttt_health_station : "Health Station" [] | |||
@PointClass base(Weapon) studio("models/props/cs_office/paper_towels.mdl") = weapon_ttt_binoculars : "Binoculars" [] | |||
@PointClass base(Weapon) studio("models/Items/battery.mdl") = weapon_ttt_cse : "Visualizer" [] | |||
@PointClass base(Weapon) studio("models/props_lab/huladoll.mdl") = weapon_ttt_wtester : "DNA Scanner" [] | |||
@PointClass base(Weapon) studio("models/weapons/w_defuser.mdl") = weapon_ttt_defuser : "Defuser" [] | |||
@SolidClass base(Trigger, Targetname) iconsprite("editor/obsolete.vmt") = ttt_traitor_check : | @SolidClass base(Trigger, Targetname) iconsprite("editor/obsolete.vmt") = ttt_traitor_check : | ||
Line 100: | Line 107: | ||
0 : "No" | 0 : "No" | ||
1 : "Yes" | 1 : "Yes" | ||
] | ] | ||
cbar_buttons(choices) : "Crowbar unlocks buttons" : 1 : "Enable crowbar unlocking func_button entities that have a targetname set, using an Unlock input." = | cbar_buttons(choices) : "Crowbar unlocks buttons" : 1 : "Enable crowbar unlocking func_button entities that have a targetname set, using an Unlock input." = | ||
Line 120: | Line 127: | ||
0 : "No" | 0 : "No" | ||
1 : "Yes" | 1 : "Yes" | ||
] | ] | ||
input SetPlayerModels(string) : "Sets playermodel to use to the given model path. Because entities are spawned before players, you can use this to set a random playermodel using logic entities." | input SetPlayerModels(string) : "Sets playermodel to use to the given model path. Because entities are spawned before players, you can use this to set a random playermodel using logic entities." | ||
Line 131: | Line 139: | ||
@PointClass base(Targetname, Origin, Angles) = ttt_logic_role : | @PointClass base(Targetname, Origin, Angles) = ttt_logic_role : | ||
"Point ent a bit like a combination of a filter and a logic ent | "Point ent a bit like a combination of a filter and a logic ent. Tests if !activator is a certain role (detective/traitor/innocent/any) and fires output OnPass if true, or OnFail if not." | ||
[ | [ | ||
Role(choices) : "Player role to test for" : 1 : "Specifies what role the !activator of TestActivator should be for this entity to fire the OnPass output." = | Role(choices) : "Player role to test for" : 1 : "Specifies what role the !activator of TestActivator should be for this entity to fire the OnPass output." = | ||
Line 139: | Line 147: | ||
2 : "Detective" | 2 : "Detective" | ||
3 : "Any role" | 3 : "Any role" | ||
] | ] | ||
// Inputs | // Inputs | ||
Line 148: | Line 156: | ||
output OnFail(void) : "Fired in response to TestActivator input if the activator player is NOT of the role set in this ent." | output OnFail(void) : "Fired in response to TestActivator input if the activator player is NOT of the role set in this ent." | ||
] | ] | ||
@PointClass base(Targetname) iconsprite("editor/game_text.vmt") = ttt_game_text : | @PointClass base(Targetname) iconsprite("editor/game_text.vmt") = ttt_game_text : | ||
Line 159: | Line 168: | ||
3 : "Traitors only" | 3 : "Traitors only" | ||
4 : "All except traitors" | 4 : "All except traitors" | ||
] | ] | ||
message(string) : "Message Text" : "" : "Message to display in the top right." | message(string) : "Message Text" : "" : "Message to display in the top right." | ||
Line 169: | Line 178: | ||
] | ] | ||
@PointClass base(Targetname, Parentname, Origin) = ttt_traitor_button : | @PointClass base(Targetname, Parentname, Origin) sphere(UsableRange) = ttt_traitor_button : | ||
"A button only usable by traitors, and only shown on their HUD. Can be used from any point within 1024 units of the button." | "A button only usable by traitors, and only shown on their HUD. Can be used from any point within 1024 units of the button." | ||
[ | [ | ||
Line 224: | Line 233: | ||
] | ] | ||
[[Category: | @FilterClass base(BaseFilter) = ttt_filter_role : | ||
"A filter that filters by the role of the activator." | |||
[ | |||
Role(choices) : "Player role to filter for" : 1 : "The role to filter by. If the filter mode is Allow, only players with the given role will pass the filter. If the filter mode is Disallow, all players EXCEPT those whose role matches the given role will pass the filter." = | |||
[ | |||
0 : "Innocent" | |||
1 : "Traitor" | |||
2 : "Detective" | |||
] | |||
] | |||
</nowiki>}} | |||
[[Category:Garry's Mod]] | |||
[[Category:Source 1 FGDs]] |
Latest revision as of 14:35, 28 March 2025


This is the Hammer FGD from Garry's Mod (garrysmod.fgd). It is located in ...\common\Garry's Mod\garrysmod\gamemodes\terrortown\ttt.fgd.
This FGD is used for the Trouble in Terrorist Town gamemode in Garry's Mod.
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 as Windows Notepad,Notepad++ or
Visual Studio Code, 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 (Example for HL:S).
