Go Back   Steam Users' Forums > Steam Game Discussions > M - P > Portal 2

Reply
 
Thread Tools Display Modes
Old 06-01-2012, 09:24 AM   #1
fredlllll
 
 
 
Join Date: May 2012
Reputation: 0
Posts: 7
Get rid of too many items error *FIX*

hey guys =3

yeah i made a fix for this "issue"
as many of you have experienced, you cannot place an unlimited amount of objects in the puzzlemaker.
so how does portal 2 prevent you from this?
(all following files are in the \bin folder [Program Files (x86)\Steam\SteamApps\common\portal 2\bin)
it starts the vbsp.exe with the parameter -entity_limit 1750
so i wrote a little program, which filters this parameter, and starts the original vbsp.exe (you have to rename the original one to vbsp2.exe) with them.
the result is a compiled map, which has more than the 1750 entities

my program logs everything the original vbsp.exe puts out in the screwEL.log

video with me explaining how to install and how it works(sorry for bad english)
http://www.youtube.com/watch?v=in7oXzZa3GY

the download is in the description, the sources are in the zipfile too, so if you dont trust me, compile it yourself

there is also a readme included telling you how to install it

hope i could help you guys

leave me some comments, and report bugs if you experience some
fredlllll is offline  
Reply With Quote
Old 06-01-2012, 09:29 AM   #2
xbonds32tr
 
 
 
Join Date: Jun 2012
Reputation: 0
Posts: 9
Thanks, will try.
xbonds32tr is offline   Reply With Quote
Old 06-01-2012, 10:04 AM   #3
Catsy
 
 
 
Join Date: Sep 2011
Reputation: 83
Posts: 340
The title of this thread is misleading--it is not a "fix"--and the proposed workaround is very risky. It does get rid of the "too many items" error, in the same way that unplugging your smoke detector gets rid of the noise. What it does not and can not do is remove the hardcoded limit on entities that exists in the Source engine, which in this context is 2048--which includes temporary entities spawned in the map during play.

A moment's subtraction will tell you that this workaround will give you an extra 298 entities to use--at the risk that the map will fail to render some effects or dynamic changes if they would cause it to exceed the entity limit, which could provide your players with a glitchy experience.

I strongly recommend against using this workaround unless you know exactly what you are doing.
Catsy is offline   Reply With Quote
Old 06-01-2012, 10:19 AM   #4
fredlllll
 
 
 
Join Date: May 2012
Reputation: 0
Posts: 7
well i read the engine is capable of 4k items and vbsp has a hard limit of 8k so with the hammer you can make maps with up to 8k entities. so why bother with the limit of 1750?
fredlllll is offline   Reply With Quote
Old 06-01-2012, 10:40 AM   #5
Catsy
 
 
 
Join Date: Sep 2011
Reputation: 83
Posts: 340
Quote:
Originally Posted by fredlllll View Post
well i read the engine is capable of 4k items and vbsp has a hard limit of 8k so with the hammer you can make maps with up to 8k entities. so why bother with the limit of 1750?
The Source engine has a hard limit of 4096 entities. These are divided into two separate pools: networked and non-networked. The two pools are not fungible, meaning that if you're at the limit in one pool you're at the limit whether you have zero or 2048 in the other pool.

This means that for the purposes of this discussion, the hard limit in the source engine is 2048 entities.

The higher limit in VBSP is absolutely irrelevant. VBSP only handles the calculation of visibility. Sure, you could use VBSP to compile a map that uses 3000 entities. That doesn't mean it would work right in Source.
Catsy is offline   Reply With Quote
Old 06-01-2012, 12:54 PM   #6
fredlllll
 
 
 
Join Date: May 2012
Reputation: 0
Posts: 7
well what if you need just one or two items more? and if it does not work properly its still better than not even compiling. and maybe valve should update their engine from 1998 to 2012 and support more items. i make games myself and the only limit is the machine its running on. i dont know any reason which would justify a limit of 2k.i would understand a limit of 2 power16 but not 2 power 11.
fredlllll is offline   Reply With Quote
Old 06-01-2012, 12:58 PM   #7
Catsy
 
 
 
Join Date: Sep 2011
Reputation: 83
Posts: 340
Quote:
Originally Posted by fredlllll View Post
well what if you need just one or two items more?
Then by all means, use this workaround. Just do it with your eyes open and the full understanding of what you're doing.

Quote:
and if it does not work properly its still better than not even compiling.
I don't know that I agree with that. I would personally rather not release a map at all than release it in a buggy state that doesn't work properly.

Quote:
and maybe valve should update their engine from 1998 to 2012 and support more items.
What Valve should or shouldn't do with their game engine is an entirely different matter from the factual question of what that engine does now.

Quote:
i make games myself and the only limit is the machine its running on. i dont know any reason which would justify a limit of 2k.i would understand a limit of 2 power16 but not 2 power 11.
I would suggest digging into the source code of the Source engine or asking a Valve developer on that point. I can only answer for what I know, and I do not know their reasons for setting the entity limits they did.
Catsy is offline   Reply With Quote
Old 06-01-2012, 02:42 PM   #8
LPChip
 
 
 
Join Date: May 2011
Reputation: 122
Posts: 787
Also, the more items you have in your map, the bigger the chance to get lag in your level. So getting past this limit might cause lag on many computers.
LPChip is offline   Reply With Quote
Old 06-01-2012, 03:56 PM   #9
fredlllll
 
 
 
Join Date: May 2012
Reputation: 0
Posts: 7
well it really seems, that its not possible to compile levels with too much items. funny thing is, vbsp doesnt moan about to many entitys, but moans about more than 1024 brushes

console says
Too many brush models in map, max = 1024
(this happens before the to many entities check (i tried the same map with the limit of 1750))
problem is, portal2 does not recognize this error
which results in starting vvis.exe which then hangsup on maximum load and your system is almost unusable

i would love to talk to a valve dev about this(the limits in general), but i think they are not interested in critic on their engine :P

only thing i can say: valve you did some rubish here ;3

result: use the fix if you need a few objects more, if you manage to use more than 1024 brushes(not entities) your computer will hang up when doing the visibility(vbsp said some error before and portal2 does not recognize this and starts vvis.exe which tries to work on a nonexistend map), cause in vvis.exe the worker thread gets the highest priority. which will almost kill your system. took me 5 minutes to shut vvis.exe down

if someone wants, he can change the source, so the itemlimit is 2048 (max value vbsp.exe takes with the parameter -entity_limit)

just replace this

if (args[i].Equals("-entity_limit"))
{
//ignore next, which would be the value
i++;
}

with this

if (args[i].Equals("-entity_limit"))
{
args[i + 1] = "2048";//set value to 2048
sb.Append(args[i] + " ");//add param to new args
}


dont use more than 2048, cause vbsp will not do anything with more and again vvis will hang up.

Last edited by fredlllll: 06-01-2012 at 03:58 PM.
fredlllll is offline   Reply With Quote
Old 06-01-2012, 11:45 PM   #10
Aardonyx
 
Join Date: Mar 2012
Reputation: 0
Posts: 1
Quote:
Originally Posted by fredlllll View Post
just replace this

if (args[i].Equals("-entity_limit"))
{
//ignore next, which would be the value
i++;
}

with this

if (args[i].Equals("-entity_limit"))
{
args[i + 1] = "2048";//set value to 2048
sb.Append(args[i] + " ");//add param to new args
}


dont use more than 2048, cause vbsp will not do anything with more and again vvis will hang up.
Thanks, where exactly do I find this code that needs to be replaced? I did the math, and I'm definitely not over the entity limit, so it must be the brush limit.
Aardonyx is offline   Reply With Quote
Old 06-02-2012, 04:11 AM   #11
fredlllll
 
 
 
Join Date: May 2012
Reputation: 0
Posts: 7
this code just raises the entity limit to 2048. the standard program you can load with the zip file just doesnt set an itemlimit. so it wont make a difference
but you need visual studio for compiling. the code is in the folder /source in the zipfile
fredlllll is offline   Reply With Quote
Old 07-02-2012, 04:55 AM   #12
siuking666
 
Join Date: Apr 2011
Reputation: 0
Posts: 4
Hey man I used it, and it works just fine after the recent update, thanks a lot!!

May I share/advertise it on Portal 2 Discussion?
siuking666 is offline   Reply With Quote
Old 10-10-2012, 10:26 PM   #13
Mothalius
 
Join Date: Jun 2012
Reputation: 0
Posts: 1
Hey is this thread still open? I've got a question that might pertain to this whole "entities limit" ordeal. I've got a map with a lot of lasers in it, and the reflective cubes are no longer working, laser do not pass through them and I'm assuming it's because there are so many lasers. Is there a way to get the reflective cubes working again without detracting from how many laser outputs I have?
Mothalius is offline   Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Game Discussions > M - P > Portal 2


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -7. The time now is 09:32 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2012, All Rights Reserved.