Increasing AI opponents past 22?

Just open CvDLLUtilDefines.h, everything is there, with the limit mentioned by whoward69 here

If you don't know how to look at that file, here is the important part if you want to know how each values are calculated (those are the vanilla values):

Code:
// do not change this or have MAX_PLAYERS exceed it - this will require the engine to be rebuilt
#define REALLY_MAX_PLAYERS (80)
#define REALLY_MAX_TEAMS (80)

#define MAX_CIV_PLAYERS		(63)
#define MAX_CIV_TEAMS		(MAX_CIV_PLAYERS)

#define MAX_MAJOR_CIVS		(22)
#define MAX_MINOR_CIVS		(MAX_CIV_PLAYERS - MAX_MAJOR_CIVS)

#define MAX_PLAYERS		(MAX_CIV_PLAYERS + 1)
#define MAX_TEAMS		(MAX_PLAYERS)
#define BARBARIAN_PLAYER	((PlayerTypes)MAX_CIV_PLAYERS)
#define BARBARIAN_TEAM		((TeamTypes)MAX_CIV_TEAMS)
 
Just open CvDLLUtilDefines.h, everything is there, with the limit mentioned by whoward69 here

If you don't know how to look at that file, here is the important part if you want to know how each values are calculated (those are the vanilla values):

Code:
// do not change this or have MAX_PLAYERS exceed it - this will require the engine to be rebuilt
#define REALLY_MAX_PLAYERS (80)
#define REALLY_MAX_TEAMS (80)

#define MAX_CIV_PLAYERS		(63)
#define MAX_CIV_TEAMS		(MAX_CIV_PLAYERS)

#define MAX_MAJOR_CIVS		(22)
#define MAX_MINOR_CIVS		(MAX_CIV_PLAYERS - MAX_MAJOR_CIVS)

#define MAX_PLAYERS		(MAX_CIV_PLAYERS + 1)
#define MAX_TEAMS		(MAX_PLAYERS)
#define BARBARIAN_PLAYER	((PlayerTypes)MAX_CIV_PLAYERS)
#define BARBARIAN_TEAM		((TeamTypes)MAX_CIV_TEAMS)

MAX_CIV_PLAYERS should be set to a expression of MAX_MAJOR_CIVS + MAX_MINOR_CIVS with a ceiling of REALLY_MAX_PLAYERS (via clamping), and MAX_MINOR_CIVS should be hardcoded instead of an expression.

The problem is, you've got more players in your game than MAX_CIV_PLAYERS allows, so I hypothesize.

You can prove/disprove by shoving some of the nonworking diploscreen players onto teams with the others... maybe?

Or better yet just set it to REALLY_MAX_PLAYERS :lol:
 
Well, I talked to Jon. Didn't reveal much.

@_Jon_Shafer_ said:
Sorry, afraid I have no idea! We tested the potential up to 32 but I was never aware of the theoretical maximum.
@_Jon_Shafer_ said:
Found out there is a 80-player limit hardcoded into the engine and a new version would be needed to increase it. Hope that helps!
@_Jon_Shafer_ said:
Hmmm... core engine changes like that are a pretty big deal. I wouldn't hold your breath on that one. Sorry for the bad news!

Well, we already knew this :p It didn't help much, but let's thank him for being helpful.
 
How in the world did you connect to Jon?!?
 
Well, I talked to Jon. Didn't reveal much.
How in the world did you connect to Jon?!?
^this :)

Hopefully they release a hotfix that allows REALLY_MAX_PLAYERS to be any number we want. I find it absurd that the .exe, which is only supposed to handle really basic functions like handling game objects and graphics, reaches up to the high level of maximum number of players.

With that said, would it be possible to rewrite the code that defines what a "civ" actually is and allow for more to be included? As in, could we do away with what is in the .exe and use solely a custom .dll for providing the definition of a player in the game?
 
^this :)

Hopefully they release a hotfix that allows REALLY_MAX_PLAYERS to be any number we want. I find it absurd that the .exe, which is only supposed to handle really basic functions like handling game objects and graphics, reaches up to the high level of maximum number of players.

With that said, would it be possible to rewrite the code that defines what a "civ" actually is and allow for more to be included? As in, could we do away with what is in the .exe and use solely a custom .dll for providing the definition of a player in the game?

No. Even if we included another type of civ that could win the game, we'd still be limited by max players.

As of right now, there are 3 types of civs. Major Civs, Minor Civs, and the Barbarian Civ. They're all players in their own right.

Good news though. This random idea in my head suggests we can have up to 79 Major Civs in the game at one time, but with no city states. This leaves room for the Barbarian Player.
 
If you switch minor civs to 0 you get an out of index error. So you must have one minor civ one barbarian civ, and 78 major civs which is what your CVgamecoreutlldll says. I really think it is possible to show diplomacy screens for 80 civs. You're missing something.
 
If you switch minor civs to 0 you get an out of index error. So you must have one minor civ one barbarian civ, and 78 major civs which is what your CVgamecoreutlldll says. I really think it is possible to show diplomacy screens for 80 civs. You're missing something.

If you found a way to force load a 3D scene, it may be solved, yes.

Until then for my games I'll go for fixed 2D leaders for diplomacy using custom screens...
 
How in the world did you connect to Jon?!?
I'm pretty active on Twitter. Stop by, I ain't shy! And obviously I poke around here from time to time.

To elaborate, the base engine was limited to 80 players for memory reasons. This is more important under DirectX9 than DirectX11, but it's still an issue for some people. As for what that change would entail or who's the best to ask about getting it done... well, at this point your guess is as good as mine. Best of luck though - I always love seeing what the mod community comes up with!

- Jon
 
Also, here's a table showing the additional cases that need to be added. As you can see, we get less and less efficient (having more leftover divisions) as our civ count increases. Civilizations is the CivCount, Divs is Divisions, and Subs is Subdivisions.

Please someone check over this and edit as needed.

Sorry if this is obsolete/redundant (I didn't read the whole thread), but I saw that chart and in case you are still using a *huge* switch/case block, here's the formula (using the chart names):

if (Civilizations%3 == 0) {Divs = 3; Subs = Civilizations/3;}
else {Divs = 2; Subs = (Civilizations+1)/2;}

It's good to keep files small :)
 
Why you want to increase AI number? If you want to do it you have to increase also size of the map. I think that 22 number is estimated base on engine performance and maximum supported size of the map. If you want to play with more civ you have to change also game engine. :cry: Changing only one parameter doesn't make sense.
 
Even with 34 major civs, it's difficult to fill the Giant Earth of YnAEMP...


Sorry if this is obsolete/redundant (I didn't read the whole thread), but I saw that chart and in case you are still using a *huge* switch/case block, here's the formula (using the chart names):

if (Civilizations%3 == 0) {Divs = 3; Subs = Civilizations/3;}
else {Divs = 2; Subs = (Civilizations+1)/2;}

It's good to keep files small :)

thanks :)
 
Why you want to increase AI number? If you want to do it you have to increase also size of the map. I think that 22 number is estimated base on engine performance and maximum supported size of the map. If you want to play with more civ you have to change also game engine. :cry: Changing only one parameter doesn't make sense.

Personally I would love to see the limits gone. I want to play with 200 civs, and I want it to be a ign titatnic map. Speed increases will be made.
 
Sorry if this is obsolete/redundant (I didn't read the whole thread), but I saw that chart and in case you are still using a *huge* switch/case block, here's the formula (using the chart names):

if (Civilizations%3 == 0) {Divs = 3; Subs = Civilizations/3;}
else {Divs = 2; Subs = (Civilizations+1)/2;}

It's good to keep files small :)

Unfortunately this formula doesn't match the results from the existing switch statement. It's worth considering that we probably don't need to match the existing results for the game to work properly (Civs will just be placed in different places, as far as I understand, as long as the resulting divisions give the same total number of regions for players), but this formula gives different results at: 5, 10, 11, 15, 17, and 22.
 
Unfortunately this formula doesn't match the results from the existing switch statement. It's worth considering that we probably don't need to match the existing results for the game to work properly (Civs will just be placed in different places, as far as I understand, as long as the resulting divisions give the same total number of regions for players), but this formula gives different results at: 5, 10, 11, 15, 17, and 22.

The formula only matches the big chart, which starts at 25 civs, so yeah some results are different for less civs. The thing is, there is no clear pattern in the original switch (22 and less). For instance, there are 16 subdivisions in all if the number of civs is 13, 14, 15 or 16... If the "waste" of subdivisions is important (16 for 13 civs), the formula will minimize it.
 
The formula only matches the big chart, which starts at 25 civs, so yeah some results are different for less civs. The thing is, there is no clear pattern in the original switch (22 and less). For instance, there are 16 subdivisions in all if the number of civs is 13, 14, 15 or 16... If the "waste" of subdivisions is important (16 for 13 civs), the formula will minimize it.

Ah, I see what you mean. Hopefully the more correct number of divisions will work in the game's favor as well. Nice one. :)
 
The formula only matches the big chart, which starts at 25 civs, so yeah some results are different for less civs. The thing is, there is no clear pattern in the original switch (22 and less). For instance, there are 16 subdivisions in all if the number of civs is 13, 14, 15 or 16... If the "waste" of subdivisions is important (16 for 13 civs), the formula will minimize it.

Ideally you want a max of one wasted sub, but 2 and 3 are acceptable I'd think.
 
This probably isn't much help, but I've played through about 75% of a 34 civ, 42 cs, Giant earth game and so far everything has been normal(except for the diplo screens of course). I don't know if anyone has mentioned that for the civs whose diplo screen does show up, it has a message like "animation for this leader not loaded" in the top left corner, even though it is. And surprisingly, turn times aren't even that long, so good work guys!
 
I'm pretty active on Twitter. Stop by, I ain't shy! And obviously I poke around here from time to time.

To elaborate, the base engine was limited to 80 players for memory reasons. This is more important under DirectX9 than DirectX11, but it's still an issue for some people. As for what that change would entail or who's the best to ask about getting it done... well, at this point your guess is as good as mine. Best of luck though - I always love seeing what the mod community comes up with!

- Jon

Time to scan the credits.

Why you want to increase AI number? If you want to do it you have to increase also size of the map. I think that 22 number is estimated base on engine performance and maximum supported size of the map. If you want to play with more civ you have to change also game engine. :cry: Changing only one parameter doesn't make sense.

Aww look, he thinks we're limited on map size. How cute.

I'm going to shoot out emails to various people seeing what info I can get my hands on. Like, how many man-hours will go into an engine rebuild and such. I think a higher civ cap will push the modding and scenario community to new levels.

I'm going to see what info I can get out of OverloadUT. Until recently, he was a CM for 2K. He should know things.

Who else wants to see an engine rebuild?
 
Back
Top Bottom