Would this idea work? Fooling the AI part #372

Virote_Considon

The Great Dictator
Joined
Jul 7, 2004
Messages
9,453
Location
Skaville UK Reputation: 1
For a few of my scenarios, I wish to limit the availability of workers. Naturally, the easiest way to do this would be to make a small wonder or an improvement requiring the palace to produce workers, and not let them be built manually.

But what I also want to do is make the workers civ-specific and to have upgrade lines. On the face of it, this would require 1 of said improvements/small wonders per civ per unit. Which wastes a lot of those cherished improvement/wonder slots!

To get around this, I was thinking of doing this:
1. Only one main improvement, requires the palace, produces immobile terraform unit which upgrades to the respective civ-specific lines
2. The worker units aren't king units (so they can still be captured). They require more population to build than is physically possible to achieve in the scenario. This would pose problems of its own, but:
3. Set all civ's "Build None" preference to include workers.

Due to #3, this would mean they do not build workers ever. What I want to know is would this also stop them upgrading to such units? And is there something I might be missing with this format?
 
If the workers could be upgraded from a generic form to a superior form then I think you're rosy. Not sure if they need necessarily be immobile units for this to work. I'm not in front of a civ loaded computer at the moment, but I seem to remember that there were some limitations on the AI flags that could be set for immobile units. I'm not sure you'll be able to set them as terraformers if they're immobile. And, in my experience, the AI is not always terribly good at upgrading units from one type to another - it prefers to upgrade, for instance, an attack unit to a superior attack unit. All the units in the vanilla game are simple - the attackers upgrade to better attackers, the defenders upgrade to better defenders etc. (someone correct me on that if you like ;)).

Moving into supposition - I think it's all dependent on the strategy that the AI assigns to the unit when it is first built or generated. If you have a unit in the editor flagged with both attack and defend then it appears in the build list (in debug mode) twice, once as the attack flag version and once as the defend flag version. The AI assigns strategy when the unit is first built (in fact, even before it is built - it builds a unit for a specific role), and I don't think the strategy ever changes - even if the unit is upgraded. Therefore, I suspect that if the terraform flag cannot be set on the first unit, then either it will never be upgraded, or the upgraded version of the unit may never be used to terraform once it is upgraded to.

As I said, all supposition and hearsay, so ignore the above paragraph if you want! :)

Note - set the Palace to train veteran units too, so there's no restriction on the AI upgrading the units. You don't want the small wonder pumping out immobile workers and the AI not upgrading because it's not built a barracks in it's Capital.
 
I just checked -- immobile workers function in game; they can terraform but not move.

Best,

Oz

The problem with an immobile AI worker is different:

To receive the terraform strategy, the worker needs the "join-city"-flag. The AI normally has no use for an immobile worker, other than to join the city. The immobile worker must be placed in a city, otherwise there is no change of upgrading that unit. So for the AI there always is the danger of loosing the precious worker unit by joining to the city.

That´s why in CCM the immobile unit, that upgrades to many different workers for different civs, is set to another strategy than terraform (or settle). The immobile unit needs a strategy, otherwise the AI has a certain tendency to kill that unit, even if the "disband, goto and explore" options are disabled. And to make the problem even more complex in testing: It seems, that different civs (especially Egypt) act different to handle this problem.
 
The problem with an immobile AI worker is different:

To receive the terraform strategy, the worker needs the "join-city"-flag. The AI normally has no use for an immobile worker, other than to join the city. The immobile worker must be placed in a city, otherwise there is no change of upgrading that unit. So for the AI there always is the danger of loosing the precious worker unit by joining to the city.

That´s why in CCM the immobile unit, that upgrades to many different workers for different civs, is set to another strategy than terraform (or settle). The immobile unit needs a strategy, otherwise the AI has a certain tendency to kill that unit, even if the "disband, goto and explore" options are disabled. And to make the problem even more complex in testing: It seems, that different civs (especially Egypt) act different to handle this problem.

:worship:

Interestingly, Way Back When When I Was Experimenting With What Units The !@%$#!! AI Builds, I noticed subtle differences for Egypt, Rome, and Greece -- and that was after I had set all their Civilzation attributes to be the same.

Best As Ever,

Oz
 
Top Bottom