Delnar_Ersike
Prince
Artificial Unintelligence
Improves Civ5's AI. Nothing more, nothing less.
Latest version: v9 w/ mini-update, released 2015-01-09
Workshop Link to Full Version
Workshop Link to Lite Version (XML files only)
CivFanatics Download Link to Full Version
CivFanatics Download Link to Lite Version
GitHub Repository for Source Code (Fully populated!)
All of my changes are wrapped in preprocessor directives using defines located in AuI.h. Parameters that have the word "FIX" in them are fixes for AI bugs or bad code (therefore merging them should be a priority).
This mod, to my knowledge, is the most extensive AI mod available for Civ5 as of yet. Pretty much everything has been tweaked or overhauled: city placement, unit management, choosing beliefs, voting on UN resolutions, choosing ideologies, tech progression, puppet-annex-raze logic, choosing promotions, the whole "Grand Strategy" dynamic, formations used by the AI, Great Person handling... the list goes on. Diplomacy and Deal AI are the only big exceptions, seeing as those systems are a lot harder to troubleshoot for AI-only games and pretty much require a complete rewrite due to how gamey they currently are.
The mod contains nothing but AI changes; the only non-AI change is the implementation of a second random number generator that returns values in a binomial distribution instead of a flat distribution, but only AI-related routines have been modified to use this random number generator.
The lite version contains only XML changes for maximum compatibility with other mods.
Note that my DLL does not necessarily depend on the values I used in my XML files, so it should be compatible with all non-DLL mods.
List of all XML-based changes in no particular order:
Any (detailed) gameplay feedback is appreciated, both in terms of existing AI flaws that are unaddressed/worsened by my mod and new AI flaws that are introduced by my mod. Plus I'm curious how well my AI changes hold up against more seasoned players, seeing as I only ever play on Prince or King (I dislike playing against cheating AIs) and I'm forced to run my AI-only test games on Prince.
I haven't bothered porting my changes to older DLL versions, so the mod is BNW-only for now.
Improves Civ5's AI. Nothing more, nothing less.
Latest version: v9 w/ mini-update, released 2015-01-09
Workshop Link to Full Version
Workshop Link to Lite Version (XML files only)
CivFanatics Download Link to Full Version
CivFanatics Download Link to Lite Version
GitHub Repository for Source Code (Fully populated!)
All of my changes are wrapped in preprocessor directives using defines located in AuI.h. Parameters that have the word "FIX" in them are fixes for AI bugs or bad code (therefore merging them should be a priority).
This mod, to my knowledge, is the most extensive AI mod available for Civ5 as of yet. Pretty much everything has been tweaked or overhauled: city placement, unit management, choosing beliefs, voting on UN resolutions, choosing ideologies, tech progression, puppet-annex-raze logic, choosing promotions, the whole "Grand Strategy" dynamic, formations used by the AI, Great Person handling... the list goes on. Diplomacy and Deal AI are the only big exceptions, seeing as those systems are a lot harder to troubleshoot for AI-only games and pretty much require a complete rewrite due to how gamey they currently are.
The mod contains nothing but AI changes; the only non-AI change is the implementation of a second random number generator that returns values in a binomial distribution instead of a flat distribution, but only AI-related routines have been modified to use this random number generator.
The lite version contains only XML changes for maximum compatibility with other mods.
Note that my DLL does not necessarily depend on the values I used in my XML files, so it should be compatible with all non-DLL mods.
List of all XML-based changes in no particular order:
Spoiler :
- City strategy "Need Tile Improvers" has a threshold of 50 (from 67)
- City strategy "Want Tile Improvers" has a threshold of 33 (from 40)
- City strategy "Have Training Facility" alters flavors for tile improvement, expansion, growth, and happiness by -1 (from -3)
- City Strategy "Capital Under Threat" alters Defense flavor by +35 (from +25)
- Expansion flavor +5 in the AI's original capital
- Economic strategies "Expand Like Crazy" and "Grow Like Crazy" give +75 Expansion and +75 Growth flavors respectively by (from +10)
- Economic Strategy "Losing Money" now alters Gold flavor by +40 (from +25), Mobile flavor by -10, Ranged flavor by -10, and Naval flavor by -10
- Economic Strategy "Losing Money" now checks and can trigger every turn (from 5 turns)
- Economic Strategy "Early Expansion" now alters Defense flavor by +10
- Economic strategy for Conquest Grand Strategy alters Air flavor by +10 (from +5), Mobile flavor by +5, and Gold flavor by +5 (to pay for unit upkeep)
- Economic strategy for Spaceship Grand Strategy alters Growth flavor by +20 (population = science) and Gold flavor by +5 (to put it on similar footing as the other Grand Strategy stuff)
- Economic strategy for Spaceship Homestretch alters Science flavor by +40 (from +25; helps the AI complete techs for parts it has not unlocked yet), Gold flavor by +10 (both an equalizer and helps the Freedom ideology), and Production flavor by +15 (helps direct towards improvements that increase production, thereby speeding up parts production)
- Increased the effect grand strategies' primary flavor has on the AI choosing said grand strategy to 9/10/10/16 (from 9/10/10/13) for Conquest/Culture/Diplomacy/Spaceship respectively
- Increased the influence of Grand Strategies on certain City Specializations: Conquest increases Gold specialization weight by 50, Diplomacy and Culture increases Science specialization weight by 50, Spaceship increases Food specialization (ie. Settler Pump) weight by 50
- AI Conquest Grand Strategy's flavor effects added or altered: Offense by +3 (from +2), Expansion by +2 (from +1), Military Training by +2 (from +1), Air by +2 (from +1), Nukes by +6 (from +1), Mobile by +2, Defense by +1, Naval by +1, and Water Connection by +3
- AI Culture Grand Strategy's flavor effects added or altered: Culture by +3 (from +2) and Religion by +2 (from +1)
- AI Spaceship Grand Strategy's flavor effects added or altered: Spaceship by +4 (from +2), Science by +3 (from +2), Production by +2 (from +1), Religion by -2 (from -5), Great People by +1, and Gold by +1
- Nukes flavor now increases drastically depending on the AI's Military Strategy: "At War" gives +20, "Empire Defense" gives +15, "Empire Defense Critical" gives +50, "War Mobilization" gives +10, and "Losing Wars" gives +30. For reference, the "Need Nuke" gives +150 Nukes flavor.
- AI Military Strategy "War Mobilization" alters Growth flavor by -10 (from -50 in vanilla, -10 in Brave New World, this helps with warlike civs' science)
- Commerce City Specialization alters Production flavor by +20 (from +10) and Growth flavor by +30 (from +20)
- Science City Specialization alters Production flavor by +20 (from +10)
- General Economic City Specialization alters Production flavor by +25 (from +20), Growth flavor by +30 (from +20), and Culture flavor by +20 (from +30)
- Target gold and science yields per citizen increased by 0.3 and 0.5 respectively for the following city specializations: General Economic (now 0.3/0.5), Military Training (now 0.3/0.5), Military Naval (now 0.3/0.5), Commerce (now 1.3/0.5), and Science (now 0.3/1.5). Target food and production yields per citizen remain unchanged.
- Modified Multi-Unit Formation settings to 1) allow for more flexibility between ranged and siege units, 2) allow for smaller task forces, 3) allow certain land task forces to also contain a single naval unit, 4) no longer have the AI place melee units into "slots" meant for ranged units, and 5) force fast-moving task forces (eg. Fast Pillagers) to only contain fast-moving units
- Minimum Personality score now set to 1 (from 0) to fix possible divide-by-zero situations in the DLL code leading to wonky AI behavior
- The AI can now send Great Generals with City-State attack squads
- The AI will now place ranged units with a range of 1 (ie. gatling guns, machine guns, and bazookas) into the front row of formations when necessary
- The AI will consider rushing items that take over 5 turns to build (from over 15 turns to build)
- The AI places an extra 15 priority on techs that unlock unique units/buildings/improvements (from extra 5 priority)
- The AI is a lot less schizophrenic when it comes to grand strategies: it will keep Grand Strategy directions active for at least 20 turns (from 10 turns), and during Grand Strategy rerolls, it will give each Grand Strategy a random extra priority up to +12 (from +50)
- Grand Strategy rerolls do not force the AI to switch to less desirable options: other players' grand strategies multiply a certain grand strategy's weight by up to 10 (from up to 50) during AI rerolls.
- Grand Strategy priority multipliers for Culture and Tourism ratios are now 50 and 100 respectively (from 75 each)
- Reroll weight modifiers for the Conquest Grand Strategy have been adjusted as follows: being at war gives +20 (from +10), nobody met gives -25 (from -50), and conquered civilizations give +50 each (from +15 each). To compensate for possible overaggression, power ratio for Conquest Grand Strategy weight is multiplied by 125 (from 100).
- Reroll weight modifier on the Conquest Grand Strategy for having met nobody now activates 40 turns in (from 20), but gives -100 (from -50)
- Early AI expansion baseline set to 6 cities (from 8).
- Plot value for strategic resources increased by +80 (from +50, the bonus is now double a luxury resource's plot value bonus)
- Fierce land dispute increases plot value by +8 (from +6)
- 250 Gold priority given to buying plots (from 275), but buying requirement is halved when treasury has contains over 500 gold (from 1000 gold)
- Diplomacy has 50 Gold base priority each (from 150) and Defensive buildings have 250 Gold base priority (from 400), while Upgrades have 200 Gold base priority (from 150)
- Worker plot evaluation is multiplied by 6/6/3/3/2 based on food, production, gold, science, and culture yields respectively (from 2/2/1/1/1)
- Military threat weights for Minor/Major/Severe/Critical are now 1/3/9/27 (from 1/3/6/10)
- Minimum units the AI desires to defend lands now increases by 1.5 per city (from 1.0 per city), allowing a unit to patrol between two cities to defend against barbarians
- City specializations are rerolled every 4 turns (from 50)
- City specialization reroll weight modifiers have been modified as follows: food specialization weights alter by -25 per number of cities (from -50), production weights alter by +1 for building the next wonder (from +0.2), science specialization weight alters by +40 for science flavor (from +20) and +40 for spaceship flavor (from +10)
- City categorization thresholds altered: medium is now 6 population (from 5), large is now 15 population (from 12)
- Negative gold income alters target gold yield per citizen by +0.5 (from +0)
- Automatic Citizen Management's yield type values for Production, Science, and Culture are now 9/8/7 respectively (from 12/7/15 in Brave New World, 8/6/8 in vanilla)
- AI's now recruit units within 6 tiles for City Attack operations (from 5 tiles), but only 3 tiles for Tactical Pillage operations (from 5 tiles). Up to 6 turns can be spent recruiting units for operations (from up to 5 turns), up to 12 turns in case of operations in enemy territory (from up to 10 turns)
- Forward Muster commands are considered at 25% danger or less (from 20% or less)
- When evaluating the AI tactical map, unit strength is multiplied by 20 (from 10); a zone is considered dominant at 40% ownership (from 25% ownership)
- Tactical move priority randomness range is now 3 (from 6); homeland tactical move priority randomness range is now 5 (from 10)
- Max turns to move for homeland defense is now 3 (from 4). This doesn't stop the AI from defending its homeland, but instead forces it to use units that don't have to travel as far.
- Diplomatic weights for Weak/Strong/Fierce land disputes are now 1/3/9 (from 1/3/5)
- Danger values for diplomatic approaches have been altered as follows: Deceptive is 0.4 (from 0.1), Hostile is 0.8 (from 0.2), Bully is 0.8 (from 0.9)
- When spreading religion, unowned plots are multiplied by 4 (from 3), owned plots are multiplied by 6 (from 5), and worked plots are multiplied by 6 (from 8)
- Missionaries will be sent to destinations up to 8 turns away (from 10 turns)
- Annexation thresholds set to 0.4 for normal (from 0.5) and 0.8 for aggressive (from 0.75)
- Ideology value based on Hostile/Guarded/Afraid/Friendly approaches to players already running the ideology is -20/-10/10/20 (from -8/-4/6/12)
- Ideology value based on Happiness set to 5 (from 3)
- Ideology value bonus for each free tenet set to 40 (from 36)
- Ideology value based on Grand Strategies set to 400 (from 300)
- Diplomatic Opinion modifier based on no/weak/strong/fierce land disputes set to -1/5/25/125 (from -6/10/20/30)
- Diplomatic Opinion modifier based on no/weak/strong/fierce victory disputes set to -1/5/25/125 (from -6/10/20/30)
- Diplomatic Opinion modifier based on no/weak/strong/fierce wonder disputes set to -1/5/10/20 (from 0/10/15/20)
- Diplomatic Opinion modifier based on no/weak/strong/fierce minor civ disputes set to -1/4/16/64 (from 0/10/20/30)
- Opinion Threshold to possibly declare war if current Grand Strategy is Conquest set to 10 (from 50)
- War evaluation if not prepared set to -150 (from -100)
- War evaluation for game threats none/minor/major/severe/critical set to 10/25/75/150/300 (from 0/20/50/100/150)
- War evaluation based on soft/favorable/average/bad/impossible target set to 200/100/-25/-150/-300 (from 100/50/-25/-100/-200)
- Thresholds for observations of aggressiveness levels low/medium/high/incredibly set to 5/15/25/35 (from 10/25/50/80)
- Military and Economic strength ratio multipliers for diplomatic/war evaluation set to 125 and 110 respectively (from 100 each)
- Barbarian "Capture City" tactical move's priority is now 11 (from 9, placing it above Blockade Resource, Attrition, and Move to Safety for barbarians)
- "Move to Safety" tactical move's priority is now 20 (from 11, placing it above Pillage Resource, Attrition, and Damage City)
- "Damage City" tactical move's priority is now 11 (from 15, making it possibly exchangeable with Heal and Low Priority Attrition once randomness factor is taken acount)
- "Heal" tactical move's priority is now 10 (from 8, placing it above Park on Trade Route and equal to Low Priority Attrition)
- "Low Priority Attrition" tactical move's priority is now 11 (from 12)
- "Barbarian Camp" tactical move's priority is now 13 (from 11)
- "Reposition" tactical move's priority is now 2 (from 1)
- Base war preference against City States when running a Conquest Grand Strategy is now 5 (from 8), but 20 when they're also neighbors (from 10)
- War preference against City States who are neighbors is now 2 (from 1)
- War preference against City States based on Impossible/Bad/Average/Favorable/Soft target is now 0/10/50/100/150 (from 10/20/40/110/130)
- "Area is full" threshold is now at 80% tile ownership (from 50%)
- 19 empty tiles are required for the early expansion strategy now (from 25 tiles)
- Units executing the following tactical moves can now be recruited into operations: Pillage, Safe Bombard, Bastion, Garrison, Guard Improvement
I haven't bothered porting my changes to older DLL versions, so the mod is BNW-only for now.