• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

Advanced Civ

Hi, great work. Is there a plan to merge AdvCiv with BAT (like MMod/KatMod for K-mod)?
 
@marlong: Thank you. No plans for that. I wouldn't want to have to keep two versions of the mod up to date. Having little experience with modified artwork, the merge isn't trivial for me to do either. I've made a tentative list of the files involved in this post.

There are a few UI conveniences in BULL/BAT that I would like to (and feel competent to) adopt. Not high on my list though. MMod and KatMod don't have those either.
 
hey hey ,

got your a menu bug :)

when i did not set the screen to bts classic - game didnt load,
some debugg:

edit:
humm, at some point i removed the 3 old main menu's from the menu xml file...
i guess that wasnt smart :)


anyway, started another MP game -> so far:

bismark - offered iron for meditation to me....yey?
ai settle in a strange place...take into account amount of free tiles vs best found value...
double pop up for city build
during revolution - if click on research, after rev is done - you can study another thing, an see in
the tech tree advance of 2 techs -> seems a visual glitch.
 

Attachments

  • menubug.jpeg
    menubug.jpeg
    32.2 KB · Views: 82
  • anothersettle....jpeg
    anothersettle....jpeg
    29.4 KB · Views: 91
  • wierdsettleoffrench.jpeg
    wierdsettleoffrench.jpeg
    167.4 KB · Views: 76
  • ironfromaifor medidation.CivBeyondSwordSave
    ironfromaifor medidation.CivBeyondSwordSave
    79.8 KB · Views: 83
  • AutoSave_BC-0900.CivBeyondSwordSave
    AutoSave_BC-0900.CivBeyondSwordSave
    97.3 KB · Views: 72
Last edited:
hey hey oh silent one,

got the oos,
here are the logs,
all i could leant is some soren random issue?

attached 2 logs, mine and my friend.

i can tell that i clicked on diplomacy with an ai Alexander,
and clicked peace treat or something (i was at war with), there was an oos.
 

Attachments

Last edited:
IGNORE - i forgot to add a game option i added in the dll..]

another update,
i still get a crash after switching to another mod with other settings.
crash is on custom game start.
i need to delete cache...

here are the files.
 

Attachments

Last edited:
@keldath: Sorry that this took so long ...
i saw you push a menu fix.
though its not really a bug but more of a modality adjustment for modders i guess.
As far as I can tell, AdvCiv (i.e. the current release candidate) will crash at launch when the main menu index in the user profile is 4 or greater. This could occur, in theory, if another mod adds a custom menu background, doesn't remove the original backgrounds, the player selects the bottommost background from the options menu, exits and then tries to launch AdvCiv.
humm, at some point i removed the 3 old main menu's from the menu xml file...
i guess that wasnt smart :)
This way, any menu index greater than 0 will crash; so that makes matters worse, but I do think it's also a problem in AdvCiv. And it's not a problem in BtS or in other mods, but something that I've broken. Will be fixed in the proper v0.98 release and, as you've noticed, is already fixed in the Git repo. With the bugfix, it should be fine to remove the original menu backgrounds in DotO.
bismark - offered iron for meditation to me....yey?
I guess in the save that you've attached, the trade has already been made(?). If you had already put research into Iron Working, then that could explain it. The AI also gives tech away cheaper when the receiving side is less advanced and less powerful (militarily). That could be another explanation, seeing that you've lost one of your two cities to the Barbarians in the savegame.
ai settle in a strange place...take into account amount of free tiles vs best found value...
Rheims: The main incentive is apparently to gain access to Iron. France has neither Copper nor Iron at that point. Louis has the Creative trait, so flipping the Iron tile seems like a reasonable expectation (but it would be hopeless if he had settled farther away from your border). I'm attaching a Debug mode screenshot of Hastings. I guess Elizabeth also lacked Iron (and Stone). I don't think these sites are really objectionable, but it does seem that the AI overvalues strategic resources that unlock numerous units or buildings, i.e. especially Iron and Stone. E.g. for Iron (assuming that no Copper is available), the (BtS/K-Mod) AI looks at each unlocked unit individually without taking into account that e.g. Axeman and Swordsman (or Maceman/ Pikeman/ Crossbowman) are, to an extent, redundant. I'll add a correction factor in v0.99 to smooth that over. And I've noticed a more serious problem that'll be fixed on v0.98 (already fixed on GitHub): It seems that, in multiplayer, the (AdvCiv) AI evaluates resources once at game start and never updates the values throughout the game.
double pop up for city build
during revolution - if click on research, after rev is done - you can study another thing, an see in
the tech tree advance of 2 techs -> seems a visual glitch.
Is there a way I can reproduce either of these? Generally, the cancellation and relaunch of outdated popups should be disabled in multiplayer, i.e. should work as in BtS; meaning that, when playing with "Minimize Popups", popups will sometimes show outdated info and redundant popups will sometimes appear, briefly, and then self-destruct.
i reproduced the OOS,
i posted on the sub forum with logs save and screen shot.
hope you can assist there.
OK, I'll reply there.
another update,
i still get a crash after switching to another mod with other settings.
crash is on custom game start.
i need to delete cache...
If I copy your cache and profile into my AppData\Local... folder, DotO 1.06 (installed into Mods\Doto) still loads without any problems. Can you still reproduce the error (using the files you've attached?). If so, is it the profile that causes the error or really the cache, and, if it's the cache, can we verify that the catalog with the DotO assets is responsible?
 

Attachments

  • Hastings.jpg
    Hastings.jpg
    253.3 KB · Views: 116
so,
-opening screen bckrnd, well im handling it, im switching defaults by loading another mod , ill re add the missings.
all good.
the caches is also i think has to do with the background.maybe.

cities for resource, well, i think you pointed it out once.
it does make since. also i reduced ai value to 500 from 600, maybe that pushed it more in my game.

I'll add a correction factor in v0.99 to smooth that over
i already merged in aall from the master.
i have not yet used your 099, unless some critical stuff, ill do so in the future.
hope you can keep adding the criticals for master of 098.

cheers buddy,
thanks for replying back :)
 
I'm about to add v0.98 to the download database. Just to make sure that no one reads the release notes there after having already read or skimmed through the tentative release notes in this thread -- the changes since this post (from 13 Oct) are as follows:
Spoiler :
• Early-game Barbarian activity further increased (but not when playing with Raging Barbarians). [change id advc.300]
• Made it more difficult to flip Barbarian cities through culture: [advc.101]
- Barbarian units count as culture garrisons. (Curiously, they don't in BtS.)
- Barbarian cities can't revolt in the first 8 turns after having been founded or conquered. This grace period gets adjusted to the game speed setting.
- Revolts in Barbarian cities no longer outright kill the garrison. (This rule had made sense in BtS because Barbarian cities always flipped on the first revolt, but AdvCiv requires one extra revolt to flip any city.)​
• Fixed a bug that seems to have allowed cities to culture-flip regardless of foreign culture range. Cities outside of that range are only supposed to revolt, not flip. Looks like I had implemented this incorrectly from the beginning. [advc.099c]
• Bugfix (bug introduced in v0.96 or 0.95 I think): AI resource trade values had not been updated properly in multiplayer games. [advc.036]
(The four bugs described below had probably been introduced in v0.97.)
• Auto-saving at the start of the active player's turn lead to some issues in HotSeat and in networked multiplayer with simultaneous turns. Now happens at the start of the game turn (as in BtS) when playing in those multiplayer modes. [advc.044]
• Proposing Open Borders and Defensive Pact resolutions had been possible even when all pairs of full members had already made such agreements.
• When starting a new game after having returned to the main menu from a game where civs had signed vassal agreements, some civs in the new game had been able to contact each other from the beginning.
• Possible crash at launch after having played a mod with a custom menu background. Bug report 1 2

For the next version, I've already implemented (and tested) some performance improvements that, based on my tests, seem to solve the scalability issues that still exist in v0.98 when going well beyond 18 civs. I hope I'll be able to add some BUG options too; and some proposed balance tweaks are still up in the air.
 
its amazing how short is the list and the amount of work you put into it.

like all developers,
under the hood, heaven and earth changes,
above the hood, just a paint job :)

i feel a new MP test run coming soon :)
kodus my friend.
 
Not at all inspired by an ongoing AAR thread, what do you think about establishing a peace treaty after bribing someone into a war, shared or not? It seems like a somewhat cheesy move to draw the AI away to another enemy and then backstab them immediately. You have added (even unilateral) peace treaty to deals like that already, if I recall correctly.
 
Not at all inspired by an ongoing AAR thread, what do you think about establishing a peace treaty after bribing someone into a war, shared or not? It seems like a somewhat cheesy move to draw the AI away to another enemy and then backstab them immediately.
I agree, and that's how it currently works. Shared or not, if it's a war trade, then a 10-turn peace treaty is implied.
You have added (even unilateral) peace treaty to deals like that already, if I recall correctly.
War trades and city trades come with a peace treaty. Unilateral peace treaties exist in Kek-Mod (Git commit), for gifts and tribute. If I had realized earlier that this is easy to implement, then I might have gone down that road too; or maybe I still might ... I've tweaked the AI response to "begging for peace," but I'm still not sure if that stratagem is interesting enough to make up for how counterintuitive it is. For war and city trades, a bilateral peace treaty seems more appropriate than a unilateral one.

Another half-open issue is the UI support. I've tried displaying those "implied" peace treaties on the trade table but somehow couldn't bring the EXE to display them. Perhaps the EXE checks at-war status before displaying peace treaties. If that's the problem, then a dummy trade item with display string "Peace Treaty" should work. (When the AI asks for a gift or tribute, i.e. in an AI-initiated offer, peace treaties can be displayed without problems.)
 
hey,

during my ranged attack code testing,
i observed something about the AI that was off to my taste:

situation -
my city - some defenses.
near my city = large and strong stack
another adjacent plot - ai stack (some catapults and swordsman) , much weaker then my adjacent strong stack, but ai stack stonger than city stack.

result,
my code made the catapults stio the attack -due to nearby danger.
but,
AI_patrol() -> made the other ai units to issue move_into mission
getGroup()->pushMission(MISSION_MOVE_TO, pBestPlot->getX(), pBestPlot->getY(),
NO_MOVEMENT_FLAGS, false, false, MISSIONAI_PATROL);
and attack the city (and win - all tests showed ai can take the city).

edit:
also spotted the same behavior in CvUnitAI::AI_stackAttackCity.

what do you think?
ai should carry out attack if there is a nearby threat? (using thresholds of some checks like localstrength and comparestacks)
yes, the success of the city conquering, maybe beneficial, but, if theres an impending threat near? that can kill off the enemy just a turn after?
still worth it?
 
Last edited:
I agree, and that's how it currently works. Shared or not, if it's a war trade, then a 10-turn peace treaty is implied.War trades and city trades come with a peace treaty. Unilateral peace treaties exist in Kek-Mod (Git commit), for gifts and tribute. If I had realized earlier that this is easy to implement, then I might have gone down that road too; or maybe I still might ... I've tweaked the AI response to "begging for peace," but I'm still not sure if that stratagem is interesting enough to make up for how counterintuitive it is. For war and city trades, a bilateral peace treaty seems more appropriate than a unilateral one.
Oh, is it already? I must have misread the AAR.
 
what do you think?
ai should carry out attack if there is a nearby threat? (using thresholds of some checks like localstrength and comparestacks)
I don't think there's any self-preserving behavior implemented for AI attack stacks and city attack stacks – other than refraining from attacks against stacks that are clearly stronger. In the example you describe, I think it's good to err on the side of aggression. That way, at least the city defenders are destroyed and the city gets damaged. Given the overall tactical abilities of the AI, inflicting any serious damage on a human player is already a success. (That is, if we imagine the city owner to be human.) Especially when the human player has this large stack ready – is the AI really going to be able to merge its city attack stack into a stack that will beat the human stack? Or will the city attack stack eventually get destroyed in defense of an AI city (for which the stack may not be well suited)? Will it even succeed in getting away (no road movement in enemy territory)? As a general consideration (also relevant for AI evacuation of untenable cities): It's a good thing when units kill each other off. If they just circled each other until one side is clearly outnumbered and withdraws, then the map would get overcrowded with units (the civs keep producing them) and wars of conquest wouldn't have much of a cost for the victor.

That being said, in other situations, the inability of the AI to anticipate counterattacks is imo one of its biggest tactical shortcomings. For example, there is the human tactic of letting the AI conquer a small border city and immediately striking back with collateral damage and City Raider promotions:
Our stack at the time was about 8 rifles and 10 trebuchets/catapults, and we are forced to abandon Hadrumetum.

Of course, our veterans were mostly double promoted city raider maces, and now get to apply that bonus on the forces now sitting in Hadrumetum. Over the next two turns, we kill about 15 of his units with the loss of only about 3 rifles and 4 trebuchets.
This is arguably more a game balance issue than an AI issue. City Raider shouldn't make occupying a city this punishing, and, more importantly, initiative shouldn't be so decisive for Siege units (or any units). However, even if one were to, say, change City Raider I to "ignores Fortify defense" and nerf collateral damage (i.e. overhaul the combat system, pretty much), it would still be nice to have an AI that at least makes an effort not to expose its stacks to ambushes.

Basically, before moving into any tile, the AI should tally up possible enemy and friendly attacks against that tile. The friendly attacks would account for possible counterattacks by nearby friendly stacks after the enemy attacks; like threat and defense in chess. As you wrote, there are the AI_local...Strength functions for such calculations in K-Mod. The last time I thought about this, I assumed that doing these calculations in the pathfinding code would be prohibitively slow. ... It seems that city attack stacks already make similar checks; once a stack moves toward a city, it uses the following pathfinder flags:
MOVE_AVOID_ENEMY_WEIGHT_2 | MOVE_ATTACK_STACK | MOVE_DECLARE_WAR
AVOID_ENEMY merely avoids tiles owned by an enemy, but ATTACK_STACK uses AI_localDefenceStrength (call location in the source code) to avoid attacks against strong enemy stacks along the way. That's still a lot cheaper though than checking for attacks that enemy units could make against the moving stack; a whole range of tiles would have to be checked for enemies. Maybe it's not really necessary to check the whole path for ambushes; it could be enough to check the tile on which the unit will end the current turn if it starts moving along the path (i.e. the tile returned by the getPathEndTurnPlot functions). That could lead to back and forth moves by the AI though: move toward a tile threatened by an enemy stack and turn back when getting close; repeat. This problem could perhaps be solved by remembering enemy threat values and checking those remembered values for the whole path. AI civs in K-Mod already have a "strength memory" (recently refactored by me into a separate class "AIStrengthMemoryMap"), but that's a cache of AI strength in a tile, not against a tile. Similar concept though. So maybe a new pathfinder flag for basic ambush avoidance is feasible in terms of computing time and implementation effort, but it doesn't seem easy.
 
Yep can confirm that getting the Zulus into that war created a 10 turn peace. Also agree it'd a helpful reminder of that rule if it popped up on the trade screen.
 
Yep can confirm that getting the Zulus into that war created a 10 turn peace. Also agree it'd a helpful reminder of that rule if it popped up on the trade screen.
I've figured out how to do it. I had just forgotten to set a flag "bOffer" that the EXE was obviously going to check before displaying the peace treaty. Works nicely too – the player can try to take the peace treaty off the table, but the DLL gets a chance to put it right back so that, visually, the peace treaty never leaves the table (unless the war trade is taken away). Not included in v0.98b though. Will need to test it a bit more to make sure that peace treaties show up under exactly the right circumstances.
its amazing how short is the list and the amount of work you put into it.
Testing and bugfixing. :twitch: Already a lot of stuff deferred for v0.99, but, yep, also mostly under the hood.
hope you can keep adding the criticals for master of 098.
Yes, I'm keeping the v0.98x changes on the master branch.
the caches is also i think has to do with the background.maybe.
Well, if you hadn't adopted the respective bugfix at the time, then it was probably still because of the backgrounds. Otherwise ... something may still be amiss in the mod, or the EXE indeed can't always tell when the cache outdated. Since the AdvCiv/DotO DLL disables the XML cache, the problem would then have to be the "file" cache. Would be nice to narrow that down more. The catalog file with the DotO assets in the archive you've attached is difficult to compare with the file that gets generated on my end. The paths aren't in the same order. Would only make sense to look into that if it's confirmed that one file makes some version of the mod crash at launch and another doesn't.
 
Back
Top Bottom