Testing of King units

White_Knight

Chieftain
Joined
Dec 21, 2004
Messages
26
There's been an ongoing discussion in a couple of threads about the properties of King units. I thought I'd run some simple tests to determine what's going on. The following is a description of my testing scenario (so it can be reproduced, if desired) and the results of the testing.

The player, America, is in a locked war with Germany, set to max aggression to ensure they will attack. The Germans get several cities, a Bismarck in their capital (which will be necessary when testing the Regicide modes), spearmen for defense, and a pile of archers with which to attack. They have no horses or iron, so the worst we'll see is archers and spears. They are 30 tiles away across a land bridge so we'll know where they're coming from, and so we'll have a chance to prepare before they arrive.

We get two cities: Warriorville and Horsopolis. Warriorville begins with 2 warriors, Horsopolis has 2 horses. Warriors upgrade to swords (we start with Iron Working) and horses to knights (these now require Masonry, which we also start with). There is a source of horses near Horsopolis, and we don't have iron hooked up yet but there is one close to Warriorville that can be hooked up in 10 turns or so. This will give us a chance to build a few units that we can upgrade, just in case things go obsolete when we have the right resource (as Finn said he observed). Warriorville contains our King, Lincoln, and both cities have a spearman for defense.

Swordsmen have the King flag (but not the King AI strategy), while Knights have both the King AI strategy and the King flag. In addition to the units we will be building, there is a modified Statue of Zeus in Warriorville that will spawn a Swordsman every 3 turns, and a modified Knights Templar in Horsopolis that spawns Knights every 3 turns. Both of these require iron, so there shouldn't be any units coming out of them until we're ready. I'll be renaming units appropriately to keep track of who is who (i.e. upgraded Swords vs. spawned Swords vs. enslaved Swords).

Speaking of which, enslavement is on, with Swords generating Swords, and Knights generating Knights. From previous testing I have a fairly good idea of how enslavement with Kings works, but I'm including it to be comprehensive. Also, in the spirit of covering all the bases, Finn mentioned that he had his King unit set as the "Flag unit" under general settings, and I did the same with my Knight to see if that had any effect. The difficulty is set at Regent, not that this really matters much (all it does is affect how fast the AI builds units). Upgrade costs are 1 gold per shield, to make things easier.

I ran the scenario four times: once with neither Regicide flag turned on, once with Mass Regicide on, once with Regicide on, and once with both on. In all cases my game play was the same, both in terms of build orders and unit actions.

The following results were obtained, regardless of the presence of Regicide mode flags:
- The player cannot build Knights or Swordsmen.
- The player can upgrade Horseman to Knight.
- The player can upgrade Warrior to Swordsman.
- A spawned Knight does not defend first when stacked with a Horseman.
- An upgraded Knight does not defend first when stacked with a Horseman.
- An enslaved Knight does not defend first when stacked with a Horseman.
- A spawned Sword does not defend first when stacked with a Warrior.
- An upgraded Sword does not defend first when stacked with a Warrior.
- An enslaved Sword does not defend first when stacked with a Warrior.

In no case were any differences observed in the behaviour of the Knight or Horseman, so setting one of them as the "Flag unit" appears to do nothing. The AI is also not preferentially targetting Kings in battle; it's just as likely to attack a Warrior on a Mountain as a Swordsman on plains even though their apparent defense values should be quite similar.

I am not sure at this time how to prevent units from being automatically named "President Lincoln" (or whatever the ruler's name is) when they are created. In C3C you can rename them so it isn't that much of a problem. If anyone knows how to alter this behaviour I would really like to know.

When Mass Regicide alone is turned on, when the initial King unit is killed, the game continues. Though not unexpected, this is confirmation that to eliminate an opponent in Mass Regicide, all of their kings must be eliminated - not just those that they started with.

From the player's viewpoint, having the King AI strategy flagged on appears to make no difference in the abilities of the Kings, nor does having the "disband" flag toggled. However, to make the AI protect their Kings when either of the Regicide modes are enabled, the AI strategy flag should probably be on, and this means the unit cannot be disbandable. When both Regicide modes are turned off, having the AI strategy flag turned on will likely make the AI keep their Kings in their cities. Whether or not this is the desired behaviour will dictate what the status of the AI strategy flag should be.

Thoughts? Comments? Questions?

Edit:
As FinnMcCool has just reported, King units can still be attacked first when stacked with other units, if the attacker has the "Stealth Attack" ability. I have still not been able to reproduce his result of a King unit appearing in the build queue after an appropriate upgradable unit is built, but I will keep trying.
 
WhiteKnight, my hat is off to you. Your results are very comprehensive, and they reinforce what we intuitively predict from the EditorHelp prog (which is so sadly lacking in any real insight--that prog must've been written on a weekend after a huge heavy bout of drinking and they were all lazy...) :cool:

I re-tested the scenario in question, and again once Bagdad (with a Barracks) builds the Immortal, it disappears, and Shiek appears in the build-queue! Automatically, in fact. I made no choice to upgrade, it merely appeared automatically. This is in direct opposition of what I'd expect from a unit marked King. Not only unbuildable, but far down the track in AI priorities.

I'm reminded of the fact that if you set any gov to have "Corruption NONE" what you actually get is "corruption MAXIMUM" and everyone familiar with this accepts it as a simple code glitch. If I've tied up my flags to the point where even a King unit can be built, perhaps it shows up first in the build-priority because of some code issue.

I'm presently creating a test scenario very similar to yours, in order to properly test the king attribute in the build-queue. But I'm not reassured, since this involves a UU, the whole golden age issue, and a way-too-cryptic description of what king does in the Help prog...

Good work, WhiteKnight, I hope I can add test results in a day or two.
 
Edit:
As FinnMcCool has just reported, King units can still be attacked first when stacked with other units, if the attacker has the "Stealth Attack" ability. I have still not been able to reproduce his result of a King unit appearing in the build queue after an appropriate upgradable unit is built, but I will keep trying.


WhiteKnight's playtesting is very encouraging, since what started me on this whole merrygoround was my desire to give Immortals the combat bonus that a King gets. I think it'll work. If I flag Immortals as king, they can't be built (more on that below...) but they will be defended by lesser mortals. Neat. I think I've figured out the way to give Swordsman the upgrade to Immortal, it will mean giving the Celts the Amazon (2.1.2 w/blitz at Bronze Working) and pushing the Gallic Swordsman to Feudalism w/amphibious. I can't get the image of 50s classic movies about swashbucklers being red-haired Celts, and after all, the Spanish coastal docktowns were inhabited with the remnants of what the Celts were. Hard to keep the Celtic culture alive in this game, since after all, IRL they disappeared into the foliage. But I digress...

WhiteKnight:
What actually happens, is that a King unit isn't "in the build queue" at all. In fact, I've never seen it as an option to build one; it only happens if I'm building the Immortal in a city w/barracks where I'm upgrading an Immortal to Sheik.

Bagdad has 2 Immortals, and is building an Immortal. Has a barracks, and upgrades 1 Immortal to Sheik. Sheik is flagged "king" so cannot be built, except for some reason the Immortal being built in Bagdad is changed to SHEIK! This happens ONLY on the turn of the upgrade; the Immortal I upgrade becomes a Sheik, and the Immortal I'm building is changed to Sheik in the build window, but Sheik NEVER appears in "the queue" (the popup list.)

I think it's a glitch. But that's the only way I've found to build a King. Timing.
 
Back
Top Bottom