Very srange effect in the game. Who can explain?

KJ Jansson

Prince
Joined
Oct 7, 2008
Messages
509
I found a very strange effect in CivIVCol.

I entered 11 civilizations of Euporian style, that have <bPlayable>1</bPlayable>. No problems, each civilization can "Build Settlement".

By the same technique I entered next 12th Europian style civilization. However, here this civilization cannot "Build Settlement". I press button, but nothing happen. My first city cannot be build a all.

My first idea was that something wrong with my new civilization. I examined all lines practically under microscope. No, everything was correct.

Then I "closed" one of existing civilization, namely the first one in the list "CIVILIZATION_ENGLAND" and started a new game.

Here my 12th civilization is working absolutely perfect and a colonist could "Build Settlement" without problems.

If I "open" "CIVILIZATION_ENGLAND" the similar problem with "Build Settlement" appers again with one of civilizations. In my case it was FRANCE.

Who has any ideas? Does the game really has a limit for Europian style civilizations? If so, how to overpass this limit?
 
KJ Jansson, I have experienced the same limit. I am convinced the game has a limit in the number of derived relationships of the Colony/Europe civilizations. I currently have a mod in development that has 11 European style civs and more than 50 native civs.

In my experience I had 11 colonial civilizations, then with the 12th the King would randomly change to any leaderhead or the European map portion would not work at all. I have not looked at the core DLL, but I have looked at everything else and I find no work-around to get past this limit.

Whatever the source of the problem, the native (non-derived) civilizations are un-affected by the problem.
 
I hope that this isn't hardcoded in the .exe. If it's just a DLL constant somewhere, it should be easy to change.

There is a maximum of 32 players in a game at once, according to CvDefines.h, which is where I would suspect some constant like this to be hardcoded. However, there's nothing there.

Do problems occur if you have more then 12 Europe/Colonial civs defined in CIV4CivilizationInfos.xml?
 
I hope that this isn't hardcoded in the .exe. If it's just a DLL constant somewhere, it should be easy to change.

There is a maximum of 32 players in a game at once, according to CvDefines.h, which is where I would suspect some constant like this to be hardcoded. However, there's nothing there.

Do problems occur if you have more then 12 Europe/Colonial civs defined in CIV4CivilizationInfos.xml?
Really, the maximum players (or civilization) is 32. When I found this value in CvDefines.h, I changed 32 on 50 and compiled a new dll file. This trick had no positive effect and the problem remained.

I started again to check any possible reasons and at least found the problem! I understand that it looks crazy but Civ4CivilizationInfos.xml don't accept too many remarks inside the file. When I cleaned all my remarks, I started the game and each Europian-style civilization could "Build Settlement". I especially checked all available leaders, and all of them are working correctly.

Thus, the problem was in the remarks inside the Civ4CivilizationInfos.xml. During modding I usually make some notes inside the file and never see that such remarks could somehow affect on game. However, they could....

Good lesson for me. I spend about one day to find the reason and hope nobody more repeat my mistake. You can write inside the file, but be accure!

I also change the order of civilization. Now they are in such order:

England
England Europe
France
France Europe,
etc

however, I don't think this is important. It's just help me to work faster with civilizations.

For my mod "1492: Global colonization" I don't plan to add more Europian-style civilizations, however some African and Asian/Polynesian nations should be added. I'm afraid that some delays could be during long game if too many civilizations will be on the Huge-size map. I guess such combination:

12 Europian-style (Europian, East and Central Asian) + 11 American + 4 African + 4 Asian/Polynesian + 1 Barbarian = 32

is optimal one.

KJ Jansson, I have experienced the same limit. I am convinced the game has a limit in the number of derived relationships of the Colony/Europe civilizations. I currently have a mod in development that has 11 European style civs and more than 50 native civs.

In my experience I had 11 colonial civilizations, then with the 12th the King would randomly change to any leaderhead or the European map portion would not work at all. I have not looked at the core DLL, but I have looked at everything else and I find no work-around to get past this limit.

Whatever the source of the problem, the native (non-derived) civilizations are un-affected by the problem.

Here some information for your case.

How To Change the Maximum Number of Players
From Civilization Modding Wiki

This is actually pretty simple. Here are the steps:

* Open CvDefines.h
* Find "#define MAX_CIV_PLAYERS" and look over to the right. That number is the number of players allowed not including barbarians, 18 by default.
* Change the number to the maximum number of players you want.
* Save the file and do a clean build of the DLL.

That's it!
Open CvDefines.h file, line 27:
MAX_PLAYERS (32)
 
Really, the maximum players (or civilization) is 32. When I found this value in CvDefines.h, I changed 32 on 50 and compiled a new dll file. This trick had no positive effect and the problem remained.

I started again to check any possible reasons and at least found the problem! I understand that it looks crazy but Civ4CivilizationInfos.xml don't accept too many remarks inside the file. When I cleaned all my remarks, I started the game and each Europian-style civilization could "Build Settlement". I especially checked all available leaders, and all of them are working correctly.

Thus, the problem was in the remarks inside the Civ4CivilizationInfos.xml. During modding I usually make some notes inside the file and never see that such remarks could somehow affect on game. However, they could....

Good lesson for me. I spend about one day to find the reason and hope nobody more repeat my mistake. You can write inside the file, but be accure!

I discovered this problem with comments/remarks in the XML files a few days ago. Like you, I don't understand how this can cause problems. It really indicates that the game's XML parser is not W3C specification and most likely some self-made parser that has only barely works. Lowest-bidder type cheap coding or a VERY early XML specification, maybe even a pre-XML 1.0 version.

I also change the order of civilization. Now they are in such order:

England
England Europe
France
France Europe,
etc

however, I don't think this is important. It's just help me to work faster with civilizations.

I tried this also, but it was disastrous, however, if I remember correctly, at the time I had not discovered that adding comments/remarks in the XML was bad thing to do. The experiments I made in this area lead me to think that portions of the XML are sancrosanct and not changeable. I will try again and see how it explodes or works :D

I can say that adding comments in the GameText.xml files for the pedia files is not a problem, it does not affect the game adversely.

For my mod "1492: Global colonization" I don't plan to add more Europian-style civilizations, however some African and Asian/Polynesian nations should be added. I'm afraid that some delays could be during long game if too many civilizations will be on the Huge-size map. I guess such combination:

12 Europian-style (Europian, East and Central Asian) + 11 American + 4 African + 4 Asian/Polynesian + 1 Barbarian = 32

is optimal one.



Here some information for your case.

How To Change the Maximum Number of Players
From Civilization Modding Wiki


Open CvDefines.h file, line 27:
MAX_PLAYERS (32)

Thank you for this, it will help in developing the final version!
 
In my experience I had 11 colonial civilizations, then with the 12th the King would randomly change to any leaderhead or the European map portion would not work at all.
I had the same problem. My European-style civilization couldn't find his European part and considered one of native or even European player as a his King. I checked all data for problematic civilizations and found solution exactly as I described above.

... or the European map portion would not work at all.
Check carefully your xml code for civilization where it happens, some errors are cause this problem.
 
KJ Jansson, I tried your solution -- removing all comments/remarks, even those by Firaxis -- and this solved all my problems with European-style civilizations. I now have a working mod with 15 European-style civilizations + 10 African + 12 Asian + 6 Polynesian + 33 American + 1 Barbarian = 77 civilizations >_<

I do not think it would be wise to play all 77 in a single game LOL
 
Back
Top Bottom