Showing posts with label Civ6. Show all posts
Showing posts with label Civ6. Show all posts

Tuesday, December 3, 2019

ICBA

ICBA usually means I Can't Be Assed.  Today though, I will suggest a new interpretation - InterContinenal Ballistic Arrows.  In Civ 6 archers can fire enormous distances, far enough that it strains any sense of immersion for me.  Even firing into an adjacent hex is a huge stretch since a hex is somewhere between 100 and 1000 kilometers wide, but at least that would require them being on the same landmass.  However, as it stands archers can fire 2 hexes, often shooting over bodies of water as large as Lake Superior or the English Channel.

It just feels wrong to me to have an archer in London deciding to bombard a target in northern France.

I can usually overlook silliness like this.  After all, this is a game where the Eiffel Tower takes up a full hex, and requires you to plow under thousands of square kilometers of land to accommodate it.  Scale is ... inexact in Civ 6.

But I don't like the way archers operate mechanically either.  The AI isn't good at figuring them out, and every time I go against it I am on the same plan.  Make a pile of archers, declare war, let their enormous army pour into my territory, mow them down with archers for a dozen turns while I make melee units, then rush into their territory when they are out of units and crush them.

When I am attacking the AI I mostly just laugh at their units while I rotate out blockers to heal, and keep pouring on the damage with archers.  When *they* get archers though... ugh.  I lose units constantly, because any time I get into their territory they rush archers up to me and tear apart my lines.  When I encounter their archers in neutral territory they aren't good at protecting them so I can beat them up, but when I am on the attack it is a nightmare.

I don't like that the default solution to difficulty is to give the AI tons of units and then you just kill them all with ranged units.

My plan to fix both this immersion and technical problem is to give all ranged units a range of 1.  Nobody gets to have ICBAs.  If you want to shoot 2 hexes, wait until you get balloons and artillery in the WW1 era, where longer shots from your ranged units makes a lot of sense.  Naturally this makes archers bad, so I compensated by raising the strength of ranged units of all types a little bit.

I tested this out a few times and I love the results.  I can't just maul the AI with ranged units without thinking anymore.  I still like building some of them to assault barbarian huts, defend cities, and peck away at fortified units, but they aren't the one size fits all solution.  Archers against the AI in unmodded civ 6 is like using a baseball bat to fight a baby - it feels too powerful for the job.  The new ranged units feel like a nerf hammer - still enough to beat the baby, but it feels like more of a fight.

The more critical component here though is that things *feel* a lot more sensible, especially in the early eras.  You can't blast away at targets from absurd distances, Quadriremes are a lot more reasonable to build, and you actually have to get up in people's faces to fight.  I like it on all fronts.  It does lead to chokepoints being really hard to assault though, so you have to plan to lose some units beating through good defensive locations.  I like that though, even when it costs me.

Saturday, November 30, 2019

Fist to the head

Warrior monks are a staple of movies and stories.  Spiritual folk who combine magical seeming powers with physical discipline beating people up with their fists are a thing a lot of people like.  In Civ 6 the devs decided to put Monks into the game, which is a fine thing as far as I am concerned.  I don't know about the realism of people fighting fist vs. firearms and winning, but it is fun so who cares?

But as usual there were some serious implementation problems.  Two problems leapt out at me, once I began to look at Monks in Civ 6 - First, that they suck.  You don't want them.  Second, that you can't even get them if you wanted to.

The reason you can't get Monks is that they require a specific belief, and the AI is hardcoded to grab that belief first.  The AI won't build Monks once it has that belief though, so you won't see Monks in action.  It just takes that belief, reserving Monks for itself, then refuses to build any.  It feels almost like some developer was desperate to spite another one.  To put in those art assets and unique promotion trees and everything just to make sure that players don't ever get to see Monks in action... it is absurd.

You *can* build a wonder that gets you four Monks, but it comes up much later than Monks do otherwise so by the time you build it those Monks will be 20 Strength below other units and they will be weak and useless.

The reason Monks are terrible is that they have special rules.  They are vaguely like melee units in cost and strength, but melee units can benefit from Great Generals, get bonuses vs. anticavalry, and can use battering rams.  Monks get none of this.  Monks also can't upgrade or be upgraded into, so they have weak promotion possibilities.  Even if getting access to Monks was practical, you don't want them.  This is extra sad because it means that the belief that gets you access to Monks is terrible compared to the other associated beliefs.

But I can fix this!

All I have to do is buff Monk Strength, which is easy, and trick the AI into not taking them so the player can have a chance.

First off I tried to swap the names of beliefs around to trick the AI into taking something else.  This failed.

Then I tried to swap the modifiers around, thinking maybe they programmed the AI to look for a particular modifier.  No good, the AI still takes Monks and still won't use them.

Then I tried to change what the modifiers did at the lowest possible level, but this also failed.  The AI is hardcoded to look for the ability to get Monks, take it no matter what, and then refuse to make them.  Seriously people, what the hell?  Do you hate money?

But there is another solution:  Give Monks to everyone who gets a religion!  The belief that normally gets you Monks can give your Monks bonuses instead, so it still does a similar thing.  This one actually worked, so now in my mod every religion gets Monks and they are stronger and thus worth building.

Unfortunately giving Monks bonuses proved complicated.  The coding itself is trivial, but knowing exactly what stuff I have to insert into what tables is not at all clear, and my attempts to give Monks bonuses based on beliefs all failed.

So I went on the steam workshop, and looked up Monk mods thinking I could learn from them.  I found a mod from someone who went through the exact line of reasoning I did, right from 'Monks suck and are too hard to get' to 'give all religions Monks and buff them from the belief'.  This mod worked and was done already, so I gave up my attempts and just used it instead.

Yesterday was apparently a lesson in 'Before you do a job, see if someone else already did the same thing, but better.'

Monday, September 23, 2019

A classroom on a mountain peak

In Civ 6 the way you advance your scientific understanding is to live near huge mountain ranges with lots of geothermal vents nearby.

This makes no damn sense.

Lots of things in games make no sense, so that isn't necessarily a problem.  However, it also feels silly and bizarre, and *that* is a problem.

The way you make most of your science in Civ 6 is to plant down Campus districts.  In human history you find the greatest centres of knowledge and innovation by looking at places with large amounts of trade and people.  Big cities, basically.  However, Civ 6 Campus districts get huge adjacency bonuses from geothermal vents, mountains, and in the latest patch, reefs.  They want to emphasize that you can learn things by examining natural features, sure, but it feels awkward.

Holy Sites also want to be near mountains, but this feels right.  You don't situate your religious and spiritual places in the middle of a city in a flood plain, you put them near amazing natural wonders and majestic mountains, the better to impress people.  Feels good.

But Campuses?  They should want to be next to all the people doing all the things, the better to gather all the knowledge.

I suspect that when the designers were building the game they wanted to avoid mountains being terrible.  A good way to do this was to make it so that Holy Sites and Campuses got big bonuses for being near mountains, so the fact that mountains are unworkable tiles would be made up for by big science or faith generation.  For Holy Sites this totally worked, not so for Campuses.  As patches have progressed they have added more and more science adjacency bonuses to Campuses and this has warped the game in strange ways.  There is basically no way to get big science aside from Campuses, and all the other ways of getting science are extremely weak, so Campuses are needed everywhere.

In my most recent game my first city had a +4 Campus adjacency, and my next two cities had +6 and +5 adjacency locations due to mountains and geothermal vents.  These numbers are enormous, as most other districts in that era would be sitting at adjacencies of 0-2.  I shredded the science tree, and it made the game feel terrible because I couldn't build anything before it was already obsolete.

Campuses are too good, the adjacency bonuses are too large, and it all feels silly.  I want to make baseline science generation a bit better and Campuses a bit weaker, and I want to make Campus adjacencies more sensible.

I have a few options.  The first one I came up with is to remove or reduce most of the current adjacencies and just make Campus adjacencies much worse.  I would trash the adjacencies for mountains and reduce the bonuses from geothermal vents and reefs to +1 instead of +2.  (Reducing mountains to a 1 per 2 adjacency isn't possible for technical reasons.)  This would push Campus locations towards city centres and reduce normal adjacencies to 0-2 in the early game, rising to 3 in really good locations with a lot of infrastructure.

The way to make Campuses want to be in big urban areas is to replace all of their current adjacency bonuses with a full adjacency bonus from all districts.  Right now they get a 1 per 2 rate on districts, but I can easily up the rate to 1 per 1, which would mean that every city could have a good Campus regardless of location - all you have to do is build your other districts beside it and you are good to go.  3 adjacency bonus would be no problem in every developed city.  This feels sensible to me from a immersion perspective, but does mean that you basically don't care about terrain because the optimal science strategy is to simply put cities close together and build huge globs of districts with campuses in the middle.  This is a change to Campuses, but not a nerf - they still get really powerful, though you can't yahtzee quite so hard in the early game.

That second option feels thematically good, but doesn't address the power level of Campuses.  The first option reduces overall science output in the game dramatically, so it needs to be offset by a small increase in the base science rate from population.  I think I like the lower power version better.  It is fun to build huge numbers, but the game is warped by just how huge those numbers are, and other districts don't get that like at all, at least not without significant planning and investment.

And finally I will be able to stop feeling silly when I rush to plant a centre of learning in the middle of the wild, surrounded by rough, unusable terrain.

Thursday, July 4, 2019

Be rational

I have been working on balance for policies in Civ 6 and I have concluded that there is one particular outlier that I need to address somehow - Rationalism.

Rationalism:

Increase the Science output of your Campus buildings by 50% if the adjacency bonus of the district is at least +3.  Increase it by 50% more if the city has population 10 or more.

There are three other cards that do similar things for the Holy Site, Theatre Square, and Commercial Hub.

I find myself virtually always running Rationalism to boost my science and mostly ignoring the other three cards.  I think this is a bad sign - you want policies to be powerful, but if there is one you auto pick every time then something is amiss. 

The core thing that goes on is that the Rationalism card boosts science more than the Theatre Square card boosts culture, or the Commercial Hub card boosts gold.  There are lots of sources of culture in the game that aren't affected by cards, such as Great Works and Wonders.  Plus if you have a ton of culture going you actually don't need to boost your culture more - you really want to boost your tourism!  If you already have a truckload of high adjacency Theatre Squares your culture is probably already plenty high.  More of it is better than nothing, but your utility drops off quick.  Commercial Hubs mostly give you gold via enabling trade routes and those aren't boosted by the card, so that card is bad.  Also getting the adjacency of +4 to qualify for the Commercial Hub bonus is rough.

The Holy Site card is good.  Nearly all your faith comes from Holy Site buildings, so it is a huge bonus.  It, like science, is hard to get other ways, so the card does something powerful.  But unless you are going for a religious victory there isn't much point in stacking faith, so this card is a really powerful one that only comes up in limited circumstances - I am fine with that.

Because science nearly all comes from Campus buildings the Rationalism card is simply too big a science multiplier.  This is also why Campuses themselves are good - you simply can't get any reasonable amount of science in any other way.  No matter what victory condition you are aiming for it makes sense to have more science - it gives you better units, more buildings, better yields, everything.  And the cap is really high, such that getting ever more science is pretty much always good, in a way that other resources don't quite match.

Unfortunately I don't have a clean way to change this.  Other cards at similar places in the tree do things like adding 2-3 science per Campus, or similarly affecting other districts.  Rationalism can easily be pumping out ~4 science per district at that point, and it can get so much higher as your cities grow and it rockets to the moon when you start pumping out Research Labs in the late game.  I could just hard nerf Rationalism to give 4 science to every university, for example, which would ruin the symmetry of the cards but would certainly fix the necessity of having it.  It would also take away the fun minigame of trying to get all your Campuses to +3 adjacency to get the big Rationalism boost.  I can't decide if I like that or not.  Unless I change all the four cards it will be ... kludgy.

It is certainly true that the AI isn't adept at maximizing Rationalism, and it needs to be to win.  It definitely tries to get big cities and high adjacency bonuses but you have to specifically hunt for +3 and 10 in particular if you want to max returns, and you have to slot Rationalism in the first place, and they will only do so randomly.

Initially Rationalism didn't require high adjacency or high population.  This led players to slot Rationalism, then just slam down Campuses in tiny cities absolutely everywhere without worrying about adjacency.  I think what the designers were trying to do when they changed to this latest version is make players care about adjacency and to grow bigger cities.  That worked.  Unfortunately it didn't fix the fundamental problem that the card is just so good you have to build your entire game around it nearly every time.

Tuesday, June 25, 2019

Canada the great

In the latest Civ 6 patch Canada got a buff.  All of their Mine, Camp, and Lumbermill improvements in Tundra give one more production or food than before.  This, in addition to their giant pile of other Tundra based benefits, means that Tundra is still slightly worse than other terrain types for Canada.  But only slightly!  I just can't look at a huge list of abilities obviously designed to make a civ good in one particular circumstance that flat out fails and not do anything about it. 

I went with a simple and powerful change - Canada gets +1 food on all Tundra tiles.  This turns Tundra into a place that is actually excellent for Canada to be in.  It is probably only worth about 3-4 extra stuff per city for cities sited in Tundra vs. Grassland, but this is a solid benefit.  It means that you are really quite happy to start in Tundra locations and you will preferentially expand there.  It isn't an overpowered ability though because it takes awhile to actually realize the full benefits, and you probably only get them in a couple of cities on average.

The key is that the feel is right.  The numbers actually make you want to be in Tundra and you feel rewarded for doing that, which is the way it should feel.  The feel of constant raids from people living in the snow near your cities is a little odd though... I don't remember the last time barbarians came rushing down from the frozen north to pillage Toronto, to be honest.

One thing that seems super hard to balance is Canada's special war bonus, where they cannot declare surprise wars and the AI cannot declare surprise wars on them.  I just finished a Canada game where Genghis Khan was sitting right next door and he had his usual gigantic army of cavalry and was constantly grumbling at me.  Normally this would mean a series of wars, but he just sat there making more and more cavalry and doing nothing with them.  In the midgame I became allied with him because of an emergency and discovered that he had 125 chariots on the map!  That wasn't his whole army by any means, as he definitely had over 200 units, but his chariots covered the continent and the nearby oceans wall to wall.  I can't help but think that his AI told him to declare a surprise war on me but he could not so instead of denouncing me and declaring 5 turns later he just sat there foolishly wishing he could surprise me.

If my supposition is correct it would make Canada's ability extraordinarily powerful in games vs. the AI.  A human can just denounce and wait, but an AI who gets stuck can't do anything about it, and it probably wrecks their whole game plan.  Given that the only real threat to an expert player is early AI rushes, this could even make Canada by far the most powerful civ, if only because it interacts so oddly with the AI's war decisions.

Of course the game went predictably, and when I was in the Information Era Genghis decided to attack a city state who was my friend.  I declared war on him and parked a modern army on his borders and watched in glee as wave after wave of chariots, horsemen, curassiers, and knights slammed into my units and died.  It was hilarious to see a single unit kill more than 10 enemy units in one turn as they rushed in and committed suicide, hoping their wooden carts with spikes would defeat modern infantry.  I killed around 200 units and pillaged half a dozen cities to nothing before letting Genghis have peace.

One other change that went into the game that is interesting is that the AI clearly puts less priority on Holy Sites than before.  It used to be that you couldn't get a religion on high difficulties without doing some pretty awful stuff to get there, and even then you would often just fail to get a religion at all.  Even AIs who had no intention of religious victory would rush Holy Sites.  This seems to have gone away, and I have been able to get a religion easily when I push for it.  Some civs rush it, most others ignore it in favour of other things.  I like this a lot because I think that it makes higher difficulties a lot more enjoyable when you can access all the feature of the game.  The best possible strategy is still exactly the same (Build an army, get 'em) but you can much more easily play a peaceful game and actually get a religion if you enjoy that part of things.

Tuesday, June 18, 2019

Small steps in the right direction

The new Civ 6 patch is out, and it turns out we mostly had all the information ahead of time.  The patch consists of a lot of good changes, mostly focusing on improving mid to late game buildings that were underused, as well as making the whole diplomacy victory and world council better.  I agree with basically all of their directions and the things they are trying to achieve.  Unfortunately I don't think they went far enough in many of their changes.

Specialists are better now that the top end buildings buff all specialists within their district.  They basically go from making 2 stuff per turn to 3 stuff per turn once you have the top end buildings constructed.  However, this is not nearly enough to make specialists good.  Throughout the game a citizen will normally be working a tile generating 4 stuff or more, and that increases as the game goes on.  Specialists in the early game are nearly unusable because you simply can't feed your people if you use them, midgame their returns are a joke compared to the 5 stuff you get on good tiles, and late game specialists get buffed all the way to 3 stuff while tiles continue upward to 6-7 stuff.

Now you might want to use specialists in a city that you have nothing left to build in and which you do not wish to grow.  So for example in the late game where you are trying for a science victory and are basically on cruise control you might use specialists.  But that is far too niche to my mind, especially when it is so easy to make them a reasonable option in other situations.

In any case this puts the structure in place for me to easily buff specialists, making them improve as you add infrastructure.  That much is welcome, certainly.

Another set of buffs that was well intentioned but a little too light handed was the improvements to Industrial Zones.  Workshops and Factories have been improved, but they still aren't good enough to make Industrial Zones worth building.  It is a step in the right direction though, and certainly makes the power imbalance between the various districts less stark. 

I think the designers are really certain that big cities with all the districts are good.  In that sort of scenario, a district that generates production in order to make more districts is a fine thing.  However, the ideal way to play is to simply spam small cities everywhere and chop all the forests down to get up your science or culture infrastructure.  After that, ignore the city as it sits there pumping out the resource you need to win the game.  Big cities need so much support in terms of housing, amenities, and food that it just isn't worth it, and if you have small cities with only 2-3 districts then one of those districts cannot be a district that just makes more production.  If you increase that production though, and make it easier to get the amenities and housing needed to grow a city big, then suddenly huge cities become a real contender.

We aren't quite there yet.  But I am happy to continue to nudge the numbers to try to make it happen.

Wednesday, June 5, 2019

New tricks for me

A new patch is coming for Civ 6 and I am excited about many of the announcements.  Two things they are trying to address in particular are the excessive cost of endgame buildings compared to their effects, and the power level of specialists.  They are heading in the right direction with building costs for sure, lowering the costs of the top buildings, but they haven't done nearly enough.  For example, the Research Lab is getting its cost lowered by about 25%, which is definitely good, but it is still heinously inefficient compared to the lower tier science buildings.  It is still well within the 'build it if you are just messing around before victory, or if you have truly nothing decent to do' territory, and I want more than that.  Unlocking endgame buildings should feel powerful, but the Research Lab is less than 25% as efficient as the University which comes before it, and that is pathetic.



However, I will give them credit that they are trying to change, they are simply doing it tiny steps at a time instead of getting to the right spot all at once.  Better than nothing.  At any rate I will continue tinkering with my mod using their new production costs and altering the outputs of the endgame buildings to work with them.

One other thing you will note on the Research Lab is that it now buffs Citizen yields.  This is a nice improvement because specialists were almost totally worthless in the old version.  They gave 2 of their thing, so Campus specialists gave 2 science, for example.  This is instead of working a tile though, so it was terrible.  Tiles are almost always vastly better than this, usually giving 4 stuff even in the early game, so getting to slot in a specialist to get 2 stuff is garbage.

We don't have all the details yet, but it looks like they intend to have specialists remain at 2 stuff, but get a buff from these buildings so they would produce 3 stuff at endgame.  Of course at endgame tiles produce ~6 stuff, so specialists are still basically trash, only good if you deliberately don't want a city to grow, or if your city is so big you can't even work any more tiles.

The bright side is that now modders will be able to easily drop these bonuses to specialists onto other buildings!  Previously I had simply altered specialists to give 5 stuff instead of 2, which meant that they were quite good in the early game (you still can't use them that much though, because otherwise your cities won't be able to make enough food) but they were fairly mediocre in the endgame.  However, with this new tech I will be able to start off specialists at 4 stuff, and upgrade that through the tech tree, just the way that tiles get better as you advance.  It will mean that specialists can be a solid choice throughout the game, something you can do but don't have to do.

Firaxis is also attempting to buff Canada.  Pre patch I think Canada is actually worse than a blank civ, because their tundra start bias is a serious disadvantage and they have a collection of terrible bonuses.  However, they are getting a slight buff to the point where I think they are better than nothing at all.

I decided that 'barely better than nothing at all' isn't good enough!  I am going to add +1 food to all Tundra tiles to the Canadian arsenal, which means they actually really want to be on Tundra and can build excellent cities in that environment.  Their cities elsewhere will be totally vanilla, but at least Tundra will actually be good for them.  Want to play a diplomatic game where you can build great cities in territory no one else wants?  Play Canada, they do that well!  This is my hope, at least.

So all told this patch is a bunch of good ideas in the right direction, just not taken quite far enough.  Could be worse.

Wednesday, May 22, 2019

Coal is bad

One of the things that irks me about Civ 6 lategame is that the modern buildings are really bad.  You can build a University for 250 production and it gives you ~6 stuff per turn.  Then you build a Research Lab for 580 production, and it gives you 2.5 stuff per turn, or 7.5 stuff per turn if you power it.  The problem is that even if you assume that powering it is free, 7.5 stuff per turn for 580 is a miserable rate... and powering it is NOT free.

To power it first you need an Industrial Zone nearby, and that IZ has to have all buildings built.  Then you have to get coal, and you have to feed in 1 coal / turn just to power the Research Lab.  The coal itself could be sold to the AI for minimum 10 gold, and burning the coal gives you a -.33 penalty to your Diplomatic Favour because you are creating carbon emissions and people hate that.  That Diplomatic Favour could be sold for 15g / favour, so each coal you feed into power costs you roughly 15 gold.

All this means that even once you build a power plant and a Research Lab you still end up paying 15 gold to get that extra 5 science.  That isn't good!  When you arrange for power and build the Lab and do all that setup you should get paid off, and instead you just end up with a trash building and the option to trade gold for science inefficiently.  Yuck.  If you value gold at the standard rate of 2 gold = 1 science, a fully powered Research Lab actually produces a net value of ZERO.  It costs a ton of production to make, and is no net benefit at all to your civilization once it appears. 

You can power buildings somewhat more cheaply by using oil or uranium instead of coal, but because oil and uranium are critical for military uses, cost more, and come much later this isn't much of a solution.

Now, you might decide that the only thing you care about is science, and so you will throw any amount of gold at it to make more science, but if this is your plan you should be buying settlers and slamming libraries and universities down, not building stupid Research Labs.  This definitely holds true for Stock Exchanges, which produce so little gold that you lose money by building them if you have them powered, and if you don't power them they are technically doing something, but it is so little that they should never be built.  Broadcast Centers actually have a use because you need somewhere to store music, but they are otherwise just as miserable as the rest.

One thing the designers of Civ 6 really wanted was to make climate change a big deal.  They initially aimed to do this by making rising oceans a huge problem but this has a flaw that we see in the real world too - nations each recognize that everyone else is pumping emissions, so they see no point in stopping their own emissions.  Local benefits and global costs leads to a tragedy of the commons.  The new strategy of putting in diplomatic penalties for CO2 emissions is a solid one, because you can sell that Diplomatic Favour for a lot of money.  It imposes a local cost, and that is one people pay attention to.

The trouble is that they ended up making all those late game buildings worthless.  The cost and penalties of burning coal are so high, and the benefits are so small, that you should just never bother and you should just run projects to finish off the game, selling all your coal to fund buying new cities or units.  It also means that you should spam cities in every spot you can to build the early buildings because big cities with lots of production run out of reasonable things to do.

The modern buildings need huge buffs to be competitive.  Obviously you can win games while building them - you can win all kinds of ways.  What I am looking at though is optimal play, aiming for the fastest and most efficient wins.  I also like the idea that when you unlock a new thing it should be *good*.  You should be excited to build it!  When I unlock Stock Exchanges I giggle because it isn't even clear I should build them even if they were free... and they are decidedly not free!

I ended up more than doubling the effects of the late game buildings just to make them have a solid return on investment and also be worth powering.  The Research Lab, for instance, went from 3 science base, 8 when powered, to 11 science base, 19 when powered.  When you look at those numbers they are HUGE compared to the earlier buildings, which is appropriate since the cost is also huge in comparison. 

My current theory is that buildings that cost 15 gold to power and produce 8 stuff are okay - this means that powering your empire and burning coal like crazy is a reasonable option but not required.  Doing so means you lose Diplomatic Favour because people hate your emissions and you have to buy (or avoid selling) your resources, but you do get a reasonable amount of stuff in return.  If you refuse to power via coal though you can still run an empire with more money and Diplomatic Favour to compensate.

I like the idea of powering buildings, and setting up infrastructure to create an amazing late game civilization.  But in order for that to work the numbers have to support it, and right now in the base game they just don't.

Thursday, May 16, 2019

Building so many walls

Last week I talked about how city defensive scaling in Civ 6 is a problem.  Cities get stronger as units get stronger, which is fine scaling, but they also scale so many other ways that it is extremely difficult for the AI to ever take cities once walls go up everywhere.  One thing I missed is that each level of walls also adds +3 to the city strength, which makes the situation even worse.  Instead of needing 3-4 melee units, which is enough at the start of the game, the AI would need ~60 melee units to take a modern city with full walls built.  That is too much.

This is an issue of systems, not just individual numbers.  You can't give full scaling off of a single value and then add on tons of other scaling systems too - things get totally out of whack.  A system where cities were super vulnerable without infrastructure but scaled by building more and more walls could work.  A system where cities scale by matching unit strength also works.  A system where both happens is a disaster. 

The problem is that taking late game cities is a brutal slog for the player, with sieges taking forever even once you have destroyed all the enemy units.  For the AI, sieges are just impossible and they can't win.  (If you have played recently you may have seen the AI take cities in the mid or late game occasionally - this is almost certainly because of a bug that can reduce the strength of cities to as little as 10, even if they should have a floor of 70.  Without the bug, the AI is pretty much hopeless.)

So if I want to make the AI a military threat in the mid or late game, I have to get rid of some of this scaling.  The easiest way to do this, I think, is to simply remove the additional Walls types that are available.  Ancient Walls gives a huge boost, no doubt, but even if I only remove Medieval Walls and Renaissance Walls, cities will be much easier to take.  I can also drastically cut down on the health bonus from Urban Defenses too.

But there is something else I needed to do too, and when I tried it the game felt so much better.  I removed the 'cannot attack if it has moved this turn' penalty from siege units, and the change was great.  When catapults are the best unit the AI can build it will spam them, and this always made it a joke.  Every turn it would adjust the position of the catapults, be unable to fire, and end turn.  No matter how many it had I would just burn them down without losses while it moved them around in circles desperately trying to find the perfect configuration.  However, when they could move and fire suddenly they were dangerous!  My walls took plenty of damage, and in the field catapults weren't good, but at least they did *something*.  If the AI could handle planning around siege units being unable to move it would be fine, but it can't, so I need to change things so it doesn't have to.

In the base game the established wisdom is that siege units are bad - just build more melee units and Battering Rams to smash down walls.  With this change, I still don't think siege units are amazing, but I think it is extremely reasonable to build a few.  I also hope that the dramatic reduction in city toughness will allow the AI to fight more effectively - it won't affect human players that much, but it should make it possible for AIs to conquer territory and put up a better late game fight because they just have so much stuff.

Now to play through another game and see how it all shakes out when taken together.  You can only theorycraft these changes so far, that much is for sure.

Thursday, May 9, 2019

Building a wall

In Civ 6 the early game is full of aggression and taking territory from other players is straightforward.  The AI, while it isn't perfect, has early game war reasonably figured out.  It gathers together six or so units, moves them to a city it wants, declares war, and bashes the city into submission.  This is a functional plan, and it regularly works, even against good players, assuming you start on a high difficulty level to give it a lead.

But when the late game arrives the world becomes stagnant.  The AI becomes nearly incapable of taking a city and it flails around bleeding off units and then gives up.  I wanted to look at the reasons for this a bit to see if I could change things so that the AI would be capable of capturing cities as the game progresses.

City defenses are determined by four things.  The strength of the best unit you have made, the strength of the unit defending the city, the walls the city has, and the districts the city has.  The first two scale throughout the ages - if you have warriors of strength 20, you get a city strength of 20.  If you have infantry corps of strength 80, the city they occupy has strength 80.  As such, I am mostly going to ignore that portion of the calculation because it works pretty well.  District and wall scaling is the problem.

Consider an Ancient era siege.  Warriors bash on the city, dealing the standard 30 damage each, because the city and the warriors have the same strength.  The city has 200 health, so if you get 4 attacking warriors you can kill the city in 2 rounds, with a total of 7 attacks.  (There is some extra complication with the city healing and also the city losing strength because of damage, but those roughly cancel.)  Those 4 warriors will be badly hurt after the fight, but they win.

Now consider an attack in the modern era using infantry.  The city still has 200 health, but it also has 400 health worth of walls that have to be beaten down first.  The city also likely has +6 to its strength because of districts.  The walls cut the damage of infantry attacks by 85%.  So if we assume the same group of 4 infantry attacking the city, they deal about 4 damage per hit.  After 3 rounds of bashing, all of the attacking infantry are dead, and the city has sustained about 40 damage into its 400 wall health.

So to attack a normal ancient era city you need 4 warriors to successfully defeat it.  To attack a normal modern era city you need *40* infantry to defeat it.  Even if you win the battle that kind of investment is ludicrous, and you will lose the game anyway trying to take cities at that rate.  You can improve that by pillaging some of the districts, but it is still absurd.  The AI simply isn't good enough at figuring out how to besiege a city to ever attack successfully in the late game.  It will just throw 20 units at the city, watch them die, and then beg for peace because it is losing the war.

Of course players take cities from the AI in the late game.  The easiest way by far is to use bombers because they deliver outrageous damage from afar.  When I develop bombers with strength 110 an infantry corps will still only have the city strength up to 80 (86 with districts, say), so I will deal 80 damage per shot.  3 bombers will level a city in 2 turns, and then I can just walk a melee unit in to capture it, and the bombers won't even take damage doing so.  That is still 4 units for a 2 turn kill, just like the ancient era, but the bombers can move and attack so efficiently that for a human, the modern era is the fastest era for war and capture.

Comparing modern warfare to ancient warfare is an extreme example, but the slide from AI threat to total lack of threat starts early, right when walls go up.  As the eras go by city health rises and the percentage of it that is walls goes up, and eventually the AI is helpless to attack you.  That said, I have never to my recollection lost a city with walls built.  You could lose it, certainly, if you just sit on one city at the start of the game and go straight for walls.  Eventually you would get out produced and out teched and walls wouldn't be enough.  But if you get a few cities up, and get walls up in the vulnerable ones, you pretty much can't lose a city again.  That doesn't feel right.

The trouble here, I think, is that city siege is built from the perspective of the player, not the AI.  Players who try to bash through AI walls quickly realize they need either swarms of ranged units, battering rams, or catapults.  You can't just beat through walls without taking hideous losses.  The AI, however, simply doesn't figure this out properly.  It wanders units around, correctly calculating that attacking the city is fruitless, but not knowing what to do about it.  It simply doesn't know how to defeat a well defended city. 

This situation leads to stagnation amongst AIs too.  Early empires shift about, but eventually people get up walls in their cities and then they all just sit there staring at one another.  Attacks are pointless, simply resulting in huge losses of troops for no gain.

The solution isn't to teach the AI about how to use air power - right now planes are extremely overpowered and if the AI reached them first and knew how to use them it would steamroll players without effort.  That isn't ideal.  Also this does nothing for midgame stagnation when the AIs all have medieval walls up and they can't hurt each other nor can they successfully attack a human player.

Cities gaining bonuses from districts kind of feels right - it means that building up infrastructure in a city helps make it harder to take.  Unfortunately it outpaces the attacker's abilities, and that is a problem.  Walls adding on health to cities seems reasonable, and walls reducing the abilities of melee units to attack feels okay, but the the end result is stagnation.  There needs to be an arms race, increases in the abilities of offensive units to offset increases in defence.  It should be a continuous struggle between offensive and defensive capabilities with neither getting ahead, but instead we have defence racing ahead of offence and never looking back.

Adding in a broad offensive power increase to offset the walls progression doesn't feel right to me.  I don't even know what that would look like, to be honest.  To let the AI reasonably take cities that are walled up would require huge bonuses, and would be a major project.  Deflating the stacking defensive bonuses is much easier though.  I have to think on how I would do this - flat out removing Medieval and Renaissance Walls is possible, as is reducing the power of Urban Defenses.  I could also pare back the bonuses that basic walls give so units do more damage.

Any of these changes are based on the assumption that defensive superiority and stagnation is a bad thing.  I suspect lots of people like having a wild and scary early game and then settle in to build an empire with no worries about invasion.  I get that, for sure.  However, I think the amount that defence outstrips offence is too high, and for my money the game would be more fun if I stepped in and tinkered with the progression so that taking cities was more feasible as the game goes along.

Monday, May 6, 2019

No murder allowed

Wendy has been watching me play a lot of Civ 6 lately.  We have a new routine where I play the game and provide colour commentary while she alternately knits and watches the gameplay.  One thing she pointed out recently was that my games consistently play out the same way.  I expand as fast as possible, get in an early war, wipe out my opponent's army in my territory, then counterattack and take their entire empire.  Once they are dead I get in another war and repeat until I own half the world.

Sometimes I just keep on warring until I win a domination victory, but more often I stop conquering once I have half the world and just chill, building all the stuff on my way to a science or culture victory.  I like having huge, amazing cities so once I have so much territory that victory is assured I have fun messing around.

Wendy decided this was too predictable, so she told me that my new challenge was to win without any warring at all.  I was allowed to defend myself of course, but no conquering cities and I have to always be at peace whenever possible.  I started up a game, and America got all aggressive with me, forward settling multiple cities on top of me.  I settled around them as best I could, but finally Teddy got all angry and came at me.  As usual I fought a desperate war against a vastly more numerous army, wiped out everything he had, and then moved into his territory to pillage and plunder. 

At this point I would have normally just steamrolled across the rest of America, taken everything they had, and then prepared for the next war.  Wendy told me that since America had stolen my territory I could take just one of their cities, even though that wasn't in the original rules.  However, Teddy begged for peace, offering me a pittance, and by the original rules I was obliged to accept.

The combination of these things really turned me sour on the game.  I want to play as hard as possible, so having consistent rules is critical to me.  Having the 'no conquering' rule be changed midstream sucks, and having to accept a tiny amount of gold to make up for a terrible, crippling war is frustrating as anything because obviously he was just going to rebuild his troops and come at me again.

So we ditched that game and started again with new rules, consistent rules.  First off, no declaring wars on anybody, except to liberate city states that people attacked, and then only to take the city state.  Second, I don't have to accept peace offers unless I want to, but I can't ever capture a city, and I can only raze one city each time a civ declares war on me.

This seemed like a much more enjoyable challenge, and it has worked out well so far.  I decided to do a cultural victory leveraging America's late game unique building, the Film Studio.  This time it was Genghis Khan who attacked me, with his swarm of horsemen attacking Boston, the city in the mountain pass.  (If you don't remember the Mongols rampaging across Boston's highland vistas, take it up with your history teacher.  It happened, I saw it.)  Boston fell, but after a few centuries I recaptured it for America, and got Genghis to pay me to stop the endless slaughter of horses and their riders.  The war was extremely costly, but at the end of it I had secured my borders and space for 8 reasonable cities.

I am still going to win, despite the fact that I can't leverage my expertise at war to grab half the world.  The AIs have big bonuses, but they are terribly inefficient, building enormous numbers of troops to no purpose, planting districts in foolish places, and pouring resources into religious wars that accomplish nothing for them.  I won't win like I usually do though, building all the wonders, and setting up to win every victory condition.  Instead I will win by pushing hard for a cultural victory and focusing all my resources on that.

One thing for sure:  Being peaceful makes the game so fast!  Not having to micro manage troops and having only 8 cities to control cuts game time by 75% at least.  Even if my win rate is much lower than games where I conquer everything, the wins/hour rate is enormously higher.

Thursday, April 25, 2019

Engineering

In my quest to help the Civ 6 AI I have found lots of little things that I can do, small changes that help in nearly invisible ways.  One of the things I felt I should try to fix is the Fort spam that the AI often engages in.  Forts are defensive structures built by Military Engineers, and each Engineer can build 2 Forts in total.  I have found Forts to be pretty much worthless because while they do grant a small defensive bonus that bonus rarely comes up.

Once you slam down a Fort you only get a benefit while the war is in that exact location - advance a single tile, the Fort is junk.  Retreat a tile, the Fort is junk.  If you put up a Fort and your enemy advances when you didn't expect it, they can even use it against you.  In any case that tile can't get a proper improvement to increase its productivity like a Mine and you have to sink 85 production into making it.  Forts are bad.

But the AI likes building Forts.  Especially in cities that have little productive territory, it would seem, because desert and tundra cities are usually surrounded by Fort after Fort, defending trash terrain that nobody would bother attacking anyway.  It is a waste.  I wouldn't mind this so much if the AI at least built Forts on its borders so it looked like it was doing something, but the tundra being filled with Forts smashes that illusion.

My solution was to increase the number of Forts a Military Engineer could build to 6.  I figured this way the player will still never build Military Engineers (beyond 1 to get the eureka, probably) but at least the AI will not have to build so many of them to fill the deserts of the world with pointless Fort spam.

This was a mistake.

The AI didn't respond by making less Military Engineers... no, it simply put Forts absolutely everywhere.  I walked into enemy territory to find big cities with 12 Forts surrounding them, covering all the productive territory.  My attempts to help the hapless AI simply caused it to do even stupider things.

Instead of making Forts cheap, I had to make them good.  My next solution was simple, and ended up looking a lot like my solution for Wall spam by the AI:  Add an Amenity to Forts.  I also restricted them to 1 per city, to avoid bizarre Fort spam.  The roleplaying justification is that people like knowing they are protected so building Walls and Forts makes them feel secure from war.  The numbers justification is that Forts are quite powerful when they grant an Amenity, but only having 1 per city means you won't be slamming them down everyplace.  Forts will cost more to build than a normal Builder improvement would, and they will be better.  Seems reasonable to me.

Now I just have to run through another game or two and see if this actually sorts out the problem or not.  If anything breaks it will be the Forts being restricted to 1 / city.  The AI may well end up with Military Engineers it doesn't have a use for, and they will end up wandering around pointlessly.  I hope not, but only real testing will tell.

Monday, April 8, 2019

Money *can* buy happiness

Civ 6 has a new patch, and it has a slew of exciting developments.  First off, Canada got a buff because it was mind bogglingly wretched.  Now it is better!  By which I mean it is still so bad that a civ with 'has no abilities' would probably be equally powerful.  Canada does have benefits, certainly, but they come packaged with two crushing penalties - one, the inability to war on city states or declare surprise wars, and a tundra start bias.  Those penalties are more of a detriment that all of its benefits combined as far as I am concerned, so Canada occupies a unique place at the bottom of the power rankings, even directly after a buff.  Ouch.

Also there are tons of other changes, most of which seem great.  Particularly awesome is the new map search feature that allows players to search for anything on the map.  I love it.  I am struggling to avoid saying "How was this not in the game before?"  I guess I failed at silence.  As usual.

However, there is one really weird thing going on with trading.  The AI was supposedly upgraded in terms of its valuation of things, in part to avoid certain exploits that existed where players could sell single bits of resources for huge sums.  Instead of selling 20 Iron for 60 gold, you could sell 1 Iron for 20 gold, for example, and take all of the AI's money.  In theory they closed that exploit, but now the AI just offers enormous, outsized sums for all kinds of things.

The conversation in the trade screen goes something like this:

AI:  Give me your Truffles!  I want that luxury!

Me:  Sure, give me 120 gold to have my Truffles for 30 turns.

AI:  No deal!

Me:  Okay, how about you tell me what you would give me instead?

AI:  I will give you 30 gold every turn for 30 turns.

Me:  ?!??!?!?

This is constant, basically.  The AI is conservative with raw gold, but it has no hesitation in offering huge gold per turn values for basically anything.  It sees no problem in paying me 900 total gold for a luxury.  In the early game this is leading me (and plenty of other players) to be swimming in gold, buying everything I want with the AI's treasury.  Sometimes I can't even find buyers for my stuff because they are already bankrupt paying me.  I don't even have to do anything 'tricky'.  I just put stuff they want in the window, ask them for an offer, and accept it.

This all seems ridiculous and totally broken.  However, when I asked myself how broken it was I was forced to admit that I have no idea what a luxury is actually worth.  How much stuff can I get for a luxury?  What is the correct price?

So I did some counting.

In the early game a simulated size 6 city is making 4 net food, 13 production, 7 science, 5 culture, no faith, and 12 gold.  A luxury gives one amenity to four cities, and each amenity has a 50/50 shot of having no effect (due to rounding) or pushing the city to a new breakpoint.  The breakpoint gives 5% more stuff (10% more food) so it is worth roughly 4 gold per turn, counting 1 gold as .5 other stuff.  A crappy city in the same era is generating about half the stuff, so if you have four cities, you could expect to get 6 gold / turn value from a luxury.  The AI used to offer about that much for a luxury, which seemed reasonable. 

However, this isn't the whole story.  The breakpoints are usually 2 Amenities apart, but there are three in a row at -1, 0, 1.  Also if you are in the negatives the food penalties are larger than the positive benefits of being happy.  This means luxuries are much better if you aren't happy, and are particularly important right around 0.  At a guess this increases the average value of luxuries by 50%, so in the early game when you have four cities with the best one being around size 6 you could ballpark the value of a luxury at 9 gold / turn.

In an endgame save I have I checked what the value of a luxury would be to my best city and my worst, and assumed those two cities hit a breakpoint and the other two cities the luxury affected missed the breakpoint.  Not a perfect model, but not bad.  This new math put the value of a luxury at a whopping 66 gold / turn!

Even with this new crazy valuation of stuff the AI never offered me anything like 66 gold / turn for a luxury, even though that would be a 'fair' offer.  However, it does mean that when it offers up 30 gold / turn I know that this is a fantastic deal for both sides - the best kind of deal!

So in the late game the AI is actually being totally reasonable in terms of valuing luxuries.  There are still serious problems though.  The first is that it is offering these huge sums in early eras when there is no possible way the luxuries are worth that amount.  It bankrupts itself buying stuff from me, and I can't buy luxuries from it because it demands similarly outrageous sums.

The other problem is that the trade deals are just as silly when it comes to strategic resources like Iron and Horses.  Those are useful, certainly, but there is no world in which they are worth hundreds of gold.  You can always just buy weaker units that don't cost strategic resources like archers or spears and have plenty of success.  At no point is a strategic resource worth the amount of money the AI offers for it.

I hope they patch this soon.  I suspect that it is simply a problem with the value of gold / turn, because the AI is hesitant to give out much in the way of up front gold, and when the AIs are giving gold to each other for disaster relief the gold they give is *preposterous*.  I had one AI that got an emergency declared for them because of a flood and they took in 25,000 gold in donations.  I suspect that is based on the other AIs flooding them with gold / turn because of inappropriate valuations of it.

Likely this is the sort of bug that can be fixed by changing a single constant somewhere in the code.  However, knowing that this is the way the math shakes out certainly tells me that I should be buying luxuries from the AI at 5 gold / turn as often as I can as soon as I am in the midgame and beyond.  I didn't realize how powerful luxuries were at that point, but now that I do I am going to use it.

Friday, March 22, 2019

Ram that submarine

In my quest to find more ways to nerf players relative to AIs in civ 6 I have come upon an old solution:  Remove upgrading.  In baseline Civ 6 you can upgrade units by paying gold, turning a warrior into a swordsman, a swordsman into a musket, etc.  The AI understands this, and it does upgrade its units.  Unfortunately it doesn't understand the policy that reduces upgrade costs by 50%, so players get a massive discount on upgrades and the AI doesn't.  Players also upgrade units that they have carefully levelled up, so they get powerful, fresh, high level units when a new tech unlocks.

So what happens if I just remove upgrading from the game?  When you unlock swordsmen you can't just upgrade a ton of warriors and have a terrifying army - you have to build those new swordsmen.  I tried this in my Civ 5 mod and it failed because unit maintenance scaled with time, not unit type.  The AI kept around those low tech units forever and paid enormous sums of gold to maintain them.  It crushed them because their economy was strained paying for a worthless military.  In Civ 6 though that isn't a problem - those club wielding warriors that are left sitting around aren't much use but they don't cost much either.

This change really stopped me from building up an invincible army.  I managed to promote my units but eventually just disbanded them anyway - that slinger may have 4 promotions, but it will die instantly to an attack from a musket, so no point having it around.  I liked that change, and I liked that I actually had to build new units when they showed up.  It felt better.

There were some silly results though.  At one point I declared war against an AI on another continent and sent my submarines and battleships sailing across the ocean to attack.  I got a massive slew of combat notifications and realized that a fleet of galleys had attacked my submarine.  I don't know what wooden ships sailed by people with clubs thought they were going to accomplish, or how they saw my submarine, but a half dozen of them attacked my submarine in a single turn and all of them sank.  They did some damage to the submarine, so I guess one of them managed to ram it or something....?  When my ground army finally arrived after the naval 'battle' was over, the enemy ran in with a combination of anti tank units, infantry, and horsemen.  Not proper cavalry, no, these were people on horses who didn't even have stirrups or steel weapons.  Unsurprisingly, those horsemen did not contribute much.

I think this sort of thing confuses the AI.  It calculates army strength by adding all combat strengths together, but that isn't a useful metric.  Even if the AI has dozens of galleys and a much bigger total my submarine will sink all of them effortlessly.  Plus war weariness is based on how many units die, so in a modern war the citizens get sad when horsemen die just as much as when tank units die, even if the horsemen are irrelevant to the military outcome.

If I could train the AI to disband outdated units this would be a good solution.  It would allow the AI to maintain better troop parity and prevent invincible high level player armies and silly timing pushes with crossbows and such.  Unfortunately I can't train the AI to disband units (if you screw up teaching the AI to disband stuff the consequences are a disaster, so it is no surprise that it doesn't even attempt to do that) so this isn't an option.  If I want to reduce the strength of player armies I need to go with my earlier solution of reducing experience income or I need to accept that the AI will have swarms of trash units around everywhere.  That is, until a nice, cleansing war comes about and all of their trash units get vapourized.

Tuesday, March 12, 2019

No healing for you

I have been testing out some changes in my Civ 6 mod, with some pretty notable success.  My primary goal is to make the game more challenging in a way that is fun, and that largely speaking means addressing all the spots where the AI is hopeless and the player just rolls over them.  This generally breaks down into three categories.  The first two I have pretty much fixed, but the third is a tricky beast.

The first category is some stuff being terrible.  Endgame buildings are garbage, and clearly were not lined up to see if their cost is appropriate for their effect.  A Water Mill, an early building, provides about 2.5 stuff per turn.  It costs 80 production.  Late in the game you get access to the Food Market, which also provides 2.5 stuff per turn.  So you might imagine it would also cost 80.  Or maybe more, if you don't mind it being weak... say 100 production to build.  It costs 465.  At that rate, it will pay itself off in something like 186 turns.  For a building that should only be around for 50 turns, that is ... an embarrassment.  So my first task was to make sure that all the buildings and wonders are good.  Not good all the time, for any situation, but you should look at everything and think "Well, when I unlock that thing, I am sure going to build it somewhere!"

My version of the Food Market gives 14.5 stuff instead of 2.5.  I still don't bother building them everywhere, but when a city really does need food, the Food Market delivers.

The second category of things is war.  The AI is much weaker than a human player at war, and the primary offender here is healing.  Humans keep their units alive, carefully heal them up, and level them up until they are beasts that the AI can't handle.  One thing you want to constantly do is earn a level but then save it because when you cash it in you get a 50% heal.  The AI doesn't do this, and it just levels right away.  This tactic is devastating because it lets you run units into danger or under fire and get them out alive.  I altered the healing on level to be 10% instead, so it still does something, but you can't just use a stored level to get out of jail free.  I also reduced healing in general from 15/10/5 to 7/5/3.  Lastly I decided to double the amount of experience required to level up, because getting to high levels was too quick.  So how did it work out when I made these changes?

The game is so damn hard now!  Even on Immortal it is a serious problem to win, and I would hesitate to try these changes on Deity at all.  I still obviously try to heal my units, but being out of commission for 10 turns instead of 5 is awful.  I had multiple occasions where my whole army was hurt and I had to flee enemy units and let them pillage and bash on cities so I could heal up.  That difference in turns is far larger than you might think, and requires a drastically larger army to make a comparable push.  That larger army spread out experience more, which leads to more losses, which loses you more experience.  That combination of levelling less, having lower stats, healing slower, and no emergency button ratchets up the challenge, but in a way that I really like.  Instead of the game being insane at the start with the AI having all the stuff, and a cakewalk at the end because you have an army of invincible high level units, you actually have to fight it out all the way through.

It feels weird to be advocating for extra challenge, but the trick is that that I want the challenge to be of a certain type, and apparently that is worth an almost unlimited number of hours.  There is something really fun about cashing in all those good early game decisions for a huge burst of power late game, but the degree to which this happened with combat choices was simply too high.

The third category is policies, in that the AI chooses them randomly and most of them are absolutely worthless at any given time.  It isn't just taking policies that aren't ideal - literally half of the AI's choices have no game effect, and that is a problem.  Fixing it will require a serious rewrite of policies to trim the trash and take highly situational policies and broaden their effectiveness.

Tuesday, March 5, 2019

Open wide

Ferris asked the other day if there is anything in Civ 6 that constrains an empire going really wide by building lots and lots of cities everywhere.  You can always build more settlers and conquer more territory, but the question of whether or not this is a good idea is another thing entirely.  In previous Civ games there were things that kept massive expansion in check, ranging from corruption making far flung cities unproductive to income penalties for each city to global happiness preventing growth.

Civ 6 has things that curtail growth and expansion, like all previous titles.  The difference is that those restrictions are trivial and growth is always correct, whether it be peaceful growth or conquest.  The thing that is obviously supposed to stop growth and snowballing is Amenities.  Unfortunately Amenities don't do the job at all.  Each city gets 1 for free, which encourages going wide.  High population cities don't actually deliver much more in the way of science or culture than low population cities but they do suck up huge amounts of resources in terms of housing, Amenities, and food for growth, so you shouldn't bother building up cities.  Just make new ones! 

Each new city gets that single free Amenity, plus it can build more copies of districts you want, plus it gets its own base tile for free, plus the free Housing from location.  You even get to grab new territory for extra resources of all types.  All of that means that a small city say up to size 4, requires basically no infrastructure, gets to build copies of superb buildings like Monument / Library / Market / University, and then can just start pumping out another Settler to make yet another tiny city doing the same thing.

Conquest is even better than settling though because not only do you get cities that already have stuff in them, you also take stuff away from other players.  The same sort of calculations apply, and although you do end up with cities that have suboptimal builds because the AI made them, you get to pillage the land before conquering it which gives you a huge boost.  In theory the grievances system stops endless conquest because people will hate you, but in practice it is not much of a problem.  You just keep on warring with one enemy at a time, leave them with a single garbage city at the end of the war, and watch that city flip to your control via the loyalty system.

Never stop pumping settlers, never stop warring with whichever neighbour seems most juicy.  Expand until the world is yours.  There is nothing in place to stop you.  Doing this will often lead to your cities running low on Amenities but that actually doesn't matter much because the penalties from not having enough Amenities aren't nearly as bad as the penalties from not having all those cities.

So the tall vs. wide debate is simple:  No matter what victory condition you want, you go as wide as your military can manage, and never stop. 

I don't think this is a good thing.  It encourages snowballing, and means that a good start, or a lucky victory, leads to a world spanning monster that can't be beaten.  It means peaceful games are just foolish games, in terms of winning.  It also means that you shouldn't worry that much about city placement, just jam them in there as much as possible.  I get how some people would like it, but it isn't to my taste.

So how do we fix it?  (Hint:  Not easily.)

You can reduce the benefit of spamming Settlers easily.  Ramping up Settler and Trader costs, reducing base Amenities to 0 instead of 1, and making Housing easier to get are good starts.  You can also make the high end buildings good instead of rubbish, which matters because only big cities can really scrape together the production to build them.  Right now those endgame buildings are garbage, which makes a big city not have much to do because you can only build 1 copy of the high quality early game buildings.  Making specialists good instead of worthless also helps because it means that huge cities can leverage their big population to do specific things - I have modded Specialists to make 5 of their thing (or 10 gold) and suddenly they are really worth using.  Changing all of that stuff makes growing big cities a lot more appealing and spamming crap cities much less so.

But that doesn't fix war.  If Settlers suck, then just build Swordsmen instead and take those cities from the AI!  This is a way more challenging thing to tackle, because the AI is just terrible at war.  I can't fix that, so I am limited to patching the most obvious holes.  Getting rid of Professional Army, which reduces upgrade costs by 50%, is a good start.  This prevents players from trivially rushing to a new unit, upgrading en masse, and crushing the AI.  However, players also use unit XP and healing so much better than the AI it is a serious concern.  Slowing the rate of unit XP gathering or reducing healing rates would dramatically benefit the AI and would make sure that player units die and must be replaced.  That is the core of the problem - player units never die because of superior play, careful healing, and levelling up.  They end up with a massively highly promoted army, while the AI continues to use green troops that they pay full price for.  Break that chain, and war becomes drastically more of a challenge.

Going wide being superior is so deeply entrenched in Civ 6s systems that it is a really hard nut to crack.  Moreover, if you punish going wide too much than AIs that conquer or settle too much territory could respond badly to it and completely fold.  However, it is a thing worth attacking, because right now high difficulty settings are all about the AI getting ridiculous early game bonuses, the player barely surviving, and then in the late game the AI just screws around being an idiot and the player cruises to victory assuming they lived through the early assault.  That isn't satisfying, and I am sure I can do better.

Tuesday, February 26, 2019

Raiding and pillaging

I have finally finished my second full playthrough of the new Civ 6 expansion Rising Storm.  The first time through my main takeaway was that Rock Bands are ridiculous, but this second run has taught me that much of the late game stuff added in Rising Storm is totally worthless.  Rock Bands are great, but Research Labs, Stock Exchanges, Broadcast Towers and the like are pretty much wasted space.

There are three big reasons for this.  The first is that recently pillaging was changed to be more powerful than before.  You can pillage two ways - first, by pillaging things like mines, farms, and camps.  Those can be easily repaired by Builders once you take a city, so you should pillage all of them.  This is incredibly powerful, and with the right policy in place you can easily get 400+ of a resource from a single pillage.  This makes perpetual war highly efficient, because your front line is forever piling up huge income gains as well as territory.  This can be abused by endlessly fighting city states or building cities near enemy territory so they flip and you can pillage and recapture them over and over.  The other way to pillage is to destroy buildings in districts, which also generates huge returns, but is harder to repair.  You can't just endlessly flip city control or repair with Builders to fix that.

So if you want big incomes, you shouldn't be making endgame buildings, you should make cavalry units or coastal raider sea units.  Pillage your enemies mercilessly, because destroying their stuff crushes their economies as well as enriching you far beyond what any mere buildings of your own will create.

The second reason endgame buildings suck is that the science and culture trees are simply too small and too cheap.  I keep ending up in situations where I am researching techs every 2-3 turns, and so building infrastructure that won't pay off for 40 turns is silly - the game will be over.  I also think that 2-3 turn research is a huge problem because it makes the game feel ridiculous when you make a fresh, new unit and it can barely get to the front line before it is obsolete!  I find I usually have tech times in the 10 turn range at the beginning of the game and that feels like an appropriate pace, and at endgame it feels far too rushed.  I am definitely going to go back to modding the costs of techs and civics so that the final ones cost 5 times as much, and the ones in between cost moderately more.  This won't mean 15 turn tech times of course, because having more time between techs gives you more chances to build infrastructure and grow city size, which offsets it somewhat.

Changing tech costs and pillage rewards is easy.  What is more complicated is fixing the third problem, which is that endgame buildings are garbage.  I like to think of buildings in terms of how long they take to pay off after they are built, assuming all yield types are equal except for gold which is half as valuable.  (This isn't perfect, but it is what the game assumes, and it isn't crazy.)  Early buildings like Water Mills go as low as 26, most good buildings like Libraries are in the 36 range, and there are some buildings like Workshops that are in the 95 range, which makes them truly miserable.  Even a Workshop might pay for itself if the game goes long enough though, but endgame buildings both have a limited time window to pay off and also are hideously inefficient.

Example:  The Research Lab gives 3 science, and 5 more science when powered by a power plant.  It costs 580 to build, and 6 maintenance a turn.  It takes 97 turns to pay itself off.  That is far, far too long.  A building that has tons of prerequisities and which can only be around for a short number of turns before the game ends should have a spectacular payoff, not a slow, sad grind to a disappointing finish.  You should build exactly one Research Lab to get the eureka, and then ignore them until the game is over.  Other endgame buildings are similarly disappointing, and honestly I don't know why they are made to be so weak.  It is quite reasonable to argue that a University is superior to a Research Lab straight up, and the University is 43% of the cost.

When I unlock a powerful endgame tool I don't want to think "Oh, that is so much worse than all the other good stuff I already have.  I guess I will build it if I am goofing off and have nothing good to do."  I want to think "I need to get those up in every city NOW."  I also want a game where building huge, developed cities is useful.  Right now the ticket is to spam settlers everywhere and put up a Library and a University if there is time.  That is far more efficient than endgame buildings.

The other problem with endgame buildings is the whole power system that supports them.  You have to carefully place Industrial Zones so that all major clusters of cities are powered if you want to use those endgame buildings, so the payoff for getting fuel, building power plants, and organizing your empire should be significant.  Instead you are actually better off just ignoring all that entirely and building units to steal from your enemies who are foolish enough to build that juicy infrastructure.  Commercial Hubs, Campuses, and low levels buildings are good, and the rest can burn.

I am going to fix this!  When I was modding the base game I greatly improved endgame buildings for similar reasons, and I can work with the power system to do the same sort of thing for the new versions.  I don't want to make it so that you *have* to build big to win, but I want the stuff you unlock to be powerful and exciting.  I want those huge cities with massive investments to really shine.  Time to get to work.

Friday, February 22, 2019

We built this city

In the new expansion for Civ 6 there are all kinds of big features.  They heavily pitched the new disasters system where floods, volcanic eruptions, and other catastrophes change the course of the game, but one small footnote in the expansion seems likely to create huge changes - Rock Bands.  Rock Bands unlock late in the game and require Faith to purchase.  They get promotions of various kinds, and they have to travel to other civilizations to play concerts at Universities, Theatre Squares, Entertainment Complexes, and wonders.

Rock Bands that hold a concert generate a bunch of tourism and have a chance to disband after every concert.  Successful concerts lead to level ups, unsuccessful ones leads to disbands.  The higher level the Rock Band, the more the tourism gains and the lower the chance to disband.

This all sounds fine.  But!

The key to the bit is always the numbers.  How *much* tourism do Rock Bands generate?  Is it worth it?

The answer for my first playthrough was *A LOT* and *YES*.  I build five Rock Bands when they unlocked at an average cost of 800 Faith each.  Four of those bands disbanded quickly, generating a few thousand tourism, which was a weak investment, but no great disaster.  However, that fifth group had some successful concerts, levelled up to maximum, and then started playing gigs for 15,000 tourism each.  Rock Bands move fast around the map, so I was playing a gig every 3 turns or so.  That is 5,000 tourism per turn.  My entire civ generated 1,000 tourism per turn, and I was on my way to a tourism victory at the time.  It seems obvious that if you want a tourism victory you don't need great works, or to worry about tourism from other sources - just make sure to build a ton of holy sites to generate a huge faith bankroll, then make swarms of Rock Bands to rock your way to victory.

Rock Bands do other hilarious things too.  They can get a promotion that gives them 50% of their tourism gains in gold, and so I experimented and was able to easily get bands giving me 2,500 gold per turn each.  You can also cause a -50 loyalty penalty to a city in which they play, and I used that to effortlessly cause the capital city of another civ to leave their civ just by playing three gigs within its territory on three consecutive turns.

So the problem here isn't that Rock Bands are good for tourism victories.  They are *way* too good, and the entire game becomes about getting to them and then just winning, but at least that is what they are supposed to do.  The real problem is that they are absurd at everything else.  It doesn't matter what victory condition you are going for, 2,500 gold / turn will help a ton, so you should spec some Rock Bands for gold generation.  If you want extra cities (and who doesn't?) then you spec them to be rebels and cause enemy cities to flip so you can capture them via loyalty or force.

Civ 6 is already easy in the late game.  The AI just can't handle most of the endgame systems, and this is even more true now than it was before with the new Power Plant system that came in with the expansion.  But Rock Bands feel like cheat mode.  Once you get them, you will just win a tourism victory, no stopping it.  Also you have outrageous cash so you can buy military units or buildings or whatever else you need to keep yourself safe.  Plus you can wreck whole civs by flipping their big cities.  I think Rock Bands were meant to be a fun, thematic add on, and a way to spend faith in the late game to do cultural stuff.  Instead they are a super overpowered feature that totally wrecks the game the moment it shows up.

I am going to spend some time abusing it and laughing at how silly things become, but eventually I am going to have to mod that shit.

I have to give credit for Rock Bands in that they have fun promotions, the graphics work, and overall they are an enjoyable feature from a feel perspective.  But the balance of them is totally off, in a way that you can't ignore.  Somebody really needs to hire me to look at the numbers that get put into fields in games before they get shipped, I think.

Tuesday, January 8, 2019

Red card on the play

After weeks of holiday celebrations and Farmageddon I am finally back to working on Civ 6.  My latest project is figuring out how to make Military policy cards less of a disaster for the AI.  Military cards by and large have the issue that they are appropriately powerful for a player but woefully underpowered for an AI.  For example, many of them provide a 50% production increase towards a specific kind of unit, like cavalry.  When a player researches Knights they will quite sensibly put that card into play for 10 turns, have a bunch of their cities produce Knights during that 10 turns, and then swap the card out again, probably forever.  The card was good at what it did, but that goodness required the player to build around it.

The AI, unfortunately, will put that card on and get barely anything out of it.  It will have that card on and not be building much in the way of military units, or just building the wrong kinds so the card does nothing.  It definitely never capitalizes by swapping its whole empire around to use the card most effectively.  The average case for the cavalry boosting card is pathetic when it is used randomly.

This isn't true for all the cards.  Many economic cards do things like boosting the science output of all science buildings, and you can put that on pretty much any time you like and it will be useful.  You may still want to optimize it of course, but the AI can't go too wrong with that type of bonus.  Military cards are a particular problem because they fall into one of two categories - either they are only useful when you are actively fighting, or they are niche bonuses to certain types of production.  Neither of those are universally applicable so they end up being wasted.

My first thought on this was to change the nature of the Military cards.  Instead of '+50% to cavalry production' I could make it '+25% to cavalry production and +1 production on stables.'  It is still a fine card for a player to use, and at least the AI will get something out of it if it gets equipped randomly.  I need to be careful of what exactly I attach those bonuses to though, because the AI builds districts and buildings kind of randomly.

The other problem with attaching generic bonuses to cards like this is that there are a lot of these cards and it would feel kind of odd to have all of them get flat bonuses.  I do like the idea of cards having really different feels to them, but this runs up against the problem that the AI has no idea how to use wildly varying card bonuses so things have to be generically useful if we want the AI to present a challenge.  It might be balanced to have all the Military cards have weak unique bonuses and all say '+1 production in all cities' but it doesn't *feel* great, and that matters too.

I think I need to do some research on what sorts of things the AI builds so I can get a grasp on just how big the bonuses would need to be on specific buildings to help the AI out.  I don't want to make Military cards all overpowered for the player so it is a tricky line to walk.  With some time spent examining AI empires at various stages of the game though I can build some basic estimates for what they have available and try to hack something together.

Wednesday, December 19, 2018

Artificial happiness

In my quest to make the AI in Civ 6 better I have hit a snag.  Much of my efforts thus far have been focused on making terrible decisions into reasonable ones so that the AI won't be so outclassed, but I have run into a structural problem I don't quite know how to solve.  The AI simply does not recognize and attempt to solve happiness problems.

Nearly every civilization I have conquered in my past couple of games has had huge problems with rebels spawning around its cities and mulching its army as well as pillaging its tiles.  This only happens when you don't pay enough attention to happiness and find ways to get amenities to make your people happy.  The AI does try to purchase luxuries from me, but eventually they get mad at me for some reason and then refuse to trade, even when they desperately need what I have to offer.  They also flat out don't build Entertainment Complexes, which are a necessity for keeping a large empire functional.

In my last game I witnessed 4 of 5 AIs having huge happiness problems to the extent that they were swamped with rebel units.  When I finally conquered the entire world I checked and discovered that not a single AI had ever built a single Entertainment Complex.  They just sat there with terrible happiness problems and ignored it, and that ruined their empires.  After I took their cities I built many Entertainment Complexes in the conquered territories to support my expansion - it is not difficult to do, but they ignored it completely.

This undoes me in several ways.  One, I can't do much to make the AI better if it insists on being an idiot like this.  I know for sure I can't fix its terrible combat planning, but I had thought at least I could make economics work better.  I also tried some changes out where I reduced the bonus Amenities in each city from 1 to 0 in order to tone back Infinite City Spam strategies (I buffed Entertainment Complexes to 2 base Amenities to compensate, and promote more developed cities) but that just made things worse for the hapless AI.

I don't need much to work with.  I just need an AI that chooses to build the district that makes happiness when it has happiness deficits.  I can fix the rest with simple numerical changes!  But right now I don't even have that.

I really want to fix this.  I hate that the way the AI is buffed at higher difficulty levels basically makes the early game absurd in the favour of the AI, and then it plays so badly that you are nearly guaranteed a win in the late game if you manage to get there.  I want the early game to be much more fair so the player can actually get a religion or build a wonder if they really want, but have the AI present some kind of reasonable challenge later on.  Right now I am kind of lost in how to promote that.