Adding Trained Units to Race Traits

I'm fairly new at modding this game, and absolute awe at how well FE has made a spiritual successor to Master of Magic, one of my all time favorite games. That being said i plan to be here a while. So with that said, on to my question.

 

I've setup a new blood racial ability (coreabilitys) but i can't seem to find anywhere where to add in the ability to train specific units. I've found a few posts on the forum, but they are very confusing and not very specific about what files i'm editing and where the code is. I've used the Race editor 0.45 and that works fine, though i was able to do roughly the same thing without it (took alot longer though). Yet i cannot find anywhere to add "TrainJuggernaunts" or "TrainHenchmen" abilitys. Could anyone give me a step by step on this, or at the very least let me know where i need to go to edit this? Even better, can anyone show or point me in the right direction of creating a new ability that would allow me to add any unit to the race as a trainable unit such as this race can train dragons or this race can train ogre's? I have a few mods in mind but im stuck on this one. Any help would be most appreciated.

3,137 views 2 replies
Reply #1 Top

Well i'm no expert but i'm doing a bit of this at the moment.  It depends what you want to do exactly... in particular if you want to be able to Design the new unit.

For example, if you want something like the Cult of 1000 Eyes ability, where it lets the faction train spiders in cities (but not "design" the spiders, i.e. customise their abilities/equipment) then it's relatively easy.  Have a look in CoreUnits.xml and you'll see the Unit_BoundWidow and other trainable spider units... note they have a prereq like this:

<Prereq>
   <Type>AbilityBonusOption</Type>
   <Attribute>CultofaHundredEyes</Attribute>
   <Target>Player</Target>
</Prereq>

So if you want to be able to train dragons, you could copy the UnitBoundWidow entry in CoreUnits and change it to a dragon (copy relative textures, stats etc from a Dragon in CoreMonsterUnitTypes.xml file).

That's basically it.

If you want to be able to design the unit as well, it gets a bit more complicated.  Basically to make the unit designable you add <CanBeDesigned>1</CanBeDesigned> to the UnitType.  That's simple enough, but bear in mind that giving a unit armour/weapons might cause problems if it's not based on the standard K_Male_Skeleton_01 skeleton.  Just have a look at how Slaves, Henchmen and Jugs are setup in the CoreUnits.xml and it should make sense.

 

 

Reply #2 Top

A race's unittypes are always unlocked or not. The trainhenchmen and trainjuggernaut stuff are literally just visual aids. If you want to add a unittype to a race, simply add it like any other to the racetype.

If you want to use the method for a faction's traits, look at the bound widows and such.