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.'

No comments:

Post a Comment