New Beta Patch - 1/15

Status
Not open for further replies.
So what exactly is the algorithm of Great Prophet spawn location? My first prophet just spawned in my newest city, which doesn't have the highest faith production or highest accumulated faith. Now I have to spend 6 turns bringing them (are they supposed to be nameless?) back to my capital.

Meanwhile, AI wants each of my horse for 7GPT in late Ancient/early Classical.
 
Recursive, just a quick observation, I'm seeing a lot of bribed wars and, this is new, a lot of "backstabbing", which is probably intended?
 
So I hear DV is too easy...the easiest solution I see is to reduce vassal willingness to choose their master as host/world leader. Thoughts?

If reduced, would it be based on a RNG, or how they feel about you, their tax rate, for example? If going this way, gaming could be avoided by requiring a tax rate of 0% from the start of vassalization, for example. May main concern here is that there not be too many variables, and the situation clear prior to the vote... unless a "No" vote turns into an automatic declaration of independence.

Otherwise, a simple solution would be to allow only one vassal. That's not a bad idea, anyway, in terms of slowing runaways... particularly human ones.
 
So what exactly is the algorithm of Great Prophet spawn location? My first prophet just spawned in my newest city, which doesn't have the highest faith production or highest accumulated faith. Now I have to spend 6 turns bringing them (are they supposed to be nameless?) back to my capital.

I believe it processes each city in turn and whichever city contributes the last needed point gets the prophet, so I think you can manipulate things to get it where you want it.

I don't think there are any named Prophets.
 
Recursive, just a quick observation, I'm seeing a lot of bribed wars and, this is new, a lot of "backstabbing", which is probably intended?

Sounds good and I hope you're right since I hate when a warring civ stays passive due to a declaration of friendship - when I'm all vunerable having no troops. That's what I'd do too as a human; exploiting others weaknesess:)
 
Recursive, just a quick observation, I'm seeing a lot of bribed wars and, this is new, a lot of "backstabbing", which is probably intended?

Frequent backstabbing by many different AIs is not intended; some backstabbing by particularly aggressive/treacherous AIs is intended.

Note that if an AI has backstabbed once, a flag is set for them that makes them a) more likely to backstab again; b) more likely to ignore other players' backstabbing.

So serial backstabbing by a few players is intended; if everyone is doing it that's not intended.

Also, AIs consider geopolitics when determining whether to backstab, if a lot of people consider you "untrustworthy" you're more likely to be backstabbed for instance...

Bribed wars should only be happening against major competitors, and AIs have a limit to how many they can agree to at once, plus sanity checks on who they can DoW. Should be better than 12/1; let me know if it's too much, though.
 
Frequent backstabbing by many different AIs is not intended; some backstabbing by particularly aggressive/treacherous AIs is intended.

Note that if an AI has backstabbed once, a flag is set for them that makes them a) more likely to backstab again; b) more likely to ignore other players' backstabbing.

So serial backstabbing by a few players is intended; if everyone is doing it that's not intended.

Also, AIs consider geopolitics when determining whether to backstab, if a lot of people consider you "untrustworthy" you're more likely to be backstabbed for instance...

Bribed wars should only be happening against major competitors, and AIs have a limit to how many they can agree to at once, plus sanity checks on who they can DoW. Should be better than 12/1; let me know if it's too much, though.
The bribed wars feel so much better then they did in 12-1
 
If reduced, would it be based on a RNG, or how they feel about you, their tax rate, for example? If going this way, gaming could be avoided by requiring a tax rate of 0% from the start of vassalization, for example. May main concern here is that there not be too many variables, and the situation clear prior to the vote... unless a "No" vote turns into an automatic declaration of independence.

Otherwise, a simple solution would be to allow only one vassal. That's not a bad idea, anyway, in terms of slowing runaways... particularly human ones.

My thought is simply to make vassals ignore their status as vassals for certain votes: Change Host, World Leader, perhaps Decolonization and Sphere of Influence too; instead they would vote like any other civ would.

Resurrected players would be an exception to this, they will still love you as usual. But they don't typically have great leverage...and you usually have to go to war to resurrect them, so it comes at a price.
 
Last edited:
Recursive, just a quick observation, I'm seeing a lot of bribed wars and, this is new, a lot of "backstabbing", which is probably intended?

Sounds good and I hope you're right since I hate when a warring civ stays passive due to a declaration of friendship - when I'm all vunerable having no troops. That's what I'd do too as a human; exploiting others weaknesess:)

For the curious :)

A few notes:
- AI will check every player on their team's willingness to backstab, and if anyone would a) backstab and b) be unwilling to, they won't do it. Human players are automatically considered unwilling.
- bImpulse is true when they make an impulsive decision to attack, because you do something like pick the insulting option in dialogue or side with your protected City-State.
- bDirect is true when the AI would gain backstabbing penalties by attacking you; it is false when it's an indirect backstab via Defensive Pact.

Code:
/// Are we devious enough to declare war on our friend?
bool CvDiplomacyAI::IsWillingToAttackFriend(PlayerTypes ePlayer, bool bDirect, bool bImpulse)
{
   // If this is called for a human, always return no
   if (GetPlayer()->isHuman())
       return false;

   // No backstabbing if we're not competitive.
   if (!IsCompetingForVictory())
       return false;

   // Never backstab if they resurrected us or vice versa
   if (WasResurrectedBy(ePlayer))
       return false;

   if (GET_PLAYER(ePlayer).GetDiplomacyAI()->WasResurrectedBy(GetID()))
       return false;

   // Too scared of them?
   if (GetMajorCivApproach(ePlayer) == MAJOR_CIV_APPROACH_AFRAID)
       return false;

   // Like them too much?
   if (GetMajorCivOpinion(ePlayer) == MAJOR_CIV_OPINION_ALLY)
       return false;

   if (GetDoFType(ePlayer) == DOF_TYPE_BATTLE_BROTHERS)
       return false;

   bool bEndgameAggressive = IsEndgameAggressiveTo(ePlayer);
   bool bUntrustworthy = IsUntrustworthy(ePlayer);

   if (!bImpulse && !bEndgameAggressive && !bUntrustworthy)
   {
       // Liberating our cities?
       if (IsPlayerLiberatedCapital(ePlayer) && bDirect)
           return false;

       if (IsCityRecentlyLiberatedBy(ePlayer) && GetPlayer()->getCitiesLost() > 0)
           return false;

       // Don't declare war if we agreed to start a coop war with them, that's dumb.
       if (GetGlobalCoopWarWithState(ePlayer) >= COOP_WAR_STATE_PREPARING)
           return false;

       // Don't declare war if we promised not to attack!
       if (bDirect)
       {
           if (IsPlayerMoveTroopsRequestAccepted(ePlayer))
               return false;

           if (GET_PLAYER(ePlayer).GetDiplomacyAI()->IsPlayerMadeMilitaryPromise(GetID()))
               return false;
       }
   }

   // What kind of backstabbing is this?
   // Backstab timer?
   bool bBackstabTimer = (GET_PLAYER(ePlayer).GetDiplomacyAI()->IsDoFBroken(GetID()) && GET_PLAYER(ePlayer).GetDiplomacyAI()->GetTurnsSinceDoFBroken(GetID()) < /*10*/ GC.getDOF_BROKEN_BACKSTAB_TIMER());

   if (bBackstabTimer && bDirect)
   {
       // Only do this if there are no consequences
       for (int iPlayerLoop = 0; iPlayerLoop < MAX_MAJOR_CIVS; iPlayerLoop++)
       {
           PlayerTypes eLoopPlayer = (PlayerTypes) iPlayerLoop;

           if (IsPlayerValid(eLoopPlayer))
           {
               if (WouldBeUpsetIfAttackedFriend(eLoopPlayer, ePlayer) && !WasEverBackstabbedBy(eLoopPlayer) && !GET_PLAYER(eLoopPlayer).GetDiplomacyAI()->WasEverBackstabbedBy(GetID()) && !GET_PLAYER(eLoopPlayer).GetDiplomacyAI()->IsUntrustworthy(GetID()))
               {
                   if (IsFriendOrAlly(eLoopPlayer))
                   {
                       return false;
                   }
                   else if (IsStrategicTradePartner(eLoopPlayer))
                   {
                       return false;
                   }
                   else if (!IsEasyTarget(eLoopPlayer))
                   {
                       return false;
                   }
                   else if (!IsBackstabber() && GetMajorCivOpinion(eLoopPlayer) >= MAJOR_CIV_OPINION_FAVORABLE)
                   {
                       return false;
                   }
               }
           }
       }
   }
   // Declaration of Friendship or Defensive Pact?
   else if (IsDoFAccepted(ePlayer) || (IsHasDefensivePact(ePlayer) && !IsWantsToEndDefensivePactWithPlayer(ePlayer)))
   {
       // Don't directly backstab if approach is FRIENDLY (unless they provoked us)
       if (bDirect && !bImpulse && GetMajorCivApproach(ePlayer) == MAJOR_CIV_APPROACH_FRIENDLY)
           return false;

       // We must be stronger than them
       bool bEasyTarget = IsEasyTarget(ePlayer);

       if (bEasyTarget)
       {
           if (GetPlayerMilitaryStrengthComparedToUs(ePlayer) > STRENGTH_POWERFUL)
               return false;

           if (GetPlayerEconomicStrengthComparedToUs(ePlayer) > STRENGTH_POWERFUL)
               return false;
       }
       else
       {
           if (GetPlayerMilitaryStrengthComparedToUs(ePlayer) > STRENGTH_AVERAGE)
               return false;

           if (GetPlayerEconomicStrengthComparedToUs(ePlayer) > STRENGTH_AVERAGE)
               return false;
       }

       // Don't backstab if we're loyal
       if (!IsBackstabber() && !bEndgameAggressive && GetLoyalty() > 6)
           return false;

       // We need a good reason to even consider backstabbing a friend...
       bool bGoodReason = IsBackstabber(); // if we've already backstabbed one friend, more willing to backstab others
       bGoodReason |= bEndgameAggressive;
       bGoodReason |= bUntrustworthy;
       bGoodReason |= IsCloseToDominationVictory() && GET_PLAYER(ePlayer).GetCapitalConqueror() == NO_PLAYER;
       bGoodReason |= GET_PLAYER(ePlayer).GetDiplomacyAI()->GetWeDeclaredWarOnFriendCount() > 0; // they also backstabbed people
       bGoodReason |= GetBiggestCompetitor() == ePlayer;
       bGoodReason |= GetWarmongerThreat(ePlayer) >= THREAT_SEVERE;

       if (!bDirect)
       {
           bGoodReason |= IsGoingForWorldConquest() && GET_PLAYER(ePlayer).GetCapitalConqueror() == NO_PLAYER;
           bGoodReason |= IsMajorCompetitor(ePlayer);
       }

       if (!bGoodReason)
           return false;

       // Further checks are only necessary for Declarations of Friendship...breaking a DP doesn't earn a global backstabbing penalty
       if (IsDoFAccepted(ePlayer))
       {
           // Okay, so we have a good reason. Are there any consequences from doing this that we're unwilling to face?
           if (bDirect)
           {
               for (int iPlayerLoop = 0; iPlayerLoop < MAX_MAJOR_CIVS; iPlayerLoop++)
               {
                   PlayerTypes eLoopPlayer = (PlayerTypes) iPlayerLoop;

                   if (IsPlayerValid(eLoopPlayer))
                   {
                       if (WouldBeUpsetIfAttackedFriend(eLoopPlayer, ePlayer) && !WasEverBackstabbedBy(eLoopPlayer) && !GET_PLAYER(eLoopPlayer).GetDiplomacyAI()->WasEverBackstabbedBy(GetID()) && !GET_PLAYER(eLoopPlayer).GetDiplomacyAI()->IsUntrustworthy(GetID()))
                       {
                           if (IsFriendOrAlly(eLoopPlayer))
                           {
                               return false;
                           }
                           else if (IsStrategicTradePartner(eLoopPlayer))
                           {
                               return false;
                           }
                           else if (!(IsEasyTarget(eLoopPlayer) || GetPlayer()->GetMilitaryAI()->HavePreferredAttackTarget(eLoopPlayer)) && GetPlayer()->GetProximityToPlayer(eLoopPlayer) >= PLAYER_PROXIMITY_CLOSE)
                           {
                               return false;
                           }
                           else if (!IsBackstabber() && GetMajorCivOpinion(eLoopPlayer) >= MAJOR_CIV_OPINION_FRIEND)
                           {
                               return false;
                           }
                       }
                   }
               }
           }
           // Indirect backstab via Defensive Pact - much lower bar. Aim here is to prevent AIs from getting caught up in DP gridlock.
           else
           {
               // Ignore vassals!
               if (!GET_PLAYER(ePlayer).IsVassalOfSomeone())
               {
                   // Don't do it if we're very loyal
                   if (!IsBackstabber() && !bEndgameAggressive && GetLoyalty() > 8)
                       return false;

                   // Don't do it if we'd lose a valuable trade partner
                   if (IsStrategicTradePartner(ePlayer))
                       return false;

                   // Impulse wars against people we like are a bad idea.
                   if (bImpulse && GetMajorCivOpinion(ePlayer) >= MAJOR_CIV_OPINION_FRIEND)
                       return false;

                   // Impulse wars against neighbors that aren't easy targets are a bad idea.
                   if (bImpulse && GET_PLAYER(ePlayer).GetProximityToPlayer(GetID()) >= PLAYER_PROXIMITY_CLOSE && !IsEasyTarget(ePlayer))
                       return false;
               }
           }
       }
   }

   // If we've gone through all the hoops then we're okay with it.
   return true;
}

/// This will do for now...may write more sophisticated logic later
bool CvDiplomacyAI::WouldBeUpsetIfAttackedFriend(PlayerTypes ePlayer, PlayerTypes eBackstabPlayer) const
{
   if (GET_PLAYER(ePlayer).GetDiplomacyAI()->WasEverBackstabbedBy(eBackstabPlayer))
       return false;

   if (GET_PLAYER(eBackstabPlayer).GetDiplomacyAI()->WasEverBackstabbedBy(ePlayer))
       return false;

   return true;
}

/// Is this player a friend or ally in any way? Quick heuristic check that only checks for good things.
bool CvDiplomacyAI::IsFriendOrAlly(PlayerTypes ePlayer) const
{
   if (IsTeammate(ePlayer))
       return true;

   if (!GET_PLAYER(ePlayer).isAlive())
       return false;

   if (IsDoFAccepted(ePlayer))
       return true;

   if (IsHasDefensivePact(ePlayer))
       return true;

   if (GetMajorCivOpinion(ePlayer) == MAJOR_CIV_OPINION_ALLY)
       return true;

   if (GetDoFType(ePlayer) >= DOF_TYPE_ALLIES)
       return true;

   if (WasResurrectedBy(ePlayer))
       return true;

   if (GET_PLAYER(ePlayer).GetDiplomacyAI()->WasResurrectedBy(GetID()))
       return true;

   return false;
}
 
Last edited:
I've had a few occurences of the City Governor picking tiles that are straight up worse - e.g 3f1h over 4f1h. Using Default Focus.
In general though I do appreciate the governor appreciating... everything that is not food, a bit more!
 
I've had a few occurences of the City Governor picking tiles that are straight up worse - e.g 3f1h over 4f1h. Using Default Focus.
In general though I do appreciate the governor appreciating... everything that is not food, a bit more!

Post a bug report on Github, please.
 
My thought is simply to make vassals ignore their status as vassals for certain votes: Change Host, World Leader, perhaps Decolonization and Sphere of Influence too; instead they would vote like any other civ would.

Resurrected players would be an exception to this, they will still love you as usual. But they don't typically have great leverage...and you usually have to go to war to resurrect them, so it comes at a price.

This sounds about right. Vassals are already powerful they don't need to always vote for you too
 
Well I'd think that of any civ, a vassal should be the one you can rely on to vote for you. You could have it so that if a civ is actually going for a victory of some kind on their own, they'll be that much less likely to vote for you when it comes to the final DV vote. And is it possible to trade with a civ to secure those votes? Perhaps it should be disabled on that resolution alone. But really, DVs were always easy. Maybe it's more of a question of restraint on the player's side to choose a different kind of victory to go for. Just a thought.
 
Perhaps reduce a vassal's vote count by 50% or similar? I do think it makes more sense if they vote with their master, but obviously that's not terribly balanced right now.

A vassal civ theoretically has less political clout than an independent one, especially since everyone else knows whose voice they're really speaking with.
 
Well I'd think that of any civ, a vassal should be the one you can rely on to vote for you. You could have it so that if a civ is actually going for a victory of some kind on their own, they'll be that much less likely to vote for you when it comes to the final DV vote. And is it possible to trade with a civ to secure those votes?
Yeah, I like the idea for the most part, but like you've pointed out, the situations involving vassals aren't always black and white, so it might be unfair to just conclude that a master would never receive any votes in certain instances. What if an AI offered voluntarily to become a vassal?

In terms of global hegemony, I think any vassal should probably only vote for master if the victory is inevitable, otherwise they should try to prolong the game as long as possible by voting against and keeping any chance of their independence/freedom alive. Though, maybe the half-vote 50% thing is the way to go, I don't know...
 
Hm followed instructions but when I start a game (with no mods other than VP), my interface is all messed up. I load in and it's showing the Corporations and Monopolies window... top bar is a mess. I'm using EUI and I installed the version with EUI (hotfix). I imagine someone has gotten this before. Any idea?

Works fine before I did the overwrite.
 
Okay so I made some nerfs.
Code:
- Iron Fist no longer affects voluntary vassals; they still can't be liberated, but they can rebel if they want to
- Vassals now have special logic for the "Global Liberation" resolution
- Vassals can now sell world leader votes, like other civs
- Vassals no longer automatically support their masters for host/world leader
- Vassals no longer automatically support their masters when they propose the following resolutions:
  Sanctions
  Decolonization
  Sphere of Influence
  Open Door
  World Religion
  World Ideology
  Global Liberation
  Spaceship Limitation Whatchamacallit
  Passport System
- AI changes don't apply to resurrected vassals
- Good treatment makes a vassal more likely to support the master
 
What about taking account of a military presence in the vassals lands. In real life one way a country kept control of its vassals was by ensuring a large army was in the region to keep them in line. Could you have a system in place that the more military presence a country has in their vassals lands the stronger the bond, & less so the weaker it is. Not sure how something like that could be added or not as not a programmer. If you could a player would have to be careful taking his army across the world without a military in check in vassals lands who could rebel.
 
What about taking account of a military presence in the vassals lands. In real life one way a country kept control of its vassals was by ensuring a large army was in the region to keep them in line. Could you have a system in place that the more military presence a country has in their vassals lands the stronger the bond, & less so the weaker it is. Not sure how something like that could be added or not as not a programmer. If you could a player would have to be careful taking his army across the world without a military in check in vassals lands who could rebel.

If that's the case, perhaps allow troops to stay within the borders of vassals upon declaration of war? If I'm fighting a rebellion, it makes no sense for my troops to get kicked out. Apologies if this has already been implemented.
 
AI's alot smarter about lost cause wars when you're turtling them to ****. Assyria lost 1 pikeman and 2 siege weapons to me and immediately settled for peace. Probably gonna see him again when artillery hits though.

Edit:
Wasnt able to make a fort here at a choke i wanted was wondering if this was intended for balancing or? (the fort on the side of the bannanas is where i ended up putting it but i wasnt able to put it directly ontop of them.)
cleared out the marsh under it and everything.
 

Attachments

  • Untitled.png
    Untitled.png
    1.4 MB · Views: 109
Last edited:
Status
Not open for further replies.
Back
Top Bottom