How to add a new faction/champion?

Hey there! I've been trying this (awesome) game since release and I'm just loving it! I'm a great fan of Civ and HoM&M games and I'm just loving this game and would like to create mods for it.

 

I'm creating with a friend of mine a Game of Thrones mod for this game and got the numbers ready and some units, everything on paper. I learnt stuff looking at Stormworld mod and so, but still can't make the game to recognize a new faction created by me.

 

Could anyone give me some help? Like where to put the .xml for the game to look at it (already got the Mod enabled).

 

Thanks in advice! As soon as I can make this I will post a pre-Alpha of the Game of Thrones mod that I think you all will enjoy it. Thanks in advice! <3

4,752 views 4 replies
Reply #1 Top

MyDocuments/MyGames/FallenEnchantress/Mods or MyDocuments/MyGames/FallenEnchantress/Race.

There is a faction editor why not just use that. It will automatically place stuff in MyDocuments/MyGames/FallenEnchantress/Race.

Also units created in-game are placed in the MyDocuments/MyGames/FallenEnchantress/Units file.

There is a race editor kicking around as well. https://forums.elementalgame.com/433305.

Reply #3 Top

To make a new race (different from faction), you need three things. These things are connected to each other on a deep level.

The three files you'll want to copy from are CoreRaceConfigs.xml, CoreRaceTypes.xml and CoreUnits.xml.

CoreRaceConfigs.xml contain the factions. Each faction belongs to a specific race. If you want to make a new race, you must also make a new faction.

CoreRaceTypes.xml contains the races.

CoreUnits.xml contains the units that belong to a race. Here you'll find templates for custom sovereigns, unit designs, shopkeepers and more.

Beginning at the top of the hierarchy, here's an example of a RaceType. I will bold certain sections and add comments behind them to express important notes.

    <RaceType InternalName="Race_Type_Altarians"> <!-- the InternalName is the unique identifier for races. You'll need to change this to something new -->
        <DisplayName>Men</DisplayName>
        <RaceClassification>Men</RaceClassification>
        <UnitScale>1.0</UnitScale>
        <UnitSkinColor>215,150,100</UnitSkinColor>
        <UnitHairColor>155,110,75</UnitHairColor>
        <MaleUnitType>Generic_Sovereign_Altarian_Male</MaleUnitType> <!-- Here you see the RaceType linking to several UnitTypes. -->
        <FemaleUnitType>Generic_Sovereign_Altarian_Female</FemaleUnitType>
        <GenericUnitType_Male>Generic_Altarian_Male</GenericUnitType_Male>
        <GenericUnitType_Female>Generic_Altarian_Female</GenericUnitType_Female>
        <GenericUnitType_Other>Generic_Henchman</GenericUnitType_Other>
        <TraderUnitType>TraderTest</TraderUnitType>
        <StartingUnitType>Unit_Henchman_Bard</StartingUnitType>
        <StartingUnitType>Unit_Henchman_Shieldman</StartingUnitType>
        <StartingUnitType>Unit_Henchman_TorchBearer</StartingUnitType>
        <StartingUnitType>Unit_Peasant_Altarian</StartingUnitType>
        <StartingUnitType>Unit_Peasant_Altarian_AI</StartingUnitType>
        <StartingUnitType>Unit_Pioneer_Altarian</StartingUnitType>
        <StartingUnitType>Unit_Archer_Altarian</StartingUnitType>
        <StartingUnitType>Unit_Archer_Altarian_AI</StartingUnitType>
        <StartingUnitType>Unit_Archer_Altarian_AI2</StartingUnitType>
        <StartingUnitType>Unit_Archer_Altarian_AI3</StartingUnitType>
        <StartingUnitType>Unit_Archer_Altarian_AI4</StartingUnitType>
        <StartingUnitType>Unit_Horseman_Altarian</StartingUnitType>
        <StartingUnitType>Unit_Horseman_Altarian_AI</StartingUnitType>
        <StartingUnitType>Unit_Defender_Altarian</StartingUnitType>
        <StartingUnitType>Unit_Defender_Altarian_AI</StartingUnitType>
        <StartingUnitType>Unit_Defender_Altarian_AI2</StartingUnitType>
        <StartingUnitType>Unit_SpearMaiden_Altarian</StartingUnitType>
        <StartingUnitType>Unit_Spearman_Altarian</StartingUnitType>
        <StartingUnitType>Unit_Catapult</StartingUnitType>    
        <StartingUnitType>Unit_Scout_Altarian</StartingUnitType>
        <StartingUnitType>Unit_Light_Altarian</StartingUnitType>
        <StartingUnitType>Unit_Light_Altarian_AI</StartingUnitType>
        <StartingUnitType>Unit_Medium_Altarian</StartingUnitType>
        <StartingUnitType>Unit_Medium_Altarian_AI</StartingUnitType>
        <StartingUnitType>Unit_Medium_Altarian_AI2</StartingUnitType>
        <StartingUnitType>Unit_Medium_Altarian_AI3</StartingUnitType>
        <StartingUnitType>Unit_Medium_Altarian_AI4</StartingUnitType>
        <StartingUnitType>Unit_Medium_Altarian_AI5</StartingUnitType>
        <StartingUnitType>Unit_Medium_Altarian_AI6</StartingUnitType>
        <StartingUnitType>Unit_Heavy_Altarian</StartingUnitType>
        <StartingUnitType>Unit_Heavy_Altarian_AI</StartingUnitType>
        <StartingUnitType>Unit_Mage_Altarian</StartingUnitType>
        <StartingUnitType>Unit_Magic_Light_Altarian_AI</StartingUnitType>
        <StartingUnitType>Unit_Magic_Light_Altarian_AI2</StartingUnitType>
        <StartingUnitType>Unit_Magic_Medium_Altarian</StartingUnitType>
        <StartingUnitType>Unit_Magic_Medium_Altarian_AI</StartingUnitType>
        <StartingUnitType>Unit_Magic_Heavy_Altarian</StartingUnitType>
        <StartingUnitType>Unit_Altarian_AI1</StartingUnitType>
        <StartingUnitType>Unit_Altarian_AI2</StartingUnitType>
        <StartingUnitType>Unit_Altarian_AI3</StartingUnitType>
        <StartingUnitType>Unit_Altarian_AI4</StartingUnitType>
        <StartingUnitType>Unit_Altarian_AI5</StartingUnitType>
        <StartingUnitType>Unit_Altarian_AI6</StartingUnitType>
        <StartingUnitType>Unit_Altarian_AI7</StartingUnitType>
        <StartingUnitType>Unit_Altarian_AI8</StartingUnitType>
        <StartingUnitType>Unit_Altarian_AI9</StartingUnitType>
        <StartingUnitType>Unit_Altarian_AI10</StartingUnitType>
        <StartingUnitType>Unit_Altarian_AI11</StartingUnitType>
        <StartingUnitType>Unit_Altarian_AI12</StartingUnitType>
        <StartingUnitType>Unit_Altarian_AI13</StartingUnitType>
        <StartingUnitType>Unit_Altarian_AI14</StartingUnitType>
        <StartingUnitType>Unit_Altarian_AI15</StartingUnitType>
        <SageUnitType>Sage_Altarian</SageUnitType>
        <ShopkeeperUnitType>Shopkeeper_Altarian</ShopkeeperUnitType>
        <MusicTheme>WanderersHome</MusicTheme>
    </RaceType>

Next up is the UnitTypes that belong to a race. The file is now CoreUnits.xml. In the RaceType above I bolded the Generic_Sovereign_Altarian_Male so let's go find that in CoreUnits.xml:

    <UnitType InternalName="Generic_Sovereign_Altarian_Male"> <!-- again the internalname has to be something unique and new if you are making a new race. Keep in mind this InternalName has to be mirrored in the RaceType as it is above.-->
        <DisplayName>Altarian Sovereign</DisplayName>
        <Class>Sovereign</Class>
        <CreatureType>Champion</CreatureType>
        <RaceType>Race_Type_Altarians</RaceType> <!-- this serves no specific purpose other than to show what Race the unit belongs to in-game in Unit Details-->
        <CanBeDesigned>0</CanBeDesigned>
        <Gender>Male</Gender>
        <HasWages>0</HasWages>
        <IsSovereign>0</IsSovereign>
        <HasEssence>1</HasEssence>
        <GameModifier>
            <ModType>Resource</ModType>
            <Attribute>Unrest</Attribute>
            <Value>-10</Value>
            <Provides>-10% Unrest in the city this unit is in</Provides>
        </GameModifier>
        <GameModifier>
            <ModType>Player</ModType>
            <Attribute>AbilityBonus</Attribute>
            <StrVal>A_FactionPrestige</StrVal>
            <Value>0.5</Value>
            <PerLevel>1</PerLevel>
            <Provides>+0.5 Faction Prestige per Level</Provides>
        </GameModifier>
        <LevelMilestone InternalName="L1">
            <Level>1</Level>
            <UnitStat_Accuracy>75</UnitStat_Accuracy>
            <UnitStat_CombatSpeed>22</UnitStat_CombatSpeed>
            <UnitStat_ChanceToCrit>1</UnitStat_ChanceToCrit>
            <UnitStat_HitPoints>15</UnitStat_HitPoints>
        </LevelMilestone>
        <SelectedAbilityBonusOption>Blood_Altarian</SelectedAbilityBonusOption> <!-- this is the bloodline given to this unit, for belonging to a race -->
        <SelectedAbilityBonusOption>TrainHenchmen</SelectedAbilityBonusOption> <!-- this trait is given freely to all male sovereigns of this race -->
        <Equipment>K_Male_Head_01</Equipment>
        <Equipment>Sovereign_Warrior_Hair</Equipment>
        <Equipment>Basic_Pants_ID2</Equipment>
        <Equipment>Warrior_Boots_ID2</Equipment>
        <Equipment>Sovereign_Warrior_Shirt_Pleated_ID1</Equipment>
        <AIMilitaryStrategy>Swordsman</AIMilitaryStrategy>
        <AnimationPack>MaleSovereignAnimationPack</AnimationPack>
        <AnimationParticleEffect>HeroPoseFront,_Particle_Ceresa_02,0.0,-2.0,0.0,1.0,EffectAttach</AnimationParticleEffect>
        <BattleAnimationBehavior>Melee</BattleAnimationBehavior>
        <ClothMapScale>1.6</ClothMapScale>
        <ClothPoseIndex>0</ClothPoseIndex>
        <CutSceneDataPack>ReliasCutscenePack</CutSceneDataPack>
        <EyeTexture>gfx\Eyes\blinks\eyeblink_m2_brwn.png</EyeTexture>
        <InfoCardBackground>BG_KingdomRugged</InfoCardBackground>
        <ModelPath>Gfx\HKB\Units\K_Male_Mesh_01.hkb</ModelPath>
        <ModelScale>1</ModelScale>
        <MovingSFX>TEMP_KnightMarching1</MovingSFX>
        <OnHitParticleName>Bloody_OnHit</OnHitParticleName>
        <SkeletonPath>Gfx\HKB\Units\K_Male_Skeleton_01.hkb</SkeletonPath>
        <SoundPack>SoundPack_Generic_Male</SoundPack>
        <TacticalModelScale>1.5</TacticalModelScale>
        <Texture_Skin>K_Male_Freckles_Texture_01.png</Texture_Skin>
        <UnitModelType>KingdomMale</UnitModelType>
    </UnitType>

As you saw, the RaceType had a lot of UnitTypes. You'll need to make all those up to populate your faction with the various necessary unittypes. Also note the large number of _AI designs (players do not see these designs, they are limited to AI only).

 

So, now you have a Race and all the different UnitTypes that are needed for the race. Now all you need is to make a faction out of it.

From CoreRaceConfigs.xml we pull this

    <RaceConfig InternalName="KingdomOfAltar"> <!-- again, unique name needed -->
        <DisplayName>Kingdom of Altar</DisplayName>
        <Description>**snipped**</Description>
        <LorebookIntroText>**snipped**</LorebookIntroText>
        <AIPersonality>AI_General</AIPersonality>
        <Capital>Athica</Capital>
        <City>Avalan</City>
        <City>Tylan</City>
        <City>Denara</City>
        <City>Keeran's Hold</City>
        <City>Mirthrandra</City>
        <City>Farcross</City>
        <City>Staidenheart</City>
        <City>Larrenstree</City>
        <City>Seera's Pass</City>
        <ShortName>Altar</ShortName>
        <LeaderName>Lord Relias</LeaderName>
        <PopulaceName>Men</PopulaceName>
        <Alignment>Good</Alignment>
        <FactionAllegiance>Kingdom</FactionAllegiance>
        <SelAbilityBonusOption>Wanderlust</SelAbilityBonusOption> <!-- faction bonuses, link to CoreAbilities.xml)
        <SelAbilityBonusOption>Heroic</SelAbilityBonusOption>
        <EntityID>1</EntityID>
        <MusicTheme>Altar</MusicTheme>
        <DefaultCityWallSet>CityWalls_Fence</DefaultCityWallSet>
        <NewCityHubType>CityHub1</NewCityHubType>
        <CapitalHubType>CityHub1</CapitalHubType>
        <RaceClassification>Men</RaceClassification>
        <RaceDisplayName>Men</RaceDisplayName>
        <RaceInternalName>Race_Type_Altarians</RaceInternalName> <!-- this is the XML that links your Faction to your Race. The InternalName has to mirror your RaceType's Internalname.-->
        <ChooseFactionBack>Faction_Background_Altar.png</ChooseFactionBack>
        <UnitScale>1</UnitScale>
        <UnitSkinColor>215,150,100</UnitSkinColor>
        <UnitHairColor>155,110,75</UnitHairColor>
        <UnitClothing1Color>120,25,20,255</UnitClothing1Color>
        <UnitClothing2Color>78,60,55,255</UnitClothing2Color>
        <UnitMetalColor>145,145,145,255</UnitMetalColor>
        <BuildingPrimaryColor>165,145,130</BuildingPrimaryColor>
        <BuildingSecondaryColor>75,60,50</BuildingSecondaryColor>
        <BuildingRoofColor>90,15,10</BuildingRoofColor>
        <ZoneOfControlColor>200,0,0</ZoneOfControlColor>
        <BuildingStyle>KingdomStyle</BuildingStyle>
        <TechTree>TechTree_Amarian</TechTree>
        <EnvironmentTerrainType>2</EnvironmentTerrainType>
        <NonBuildableEnvironmentType>DeadEnvironment</NonBuildableEnvironmentType>
        <PreferredLogoType>KingdomCrest2</PreferredLogoType>
        <SovereignUnitType>Sovereign_Relias</SovereignUnitType> <!-- this is redundant, do not be fooled. Who rules what faction is decided by the Sovereign's UnitType. Ex: UnitType Sovereign_Relias has this: <FactionToLead>KingdomOfAltar</FactionToLead>  -->
    </RaceConfig>

 

 

The big hurdle, obviously, is making up all the UnitTypes for your race. That's why Impinc's faction creator tool is so powerful - it does all this for you. But if you don't want to use it, I would suggest that you simply copy a RaceType, copy all the UnitTypes that belong to it, then copy a RaceConfig(aka Faction). Then change the internalnames so they link properly between the three. Then you can start tinkering with the fine details.

Reply #4 Top

O_O Thanks a lot, bro! Will take a deep look at it and will begin to work according to this. Love you! <3