Questions surrounding entity limit Created 6 years ago2017-12-01 00:28:35 UTC by User#6970 User#6970

Created 6 years ago2017-12-01 00:28:35 UTC by User#6970 User#6970

Posted 6 years ago2017-12-01 00:28:35 UTC Post #338257
Hi, I get the "ED_ALLOC: no free edicts" error. It's no surprise. I exaggerated with the entities.

Now I need to cut, but there are a few things I wanted to know:

-Is there a way to know of how many one's busting the entities limit?
-Do lights count as entities and can light textures replace them without creating entities?

Thanks as always
Posted 6 years ago2017-12-01 02:40:15 UTC Post #338258
If you enable the -chart flag you'll get a nice list of object names and their maximum objects and memory usage. It'll look like this:
User posted image
Point light entities do count towards the entity limit, texture-lights do not, but don't quote me on that.
The Mad Carrot The Mad CarrotMad Carrot
Posted 6 years ago2017-12-01 05:47:30 UTC Post #338259
It is most handy to do -chart with HLRAD and HLVIS at the end of the compiles
Posted 6 years ago2017-12-01 07:29:07 UTC Post #338260
Named lights count toward the limit, unnamed lights do not.

You can increase the maximum number of entities to 2048 with the command line parameter -num_edicts 2048, or by editing liblist.gam and adding this:
"edicts" "2048"
Note that anyone that plays your map will also have to add this.

There is no way to check how many entities above the limit you're at, since entities spawned by other entities also count, and the game doesn't check how many are left when this error occurs.
Posted 6 years ago2017-12-01 18:35:59 UTC Post #338265
Yeah. That exactly happened to me some time ago with a looping multi_manager. You had to complete the map in a short time or the game would crash :P
Posted 6 years ago2017-12-01 19:13:43 UTC Post #338266
Wow!!, like putting INT_ASM 3 into the code!! (I think that was the line of code). :crowbar:
Posted 6 years ago2017-12-01 19:40:09 UTC Post #338267
"If you enable the -chart flag"

On what exe?

Edit: I see it's on every compile tools.

"Note that anyone that plays your map will also have to add this."

If it's a multiplayer map, does anyone playing need to add num_edicts 2048 or only the server?

"Named lights count toward the limit, unnamed lights do not."

Meaning you can add as many light entities you want as long as their aren't named?
Posted 6 years ago2017-12-01 19:52:00 UTC Post #338270
%..Warning: Illegal Brush (edge without opposite face): Entity 1270, Brush 0

.80%...90%.Warning: Illegal Brush (edge without opposite face): Entity 853, Brush 0
Should probably fix this. If there are any warnings or errors during compilation then it probably won't work properly anyway.
Posted 6 years ago2017-12-01 20:10:48 UTC Post #338271
Both are spheres cut in half. I don't know how to fix this and all seems to work anyways. Not that I don't want to fix it.

Can I leave it like this or it automatically breaks something else?

Edit: What I'll do is not cut the spheres. That's it. It worked. No more error.
Posted 6 years ago2017-12-01 20:22:11 UTC Post #338273
OK it's -num_edicts and not +num_edicts. I don't think it's a cvar.
This way I can keep mapping until then end (only lighting left) at which I will start cutting until the error goes away.

So guys, it seems that the -chart switch didn't really help isn't it?
Posted 6 years ago2017-12-01 20:52:42 UTC Post #338274
All -chart does is give you information, it doesn't fix anything.
Posted 6 years ago2017-12-01 22:03:15 UTC Post #338275
Yes I know, but none of the percentages where close to 100%, but still had the error message. It's not very helpful / straightforward. Like I can't conclude of how many entities I exceed with the provided numbers.
Posted 6 years ago2017-12-03 04:47:57 UTC Post #338284
Brushwork spheres? Goldsource doesn't play nice with those.
Is there a way you can replace that for a model?

I think i also ran into the ALLOCBLOCK error once before due to an excess of clipnodes.

Try changing fancy brushwork into func_illusionaries and then placing rectangular clip brushes over the geometry to simplify your clip nodes.

If you don't want to use a model for those spheres, I'd start there

Also which set of compile tools are you using?
Tetsu0 Tetsu0Positive Chaos
Posted 6 years ago2017-12-04 00:13:03 UTC Post #338297
A huge thing that I found was using func_detail (have you loaded the fgd & wad for the tool extra textures for your newer compilers?) on any detail or complex brush prop. A reduction in clipnodes is to change your func_details to "passable" "yes" then place a simple clipnode brush(es) as your collision.
Posted 6 years ago2017-12-04 03:52:08 UTC Post #338300
Hi Guys,

I'm using UMHLT. Yes I imported its fgd. I see func_detail and stuff.

There's one sphere that was just for show. I turned it into a passable func_detail.

There's two other spheres that are func_pushables. I'll consider removing at least one of them when I'm desperate.

There's one last sphere that I'd like to leave as is. I want the player to be able to walk on it.

Thanks for the tips to spare clipnodes. That makes sense.
Posted 6 years ago2017-12-04 12:13:38 UTC Post #338301
Be careful when turning complex brushwork into func_pushable, the physics in this game is pretty simple and won't work that well with it, it'll clip through walls and other objects.

IIRC You can sort of cheat by using 1 unit high clip brushes on the ground to fit to the physics mesh for the object, it'll visually bump into objects when you do that.
Posted 6 years ago2017-12-04 17:14:13 UTC Post #338307
"it'll clip through walls and other objects."

It worked flawlessly so far.
Posted 6 years ago2017-12-07 21:41:14 UTC Post #338339
I transformed a couple of complex objects into passable func_details and added a clip brush on top of them, but I see no difference in game, meaning that I can't walk on them as a big rectangle.

Am I doing something wrong?

I also went dichotomic with the -num_edicts switch and figured out that I need to pass 1112 as a minimum value for the game to run. It exceeds the default value of 900 by 212. Yikes! Granted we're talking about entities here. That's a lot of stuff to cut!
Posted 6 years ago2017-12-07 21:59:13 UTC Post #338340
"Am I doing something wrong?"

I had an issue with JACK, now I can see my changes.

The required num_edicts value has dropped from 1112 to 996. Which is far from being bad. However it's still a bit far from the target.

Note that I removed as well as turned a lot of entities into func_details.
Posted 6 years ago2017-12-07 22:00:31 UTC Post #338341
I wouldn't try to go for a specific maximum because new entities can still be created while playing. Just use 2048, it's the maximum and it won't make any real difference.
Remember, this engine is 19 years old, even at its worst it won't really tax modern computers.
Posted 6 years ago2017-12-07 22:22:21 UTC Post #338342
The problem is that it's a multiplayer map. I can't afford requiring people to specify the num_edicts switch for playing.

I think the only solution is to get num_edicts count as low as possible (800 seems reasonable) and do a lot of testing.
Posted 6 years ago2017-12-07 22:24:06 UTC Post #338343
If your map is already pushing the limit then it will definitely go above the limit when people start playing it. Every player is an entity, every weapon they pick up is another entity, etc.
The game also changes behavior when the number of entities gets too low, so item spawning logic will be different.

Multiplayer maps made for vanilla games probably shouldn't be too heavy on the number of entities for that reason.
Posted 6 years ago2017-12-07 23:08:15 UTC Post #338344
This just means I'll have to cut where it hurts. Requiring num_edicts is not an option.

I used a lot of entities for a couple of stuff. I realize I can't spare these if I want the whole thing to work.

Note: Requiring num_edicts (for a multiplayer map) is the equivalent of violently throwing your map in the garbage to ever be forgotten.
Posted 6 years ago2017-12-08 00:32:58 UTC Post #338346
I'm officially under the 900 entity limit (meaning that I can ommit the switch and the map will load). I got rid of a lot of entities. I had to say goodbye to one of my 3x3 numpads, among other.

I found out there's no way of knowing the count below the 900 limit. You can provide any value below 900 to the num_edicts switch and it'll always work.

I guess I'll have to test that map with a bunch of bots...
Posted 6 years ago2017-12-08 04:14:47 UTC Post #338347
One good thing I noticed is that I don't get the num_edicts error when I start a server. I got it eventually, but not on startup which suggests that servers are more efficient i.e.: they might not create entities if nobody sees them.

I have done one big cleanup of my map and can't find anything else to cut. I don't have the num_edicts error when I run half-life from the command line. I need to test it on the server and client side. I'll be doing this from tomorrow.
Posted 6 years ago2017-12-08 10:08:50 UTC Post #338348
That can happen what you're using entities that can spawn other entities, like respawning weapons, monstermakers, multi_managers with the multithreaded flag set, etc.

Also, please try to use the edit button instead of double posting.
Posted 6 years ago2017-12-09 23:10:47 UTC Post #338353
Remember how you find the solution to remove from memory the ent from monstermakers ;)

http://twhl.info/forums.php?thread=19142
You must be logged in to post a response.