Dynamic Player Handicapper / "Rest on one's laurels"

vincentz

Programmer
Joined
Feb 4, 2009
Messages
3,614
Location
Denmark
One thing that have always bothered my about civ (all versions and mods) is the "Winning Point of No Return".
Usually my games would progress like this:
Beginning = behind
Early game = catching up
Middle game (usually late medieval to renaissance) = number 1 (WPoNR)
Late game = crushing all resistance both militaristic, economical and scientifically

= Late game is boring, because nothing to fight for. Game is already won and very little can be done to avoid it.

I have tried many many ways of balancing this out with gamerules that while its equal for AI and Player, it will mostly handicap players style of playing the game, but to no avail. The WPoNR will eventually take place.
So I have come to terms that I need a method of handicapping the human player after WPoNR to keep late game interesting. I dont want to delay it. That can be done by taking a higher difficulty. I want to stop the "Above WPoNR++". I want to drag out the WPoNR to" Crushing all resistance" game period.

So I was looking at the Demographics screen, and thinking some of those numbers could be used for adding modifiers :
GNP : If #1 then reduce Commerce relative to #2
MFG Goods : If #1 then add a -% production modifier for cities relative to #2
Crop Yield : If #1 then increase the "Food Needed to grow"
Military : If #1 then reduce unit strength relative to #2
Donno about the Military though, as even when Im ahead, im usually not #1 in military.

The #1 to #2 factor could be something like
if 1-(#2/#1 )< 1 then modifier% = (1-(#2/#1 ))*100
so if f.ex. GNP is 2500 and #2 is 2000 then modifier is
(1-(2000/2500))*100 = -20%
or if f.ex. GNP is 2000 and #2 is 1000 then modifier is -50%
the *100 could be replaced with some factor from HandicapInfo.xml like researchpercent to scale with difficulty

I realize that its not very realistic (except for perhaps the "Rest on one's laurels" effect")

Well, before I start this little project, I wanted to hear from my fellow modders/players what pros and cons this would bring. Maybe it sounds better in my head than ingame, but often the WPoNR breaks my heart, especially if it was a good game.
 
So I have come to terms that I need a method of handicapping the human player after WPoNR to keep late game interesting. I dont want to delay it. That can be done by taking a higher difficulty. I want to stop the "Above WPoNR++". I want to drag out the WPoNR to" Crushing all resistance" game period.
I don't quite identify with this goal. I can see how catching up for most of the game doesn't convey the feeling of, say, a struggle between (equally) great powers. But once it's clear that I'm winning, I'd like the game to end quickly. What I could get behind is trying to keep a game in limbo; maybe that's similar enough.

Isn't it better to help the civs that fall behind than penalizing the leader? A punishment for doing well is something some players can't abide. Also, an AI wouldn't take advantage of a catch-up mechanism, but a human player will try to work around penalties. What comes to mind is focusing on specialists (non-commerce research and GPP aren't reduced) or building up an army just before taking the top rank (not sure if that really makes sense). The way the modifiers are computed, #1 receives exactly the values of #2. This rewards using a friendly AI as a kind of running mate.

There are at least two mechanisms already in place that make the game progressively harder, and perhaps these could be dialed up.
1. (Hidden) rank hate. Currently, the effect is negligible: Depending on their personality, a far-behind AI dislikes the leading civs a little. (See also: K-Mod thread.) How it could work: The AI dislikes civs doing slightly better than itself. For example, the 2nd, 3rd and 4th dislike the 1st, with the 2nd being the most antagonistic. Similarly, 3rd and 4th dislike 2nd, and 4th dislikes 3rd. The 5th is perhaps, for the time being, out of contention and doesn't care about rank.
There's also hate for (militarily) powerful civs with vassals ("worried about our rivals being vassals"), but strangely no hate for powerful civs without any vassals.

2. Per-era modifiers in the difficulty settings. These could be made a lot more severe. For example, the game could start with Prince-like settings -- in particular with few initial freebies for the AI -- and gradually shift to Deity. That said, increasing the AI bonuses only once per era would be too abrupt then. It could happen smoothly based on the world's overall technological progress. Also, the increase in difficulty should arguably not be linear. At least in unmodded games, human players tend to thrive during the Classical era due to tech trading and warfare (early Classical with Axes or late with Catapults).
Inflation has a similar effect: the more inflation grows, the more relevant the AI discount on inflation becomes.
 
I think you're right. Thanks for the input :D
The formula wouldnt work as intended, and be to abrupt, and having a "running-mate" would null the penalty (if mate gets lower score, then give tech and mate is #1 again resulting in penalty is gone). Also the "suddenly heavy penalty" would be a mood killer.

back to the drawing board ;)

edit : I dont think the Dynamic Handicapper with difficulty steps works either im afraid. Iirc there was one on Rise of Mankind, and it would quickly jump to Deity without having much of an effect.
maybe do a soft handicap depending on average score instead of hard depending on #1
 
I dont think the Dynamic Handicapper with difficulty steps works either im afraid. Iirc there was one on Rise of Mankind, and it would quickly jump to Deity without having much of an effect.
maybe do a soft handicap depending on average score instead of hard depending on #1
Ah, interesting. Looks like they've indeed struggled with this:
http://forums.civfanatics.com/showthread.php?t=534851
It could be that the Deity modifiers aren't enough to bring a civ back into contention after falling behind. Looking at the differences between the difficulty levels (spreadsheet): Noble has 100% research cost, Deity 130, and research is unaffected by iAIPerEraModifier. May have to push/ throttle more.
I've thought for a moment about trying a game at Prince with iAIPerEraModifier set to -12. That would e.g. put AI unit training cost and civic upkeep at 40% in the Modern era (Deity: 48%). Doesn't look like it would be enough to make the game interesting. Perhaps if AI research was boosted as well.
At any rate, agreed that more smoothness would help.
 
lol. was about to write that perEraModifier must be a mod thing....
Never really used it or considered its presence.
While it certainly opens up for more adjustment, its a pretty hard adjustment, and if the AI is doing good in one game and bad in another it will still be the same.

What I would like is a modifier that follows the game, so f.ex if you're slamming the AI by 1 AD it would already have kicked in long time before putting a damper on you. I like it to be on the human player instead of boosting AI, because usually its the human who is extreme, while the AI plays "normally". If the AI got a boost relative to how well human player was doing it could skew the game/timeline (I think).

So... something that regulates in a smooth, but exponential way with the relativeness of Average and Best scores.

HP=Human Player
iUnitCostPercent from handicapInfo.xml (or something else fitting)

modifier = ((rival best * rival average) / (HP Value * (HP Value * iUnitCostPercent)))
If modifier < 1 then use

edit, or more simply use one of the stds :
PHP:
* (std::max (((rival best * rival average) / (HP Value * (HP Value * iUnitCostPercent))*100), 100) /100)
 
Thanks, but I think we figured out it wasn't really working. Also it's not exponential and not even linear, but in steps that ends at diety, so for a diety player there is no increase in difficulty.
Im gonna try with the code above, when I figure out to get the values in sdk
 
PHP:
* (std::max (((rival best * rival average) / (HP Value * (HP Value * iUnitCostPercent))*100), 100) /100)
So esentially rival best * rival average / square(HP Value), e.g. 4*3/25 if the statistics are 5,4,4,3,3,2,2. If this is too drastic, you could try a fractional power like pow(HP Value, 1.8) instead of the square.

The LoR modmod doesn't seem to stop at Deity:
Code:
int CvPlayer::getProductionNeeded(UnitTypes eUnit) const
{ // ...
int iTrainPercent = GC.getHandicapInfo(GC.getGameINLINE().getHandicapType()).getAITrainPercent();
//limit to approx 3 difficulty level jumps
int iLimit = ((iTrainPercent - 15) * (100 - (3 * GC.getGameINLINE().getHighestEra()))) / 100;
I'm too lazy to read all the code, but this comment sounds thoughtful:
"Get the average AI power, but account for the fact that many minor / small civs may exist, or that many civs may have been wiped out and adjust the average accordingly"
 
Yeah, the formula would not work right/be waaay to hard.

Instead I'll use this
Modifier = Sqrt(Playerscore*2*Difficultymodifier / ( Highestscore + Averagescore * 2) )
If Modifier > 1 then use

So if for example Player=1000, High=1000 and Average=500 and difficulty=1 (highest difficulty) then modifier would be 1 and playernewscore=Playerscore/modifier=1000
If player=1500 then newPlayerscore=1224
If player=2000 then newPlayerscore=1414
Etc.

Much softer pull in the beginning but keeping player in place
 
Back
Top Bottom