Advanced Civ

On a separate note, I've noticed the AIs broadly follow the same tech priorities whichever strategy they are following, which allows efficient catch-up by a human player who is behind but not too behind. Techs that the AI often / almost always research late but that they pay perfectly well for include:
  • polytheism
  • calendar
  • compass
  • printing press
  • scientific method
Even when solidly behind the tech leaders, the human can often get to these techs first and trade for 1-3 other techs.

On the flip side, the AI often end up researching or acquiring a bunch of low value techs that they could probably just skip, like music, theology, military tradition/science.

If the AIs were more strategic about what they researched / budgeted in that they could probably research a lower priority tech then trade it with someone who has already got a higher priority one, that alone might be enough to push players down a difficulty level.
 
Hey, I want to report a small AI bug (I think).

Justinian in my game has a serious naval fleet in his city of Antioch but doesn't seem to do anything with it. He can easily run me over with it but he is just strolling around. At the beginning of the war, he sent an army that took one of my cities but hasn't done anything serious since then.

I have attached two saves - one current and one from around the beginning of the war.


Your mod is so great that this just stuck out for me. Thank you for all the work you are putting into it. I haven't played Civ IV for years but now it's like a whole new game for me.
 

Attachments

  • saves.zip
    350.2 KB · Views: 53
If the AIs were more strategic about what they researched / budgeted in that they could probably research a lower priority tech then trade it with someone who has already got a higher priority one, that alone might be enough to push players down a difficulty level.
There is AI code for that and its impact was increased in K-Mod 1.46. Perhaps it could be dialed up further.

For another generic remedy, it should help to factor the AI tech value (how much the AI is inclined to research a technology) into the AI tech trade value (how much the AI is willing to give for a tech in trade). Those are currently completely separate evaluations, with the tech trade value based primarily on (remaining) research cost. I've already made one small change in that vein: When asking for help or tribute, the AI prefers to ask for tech that it would otherwise like to research
polytheism, calendar, compass, printing press, scientific method
The AI delaying those techs is fine with me, but, yes, not every AI civ should do so. The AI will probably go for early Compass when isolated (on the path to Optics). Not sure about Calendar getting researched late. Well, I can get statistics about that pretty easily through AI Auto Play – the first-discovered date for every tech gets written to the replay file. Maybe the values for unlocked techs are generally too low; that could help explain both Scientific Method and Printing Press. Adding to the list: In BtS, Aesthetics is known as effective trade bait; I assume that this is still the case in K-Mod/ AdvCiv.
On the flip side, the AI often end up researching or acquiring a bunch of low value techs that they could probably just skip, like music, theology, military tradition/science.
So long as the AI goes for Steel before Printing Press, researching Military Science makes sense to me. I expect that Music, Theology, Divine Right get traded around, but I haven't checked.

Fwiw, AI tech evaluation was on karadoc's mind when he was last working on K-Mod:
[...] In any case, the quality of the evaluations for individual techs is far more important that the depth of the search. So although I'm still tinkering with the way the AI looks ahead, I think the biggest improvements would be in how certain things are evaluated...
[...] (But I'm unlikely to get around to that at this stage. My work on K-Mod has slowed to near zero.)
 
Yes aesthetics isn't bad as trade bait still. At around that time the AIs are usually going for alphabet and maths, so as long as you're not too far behind, aesthetics will usually trade one of those.

That said, given aesthetics isn't that useful, and the risk of not getting anything for it if it turns out you're too far behind, it's often too risky to get it if you don't have marble. Compared with the techs I named which are generally pretty useful even if you fail to trade them.
 
Looks like the Hindu Monastery is giving +5 Culture instead of +2. Is that a bug?

 
@eXalted: Must be from Sistine Chapel. That's not supposed to be shown in Civilopedia though. K-Mod also shows the extra culture, but only in the Civilopedia building hover text, not in the special abilities box. So it's a K-Mod display bug that I've somehow made worse. I'll fix it; thanks.

Regarding your savegames, those Byzantine transports in 1904 are only about half full. I don't think that stack could hold onto one of your cities. In 1806, Justinian has a tech advantage (Rifling), but still too few Riflemen, at least in the opinion of the AI. Some 3 or 4 units in Antioch have a defensive role, so the AI won't ship them out. Similarly, some of the Galleons in 1806 are reserved for transporting civilian units. Even if the AI were a bit more efficient at putting together naval invasions, I don't think there are enough units to make it stick in either savegame. So the problem, as I see it, is that Justinian has been overestimating his (near-)future military build-up and has therefore refused (I assume) for 100 years to end this fruitless war. It looks like he usually produces an offensive military unit only in one of his five cities, but my war planning code has been assuming that about a third of his production will get used for producing invaders. I've adjusted the projection, and now he's willing to make peace in exchange for some gold a couple of turns after your civ gets Rifling. (Not sure if I'll include this tweak in the next minor update; otherwise in v0.99.) If it had taken you (quite a bit) longer to get to Rifling, then maybe Justinian would've pulled off another naval landing despite his slow pace of armament. Generally, I think his empire is just too small to invade anyone across the sea this late in the game.
 
@Lanstro: I've looked at some tech dates. (This post has gotten a bit long; adding a spoiler box.)
Spoiler :
Four AI Auto Play runs on Fractal, standard settings, Prince difficulty. Year of first discovery by any civ:
Code:
Aesthetics         -875    25  -600    50
Drama              -350   680  -600  1000
Music               300   640   100   720
Theology            250  1000   225   780
Calendar            225  -100   250    75
Compass             540  1010   800   860
Printing Press     1540  1640  1490  1410
Rifling            1725  1700  1595  1620 (earlier than Steel in the last two)
Scientific Method  1838  1755  1765  1696
This doesn't look too bad. A lot of variance with the culture techs – fine with me. Polytheism always came before Writing I think. I suppose only one civ will discover it though, so I can imagine that it's easy to trade Polytheism around when tech trading becomes available. Printing Press seems a bit late overall, but, if Rifling still gets dicovered before Steel half of the time, then I'm not too worried. I don't think Harbors are generally useful in the early Medieval era, so I can't blame the AI for treating Compass mainly as a stepping stone to Optics. Calendar comes a bit later than I would've guessed, and Scientific Method ... a bit late I guess. The 1838 date was really late, don't know how much of an outlier that is.

So I've increased the weight of unlocked techs a bit; that should help Compass, Printing Press and Scientific Method. And I've dialed up the impact of potential tech trades a bit. K-Mod enables that whole "trade bait" logic only, randomly, with a 20% probability whenever the AI chooses a tech to research. To be accurate, the probability is equal to the contact probability for AI tech trades, which is between 5% (Tokugawa) and 100% (Mansa Musa); 20% for about 20 of the AI leaders. That mostly sounds good to me; I've simply taken the probability times 5/3, allowing the AI to choose (typically) every third tech strategically (rather than every fifth).

Repeating the experiment above:
Code:
Aesthetics        -1200  -825 -1520   200
Drama               620   -75  -625   560
Music               560   560  -150   860
Theology            225   640   -50   560
Calendar            125   100   100   450
Compass             150   600   300  1120
Printing Press     1260  1500  1570  1585
Rifling            1540  1695  1635  1625 (first two columns: earlier than Steel)
Scientific Method  1500  1565  1635  1700
Well, the sample size really is too small. And I should've used the same maps and civs as before. I think I've only done so for the two or three of the four runs. It does seem that Scientific Method has benefited from the changes. The culture techs came very early in the third column because Gandhi went on some sort of spree. In that same game, the isolated Celts bee-lined to Optics (early Compass). In the first column, Rome was sharing a continent with only the Netherlands and went for Compass early, without immediately continuing to Optics. The Netherlands were teching very fast in that game and were responsible for the early Printing Press and Rifling date (but not for Scientific Method). If Calendar (or any of the above) still gets discovered too late, then it would seem best to look into the specific AI code that evaluates the effects of the tech (Plantations).

Another change I've (tentatively) made – and which I don't think has affected the dates above much – is that the AI adjusts its tech trade value based on the tech discovery value. The adjustment is between +25% trade value (AI pays extra for an especially useful tech) and -33% trade value (AI pays less if it has no real use for a tech). The function for the discovery value (AI_techValue) doesn't actually take into account unlocked techs; only the function that the AI uses for choosing its next research (AI_bestTech) performs this lookahead. So I'm caching some intermediate results from AI_bestTech to inform the trade value adjustment, but those cached results have a bias for cheap techs – so the implementation isn't ideal. That's one reason why I've kept the trade value adjustment rather small. The other reason is that I don't want to make techs like Divine Right even more unattractive to research. (Divine Right really needs a buff, crullerdonut has posted some proposals, I need to get back to those.)
 
Last edited:
@f1rpo Thank you for the really detailed explanation. Sounds really logical to me.

Yeah, that's because of the Sistine Chappel. I can see that bonus in other religious buildings too.

Once again, thank you for this really wonderful mod and for the constant updates!
 
Looks interesting. As you say the sample size is small, and also there is some subtlety to it (eg the way that only 1 AI gets poly typically). Also just as important is how the AI prioritises techs available at a similar time - you've noted rifling a bit but not the techs that compete with things like poly (writing, sailing), aesthetics (maths, alphabet) and printing press (education).
 
I find that very often the AI is trying to take a city of his with a catapult without having a single unit defend it. It parks it in front of the city just waiting for my counterattack against it. (I can provide a save if it is needed). Most of the time it doesn't even attack, just comes next to my city and returns.
 
Last edited:
I don't know if these AI feedbacks are welcome but I just had an empty city that the AI spent a turn bombarding and then a turn later entered with its army.
 
Heyo!

I only recently found out about this mod and I must say, I'm impressed. I can't imagine how much effort that 500 page long manual alone must have taken. :crazyeye:

I was both pleasantly surprised and majorly annoyed to experience the AI launching a coup against me and swapping me back from Hereditary Rule into Despotism. Pleasantly surprised because I don't think I've ever seen the AI launch a coup before and I like that it's now both able to do it and clever enough to do it in a way that deeply hurts its victim. Majorly annoyed because I happened to be the victim in this case. :lol:

I'll definitely be keeping an eye on this mod's development from now on!

However, there's unfortunately some features I'm sorely missing, probably because I've grown used to BAT/BUG's interface coddling me:
  • Seeing all the tiles assigned to a city when selecting it on the world map
  • Seeing Specialists, Happiness, Health, and the number of turns it takes for a city to reach the next culture level when hovering over the city bar on the world map
  • When in the tech popup hovering over a tech that has some optional prereqs I could still research for it I don't see the "Sped up by" hint
  • No button to reset espionage weights to defaults (though I guess you can just right-click on the minus next to every leader to get the same result)
  • Last but definitely not least, apparently I can no longer use the NumPad to navigate to other cities when I'm inside a city screen. I just tested it in BtS, this is a Vanilla feature, so I'm wondering if you removed it on purpose (perhaps because it was computationally intensive) or accidentally? I'm guessing the latter as I was unable to find anything documenting this removal in the manual.
If these issues were fixed I'd honestly consider this mod the ultimate Civ4 experience. :)

Best regards,

Imperator Knoedel
 
On 0.98b, it seems like changing the minimap render size breaks replays. For some reason my replays show up under multiplayer games instead of singleplayer, and the map is corrupted. Changing the minimap render size from 2048 to 512 and retiring again generates a proper replay file.
 

Attachments

  • Civ4ScreenShot0005.JPG
    Civ4ScreenShot0005.JPG
    322.7 KB · Views: 44
I don't know if these AI feedbacks are welcome but I just had an empty city that the AI spent a turn bombarding and then a turn later entered with its army.
They're welcome, I just haven't been on the forum much for the last er..., gee, two weeks. I don't have great ambitions for improving the tactical AI, but when it comes to AI moves that are outright bewildering, I like to at least check if there's some easy remedy or band-aid. I'm aware that the AI will sometimes e.g. cross a river before entering an empty enemy city. Doesn't seem entirely easy to fix (but I haven't given up on it). I don't think I've seen the AI bombard an undefended city. Maybe this is easier to fix. If you happen to (still) have a savegame, I'd like to look into it.
I find that very often the AI is trying to take a city of his with a catapult without having a single unit defend it. It parks it in front of the city just waiting for my counterattack against it. (I can provide a save if it is needed). Most of the time it doesn't even attack, just comes next to my city and returns.
Yes, a savegame would be helpful. Without a savegame, I don't even know which AI routine causes this (i.e. whether the Catapult's role is city attacker, generic attacker, pillager ...). I don't recall encountering this behavior in my own games ... perhaps it's something I've broken recently, somehow.
I only recently found out about this mod and I must say, I'm impressed. I can't imagine how much effort that 500 page long manual alone must have taken. :crazyeye:
Only the first 25 pages are carefully written, the rest is more like personal notes edited a bit for readability. Still a chore. It seems that I could've documented the mod much more efficiently through Git issues and tags. (Since I'm not going to develop the mod for too much longer, I'm going to stick with my method.)
I was both pleasantly surprised and majorly annoyed to experience the AI launching a coup against me and swapping me back from Hereditary Rule into Despotism. [...]
Especially annoying after having built the Pyramids for early Representation. But I don't think the AI does it incessantly, usually. Anyway, I'm pretty sure that's a K-Mod change. K-Mod has revised much of the AI code for evaluating espionage missions.
City cycling with num pad: Yes, I've broken that without noticing. Thanks. The bug causes the game to cycle to the currently selected city, so ... :blush:
However, there's unfortunately some features I'm sorely missing, probably because I've grown used to BAT/BUG's interface coddling me: [...]
Right, K-Mod mostly lacks BULL, and I've only rectified that on a case-by-case basis, merging some BULL code and sometimes implementing my own solutions. There's still some semi-important stuff missing. I have a list, but it's always helpful to read what features are actually missed by players.
No button to reset espionage weights to defaults (though I guess you can just right-click on the minus next to every leader to get the same result)
I wasn't aware of that button. Sounds somewhat useful; added to my list. All this is unlikely to be included in v0.99 though; don't know about v1.0 either. :undecide:

@VDNKh: Could well be that I've broken that somehow. I've just tried setting
MINIMAP_RENDER_SIZE to 2048 and HOF_STORE_REPLAYS_AS_BTS to 0. Then when I start a new game and retire after a few turns, the minimap is intact and also when I access the replay from the HoF screen. My old 512-pixel replays also still seem to get displayed correctly. That's with my current version of the mod though; maybe I need to actually try it with 0.98b. Or is there some other step I ought to take to reproduce the problem?
 
I was trying out 0.98b, but I came across a fairly game-ending bug. Using the Draft function the first time (with the hints on) in a game works alright, but the second time you use it, the screen goes black except for the UI elements.

I tried the using an old save game (The one with Music Man) and because I had already Drafted in that game, no hint pops up, so the very first Draft press causes the same problem.

I did a little troubleshooting: the behavior does not happen in vanilla BtS, nor does it happen on 0.97c. (I had to check this because my computer has been having some hard drive issues, so I needed to reinstall the game entirely to start playing again.) I tried changing the graphics settings around, to see if any of them were at fault. Windowed mode, a different rendering quality setting, a different antialias setting, and freezing animations, all of these made no difference and the black-screen upon Drafting in 0.98b still happened.

I didn't include any save files because the problem seems to happen on any save file for me.
 

Attachments

  • Civ4ScreenShot0132.JPG
    Civ4ScreenShot0132.JPG
    50 KB · Views: 44
Yes, a savegame would be helpful.
Unfortunately, I only have the savegame of the "suicidal" catapult next to my city. I've attached it here. I no longer have the other save where the AI bombards an empty city.

The catapult is next to Edirne to the south.
 

Attachments

  • Catapult.CivBeyondSwordSave
    140.1 KB · Views: 37
There is a weird bug where cities suddenly start telling me that they cannot continue producing the current unit and I have to select it again. It started appearing in both my playthrough after I created the Standard Ethanol corporation.

I have attached a save where just after I capture Beijing with the stack northwest of it, the bug appears.


 
I wasn't aware of that button. Sounds somewhat useful; added to my list.

In fairness, I only later realized this is a feature of Dawn of Civilization, not of BAT or BULL.
 
I have attached a save where just after I capture Beijing with the stack northwest of it, the bug appears.
Forgot to add the save. Here it is.
 

Attachments

  • Production_Issue.CivBeyondSwordSave
    384.5 KB · Views: 37
Possible bug: Germany declares on me, moves a stack next to my border city, I evacuate said border city, Bismarck brings Ethiopia in to war. Several turns pass with Bismarck having a stack next to my unoccupied city and not taking it. Weird behaviour or a deeper plan?

What happened next: Having gathered some forces I move them in to open city, Bismarck then attacks, takes the city, then moves out, the Ethiopians then move into the city, then move out deeper into my territory, so I move into the open city with my main force.
 
Last edited:
Top Bottom