Race Type Creation for Custom Factions

I've recently got into some basic modding for Legendary Heroes, as it's truly an excellent game and what I've waited for ever since War of Magic came out all those years ago.   I've been working on a somewhat basic custom faction I've had a lot of fun playing--which I plan to release on some point--but I've kind of hit a brick wall on my XML editing.

 

I'm not very well versed on how to create custom race types for said faction.

 

I managed to look at a few other faction mods and mod in the ability to train Iron Golems as a trait, and have done some other minor XML editing to said race (changing the background and animations on the character select screen, etc), but this particular thing seems a bit more complex than anything I've done previously.  I've seen hints of it in the CoreRaceTypes and other .xml files, but I can't figure out how it all fits together logically.

 

The goal is to have a race type that has a 25% bonus to magical staff damage and a 25% bonus to spell damage.   (The Faction's attributes are Scholars, The Decalon, and the ability to train Iron Golems with the drawback of no armour.  Essentially it's a conclave of mages that have preserved much of the ancient pre-Cataclysm knowledge (so their libraries naturally have copies of the old Decalon on file), and rely on the golems to provide a defensive screen for their mages).   In addition and probably more ambitious is that I'd like to give them a special combat ability--kind of a magic shield skill that lasts until their next action, but has some kind of cooldown.

 

Not only can I not quite figure out the format of how all of this fits together (the CoreRaceTypes files I've seen only have things like sample units and the like, not the abilities of said races), but exactly what triggers the game responds to in XML, so I could add abilities that do that; if it's even possible.

 

Is there some kind of guide around that shows how all of this works, or perhaps some utility that organizes it all?   I've looked around at FENexus and the forums and can't find anything that directly answers my questions, but the fact that a lot of you gentlemen here clearly can do what I describe (Such as the most excellent 'Fervor' mod, of which I've been studying its inner workings for the past few days), I was wondering if someone could give me a little assistance as to what to do, or even where to look.

6,914 views 5 replies
Reply #1 Top

Here is the code I used to make an ability for magic damage, you can probably use the gamemodifiers/ability for your race traits. (staff damage is another thing however, but this will increase that magic damage as well) (PM me if you have any "Simple questions" how to make it work)

https://forums.elementalgame.com/447412/page/1/ from this mod: (Rise of the Conclave Army)

Code: xml
  1. <AbilityBonuses>
  2. <AbilityBonus InternalName="RecklessMagic_Ability">
  3. <AbilityBonusType>Unit_Level</AbilityBonusType>
  4. <AbilityBonusOption InternalName="Reckless_Magic">
  5. <DisplayName>Reckless Magic</DisplayName>
  6. <Description>+25% Magic Attack,-35% Defense and -1 hit point per level</Description>
  7. <Icon>Ability_Reckless_Icon.png</Icon>
  8. <GameModifier>
  9. <ModType>Unit</ModType>
  10. <Attribute>AdjustUnitStat</Attribute>
  11. <StrVal>UnitStat_Attack_Fire</StrVal>
  12. <Multiplier>1.25</Multiplier>
  13. <Provides>+25% Fire Attack</Provides>
  14. </GameModifier>
  15. <GameModifier>
  16. <ModType>Unit</ModType>
  17. <Attribute>AdjustUnitStat</Attribute>
  18. <StrVal>UnitStat_Attack_Cold</StrVal>
  19. <Multiplier>1.25</Multiplier>
  20. <Provides>+25% Cold Attack</Provides>
  21. </GameModifier>
  22. <GameModifier>
  23. <ModType>Unit</ModType>
  24. <Attribute>AdjustUnitStat</Attribute>
  25. <StrVal>UnitStat_Attack_Lightning</StrVal>
  26. <Multiplier>1.25</Multiplier>
  27. <Provides>+25% Lightning Attack</Provides>
  28. </GameModifier>
  29. <GameModifier>
  30. <ModType>Unit</ModType>
  31. <Attribute>AdjustUnitStat</Attribute>
  32. <StrVal>UnitStat_Defense_Pierce</StrVal>
  33. <Multiplier>0.65</Multiplier>
  34. <Provides>-35% Defense</Provides>
  35. </GameModifier>
  36. <GameModifier>
  37. <ModType>Unit</ModType>
  38. <Attribute>AdjustUnitStat</Attribute>
  39. <StrVal>UnitStat_HitPoints</StrVal>
  40. <Value>-1</Value>
  41. <PerLevel>1</PerLevel>
  42. <Provides>-1 Hit Point per Level</Provides>
  43. <AIData AIPersonality="AI_General">
  44. <AIPriority>5</AIPriority>
  45. </AIData>
  46. </AbilityBonusOption>
  47. </AbilityBonus>

Reply #2 Top

That was immensely helpful.   I now have the AbilityBonus worked out for my Silune faction in a way that pleases me (I took a bit of inspiration as adding the -1 hitpoint per level as a balancer that you had in yours because it fits my 'frail scholarly mage' theme.)

Code: xml
  1. <AbilityBonus>
  2. <AbilityBonus InternalName="Blood_Sihal_Ability">
  3. <AbilityBonusOption InternalName="Blood_Sihal">
  4. <DisplayName>Sihal Blood</DisplayName>
  5. <Description>+25% Magic Damage, 10% Experience, and -1 Hit Point per Level</Description>
  6. <Icon>Action_StudySpells.png</Icon>
  7. <GameModifier>
  8. <ModType>Unit</ModType>
  9. <Attribute>AdjustUnitStat</Attribute>
  10. <StrVal>UnitStat_Attack_Fire</StrVal>
  11. <Multiplier>1.25</Multiplier>
  12. <Provides>+25% Fire Attack</Provides>
  13. </GameModifier>
  14. <GameModifier>
  15. <ModType>Unit</ModType>
  16. <Attribute>AdjustUnitStat</Attribute>
  17. <StrVal>UnitStat_Attack_Cold</StrVal>
  18. <Multiplier>1.25</Multiplier>
  19. <Provides>+25% Cold Attack</Provides>
  20. </GameModifier>
  21. <GameModifier>
  22. <ModType>Unit</ModType>
  23. <Attribute>AdjustUnitStat</Attribute>
  24. <StrVal>UnitStat_Attack_Lightning</StrVal>
  25. <Multiplier>1.25</Multiplier>
  26. <Provides>+25% Lightning Attack</Provides>
  27. </GameModifier>
  28. <GameModifier>
  29. <ModType>Unit</ModType>
  30. <Attribute>AdjustUnitStat</Attribute>
  31. <StrVal>UnitStat_ExpBonus</StrVal>
  32. <Value>10</Value>
  33. <Provides>+10% Experience</Provides>
  34. <GameModifier>
  35. <ModType>Unit</ModType>
  36. <Attribute>AdjustUnitStat</Attribute>
  37. <StrVal>UnitStat_HitPoints</StrVal>
  38. <Value>-1</Value>
  39. <PerLevel>1</PerLevel>
  40. <Provides>-1 Hit Point per Level</Provides>
  41. </GameModifier>
  42. <AIData AIPersonality="AI_General">
  43. <AIPriority>5</AIPriority>
  44. </AIData>
  45. </AbilityBonusOption>
  46. </AbilityBonus>

That being said, I don't have the faintest idea how to make it a racial ability.  In looking at sample CoreRacetypes files, I don't see any connecting call that gives a race their abilities.  Just skin colors, sample units, music themes, etc.

My big question is how does it all fit together and work?   I'm obviously missing something big here; I just can't figure out exactly what.

 

Reply #3 Top

A bit of an update.   I've been messing around with the FE Race Editor and made a template race, and then copy/pasted my blood ability into the generated race, and it shows up in game just fine.

 

The problem I'm having is that any race I generate with FE Editor doesn't seem to have a head, or access to any kind of clothing.   Which is...mildly alarming, to say the last.    Is this a known issue with this program, and--if so--is there any way to correct it?

Reply #4 Top

This is the reason you don't see a lot of custom new races. After you create the actual race, you have to go into most wearable items and add them into the list of supported model types.

For instance, in CoreClothes.xml:

Code: xml
  1. <GameItemType InternalName="Air_Monks_Robe">
  2. <DisplayName>Air Monk Robe</DisplayName>
  3. <Type>Torso</Type>
  4. <Type>Surcoat</Type>
  5. <Type>Head</Type>
  6. <Subtype>Clothes</Subtype>
  7. <CanBeEquipped>1</CanBeEquipped>
  8. <ArtDef>Air_Monks_Robe_ArtDef</ArtDef>
  9. <GameItemTypeArtDef InternalName="Air_Monks_Robe_ArtDef">
  10. <GameItemTypeModelPack InternalName="Air_Monks_Robe_Default">
  11. <IconFile>AirMonkRobe.png</IconFile>
  12. <SupportedUnitModelType>AmarianFemale</SupportedUnitModelType>
  13. <SupportedUnitModelType>AmarianMale</SupportedUnitModelType>
  14. <SupportedUnitModelType>EmpireFemale</SupportedUnitModelType>
  15. <SupportedUnitModelType>EmpireMale</SupportedUnitModelType>
  16. <SupportedUnitModelType>FallenMale</SupportedUnitModelType>
  17. <SupportedUnitModelType>HenchmanMale</SupportedUnitModelType>
  18. <SupportedUnitModelType>KingdomFemale</SupportedUnitModelType>
  19. <SupportedUnitModelType>KingdomMale</SupportedUnitModelType>
  20. <SupportedUnitModelType>QuendarFemale</SupportedUnitModelType>
  21. <SupportedUnitModelType>QuendarMale</SupportedUnitModelType>
  22. <SupportedUnitModelType>UrxenMale</SupportedUnitModelType>
  23. <SupportedUnitModelType>WraithFemale</SupportedUnitModelType>
  24. <SupportedUnitModelType>WraithMale</SupportedUnitModelType>
  25. <GameItemTypeModel>
  26. <ModelFile>Gfx\HKB\Clothes\K_Male_Robe_Mesh_01.hkb</ModelFile>
  27. <Texture_All>Gfx\HKB\Clothes\K_Male_Robe_Texture_01.png</Texture_All>
  28. <AttachmentType>Skinned</AttachmentType>
  29. <Color_Clothing1>176,135,80</Color_Clothing1>
  30. <Color_Clothing2>200,200,200</Color_Clothing2>
  31. </GameItemTypeModel>
  32. <GameItemTypeModel>
  33. <ModelFile>Gfx\HKB\Clothes\K_Male_Hood_Mesh_01.hkb</ModelFile>
  34. <Texture_All>Gfx\HKB\Clothes\K_Male_Hood_texture_01.png</Texture_All>
  35. <AttachmentType>Skinned</AttachmentType>
  36. <Color_Clothing1>200,200,200</Color_Clothing1>
  37. </GameItemTypeModel>
  38. </GameItemTypeModelPack>
  39. </GameItemTypeArtDef>
  40. </GameItemType>

You would need to add 

Code: xml
  1. <SupportedUnitModelType>YourRaceMale</SupportedUnitModelType>
  2. <SupportedUnitModelType>YourRaceFemale</SupportedUnitModelType>

You would have to do that for every wearable item you want them to use, including heads!