Entity limit: Difference between revisions
SirYodaJedi (talk | contribs) m (→VMF Limits) |
mNo edit summary |
||
Line 12: | Line 12: | ||
In {{svencoop|4.1}}, the limit has been raised to 8192. | In {{svencoop|4.1}}, the limit has been raised to 8192. | ||
Prior to {{hl|4}}'s 25th anniversary update, the default edict limit was 900. | Prior to {{hl|4.1}}'s 25th anniversary update, the default edict limit was 900. | ||
== {{source|4}} limits == | == {{source|4}} limits == | ||
Line 19: | Line 19: | ||
# Entities with associated [[edict]]s, which can cross the client/server divide. | # Entities with associated [[edict]]s, which can cross the client/server divide. | ||
* In {{gmod| | * In {{gmod|4.1}}, there can be up to 16384 entities, split into two groups of 8192. | ||
* In {{mapbase|4.1}}, there can be up to renderable 16384 entities {{ref|1}} | |||
{{todo|What does "renderable entities" mean?}} | |||
If the game tries to assign a 2049th edict it will exit with an error message, but if it tries to create a 2049th non-networked entity it will merely refuse and print a warning to the console. The logic behind this may be that an entity spawned dynamically (i.e. not present in the map) but not assigned an edict probably isn't too important. | If the game tries to assign a 2049th edict it will exit with an error message, but if it tries to create a 2049th non-networked entity it will merely refuse and print a warning to the console. The logic behind this may be that an entity spawned dynamically (i.e. not present in the map) but not assigned an edict probably isn't too important. | ||
Line 34: | Line 36: | ||
=== VMF Limits === | === VMF Limits === | ||
Hammer itself has no entity limit, but {{vbsp|4}}'s is 8192 (16384 in {{as| | Hammer itself has no entity limit, but {{vbsp|4}}'s is 8192 (16384 in {{as|4.1}}, 20480 in {{csgo|4.1}}). {{note|This is a soft limit; a modded [[VBSP]] is capable of compiling as many entities as memory allows.}} | ||
This is double the combined total accepted by the engine, which may be because it at first treats [[internal entity|internal entities]] (such as {{ent|prop_static}} and {{ent|env_cubemap}}) like normal entities, or perhaps because it generates a lot of [[detail props]]. | This is double the combined total accepted by the engine, which may be because it at first treats [[internal entity|internal entities]] (such as {{ent|prop_static}} and {{ent|env_cubemap}}) like normal entities, or perhaps because it generates a lot of [[detail props]]. | ||
Line 50: | Line 52: | ||
== External links == | == External links == | ||
* [https://rafuron.wordpress.com/category/mapping-tricks/ mapping tricks to get around the Entity limit] | * [https://rafuron.wordpress.com/category/mapping-tricks/ mapping tricks to get around the Entity limit] | ||
== References == | |||
<ol> | |||
<li> Mapbase 3.1 Release Notes https://www.moddb.com/mods/mapbase/news/mapbase-v3-1-released ''ModDB'' Retrieved ''Wednesday, March 6, 2024'' | |||
</ol> |
Revision as of 13:45, 6 March 2024
For reasons of memory allocation, there is a limit to the number of entities GoldSrc/
Source/
Source 2 can manage at once.
The combined size (in bytes) of a map's entity data should also be considered, even if the number of entities is within safe limits. Large amounts of entdata can take a noticeably long time to transmit from server to client, and may lead to crashes.

GoldSrc limits
The default edict limit is 1200, but this can be raised to 2048 by editing the mod's liblist.gam to include edicts "2048".
This can safely be done for singleplayer mods, but should not be relied upon for multiplayer maps for existing games, as the server and all clients must agree upon the edict limit.
In Sven Co-op, the limit has been raised to 8192.
Prior to Half-Life's 25th anniversary update, the default edict limit was 900.
Source limits
There can be up to 4096 entities. This total is split into two groups of 2048:
- Non-networked entities, which exist only on the client or server (e.g. death ragdolls on client, logicals on server).
- Entities with associated edicts, which can cross the client/server divide.
- In
Garry's Mod, there can be up to 16384 entities, split into two groups of 8192.
- In
Mapbase, there can be up to renderable 16384 entities [1]
If the game tries to assign a 2049th edict it will exit with an error message, but if it tries to create a 2049th non-networked entity it will merely refuse and print a warning to the console. The logic behind this may be that an entity spawned dynamically (i.e. not present in the map) but not assigned an edict probably isn't too important.
The two entity lists are created by CBaseEntityList::CBaseEntityList()
using NUM_ENT_ENTRIES
and MAX_EDICTS
. Neither of those values can be changed without breaking compatibility with the engine.

sprite_clientside
, or detail props do not count toward either limit.

report_entities
and cl_showents
to get an idea of how many entities are present at that current state.
VMF Limits
Hammer itself has no entity limit, but VBSP's is 8192 (16384 in
Alien Swarm, 20480 in
Counter-Strike: Global Offensive).

This is double the combined total accepted by the engine, which may be because it at first treats internal entities (such as prop_static and env_cubemap) like normal entities, or perhaps because it generates a lot of detail props.
VBSP also recommends an entdata size limit of 384KB, but this is in no way enforced.
Source 2 limits
In Source 2, specifically
S&box, the networked entity limit is 16384 edicts.
There appears to be no limit for map compiles, or it is tied to the networked entity limit.
See also
External links
References
- Mapbase 3.1 Release Notes https://www.moddb.com/mods/mapbase/news/mapbase-v3-1-released ModDB Retrieved Wednesday, March 6, 2024