Dave_uk
Chieftain
Hi
In this thread you'll find mods I've been making to LoR to make the changes I felt were needed, and have decided to release these changes to the community in case anyone else is interested.
The main point of these changes was to make the game more interesting and challenging in the late game. Personally, I dislike the early game at the higher difficulties as it seems to unforgiving, but I get bored when winning too, so I created what I call dynamic difficulty which is the AI gradually getting more bonuses as you start to win. I have also tried to improve the AI as much as I am able, as ideally I would prefer to play a strong AI with no bonuses than a weak one with many bonuses.
The current version is 0.94 released 06/10/2016. I've left version 0.92 released on 15/04/2014 up as well, as that's been used for years with few issues whereas the new version may have some.
Here are the changes made since version 0.92:
AI
- Vassals more likely to research techs their master doesn't have
- Imported some K-Mod espionage changes
- CityAI changes
- more likely to build units in hero epic/military acedemy city, even if it's a top culture city (building culture building is still a higher priority)
- build more city attack units to finish off the last few cities in an area if AI owns most of it (vast majority of cities)
- some conditions added to decision to build defense buildings, AI is less likely to build walls and bunkers in every city
- changes to assualt AI
- less likely to build ships/drydocks in a city if other cities already have drydocks, an attempt to have the AI specialise
rather than build drydocks and then ships in every city when planning an assault (before drydocks are available, no effect)
- Added additional chance to build assault units as a last resort after other checks, but before choosing any building or process, similar to if we have a land war (but still a chance not to build)
- AI will increase it's estimate of enemy power if fighting a land war in their primary area and they are the weaker part of a team (enemy power is a team calculation but teammate might be on another landmass and be of little help)
- AI will build more defensive units when going for culture or victory, and losing a land war (doesn't need to be losing by as much as normal)
- improved governor AI for AI and humans with automated citizens
- Build more AA
- UnitAI
- taught AI about flanking
- value withdrawal promotions more for reserve AI units and weaker units
- better evaluation of hills attack/defense promotions
- better amphibious assaults, if plot isn't visible more realistic estimate of city defenders, should lead to more landing next to a city,
fewer suicide attacks
- Ships should stray further to bombard the enemy, if they don't fear a counter attack (slight cheat since we are summing enemy naval power in area)
- Added code to work with teammates or improved what little code was already there to do this
- Added code for smarter use of nukes
- When choosing techs, more priority for biology (more value on the +1 food for farms, still requires AI to have significant amount of farms to begin with)
- Added new function AI_GetWarDistrustVal - based on attitude from team previously declaring war on us or our friends. AI will be likely to launch a preemptive strike against such teams, and value peace with them less, when this value is high.
- Smarter evaluation of who to go to war with - many improvements to AI_StartWarVal
- less randomoness in the choice of when to go to war, more likely when there are good targets, revealing a new bonus we need but don't have can be a trigger for going to war to acquire it
- When calculating AIs attitude towards a team, vassals matter much less. Previously each vassal counted as much as master team, now if the team has 1 vassal, vassal attitude counts as half, and if they have two or more vassals the attitude towards all vassals combined counts only as much as the master.
- Takes into account annual trades when working out attitude value (e.g. bonuses sold cheaply)
- many more modern warfare improvements
- more likely to trade techs giving wonders if the wonder requires multiple techs the other team doesn't have and can't research
- smarter diplomacy for open borders, declaring war on an enemy, peace vassaling
- smarter worst enemy - ignores "initial impressions", focuses only on actual transgressions/trade etc.
- many (mostly untested) changes to ruthless AI - sorry needed to get this version up to fix bug!
Other
Espionage discounts for trade routes are increased for passive missions
- 20% is the standard
- +5% off if target city has harbour or +1% off for each population size above 10, whichever is greater
- +10% off if target city has mutual trade
- maximum of 40% off, double the original discount
Influence Driven War works differently when either side is barbarian, minor civ, or rebel
For rebel, barb, minor civ - takes culture from all who have influence over tile not just battle loser
When fighting rebel, barb, minor civ the culture taken is the average of the two (all remaining culture and that civs culture)
Era based research speed modifiers scale with map size (effect is less pronounced the smaller the map)
Air units do less damage when intercepting paratroopers, based on aircombat limit
Nukes poison city water supply when they impact it
Promoting a unit heals 1/3rd of damage, down from half
Dynamic difficulty can now help human in a few circumstances:
- AI costs can be increased up for wonder enabling techs if human isn't winning, up to a max of the human tech cost (i.e. no effect is human is winning ir difficulty is noble or less, designed to give player a peaceful way up the ladder by sometimes being able to win wonder races (or at least join the race!)
Inflation is reduced for human and AI based on rank (-1% per rank, so more noticable in the early game, only when dynamic difficulty is on)
increased global warming modifiers for larger cities (>10), coal power plants count double towards global warming (it's still quite rare though)
support costs for later units increased (based on their cost to build, can be fractional, shown as extra support cost)
interception stack code now only includes units in the same domain as the head interceptor
war weariness does not decrease when troops are deployed - no decay when paying supply costs
for teams of two, war weariness is decreased by 1/3rd
Toned down big_civ_slow_tech, but allowed number of cities maintanence costs to rise when civ is very large (up to double)
The limited religion code to found religions when starting in later eras didn't seem to work, replaced it with a new function so that if starting after the ancient era religions are founded at most one at a time after the game starts
Two new optional features (see below)
Perfect World Map Script
Poles are colder and drier
Rainfall changes
- Added code to redistribute and smooth rainfall, to stop harsh bands appearing from geostrophic rain
- Rain moves even further inland
- Areas adjacent to peaks and downhill from tundra are wetter
- overall effect is that land is more balanced while still looking more natural and less random than built in maps. Grassland and plains are mixed in while still allowing for some "great plains" (reduce PlainsPercent if this is too much for you). Deserts are less predicatbly in the center of continents, rain shadows from mountains and lattitude matters more
Changed starting plot valuation to value rivers higher, and actively avoid deserts (without floodplain or oasis) and ice
I've made a lot of changes to the AI in this version, so I'd be interested to hear if it's made it any more challenging. I still think it needs to be made more ruthless, but those changes would probably be best made by improving the "Ruthless AI" option so the standard AI can be left closer to the BTS experience. Other changes to note are that the BIG_CIV_SLOW_TECH has been toned down, but that number of cities maintenance can now rise up to double the amount specified in the handicap file for very large civs. Dynamic difficulty has also been tweaked, are there are two new optional settins (see below)
Here are the changes made in version 0.92:
Improved AI tech selection:
- Will aim for techs to enable cities to use resources nearby
- Will aim try harder to win the liberalism race if it knows there is competition
- Will value alphabet based on how many civs it has met but can't already trade techs with
- Will value techs providing the ability to build wealth and research more when not at war
- Will value writing more under start as minors to negotiate, even when other civs it has met haven't (be more preemptive)
AI will build more workers after having already built up an army, and will build more city hunting stacks when using when it's only met barbs and minor civs (useful for start as minors but previously blocked because the AI was not considered at war)
Made dynamic difficulty kick in little earlier for difficulties above noble, except for unit cost discounts which now kick in less at the higher difficulties. Also limited human costs to equivalent of +3 difficulty levels to be consistent with AI bonuses
Ive re-written Dynamic Religion again. It's now closer to the original LoR code, but compared to the original the first 5 founded religions do spread faster. This code also tries to deal with advanced starts when starting in the classical era, ancient era religions should spread faster. If you start in the medieval era, youd still be better turning dynamic religions off.
I've also included my changes to the perfect world map script in this version, perfectworld2cd which is based on perfectworld2f. Compared to the original the overall map is slightly smaller, but with a lower sea level and more smaller continents and less chance of one or two big ones. I've also changed the rainfall and temperature code slightly to give the map a slightly more wet, tropical feel. Finally, I've added some code to mix in grassland and plains more, since it's difficult to grow a city when is surrounded completely by plains.
Here are the changes made in version 0.91:
Toned down big civ slow tech slightly
Removed 2 undocumented features I had forgotten about and no longer like
- ability to vote yourself to a diplomatic victory
- a soft limit to the amount another teams espionage can let them defend against your passive espionage effects
AI City Build Priority Changes
- Civs will build a few more buildings instead of units when start as minors is enabled, or when their best unit isn't that good, rather than spamming low value units.
- Changes from K-Mod to make AI compare the value of processes (wealth, research etc.) to the best available building to build rather than only running these processes as a last resort.
Fixed bug reported by lfgr where the game sometimes crashes during AIAutoplay or when starting a scenario due to there being no human player for dynamic difficulty to work from.
Here are the main features of this Mod:
AI Improvements
I've made many changes to the AI in LoR to improve it, most changes are taken from Karadoc's K-Mod, but I've made some of my own as well. This is not a full merge of K-Mod and LoR, I didn't have time to do everything so I've only merged the parts I deemed to be the most important.
The AI should make better choices when going for technology based on it's situation, manage it's cities and workers better, and manage it's economy better in general. It will also be smarter when choosing civics (including code I have added to make it take more consideration of revolution effects). It should build more attack units when winning a war, and generally attack/defend and switch between attack and defense better.
The AI will also build more AA units when it might need them, but not spam them for no reason, and is more likely to give it's AA units the intercept promotion.
The AI will also become more ruthless when you are winning, even if ruthless AI is not turned on (many aspects of Ruthless AI make sense in all situations, not just when you want the AI to be ruthless)
When it comes to diplomacy, the AI should be willing to trade technologies for cash more in the late game. They will also trade technologies more when they are behind in technology, to allow them to catch up quicker. The AI can now be bribed up to +5 relations (the "Fair and Forthright" bonus), but it will take more to get it to +4 or +5.
I've made major changes to the acceptance criteria of alliances, if you play the game with permanent alliances turned on. You no longer need to have shared a war or defensive pact with an AI for a long time in order for them to accept an alliance. They will now usually accept if you meet the relationship criteria (usually friendly) and your empires are similar powers and sizes. For AI to AI alliances, they need a slightly lower relationship, +8 instead of +10. This is to make up for the fact AIs never bribe other AIs to be friendly. They will also no longer rely on a random number generator to decide when to make alliances, they will make them as soon as the criteria are met. All in all, these changes mean that the late game tends to end up with most civs forming alliances and becoming more powerful. If you decide to go it alone, or are unable to find an alliance partner, this can make the game more challenging and leader to larger "world war" type scenarios.
Other changes
Dales combat mod
I've made various changes to the Dales Combat Mod elements to make them feel more balanced and less "cheaty". Unfortunately, I haven't had much success teaching the AI to use DCM features, so I've made them less powerful instead. This will of course only affect you if you use these elements anyway. Click show to see details...
Changes to LoR/Revolutions Features
Changes to other features added in LoR, click show to see details...
(Anti) Aircraft Changes
AA is deadlier, put planes are deadlier to ships, click show to see details...
Other changes
I've Added killmeplease's defender withdrawal mod - defenders with a withdrawal chance can withdraw to another plot or if in a stack, withdraw and let the next best defender continue the battle as a defender. This makes attacking more risky and interesting. I've made one change from the original, is that only one withdrawal can occur per battle, rather than up to 3 times.
Other changes include barracks being cheaper in early game, and conquered cities more useful, click show to see details...
Optional/configurable elements
Dynamic Difficulty
As you start to win, you will find your costs will increase and the AI will gain more discounts (usually up to an extra 15%, depending on type of bonus, the equivalent of going up 3 difficulty levels).
Unlike the flexible difficulty mod, the AI bonuses and human handicaps will increase gradually 1% at a time, and the types of bonuses the AI gets vary depending on the situation. For example, of the human is powerful, the AI will get cheaper troops and lower troop upkeep costs. If the human is more advanced, the AI will get lower civic upkeep costs (so it can spend more on research) and cheaper projects (to build the internet or try to compete in the space race). Most other AI bonuses depend on the human score.
The bonuses increase gradually, and you don't need to be winning overall for the AI to get a bonus, if you are above average power or near the top of the leader board expect the AI to get a small boost compared to your standard difficulty. The aim is to keep the game challenging the whole time, with an overall cap on the bonuses the AI can get so you can actually win eventually.
This can be disabled by setting DYNAMIC_DIFFICULTY to zero in the included GlobalDefinesAlt XML file.
Tech cost increases in the late game for the human player only
Dynamic Difficulty does not affect the costs for human players to research, I couldn't find a satisfactory way for research costs to fluctuate. Instead, research costs will increase for the human but not the AI from the Renaissance era onwards, ending up costing 20% more for the human player by the end of the modern era. This is in addition to the extra tech costs for humans based on the difficulty you are playing.
This can be configured in the included GlobalDefinesAlt XML file, by setting the LATE_GAME_HUMAN_TECH_COST_INCREASE property, including setting it to zero to turn this feature off. (if the game starts in the Renaissance era or later, this change will not take effect until the player enters the next era)
More expensive units in the late game for all players
When any player enters the renaissance era and for each era onwards, the cost of all units for all players will increase by 5% per era. This is not to increase the difficulty or give an advantage to any particular civ, it is merely a scaling change because I find excessively large unit stacks in the late game to be tedious. This also affects the costs to upgrade units. If the game does not start in the ancient era, units will start getting more expensive from 3 eras after the start era instead.
This can be configured in the included GlobalDefinesAlt XML file, by setting the LATE_GAME_UNIT_COST_INCREASE property which is the per era costs increase for units, and can be set to zero to turn this feature off. Note, the cost increases are additive rather than multiplicative, so if you are on epic game speed unit costs will go from 150% to 155% compared to normal speed, rather than from 150 to 157. This is because I prefer round numbers
Bigger civilizations research techs slower
When a civilization reaches a certain size (the total percent of land it takes up is more than 100 divided by the default number of players for your map size), it will start to research techs slower. This effect increases as the civilization grows. This is meant to be like the number of cities maintenance but for research rather than gold. It should not have so great an effect that capturing extra cities is actually detrimental to your overall research since these cities will be adding research of their own that should be more than enough to counteract the effect, but it does mean that larger civs will now not be guaranteed to be the tech leaders, and decreases the runaway effect where civs quite quickly become too big and advanced to be stopped. Now big powerful civs may still have to trade techs, or bully smaller but more advanced civs, or use espionage to steal what they want.
This can be disabled by setting BIG_CIV_SLOW_TECH to zero in the included GlobalDefinesAlt XML file.
Progress Based Inflation
Inflation now differs per civilization, and is partially (or completely, depending on how you configure it) based on how advanced the civilization is. Inflation will start to kick in around the medieval period, and max out at 100% towards the end of the modern period. Military techs, and "gold" techs (those that have gold flavors, like banking etc.) increase inflation more. Production and science techs do not increase inflation. This can help civilizations that are behind to catch up, but can also help in situations where the whole world is locked in war from the beginning, and you end up with high inflation despite no civilization having actually gotten that advanced.
This can be configured by changing PROGRESS_BASED_INFLATION in the included GlobalDefinesAlt XML file, and comes in 3 flavors. Set it to zero to turn this feature off, and use the old inflation calculation based on the number of turns elapsed. Set it to 1 for inflation to mainly be based on the number of turns elapsed, but also partly on how advanced the civilization is. Set it to 2 for inflation to mainly be based on how advanced the civilization is, but also be affected by how many turns have elapsed. Set it to 3 for inflation to be entirely determined on how advanced the civilization is, with the number of turns elapsed being ignored.
Sometimes quick combat
I've changed quick combat so it will always be applied when a human controlled attacker is over twice the strength of the defender, i.e. battles you are almost certain to win aren't animated, but other are. This only applies of you have quick combat turned off to begin with, otherwise combat is always quick.
This can be disabled by setting SOMETIMES_QUICK_COMBAT to zero in the included GlobalDefinesAlt XML file.
Easy Trade Network
With this option on, all of your cities and the cities of civs you have open borders with are connected to each other by default, providing:
- You have researched roads and
- you are not blocked by jungle (they only tile that still needs roads to be able to trade through)
You must still build roads under resources for them to count as connected, but you do not actually have to connect them with anything
This can be disabled by setting EASY_TRADE_NETWORK to zero in the included GlobalDefinesAlt XML file.
Quick Start
This option is intended to make the start of the game go more quickly, without going as far as starting in a later era. So far all it does if give two free techs at the start of the game, one which has one or both of your civs normal starting techs as a prerequisite, and one which has no prerequisite.
This can be disabled by setting QUICK_START to zero in the included GlobalDefinesAlt XML file.
So that's it, download and enjoy and let me know what you think! There are two attachments below, LoR ModMod v0.94.zip contains the compiled DLL and the XML configuration file you will need, and LoR ModMod Source.zip is the C++ source code for anyone who's interested.
In this thread you'll find mods I've been making to LoR to make the changes I felt were needed, and have decided to release these changes to the community in case anyone else is interested.
The main point of these changes was to make the game more interesting and challenging in the late game. Personally, I dislike the early game at the higher difficulties as it seems to unforgiving, but I get bored when winning too, so I created what I call dynamic difficulty which is the AI gradually getting more bonuses as you start to win. I have also tried to improve the AI as much as I am able, as ideally I would prefer to play a strong AI with no bonuses than a weak one with many bonuses.
The current version is 0.94 released 06/10/2016. I've left version 0.92 released on 15/04/2014 up as well, as that's been used for years with few issues whereas the new version may have some.
Here are the changes made since version 0.92:
Spoiler :
AI
- Vassals more likely to research techs their master doesn't have
- Imported some K-Mod espionage changes
- CityAI changes
- more likely to build units in hero epic/military acedemy city, even if it's a top culture city (building culture building is still a higher priority)
- build more city attack units to finish off the last few cities in an area if AI owns most of it (vast majority of cities)
- some conditions added to decision to build defense buildings, AI is less likely to build walls and bunkers in every city
- changes to assualt AI
- less likely to build ships/drydocks in a city if other cities already have drydocks, an attempt to have the AI specialise
rather than build drydocks and then ships in every city when planning an assault (before drydocks are available, no effect)
- Added additional chance to build assault units as a last resort after other checks, but before choosing any building or process, similar to if we have a land war (but still a chance not to build)
- AI will increase it's estimate of enemy power if fighting a land war in their primary area and they are the weaker part of a team (enemy power is a team calculation but teammate might be on another landmass and be of little help)
- AI will build more defensive units when going for culture or victory, and losing a land war (doesn't need to be losing by as much as normal)
- improved governor AI for AI and humans with automated citizens
- Build more AA
- UnitAI
- taught AI about flanking
- value withdrawal promotions more for reserve AI units and weaker units
- better evaluation of hills attack/defense promotions
- better amphibious assaults, if plot isn't visible more realistic estimate of city defenders, should lead to more landing next to a city,
fewer suicide attacks
- Ships should stray further to bombard the enemy, if they don't fear a counter attack (slight cheat since we are summing enemy naval power in area)
- Added code to work with teammates or improved what little code was already there to do this
- Added code for smarter use of nukes
- When choosing techs, more priority for biology (more value on the +1 food for farms, still requires AI to have significant amount of farms to begin with)
- Added new function AI_GetWarDistrustVal - based on attitude from team previously declaring war on us or our friends. AI will be likely to launch a preemptive strike against such teams, and value peace with them less, when this value is high.
- Smarter evaluation of who to go to war with - many improvements to AI_StartWarVal
- less randomoness in the choice of when to go to war, more likely when there are good targets, revealing a new bonus we need but don't have can be a trigger for going to war to acquire it
- When calculating AIs attitude towards a team, vassals matter much less. Previously each vassal counted as much as master team, now if the team has 1 vassal, vassal attitude counts as half, and if they have two or more vassals the attitude towards all vassals combined counts only as much as the master.
- Takes into account annual trades when working out attitude value (e.g. bonuses sold cheaply)
- many more modern warfare improvements
- more likely to trade techs giving wonders if the wonder requires multiple techs the other team doesn't have and can't research
- smarter diplomacy for open borders, declaring war on an enemy, peace vassaling
- smarter worst enemy - ignores "initial impressions", focuses only on actual transgressions/trade etc.
- many (mostly untested) changes to ruthless AI - sorry needed to get this version up to fix bug!
Other
Espionage discounts for trade routes are increased for passive missions
- 20% is the standard
- +5% off if target city has harbour or +1% off for each population size above 10, whichever is greater
- +10% off if target city has mutual trade
- maximum of 40% off, double the original discount
Influence Driven War works differently when either side is barbarian, minor civ, or rebel
For rebel, barb, minor civ - takes culture from all who have influence over tile not just battle loser
When fighting rebel, barb, minor civ the culture taken is the average of the two (all remaining culture and that civs culture)
Era based research speed modifiers scale with map size (effect is less pronounced the smaller the map)
Air units do less damage when intercepting paratroopers, based on aircombat limit
Nukes poison city water supply when they impact it
Promoting a unit heals 1/3rd of damage, down from half
Dynamic difficulty can now help human in a few circumstances:
- AI costs can be increased up for wonder enabling techs if human isn't winning, up to a max of the human tech cost (i.e. no effect is human is winning ir difficulty is noble or less, designed to give player a peaceful way up the ladder by sometimes being able to win wonder races (or at least join the race!)
Inflation is reduced for human and AI based on rank (-1% per rank, so more noticable in the early game, only when dynamic difficulty is on)
increased global warming modifiers for larger cities (>10), coal power plants count double towards global warming (it's still quite rare though)
support costs for later units increased (based on their cost to build, can be fractional, shown as extra support cost)
interception stack code now only includes units in the same domain as the head interceptor
war weariness does not decrease when troops are deployed - no decay when paying supply costs
for teams of two, war weariness is decreased by 1/3rd
Toned down big_civ_slow_tech, but allowed number of cities maintanence costs to rise when civ is very large (up to double)
The limited religion code to found religions when starting in later eras didn't seem to work, replaced it with a new function so that if starting after the ancient era religions are founded at most one at a time after the game starts
Two new optional features (see below)
Perfect World Map Script
Poles are colder and drier
Rainfall changes
- Added code to redistribute and smooth rainfall, to stop harsh bands appearing from geostrophic rain
- Rain moves even further inland
- Areas adjacent to peaks and downhill from tundra are wetter
- overall effect is that land is more balanced while still looking more natural and less random than built in maps. Grassland and plains are mixed in while still allowing for some "great plains" (reduce PlainsPercent if this is too much for you). Deserts are less predicatbly in the center of continents, rain shadows from mountains and lattitude matters more
Changed starting plot valuation to value rivers higher, and actively avoid deserts (without floodplain or oasis) and ice
I've made a lot of changes to the AI in this version, so I'd be interested to hear if it's made it any more challenging. I still think it needs to be made more ruthless, but those changes would probably be best made by improving the "Ruthless AI" option so the standard AI can be left closer to the BTS experience. Other changes to note are that the BIG_CIV_SLOW_TECH has been toned down, but that number of cities maintenance can now rise up to double the amount specified in the handicap file for very large civs. Dynamic difficulty has also been tweaked, are there are two new optional settins (see below)
Here are the changes made in version 0.92:
Spoiler :
Improved AI tech selection:
- Will aim for techs to enable cities to use resources nearby
- Will aim try harder to win the liberalism race if it knows there is competition
- Will value alphabet based on how many civs it has met but can't already trade techs with
- Will value techs providing the ability to build wealth and research more when not at war
- Will value writing more under start as minors to negotiate, even when other civs it has met haven't (be more preemptive)
AI will build more workers after having already built up an army, and will build more city hunting stacks when using when it's only met barbs and minor civs (useful for start as minors but previously blocked because the AI was not considered at war)
Made dynamic difficulty kick in little earlier for difficulties above noble, except for unit cost discounts which now kick in less at the higher difficulties. Also limited human costs to equivalent of +3 difficulty levels to be consistent with AI bonuses
Ive re-written Dynamic Religion again. It's now closer to the original LoR code, but compared to the original the first 5 founded religions do spread faster. This code also tries to deal with advanced starts when starting in the classical era, ancient era religions should spread faster. If you start in the medieval era, youd still be better turning dynamic religions off.
I've also included my changes to the perfect world map script in this version, perfectworld2cd which is based on perfectworld2f. Compared to the original the overall map is slightly smaller, but with a lower sea level and more smaller continents and less chance of one or two big ones. I've also changed the rainfall and temperature code slightly to give the map a slightly more wet, tropical feel. Finally, I've added some code to mix in grassland and plains more, since it's difficult to grow a city when is surrounded completely by plains.
Here are the changes made in version 0.91:
Spoiler :
Toned down big civ slow tech slightly
Removed 2 undocumented features I had forgotten about and no longer like
- ability to vote yourself to a diplomatic victory
- a soft limit to the amount another teams espionage can let them defend against your passive espionage effects
AI City Build Priority Changes
- Civs will build a few more buildings instead of units when start as minors is enabled, or when their best unit isn't that good, rather than spamming low value units.
- Changes from K-Mod to make AI compare the value of processes (wealth, research etc.) to the best available building to build rather than only running these processes as a last resort.
Fixed bug reported by lfgr where the game sometimes crashes during AIAutoplay or when starting a scenario due to there being no human player for dynamic difficulty to work from.
Here are the main features of this Mod:
AI Improvements
I've made many changes to the AI in LoR to improve it, most changes are taken from Karadoc's K-Mod, but I've made some of my own as well. This is not a full merge of K-Mod and LoR, I didn't have time to do everything so I've only merged the parts I deemed to be the most important.
The AI should make better choices when going for technology based on it's situation, manage it's cities and workers better, and manage it's economy better in general. It will also be smarter when choosing civics (including code I have added to make it take more consideration of revolution effects). It should build more attack units when winning a war, and generally attack/defend and switch between attack and defense better.
The AI will also build more AA units when it might need them, but not spam them for no reason, and is more likely to give it's AA units the intercept promotion.
The AI will also become more ruthless when you are winning, even if ruthless AI is not turned on (many aspects of Ruthless AI make sense in all situations, not just when you want the AI to be ruthless)
When it comes to diplomacy, the AI should be willing to trade technologies for cash more in the late game. They will also trade technologies more when they are behind in technology, to allow them to catch up quicker. The AI can now be bribed up to +5 relations (the "Fair and Forthright" bonus), but it will take more to get it to +4 or +5.
I've made major changes to the acceptance criteria of alliances, if you play the game with permanent alliances turned on. You no longer need to have shared a war or defensive pact with an AI for a long time in order for them to accept an alliance. They will now usually accept if you meet the relationship criteria (usually friendly) and your empires are similar powers and sizes. For AI to AI alliances, they need a slightly lower relationship, +8 instead of +10. This is to make up for the fact AIs never bribe other AIs to be friendly. They will also no longer rely on a random number generator to decide when to make alliances, they will make them as soon as the criteria are met. All in all, these changes mean that the late game tends to end up with most civs forming alliances and becoming more powerful. If you decide to go it alone, or are unable to find an alliance partner, this can make the game more challenging and leader to larger "world war" type scenarios.
Other changes
Dales combat mod
I've made various changes to the Dales Combat Mod elements to make them feel more balanced and less "cheaty". Unfortunately, I haven't had much success teaching the AI to use DCM features, so I've made them less powerful instead. This will of course only affect you if you use these elements anyway. Click show to see details...
Spoiler :
- You can only attack ships in ports or engage fighters in tiles you can actually see
- When attacking a ship in port, the chances of it sinking are based on how much damage it has sustained, rather than a flat 50% chance
- The fighter engage mission can only be carried out against enemy fighters that are running the intercept mission. It is now an air superiority feature, but you can't destroy a fleet of bombers in an enemy city, that is unbalanced, to destroy enemy bombers you will have to put your fighters on intercept and wait for them to come to you.
- Ranged bombardment once again does damage to the head unit of a stack as well as doing collateral damage to additional units. The damage done is still of the collateral type, so the maximum damage that can be inflicted is based on the collateral damage limit of the attacking unit, and collateral damage imunities and protections still apply. To differentiate the damage done to the head unit, the bombard rate of the attacking unit is used as a multiplier, units with a bombard rate of more than 20 will do more damage to the head unit than to other units, units with a bombard rate of less than 20 will do less damage to the head unit.
- Units can only ranged bombard if they have not moved that turn. This was mainly to make coastal assaults less powerful so that ships could not move in and damage units on the turn war was declared, but makes sense for ground units as well.
- Active defense can now only happen once per turn, and is not guaranteed to happen but there's a chance based on the planes intercept chance. It can only target units in friendly and neutral plots (since it's active defense not active attack)
Changes to LoR/Revolutions Features
Changes to other features added in LoR, click show to see details...
Spoiler :
- When upgrading a unit to one of a different combat types, rather than simply doubling price, the prices varies based on relative combat values of the old and new unit. This works out slightly cheaper in most cases.
- Toned down the effect of dynamic religions slightly, the first 5 religions spread more and the last 2 spread less. I found that with dynamic religions on, you would want to actively avoid founding early religions as they would be guaranteed to to spread automatically, whereas later religions spread all over the world super fast. Now it is more balanced
- If a unit upgrades to another unit that requires a "non-core" building, the old unit is still build able in the city. Non core buildings are ones that would not be provided for free if you started the game in the future era. For example, cities with universities can now build paratroopers as well as special forces, rather than just special forces.
- Minor civs receive extra tech diffusion (same as barbarians) for techs older than the current average era, to help them to be at least as advanced as barbarians.
- If a unit is made obsolete but another unit it can be upgraded to can be built in a city, production is switched rather than lost.
- Toned down sliding scale of Lead from Behind, made it so adjusted odds cannot be less than 10% of original odds, fixed bug where inflated odds had side effect of causing collateral damage units to always be chosen first as attackers.
- Slightly more barbarian naval units can be spawned in the early game. BBAI restricted it until players had navies of their own, now a few barbarian naval units can be spawned but less than under default BTS
- For the barbarian world option, barbarian cities can be founded on otherwise empty islands, and cities take longer before they can settle down to minor civs
- For influence driven war, the owner of a city gets a 20% bonuses when gaining culture in the city tile. This gives defenders and advantage when killing attackers, but also makes it more useful to kill rebels/the original owner of a city near the city tile as it will increase your culture more and help keep the population in line.
- The included GlobalDefinesAlt xml file includes some configuration changes I have made to influence driven war. I have set IDW_NO_CITY_DEFENDER_MULTIPLIER to 2.5, and IDW_CITY_TILE_MULTIPLIER to 0.15. This will increase combat influence on cities by 50% plus an extra 150% when the last city defender dies. (IDW defaults were 2.5 and 1.0, LoR defaults are 1.0 and 0.1). Emergency draft is now turned on, but only for cities size 20 or bigger, and drafted units are at 80% health. In this version, IDW_CITY_TILE_MULTIPLIER is not ignored when emergency draft is turned on like it is by default in influence driven war
(Anti) Aircraft Changes
AA is deadlier, put planes are deadlier to ships, click show to see details...
Spoiler :
- Added Afforess' AA Stack code, so the more anti aircraft units that are on a tile, the greater their chances are to intercept an air unit (in version 0.93 only units of the same domain i.e. land and land or sea and sea can stack)
- AA units now do slightly more damage when intercepting units based on the relative strengths of the units. This is most noticeable when attacking with weaker units like the seaplane
- AA units have a small chance to have more rounds of combat when intercepting air units (was 5, now up to 9). What this means is that there is a slightly higher chance for air units to be shot down rather than just damaged, and units with an intercept chance of less than 40% can now sometimes shoot down planes.
- When air units attack ships, they can do 10% more damage than they could to land units. This means jet fighters and strike fighters can now sink ships. There is a small chance the ship will survive with just 1 hit point instead though.
Other changes
I've Added killmeplease's defender withdrawal mod - defenders with a withdrawal chance can withdraw to another plot or if in a stack, withdraw and let the next best defender continue the battle as a defender. This makes attacking more risky and interesting. I've made one change from the original, is that only one withdrawal can occur per battle, rather than up to 3 times.
Other changes include barracks being cheaper in early game, and conquered cities more useful, click show to see details...
Spoiler :
- More buildings are kept when capturing cities in later eras. This is based on whether the building would be free if you started in the era you are currently in. For example, if you started a game in the medieval era, each city would gain a free granary. Now if you capture a city in the medieval era or later, granaries are guaranteed not to be destroyed. This makes captured cities more useful as you don't have to build so many buildings again
- Cities can now control adjacent tiles even when they don't have the most culture in those tiles. Cities now always control adjacent coast tiles. And they will control adjacent land tiles unless another civilization has 3-4 times as much culture in them. This means cities acquired in the late game with little culture at least be able to work most of their adjacent plots.
- The cost of barracks (any buildings that grants domain free experience to land units) scales based on the best available conscript unit, so it will be cheaper in the early game and more expensive in the late game.
- Spies can be used for spying: when you keep a spy on a city tile, the cost of the investigate city passive espionage mission gets the same discount as spy missions. So if you keep a spy there for 5 turns the cost is halved and in many cases this is enough to allow you to investigate the city when you otherwise wouldn't be able to
- Changed damage done by flanking to be related to the flanking "victims" strength, rather than the original defenders strength, so in most cases flanking does more damage
- Require complete kills only requires all combat units and settlers to be killed, not all units (spies and workers aren't counted).
- You can trade cities with your vassals, as long as they are not under occupation (the vassal may still refuse to accept the city).
- You can liberate cities to players no cities, if they have at least 25% culture in them (only relevant with require complete kills on).
Optional/configurable elements
Dynamic Difficulty
As you start to win, you will find your costs will increase and the AI will gain more discounts (usually up to an extra 15%, depending on type of bonus, the equivalent of going up 3 difficulty levels).
Unlike the flexible difficulty mod, the AI bonuses and human handicaps will increase gradually 1% at a time, and the types of bonuses the AI gets vary depending on the situation. For example, of the human is powerful, the AI will get cheaper troops and lower troop upkeep costs. If the human is more advanced, the AI will get lower civic upkeep costs (so it can spend more on research) and cheaper projects (to build the internet or try to compete in the space race). Most other AI bonuses depend on the human score.
The bonuses increase gradually, and you don't need to be winning overall for the AI to get a bonus, if you are above average power or near the top of the leader board expect the AI to get a small boost compared to your standard difficulty. The aim is to keep the game challenging the whole time, with an overall cap on the bonuses the AI can get so you can actually win eventually.
This can be disabled by setting DYNAMIC_DIFFICULTY to zero in the included GlobalDefinesAlt XML file.
Tech cost increases in the late game for the human player only
Dynamic Difficulty does not affect the costs for human players to research, I couldn't find a satisfactory way for research costs to fluctuate. Instead, research costs will increase for the human but not the AI from the Renaissance era onwards, ending up costing 20% more for the human player by the end of the modern era. This is in addition to the extra tech costs for humans based on the difficulty you are playing.
This can be configured in the included GlobalDefinesAlt XML file, by setting the LATE_GAME_HUMAN_TECH_COST_INCREASE property, including setting it to zero to turn this feature off. (if the game starts in the Renaissance era or later, this change will not take effect until the player enters the next era)
More expensive units in the late game for all players
When any player enters the renaissance era and for each era onwards, the cost of all units for all players will increase by 5% per era. This is not to increase the difficulty or give an advantage to any particular civ, it is merely a scaling change because I find excessively large unit stacks in the late game to be tedious. This also affects the costs to upgrade units. If the game does not start in the ancient era, units will start getting more expensive from 3 eras after the start era instead.
This can be configured in the included GlobalDefinesAlt XML file, by setting the LATE_GAME_UNIT_COST_INCREASE property which is the per era costs increase for units, and can be set to zero to turn this feature off. Note, the cost increases are additive rather than multiplicative, so if you are on epic game speed unit costs will go from 150% to 155% compared to normal speed, rather than from 150 to 157. This is because I prefer round numbers
Bigger civilizations research techs slower
When a civilization reaches a certain size (the total percent of land it takes up is more than 100 divided by the default number of players for your map size), it will start to research techs slower. This effect increases as the civilization grows. This is meant to be like the number of cities maintenance but for research rather than gold. It should not have so great an effect that capturing extra cities is actually detrimental to your overall research since these cities will be adding research of their own that should be more than enough to counteract the effect, but it does mean that larger civs will now not be guaranteed to be the tech leaders, and decreases the runaway effect where civs quite quickly become too big and advanced to be stopped. Now big powerful civs may still have to trade techs, or bully smaller but more advanced civs, or use espionage to steal what they want.
This can be disabled by setting BIG_CIV_SLOW_TECH to zero in the included GlobalDefinesAlt XML file.
Progress Based Inflation
Inflation now differs per civilization, and is partially (or completely, depending on how you configure it) based on how advanced the civilization is. Inflation will start to kick in around the medieval period, and max out at 100% towards the end of the modern period. Military techs, and "gold" techs (those that have gold flavors, like banking etc.) increase inflation more. Production and science techs do not increase inflation. This can help civilizations that are behind to catch up, but can also help in situations where the whole world is locked in war from the beginning, and you end up with high inflation despite no civilization having actually gotten that advanced.
This can be configured by changing PROGRESS_BASED_INFLATION in the included GlobalDefinesAlt XML file, and comes in 3 flavors. Set it to zero to turn this feature off, and use the old inflation calculation based on the number of turns elapsed. Set it to 1 for inflation to mainly be based on the number of turns elapsed, but also partly on how advanced the civilization is. Set it to 2 for inflation to mainly be based on how advanced the civilization is, but also be affected by how many turns have elapsed. Set it to 3 for inflation to be entirely determined on how advanced the civilization is, with the number of turns elapsed being ignored.
Sometimes quick combat
I've changed quick combat so it will always be applied when a human controlled attacker is over twice the strength of the defender, i.e. battles you are almost certain to win aren't animated, but other are. This only applies of you have quick combat turned off to begin with, otherwise combat is always quick.
This can be disabled by setting SOMETIMES_QUICK_COMBAT to zero in the included GlobalDefinesAlt XML file.
Easy Trade Network
With this option on, all of your cities and the cities of civs you have open borders with are connected to each other by default, providing:
- You have researched roads and
- you are not blocked by jungle (they only tile that still needs roads to be able to trade through)
You must still build roads under resources for them to count as connected, but you do not actually have to connect them with anything
This can be disabled by setting EASY_TRADE_NETWORK to zero in the included GlobalDefinesAlt XML file.
Quick Start
This option is intended to make the start of the game go more quickly, without going as far as starting in a later era. So far all it does if give two free techs at the start of the game, one which has one or both of your civs normal starting techs as a prerequisite, and one which has no prerequisite.
This can be disabled by setting QUICK_START to zero in the included GlobalDefinesAlt XML file.
So that's it, download and enjoy and let me know what you think! There are two attachments below, LoR ModMod v0.94.zip contains the compiled DLL and the XML configuration file you will need, and LoR ModMod Source.zip is the C++ source code for anyone who's interested.
Attachments
Last edited: