King Units

Plotinus

Philosopher
Retired Moderator
Joined
Nov 14, 2003
Messages
17,172
Location
Somerset
Here's a small problem that I can't see mentioned anywhere else. I want to make some unique, non-buildable units into King units, primarily to ensure that they are the last units to defend a city. Regicide and Mass Regicide are turned off. Everything works fine, except that in game, the units have the same name as the civilisation's leader! Is there any way to avoid this?
 
At the risk of suggesting something simple that you've probably tried already, why not simply rename them in the editor ;)?
 
From my experience, if you have a king unit at game start, it will be named after the civ leader, but if its auto produced by city improvements / wonders, it will be named correctly by what you have in the editor (only those produced after the first turn).
 
If they're pre-placed, I'd definitley(SP) do what Rob suggests, and just rename them in the editor...

@Madeira: I've found that when spawned by imps/wonders, king unitsdo have the same name as the civilization leader :(

I guess one way to get around this problem if they are spawned would be to give them the "leader" flag, so that at least they can have different names...
 
You mean give them names on the map as well as in the Units tab of the Editor? I hadn't thought of that.

[Virote] Since you asked, it's definitely!

Thanks for the tips!

Yes, and if you upgrade a named unit to a not buildable king unit, the name of that unit stays, too. That´s the setting of later aircraft carriers and elite troops in SOE.

Another way is to upgrade a normal unit to a king unit in games with random maps. But here I noticed, that from time to time such a king unit, which should be unbuildable by a civ, was built. Of course Regicide and Mass Regicide were disabled.
 
Yes I made a mistake, its not the wonder that spawns the "king unit", it spawns an unbuildable standard unit which can be upgraded to the king unit and the name is correct.
 
In EFZI2, The Pre-placed Units are named on the Map and in the Editor. Some are placed and named without being a King Unit and Upgrade to a King Unit. Others start as a King Unit and Upgrade to a King Unit with different Stats. An example is the Pre-placed "Secret M1 Mech" which Upgrades to "M1 Mech Operational". Both are King Units and listed in the Editor and Text Files.
King Arthur (King Unit) upgrades to Sniper King Arthur (King Unit). It is easiest to name the pre-placed Units on the map and have them Upgrade to the King Units you have named in the Editor. The Text Files (Civilopedia) is used to explain the units as well as state that they are King Units....defending Last. Sniper King Arthur will remain "King Arthur" when Upgraded...so keep in mind the Unit names that will fit both the starting and Upgrade Units.
 
Another question:

I want to upgrade regularly buildable units to King units, is that possible?

Background: I have lots of Battleships in my epic mod, but they aren't buildable from a certain tech on. I do want to make them upgradeable, though, without allowing them to be built from scratch. Example: USS Iowa (regularly built) -> USS Iowa Korean War upgrade (upgrade only) -> USS Iowa modernized (upgrade only).

How are the correct settings in the editor? How do you make sure the earlier unit is not buildable any more?
 
Ares de Borge... There is no problem Upgrading a Unit that can be built to a King Unit but preventing the the previous Unit from being built is the problem.
The Upgrade is handled the same as you would for any Unit with what ever resources, advances and prerequisites you want. Just Flag the King Unit settings for the Upgrade.

A possible work around for the previous unit that Upgrades to the King Unit could be a Wonder that produces them and later becomes Obsolete rather than setting the units where they can be built...if there will be more than one of them in the game.

You could also Pre-place the previous Units on your map, name them and set them as Not able to be built by not flagging "highlighting" any CIV in the Editor to be able to build them or set a Resource such as "Unobtainable" as a prerequisite that is not available in the game so you could flag the CIV you want to have them in the Editor and still prevent them from being "Built". The units can be set on the Map where they belong to what ever CIV you want. These pre-placed units do not have to be King Units to Upgrade to a King Unit.

IF it is a one of a kind single unit, I would pre-place it and if you do not want it used in the game until later, you could set it up as a unit that is immobile (as if being built but not yet completed) inside a "City" and then set a resource or prerequisite to be able to "Upgrade" it to Functional or completed when you want it to be seen and able to be used. This would be Two of the Same Unit added to the Editor with different settings...The "Functional" Unit would then Upgrade to the King Unit later with yet another prerequisite.

Because King Units cannot be built, they do not prevent a previous unit that upgrades to them from continuing to be built so you will have to be creative in how you deal with this.

The main thing I do not like about King Units is that they do not Fight until they are the Last Unit so they cannot be used to guard another unit. Sometimes this is a good thing depending on how the unit is intended to be used.
 
You could also use a "go between" unit here. For example, you could also place an aircraft carrier at this tech, and either the king upgrades to the carrier (without the upgrade flag), or the carrier upgrades to the king (again, without the upgrade flag), although I forget which way round it is ATM...
 
Let me get that straight. This means if I have some WW1 ships, I could implement an unit called "Docked for upgrade" (NO civilization checked - why?) that is accessible at a certain tech, let's call it "Battleship Modernization". All WW1 Battleships (that are regularly built) upgrade to this unit first, then to all the King units that follow in the chain, right?

Like:

Tech: WW1 --------------> Battleship Modernization
Units: WW1 Battleships ---> Docked for Upgrade ---> Ship 1 ---> Ship 2 etc.

Is that correct? Why must "Docked for Upgrade" not be available for any Civ?
Will this method reach the following goals:

- WW1 ships MUST be buildable (no preplacing, wonders etc)
- By reaching "Battleship Modernization", all WW1 ships are unable to be built
- They can be upgraded if there are units already built

?

Btw, thanks for your help!
 
No, the "docked for upgrade" will need to be able to be built, so I'd suggest using a unit who is going to be in the rest of the game to be placed at this point.

Also, I'm not sure if the order would be:
WWI -> Docked for Upgrade -> King 1
or
WWI -> King 1 -> Docked for Upgrade

So that would need testing. If it was #2, then I think you'd need to make sure that the upgrade chain lasts with the king units...
 
That's creating more problems than solving, since the "Docked for Upgrade" unit would be buildable all the time.

How about this:

WW1 BB (buildable) ---> WW1 upgrade (King, no upgrade checked) ---> WW2 BB

If the WW1 upgrade comes at the same tech as the new WW2 ships, would that mean you could upgrade WW1 ships to their refitted King versions, but not to the WW2 BB? Or would the WW1 ships just ignore the stopgate king unit and directly upgrade to the WW2 BB anyway?
 
This is an interesting thread, although a bit confusing :p
I have an example im currently using:

A peasant unit with both offensive (so the ai will upgrade it) and worker flags, its unbuildable, auto created by a city improvement, upgrades to a settler which is unbuildable because it has the king flag. This way, both the player and the ai will only be able to buils settlers by having the gold to upgrade the peasants.

In the tests I did ages ago, this could only be done if the peasant was auto created by a city improvement, something prevented it from being built, think it was because settlers replaced the peasants since they had the same tech requirement of none, but since settlers were a king unit, they couldnt be build and the peasants neither because they were obsolete.

Any way to have peasants be built normally and be upgraded to settlers if you have enough gold?
 
Ares de Borg... I want to correct my test conclusions to spare you time and trouble...It seemed to work well when I tested it, however after testing again, it will Not prevent the Original Unit from being built unless the "Inbetween Unit" (Docked For Upgrade) is set for the CIVs that you want to have it. When I was testing everything I had some different game settings that caused me to fail to see that the original unit could continue to be built..."Docked For Upgrade" sounds Good but this will all just cause problems because you do not want the Original Unit to be built later Nor the Inbetween Unit to be able to be built at all. Unless the Inbetween Unit is set to be Buildable in the Normal way with the (CIVs Highlighted), it will Not prevent the Original Unit from continuing to be built as it Upgrades to the King Unit.
Virote_Considon is correct and I can say that the correct Place for the King Unit would be the Final Unit used if you wanted to set up and use the Buildable inbetween unit because if the inbetween unit is set as a King Unit, it will not prevent the original unit from being built.

The easiest work around for "Special Units" that are one of a kind is to pre-place them and have them Upgrade to the Unit wanted. In your game situation, this can be set up by pre-placing the one of a kind WW1 Battleships that are set as Immobile and explained in the Civilopedia as under construction or something to that effect. These Immobile Units can then be made Functional by gaining Advances that allow them to Upgrade to Functional WW1 Battleships (same Units but set as additional Units with functional settings). Those Units can then Upgrade again to Modern Battleships with later Advances. This would all prevent Building any of those units and allow them the Upgrades would be King Units that cannot be built.

Upgrades for Many Units should be handled as the Game handles Upgrades...unless you want to make an Improvement or Wonder that will prevent the Unit from being built as they are produced. They will then Upgrade as a King Unit so they cannot be built and the CIVs can be selected that can have them so this shows in the Civilopedia.

Madeira... IF you want the Peasants to be able to be built at the same time as they can be Upgraded to a Settler without causing the Peasants to be obsolete and therefore Not buildable, you can either set them as auto produced as you already know or you can use the "inbetween unit" approach.

1. Peasants - set as buildable, CIVs that can build them are Selected (Highlighted), The Inbetween Upgrade Unit is set in the Upgrade Slot and the Upgrade Box is Checked.

2. The Inbetween Upgrade Unit - No CIV is selected (Not Highlighted) to be able to build them and the Upgrade Box is NOT Checked. Type the Settler Name in the Upgrade Slot and I recommend 0 Cost so the Cost will only show the cost for the Settler. Use the same prerequisite as you want for the Settler Unit so it will Upgrade immediately to the Settler.
Note...You can simply use the same "Peasant" or Settler Unit as the Inbetween Unit, named differently with the different settings. Actually, the "inbetween" unit does not need to make sense because it will not be seen or known about anyway.

3. Set the Settler as a King Unit and check "Settle" under "AI Strategies" and "Build City" and "Join City" under "Worker/Engineer Actions".

Naturally, you can set either the Peasants and or the Settlers to have Offense and or Defense ...or other settings as you prefer.

What you will see in the Civilopedia when you look at the Peasant Unit is that it Upgrades to the Settler. It will Not show the inbetween unit because it was Not Selected (Highlighted) for any CIV. The Peasants will remain Buildable.
 
Back
Top Bottom