Delnar_Ersike
Prince
I just had a look at the AI's great works swapping logic on a whim, and holy fish on a stick, the code looks like it's been deliberately written to run as slowly as possible. If you have the time, take a look at CvPlayerCulture::MoveWorks(), CvPlayerCulture::ThemeBuilding(), CvPlayerCulture::ThemeEqualArtArtifact(), CvPlayerCulture::FillBuilding() and the last three lines of CvPlayerCulture:: DoSwapGreatWorks() to bask in the glory of multiple excessive loops, already-processed items of a vector not being removed before the vector is processed a second or third time, iterator for() loops that use iterator++ instead of ++iterator (the latter is supposedly circa 40% faster than the former), arbitrary mixing of signed and unsigned integers, excessive use of sequential search, flat-out useless loops (thinking about the last few lines of MoveWorks() specifically), and other marvelous examples of badly written code. The cherry on top is that some of the code written in those functions doesn't even do what Firaxis' comments say it should (eg. the last few lines of MoveWorks() are supposed to first fill non-endangered buildings with unthemed works, and then fill endangered buildings with unthemed works, but instead, the game just attempts to fill non-endangered buildings with works twice).Your plans sound great I too have noticed the canEnterTerrain being called a lot (using a dll sniffer while the game runs). I've also noticed that the checks for tourism buildings (i.e. the checks that deal with moving/valuing great works and creating theming bonuses) gets called a lot. I've been meaning to look at it. I'll keep an eye on your work, and once you feel like you've reached a stable point in your work, and the CP has calmed down, we'll start working on a merge.
I play on Deity, and just tried the mod on Deity and got rocked hard. I haven't played a step lower in forever, but I think I might have to.
Even the barbarians were ridiculously reasonable with their decisions. It was amazing.
Heh, thanks, guess that's one more notch on my invisible barrel. I measure the success of the mod in how many of its users it can force to lower their difficulty without me having to resort to blatant AI cheating.
