timerover51
Deity
When and where does the restrictiion appears?
I've got not mods with a lot of resources.
I'm dealing with default game: it has 26 resources (in Civ3Conquests)
There are several data structures in the game, where resources-relevant information stores.
Usually it's space corresponds to resource type count (which of course can be greater than 32)
In these cases memory blocks for it's data are allocated dynamically and there are no problems. You get items count, pointer to allocated memory and you can manipulate with the corresponding data.
But I've found at least one data field, which does't depend on resource type count;
In City class, there is a 4 bytes (32 bits) integer, used by City Form to draw available resources when the city has no connection to the capital.
In C3C this data field has offset 0x9C from City class object.
It can be found in 2 ways:
1) Each City class object has 4-char string "CITY" with offset 0x08 from object start. Therefore the value offset from "CITY" is 0x94;
2) City name string has offset 0x1E0 from object start. Therefore the value offset from city name is -0x144
Here is how that value works. The value is 32-bits integer with 1 bit for each resource type. If current city to display on City Form has no connection to the capital city, City Form starts checking the value for available resources. If a resource type has corresponding bit and it is strategic City Form renders it in the resource list or in the appropriate form (when strategic resource count > 8) like this:
I don't know what happens when the resource count becomes > 32 because I don't have appropriate mods to test it.
P.S. City Resources Dialog has only 24 places to render resource type icons.
Antal, the game has a bug with respect to strategic and luxury resources that when you exceed a combination of the two of 32, "phantom" resources that a city is not connected too begin to appear in the City Resource Dialog box. It would appear that the cause of this is the bold-faced comment on coding that I have quoted. Would it be possible to increase that 32-bits integer to a 64-bits or 128-bits integer without major problems?
Second, would it be possible to increase the number of resources that appear in the City Resource Dialog box? That may cause display problems however.