Allowselect limit (again)

ZVitor

Active member
Hi guys, one more time im with problems on Allowselect,

i got a info from a White Dragon post in 2016, the limit are charaters letters, not heroes, and it was around 511 characters,

so i renamed all my chars to 4 letters only, like:

Code:
allowselect IRON WOLV CYCL STOR JEAN CABL AVEN ANTM...


but it only loaded 61 heroes, with blank spaces it should be around 305 characters.
tested order of names, just to check if is some hero bug, but same problem happens.

and renamed somes to 2 to test:

Code:
allowselect AA AB AC AD JEAN CABL AVEN ANTM...
but still 61 heroes.
tested it on builds: 4183 6391 and 6412....

i can get some more info about how that limit works?

thanks




 
found the White Dragon post:
http://www.chronocrash.com/forum/index.php?topic=3093.msg42335#msg42335

"allowselect limit is 511 characters (not 511 heroes), so it depends by name length."

So with this tests i belive it are not name lenght, any clue about what is this limit?
 
There is no hard coded limit other than text length, so to be frank I don't know.

My plate is still full, but I'll dig around when I can

DC
 
Damon Caskey I took a look at the source code and I've found this:

engine/openbor.h
#define MAX_ALLOWSELECT_LEN 1024
#define MAX_SELECT_LOADS  512

This means that the biggest length for an allowselect is 1024 characters (number of letters, not playable characters)? And how its tied to the save game size?
White Dragon said:
the limit must exist because it affects the size of the save file. so we have to proceed with caution.
maybe I could do at the beginning 1024

Also:
#define MAX_NAME_LEN 50 //47
This means that any character name can be 50 characters lenght?
 
O Ilusionista said:
Damon Caskey I took a look at the source code and I've found this:

engine/openbor.h
#define MAX_ALLOWSELECT_LEN 1024
#define MAX_SELECT_LOADS  512

This means that the biggest length for an allowselect is 1024 characters (number of letters, not playable characters)? And how its tied to the save game size?
White Dragon said:
the limit must exist because it affects the size of the save file. so we have to proceed with caution.
maybe I could do at the beginning 1024

Yes, the 1024 would be the number of characters in list, not the playable characters. Beyond that I don't know much about the allow select system because I didn't code it and never really looked into it. If I am not mistaken though, it is open to script, and therefore has a tracking variable. That would go into the save game file, and is what WD was talking about. I'd say it could be safely brought up to 2048.

Also:
#define MAX_NAME_LEN 50 //47
This means that any character name can be 50 characters lenght?

Correct. Also, although it dates back to the original code, I doubt 50 was an accident. Standard practice in name fields for databases is 25 characters. Double that to 50 and you have enough room to accommodate any reasonable name length. :)

DC
 
Damon Caskey Thanks for the info. I remember I've read somewhere that one of the old devs (I think it was Sumox) bypassed this "limit"  by script on his nome but haven't shared the solution.
If we could raise it to 2048, it would be good.

Btw the way, "MAX_SELECT_LOADS      512" tells that we can "only" load up to 512 entities on the a select file, right?

 
Damon Caskey we had made some other tests about this issue, using newer builds and the 4.0 pre-alpha:

allowselect CAPA IRON WOLV CYCL STOR JEAN CABL AVEN ANTM WASP BPAN BWID HAWK QUIC SWIT NICK PHIL QUAK PUNI SHEH VISI HERC WARM SWOM BCAT SPID DEAD DARE LUKE IFIS JESS USAG REDH MOON DHAW MYST ELEK WSOL SQGI SIGR SHOC JUGG GRID SONG TASK VENO CARN STRY MAGN REDS LOKI DOOM THAN APOC DORM STAN SLOR GAMO DRAX ROCK GROO GAMB ROGU ARCH PSYL COLO NIGH GUAR SSUR BBOL MRFA INVI THIN HTOR ICEM BEAS EMMA X23 JUBI LEGI DRST CAPM SENT HULK THOR

424 characters (including spaces). But the engine loads until ROGU. If we delete CAPA, them the engine loads one more character, but never loads all of them.
ZV's JLU has 410 charcters but the engine loads all of them.

If we remove "allowselect", them the engine loads all players from the models.txt with no problem, but its not what we want because it will let you use players that you should not be able to choose yet.

I've tried a code to check how much entities the engine has cached and loaded and this is the result:
cached 965 - loaded 603

Maybe this is related with the "MAX_SELECT_LOADS      512"  above?
Should we open a topic at github?
 
Let's keep this here in discussion for now. I'd suggest compiling a build with just that limit modified (remember you need to double it, not just arbitrarily increase). If it resolves, then at least we have something to work with.

DC
 
I am on a Mac and don't know how to compile on it. I will try to compile using a windows on a virtualbox and report.
I've complied 5 different versions for testing. I will wait for the results and post them here.
 
Damon Caskey I've made some tests with Zvitor, compiling 5 different versions.

What I've tried:

1- MAX_ALLOWSELECT_LEN 1024 - raised to 2048
2 - MAX_ARG_LEN  512 - raised to 1024
3 - MAX_ARG_LEN 512 - raised to 1024
4 - Combining 1 (MAX_ALLOWSELECT_LEN) and 2 (MAX_ARG_LEN)
5 - Combining 1, 2 and 3

All the 5 version had the same result - it doesn't works.

This is the result of the script which counts the cached models (penborvariant("models_cached") and models loaded openborvariant("models_loaded")
cHWLwnZ.png


The engine stops to loading after a certain limit.

I don't know what to do. Its something related with ALLOWSELECT, because when you don't use it, the engine loads all characters without any issue.

 
OK, I'm not sure what the deal is, but at least it gives me something to start from. No promises, but will see what I can do.

DC
 
Thanks,
Like Ilusionist said,
when game start, on a mode without skipselect,
it load all 85 heroes ...
but on allowselect it load 63 heroes,
Allowselect have 315 characters (or 252 if remove blank spaces)...(all heroes names was changed to be 4 letters only)
 
Back
Top Bottom