Hi All,
OK so I want to remove the ability to train slaves from the Quendar blood trait and add it instead to the Slave Lord faction trait.... making it a faction trait rather than a blood trait. The idea being to allow custom factions (of any race) to select SlaveLord faction trait and then be able to train slave units. Had partial success, few problems... hoping someone experienced in this area might be able to offer some insight (because in a nutshell I don't think it is feasible).
So what I have done is...
1) Added the "Generic_Slave" as a <GenericUnitType_Other>, and "Unit_Peasant_Generic" as a <StartingUnitType> to all the <RaceType>'s, by including this in my mod folder for each race:
<RaceType InternalName="Race_Type_Altarians">
<GenericUnitType_Other>Generic_Slave</GenericUnitType_Other>
<StartingUnitType>Unit_Peasant_Generic</StartingUnitType>
</RaceType>
2) In my mod folder, added a new definition for "Generic_Slave" and "Unit_Peasant_Generic" UnitType, they are copy/paste from the install version, except I added the following prereq:
<Prereq>
<Type>AbilityBonusOption</Type>
<Attribute>SlaveLord</Attribute>
<Target>Player</Target>
</Prereq>
Outcome...
Well the starting unit restriction (on the Unit_Peasant_Other) works fine. If you have SlaveLord you start with a Peasant Militia unit, if you don't have SlaveLord then you don't get it.
The problem is adding the Generic_Slave as a <GenericUnitType_Other> to all races. The SlaveLord AbilityBonusOption restriction doesn't seem to work, what happens is even if you don't have the SlaveLord trait, you still get the option to choose "Slave" when creating a new custom unit. The other problem is that if you give SlaveLord to a race such as Altarians, it overrides their ability to select henchmen from the new unit design screen, it shows Slave instead, even if the faction doesn't have the SlaveLord trait.
So seems to be I have hit 2 problems:
i) You can only have one <GenericUnitType_Other> per race 
ii) If you add a <GenericUnitType_Other> to a race, and the Unit in question has a prerequisite <AbilityBonusOption>, it doesn't seem to stop the GenericUnitType_Other from showing up in the new unit design screen.
In a nutshell, the way things are now.. it seems to me that you're basically restricted to have one unit type that can be designed per race. i.e. you can have Henchmen OR Slaves OR Jugs etc. And its tied to the blood type, it isn't possible to change the "other" unit type in the design screen based on a faction trait.
Sound correct?
Am I making any sense?
Thanks.