Useful FGD Modifications
|Empires Mapping Documentation|
|Mapping Overiew | Hammer Configuration | Entity Index | Basic Mapping | Setup Resources | Tutorials | Useful FGD Modifications|
What is the FGD?
The FGD file contains definitions of all the entities used by the Hammer editor. It can be found under sourcemods/Empires/mapsrc/fgd/empires.fgd. The entities listed below behave exactly the same as they would in any other source mod, and as such their usage will not be covered in this guide. All code should be appended to the end of the file, unless otherwise stated.
|Tip: Before making any modifications it is advisable to create a backup of this file.|
@SolidClass = func_ladder : "Ladder. Players will be able to freely along this brush, as if it was a ladder. If you are using a model prop " + "for the visual representation of the ladder in the map, apply the toolsinvisibleladder material to the " + "func_ladder brush." [ ]
Respawning Physics Props (prop_physics_respawnable)
@PointClass base(prop_physics) studioprop() sphere(fademindist) sphere(fademaxdist) = prop_physics_respawnable : "This class is the same as prop_physics, except it respawns after it breaks" [ RespawnTime(float) : "Respawn Time" : 60 : "Ammount in seconds this prop will respawn after it breaks." ]
Team-Based Filters (filter_activator_team)
@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. If 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 : "Northern Faction" 3 : "Brenodi Empire" ] ]
Find the entities you wish to add the output to. The most useful one is emp_eng_map_brush. Its definition should begin as follows:
@SolidClass base(Targetname) = emp_eng_map_brush : "An entity which when enabled can be built by the owning team's engineer into a defensive structure such as a wall or barricade." [
From here, locate the output section. Unmodified, it will contain the two values shown below:
output OnNFBuilt(void) : "Output for Northern Faction fully building the object." output OnImpBuilt(void) : "Output for Brenodi Empire fully building the object."
After these two lines, add the following:
output OnKill(void) : "Output for destruction of the object."