New Beta Version - November 8th

Status
Not open for further replies.
Oh, one other small change I haven't mentioned yet: as of this new hotfix, if you have a Defensive Pact with an AI, they will no longer find your military deployment near their borders threatening, or ask you to remove your troops.

Should make the whole, y'know, mutual defense thing a bit easier. :)
 
That's probably because I changed the code for third party war etc

I suspect that with this fix the AI may become too aggressive and it'll need to be toned down, but it should be much more fun than the AI sitting around having war/hostility set to 0 :)

I definitely agree. I have a question though. If I uncheck victory competition, does this reduce the amount of aggression from light warmongering or is this totally unrelated? Personally I play on big maps like YAEMP for a "RP" experience but it feels like I get pounced on by most civs if I destroy one civilization that borders me, even those that are in the other side of the world. An example is playing Russia right now and conquering the Huns. Carthage who was my friend backstabs me with a denounce then becomes Friendly again. With transparent diplo I see the "your behavior infuriates them" but I'm unsure if it's from the fighting or from the fact that I'm advancing from the fighting
 
I definitely agree. I have a question though. If I uncheck victory competition, does this reduce the amount of aggression from light warmongering or is this totally unrelated? Personally I play on big maps like YAEMP for a "RP" experience but it feels like I get pounced on by most civs if I destroy one civilization that borders me, even those that are in the other side of the world. An example is playing Russia right now and conquering the Huns. Carthage who was my friend backstabs me with a denounce then becomes Friendly again. With transparent diplo I see the "your behavior infuriates them" but I'm unsure if it's from the fighting or from the fact that I'm advancing from the fighting

"Your behavior infuriates them." = VICTORY_BLOCK_FIERCE, i.e. they're very upset at you for being too successful

Disabling victory competition will remove this, and it's savegame compatible if you want to adjust it midgame. :)

For the next version, the "FRIENDLY" approach shouldn't show up at all if either of you have denounced the other. I forgot to factor in the AI's approach curve change in my previous fix (so it'll work in this hotfix version, but will take some time to go down), but I thought of a better way entirely to handle it. Minor issue, though.

Dayum, now THIS is a change of pace. Montezuma just decced me on turn 51 (epic speed) on Immortal.

I'm glad you're enjoying it! :lol:

AIs with bonuses towards war have been trained to exploit this a lot more, as of the hotfix (and if you're playing on higher difficulties, even moreso, plus they won't wait as long between peace treaties).

Let me know how your game goes!
 
Just a short post.
Looking good so far. France and Greece have declared war on me multiple times already and some AI wars has occurred as well.

Playing on Marathon speed so I'm still early on in my game.
 
Early game diplomacy seems VERY dynamic now. I'm playing Japan, Planet Simulator (continents), Epic speed, Immortal, 8 players. I spawned in a desert with lots of floodplains, on a continent with Montezuma, Attila, and Napoleon. All 4 of us went Authority (which is good, in recent versions I saw lots of war civs going Tradition). First thing that really happened was Montezuma declaring on me really early, like Aztecs are supposed to, and attacked with some Jaguars and an archer. I only had a single city, a single archer, and a single warrior. I had built Stonehenge and, being Japan, chosen Goddess of Protection, so my troops could heal very quickly. I was able to defend and kill 2 or 3 units, actually netting me a war score of over 40. Interestingly, at this point Montezuma had made declarations of friendship with both the other civs on my continent, so I had some concerns about getting dogpiled. Not long after accepting Montezuma's peace offer, Attila declared on me, the war was very short and went similarly. Just a few terms after making peace me, Attila actually offered me a declaration of friendship. I love this guy. At this point (turn 106) Montezuma is friends with Napoleon (not with Attila anymore), I am friends with Attila, and Montezuma just declared war on me for the second time and is sending quite a scary army.
 
Is there any way to confirm that the "less maintenance" part of the Zulu UA is working? I've been trying to play Shaka lately, and I've been having a TON of gold issues over several games, which is not something I usually experience even when conquering an entire continent in the Ancient Era.
 
"Your behavior infuriates them." = VICTORY_BLOCK_FIERCE, i.e. they're very upset at you for being too successful

Disabling victory competition will remove this, and it's savegame compatible if you want to adjust it midgame. :)

For the next version, the "FRIENDLY" approach shouldn't show up at all if either of you have denounced the other. I forgot to factor in the AI's approach curve change in my previous fix (so it'll work in this hotfix version, but will take some time to go down), but I thought of a better way entirely to handle it. Minor issue, though.



I'm glad you're enjoying it! :lol:

AIs with bonuses towards war have been trained to exploit this a lot more, as of the hotfix (and if you're playing on higher difficulties, even moreso, plus they won't wait as long between peace treaties).

Let me know how your game goes!

Said it before but I appreciate you :D
 
Is there any way to confirm that the "less maintenance" part of the Zulu UA is working? I've been trying to play Shaka lately, and I've been having a TON of gold issues over several games, which is not something I usually experience even when conquering an entire continent in the Ancient Era.

There is an exponentiary component to the gold maintenance function which punishes players who build very large armies. It's probably that, but I'll take a look at the code for you.

Early game diplomacy seems VERY dynamic now. I'm playing Japan, Planet Simulator (continents), Epic speed, Immortal, 8 players. I spawned in a desert with lots of floodplains, on a continent with Montezuma, Attila, and Napoleon. All 4 of us went Authority (which is good, in recent versions I saw lots of war civs going Tradition). First thing that really happened was Montezuma declaring on me really early, like Aztecs are supposed to, and attacked with some Jaguars and an archer. I only had a single city, a single archer, and a single warrior. I had built Stonehenge and, being Japan, chosen Goddess of Protection, so my troops could heal very quickly. I was able to defend and kill 2 or 3 units, actually netting me a war score of over 40. Interestingly, at this point Montezuma had made declarations of friendship with both the other civs on my continent, so I had some concerns about getting dogpiled. Not long after accepting Montezuma's peace offer, Attila declared on me, the war was very short and went similarly. Just a few terms after making peace me, Attila actually offered me a declaration of friendship. I love this guy. At this point (turn 106) Montezuma is friends with Napoleon (not with Attila anymore), I am friends with Attila, and Montezuma just declared war on me for the second time and is sending quite a scary army.

This sounds fantastic. Hope you're having fun with the new changes! I made some tweaks to diplomacy in general, not just the early game, so you should see more aggression and competitiveness throughout the game. Eager to see what people have to say in terms of feedback on this update.

FYI, civs that go Authority are more likely to go to war now, as they should, and this includes civs that are normally peaceful, so watch out. :)

Same applies to Imperialism/Autocracy, and they get an extra bonus to war chances once they finish the policy trees.

Said it before but I appreciate you :D

Why thank you :)
 
There is an exponentiary component to the gold maintenance function which punishes players who build very large armies. It's probably that, but I'll take a look at the code for you.

Assuming you're correct (likely), maybe Shaka should get that relieved somewhat. I haven't seen a successful Zulu AI in quite awhile, and IIRC it seems like he's usually running negative.

Of course, that might change with your above changes, but who knows.

EDIT: Also, on mostly unrelated note:

I don't know what can be done about this or if anything should be, but the AI so far has been *completely* unable to handle me rushing their capital with three to four Archers and a Pathfinder. Playing on Emperor, it's proven to be a nearly 100% reliable way to take an extremely early capital with literally any civ; the only time it doesn't work for me is when terrain prevents me from using the Archers effectively.

Again, this might go differently with recent changes (they've seemed completely disinclined to attack my Archers with their Warriors), but if not, it might also be worth addressing.
 
Last edited:
Assuming you're correct (likely), maybe Shaka should get that relieved somewhat. I haven't seen a successful Zulu AI in quite awhile, and IIRC it seems like he's usually running negative.

Of course, that might change with your above changes, but who knows.

I made no changes to maintenance costs, but the AI now has a sanity check to avoid DoW'ing players when it'll bankrupt them, and will be going to war a lot more with this bug fixed and my recent changes, so perhaps you'll see more success from AIs pursuing Domination Victories. :)

Checked the code, seems to be working as intended. If you still think there's a bug, post on Github.
Code:
    // Discounts for units of certain UnitCombat classes
   for(int iI = 0; iI < GC.getNumUnitCombatClassInfos(); iI++)
   {
       const UnitCombatTypes eUnitCombatClass = static_cast<UnitCombatTypes>(iI);
       CvBaseInfo* pkUnitCombatClassInfo = GC.getUnitCombatClassInfo(eUnitCombatClass);
       if(pkUnitCombatClassInfo)
       {
           int iModifier = m_pPlayer->GetPlayerTraits()->GetMaintenanceModifierUnitCombat(eUnitCombatClass);
           if (iModifier != 0)
           {
               int iNumUnits = m_pPlayer->GetNumUnitsWithUnitCombat(eUnitCombatClass);
               int iCost = iNumUnits * m_pPlayer->getGoldPerUnitTimes100();
               int iModifiedCost = iNumUnits * m_pPlayer->getGoldPerUnitTimes100() * (100 + iModifier) / 100;
              
               // Reduce cost based on difference
               iBaseUnitCost += (iModifiedCost - iCost);
           }
       }
   }
 
I made no changes to maintenance costs, but the AI now has a sanity check to avoid DoW'ing players when it'll bankrupt them, and will be going to war a lot more with this bug fixed and my recent changes, so perhaps you'll see more success from AIs pursuing Domination Victories. :)

Checked the code, seems to be working as intended. If you still think there's a bug, post on Github.
Code:
    // Discounts for units of certain UnitCombat classes
   for(int iI = 0; iI < GC.getNumUnitCombatClassInfos(); iI++)
   {
       const UnitCombatTypes eUnitCombatClass = static_cast<UnitCombatTypes>(iI);
       CvBaseInfo* pkUnitCombatClassInfo = GC.getUnitCombatClassInfo(eUnitCombatClass);
       if(pkUnitCombatClassInfo)
       {
           int iModifier = m_pPlayer->GetPlayerTraits()->GetMaintenanceModifierUnitCombat(eUnitCombatClass);
           if (iModifier != 0)
           {
               int iNumUnits = m_pPlayer->GetNumUnitsWithUnitCombat(eUnitCombatClass);
               int iCost = iNumUnits * m_pPlayer->getGoldPerUnitTimes100();
               int iModifiedCost = iNumUnits * m_pPlayer->getGoldPerUnitTimes100() * (100 + iModifier) / 100;
            
               // Reduce cost based on difference
               iBaseUnitCost += (iModifiedCost - iCost);
           }
       }
   }

That's sort of why I was wondering if there's any in-game way for me to see if it's working; I have no idea if it's a bug or not. AFAIK I can check the maintenance cost, but I have no way to check if it's being discounted or not.
 
That's sort of why I was wondering if there's any in-game way for me to see if it's working; I have no idea if it's a bug or not. AFAIK I can check the maintenance cost, but I have no way to check if it's being discounted or not.

Hmm, I thought of a way to test it. Will do so later today.

EDIT: Also, on mostly unrelated note:

I don't know what can be done about this or if anything should be, but the AI so far has been *completely* unable to handle me rushing their capital with three to four Archers and a Pathfinder. Playing on Emperor, it's proven to be a nearly 100% reliable way to take an extremely early capital with literally any civ; the only time it doesn't work for me is when terrain prevents me from using the Archers effectively.

Again, this might go differently with recent changes (they've seemed completely disinclined to attack my Archers with their Warriors), but if not, it might also be worth addressing.

The hotfix also fixes a bug preventing the AI from attacking its targets.
 
Hoping 2 more don't take its place.

finally someone gets my joke.

Hmm, I thought of a way to test it. Will do so later today.



The hotfix also fixes a bug preventing the AI from attacking its targets.

solid sleuthing. I wonder when that bug slipped in.
 
finally someone gets my joke.



solid sleuthing. I wonder when that bug slipped in.

When you simplified much of the code in GetBestApproachTowardsMajorCiv some months back, you changed the "no target? Abort!" code from -10x WAR/HOSTILE bias to simply setting it to 0, that's when it became impactful, but the function itself was bugged since it returned a cached attack target (not sure when that occurred, probably a long time ago).

The bug became evident when I swapped the order of various functions around, so the zero-out ones occurred last, but it's been affecting the AI for months...so, hoping to see significantly more aggression in the future :D

Also, gotta give credit to @ilteroi for actually debugging it.
 
If I uncheck victory competition, does this reduce the amount of aggression from light warmongering or is this totally unrelated?

Ah, I misread this question. Warmongering penalties aren't affected by victory competition, but disabling victory competition will substantially reduce AI aggression.
 
@Recursive Quick update: Rome still got completely demolished by my Zulu Archer rush, but he definitely fought back much harder. I had to bring backup Archers for healing and had to use actual melee units to protect them instead of just waiting two tiles away with my Pathfinder. Being Zulu, three of my Archers got Logistics partway through; I think his Spearmen would have stopped me otherwise. Seems to be doing much better overall
 
Status
Not open for further replies.
Back
Top Bottom