In the meantime i've been trying to make it possible to buy allies unique units and came up with this string below. I tried to make a new unit, that mimics the original UU but for another civ where there are requirements to both unlock technology and be an ally of owner civ. Sufice to say it doesn't work probably due to modifier string. Am having trouble coming with a modifier, that checks if a target civ is an ally. I searched all the tables with effects such as but see none, that could fit in my mod. The closest I could find was
EFFECT_ADOPT_ALLY_FOUNDED_RELIGIONS
Is there any way to add effects?
<GameInfo>
<Types>
<Row Kind="KIND_TRAIT" Type="TRAIT_CIVILIZATION_BORROW_UNIT"/>
</Types>
<CivilizationTraits>
<Row CivilizationType="CIVILIZATION_JAPAN" TraitType="TRAIT_CIVILIZATION_BORROW_UNIT"/>
</CivilizationTraits>
<Traits>
<Row Description="LOC_UNIT_POLISH_HUSSAR_DESCRIPTION" Name="LOC_UNIT_POLISH_HUSSAR_NAME" TraitType="TRAIT_CIVILIZATION_BORROW_UNIT"/>
</Traits>
<TraitModifiers>
<Row>
<TraitType>TRAIT_CIVILIZATION_BORROW_UNIT</TraitType>
<ModifierId>STANDARD_DIPLOMATIC_ALLY</ModifierId>
</Row>
</TraitModifiers>
<Modifiers>
<Row>
<ModifierId>STANDARD_DIPLOMATIC_ALLY</ModifierId>
<ModifierType>MODIFIER_PLAYER_DIPLOMACY_SIMPLE_MODIFIER</ModifierType>
<CivilizationType>CIVILIZATION_POLAND</CivilizationType>
<SubjectRequirementSetId>PLAYER_ALLY</SubjectRequirementSetId>
</Row>
</Modifiers>
<Units>
<Row Description="LOC_UNIT_POLISH_HUSSAR_DESCRIPTION" Name="LOC_UNIT_POLISH_HUSSAR_NAME" TraitType="TRAIT_CIVILIZATION_BORROW_UNIT" Cost="250" PurchaseYield="YIELD_GOLD" MandatoryObsoleteTech="TECH_RIFLING" Combat="55" Maintenance="3" PromotionClass="PROMOTION_CLASS_HEAVY_CAVALRY" PrereqCivic="CIVIC_MERCENARIES" FormationClass="FORMATION_CLASS_LAND_COMBAT" Domain="DOMAIN_LAND" ZoneOfControl="true" BaseSightRange="2" AdvisorType="ADVISOR_CONQUEST" BaseMoves="4" UnitType="UNIT_POLISH_HUSSAR"/>
</Units>
</GameInfo>