Moving Train Slaves to the Slave Lord faction trait

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?    o_O

Thanks.

 

 

 

 

4,046 views 5 replies
Reply #1 Top

Actually, Quendar Blood will only give +50% against Fire and -50% against Ice.       

Code: xml
  1. &lt;SelectedAbilityBonusOption&gt;TrainSlaves&lt;/SelectedAbilityBonusOption&gt;

is a Quendar Sovereign trait, while

Code: xml
  1.        &lt;SelAbilityBonusOption&gt;SlaveLord&lt;/SelAbilityBonusOption&gt;

is Quendar faction trait. You could add both or neither to either a Sovereign or Faction (or better to say Race).

 

What you should do concerning slave units is define one for each faction you want able to train them, and add them to their race_type as starting unit type:

       

Code: xml
  1. &lt;StartingUnitType&gt;Faction1_Slave&lt;/StartingUnitType&gt;

 

in the appropriate units file, you can make prereq for that unit based on race (so no other race will get them which was I believe your problem), and assign to them:

     

Code: xml
  1.   &lt;SelectedAbilityBonusOption&gt;Slave&lt;/SelectedAbilityBonusOption&gt;

 

 

 

 

 

Reply #2 Top

@OP you are essentially correct, that _other which makes an extra button when designing units (male/female/_other) you can only have one per faction. However, there is nothing stopping you from ignoring that button and just making a unit design available based on a faction ability. The player can then edit that unit and make new design.

Reply #3 Top

OK cool thanks i've done a bit more testing and as suggested it works quite ok to give extra units such as Unit_Peasant_Generic as a StartingUnitType... and if they are designable you can then edit the default one and save as something else to create new units.  Just limited to the one "Other" type, which is a bit of a shame but not a major drama.

King_Felix - that "TrainSlaves" ability doesn't do anything other than add the flavor text, I just modified the SlaveLord trait instead:

<!-- Modify SlaveLord, add slave units -->
<AbilityBonus InternalName="SlaveLordAbility">
  <AbilityBonusOption InternalName="SlaveLord">
  <Description>Razing a city transfers half that city's population to your capital. When men or fallen are defeated in combat they are transferred as population to your nearest city. Also allows the faction to train slave units.</Description>
    <GameModifier>
      <Provides>Allows the faction to train slave units.</Provides>
    </GameModifier>
  </AbilityBonusOption>
</AbilityBonus>


Just need to figure out a way to block the <GenericUnitType_Other>Generic_Slave</GenericUnitType_Other> from appearing for Quendar, so I can then design a custom Quendar faction that doesn't have slaves at all.  Need to block this so that the "Slave" option doesn't appear on the new unit screen.  If anyone has an idea on how to achieve that without modding the core files or completely re-declaring the entire <RaceType InternalName="Race_Type_Quendar"> I would love to hear it?  (not sure it's possible myself).

Thanks.   :grin:

Reply #4 Top

Try defining a new _other in the raceconfig (the faction). It may overwrite the racetype's.

Reply #5 Top

Quoting Heavenfall, reply 5
Try defining a new _other in the raceconfig (the faction). It may overwrite the racetype's.

It really doesn't... I have the racetype defined in my female henchmen mod with <GenericUnitType_Other>...</GenericUnitType_Other>. I think the only way is to modify the core files themselves.

An alternative (although it would be a mess) is to define a new race_type and create a whole new faction. But that is almost an entire rewrite of things.