How Do I Make City-States Not Gift Certain Units?

Mr. Spiffy

Chieftain
Joined
Mar 5, 2016
Messages
20
Location
Tennessee
My custom civ relies heavily on a unique unit that has the production of that era's world wonder. Some one recently pointed out to me that this unit could be gifted to any civ by certain militaristic city-states if they are lucky enough to get them. This is game breaking in a lot of ways.

How do I make my unique unit off-limits to city-state gifting? If this isn't possible, could I instead make this unit a unique great person?

These units provide extra-length golden ages, so it would be really bad if someone were to continuously receive them as if they were just regular units. I also need a way to make it to where the golden age turns that they give the player are not affected by golden age modifiers from Chichen Itza.

I know it's a tall order. If some one can just tell me if any of this is possible, I'd be grateful for just that.
 
How do I make my unique unit off-limits to city-state gifting?
Without a modded DLL, with difficultly.

City States will NOT gift ranged units, recon units (default AI type of UNITAI_EXPLORE) or units that are only defensive.

A unique great person will not help you - as City States can gift those if you have the correct policy
 
Without a modded DLL, with difficultly.

City States will NOT gift ranged units, recon units (default AI type of UNITAI_EXPLORE) or units that are only defensive.

A unique great person will not help you - as City States can gift those if you have the correct policy

Thanks, that was a quick and easy fix! The AI never used them the get golden ages when I put the default AI on UNITAI_ARTIST anyway.

Now if I can fix the situation with Chichen Itza, I'll be in the clear. Could I just use lua to prevent it from being built by my custom civ?
 
Now if I can fix the situation with Chichen Itza, I'll be in the clear. Could I just use lua to prevent it from being built by my custom civ?

Search these forums for "PlayerCanConstruct"
 
Once the CS has picked it's unique unit, allies will receive it based only on them having the prereq tech and not having the obsolete tech. No other conditions (resources, game events, etc) are tested.
 
I mean how does it pick a unique unit? At random?
At random yes but only if the Unique Unit for the civilization doesn't exist. Like said if a city-state is granting hoplites, then you know that Greece isn't an active civilization in this game.
 
It also doesn't have to be a unique unit for any civilization, either - simply a unit that's not the default type of its class. That's why you can get City States offering Foreign Legions and Landsknechte on occasion.
 
Top Bottom