Alternate Historical AI Personalities

How do Historical AI Personalities work in the code for civs? Is it limited to just one per civ? Would it be possible to add additional “clone” civs that aren’t selectable by the player in Skirmish (to avoid having duplicate Home Cities for no reason)?

The reason I ask is because I am wondering if it is possible to add new historical AI Personalities for existing civs for Skirmish/MP mode: where a civ can have multiple different leaders from its history to choose from.

I was wondering if it would be possible to do this and tweak the existing ones for giving players different playstyles using the same civ. One example for European cubs would be to add leaders from different time periods who can focus on either “archaic” or “modern” units and also have different HC builds.

So instead of Napoleon using Crossbowmen and Pikemen, he can be tweaked to favor Artillery, Musketeers, and Skirmishers, while someone like Henri of Navarre or Francis I emphasizing archaic infantry. Likewise for Italy having either Giuseppe Garibaldi using more Musketeers and Bersaglieri vs Cesare Borgia using mostly Pavisiers and Papal Units; Queen Elizabeth can favor Longbowmen and Pikemen or Queen Victoria could use Redcoats, Cannon, and Native Units.

You can adjust likewise for other civs. Yongle Emperor can represent the Ming in build order/HC, while Kangxi can represent the Qing. The United States can either have Washington favoring admitting states from the early Republic and Abraham Lincoln could favor states admitted in the mid 19th century.

That said this all depends on if it’s possible to make multiple AI Personalities using the same civ without messing with the player in Skirmish. Any thoughts on this?

Thanks!

3 Likes

It’s a very interesting idea that was probably better suited to the original developers of the engine, but it’s definitely possible the way you’re describing.

You mentioned some things for the AI which are definitely doable, but also kind of a lot of work since it’s specific to each civ. At a bare minimum you can pretty easily make new personality variables for each one. This includes stuff like how likely they are to rush or boom, what their army composition favors, and whether they like to use the native settlements. I imagine the AI personalities will actually be the easiest part of all this.

  1. Create a “base” AI with adjustable variables. There’s an extremely wide range of possibilities — it can be so precise that you can tell the AI to move the explorer to the center of the map at 5 minutes mark, which doesn’t make sense but that’s how much the AI is customizable.
  2. Create multiple personalities for your civ of choice. Let’s say Napoleon and Louis XIV (because why not :person_shrugging:)
    2.1. Each personality has to be released as a separate mod based on the base AI.
    2.2. Each personality has their own values for the adjustable variables. For example, you can make Napoleon prefer cavalry.
  3. Make sure people understand how it works and buckle up for when they complain or mess something up and you gotta help them.
  4. Be ready to maintain that. 2×22=44 AI personalities (assuming 2 per civ).
  1. There’s already enough variables in DE’s AI. They could always add more but there’s plenty to start with.
  2. I guess that’s the easier way, though the way @PopperFett is describing is to copy/paste a civ changing only the personality of it. It’s definitely possible even though the list is going to get pretty long by the end of it.
  3. :man_facepalming:

Is there a way to “clone” civs in Skirmish so there’s multiple options for the same civ (for example, to allow a player to face both Napoleon and Louis XIV), at least in a way that doesn’t mess with the player’s HCs?

Also why do they need to be released separately? I was hoping it could be released as a mod pack…

Thanks for your help and explaining nonetheless!

  1. Have you tried changing them? We tried it at some point in WOL and we failed miserably. “Oh you set btRushBoom = 1.0? KEKW nah I’m just gonna sit here for 6 minutes before I age up.” I guess the base AI itself was too bad. We relied on some randomized cheats to compensate.
    Rest assured, though: I scratched all of that at made the AI work as closely as possible to the vanilla AI (except for Te Rauparaha, of course)
  2. Yeah that’s a lot of work. As you said, it’s possible, but there’s a lot to do.
  3. Don’t make me constantly update the description, y’all!

Yeah. That’s possible, but you have to clone a lot of things:

  1. Clone the civ itself.
  2. Clone the civ’s homecity.
  3. “Clone” the voices for each unit that has specific voices for the civ (for example: Settler, SettlerWagon, Musketeer, etc. etc.)
  4. You most probably have to tweak some more things.

I’ve never ever modded anything in DE apart from some custom triggers and some AI scripts, but it would be fantastic if you can flag a civ as invisible (<main>) but make its AI visible. Otherwise, people would have a bunch of duplicates (French, French, French for Napoleon, Louis XIV and… someone else). But that’s a non-issue since you can change a clone civ’s name anyway.

It was only for the case I described, where there’s only one civ and a bunch of personalities use it. You can’t have multiple personalities use the same civ, so you gotta put them as separate mods.

Thanks for the interesting topic ^.^

  1. I guess I haven’t tried messing with them from that end. I use them myself to add some variability. In my case though the differences are really obvious, like a civ biased toward natives will spam canoes.
  2. Still sounds easier to me than making 22 separate mods!
  3. It doesn’t even show up on the in-game mod browser if you’ve already subscribed to a mod. Plus plenty of people won’t read past the title anyway.

People manage to do this accidentally so it must be possible!

  1. That’s nice. But, even if it doesn’t work, it shouldn’t be hard to fine-tune some stuff.
  2. Nah it’s only .personality + the corresponding loader containing the variables. The developer experience is fantastic in this case, probably even easier than making stringtable mods. The user experience not so much.

lol you caught me in 4K

:joy: that’s ro relatable!

1 Like
  1. Agreed. I will say, though, I have a vague memory of the DE devs tweaking the values from patch to patch by small values (like +/-0.2), so if my memory is correct they might have done a lot to improve those variables.
  2. Fair enough. I guess it’s up to @PopperFett how crazy he wants to get with this idea.