C2C SVN Changelog

Supply Train is working. It is not one of the food merchants it is one of the trade merchants. Although I think the unit graphics may be the same in both.

edit I had updated the schema on the food merchants so they should be working also - I just haven't had time to test them yet.
 
SVN6528

Fixed a potential int overflow with high CultureLevels in CvCity.
Fixed a crash then opening the Civic's Pedia without a game running.
Fixed Xml Errors in ls612_CIV4TraitInfos.xml.
Added some Debug Messages from n47's changes.
 
New Buildings:

Ground Scrubbers
Megatower
Megatower (Skybridge)
Megatower (Mall Level)
Megatower (Office Level)
Megatower (Police Station Level)
Megatower (Fire Station Level)
Megatower (Park Level)
Megatower (Education Level)
Megatower (Biodome Park Crown)
Megatower (Solar Power Crown)
Megatower (Air Scrubber Crown)
Megatower (Hologram Advertising Crown)
Megatower (Wind Power Crown)
Megatower (Theme Park Crown)
Megatower (Medical Level)
Megatower (Research Level)
Megatower (Hotel Level)
Ecomegatower
 
SVN6531

Removed redundant And from the ReplacementCondition tags in CIV4GameSpeedInfo.xml.

Out commented all CultureLevel's with a iThreshold over 21474836.
Because iThreshold cannot be more then 21474836. At this moment high Levels in general make no sense because at some point Culture over 21474836 will be cut and this goes for City, Player, Team or the Game CultureLevel.
 
1 thing I learnt in civ iv modding.
Don't trust anything given to you without testing.

Using trials and error brutal method.
The limit is actually 193m rather than 21m.

Using my wb to adjust, it proves that it has no issue to display the time100 value correctly either.

Anyway setting a limit to culture level threshold is not solving any problem.
Culture still increase even at max lvl.
So even if you set max culture lvl at 21m, it will still continue to increase.
Then once it reaches 193m, you are still screwed
 
1 thing I learnt in civ iv modding.
Don't trust anything given to you without testing.

Using trials and error brutal method.
The limit is actually 193m rather than 21m.

Using my wb to adjust, it proves that it has no issue to display the time100 value correctly either.

Anyway setting a limit to culture level threshold is not solving any problem.
Culture still increase even at max lvl.
So even if you set max culture lvl at 21m, it will still continue to increase.
Then once it reaches 193m, you are still screwed

To limit the CultureLevels makes sense because iThreshold over INT_MAX / 100 = 21474836 has no meaning.
In the Dll the __int32 CultureTimes100 gets divided by 100 to get the actual CultureLevel of a City and __int32 has a range from –2147483648 to 2147483647.
To really solve this problem all the Times100 must be changed to __int64 that goes from -9223372036854775808 to 9223372036854775807.
 
You don't get it.
Lowering the culture threshold lvl only solves half the problem.
Culture still continue to increase past the max culture lvl.

In short, even if you set a limit of 10m, it does not prevent culturetime100 from increasing further to 100m.
Then when it reaches the 193m limit, your game is still screwed.
You have to reduce culture output as well so that it will never reach that limit.
 
You don't get it.
Lowering the culture threshold lvl only solves half the problem.
Culture still continue to increase past the max culture lvl.

In short, even if you set a limit of 10m, it does not prevent culturetime100 from increasing further to 100m.
Then when it reaches the 193m limit, your game is still screwed.
You have to reduce culture output as well so that it will never reach that limit.

Yes that is right but i only commented them so it is very easy to activate them again if the bigger problem gets fixed by changing all the Times100 to a bigger type. I think why have those CultureLevels active then they have no meaning and instead cause problems. I would do the real fix but in the moment i already work on a big change so i don't have time to do this.

Also look at this piece of code it calculates the global culture from all the citys from all players so if this goes over INT_MAX you have a problem and you complain about deactivating CultureLevels that go over this limit for just one single City:confused:.

Code:
int CvCity::countTotalCultureTimes100() const
{
	int iTotalCulture;
	int iI;

	iTotalCulture = 0;

	for (iI = 0; iI < MAX_PLAYERS; iI++)
	{
		if (GET_PLAYER((PlayerTypes)iI).isAlive())
		{
			iTotalCulture += getCultureTimes100((PlayerTypes)iI);
		}
	}

	return iTotalCulture;
}
 
You don't get it.
Lowering the culture threshold lvl only solves half the problem.
Culture still continue to increase past the max culture lvl.

In short, even if you set a limit of 10m, it does not prevent culturetime100 from increasing further to 100m.
Then when it reaches the 193m limit, your game is still screwed.
You have to reduce culture output as well so that it will never reach that limit.

Except that they are modding the DLL. In the DLL it is trivial to make it not go up anymore after it hits a limit.

But yes, the culture output still needs to be reduced. Especially all the percentage bonuses that stack up but also the output of some normal buildings is quite high - some normal buildings in C2C can give more culture per turn than most wonders (or possibly any of them) in regular BtS.
 
Because the issue is that if you assign 21m as the highest level, then it means there should be ways in the game for the culture to actually reach that high. Else what is the point of having it?

However, culture does not stop increasing once it reaches the highest level.
Thus, it will just keep increasing non stop and reach the INT_MAX limit and break the game anyway.

Thus, max culture level should be much much lower, so that there is leeway for culture to continue increasing pass the level for many many many many turns without breaking the limit.
Else, you have to twist the code such that culture no longer increase at maximum culture level.

Furthermore, when you consider that countTotalCultureTimes100 code, it is obvious that few cities with 10m culture each will also break the game.

Unless you change it to LONG or something else, even a 10m culture level is dangerous.
 
However, culture does not stop increasing once it reaches the highest level.
Thus, it will just keep increasing non stop and reach the INT_MAX limit and break the game anyway.

Except that it does stop increasing when it hits the limit. In C2C. Because the DLL has been modified to make it that way.

Somewhat, anyway.

In the C2C DLL the setCulture and changeCulture methods of the CvCity object don't let you set the city's culture above MAX_INT/100. Anything that would do so gets converted to the limit (assuming there is no bug in it). This stops any one city from going out of range, but does not stop the sum of the "CultureTimes100" from all your cities (or even just 2) from going out of range in countTotalCultureTimes100. It also does not stop the total culture counter on the player object from going out of range.

The changeCultureTimes100 function is applying the limit. Oddly, the setCultureTimes100 function is not itself checking the limit. In the DLL it looks like there are only 2 places that directly call setCultureTimes100 and they should not be an issue, but it is also exposed to Python - even though the Python might not be calling setCultureTimes100 anywhere, it still ought to check.
 
Added in more Medieval re-skins by Sparth for S. America but only for TUPI this time, otherwise the SVN times out too much, will do later modules tomorrow.

Something wrong with the tupi_artstyles will look into it tomorrow so i put old one back
 
6541
Made Cultural victory at Monumental since its the last cultural rank.
 
Back
Top Bottom