Alternative Difficulty Settings

Milae

Prince
Joined
Dec 17, 2019
Messages
410
I've made some posts in the past with my thoughts on AI bonuses such as this:
https://forums.civfanatics.com/threads/my-idea-for-difficulty-scaling.662051/
But basically my main idea is to give the AIs cost reduction instead of bonus yields

Obviously it's quite hard to discuss changes when you can't actually try them so I decided to just make my own changes so here they are:
https://mega.nz/folder/400gDCRK#yQSod3hgoVYGaBSN7EoA7A

Just extract the files and replace the top two folders of VP with the ones in the zipped folder. I'm guessing it will only work if you have 12-1 VP already. You will need to get rid of the old folders or move them out because Civ does not like it when you have two mods with the same name in MODS folder.

Current Settings on Deity (v3):
- A/B/C now changed to a trigger every ten turns, mostly giving money and then 1/10th Science and Culture. Starts of at 50 and increases with era (also increases at classical).
- 53% AI production and gold costs for units and buildings (including civilians) (no discount for their first settler built)
- 81% AI costs for Policies, Techs, City Growth and Golden Ages. (All controlled by AIGrowthPercent in DifficultyMod.xml)
- 81% AI cost for Great Prophets, also controlled by AIGrowthPercent in DifficultyMod.xml. Might be controversial but AIs don't seem to focus religion much so it's still not too difficult to get one.
0% era scaling. (Used to be 10%).

Other difficulties are the same but just smaller reductions so immortal has 58% and 83% instead, and you can change the amounts pretty easily in xml if necessary.

Probably slightly harder than current patch. Haven't been able to do much testing of lategame though and I'm not sure how the lower difficulties compare. But honestly I'm very happy with how the games feel.

Anyways let me know your thoughts guys, hope you enjoy.

EDIT- Proper MOD now: https://forums.civfanatics.com/threads/alternative-difficulty-mod.668184/
 
Last edited:
As a not very good player, can I just mention my observations after viewing many people playing on high levels like Deity over the years, though not the current version.

Whe the game first came out in vanilla, the object of deity games seemed to be to win you had to learn to not being able to get wonders & being behind constantly in units & tech, whilst the AI is given help to also being ahead. To much hassle even if I could micro manage my game & were any good.

Since VP came around the developers have tried to change this by stopping giving AI direct help & on high levels make them gain advantages over the game. The problem with this approach as I have seen all the time, is the player manages to be massively ahead in tech & units, whilst the AI is always behind. The player even has time for wonders & picking a religion. This is the complete opposite of vanilla. Surely if you are playing on the highest level you shouldn't be ahead like this, as it doesn't make sense. In fact there seems to be more chance of running away than playing lower down.

Obviously this doesn't affect me as I play on lower levels like Prince, though am trying to go higher. For you elite players don't you want a challenge whereby playing on the highest level is really hard & you only win occassionally, not win at ease each game. Yet when the developers try to make it harder at the top, the dissent usually comes from the people playing at the highest levels, & seems to be like a status symbol & failure to play lower. In fairness this is a criticism of all games not just this one.

I would add this is not specifically aimed at you, as I find your videos very informative & you have a nice calm manner, & your recent explanation about happiness was really interesting.
 
Regardless, Deity is due for a difficulty pass really. there is a lot of leeway in the game difficulty right now.

From my perspective, a difficulty rebalance to %reductions is not what I want for a good time though...

Something like lowering production percentage to like 65% and giving back food for the capital settle are the ideas i have in mind. =/
 
Could you explain why not?
Oh I just read your other thread and I just thought that flattening the curve is not such a bad thing. I totally agree with you that stuff like pushing A/B/C to make the game "harder" is a pretty bad experience, but not so far as to say it should be totally removed.

There is actually one prime example where removing all these flat resources for the ai becomes really bad. Lets say I'm playing Aztecs with those settings. What do I do? I am absolutely going to bully down like 3 civ neighbors in the early game from ever functioning because they don't have enough to fight back or ever will. early game bullying to civs is a lot more mitigated with the early game A/B/C bonuses. Although you say that the early game bonuses are jarring, I think they are quite necessary.

In the late game, A/B/C bonuses sort of fall apart in doing its job so yes, I think some of the difficulty scalers are great things to add onto the list of difficulty. adding these is just a good idea in my opinion. And much much more preferred than raising A/B/C bonuses more.
 
Why don't you just try different abc handicap values?

There are technically thousands of combinations, it is impossible that the one you like most cannot be found. Thing is, you have to provide feedback on your perceived difficulty experience for more accurate values.

What is it your complain, early game is too hard or too easy for deity? That it becomes too hard in the end or not hard enough?
 
Last edited:
Oh I just read your other thread and I just thought that flattening the curve is not such a bad thing. I totally agree with you that stuff like pushing A/B/C to make the game "harder" is a pretty bad experience, but not so far as to say it should be totally removed.

There is actually one prime example where removing all these flat resources for the ai becomes really bad. Lets say I'm playing Aztecs with those settings. What do I do? I am absolutely going to bully down like 3 civ neighbors in the early game from ever functioning because they don't have enough to fight back or ever will. early game bullying to civs is a lot more mitigated with the early game A/B/C bonuses. Although you say that the early game bonuses are jarring, I think they are quite necessary.

In the late game, A/B/C bonuses sort of fall apart in doing its job so yes, I think some of the difficulty scalers are great things to add onto the list of difficulty. adding these is just a good idea in my opinion. And much much more preferred than raising A/B/C bonuses more.

Yea I'm not against some combo of cost reduction and A/B/C but though it would be good to try with just cost reduction and see how it is/what other bonuses AIs might still need.

Honestly it's funny you should mention aztecs because I am just playing them with my settings and got a great start but still got repelled by both of my neighbours when I tried to attack them early on. I had similar worries that they might be weak at the start but the larger cost reduction on buildings at the start and quicker pop growth and techs do actually help them quite a lot and they were definitely stronger than the current pre-classical AIs. Also got wiped by a Zulu AI pre turn 100 in another game when I didn't defend properly.

What is it your complain, early game is too hard or too easy for deity? That it becomes too hard in the end or not hard enough?

So on Deity right now the early ancient era is super easy. Then AIs are usually way ahead from Classical to Renaissance, at which point it's usually quite easy again, though sometimes there will be 1 AI who still does well late game.

Problem is AIs have very little bonuses until they get their first city out and then Classical era bonus. So if you stop their first settler they are completely screwed. On the other hand, when they do get bonuses they are super noticeable as they are getting like a free tech or more each time. Also if you are ever at war with an AI who enters a new era, they will probably upgrade their walls/castles in every city on that turn and buy themselves like 5 or 6 troops. Also they are being rewarded in the short term for building cities, which is quite game-changing because for everybody else, cities are an investment in the future. Another issue is that AIs have ridiculous amounts of money throughout the game, which is part of the reason there are problems with deals and bribed wars imo.

Basically when you just keep scaling up instant yields it makes the AIs very erratic in their strength because it can go up by so much in 1 turn. However they still probably should be harder overall which is why I am suggesting different methods.
 
Last edited:
Hey, I was just thinking and how about if instead of giving the AI bonuses at fixed stages or on fixed things, we introduce a system wherein a civ(only AI) gets bonuses like great people and yield bonuses randomly. Increase in difficulty would increase the frequency of these "boosts" for the AI. These can be powerful enough to make sure that the human player is always on the edge of the seat. This would definately add more interest to a game for me. Maybe it can be somehow mixed with the current event system and maybe effected by golden ages or something like that but only for the AI.
 
I think it is very healthy to have this discussion, and I think it is the most important topic after AI behavior for the longevity and quality of this (already awesome) mod.

I also really dislike the ABC system as it stands, and I think your arguments are very strong Milae. I have seen your videos and how easy it is for you to just stop their second city from being settled, which renders that AI completely screwed for the rest of the game, because of the snowballing that the ABC system entails. Another salient example of that is the one you give where the AI will instakill your unit as soon as it hits classical because they instantly build walls, which is just undebateably boring and annoying as hell.

Obviously I am not sure about what the best way to tackle the issue is, but I'll try your version out if you still think it is a promising solution
 
Well. Then you don't have a problem with the scaler, you have a problem with the handicap triggers.

As you point out, triggering with every new city has problems. We played with a trigger in the capital, and the game was very hard for so many people, not being able to do anything relevant in the early game. Removing this bonus trigger makes the AI weak until they found their second cities.

What we need to have is a timed trigger in addition to the other triggers. Give all AI a small chance to trigger the handicap bonus each turn, scaling with game speed. Maybe a 4% chance to trigger the bonus each turn? Some AI will be lucky to get their first handicap bonus before turn 20, others might get their first bonus after turn 30. This, in addition to the the current triggers that benefit the AI that take the lead. This randomness is balanced when playing against several AI, some will be stronger than usual, some will be weaker, but in average they will increase in power more steadily.
 
Well. Then you don't have a problem with the scaler, you have a problem with the handicap triggers.

Yea pretty much.

What we need to have is a timed trigger in addition to the other triggers. Give all AI a small chance to trigger the handicap bonus each turn, scaling with game speed. Maybe a 4% chance to trigger the bonus each turn? Some AI will be lucky to get their first handicap bonus before turn 20, others might get their first bonus after turn 30. This, in addition to the the current triggers that benefit the AI that take the lead. This randomness is balanced when playing against several AI, some will be stronger than usual, some will be weaker, but in average they will increase in power more steadily.

I have also considered this possibility, I think if that were the case it might be better to do smaller and more often to reduce the erraticness I mentioned previously. Also depends if this would replace all the current triggers or just the city founding ones.

Honestly though there are still some issues with that system:
1. All yields are given equally even though they are not all worth equal amounts.
2. There are so many possibilities with the scalars it is quite difficult to choose the right ones to line up with each era, and when game balance is changed, the bonuses should really be changed each time to compensate.
3. Giving flat production bonuses still creates issues with AIs winning World Projects, and getting the bonus to stuff like Wonders which are things humans are directly competing for.
 
1. Different triggers, different yields. It was changed a while ago.
2. It's not hard if you know how quadratic functions work. But it's not brain dead easy. I agree they should be tweaked after new changes, but understand that Gazebo runs AI games to test balance, so he can't say how good difficulty boni are until we give feedback.
3. I don't know what flat bonus you are talking about. Most of them don't give production yields. There was an issue with a bonus that gave a flat production in every city, so big civs won projects very easily, but now its a flat bonus for the player regardless the number of cities, that is distributed evenly among the cities. Is this it?

Right now, I think the problem lies in the turns before the settling. Reward the capital settlement, and it becomes too hard, remove this reward and it becomes too easy. We need some trigger in between, and the one I proposed I think will prevent this problem.
 
1. Different triggers, different yields. It was changed a while ago.
2. It's not hard if you know how quadratic functions work. But it's not brain dead easy. I agree they should be tweaked after new changes, but understand that Gazebo runs AI games to test balance, so he can't say how good difficulty boni are until we give feedback.
3. I don't know what flat bonus you are talking about. Most of them don't give production yields. There was an issue with a bonus that gave a flat production in every city, so big civs won projects very easily, but now its a flat bonus for the player regardless the number of cities, that is distributed evenly among the cities. Is this it?

Right now, I think the problem lies in the turns before the settling. Reward the capital settlement, and it becomes too hard, remove this reward and it becomes too easy. We need some trigger in between, and the one I proposed I think will prevent this problem.

Food, Production, Science and Culture are all the same I'm pretty sure?

And yea the production got nerfed a lot, but an era bonus can still be enough to win a world project.

I think generally giving yields on city settle is a weird one given how it changes the mechanics of the early game. But yea AIs can struggle until they get the second city. But also a few patches ago when they did get bonus on the capital did feel somewhat like Vanilla lol.
 
Just looked at current version btw, all yields get the same. Gold and Golden Age points have extra triggers as well.

Do you happen to have the logs? Just for curiosity.
Code:
void CvPlayer::DoDifficultyBonus(HistoricEventTypes eHistoricEvent)
{
   int iEra = GC.getGame().getCurrentEra();
   if (iEra <= 0)
   {
       iEra = 1;
   }
   int iHandicapBase = 0;
   int iHandicapA = 0;
   int iHandicapB = 0;
   int iHandicapC = 0;
   int iYieldHandicap = 0;
   int iLoop;

   CvString strLogString;

   CvHandicapInfo* pHandicapInfo = GC.getHandicapInfo(GC.getGame().getHandicapType());
   if (pHandicapInfo)
   {
       iHandicapBase = pHandicapInfo->getAIDifficultyBonusBase();
       iHandicapA = pHandicapInfo->getAIDifficultyBonusEarly();
       iHandicapB = pHandicapInfo->getAIDifficultyBonusMid();
       iHandicapC = pHandicapInfo->getAIDifficultyBonusLate();
       iYieldHandicap = iHandicapBase * ((iHandicapC * iEra * iEra) + (iHandicapB * iEra) + iHandicapA) / 100;

       iYieldHandicap *= GC.getGame().getGameSpeedInfo().getInstantYieldPercent();
       iYieldHandicap /= 100;
   }
   int iYieldForCities = max(1, iYieldHandicap / max(1, getNumCities()));
   if (iYieldHandicap > 0)
   {
       switch (eHistoricEvent)
       {
           case HISTORIC_EVENT_ERA:
           {
               iYieldHandicap *= 3;
               for (CvCity* pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
               {
                   if (pLoopCity != NULL)
                   {
                       pLoopCity->changeFood(iYieldForCities);
                       pLoopCity->changeProduction(iYieldForCities);
                   }
               }
               GetTreasury()->ChangeGold(iYieldHandicap);
               ChangeGoldenAgeProgressMeter(iYieldHandicap);
               changeJONSCulture(iYieldHandicap);

               TechTypes eCurrentTech = GetPlayerTechs()->GetCurrentResearch();
               if (eCurrentTech == NO_TECH)
               {
                   changeOverflowResearch(iYieldHandicap);
               }
               else
               {
                   GET_TEAM(getTeam()).GetTeamTechs()->ChangeResearchProgress(eCurrentTech, iYieldHandicap, GetID());
               }
               strLogString.Format("CBP AI DIFFICULTY BONUS FROM HISTORIC EVENT: ERA - Received Handicap Bonus (%d in Yields): FOOD, PRODUCTION, GOLD, GAP, CULTURE, SCIENCE.", iYieldHandicap);
               break;
           }
           case HISTORIC_EVENT_WONDER:
           {
               GetTreasury()->ChangeGold(iYieldHandicap);
               ChangeGoldenAgeProgressMeter(iYieldHandicap);
               strLogString.Format("CBP AI DIFFICULTY BONUS FROM HISTORIC EVENT: WONDER - Received Handicap Bonus (%d in Yields): GOLD, GAP.", iYieldHandicap);
               break;
           }
           case HISTORIC_EVENT_GP:
           {
               GetTreasury()->ChangeGold(iYieldHandicap);
               ChangeGoldenAgeProgressMeter(iYieldHandicap);
               strLogString.Format("CBP AI DIFFICULTY BONUS FROM HISTORIC EVENT: GREAT PERSON - Received Handicap Bonus (%d in Yields): GOLD, GAP.", iYieldHandicap);
               break;
           }
           case HISTORIC_EVENT_WAR:
           {
               for (CvCity* pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
               {
                   if (pLoopCity != NULL)
                   {
                       pLoopCity->changeFood(iYieldForCities);
                       pLoopCity->changeProduction(iYieldForCities);
                   }
               }
               GetTreasury()->ChangeGold(iYieldHandicap);
               ChangeGoldenAgeProgressMeter(iYieldHandicap);
               changeJONSCulture(iYieldHandicap);

               TechTypes eCurrentTech = GetPlayerTechs()->GetCurrentResearch();
               if (eCurrentTech == NO_TECH)
               {
                   changeOverflowResearch(iYieldHandicap);
               }
               else
               {
                   GET_TEAM(getTeam()).GetTeamTechs()->ChangeResearchProgress(eCurrentTech, iYieldHandicap, GetID());
               }
               strLogString.Format("CBP AI DIFFICULTY BONUS FROM HISTORIC EVENT: WAR - Received Handicap Bonus (%d in Yields): FOOD, PRODUCTION, GOLD, GAP, CULTURE, SCIENCE.", iYieldHandicap);
               break;
           }
           case HISTORIC_EVENT_GA:
           {
               for (CvCity* pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
               {
                   if (pLoopCity != NULL)
                   {
                       pLoopCity->changeFood(iYieldForCities);
                       pLoopCity->changeProduction(iYieldForCities);
                   }
               }
               GetTreasury()->ChangeGold(iYieldHandicap);
               changeJONSCulture(iYieldHandicap);

               TechTypes eCurrentTech = GetPlayerTechs()->GetCurrentResearch();
               if (eCurrentTech == NO_TECH)
               {
                   changeOverflowResearch(iYieldHandicap);
               }
               else
               {
                   GET_TEAM(getTeam()).GetTeamTechs()->ChangeResearchProgress(eCurrentTech, iYieldHandicap, GetID());
               }
               strLogString.Format("CBP AI DIFFICULTY BONUS FROM HISTORIC EVENT: GOLDEN AGE - Received Handicap Bonus (%d in Yields): FOOD, PRODUCTION, GOLD, CULTURE, SCIENCE.", iYieldHandicap);
               break;
           }
           case HISTORIC_EVENT_DIG:
           {
               GetTreasury()->ChangeGold(iYieldHandicap);
               strLogString.Format("CBP AI DIFFICULTY BONUS FROM HISTORIC EVENT: DIG - Received Handicap Bonus (%d in Yields): GOLD.", iYieldHandicap);
               break;
           }
           case HISTORIC_EVENT_TRADE_CS:
           {
               GetTreasury()->ChangeGold(iYieldHandicap);
               strLogString.Format("CBP AI DIFFICULTY BONUS FROM HISTORIC EVENT: TRADE (CITY-STATE) - Received Handicap Bonus (%d in Yields): GOLD.", iYieldHandicap);
               break;
           }
           case HISTORIC_EVENT_TRADE_LAND:
           {
               GetTreasury()->ChangeGold(iYieldHandicap);
               strLogString.Format("CBP AI DIFFICULTY BONUS FROM HISTORIC EVENT: TRADE (LAND) - Received Handicap Bonus (%d in Yields): GOLD.", iYieldHandicap);
               break;
           }
           case HISTORIC_EVENT_TRADE_SEA:
           {
               GetTreasury()->ChangeGold(iYieldHandicap);
               strLogString.Format("CBP AI DIFFICULTY BONUS FROM HISTORIC EVENT: TRADE (SEA) - Received Handicap Bonus (%d in Yields): GOLD.", iYieldHandicap);
               break;
           }
           case HISTORIC_EVENT_CITY_FOUND_CAPITAL:
           {
               GetTreasury()->ChangeGold(iYieldHandicap);
               ChangeGoldenAgeProgressMeter(iYieldHandicap);
               strLogString.Format("CBP AI DIFFICULTY BONUS FROM HISTORIC EVENT: FOUND CAPITAL - Received Handicap Bonus (%d in Yields): GOLD, GAP.", iYieldHandicap);
               break;
           }
           case HISTORIC_EVENT_CITY_FOUND:
           {
               for (CvCity* pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
               {
                   if (pLoopCity != NULL)
                   {
                       pLoopCity->changeFood(iYieldForCities);
                       pLoopCity->changeProduction(iYieldForCities);
                   }
               }
               GetTreasury()->ChangeGold(iYieldHandicap);
               ChangeGoldenAgeProgressMeter(iYieldHandicap);
               changeJONSCulture(iYieldHandicap);

               TechTypes eCurrentTech = GetPlayerTechs()->GetCurrentResearch();
               if (eCurrentTech == NO_TECH)
               {
                   changeOverflowResearch(iYieldHandicap);
               }
               else
               {
                   GET_TEAM(getTeam()).GetTeamTechs()->ChangeResearchProgress(eCurrentTech, iYieldHandicap, GetID());
               }
               strLogString.Format("CBP AI DIFFICULTY BONUS FROM HISTORIC EVENT: FOUND CITY - Received Handicap Bonus (%d in Yields): FOOD, PRODUCTION, GOLD, GAP, CULTURE, SCIENCE.", iYieldHandicap);
               break;
           }
       }
   }

   if (GC.getLogging() && GC.getAILogging())
   {
       CvString strTemp;

       CvString strFileName = "DifficultyHandicapLog.csv";
       FILogFile* pLog;
       pLog = LOGFILEMGR.GetLog(strFileName, FILogFile::kDontTimeStamp);

       CvString strPlayerName;
       strPlayerName = getCivilizationShortDescription();
       strTemp += strPlayerName;
       strTemp += ", ";

       CvString strTurn;

       strTurn.Format("%d, ", GC.getGame().getGameTurn()); // turn
       strTemp += strTurn;

       strTemp += strLogString;

       pLog->Msg(strTemp);
   }
}
 
Okay I've done some revision to it. I honestly think it's pretty promising. I've updated the main post to show new changes. I recommend people to try it and let me know what they think, you'll even get some bugfixes in there free of charge;) If not I will probably do my next series using it to show it.

Difficulty is probably harder than current Deity but less crazy around med/renaissance. Not sure how all the other difficulties line up but there should be one that works for you. Not quite sure about lategame yet. Currently there is no era scaling but wouldn't be too hard to add that in if AIs need it. Percentages should scale well though anyways.
 
Started a game using this on Deity. I've been playing immortal and sometimes deity without turning off bribed wars. I just learned you can turn them off and also implemented this mod, so it might be diluting results. I usually struggle but im quite far ahead on large map as polynesia on standard speed about 150 turns in. I've never been in such a good position before on deity. The largest AI only has like 4-5 cities (i think they expand too slowly). Ill keep you posted as I play on and see if the AI catch up.
 
Started a game using this on Deity. I've been playing immortal and sometimes deity without turning off bribed wars. I just learned you can turn them off and also implemented this mod, so it might be diluting results. I usually struggle but im quite far ahead on large map as polynesia on standard speed about 150 turns in. I've never been in such a good position before on deity. The largest AI only has like 4-5 cities (i think they expand too slowly). Ill keep you posted as I play on and see if the AI catch up.

Okay cool man, are you using the original one I posted or v2?

Lategame they should be better than normal, but it does seem like early game could be a bit harder so I am currently experimenting with adding some more early game stuff for AIs as well.

Thanks for feedback though, let me know how you get on:)
 
Top Bottom