Dynamic Unique Units
What it does: This mod allows you the ability to set unique units for different players. Without getting too technical, rather than drawing the player's unique units from the XML, it's now done internally from within the SDK, so you can add and remove them as you please.
New XML Tags
<FirstUnlockUnit> - This assigns a Unique Unit to be assigned to the first player to research this tech. If the player already has a unique unit in this unit class, it will pass over this player and assign it to the next player to research (or be gifted) this tech. See below for further moddable restrictions...
<UnlockUnit> - This assigns a Unique Unit to be assigned when a player builds a Wonder. If the player already has a unique unit in this unit class, the unit will not be assigned to this player. Players who conquer other players with Wonders that give UUs will get the UUs for themselves. See below for further possible restrictions...
<UnlockUnit> - This assigns a UU to a player when a particular event occurs. Works just the same as any other event feature. Like the others, if the player already has a unique unit in this unit class slot, the player will not get the unit.
MAX_ASSIGNED_UNIQUE_UNITS - This sets a limit on how many unique units a player can have per game. This value is the most important of the global defines. A value of -1 means unlimited UUs for all players. A value of 0 means no UUs for any player. Once a player has reached the maximum number of UUs, later techs or buildings that unlock UUs will not give anything if you research or build them.
NOTE: The techs give UUs to the first to discover them. If you have a limit on the number of unique units per player, then it's not considered to be "the first" and the next player with a free unique unit slot will get the unit. (This has no effect on any other "first to discover receives" items the tech might give). If there are more than one player on a team, the game will try to assign a unique unit to the discoverer of the tech. If the discoverer is inelligible, it will try with the other teammates.
UPDATE_UNITS_ON_UU_ASSIGNMENT - This causes the game to automatically update all of your default units from the UU unit class (if you have any) to unique units when you unlock a new UU.
LIMIT_UU_WONDER_CONSTRUCTION - This causes you to be unable to train a Wonder that gives a unique unit if you have already reached your maximum number of UUs as defined in the first global definition.
Demo: The demo mod included in the zip file removes the unique units for all civilizations and instead makes them acquireable through technologies (and one through a Wonder). I couldn't find tech spaces for all of the units, and it's a little silly to have the Aztecs fighting with Numidian Cavalry, but hey... you go to war with the unique units you've got and not the unique units you wish you had. It's just a proof of concept mod.
[BtS] Dynamic Unique Units 2016-10-05
[BtS] Dynamic Unique Units