Maximum number of units reached !

Post bug reports and ask for support here.

Moderator: MOD_EIA

Post Reply
User avatar
DCWhitworth
Posts: 676
Joined: Sat Dec 15, 2007 1:20 am
Location: Norwich, England

Maximum number of units reached !

Post by DCWhitworth »

I've just hit an error trying to create a garrisonin PBEM game just updated to v1.05.03.

When I try to place a garrison it says "Maximum number of units reached ! Try reducing number of garrisons"

I do have quite a lot of garrisons down but I'm sure I've had more in previous games.
Regards
David
NeverMan
Posts: 1712
Joined: Tue Feb 24, 2004 1:52 am

RE: Maximum number of units reached !

Post by NeverMan »

Seems odd that this would even be a problem. Why would there be a maximum number of garrisons? Am I forgetting some rule?
User avatar
Mardonius
Posts: 654
Joined: Mon Apr 09, 2007 4:04 pm
Location: East Coast

RE: Maximum number of units reached !

Post by Mardonius »

No, you're not forgetting anything. It's an error or a bug.


Dave:

Have you posted on Mantis?
best,
Mardonius/Varick
"Crisis is the rallying cry of the tyrant" -- James Madison
"Yes, you will win most battles, but if you loose to me you will loose oh so badly that it causes me pain (chortle) just to think of it" - P. Khan
Trax
Posts: 34
Joined: Tue Jan 29, 2008 12:21 am

RE: Maximum number of units reached !

Post by Trax »

It seems there is a maximum number of garrisons, not per nation but in total. Once reached you have to destroy a garrison in order to build a new one. It can get quite gamey.
 
 
NeverMan
Posts: 1712
Joined: Tue Feb 24, 2004 1:52 am

RE: Maximum number of units reached !

Post by NeverMan »

Why would there be a maximum? This doesn't make sense and should change.

INT_MAX is 32767, which that's to say he even used int, which would be a waste since there isn't a negative garrison. UINT should have been used which has a max of 65535.

Are you telling me there is 65535 garrisons on the board in your game!!??? WOW, that's a TON!![8|]

And this isn't even considering the fact that a long uint could have been used, among others (long long uint).
Grognot
Posts: 409
Joined: Thu Dec 06, 2007 10:37 pm

RE: Maximum number of units reached !

Post by Grognot »

The type is not a particularly important consideration.   Generally speaking, the greater problem is simply the storage cost -- particularly if the PBEM files encode the full game state rather than deltas.

Incidentally, last I checked (which was a long time ago), PBEM files were *extremely* compressible (losslessly).  Likewise, if you start a 1.05.03 solo game as France and save before you've placed any troops, the resulting sav.dat file (in my case) was 12,114,729 bytes.  This is easily compressed to 94,293 bytes, implying an awful lot of redundancy.  Specifically, it's mostly full of 64-bit -1s and 0s.  This is suggests than that it's a dump of fixed-size records, regardless of whether these records are actually interesting.  And if you're doing that, you probably have fixed-size arrays of records in memory rather than heap-based structures, which forces you to do bounds checking unless you choose a very high limit.   This be very space-inefficient if the maximum limit is much higher than is likely, although it /might/ be fast to load (balance increased I/O with less dynamic memory allocation).

(In the case of EiANW, there should be a strict upper bound computable -- at most one garrison per city per possible nation (all majors -- double-count if militia and inf garrisons treated separately, all minors with corps, other minors if home or if a kingdom component, all kingdoms), ditto per depot.  Addn'l units must be from counter pools, which are of fixed size.)

--
Not a grognard.
Not an optimizer. It's a game to me, not a job.
NeverMan
Posts: 1712
Joined: Tue Feb 24, 2004 1:52 am

RE: Maximum number of units reached !

Post by NeverMan »

I'm don't see how the number of garrisons on the board has a more than insignificant effect on file size. It doesn't take that much extra space in a text file to go from 1 to 100, etc. Now, if we were talking about the number of places of garrisons, then that might be another story.

Any word on this Marshall?
User avatar
DCWhitworth
Posts: 676
Joined: Sat Dec 15, 2007 1:20 am
Location: Norwich, England

RE: Maximum number of units reached !

Post by DCWhitworth »

Well we need to stop quibbling about programming issues I think. this one is a game breaker and needs to be resolved.
Regards
David
NeverMan
Posts: 1712
Joined: Tue Feb 24, 2004 1:52 am

RE: Maximum number of units reached !

Post by NeverMan »

I think the "gamebreaker" depends on what the limit is. If the limit is really high it could just be annoying and could be put on the backburner, but if it's fairly low and fairly often gets reached by games, both AI and PBEM, then it needs to come to the front.
ndrose
Posts: 612
Joined: Fri Oct 13, 2006 4:07 pm

RE: Maximum number of units reached !

Post by ndrose »

I've hit this limit a few times playing against the AI, when I had conquered and garrisoned everything, built a bunch of free state corps, lots of fleets and so on. I suppose one could end up with a similar number of units on the board in a pbem game if the players have got their armies built out and have garrisoned everything among them, especially if there are garrisons in non-capitals, but I wouldn't have expected it. Or maybe the limit has decreased in 1.05.

In any case, there really shouldn't be a limit.
User avatar
DCWhitworth
Posts: 676
Joined: Sat Dec 15, 2007 1:20 am
Location: Norwich, England

RE: Maximum number of units reached !

Post by DCWhitworth »

ORIGINAL: NeverMan

I think the "gamebreaker" depends on what the limit is. If the limit is really high it could just be annoying and could be put on the backburner, but if it's fairly low and fairly often gets reached by games, both AI and PBEM, then it needs to come to the front.

The limit isn't that high. We've hit it in a game and it's breaking it. It's 1808 with serious tension between France, Prussia and Russia.
Regards
David
Grognot
Posts: 409
Joined: Thu Dec 06, 2007 10:37 pm

RE: Maximum number of units reached !

Post by Grognot »

The limit was either basically new or significantly lowered by the time 1.04x hit -- I'm pretty sure I've run amok in single-player with an *entirely* full and on-board French army + garrisoned French provincial capitals + full COTR + full Ottoman Empire, and heavily garrisoning just about every one of those minors as well... and that I could not replicate this in 1.04x without hitting the limit.  I don't think the AI got so much better at preserving corps that the difference in the AI's on-board counters would have accounted for it.
--
Not a grognard.
Not an optimizer. It's a game to me, not a job.
User avatar
MarshallEllis
Posts: 5632
Joined: Tue Oct 02, 2001 3:00 pm
Location: Dallas

RE: Maximum number of units reached !

Post by MarshallEllis »

Hey guys:
 
We have a limit of 550 units on the board but this was given before we allowed multiple nations' garrisons in the same city. We probably need to bump this up a bit.
 
Does this game have garrisons in almost all cities?
 
 
Thank you

Marshall Ellis
Outflank Strategy War Games


User avatar
DCWhitworth
Posts: 676
Joined: Sat Dec 15, 2007 1:20 am
Location: Norwich, England

RE: Maximum number of units reached !

Post by DCWhitworth »

ORIGINAL: Marshall Ellis

Hey guys:

We have a limit of 550 units on the board but this was given before we allowed multiple nations' garrisons in the same city. We probably need to bump this up a bit.

Does this game have garrisons in almost all cities?


Empty cities are certainly few and far between, and also there are multiple garrisons in several places. There are four in Lisbon (1 Spain, 1 Portugal, 1 GB, 1 Sweden)

Any chance the fix for this could go into the same hotfix as the foraging fix ?
Regards
David
User avatar
MarshallEllis
Posts: 5632
Joined: Tue Oct 02, 2001 3:00 pm
Location: Dallas

RE: Maximum number of units reached !

Post by MarshallEllis »

I will investigate to see how difficult this might be!
 
 
Thank you

Marshall Ellis
Outflank Strategy War Games


NeverMan
Posts: 1712
Joined: Tue Feb 24, 2004 1:52 am

RE: Maximum number of units reached !

Post by NeverMan »

ORIGINAL: Marshall Ellis

Hey guys:

We have a limit of 550 units on the board

WHY!!??

What was the "reasoning" behind this move?
User avatar
MarshallEllis
Posts: 5632
Joined: Tue Oct 02, 2001 3:00 pm
Location: Dallas

RE: Maximum number of units reached !

Post by MarshallEllis »

I had to place a limit on the number of units in the DB layout because of the structural array.
 
Thank you

Marshall Ellis
Outflank Strategy War Games


pzgndr
Posts: 3789
Joined: Thu Mar 18, 2004 12:51 am
Location: Delaware

RE: Maximum number of units reached !

Post by pzgndr »

Just say it's an EiH rule. [:'(]
Bill Macon
Empires in Arms Developer
NeverMan
Posts: 1712
Joined: Tue Feb 24, 2004 1:52 am

RE: Maximum number of units reached !

Post by NeverMan »

ORIGINAL: Marshall Ellis

I had to place a limit on the number of units in the DB layout because of the structural array.

Ok [&:]

Here's to hoping you can "fix" this!!

ps. Where is the damn ignore button on this forum!
Post Reply

Return to “Tech Support”