Revision Difference
Structures/ENT#552656
<cat>struct</cat>
<structure>
<realm>Shared</realm>
<description>
Information about the ENT structure.
To learn more about scripted entities, <page text="see this page">Scripted_Entities</page>.
While some of the fields may be serverside or clientside only, it is recommended to provide them on both so addons could use their values.
<note>Values defined in ENT table can't be changed per instance. Initialize default values in <page>ENTITY:Initialize</page> or other hook</note>
</description>
<fields>
<item name="Base" type="string">The base entity to derive from. This **must** be a valid Lua entity</item>
<item name="Type" type="string">Type of the entity. This **must be one of these:**⤶
<item name="Type" type="string">Type of the entity. This **must** be one of these:⤶
* **anim**
* **brush**
* **point**
* **ai**
* **nextbot**
* **filter**
See <page>Scripted Entities</page> for a more detailed explanation of what each one is.</item>
<item name="ClassName" type="string">Entity class name of the entity (File or folder name of your entity).
**This is set automatically `after` the entity file is loaded.**</item>
<item name="ClassNameOverride" type="string" added="2023.09.29">If set, overrides the classname of the SWEP.</item>
<item name="Folder" type="string">The folder from where the entity was loaded. This should always be "entity/ent_myentity", regardless whether your entity is stored as a file, or multiple files in a folder. **This is set automatically `before` the entity file is loaded.**</item>
<item name="AutomaticFrameAdvance" type="boolean" default="false">Set this to true if your entity has animations. You should also apply changes to the <page>ENTITY:Think</page> function from the example on that page.</item>
<item name="Category" type="string" default="Other">(Clientside) Spawnmenu category to put the entity into</item>
<item name="Category" type="string" default="Other" realm="client">Spawnmenu category to put the entity into</item>
<item name="Spawnable" type="boolean" default="false">Whether this entity should be displayed and is spawnable in the spawn menu</item>
<item name="Editable" type="boolean" default="false">Whether the entity supports Editing. See <page>Editable Entities</page> for more info.</item>
<item name="AdminOnly" type="boolean" default="false">Whether or not only admins can spawn the entity from their spawn menu</item>
<item name="PrintName" type="string" default="">(Clientside) Nice name of the entity to appear in the spawn menu</item>
<item name="Author" type="string" default="">(Clientside) The author of the entity</item>
<item name="Contact" type="string" default="">(Clientside) The contacts of the entity creator</item>
<item name="Purpose" type="string" default="">(Clientside) The purpose of the entity creation</item>
<item name="Instructions" type="string" default="">(Clientside) How to use your entity</item>
<item name="RenderGroup" type="number" default="RENDERGROUP_OPAQUE">(Clientside) The entity's render group, see <page>Enums/RENDERGROUP</page>.</item>
<item name="DisableDuplicator" type="boolean" default="false">(Serverside) Disable the ability for players to duplicate this entity.</item>
<item name="ScriptedEntityType" type="string" default="">(Clientside) Sets the spawnmenu content icon type for the entity, used by spawnmenu in the Sandbox-derived gamemodes.
<item name="PrintName" type="string" default="" realm="client">Nice name of the entity to appear in the spawn menu</item>
<item name="Author" type="string" default="" realm="client">The author of the entity</item>
<item name="Contact" type="string" default="" realm="client">The contacts of the entity creator</item>
<item name="Purpose" type="string" default="" realm="client">The purpose of the entity creation</item>
<item name="Instructions" type="string" default="" realm="client"> How to use your entity</item>
<item name="RenderGroup" type="number" default="RENDERGROUP_OPAQUE" realm="client">The entity's render group, see <page>Enums/RENDERGROUP</page>.</item>
<item name="DisableDuplicator" type="boolean" default="false" realm="server">Disable the ability for players to duplicate this entity.</item>
<item name="ScriptedEntityType" type="string" default="" realm="client">Sets the spawnmenu content icon type for the entity, used by spawnmenu in the Sandbox-derived gamemodes.
See <page>spawnmenu.AddContentType</page> for more information.</item>
<item name="DoNotDuplicate" type="boolean" default="false">(Serverside) If set, the entity will not be duplicated via the built-in duplicator system.</item>
<item name="IconOverride" type="string" default="materials/entities/<ClassName>.png">(Clientside) If set, overrides the icon path to be displayed in the Spawnmenu for this entity.</item>
<item name="DoNotDuplicate" type="boolean" default="false" realm="server">If set, the entity will not be duplicated via the built-in duplicator system.</item>
<item name="IconOverride" type="string" default="materials/entities/<ClassName>.png" realm="client">If set, overrides the icon path to be displayed in the Spawnmenu for this entity.</item>
<item name="PhysgunDisabled" type="boolean" default="false">If set, the entity forbid physgun interaction.</item>
</fields>
</structure>