AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Changing the max entity limit? (https://forums.alliedmods.net/showthread.php?t=54117)

hlstriker 04-17-2007 12:55

Changing the max entity limit?
 
I was wondering if there is a known way to change the max entity limit. Some maps I run on my server crash because the plugins I use add more entities to the map, and the map already has max.

Freecode 04-17-2007 17:22

Re: Changing the max entity limit?
 
no the limit is built into the engine.

teame06 04-17-2007 17:56

Re: Changing the max entity limit?
 
Quote:

Originally Posted by hlstriker (Post 466354)
I was wondering if there is a known way to change the max entity limit. Some maps I run on my server crash because the plugins I use add more entities to the map, and the map already has max.

Ask valve to up the limit? IIRC I believe someone tried requested this before. I forgot who and if they got a no or yes answer or not.

VEN 04-18-2007 05:53

Re: Changing the max entity limit?
 
The only thing you can do is increase maxplayers. Each additional slot will increase maxEntities by 15.

Lord of Destruction 04-18-2007 08:28

Re: Changing the max entity limit?
 
Quote:

Originally Posted by Alfred Reynold
Alrighty, I have added a "-num_edicts <x>" command line option to the HL1 engine. Run the game with "-num_edicts 2048" to get more entities into a level. The maximum possible value depends on your specific mod code and memory constraints so feel free to play around with various values, just don't drop below 900. ... .

We asked them a few months ago ^^

diamond-optic 04-23-2007 10:43

Re: Changing the max entity limit?
 
is that actually real? i tried to test it out on dod... and when setting it to really low numbers.. like 10 or so.. shouldnt it crash right from the beginning? as 10 wouldnt be enough for any map.. but it boots up just fine and doesnt seem any different then if i dont put that on the command line..

Orangutanz 04-23-2007 11:48

Re: Changing the max entity limit?
 
This does work as well :mrgreen:
-dll addons/metamod/dlls/metamod.dll -num_edicts 2047

There doesn't seem to be a cap limit either I had over 10,000 entities.

By default it looks like HL engine registers 900 edicts.
When I tried this on CS it adds an additional MAXPLAYERS * 15 on top of your num_edicts value.

[edit]
Just tried setting it to 1.
It seems to reset to the safety limit so in CS's case is MAXPLAYERS * 15 + 900

pRED* 04-23-2007 18:19

Re: Changing the max entity limit?
 
Move this to scripting tutorials?

Definately worth keeping handy...

Nican 04-23-2007 20:36

Re: Changing the max entity limit?
 
EDIT:
Never mind. I found it out.

mogel 04-25-2007 15:58

Re: Changing the max entity limit?
 
Hi,

Quote:

Originally Posted by Orangutanz (Post 468652)
-num_edicts 2047

nice :up: ... but ... how can i detect the maximum or the free number of entities ... at the time i use this code

Code:

public TestEntityThread(number) {
    log_amx("create entity #%i", number)

    new Float:origin[3]
    origin[0] = 0.0
    origin[1] = 0.0
    origin[2] = number * 1.0
   
    new entity = create_entity("info_target")
    entity_set_string(entity, EV_SZ_classname, "testentity")
    entity_set_model(entity, "models/woodgibs.mdl")
    entity_set_origin(entity, origin)

    entity_set_int(entity, EV_INT_movetype, MOVETYPE_TOSS)

    set_task(0.1, "TestEntityThread", number + 1)
}

i know ... that will crash the server :mrgreen:

hand, mogel


All times are GMT -4. The time now is 17:50.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.