Controlling city state gifted units

Belzhorash

Warlord
Joined
Oct 24, 2008
Messages
222
Location
Germany
Hello!
Is there a way to control what city state gifts what unit to a civilization?
My goal is to implement several militaristic city states that gift some of "their special" units.
Does anyone know where to look? That should be Lua-controlled, shouldn't it?

Thanks in advance!
 
I do wonder how myself, as for my Wonders of the Ancient World Deluxe scenario I cleared the UnitClassOverrides table of civs that weren't in the scenario, yet City-States were still offering Cataphracts and the like.
 
I do wonder how myself, as for my Wonders of the Ancient World Deluxe scenario I cleared the UnitClassOverrides table of civs that weren't in the scenario, yet City-States were still offering Cataphracts and the like.
What happens if you eliminate not only all the Civ-Overrides but the extra unused units themselves ? Or have you not tried that?

In the case you mention the units still might be considered as qualifying under the Firaxis logic because (1) they are not the default unit in a class, and (2) they are not assigned to a civ that is active within the game.
 
I didn't try it, as it is just an idle curiosity. But I do expect it begins with units that do not belong to their own class. However, IIRC, I do have a few mods in which these kinds of units exist (a dummy Foreign Legion that belongs to the FL class), but have never known them to be offered by city-states (could just be luck of the draw, or some other factor determines what units are offered).
 
Player.GetMinorCivUniqueUnit
Player.IsMinorCivHasUniqueUnit
Player.SetMinorCivUniqueUnit
 
I didn't try it, as it is just an idle curiosity. But I do expect it begins with units that do not belong to their own class. However, IIRC, I do have a few mods in which these kinds of units exist (a dummy Foreign Legion that belongs to the FL class), but have never known them to be offered by city-states (could just be luck of the draw, or some other factor determines what units are offered).

I have had these units be gifted. Various City States whose "special unit" is a gatling gun or knight.
 
I have had these units be gifted. Various City States whose "special unit" is a gatling gun or knight.
You'll get this sort of thing when you as the player don't have the tech requirements for a special unit. Hovering over the City-State's trait-type (Militaristic) in the city-state pop-up will tell you what unit and what conditions are required (usually a specific tech), otherwise you get a generic unit, like a Swordsman or a Horseman.

In my current game it is telling me Sofia will give me a Mehal Safari if I have the Rifling Tech. Ethiopia is not in the game I am playing.

So far as I've ever seen, units that are <Cost>-1</Cost> or are "falsed" by default in an lua PlayerCanTrain or CityCanTrain seem not to be chosen.

I'm 'falsing' my Knights Templar unit in a PlayerCanTrain, and I've never seen the unit given by a CS nor heard any feedback saying the unit was given by a CS. The unit is setup as its default within its own class, it is made untrainable via the PlayerCanTrain, and is only acquired through lua unit-creation as a result of building a specific wonder.

Player.GetMinorCivUniqueUnit
Player.IsMinorCivHasUniqueUnit
Player.SetMinorCivUniqueUnit
LastSword for the win!
 
Top Bottom