1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Quick Questions / Quick Answers

Discussion in 'Community Patch Project' started by Theral, Aug 23, 2016.

  1. tothePAIN

    tothePAIN King

    Joined:
    Dec 31, 2018
    Messages:
    654
    Gender:
    Male
    If there's a garrison, the likelihood of the barbarian raiding is lower. The city usually doesnt get raided with a garrison (but will by a barbarian ship).

    - anecdotal experience
     
  2. ElliotS

    ElliotS Warmonger

    Joined:
    Jun 13, 2013
    Messages:
    2,868
    Gender:
    Male
    Location:
    Tampa, Florida
    This fixed it, thanks a ton!
     
  3. Drakle

    Drakle King

    Joined:
    Jun 28, 2014
    Messages:
    681
    Hey, what is the AI thought process when it comes to being a founder, and being religiously overtaken by the player? I'm playing Austria, and I've been pummeling the Ottomans first with a great Prophet, and then missionaries. I have converted all but about 2 of his cities, including the capital, yet he hates me and is actively trying to convert back. Will this stop if I get all his cities?

    Also if he gets a Great Prophet, will it be his religion or mine, if his capital is my religion?
     
  4. CrazyG

    CrazyG Deity

    Joined:
    Oct 14, 2016
    Messages:
    5,386
    Location:
    Beijing
    If he has the holy city for his religion, it will be in his religion.
     
  5. azum4roll

    azum4roll Emperor

    Joined:
    Jul 17, 2018
    Messages:
    1,316
    Gender:
    Male
    If you can hold his religion down until Industrial, he can never switch it back again since prophets won't spawn anymore.
     
  6. Recursive

    Recursive Covets Lands That You Currently Own Moderator

    Joined:
    Dec 19, 2017
    Messages:
    2,214
    Gender:
    Male
    I wrote all of the code for this myself not that long ago. :)

    Normal calculation (a similar calculation is used when calculating approach):
    Code:
    int CvDiplomacyAI::GetReligionScore(PlayerTypes ePlayer)
    {
       int iOpinionWeight = 0;
       if (GC.getGame().isOption(GAMEOPTION_NO_RELIGION)) return 0;
       if (IsVassal(ePlayer)) return 0; // Don't double dip
    
       ReligionTypes eOurStateReligion = GetPlayer()->GetReligions()->GetCurrentReligion(false);
       ReligionTypes eOurMajorityReligion = GetPlayer()->GetReligions()->GetReligionInMostCities();
       ReligionTypes eTheirStateReligion = GET_PLAYER(ePlayer).GetReligions()->GetCurrentReligion(false);
       ReligionTypes eTheirMajorityReligion = GET_PLAYER(ePlayer).GetReligions()->GetReligionInMostCities();
    
       int iFlavorReligion = m_pPlayer->GetFlavorManager()->GetPersonalityFlavorForDiplomacy((FlavorTypes)GC.getInfoTypeForString("FLAVOR_RELIGION"));
       int iEraMod = GC.getEraInfo(GC.getGame().getCurrentEra())->getDiploEmphasisReligion();
    
       // Weight increases or decreases based on flavors
       if (iFlavorReligion < 5)
       {
           iEraMod = max(0, iEraMod - 1);
       }
       else if (iFlavorReligion > 7)
       {
           iEraMod++;
       }
    
    #if defined(MOD_BALANCE_CORE)
       iEraMod += (MOD_BALANCE_CORE && GetPlayer()->GetPlayerTraits()->IsReligious()) ? 1 : 0;
    #endif
    
       // We didn't found or conquer, but have a majority religion
       if (eOurStateReligion == NO_RELIGION && eOurMajorityReligion != NO_RELIGION)
       {
           if (GetNegativeReligiousConversionPoints(ePlayer) <= 0 && !IsHolyCityCapturedBy(ePlayer))
           {
               if (eOurMajorityReligion == eTheirStateReligion)
               {
                   // They must have at least one of their own cities following their state religion to get a bonus
                   if (GC.getGame().GetGameReligions()->GetNumDomesticCitiesFollowing(eTheirStateReligion, ePlayer) > 0)
                   {
                       iOpinionWeight += /*-4*/ GC.getOPINION_WEIGHT_ADOPTING_HIS_RELIGION() * iEraMod;
    
                       // If it's the World Religion and they're its controller, support them since we get extra League votes from it
                       if (GC.getGame().GetGameLeagues()->GetReligionSpreadStrengthModifier(ePlayer, eTheirStateReligion) > 0)
                       {
                           iOpinionWeight *= /*150*/ GC.getOPINION_WEIGHT_WORLD_RELIGION_MODIFIER();
                           iOpinionWeight /= 100;
                       }
                   }
               }
               // Same majority religions?
               else if (eOurMajorityReligion == eTheirMajorityReligion)
               {
                   iOpinionWeight += /*-2*/ GC.getOPINION_WEIGHT_SAME_MAJORITY_RELIGIONS() * iEraMod;
               }
           }
           // Different majority religions?
           if (eOurMajorityReligion != eTheirStateReligion && eOurMajorityReligion != eTheirMajorityReligion && eTheirMajorityReligion != NO_RELIGION)
           {
               iOpinionWeight += /*2*/ GC.getOPINION_WEIGHT_DIFFERENT_MAJORITY_RELIGIONS() * iEraMod;
           }
       }
       // We founded or conquered
       else if (eOurStateReligion != NO_RELIGION)
       {
           // Do they also have a state religion? We don't like that!
           if (eTheirStateReligion != NO_RELIGION && GC.getGame().GetGameReligions()->GetNumDomesticCitiesFollowing(eTheirStateReligion, ePlayer) > 0)
           {
               iOpinionWeight += /*5*/ GC.getOPINION_WEIGHT_DIFFERENT_STATE_RELIGIONS() * iEraMod;
    
               // If it's the World Religion and they control its Holy City, we should work against them
               if (GC.getGame().GetGameLeagues()->GetReligionSpreadStrengthModifier(ePlayer, eTheirStateReligion) > 0)
               {
                   iOpinionWeight *= /*150*/ GC.getOPINION_WEIGHT_WORLD_RELIGION_MODIFIER();
                   iOpinionWeight /= 100;
               }
           }
           // No? Well, do they have a majority religion?
           else if (eTheirMajorityReligion != NO_RELIGION)
           {
               // Ours?
               if (eTheirMajorityReligion == eOurStateReligion)
               {
                   iOpinionWeight += /*-8*/ GC.getOPINION_WEIGHT_ADOPTING_MY_RELIGION() * iEraMod;
    
                   // If it's the World Religion and we control its Holy City, we should work together
                   if (GC.getGame().GetGameLeagues()->GetReligionSpreadStrengthModifier(GetPlayer()->GetID(), eOurStateReligion) > 0)
                   {
                       iOpinionWeight *= /*150*/ GC.getOPINION_WEIGHT_WORLD_RELIGION_MODIFIER();
                       iOpinionWeight /= 100;
                   }
               }
               // Someone else's?
               else
               {
                   const CvReligion* pReligion = GC.getGame().GetGameReligions()->GetReligion(eTheirMajorityReligion, NO_PLAYER);
    
                   // If the religion's founder is our teammate, don't apply a penalty if that teammate is still alive.
                   if (IsTeammate((PlayerTypes)pReligion->m_eFounder) && GET_PLAYER((PlayerTypes)pReligion->m_eFounder).getNumCities() > 0)
                       return 0;
    
                   // If the religion's founder is THEIR teammate, treat it like a state religion.
                   if (GET_PLAYER(ePlayer).GetDiplomacyAI()->IsTeammate((PlayerTypes)pReligion->m_eFounder) && GET_PLAYER((PlayerTypes)pReligion->m_eFounder).getNumCities() > 0)
                   {
                       iOpinionWeight += /*5*/ GC.getOPINION_WEIGHT_DIFFERENT_STATE_RELIGIONS() * iEraMod;
    
                       // If it's the World Religion and their teammate controls its Holy City, we should work against them
                       if (GC.getGame().GetGameLeagues()->GetReligionSpreadStrengthModifier((PlayerTypes)pReligion->m_eFounder, eTheirMajorityReligion) > 0)
                       {
                           iOpinionWeight *= /*150*/ GC.getOPINION_WEIGHT_WORLD_RELIGION_MODIFIER();
                           iOpinionWeight /= 100;
                       }
                   }
                   // Otherwise, apply a penalty for different majority religions.
                   else
                   {
                       iOpinionWeight += /*2*/ GC.getOPINION_WEIGHT_DIFFERENT_MAJORITY_RELIGIONS() * iEraMod;
                   }
               }
           }
       }
    
       if (iOpinionWeight > 0 && IsIgnoreReligionDifferences(ePlayer))
           return 0;
    
       return iOpinionWeight;
    }
    
    Vassal calculation:
    Code:
    int CvDiplomacyAI::GetVassalReligionScore(PlayerTypes ePlayer) const
    {
       if (GC.getGame().isOption(GAMEOPTION_NO_RELIGION)) return 0;
       if (!IsVassal(ePlayer)) return 0;
    
       int iOpinionWeight = 0;
    
       ReligionTypes eVassalStateReligion = GetPlayer()->GetReligions()->GetCurrentReligion(false);
       ReligionTypes eVassalMajorityReligion = GetPlayer()->GetReligions()->GetReligionInMostCities();
       ReligionTypes eMasterStateReligion = GET_PLAYER(ePlayer).GetReligions()->GetCurrentReligion(false);
       ReligionTypes eMasterMajorityReligion = GET_PLAYER(ePlayer).GetReligions()->GetReligionInMostCities();
    
       // No vassal religion - don't care
       if (eVassalStateReligion == NO_RELIGION && eVassalMajorityReligion == NO_RELIGION)
           return 0;
    
       // Vassal did not found or conquer
       if (eVassalStateReligion == NO_RELIGION)
       {
           // Master founded, and we have their religion
           if (eMasterStateReligion != NO_RELIGION && eMasterStateReligion == eVassalMajorityReligion && GC.getGame().GetGameReligions()->GetNumDomesticCitiesFollowing(eMasterStateReligion, ePlayer) > 0)
           {
               iOpinionWeight += -20;
           }
           // Same majority religions
           else if (eMasterMajorityReligion != NO_RELIGION && eMasterMajorityReligion == eVassalMajorityReligion)
           {
               iOpinionWeight += -10;
           }
       }
       // Vassal did found or conquer
       else
       {
           // Master also founded or conquered
           if (eMasterStateReligion != NO_RELIGION && GC.getGame().GetGameReligions()->GetNumDomesticCitiesFollowing(eMasterStateReligion, ePlayer) > 0)
           {
               // ... and it's our majority religion
               if (eMasterStateReligion == eVassalMajorityReligion)
               {
                   iOpinionWeight += 25;
               }
               // ... and they've converted some of our cities
               else if (GC.getGame().GetGameReligions()->GetNumDomesticCitiesFollowing(eMasterStateReligion, GetPlayer()->GetID()) > 0)
               {
                   iOpinionWeight += 10;
               }
           }
           // Master did not found or conquer, but does have a majority religion - ours
           else if (eMasterMajorityReligion != NO_RELIGION && eMasterMajorityReligion == eVassalStateReligion)
           {
               iOpinionWeight += -40;
           }
       }
      
       if (IsVoluntaryVassalage(ePlayer))
       {
           iOpinionWeight *= GC.getOPINION_WEIGHT_VASSALAGE_VOLUNTARY_VASSAL_MOD();
           iOpinionWeight /= 100;
       }
    
       // No opinion bonuses if the Holy City was captured and we don't have it back yet
       if (iOpinionWeight < 0 && GetPlayer()->IsHasLostHolyCity() && IsPlayerCapturedHolyCity(ePlayer))
           return 0;
    
       // No opinion penalties if ignoring religious differences
       if (iOpinionWeight > 0 && GetPlayer()->GetDiplomacyAI()->IsIgnoreReligionDifferences(ePlayer))
           return 0;
    
       return iOpinionWeight;
    }
    
    Whether to ignore religious differences:
    Code:
    /// Should we ignore religious differences with ePlayer?
    bool CvDiplomacyAI::IsIgnoreReligionDifferences(PlayerTypes ePlayer) const
    {
       if (IsTeammate(ePlayer) || IsMaster(ePlayer))
           return true;
    
       if (GetNegativeReligiousConversionPoints(ePlayer) > 0)
           return false;
    
       if (IsAtWar(ePlayer) || IsCapitalCapturedBy(ePlayer) || IsHolyCityCapturedBy(ePlayer) || IsTeamUntrustworthy(GET_PLAYER(ePlayer).getTeam()))
           return false;
    
       if (IsPlayerLiberatedCapital(ePlayer) || WasResurrectedBy(ePlayer) || GET_TEAM(GetTeam()).GetLiberatedByTeam() == GET_PLAYER(ePlayer).getTeam() || GetDoFType(ePlayer) == DOF_TYPE_BATTLE_BROTHERS)
           return true;
    
       return false;
    }
    
    Great Prophets are born in the city with the greatest Faith output, not the capital - so it'd be whatever religion that city is, if I'm not mistaken.
     
    Last edited: Sep 8, 2020
    stii likes this.
  7. stii

    stii King

    Joined:
    Oct 3, 2010
    Messages:
    630
    Interesting I did wonder why sometimes the great prophet wasn't born in my capital and why sometimes it was the same for the AI.
     
  8. IljaMacabre

    IljaMacabre Chieftain

    Joined:
    Sep 8, 2020
    Messages:
    2
    Hello!
    I plan to start a VP Game and thinking of playing Marathon or even Epic Game Speed with marocco - would you recommend it or is Standard Game Speed better balanced? Since I have not much time I do not want to have to restart after lots of turns because it is not balanced for this Speed.
    Thank You!
     
  9. vyyt

    vyyt Deity

    Joined:
    Jan 28, 2005
    Messages:
    2,273
    Location:
    Czech Republic
    If you prefer longer (epic, ha!) games and you are new, then I would recommend the epic speed. It is my favorite speed too. But if you can stand the quick pace of standard, maybe standard will be even better for the first playthrough or two. VP is balanced for standard first and foremost, but I think it works with epic very well. There are also many people playing marathon, but I'd try it only once you get grasp of the new rules and features, etc. I'd have the same concern as you do - if your game goes south on marathon because you don't know how VP works, you will waste too much time.
     
  10. stii

    stii King

    Joined:
    Oct 3, 2010
    Messages:
    630
    Standard is a bit more balanced around but not to the point where other modes aren't fine. VP games do have more turns on average than un-modded games.
     
    vyyt likes this.
  11. Skidizzle

    Skidizzle Gameshow Host

    Joined:
    Sep 20, 2010
    Messages:
    107
    Playing 9-8 Vox 43civ EUI version here.

    Anyone have advice on how to keep track of diplomacy? Things are so dynamic in this version which I love.
    I've always used Infoaddict, but once you go over a certain number of civs it doesn't display correctly. Anyone out there know of a modified version that displays correctly or of something else to keep track of it all?
     
  12. vyyt

    vyyt Deity

    Joined:
    Jan 28, 2005
    Messages:
    2,273
    Location:
    Czech Republic
    @Skidizzle , check the stickied mods compatibility thread. There should be a linked lite version of Infoaddict - sorry, forgot its name. Never tried it myself, but it should display the relationships between civs - not sure how it handles 43 civs though.
     
  13. Grassland Farm

    Grassland Farm Warlord

    Joined:
    Apr 16, 2011
    Messages:
    155
    Location:
    Le mighty motherland France
    Has the mod become easier over the last, say, year or so? I remember struggling a lot in King, and now that I'm playing it again I'm managing to fight my way out of Immortal.

    I used to get bullied a lot in the early game, now it's more of a smooth sailing and the challenge is now in the mid-late game with the AI refusing to let you win.
     
  14. Jiggly

    Jiggly Warlord

    Joined:
    Jun 19, 2018
    Messages:
    189
    Does Temple of Artemis production buff include horse archers? What about ranged gunpowder units and siege units?
     
  15. Valvts

    Valvts A Plant

    Joined:
    Sep 20, 2014
    Messages:
    333
    Can anyone explain what 'interception' does?
     
  16. Zanteogo

    Zanteogo King

    Joined:
    Nov 13, 2015
    Messages:
    800
    Air units will auto attack other air units if set to this.
     
  17. Valvts

    Valvts A Plant

    Joined:
    Sep 20, 2014
    Messages:
    333
    A missile unit will also attack only once?
     
  18. Stalker0

    Stalker0 Baller Magnus

    Joined:
    Dec 31, 2005
    Messages:
    7,228
    I will expound on this a bit.

    Interception is a promotion that is available to the following units:

    1) Anti-Air Gun / Mobile Sam
    2) Triplane / Fighter / Jet Fighter
    3) Destroyer / Missile Cruiser / Carrier

    For numbers 1 and 3, Interception is on all the time, but has limited range. For Category 1 its 3 hexes for AA gun, and 4 for Mobile Sam. For category 3 the range is 2 hexes.

    For category 2, you use the full range of the unit, but must set the unit to "Interception" for it to work, otherwise the unit will not intercept.


    When you air strike a city or unit that is within an interceptor's range, an interception chance is rolled (the chance depends on the number of interception promotions you have which are in the promotions description. This can normally vary from 25% to a full 100% chance). When there are multiple interceptors, only 1 unit can actual intercept (the rules for multiple interceptors is a bit complex for this description, suffice it to say you only ever worry about one interception with each attack).

    If an interception occurs, the interceptor does an attack to the aircraft (your normal CS vs CS comparison). Note that Category 1 and 2 units have promotions that give them bonus CS against aircraft, and Category 2 gets further CS with its interception promotion. That is why even though its 1 "attack", it can do significant damage to the aircraft.... similar to how a strong mounted unit can nearly kill an archer unit in 1 attack.
     
    vyyt likes this.
  19. Lifeordeath

    Lifeordeath Chieftain

    Joined:
    Jul 1, 2020
    Messages:
    6
    The word Archery unit is used to describe every ranged and mounted ranged unit, including the gunpowder and even the light tank and helicopter gunship, so I believe Temple of Artemis affects them all. However siege units are a separate category of unit, and are not effected
     
    vyyt likes this.
  20. Kim Dong Un

    Kim Dong Un The One & Unly Supporter

    Joined:
    Dec 17, 2017
    Messages:
    817
    Gender:
    Male
    Location:
    Pyongyang
    Random question, but is the image for the 'National Monument/Epic' depicting a real triumphal arch, or is it just generic art?
     

Share This Page