Source Entities:Entity pages

Src Ents has a pretty complex system for documenting entities. Do note that every entity will have a page for the classname, and a page for the code class. (don't freak out, it's actually not that bad)

First, are you making a page for the code class or the classname? Your exact answer to this question might change, depending on the answer to the next.
 * Code class
 * Classname (You probably want this one)

The rest of this page is a small FAQ devoted to answering some questions editors may have.

How can I find entity info if it's not in the FGDs?
Logically, search in code. Here's some public code repos:
 * https://github.com/ValveSoftware/source-sdk-2013/ - Source 2013 Multiplayer (and Singleplayer). Not as complete as some other repos, but it's the most up to date code available for some games.
 * https://github.com/VSES/SourceEngine2007/ - Source 2007 games. This repo has a lot of code in it, but take it with a grain of salt cause it's far from up-to-date, especially regarding TF2.
 * Half-Life 2
 * Episodic
 * Lost Coast
 * HL2DM
 * DODS
 * CSS
 * Portal
 * TF2
 * Misc. including HL2: Episode 3, HL:S, unfinished TFC port.
 * https://github.com/NicolasDe/AlienSwarm/ - This is simply a copy of the code that ASW is bundled with. Handy if you don't have that game downloaded. Also has a few bits from L4D1/2 and HL2: Episode 3.
 * https://github.com/raxxor45/ValveSecurity/ - Has most of the same stuff you'll find in the VSES SourceEngine2007 leak, but we do know it has some previously unknown SDK tools.
 * https://github.com/perilouswithadollarsign/cstrike15_src/ - CS:GO code from 2017 (yes, that code).
 * https://github.com/TheAlePower/TeamFortress2/ - TF2 code from 2017.
 * https://github.com/ValveSoftware/halflife/ - Valve's official repo for GoldSrc games. Has code for HL (not expansions), Ricochet, and Deathmatch Classic.
 * https://github.com/sigsegv-mvm/mvm-reversed/blob/master/Useful/classgraph-l4d2/ServerLinux-server_srv.txt - A list of almost every c++ class in Left 4 Dead 2 and what they inherit. Made before the last stand update. Same repo also has a list for L4D1.

To find the code class associated with an entity, look for a macro called. It will have the classname and the code class next to each other.

To find what class another class inherits from, search for. Be careful cause sometimes multiple classes will be listed even though they aren't "entity" classes.

The bulk of the data we need will be in what's called the data description. Find this by looking for the  macro. This will not include some keyvalues. Be sure to also check for anything under the function  if it exists. If both of these are missing, the entity or class very likely doesn't have any keyvalues, inputs, or outputs unique to it. Flags are usually done like this: There's no standard way to define flags apparently, though this is the most common.
 * 1) define	SF_ENVEXPLOSION_NODAMAGE	0x00000001 // when set, ENV_EXPLOSION will not actually inflict damage
 * 2) define	SF_ENVEXPLOSION_REPEATABLE	0x00000002 // can this entity be refired?
 * 3) define SF_ENVEXPLOSION_NOFIREBALL	0x00000004 // don't draw the fireball
 * 4) define SF_ENVEXPLOSION_NOSMOKE		0x00000008 // don't draw the smoke
 * 5) define SF_ENVEXPLOSION_NODECAL		0x00000010 // don't make a scorch mark
 * 6) define SF_ENVEXPLOSION_NOSPARKS	0x00000020 // don't make sparks
 * 7) define SF_ENVEXPLOSION_NOSOUND		0x00000040 // don't play explosion sound.

What if the game doesn't have public code?
You'll need these. These will show you everything except for flags and keyvalues that got defined through the  method. We also have every stock FGD uploaded, so you can find info you need there as well if it's something not in the datamaps.

How should I categorize the pages?

 * Classname pages with info (e.g. info_target): Add a category for the parent class of the one the entity is tied to. (For example, info_target's class is CInfoTarget, which inherits CPointEntity, so add ) Internal entities don't have associated classes, so skip this category for them. Also try to add a category for what the entity is for, such as Category:VFX. Some entities will fit into multiple categories or none, so it's okay to have none or multiple of these categories. Other categories such as Category:Entities are automatically added by templates.
 * Class pages with info (e.g. CBaseAnimating): None. Category:Code classes is automatically added by Template:Class.
 * Class categories (e.g. Category:CBaseCombatCharacter): Add one for the class it inherits from. If it inherits from different classes in different games, add a category for each one.
 * Classname pages redirecting to class pages (e.g. weapon_cs_base): Add the categories that Template:Entity would usually add, like Category:Entities, Category:Point entities, Category:Source base entities, and so on, and try to add a category for what the entity is for, such as Category:VFX. Do not add a class category.
 * Class pages redirecting to classname pages (e.g. CNPC_Alyx): Add Category:Code classes only.
 * Combination class and classname pages (e.g. Boomer): Treat it like both at once. Add Category:Code classes and any categories that would normally be added to a classname page containing info.