New BETA Version - 4.12.1 (July 10, 2024)

Status
Not open for further replies.
If Player 1 ask Player 2 to join war against Player 3, and Player 2 ask for 10 turns, then whenever Player 2 and Player 3 end up at war before those 10 turns, Player 1 joins the war immediately.

Most likeley in your case, "another AI" asked Russia to dow you in 10 turns, and thus joined the war when you dow Russia yourself.
Ahh true, and I get hammered so hard because of early tech deficits :(
Even worse, the AI factors in their ally's strength when determining your ability to attack them and their ability to attack you! :shifty:
 
Version 4.12 has been released. Link in OP has been updated.

Changelog:

Code:
General
- Added some more automated testing to GitHub
- Lots of code cleanup - deleted another ~5k lines of code (thanks again, azum4roll)
    Removed unused Civ4 religion mechanics

    Removed non-functional columns in Buildings table: FoundsReligion, IsReligious

    Reorganized CvPlayer::processPolicies(), make most policy abilities revertible
    - Notable exception being instant population, which is currently REAPPLIED when the policy is removed (fixed)
    - These policies' effects are now one shot (will not reapply if the policy is gained again):
    -- Progress opener: retro yields from population and tech
    -- Tradition opener: +2 capital population
    -- Resettlement: +2 population in every city
    -- People's Army, Worker's Faculties, Academy of Sciences: free buildings
    -- Universal Suffrage: start a golden age
    -- Enlightenment, Great Leap Forward: free tech
    - Fixed National Treasure not having IncludesOneShotFreeUnits = 1
    - "Technically, OneShot and IncludesOneShotFreeUnits should be default true since it's normal to block these effects from firing twice, but I'm too lazy to add a PolicySweeps.sql for now"
    - DLL modders need to be careful where to place change functions

    Removed unused (and defunct) variables and functions about "chosen" policy branches
    - Fixed top panel calling the wrong Lua function
    - Removed defines: NUM_POLICY_BRANCHES_ALLOWED
    - Removed column: Policies.NumExtraBranches
    - Removed Lua functions: player:GetNumPolicyBranchesAllowed (no setter), player:GetPolicyBranchChosen

    Contained most MOD_BUILDINGS_THOROUGH_PREREQUISITES logic within the new CvCity::GetBuildingTypeFromClass() function

    Made more columns/tables that add yields/happiness to buildings support having more than 1 of the same building in a city (probably still not ALL)

    Unhardcoded (most) theming bonus descriptions

    Removed inaccurate great people counter of both player and city
    - Player version only tracks GG and GA and is never used
    - City version is never updated
    - Associated Lua function: city:GetNumGreatPeople

    Reduced repetitive code with new CvCity::SetNumFreeBuilding() function
    - Refund production/faith and city location validation are optional (default true)

    Changed Lua function city:SetNumFreeBuilding
    - Now takes in optional bRefund and bValidate parameters (default FALSE) and returns whether the city has the correct number of free buildings afterwards
    - Backward compatible
    - Full "declaration": bool SetNumFreeBuilding(BuildingTypes iIndex, int iNewValue, bool bRefund = false, bool bValidate = false)

    Fixed some clang warnings


AI
  City-State Diplomacy
  - AI no longer sends diplomatic units or spies to City-States that have an Open Door or Sphere of Influence resolution currently proposed for them
  - AI no longer sends diplomatic units or spies to City-States allied with their teammates

  Diplomacy
  - Humans can now request coop wars from players they are targeting with coop wars, if they want to
      This was added as anti-AI stupidity but is no longer needed & shouldn't affect humans wanting to backstab
  - AI no longer applies any diplomatic penalties towards other players for having their teammate's religion
  - Reverted AI back to more intelligent calculation of comparative military power
      It was reverted back to the vanilla version because nuclear weapons couldn't be considered since they had no combat strength, however see "Balance - Score" below
  - AI will now refuse/break a "don't settle new cities near us" promise if they have no cities
  - Improvements to AI logic relating to selecting war and demand targets
      Fixed a bunch of bugs (see Bugfixes)
      AIs going for Domination Victory are now programmed to select a target even if it would backstab a friend or their approach isn't negative, if no other valid targets are available
        Some conditions (e.g., recent peace treaty, teamed up with a human, target too distant in early game) override this
      Refusing a trade demand without an immediate war declaration in retaliation no longer deters the AI from declaring war against you
      Accepting a trade demand still does, however - and the AI can tell the difference now
      The deterrence now also ends if the demand expires due to war or sanctions
  - AI no longer adds a FRIENDLY bonus for traded items you're giving to them as part of a demand or peace treaty *IF* they're looking for an opportunity attack against you
      Voluntarily traded or given items still increase the FRIENDLY approach, however
  - AI now more likely to become HOSTILE (or declare war, to a lesser extent) if they think you'd be a good demand target
  - AI now more likely to become GUARDED if you've recently accepted a demand from them, scaling with their vulnerability
  - AI now cannot be FRIENDLY if they're currently giving something to you in a trade demand, and reevaluates its approach instantly
  - Opinion penalty for making trade demands is now halved if the AI is not currently giving anything to you
  - Opinion penalty for making trade demands is now doubled if the AI is currently giving something and is bankrupt
      If the AI will go bankrupt in less than 20 turns, the penalty will gradually increase to 2x based on the number of turns until bankruptcy
      Average instant yield gain is added to the AI's negative GPT for this calculation, so it's not the same as the number displayed in the trade screen
  - Minor improvements relating to vassals choosing approach towards their masters

  Deal AI
  - Minor improvements to third party war valuation logic

  Policy AI
  - AI teammates of humans will attempt to adopt the first human on their team's ideology (sorting by turn order) if it would not make them lose cities from Unhappiness
  - AI teammates of other AIs will adopt the ideology of the clearly leading AI, if the leading AI has at least 1.5x the evaluating AI's score and it would not make the evaluating AI lose cities from Unhappiness
       Being close to a cultural victory adds 100000 score to a team member for this evaluation
  - AI teammates will switch ideologies if they have the option and either of the two conditions above are true

  Religion AI
  - AI will no longer convert foreign cities that are following their teammates' religions
      They will allow human teammates (only) to convert their own cities without reconverting them


Balance
  Complete Kills Game Option
  - If a player stays alive for 10 turns without a Settler or any cities, they receive a free Settler
      Spawn placement order of priority:
      1. Attempt to spawn on top of a land combat unit that is on land (highest defensive strength)
      2. Attempt to spawn on top of a land civilian unit that is on land (highest Production cost, minimum 1)
      3. Spawn on top of a random tile where a city could be founded
           (AI will not pick an Antiquity Site tile; they're disallowed to found on them to circumvent a bug)

  Improvements
  - Improvements created by Great People no longer follow the "take the minimum of time to construct and repair improvement" rule when determining repair time
      i.e., They use the base repair time, they can't be repaired instantly

  Military (Move Troops) Promise
  - Is now mutual - the asker also agrees not to declare war on the player they're requesting the promise from
  - Blocked AI teammates of humans from requesting or accepting move troops promises
  - Also blocked AI from requesting a "don't attack my protected City-State" promise from AI teammates of humans
      These exceptions are to prevent human teammates from incurring backstabbing penalties for promises they weren't aware were made, since AI will penalize an entire team for those penalties

  Score
  - Reverted score back to more intelligent calculation of military power based on attack strength
  - Nuclear weapons now count towards military power, and the AI will evaluate them separately
      Atomic Bombs are worth (strongest land unit in world * (blast radius tiles - 1) * 2) + (strongest land unit in world * 3) + (strongest air unit in world * 12)
      Nuclear Missiles are worth (strongest land unit in world * blast radius tiles * 3) + (strongest air unit in world * 12)
      City-States will just use these numbers as-is for the global military power bonus to tribute, but won't add an additional local military power bonus for nukes located near them
      In AI evaluations, the AI will consider how many of its cities are protected by Strategic Defense Systems, and the stats of those SDS's, as well as use its own strongest units rather than those of the world
      More SDS's = they will see your nukes as less of a threat
      This also applies in reverse, they will consider their own nukes less threatening if their opponent has built SDS's
      The AI also considers the nuclear power of each player's allies
      Additionally, military skill rating or HumanStrengthPerceptionMod (difficulty) has no effect on AI's perception of nuclear power

  Nuke Immunity
  - Added it to Strategic Defense System, even though nukes don't currently destroy buildings in VP
  - Made Nuke Immune buildings unable to be randomly destroyed by events that destroy buildings
      Wonders and dummy buildings were already immune, so their balance is unchanged


UI
- Added a notification when the AI's "don't settle near Cities near us" promise is fulfilled (and might need renewal)
- Clarified some civ text; shortened all civ text to fit within 3 lines of text
- Other text fixes


Bugfixes
- Fixed a crash when determining religious Tourism towards a player with no cities
- Fixed a crash when deleting a City-State from the game with OCC / IGE
- Fixed a crash when scoring religious beliefs without having a capital city
- Fixed various bugs with Diplo AI war and demand logic
    Caused AI to cancel AI operations inappropriately, which made successful operations less likely
- Fixed global City-State quests (e.g., Barbarian Horde) expiring prematurely if a major civ that had the quest died
    This also fixes Barbarians capturing the City-State earlier than they should!
- Fixed AI being overly eager to liberate vassals (added many sanity checks, reduced weights, and added a customizable define)
- Fixed some vassal tax money being lost due to rounding if there are multiple players on the master's team
- Fixed vassal maintenance expenses not being divided evenly amongst members of the master's team
- Fixed vassals adopting the ideology of dead masters if a still-living master is later in the player order
- Fixed Nuclear Gandhi being enabled with Random Personalities enabled and without the relevant override setting enabled
- Fixed Indian Great Prophets perishing immediately if the player chooses to build a Holy Site before founding a religion
- Also unhardcoded this exception so that it works for any improvement that an Indian Great Prophet (or unique Great Prophet) can create, not just Holy Sites
- Fixed human vassals not adopting their master's ideology
- Fixed broken logic preventing AI players from switching ideologies
- Fixed Complete Kills AI not using any Settlers they have to found a new capital
- Fixed Rome getting yields and bonuses from conquered cities that aren't the City-State's original capital
- Fixed purchased Authority units not being able to create Polynesian Fishing Boats
- Fixed Defensive Pacts not being cancelled by denouncements
- Fixed being able to trade Defensive Pacts without mutual embassies
- Fixed player 0's AI personality not initializing correctly when entering observer mode
- Fixed AI not properly recognizing conquered religions as owned in some situations with teammates
- Added unitclass cap check to free unit picker
- Fixed belief yields from working any specialist not being scored by Religion AI
- Removed score nullification if belief gives Science to buildings and player has Chinese trait
    No idea why this was here, but it sure doesn't make sense right now
- Allowed AI to immediately gain a reformation belief if the respective policy is picked, instead of needing to wait for next turn
- Fixed land units not being upgradeable on water polders
- Disallowed units from upgrading while having cargo
    Prevents the case where it upgrades into something that can't carry cargo
    This could already be intended in the base game, but the code was placed in the wrong block
- Removed potential Production/Faith refund for Palace when capital is captured - it's already being refunded by being rebuilt in the new capital

Online as of 12:47 AM CDT. Not savegame compatible.

This was not extensively tested prior to release - please report any bugs! Also, another savegame incompatible release soon is possible, depending on axatin's city governor changes.

Warning: This will crash in Community Patch only once religious units are created - will be hotfixed soon.
 
Last edited:
- Lots of code cleanup - deleted another ~5k lines of code (thanks again, azum4roll)
We may not always see eye to eye in terms of game design, but I would like to thank @azum4roll for their continuous work towards the betterment of VP's code (in addition of course to all the other contributors to VP).
 
4.11 patch

I'm doing very well right now, but the authority nerf hits hard. Its been 150 turns and non of my cities have walls up. Except for the capital, all buildings takes ~20 turns each.
 

Attachments

  • 1720603349799.png
    1720603349799.png
    4.5 MB · Views: 5,085
Version 4.12.1 has been released. Link in OP has been updated.

Changelog:

Code:
- Fixed crash when AI obtains religious units in Community Patch only
- Fixed Ancient Ruins not giving rewards
- Fixed AI difficulty bonus yields not being given

Online as of 4:33 AM CDT. Savegame compatible with 4.12 versions.
 
Last edited:
4.11 patch

I'm doing very well right now, but the authority nerf hits hard. Its been 150 turns and non of my cities have walls up. Except for the capital, all buildings takes ~20 turns each.
That is epic speed right? I mean you have a jungle start and your cities have very low population. You have god of the expanse I take it? so quite a bit of your production will be from instant yields, so they will not take 20 turns to finish.
I am playing 4.11 on deity epic speed, authority rome and I am building stuff fast
 
That is epic speed right? I mean you have a jungle start and your cities have very low population. You have god of the expanse I take it? so quite a bit of your production will be from instant yields, so they will not take 20 turns to finish.
I am playing 4.11 on deity epic speed, authority rome and I am building stuff fast
Yeah, jungle starts just feel bad in general. Starved for production, takes forever to go anywhere, takes forever to build improvements, AND you're always outmaneuvered by barbarians spawning nearby.
4.11 patch

I'm doing very well right now, but the authority nerf hits hard. Its been 150 turns and non of my cities have walls up. Except for the capital, all buildings takes ~20 turns each.
I would've settled near the stone and iron ASAP for the much needed production and :c5production: ITR
 
Yeah, jungle starts just feel bad in general. Starved for production, takes forever to go anywhere, takes forever to build improvements, AND you're always outmaneuvered by barbarians spawning nearby.

I would've settled near the stone and iron ASAP for the much needed production and :c5production: ITR

Some jungle are great if you plan to go rationalism but yeah need some prod and food in capital, +1+2 jungle tiles is not very hot.
 
A bunch of bugs i encountered on my first game on 4.12.1
1-Great lighthouse does not grant a unique light house to Denmark
2- Unlocking any policy after Conscription from authority branch reactivates Conscription again ( Free units every time a new policy is unlocked)
3- The old as time itself non reproducible bug where land units can embark on top of enemy civilian units and kill them.
Probably will continue this game and post the github reports after
 
4.12.1 ---> I've got free Court Chapels in all of my cities (after unlocking Sovereignty)
 

Attachments

  • court2.jpg
    court2.jpg
    449.2 KB · Views: 89
Last edited:
Added to the Great Lighthouse point above, Stonehenge also does not grant a free council with the new version.
Hmmm, I've received free buildings from the Great Wonders (v4.12.1)
 

Attachments

  • FreeBuildings.jpg
    FreeBuildings.jpg
    421.4 KB · Views: 94
I got Jungle with Marsh Sugar in the Greece game I'm in currently,
Yes turn timers look bad, but instant yields save the day.
I think not being able to get to 20 supply for the extra +1 hammer is a bit of an issue though. Took me ages to get there and that's with the +5 supply policy. (Azum supply rework enabled)
 
Also there is a bizarre Tradition medieval celtic capital with 3 range Attack?
Is this a new change or bug ?
Bug. But 3 range is certainly a weird bug!

For people not on discord there seem to be a few issues with the new version -- strange happiness things as well -- so beware.
 
- AI no longer sends diplomatic units or spies to City-States allied with their teammates

Ooh, is this intended to apply for capitulated vassals? One of the most annoying things I find about keeping AI alive as vassals is that they still try to steal allied CSes and then vote against my interests...
 
2- Unlocking any policy after Conscription from authority branch reactivates Conscription again ( Free units every time a new policy is unlocked)
I can fix this.
Ooh, is this intended to apply for capitulated vassals? One of the most annoying things I find about keeping AI alive as vassals is that they still try to steal allied CSes and then vote against my interests...
Vassals aren't your teammates.
 
Ooh, is this intended to apply for capitulated vassals? One of the most annoying things I find about keeping AI alive as vassals is that they still try to steal allied CSes and then vote against my interests...
This would be kind of OP as a warmonger but I'd love it so much
 
Status
Not open for further replies.
Back
Top Bottom