Advanced Civ

Thank you for the detailed answer. Hen roughly replacing files with XXL World, I get an eternal download at the "initializing" point when choosing the size of ULTRA , 48-ci DLL has already been installed.

On a pure AAdvCiv + 48-ci DLL with a modified map Hemispheres.py . The extreme value at which I was able to load is (how many tiles?)
WorldSizeTypes.WORLDSIZE_HUGE: 513
Then I edited the RoM_Donut.py map that I often use with XXL World, I usually play in it at the size 51*51*4*4=41616. In AdvCiv, the game started at the maximum size 35*35*4*4 =19600(?)

I play mainly on RoM_Donut.py , Hemispheres.py , Highlands.py . To start the game I use Civ4BeyondSword2015.exe . Since I often play online with friends with these modifications
 
Last edited:
Quick and probably not very useful bug report, but: I've generated 8 new maps on Totestra huge / 18 civ and have had 3 instances where the it hung up during map generation, before switching away from the menu screen. I don't recall this happening before - did you make any changes to that part of the game? The maps that were generated were fine.
 
Here goes a 2nd release candidate. Edit: Outdated now that v1.08 has been entered into the resource dtatabase.

For my part, I still want to do some smoke tests with unusual settings before the proper release. Changes since the 1st release candidate:
Spoiler :
• Optional message upon meeting rivals to remind the player to set espionage weights. Can be enabled on the bottom of the Alerts tab of the BUG menu; disabled by default. [advc.120l] Related post
• Fixed a bug that seems to have made the AI willing to be hired for war only when very close to beginning war preparations of its own accord. As far as I can tell, this has been broken since the initial release of AdvCiv.
• Fixed a bug that seems to have prevented religion hate ("heathen religion") from intensifying over time. This bug was introduced in AdvCiv 1.01. [advc.130n]
• The diplo penalty for capitulated vassals decreases over time. (Gradually decreases to 50% over the course of 75 turns on Normal speed.) [advc.130w]
• AI Scouts exploring the map try to avoid (visible) enemy units except for the very early game (when there are just Animals). Automated human Scouts and, after the very early game, Warriors also try to avoid enemy units. [advc.031d]
• Citizen Automation assumes that pressing an emphasis button is intended to change the citizen assignment. Still doesn't guarantee such a change, but will try harder if the normal emphasis effect isn't strong enough to cause a re-assignment. [advc.131d] Related post (under "Citizen automation")
• Effect of Raging Barbarians dialed down a little bit. [advc.300]
• Tech diffusion to the Barbarians on Marathon speed is half as fast as on Normal speed rather than 40% as fast. [advc.301]
• More efficient update of trade networks ("plot groups"), decreasing turn times by 10% in a test. [advc.pf]
• Map generator: Lakes can no longer replace Peaks. [advc.129e]
• Fixed a bug (overflow) that had made maps with more than ca. 20000 land tiles impossible to generate. (Huge maps normally have only about 10000 tiles in total.) This problem was introduced by AdvCiv 1.07. [advc.129e] Bug report
Bugs introduced by the 1st release candidate (rc1):
• Crash upon civs establishing first contact through a vassal agreement. [advc.071]
• Messages about combat during AI turns had shown the per-round chance to hit rather than the overall combat odds. [advc.048c]
• Had no longer been possible to load some savegames created by earlier versions of AdvCiv. [advc.313]
Already implemented in rc1, just not mentioned by earlier release notes:
• Fixed Privateers refusing to attack directly from a city tile (bug introduced long ago, in v0.97b).
Edit, for reference: change log of 1st release candidate
 

Attachments

  • AdvCiv_v1.08rc2.zip
    10.4 MB · Views: 26
  • CvGameCoreDLL_48civs.zip
    2.2 MB · Views: 17
Last edited:
@Rawwwrr: Seems that somewhere near 20000 land tiles, a numeric overflow was occurring in code of mine. That was causing thousands of lakes to be placed, and, after each lake, the map areas (landmasses and waterbodies) were recomputed, leading to very long delays (a few hours probably). I've fixed that in the 2nd release candidate above. Thanks for making me aware. Could well be that there will be further overflow issues over the course of a game. But, then, karadoc probably hadn't tested such large maps either, and, nevertheless, K-Mod has been working for you (is my understanding). In my tests with about 25000 tiles, AI turns were (considerably) faster with AdvCiv than with K-Mod. Hopefully, that'll also be true at twice that grid size. If things become too slow, you could try disabling the "UWAI" component, meaning that decisions on war and peace are made, largely, as in K-Mod. UWAI can be disabled by using the "Aggressive AI" game option, but it should also be possible to shut it down during a game by exiting and setting DISABLE_UWAI to 1 in GlobalDefines_devel.xml.
On a pure AdvCiv + 48-civ DLL with a modified map Hemispheres.py . The extreme value at which I was able to load is (how many tiles?) WorldSizeTypes.WORLDSIZE_HUGE: 513
That should land somewhere near 5.14 * 60 * 42 * 2 * 2 = 51811.2.
Which is more than 51*51*16, but Hemispheres produces less land than Donut.

I guess you know how to adjust the map scripts. I see that Highlands refers to the world sizes in getGridSize (as usual) and also in generatePlotTypes, for grain values.
[...] I often play online with friends with these modifications
Do you ever meet on those gigantic maps? :)

By the way, I think I've finally discovered why BtS uses a 4x4 cell size. At 2x2 cell size, when I enable the tile grid (Ctrl+T) and zoom into Globe view, tile boundaries get shown inside Ocean tiles. I'll see if I can fix that somehow. I want to keep the 2x2 cell size because it allows grid dimensions (for small maps) to be specified more precisely.
 
@Jorunkun: Totestra isn't big enough to have the overflow issue (that I've fixed), must be something else. (And Totestra/PerfectWorld has its own lake placement code anyway.)
Quick and probably not very useful bug report, but: I've generated 8 new maps on Totestra huge / 18 civ and have had 3 instances where the it hung up during map generation, before switching away from the menu screen. I don't recall this happening before - did you make any changes to that part of the game? The maps that were generated were fine.
So the loading screen ("Initializing") doesn't even appear? Just freezes after you click "Launch"? (Never seen that.)
 
and, nevertheless, K-Mod has been working for you (is my understanding).
Yes, that's right
In my tests with about 25000 tiles, AI turns were (considerably) faster with AdvCiv than with K-Mod.
I am sure that I will get the same result using my card size
I've fixed that in the 2nd release candidate above.
Now I checked on the latest update (AdvCiv_v1.08rc2+CvGameCoreDLL_48civs) on the map RoM_Donut.py 51x51 everything is fine to load :thumbsup:
Do you ever meet on those gigantic maps? :)
Correctly noted :lol:, meetings usually take place later, but with this size of the map, the world feels more realistic, at the later stages of games on pure XXL World, moves were loaded for a very long time, it was strictly forbidden to collapse during loading, departure was provided, it became noticeably easier with K-Mod, I hope it will become even faster with AdvCiv :).
 
Did you take a look at this? Is this feasible for Civ4/AdvCiv?

A 50% improvement is a lot... and opens the door to implement things previously considered "too slow".
 
@f1rpo any thoughts why your GameFont.tga doesn't recognize the name of the city when using Russian?
 

Attachments

  • 2022-11-18_163614.png
    2022-11-18_163614.png
    4.7 MB · Views: 29
@Rawwwrr: Hopefully, the GameFont.tga linked in this post will help. K-Mod only has a custom GameFont_75.tga (from the BUG mod), which, apparently, doesn't cause problems. I don't know how to make GameFont.tga compatible with both the Russian edition (which I don't personally have access to) and the MULTI5 edition; maybe there is no way. I assume that you'd have this issue with any mod based on BULL (as opposed to just BUG).
 
This version really came up, I also added the missing airplane icon (?) from your GameFon to it
 

Attachments

  • GameFontPODmOd.rar
    1.3 MB · Views: 12
Thanks, that's for the BULL Airport indicator, shown above the city bar on the main map. I thought I had tried placing it in just that spot, but somehow that didn't work when I tested it at the time. Maybe I just didn't test it right; seems to work fine now with your version of the file, at least on my end. (Though the city name of Guimarães still isn't shown correctly.)
 
@Isabelxxx: Thanks for the hint. If I had experience with parallelizing code (like devolution does), this would be worth considering; as it is, I think there are still lower hanging fruits. Though I don't think any one optimization will cut anywhere near 50% at this point. I was quite surprised that my latest tweak to the plot group updates saved more than 10% (in the one test I ran). While we're at it, here's a rough top-down breakdown of time spent based on (my reading of) a recent run of the DLL-internal profiler:
Spoiler :
Indentation indicates subroutine calls.
Code:
CvGame::doTurn										13%
	CvGame::autoSave							5%
	CvPlayer::doTurnUnits						6%
		CvPlayerAI::AI_updateFoundValues	4%
CvUnitAI::AI_update									23%
	KmodPathFinder<Group>::generatePath			8%
	CvSelectionGroup::continueMission_bulk		9%
		CvUnit::setXY						5%
			CvPlot::getBestDefender		4%
CvTeam::doTurn										27%
	UWAICache::update							18%
		KmodPathFinder<Team>::generatePath	10%
		WarEvaluator::evaluate				5%
	CvTeamAI::AI_doWar							9%
		WarEvaluator::evaluate				7%
CvPlayer::doTurn									15%
	CvPlayerAI::AI_doTurnPre					3%
	CvPlayerAI::AI_doDiplo						9%
CvCity::doTurn										15%
	CvCityAI::AI_doTurn						10%
		CvCityAI::AI_assignWorkingPlots	6%
		CvCityAI::AI_updateBestBuild	4%
	CvCityAI::AI_chooseProduction			2%
This doesn't include what happens in the graphics engine, nor the main screen updates in Python. I'm guessing that those tasks take up at least 25% of turn times. Also, this test was only on a Huge map with 18 civs, the numbers will probably shift quite a bit with, say, 32 players on an XXL map. Anyway, in this breakdown, the UWAI component accounts for a total of 27% (most of CvTeam::doTurn), the much simpler K-Mod war planning code should only take a fraction of that when UWAI is disabled. Pathfinding totals 18%; that's already highly optimized, though one could still make parts of the AI less reliant on pathfinding. AI_doDiplo would be my best candidate right now for saving a little more time. Don't really know what's taking so long there, maybe certain checks for items being tradeable.
edit: typo
 
Last edited:
It appears at some point you've pulled out the change that went in with BTS 3.17, that keeps your privateers safe while docked inside your cities.
Anyone with open borders just drives right in and kills them.
 
That sounds like something I would do, accidentally, but I can't reproduce the problem. If I just load a savegame, give an AI neighbor a fort through WB, put a Privateer in, another into an AI city, and move my Frigate through the Privateer tiles, then they coexist peacefully (and the Privateer's nationality gets revealed; this is a deliberate change). If I declare war, then I can't enter the city or fort at all. Can't get the AI to attack my Privateer in a city either. Maybe some very specific conditions need to be true.
 
That sounds like something I would do, accidentally, but I can't reproduce the problem. If I just load a savegame, give an AI neighbor a fort through WB, put a Privateer in, another into an AI city, and move my Frigate through the Privateer tiles, then they coexist peacefully (and the Privateer's nationality gets revealed; this is a deliberate change). If I declare war, then I can't enter the city or fort at all. Can't get the AI to attack my Privateer in a city either. Maybe some very specific conditions need to be true.
Yes, my privateers never encountered this during several games.
 
@f1rpo If I replace yours CIV4GameSpeedInfo.xml on the standard, it won't break anything in fashion? It's just that the speed (of research) in your fashion turned out to be too fast for me
 
I've added a bunch of XML elements (namely these). The DLL shouldn't require those, but they will default to 100% if absent. 100% will work well only for Normal speed. If Marathon is too fast, then I would suggest
• replacing the 250% values in my version of Civ4GameSpeedInfo.xml with 300%,
• restoring the years-per-turn for 1500 turns (still present in the file as a comment), and
• reverting a few other elements to their BtS values: iHurryPercent=33, iInflationPercent=10, iInflationOffset= -270.
• May also want to increase the iThreshold for Legendary culture (i.e. for culture victory) in GameInfo\Civ4CultureLevelInfo.xml to something like 125000.
(I've taken these suggested values from this Git commit – the commit mainly responsible for speeding Marathon up a bit in the mod.) It might be better for game balance to increase some (most?) of the 200% modifiers to 250% (if the 250s are increased to 300); 200% is as in BtS, with units costing only twice as much as on Normal speed vs. techs costing three times as much.

Or, if the issue is just that tech progress gets a bit ahead of the game year (e.g. Railroad already in AD 1700), there are various tech cost modifiers that could be adjusted, e.g. in Civ4EraInfos.xml and Civ4HandicapInfos.xml. Or the years-per-turn progression in Civ4GameSpeedInfos.xml could be tweaked, but that's tricky because the years and turns need to add up to specific total values.
 
The marathon 2:3 unit:tech ratio is part of why it plays so different.
I've played a couple games now with your 4:5 ratio, and I don't like it near as much.

Incidentally, I've been playing all these years and I'd missed the Totestra map script all this time until it was mentioned upthread. Currently near the end of a game (Marathon/Huge/30civs) on the Ringworld map, which plays so different from a normal map it's amazing.
It's getting close to spacerace time, and I've got opponents to stop that are so far away I've taken to doing weird tactics like building an airport in every city and keeping extra units there.
Transports, even with circumnav and Nav2, are just too slow. So I take one city on a far continent, rush an airport (culturebombing first if possible), and then flood in units from everywhere.
 
I'll make it a bit easier to restore the 300% Marathon modifiers – by putting a modified copy of the whole Marathon setting in Civ4GameSpeedInfos.xml as a comment. Will then only need to uncomment that and increase the Legendary culture threshold in Civ4CultureLevelInfos.xml. I've tried making it even easier by adding 300% Marathon as a fifth speed setting and hiding it from the game setup screens (which are implemented in the EXE) unless a <bHide>1</bHide> flag is toggled in XML – but such a hack leads to too many headaches. I don't want to add another slow setting that is visible by default because that'll suggest that the mod is especially aimed at slow game speed. Of course, if those who actually play this mod on Marathon (that would not include me), for the most part, prefer the 300% setting, then it'll make more sense to restore that and keep the 250% setting commented out.
The marathon 2:3 unit:tech ratio is part of why it plays so different.
It's not clear to me that it ought to play all that differently. I guess the intention is to pair Marathon with Huge map size to make Domination (Diplomatic?) victory attainable. v1.08 lowers the land threshold for Domination. The BtS formula is max{51, 78 - 2 * civs ever alive}, which means that it's 51% whenever there are 14 or more civs. The new formula is max{second best percentage + 25, 71 - 2 * civs ever alive}. With 30 civs, if one can reduce every rival to at most twice their "fair" share of the world, i.e. 1/15, that should set the threshold to ca. 32%. Still, maybe the sense of having a global empire (whether or not the player ultimately aims at a Domination victory) is diminished with the 4:5 unit-to-tech cost ratio. And then there are super-Huge maps and Huge Flat maps. Maybe, for those, 400% tech and 300% unit production cost would be best.

My impression is that the 2:3 cost ratio almost forces an optimizing player to conquer enough to, at least, have more (productive) land than anyone else.
 
I've uploaded v1.08 edit: to the database. Just posting here to point out the few changes since the 2nd release candidate:
Spoiler :
• Air Bomb missions can destroy Roads and downgrade Railroads to Roads in unimproved tiles (i.e. terrain improvements get destroyed before routes). Pillaging a Railroad also turns it into a Road rather than destroy it straight away. Players can air-bomb their own routes. [advc.255] Inspired by the Close to Home mod (Git commit)
• Fixed fast human units pillaging twice when only ordered to do so once (bug introduced in v0.99). [advc.004c]
• Fixed a bug that had prevented on-screen messages triggered in between turns from being delayed until the human turn. The intention was, on the contrary, to delay all such messages when in Globe view. This is how it worked prior to v1.0 – and how it is working now. [advc.106]

And I've done this:
[...] make it a bit easier to restore the 300% Marathon modifiers – by putting a modified copy of the whole Marathon setting in Civ4GameSpeedInfos.xml as a comment. [...]
 
Last edited:
Top Bottom