Status
Not open for further replies.

Recursive

Already Looping
Moderator
Supporter
Joined
Dec 19, 2017
Messages
4,761
Location
Antarctica
Welcome to the New Year, everyone! And with the New Year comes a fresh start for VP as well :)

Here's a new patch for your enjoyment. All current changes are included in this: my extensive rework for diplomacy, improvements from @ilteroi, new modder tables from @HungryForFood, and numerous bugfixes from @Milae, @ilteroi and myself.

Took me a little longer than I'd have liked to debug everything, but I think you'll be happy with the final product.

It's been tested and should be as stable as the previous version; I didn't encounter any crashes or savegame issues, but it'll be a beta version for now due to the huge number of AI changes (also as we await @Gazebo for a new autoinstaller).

Problems after turn 500 (on standard speed) and a few issues with resources are not yet fixed, this will be worked on in the future.

I encourage you to post all feedback on the new AI diplomacy in the dedicated thread: https://forums.civfanatics.com/threads/diplomacy-ai-development.655040/

Online as of 3:50 AM CT. Not savegame compatible.

Installation instructions:
1. Install the 12-1-3 Version of VP using the autoinstaller from here.

2. Download the patch version of your choice from this post (attached ZIP files are at the end of this post).

3. Extract the folders from the .zip folder.

4. Copy and paste the extracted folders directly into your MODS folder (My Games\Sid Meier's Civilization 5\MODS)

5. At the prompt, select "Replace the files in the destination" as shown here:

Spoiler :

Screenshot.png



6. Delete your cache folder, if it exists (My Games\Sid Meier's Civilization 5\cache).

7. Enjoy the new beta version of VP :king:

Changelog is included below:

AI Changes
Code:
ilteroi's changes
- Numerous improvements to military and tactical AI, including better evaluation for army size, good attack targets and exposure to danger
- Improvements to AI valuation of resources for trade, citadel placement and city economic value
- Removed ability to trade resources in exchange for lump sum Gold (preventing DoW trade exploits), except between human players
- Improvements to city governor
- Improvements to AI early expansion logic
- Adjustments to city border expansion logic
- Performance improvements

AI Autoplay
- Enabled additional notifications for observers: war, peace, vassalage, Wonder construction
- Observers can now view World Congress information, and always know all players' desires
- Observers can now request that the AI share their opinion of another player and will always get truthful answers
- Fixed numerous issues with observer mode when interacting with the AI in the leaderhead screen, including the AI being hostile for no reason
- Observers automatically have the diplomacy debug mode enabled (which actually works properly now, give it a try if you like!)

Spies
- Slight improvements to AI valuation of City-State targets

Trade
- Small improvements to AI valuation of cities for peace treaties (a few less IMPOSSIBLE trades)
- Enabled humans to trade lump sum Gold for Gold Per Turn between each other
- Enabled humans to trade lump sum Gold between each other without a Declaration of Friendship

World Congress
- World Congress votes are now a lot more valuable and offer more strategic options for diplomacy

- Adjusted AI voting logic for sanctions, World Religion

- AIs that are not competing for victory will no longer apply penalties for victory competition when evaluating sanctions/etc.

- More nuanced consideration of World Congress "alignment" with the AI's interests

- AI cares a LOT more about the World Congress now; factors into approach/relationship decisions, modifiers are more powerful and can go as high as +/- 100 for diplomatic civs

- World Congress opinion modifiers for liking/disliking a proposal now scale based on how much the AI likes/dislikes the proposal

- World Congress opinion modifiers for passing/foiling a proposal and supporting hosting now scale based on what % of the total vote was your contribution (max benefit/penalty if you contributed 50% or more of the vote)
   For this calculation, votes against a proposal are subtracted from votes for a proposal and vice versa, fixing the exploit where you could vote both for and against and still get a bonus/penalty

- Liking a proposal still erases any past penalty for disliking a proposal and vice versa; however, with supporting/foiling proposals it is now based on your vote contribution %, and the value decays over time based on AI flavors
   Larger vote % contributions to pass AI proposals will do more to reduce previous penalties for foiling them and vice versa
   Opinion modifier text updated to reflect this
   Opinion modifier now distinguishes between helping someone become VS. remain host of the World Congress

- Reduced AI message spam about World Congress proposals

- Humans now always know AI teammates' World Congress desires, regardless of ideology/diplomats


Diplomacy
 Where to begin? :)

 Discussion Screen
 - Players can now denounce each other while at war
   AI taught to do this too
   Disabled if "Permanent War" or "Permanent War or Peace" are enabled
   Rationale: Players don't need the agreement of the other leader to badmouth them

 - Share Opinion now works even if at war, but AI will only share their opinion if debug mode is enabled or if they're at war with the player you ask about
   Now you can always hear the leader's lovely voice say something other than "You're joking, right?" or "My armies cannot be stopped." :)
   This is mostly intended as a debugging feature for modders/players though!

 - Fixed a bug with the button to request that the AI move their troops

 DiploAIOptions.sql
 - Added an option to disable Aggressive Mode automatically turning on when only Domination/Time victories are available

 DiploOpinionWeights.sql
 - Added configurable timers for the duration of penalties for backstabbing and broken promises
 - Todo: Add configurable timers for the duration of all opinion modifiers

 DiploApproachWeights.sql
 - Added configurable multipliers to AI WAR/HOSTILE approaches based on target value
 - Fixed scaling of recent peace treaty hostility dampener with difficulty level

  General
  - Removed and replaced (almost) the entire ATROCIOUS Firaxis memory management system for diplomacy, likely fixing a number of bugs and freeing up at least several MB of memory
    Will make diplomacy MUCH easier to understand and edit in the future!
    I am so happy about this! :D
    Only exception to this is memory for leader dialogue, which will be handled at a later time.

  - Better randomness for AI flavors/personalities

  - Numerous optimizations

  Resurrection
  - Now clears diplomacy penalties for all players on the resurrector's team

  - Resurrection bonus is now removed if you declare war or capture a city

  - Blocked AI from declaring war on their liberators/liberated civs

  Promises
  - Each broken/ignored promise timer is now on a separate counter rather than using a shared counter

  - Reworked AI handling of promises in general, fixed various bugs and deleted unnecessary memory

  Backstabbing Penalties
  - Finally reworked these in full

  - Reduced expiry timers for backstabbing penalties (highest is now 100, scaling with gamespeed) and made them configurable

  - Fixed a nasty bug making the untrustworthiness penalty for ending a DoF early last permanently

  - Betraying one civ on a team (except by ending a DoF early) now applies a "backstabbing mark" for everyone on that team, which can only be cleared with resurrection

  - Properly cleared these for vassals

  - AI trained to intelligently backstab their friends occasionally if they're of the right temperament (both by denouncing and declaring war)
  AI now understands the Defensive Pact rules and distinguishes between direct and indirect backstabbing - more likely to do the latter since they don't receive penalties for it

  - AI evaluation of untrustworthiness is no longer solely based on total denouncements/declarations of war on friends
    Also factors in AI's opinion of the player(s) you betrayed, whether the AI has betrayed others, AI's tolerance of betrayal, and how many civs have been conquered
    AI factors this in when deciding whether to backstab someone, and how severely to backstab them
    Backstabbers are more likely to be fine with other backstabbers

  Opinion
  - Reworked opinion scaling system for timed modifiers
    Almost all timed opinion modifier durations now scale with gamespeed and leader flavors
    Almost all timed opinion modifiers now decay in value gradually with time rather than with sudden jumps
    Backstabbing penalties, Declarations of Friendship, DP/Open Borders and denouncements are exceptions to this, they do not reduce at all until they expire
    Todo: Recent Trade, Common Foe, Recent Assist, Stolen Artifacts

  - "Stacking" modifiers (which increase the more you do something, e.g. returning civilians, sharing intrigue, spying, plundering trade routes) now decay more quickly at higher stacks if you stop doing the triggering behavior
   Allows for more flexible diplomacy/reevaluation as time passes

  - Added opinion bonus for having a Diplomat in another civ's capital
    Less for capitulated vassals, more for diplomatic civs
    Rationale: Ability to trade for their World Congress votes + assurance that you don't have a Spy in their capital = good opinion

  - Added opinion bonus for liberating an AI's Holy City
   Only applies if it's still the Holy City

  - Added opinion bonuses for returning an AI's original capital/Holy City to them via trade
   Smaller and less impactful than for outright liberation, but still noteworthy
   Only applies if you didn't capture the city in question; however, returning captured key cities will reduce the penalty for taking them in the first place
   Holy City bonus only applies if it's still the Holy City
   Does not apply to peace deals

  - Added opinion penalty for competing with "cultural" AIs for cultural advancement (# of Social Policies/Ideology Tenets)
    More intense on higher difficulties (anti-runaway mechanic)

  - Adjusted some opinion modifiers
   Increased bonuses for city liberation; also, vassals have a 1.5x-2x multiplier to bonuses for liberating/returning cities, and they're reduced if you've previously captured some of that AI's cities (todo: only get this bonus once per city)
   "Asked not to settle near us" modifier now only applies if AI refuses to do so
   Readded "asked not to spy" modifier; only applies if AI refuses to promise to stop spying
   Slightly increased modifier for same/different Social Policies
   Penalty for competing with "scientist" AIs in technology is now more intense on higher difficulties (anti-runaway mechanic)

 Approach
 - Revised the entire approach calculation again
  Significant improvements to AI intelligence here
  AI less wantonly aggressive
  AI more intelligent when evaluating friendships, etc.
  Religion is less impactful when evaluating approach
  AI now has separate functions for selecting approach towards its master or towards vassals
  AI can sometimes DoW its own vassal under rare circumstances (if they're close to winning or have someone's capital)
  Improved AI approach selection towards City-States

  Relationship Logic
  - Completely rewrote DoRelationshipPairing
    AI should be much more strategic in selecting its friends and Defensive Pacts; they will not befriend their biggest competitor
    AIs that don't have the Palace of Culture and Science will no longer make Defensive Pacts with players they're not friends with
    AI now selects "strategic trade partners", from which trades give extra opinion value, more often
    AI now identifies a "prime World Congress competitor" once the World Congress starts (for competitive diplomat AIs, this is the player with the most votes not on their team; for non-diplomat/non-competitive AIs, this is the player they see as least aligned with their interests), avoids befriending them and works to counter them

  War Selection Logic
  - Added several new functions specifically to teach the AI which targets are good to war and to pick good targets

  - Improved logic for bribed wars (should see less pointless/distant wars/general craziness)

  - Improved war sanity checks

  - Should be some significant improvements here in general

  War/Peace/Military Evaluations
  - Rewrote most of the logic for this entirely
  AI should be much better at determining which players are good attack targets, and smarter in general

  - Military Skill Rating from war success now decays slowly over time (2% of current difference from starting value per turn, scaling with game speed)

  Demands
  - AI should make demands more often and be more intelligent about it

  Other
  - Improvements to AI logic relating to city liberation
  - Added unique handling of AI religious difference based aggression for Celts
  - AI now has a chance of declaring war on you immediately if you side with your protected City-State when they bully/attack it and taunt you
   Makes City-State protection (and your chosen response) more meaningful!
   Todo later: Allow you to request a "stop attacking/bullying" promise the same way the AI can
Other Changes
Code:
General
 Additions
 - Several additional modder tables and other functionality improvements from HungryForFood
 - "Work has begun on..." notification when a production queue shift happens now includes the name of the city

Civs
- Hacienda buffed, by popular demand (pineappledan)

 Balance
 - Golden Age ruin can no longer trigger before turn 30
 - Faith Ruins can no longer trigger if no religions are left to found, and pantheon ruin (less Faith) will no longer trigger when someone founds the first religion
 - Also fixed the bugs with both of these
 - Ancient Ruins will no longer give Production, Population or new tiles to cities in resistance or that are being razed

 Difficulty
 - Removed XP bonuses (both flat and %) from the AI's starting Scout

 - Human players should now use the correct Barbarian bonus in multiplayer when there are multiple humans at different difficulty levels

 - AIDeclareWarProb value is now used to affect how sensitive the AI is to ALL players being competitive with them for victory/tech/policies, as well as how intense the Opinion penalty for being too close to victory is; rescaled it with difficulty

 - Removed all difficulty-related DLL code that treated human players differently for diplomacy purposes, with the exception of the configurable AttitudeChange and AIHumanStrengthMod values below

 - Added +5/+10/+15 bonus to AI opinion of human players on Warlord/Chieftain/Settler difficulties, to help newer players get used to the mod
   Players can change this to be any penalty or bonus of their choosing on any difficulty level by modifying the AttitudeChange value
   Only visible in the opinion table if Show Base Human Opinion, Show All Opinion Modifiers or Transparent Diplomacy are enabled in DiploAIOptions.sql

 - AI % increase to human military strength perception on higher difficulties is now an XML value (AIHumanStrengthMod)
   Also reduced it on higher difficulties (down to 80% on Deity, from 105%)

 - Added a value in NationalHappiness.sql for players to modify the war weariness cap (BALANCE_WAR_WEARINESS_POPULATION_CAP)
   Default value is 25% of population (set to 0 to disable war weariness)

 - Fixed BarbarianSeaTargetRange to work properly

 Bug & Issue Fixes
 - Fixed tiles not being lockable when ownership is transferred between cities (ilteroi)
 - Fixed Barbarian civilians not moving to encampments (ilteroi)
 - Fixed AI not improving oil with work boats (ilteroi)
 - Fixed units not waking up properly (ilteroi)
 - Fixed Borobudur missionary charges (ilteroi)
 - Fixed intrigue message for wrong player (ilteroi)
 - Fixes for Spain from pineappledan & HungryForFood
 - Civilian units should now get their modern art variants in the Modern Era, not Industrial/Atomic (kudos to Mad Madigan)
 - Fixed Influence with City-States not decaying with shared religion (thanks, Milae)
 - Fixed issues with City-State tribute (thanks again, Milae)
 - Fixed several issues with tech costs, including the teammate modifier (thanks yet again, Milae)
 - Fixed global/strategic monopoly bonuses not applying after loading a savegame (thanks once more, Milae)
 - Fixed City-States not picking their unique units randomly (credit to both Milae and ilteroi)
 - Fixed diplo debug mode not displaying AI approach properly (thanks to psparky for help here)
 - Fixed incorrect maintenance % tooltips in Economic Overview on lower difficulties (now displays the correct value)
 - Fixed Nationalization tenet not working with vassals
 - Fixed pantheon descriptions not indicating that the bonus goes to the capital when a Holy City doesn't exist
 - Fixed some issues with the World Congress AI
 - Fixed AIs exceeding the Declaration of Friendship/Defensive Pact caps and creating a global diplomacy gridlock
 - Fixed infinite warmongering penalty exploit from repeatedly declaring war and making peace with City-States
 - Declaring war on and making peace with the same City-State multiple times within 50 turns also won't cause more City-States to grow wary (also the event doesn't fire twice anymore)
 - AI won't apply a warmongering penalty if you declare war on a civilization they're planning war against; humans also won't if they're planning a coop war
 - War declarations between humans no longer count for warmongering penalty (except for the attacked teams)
 - Removed "you aggressively attacked this City-State" penalty when a PTP is broken
 - Fixed a bug causing erratic AI aggression by flipping the "Has Unique Unit" flag on and off on alternating turns
 - Fixed various bugs with demands causing the AI to get stuck on invalid targets, not prioritizing sensibly, canceling wartime operations etc.
 - Hopefully fixed bugs with coop wars, AI refusing to bully City-States
 - Fixed memory overflow errors in the diplomacy AI
 - Too many other fixes to list here for the diplomacy AI
 - Fixed Roman Forum and Summer Palace not having a MaxStartEra
 - Fixed LUA bug which enables the coop war button when the Share Opinion request screen is closed and vice versa

 Performance
 - Significant performance improvements for diplomacy AI
 - Deleted some unused memory from City-State AI

 Cleanup
 - Major code cleanup in Diplo AI, considerable cleanups in other files

 - Deleted a lot of useless options from the database for greater modder accessibility and DLL readability
   Changes from Smart AI, AI ability to use units as secondary workers/settlers, and bugfixes, for example - the changes are still there but the option to turn them off (and their associated entries in the database) are removed
   I have yet to see any player who turns OFF bugfixes and AI improvements
   Not to mention turning them off often wouldn't work anyway, or might break something else
   One of these was a CTD fix with an extra couple hundred lines of vanilla code preserved behind #else defines.
 

Attachments

  • 1-9 Patch EUI with Hotfix 5.zip
    3 MB · Views: 248
  • 1-9 Patch No EUI with Hotfix 5.zip
    3 MB · Views: 93
  • 1-9 Patch 43 Civ EUI with Hotfix 5.zip
    3.1 MB · Views: 98
  • 1-9 Patch 43 Civ No EUI with Hotfix 5.zip
    3.1 MB · Views: 90
Last edited:
Hotfix posted for a few small issues (merge error), including AI being too willing to make peace. Original post has been updated, redownload if you've downloaded already to apply the hotfix.

(Savegame compatible.)
 
Aren't some of us suffering enough. I can hardly win on Prince level without making the AI better at the game. :lol:

Great work you are all doing. Probably the best mod/overhaul I have ever played on any game, & CIV is not my favourite game by any means. This just gets me wanting to play it though.
 
Hi, a swedish Trebuchet just one shot killed my city based Comp. Bowmen (no walls, no damage to city, unit before). 101 Damage. Haven't seen this before, but also my first game on Immortal (Large, Epic)
 
Welcome to the New Year, everyone! And with the New Year comes a fresh start for VP as well :)

Here's a new patch for your enjoyment. All current changes are included in this: my extensive rework for diplomacy, improvements from @ilteroi, new modder tables from @HungryForFood, and numerous bugfixes from @Milae, @ilteroi and myself.

Took me a little longer than I'd have liked to debug everything, but I think you'll be happy with the final product.

It's been tested and should be as stable as the previous version; I didn't encounter any crashes or savegame issues, but it'll be a beta version for now due to the huge number of AI changes (also as we await @Gazebo for a new autoinstaller).

Problems after turn 500 (on standard speed) and a few issues with resources are not yet fixed, this will be worked on in the future.

I encourage you to post all feedback on the new AI diplomacy in the dedicated thread: https://forums.civfanatics.com/threads/diplomacy-ai-development.655040/

Online as of 3:50 AM CT. Not savegame compatible.

Installation instructions:
1. Install the 12-1-3 Version of VP using the autoinstaller from here.

2. Download the patch version of your choice from this post.

3. Extract the folders from the .zip folder.

4. Copy and paste the extracted folders directly into your MODS folder (My Games\Sid Meier's Civilization 5\MODS)

5. At the prompt, select "Replace the files in the destination" as shown here:



6. Enjoy the new beta version of VP :king:

Changelog is included below:

AI Changes
Code:
ilteroi's changes
- Numerous improvements to military and tactical AI, including better evaluation for army size, good attack targets and exposure to danger
- Improvements to AI valuation of resources for trade, citadel placement and city economic value
- Removed ability to trade resources in exchange for lump sum Gold (preventing DoW trade exploits), except between human players
- Improvements to city governor
- Improvements to AI early expansion logic
- Adjustments to city border expansion logic
- Performance improvements

AI Autoplay
- Enabled additional notifications for observers: war, peace, vassalage, Wonder construction
- Observers can now view World Congress information, and always know all players' desires
- Observers can now request that the AI share their opinion of another player and will always get truthful answers
- Fixed numerous issues with observer mode when interacting with the AI in the leaderhead screen, including the AI being hostile for no reason
- Observers automatically have the diplomacy debug mode enabled (which actually works properly now, give it a try if you like!)

Spies
- Slight improvements to AI valuation of City-State targets

Trade
- Small improvements to AI valuation of cities for peace treaties (a few less IMPOSSIBLE trades)
- Enabled humans to trade lump sum Gold for Gold Per Turn between each other
- Enabled humans to trade lump sum Gold between each other without a Declaration of Friendship

World Congress
- World Congress votes are now a lot more valuable and offer more strategic options for diplomacy

- Adjusted AI voting logic for sanctions, World Religion

- AIs that are not competing for victory will no longer apply penalties for victory competition when evaluating sanctions/etc.

- More nuanced consideration of World Congress "alignment" with the AI's interests

- AI cares a LOT more about the World Congress now; factors into approach/relationship decisions, modifiers are more powerful and can go as high as +/- 100 for diplomatic civs

- World Congress opinion modifiers for liking/disliking a proposal now scale based on how much the AI likes/dislikes the proposal

- World Congress opinion modifiers for passing/foiling a proposal and supporting hosting now scale based on what % of the total vote was your contribution (max benefit/penalty if you contributed 50% or more of the vote)
   For this calculation, votes against a proposal are subtracted from votes for a proposal and vice versa, fixing the exploit where you could vote both for and against and still get a bonus/penalty

- Liking a proposal still erases any past penalty for disliking a proposal and vice versa; however, with supporting/foiling proposals it is now based on your vote contribution %, and the value decays over time based on AI flavors
   Larger vote % contributions to pass AI proposals will do more to reduce previous penalties for foiling them and vice versa
   Opinion modifier text updated to reflect this
   Opinion modifier now distinguishes between helping someone become VS. remain host of the World Congress

- Reduced AI message spam about World Congress proposals

- Humans now always know AI teammates' World Congress desires, regardless of ideology/diplomats


Diplomacy
 Where to begin? :)

 Discussion Screen
 - Players can now denounce each other while at war
   AI taught to do this too
   Disabled if "Permanent War" or "Permanent War or Peace" are enabled
   Rationale: Players don't need the agreement of the other leader to badmouth them

 - Share Opinion now works even if at war, but AI will only share their opinion if debug mode is enabled or if they're at war with the player you ask about
   Now you can always hear the leader's lovely voice say something other than "You're joking, right?" or "My armies cannot be stopped." :)
   This is mostly intended as a debugging feature for modders/players though!

 - Fixed a bug with the button to request that the AI move their troops

 DiploAIOptions.sql
 - Added an option to disable Aggressive Mode automatically turning on when only Domination/Time victories are available

 DiploOpinionWeights.sql
 - Added configurable timers for the duration of penalties for backstabbing and broken promises
 - Todo: Add configurable timers for the duration of all opinion modifiers

 DiploApproachWeights.sql
 - Added configurable multipliers to AI WAR/HOSTILE approaches based on target value
 - Fixed scaling of recent peace treaty hostility dampener with difficulty level

  General
  - Removed and replaced (almost) the entire ATROCIOUS Firaxis memory management system for diplomacy, likely fixing a number of bugs and freeing up at least several MB of memory
    Will make diplomacy MUCH easier to understand and edit in the future!
    I am so happy about this! :D
    Only exception to this is memory for leader dialogue, which will be handled at a later time.

  - Better randomness for AI flavors/personalities

  - Numerous optimizations

  Resurrection
  - Now clears diplomacy penalties for all players on the resurrector's team

  - Resurrection bonus is now removed if you declare war or capture a city

  - Blocked AI from declaring war on their liberators/liberated civs

  Promises
  - Each broken/ignored promise timer is now on a separate counter rather than using a shared counter

  - Reworked AI handling of promises in general, fixed various bugs and deleted unnecessary memory

  Backstabbing Penalties
  - Finally reworked these in full

  - Reduced expiry timers for backstabbing penalties (highest is now 100, scaling with gamespeed) and made them configurable

  - Fixed a nasty bug making the untrustworthiness penalty for ending a DoF early last permanently

  - Betraying one civ on a team (except by ending a DoF early) now applies a "backstabbing mark" for everyone on that team, which can only be cleared with resurrection

  - Properly cleared these for vassals

  - AI trained to intelligently backstab their friends occasionally if they're of the right temperament (both by denouncing and declaring war)
  AI now understands the Defensive Pact rules and distinguishes between direct and indirect backstabbing - more likely to do the latter since they don't receive penalties for it

  - AI evaluation of untrustworthiness is no longer solely based on total denouncements/declarations of war on friends
    Also factors in AI's opinion of the player(s) you betrayed, whether the AI has betrayed others, AI's tolerance of betrayal, and how many civs have been conquered
    AI factors this in when deciding whether to backstab someone, and how severely to backstab them
    Backstabbers are more likely to be fine with other backstabbers

  Opinion
  - Reworked opinion scaling system for timed modifiers
    Almost all timed opinion modifier durations now scale with gamespeed and leader flavors
    Almost all timed opinion modifiers now decay in value gradually with time rather than with sudden jumps
    Backstabbing penalties, Declarations of Friendship, DP/Open Borders and denouncements are exceptions to this, they do not reduce at all until they expire
    Todo: Recent Trade, Common Foe, Recent Assist, Stolen Artifacts

  - "Stacking" modifiers (which increase the more you do something, e.g. returning civilians, sharing intrigue, spying, plundering trade routes) now decay more quickly at higher stacks if you stop doing the triggering behavior
   Allows for more flexible diplomacy/reevaluation as time passes

  - Added opinion bonus for having a Diplomat in another civ's capital
    Less for capitulated vassals, more for diplomatic civs
    Rationale: Ability to trade for their World Congress votes + assurance that you don't have a Spy in their capital = good opinion

  - Added opinion bonus for liberating an AI's Holy City
   Only applies if it's still the Holy City

  - Added opinion bonuses for returning an AI's original capital/Holy City to them via trade
   Smaller and less impactful than for outright liberation, but still noteworthy
  Only applies if you didn't capture the city in question; however, returning captured key cities will reduce the penalty for taking them in the first place
   Holy City bonus only applies if it's still the Holy City
   Does not apply to peace deals

  - Added opinion penalty for competing with "cultural" AIs for cultural advancement (# of Social Policies/Ideology Tenets)
    More intense on higher difficulties (anti-runaway mechanic)

  - Adjusted some opinion modifiers
  Increased bonuses for city liberation; also, vassals have a 1.5x-2x multiplier to bonuses for liberating/returning cities, and they're reduced if you've previously captured some of that AI's cities (todo: only get this bonus once per city)
   "Asked not to settle near us" modifier now only applies if AI refuses to do so
   Readded "asked not to spy" modifier; only applies if AI refuses to promise to stop spying
   Slightly increased modifier for same/different Social Policies
   Penalty for competing with "scientist" AIs in technology is now more intense on higher difficulties (anti-runaway mechanic)

 Approach
 - Revised the entire approach calculation again
  Significant improvements to AI intelligence here
  AI less wantonly aggressive
  AI more intelligent when evaluating friendships, etc.
  Religion is less impactful when evaluating approach
  AI now has separate functions for selecting approach towards its master or towards vassals
  AI can sometimes DoW its own vassal under rare circumstances (if they're close to winning or have someone's capital)
  Improved AI approach selection towards City-States

  Relationship Logic
  - Completely rewrote DoRelationshipPairing
    AI should be much more strategic in selecting its friends and Defensive Pacts; they will not befriend their biggest competitor
    AIs that don't have the Palace of Culture and Science will no longer make Defensive Pacts with players they're not friends with
    AI now selects "strategic trade partners", from which trades give extra opinion value, more often
    AI now identifies a "prime World Congress competitor" once the World Congress starts (for competitive diplomat AIs, this is the player with the most votes not on their team; for non-diplomat/non-competitive AIs, this is the player they see as least aligned with their interests), avoids befriending them and works to counter them

  War Selection Logic
  - Added several new functions specifically to teach the AI which targets are good to war and to pick good targets

  - Improved logic for bribed wars (should see less pointless/distant wars/general craziness)

  - Improved war sanity checks

  - Should be some significant improvements here in general

  War/Peace/Military Evaluations
  - Rewrote most of the logic for this entirely
  AI should be much better at determining which players are good attack targets, and smarter in general

  - Military Skill Rating from war success now decays slowly over time (2% of current difference from starting value per turn, scaling with game speed)

  Demands
  - AI should make demands more often and be more intelligent about it

  Other
  - Improvements to AI logic relating to city liberation
  - Added unique handling of AI religious difference based aggression for Celts
  - AI now has a chance of declaring war on you immediately if you side with your protected City-State when they bully/attack it and taunt you
   Makes City-State protection (and your chosen response) more meaningful!
   Todo later: Allow you to request a "stop attacking/bullying" promise the same way the AI can
Other Changes
Code:
General
 Additions
 - Several additional modder tables and other functionality improvements from HungryForFood
 - "Work has begun on..." notification when a production queue shift happens now includes the name of the city

 Balance
 - Golden Age ruin can no longer trigger before turn 30
 - Faith Ruins can no longer trigger if no religions are left to found, and pantheon ruin (less Faith) will no longer trigger when someone founds the first religion
 - Also fixed the bugs with both of these
 - Ancient Ruins will no longer give Production, Population or new tiles to cities in resistance or that are being razed

 Difficulty
 - Removed XP bonuses (both flat and %) from the AI's starting Scout

 - Human players should now use the correct Barbarian bonus in multiplayer when there are multiple humans at different difficulty levels

 - AIDeclareWarProb value is now used to affect how sensitive the AI is to ALL players being competitive with them for victory/tech/policies, as well as how intense the Opinion penalty for being too close to victory is; rescaled it with difficulty

 - Removed all difficulty-related DLL code that treated human players differently for diplomacy purposes, with the exception of the configurable AttitudeChange and AIHumanStrengthMod values below

 - Added +5/+10/+15 bonus to AI opinion of human players on Warlord/Chieftain/Settler difficulties, to help newer players get used to the mod
   Players can change this to be any penalty or bonus of their choosing on any difficulty level by modifying the AttitudeChange value
   Only visible in the opinion table if Show Base Human Opinion, Show All Opinion Modifiers or Transparent Diplomacy are enabled in DiploAIOptions.sql

 - AI % increase to human military strength perception on higher difficulties is now an XML value (AIHumanStrengthMod)
   Also reduced it on higher difficulties (down to 80% on Deity, from 105%)

 - Added a value in NationalHappiness.sql for players to modify the war weariness cap (BALANCE_WAR_WEARINESS_POPULATION_CAP)
   Default value is 25% of population (set to 0 to disable war weariness)

 - Fixed BarbarianSeaTargetRange to work properly

 Bug & Issue Fixes
 - Fixed tiles not being lockable when ownership is transferred between cities (ilteroi)
 - Fixed Barbarian civilians not moving to encampments (ilteroi)
 - Fixed AI not improving oil with work boats (ilteroi)
 - Fixed units not waking up properly (ilteroi)
 - Fixed Borobudur missionary charges (ilteroi)
 - Fixed intrigue message for wrong player (ilteroi)
 - Fixes for Spain from pineappledan & HungryForFood
 - Civilian units should now get their modern art variants in the Modern Era, not Industrial/Atomic (kudos to Mad Madigan)
 - Fixed Influence with City-States not decaying with shared religion (thanks, Milae)
 - Fixed issues with City-State tribute (thanks again, Milae)
 - Fixed several issues with tech costs, including the teammate modifier (thanks yet again, Milae)
 - Fixed City-States not picking their unique units randomly (credit to both Milae and ilteroi)
 - Fixed diplo debug mode not displaying AI approach properly (thanks to psparky for help here)
 - Fixed incorrect maintenance % tooltips in Economic Overview on lower difficulties (now displays the correct value)
 - Fixed Nationalization tenet not working with vassals
 - Fixed pantheon descriptions not indicating that the bonus goes to the capital when a Holy City doesn't exist
 - Fixed some issues with the World Congress AI
 - Fixed AIs exceeding the Declaration of Friendship/Defensive Pact caps and creating a global diplomacy gridlock
 - Fixed infinite warmongering penalty exploit from repeatedly declaring war and making peace with City-States
 - Declaring war on and making peace with the same City-State multiple times within 50 turns also won't cause more City-States to grow wary (also the event doesn't fire twice anymore)
 - AI won't apply a warmongering penalty if you declare war on a civilization they're planning war against; humans also won't if they're planning a coop war
 - War declarations between humans no longer count for warmongering penalty (except for the attacked teams)
 - Removed "you aggressively attacked this City-State" penalty when a PTP is broken
 - Fixed a bug causing erratic AI aggression by flipping the "Has Unique Unit" flag on and off on alternating turns
 - Fixed various bugs with demands causing the AI to get stuck on invalid targets, not prioritizing sensibly, canceling wartime operations etc.
 - Hopefully fixed bugs with coop wars, AI refusing to bully City-States
 - Fixed memory overflow errors in the diplomacy AI
 - Too many other fixes to list here for the diplomacy AI
 - Fixed Roman Forum and Summer Palace not having a MaxStartEra
 - Fixed LUA bug which enables the coop war button when the Share Opinion request screen is closed and vice versa

 Performance
 - Significant performance improvements for diplomacy AI
 - Deleted some unused memory from City-State AI

 Cleanup
 - Major code cleanup in Diplo AI, considerable cleanups in other files

 - Deleted a lot of useless options from the database for greater modder accessibility and DLL readability
   Changes from Smart AI, AI ability to use units as secondary workers/settlers, and bugfixes, for example - the changes are still there but the option to turn them off (and their associated entries in the database) are removed
   I have yet to see any player who turns OFF bugfixes and AI improvements
   Not to mention turning them off often wouldn't work anyway, or might break something else
   One of these was a CTD fix with an extra couple hundred lines of vanilla code preserved behind #else defines.
Thanks for all of the hard work you guys put into this!
 
Hi, a swedish Trebuchet just one shot killed my city based Comp. Bowmen (no walls, no damage to city, unit before). 101 Damage. Haven't seen this before, but also my first game on Immortal (Large, Epic)

First time I've heard of this issue...post a bug report on Github, please! :)
 
[1224408.125] column Name is not unique


INSERT INTO Defines (Name, Value)
SELECT 'MOVE_TROOPS_MEMORY_TURN_EXPIRATION', '20';

DiploOpinionWeights.sql and CoreDefines.sql
 
I was kind of hoping for a buff for the Spanish Hacienda (balance is GMan territory, i know) but overall this is such an impressive work by every one involved :crazyeye:
 
Recursive you may want to note in your instructions about clearing the cache. Its a good practice to do when swapping out files (especially for a beta), and those of us who are use to the autoinstaller may not think to do it
 
Hotfix #2 posted, fixes non-unique SQL database value and a minor issue with AI Declarations of Friendship. Original post has been updated, redownload if you've downloaded already to apply the hotfix.

(Also savegame compatible.)


Recursive you may want to note in your instructions about clearing the cache. Its a good practice to do when swapping out files (especially for a beta), and those of us who are use to the autoinstaller may not think to do it

Added this to the instructions, good call.
 
Hotfix #2 posted, fixes non-unique SQL database value and a minor issue with AI Declarations of Friendship. .

Noticing this on HF 1, so seeing if this is addressed in HF 2 or is intended.

Ghandi is SUPER friendly with me. I declared on him early, took a worker, held him up forever. As soon as we peace, he offers me a DOF. Then I go to war and vassal him, immediately DOF.
 
Missing something here not seeing the patch files for steps 2 and 3

2. Download the patch version of your choice from this post.

3. Extract the folders from the .zip folder.

All I am seeing are the 4 hotfix files which cannot be the full patch.

Can someone please link the beta files to install once you install the 12-1-3.exe VP file
 
Noticing this on HF 1, so seeing if this is addressed in HF 2 or is intended.

Ghandi is SUPER friendly with me. I declared on him early, took a worker, held him up forever. As soon as we peace, he offers me a DOF. Then I go to war and vassal him, immediately DOF.

The second DOF may be the way it works now. The first DOF sounds like what I see in my games — a curious shrugging off of bad feelings after an early war.

Curious as to what Recursive says.
 
Has the annoying habit of newly recruited units appearing anywhere in a cities limits been resolved. It is most annoying when in a war, when you are besiged and a unit is either built/bought/gift & it appears right in front of the enemy & destroyed, particularly a range unit. This works both ways & problem for the AI. I liked in the past when they appeared inside your city, & could move them out, preferablly behind so don't killed straight awy.
 
Status
Not open for further replies.
Top Bottom