Advanced Civ

Another update: AI is willing to train and escort a settler with a special unit (national unit with no impassables) in order to reach a settlement site that other units cannot reach. This is pretty cool. When I saw it start building the special unit I knew it recognized and was able to solve the problem.
 
I haven't seen any more crashes (though I haven't reached the later eras in my last few games), but I got this bug where nobody could found Buddhism. You can see in the screenshot that I just researched Meditation but Buddhism hasn't been founded by anyone. After removing Meditation from everyone who had it (only myself and Montezuma - I'm not sure who discovered it first) and researching it again I founded Buddhism normally.

This game was with the default AdvCiv rules except with tech trading turned off. The attached save file was unfortunately made a few turns after the screenshot so I'm not sure how helpful it is.
 

Attachments

  • religion.jpg
    religion.jpg
    329.9 KB · Views: 200
  • adv-buddhism.CivBeyondSwordSave
    adv-buddhism.CivBeyondSwordSave
    92.3 KB · Views: 185
Not sure whether this as a bug or just bad luck, but in my last game my GP farm spawned something like 10 prophets, despite the probability of this happening was always < 10% (and mostly < 5%). Other GP (in other cities) were spawned as well, but only if the great prophet probability was zero. I cannot remember whether the GP farm only spawned great prophets, actually I don't think so, but getting 10 in a row despite the low probability sounds too unlikely to happen by chance alone. However, I couldn't reproduce this behavior in a quick test, so, if this happens to be a bug, it must be buried somewhere.
 
I also got four great prophets in a row at about 25% odds. I thought I was just really unlucky with them.

I found a minor bug in AI trade evaluation. I was getting wheat from Korea in exchange for fish and sheep and Wang Kon contacted me to cancel the deal. When I asked him to renegotiate, he gave an extra 2 GPT to me! :crazyeye: Nothing game breaking, but obviously the AI shouldn't offer a worse deal than they already had.
 
Another bug: naval blockades are not cleared properly when the blockading civ is removed from the game. You can see in the screenshot that I'm still being blockaded by Incan ships even though their civ was destroyed on the previous turn and the ships don't exist anymore. You can see the bug in the attached save file - try capturing the last Incan city and see what happens to the blockading ships near Cuzco.
 

Attachments

@dreamyeyed et al.: Thanks for the bug reports. The last one (blockades) was easy to fix. The game needs to delete the Inca units before killing the Inca player. Because, unlike BtS, the mod doesn't keep dead civs at war, and at-war status is needed for lifting blockades. Hopefully, this fix won't break something else; on paper, it looks safe, and it works for your savegame. (For a momentary workaround, you could destroy the Inca ships before capturing the last Inca city.)

Canceled trade: This used to happen much more commonly in previous versions of the mod. I'm aware of one open issue that could be responsible:
[...] when offering to renegotiate a resource deal, the AI sometimes accepts the same deal as before if it has lost access to another resource in between turns.
But it could also easily be some inconsistency that I'm not aware of. To check, I'd need a savegame right before the AI cancels the deal.

Too many Prophets: This bugfix of mine
Bugfixes: [...]
Great Person birth modifiers from buildings (e.g. National Epic) had not affected birth probabilities. As a result, the birth probabilities displayed by AdvCiv were sometimes way off. [advc.001c] Discussion
is missing a division by 100, meaning that National Epic currently affects birth probabilities 100 times more than it should. I'll fix that, but I'm not sure if it can explain the increased incidence of Prophet births. Perhaps through a numeric overflow. :undecide:

Buddhism not getting founded: I can't make sense of this. There's also no "first to found Meditation" message in the replay. I suppose the first discoverer must've gotten the tech in some unusual way, but events are disabled, goody huts look correct, the Barbarians didn't discover Meditation ... If you had given someone Meditation through the WorldBuilder before the bug occurred, I'm sure you would've mentioned that. The cheat shortcut Shift+T would not cause a religion to be founded, but really can't be activated by accident as it requires Debug mode and opens a menu. I've added an assertion that should alert me if someone discovers Meditation or Polytheism without founding a religion, but I kind of doubt that it'll happen on AI Auto Play; hasn't happened so far.

@keldath: Thanks for letting me know. The second missing semicolon is due to me not bothering to compile release builds most of the time. Not sure about the first. The failed assertion is a known issue, probably quite harmless, and I probably won't fix it.

I'll add the bugfixes to the v0.97b branch and upload that version as soon as I can find the time. Hopefully it'll fix the Great Prophet issue.

I've been making some progress on reining in unbalanced starting positions. I've implemented the algorithm I had in mind and it looks promising; hopefully just needs some more tweaking and testing.

Another update: AI is willing to train and escort a settler with a special unit (national unit with no impassables) in order to reach a settlement site that other units cannot reach. This is pretty cool. When I saw it start building the special unit I knew it recognized and was able to solve the problem.
If the settler can reach a site and most other units can't, then I assume that those other units have an impassable type that the settler doesn't have. Which would mean that they can't join the settler's group – regardless of where the settler is headed. Maybe I'm missing something here; sounds like it's working well, i.e. not like settler are stuck all the time.
 
Last edited:
If the settler can reach a site and most other units can't, then I assume that those other units have an impassable type that the settler doesn't have. Which would mean that they can't join the settler's group – regardless of where the settler is headed. Maybe I'm missing something here; sounds like it's working well, i.e. not like settler are stuck all the time.

Yes, it’s working great! I was pointing out that the AI will even use a special unit to escort the settler. It doesn’t have to rely on traditional units. It will find a unit that can escort the settler.
 
Buddhism not getting founded: I can't make sense of this. There's also no "first to found Meditation" message in the replay. I suppose the first discoverer must've gotten the tech in some unusual way, but events are disabled, goody huts look correct, the Barbarians didn't discover Meditation ... If you had given someone Meditation through the WorldBuilder before the bug occurred, I'm sure you would've mentioned that. The cheat shortcut Shift+T would not cause a religion to be founded, but really can't be activated by accident as it requires Debug mode and opens a menu. I've added an assertion that should alert me if someone discovers Meditation or Polytheism without founding a religion, but I kind of doubt that it'll happen on AI Auto Play; hasn't happened so far.

I might have figured it out myself. One of the changes in Advanced Civ is that you can get any tech from a goody hut - this also includes techs that found a religion, such as Meditation or Polytheism. Due to another change it's not possible to fully research Meditation or Polytheism from a single hut (since both cost more than 75 beakers), but you can get progress towards the same tech from multiple huts.

So my assumption is that Montezuma had two goody huts near his start location and he got beakers for Meditation from both of them, causing him to research the tech before founding his capital. I can't confirm that this actually happened, but he did get a tech on his first turn according to the score graph and he's one of the three leaders who starts with Mysticism and Hunting (the latter gives him a starting scout, increasing his chance to reach a hut on the first turn).
 
Yes, that must be it. Montezuma founded his capital on turn 1, not on turn 0. Also explains why the first-discoverer message wasn't in the replay – discoveries on turn 0 aren't recorded. (Actually, it seems OK to record them; the free techs at game start are awarded in a way that suppresses all first-discovery behavior anyway.) If a hut would grant 80% or more progress on a tech, the whole tech is granted instead. So maybe a single hut can be enough; I haven't looked up all the modifiers.

I'll just change it so that players can't receive religion techs from a goody hut before founding their first city. Partial progress (from a single hut) will still be OK, so this change won't normally create an incentive to enter a hut before founding the capital or vice versa.
 
A few comments on 0.97:
- it has introduced a crash that infects some games. We play in MP on huge maps and it sometimes happens in lateish game (industrial onwards). Hard to reproduce. Funnily enough everyone crashes simultaneously when it happens
- Astronomy doesn't actually obsolete monuments any more. Wonder if other obsoleting wonders are working?
- this isn't a 0.97 issue as such, but why was unit gifting to allies disabled? Would like to gift an occasional obsolete town guard to an ally or a great person that an ally can use to golden age
 
A few comments on 0.97:
- it has introduced a crash that infects some games. We play in MP on huge maps and it sometimes happens in lateish game (industrial onwards). Hard to reproduce. Funnily enough everyone crashes simultaneously when it happens
During AI turns? Sooner or later I'll have to do some MP testing again and then I can try an Industrial-era start, but still seems like a long shot to run into that crash. If you play another MP game, perhaps you could enable some log files:
[...] The RandLog (CivilizationIV.ini; writes to MPLog.txt and therefore also requires MessageLog=1) tracks AI unit movement and some other parts of the code very closely. Python event logging can be enabled in AdvCiv\Assets\Python\CvEventManager.py (self.__LOG_ALL=1; writes to PythonDbg.log and therefore requires LoggingEnabled=1 in the .ini).
Though the Staging Room screen will then show a warning to the other players (as the logs could be used to cheat).
Astronomy doesn't actually obsolete monuments any more. Wonder if other obsoleting wonders are working?
Since culture rates don't go obsolete (XML tag: "ObsoleteSafeCommerceChanges"), the only effect of Astronomy should be that Monument can't be constructed anymore. That seemed to work in two quick tests (one with an old post-Astronomy save, one with WorldBuilder in a new game). Also, the help text for Monument in my city's building list showed "obsolete with Astronomy" in red – as it should.
this isn't a 0.97 issue as such, but why was unit gifting to allies disabled? Would like to gift an occasional obsolete town guard to an ally or a great person that an ally can use to golden age
Not intentional. I think it's because of an Open Borders check that I've added (for an experimental/ obsolete change that had allowed units to stay in the territory of a former enemy for a few turns after making peace – unit gifts shouldn't be allowed in that situation), and teammates don't have OB agreements. I'll fix that in v0.97b, which, hopefully, I'll be able to upload within the next few days. Thanks for the feedback.
 
There's definitely something off with great person generation. I just played a game and got nothing but prophets. The odds have to be astronomical.
 
There's definitely something off with great person generation. I just played a game and got nothing but prophets. The odds have to be astronomical.
Always in the National Epic city? Because, if it also happens elsewhere, then I'm pretty sure that I haven't fixed the bug yet. (Though it doesn't sound like it'll be all that difficult for me to reproduce.) Edit: Sorry, never mind. :blush: The bug I've fixed could've affected all cities.
 
Always in the National Epic city? Because, if it also happens elsewhere, then I'm pretty sure that I haven't fixed the bug yet. (Though it doesn't sound like it'll be all that difficult for me to reproduce.) Edit: Sorry, never mind. :blush: The bug I've fixed could've affected all cities.

No, other cities too.
 
Another issue is the AI valuation of half-researched techs. They're willing to give over any tech that I've half-researched for literally 5 gold. A tad exploitative when I can get, for example, the second half of Astronomy for 5 bucks.
 
@Lanstro: I can't readily reproduce that. Savegame? Looking at the code, it's difficult to believe that research progress is causing such a price drop. The starting point of the trade value computation is simply the research cost minus the progress of the recipient. The AI should ask for about half as much gold (edit: actually a bit more: 62.5%) as that difference. Other modifiers can reduce the price by up to 60%, which is a big discount, perhaps too much, but can't explain 5 gold for the half-finished Astronomy tech. Maybe some error in the logic for making trade offers. The lowest legitimate price should be offered by the AI when the recipient is both far less advanced and far less powerful militarily than the AI civ and when the tech is already known to most other civs.
 
Last edited:
Alright I'll make some saves next time I'm about to make such a trade. It seems to not be game-specific, I've been doing it in all my recent games.

It's frustrating the other way too because once the AI has part-researched a tech, it will also refuse to purchase the remaining part of it because it values it at basically 0.

Maybe it's MP only? That's what I'm primarily playing.
 
Back
Top Bottom