Elemental Modding: Part 2 – New Factions

Published on Monday, August 2, 2010 By Brad Wardell In Elemental Dev Journals

During the early betas of Elemental, we let users creation their own factions during the game setup. But over time, we kept getting more and more good ideas on how to make this more sophisticated that it became impractical to foist such a complex system onto the player (the UI would just get crazy).

Moreover, having to UI drive faction creation was resulting in factions that were more or less the same. So we moved this into the area of modding.

Let’s create a new faction. I’m going to create a new file called Froglers.xml and put it into my units directory in documents\my games\elemental

Inside I’m putting this file:

<RaceConfigs>

    <RaceConfig InternalName="Froglers">
        <DisplayName>Frog People</DisplayName>
        <Capital>Ribit</Capital>
        <ShortName>Froglers</ShortName>
        <LeaderName>Frogboy</LeaderName>
        <PopulaceName>Human</PopulaceName>
        <Description>This amphibious race hops on all fours.</Description>
        <Alignment>Good</Alignment>
        <FactionAllegiance>Kingdom</FactionAllegiance>
    <DefaultCityWallSet>CityWalls_Fence</DefaultCityWallSet>
    <NewCityHubType>Outpost</NewCityHubType>
    <CapitalHubType>Outpost</CapitalHubType>
    <!-- Race Stuff -->
    <RaceClassification>Frogs</RaceClassification>
    <RaceDisplayName>Frogs</RaceDisplayName>
    <RaceInternalName>Race_Type_Frogs</RaceInternalName>
    <MaleUnitType>Skath</MaleUnitType>
    <FemaleUnitType>Skath</FemaleUnitType>
    <GenericUnitType_Male>Skath</GenericUnitType_Male>
    <GenericUnitType_Female>Skath</GenericUnitType_Female>
    <TraderUnitType>Skath</TraderUnitType>
    <StartingUnitType>Kingdom_Soldier</StartingUnitType>
    <StartingUnitType>Kingdom_Pioneer</StartingUnitType>
    <ChooseFactionBack>Faction_Background_Altar.png</ChooseFactionBack>
    <UnitScale>1.0</UnitScale>
    <UnitSkinColor>32,255,32</UnitSkinColor>
    <UnitHairColor>155,255,75</UnitHairColor>
    <UnitClothing1Color>120,25,20,255</UnitClothing1Color>
    <UnitClothing2Color>78,60,55,255</UnitClothing2Color>
    <UnitMetalColor>145,145,145,255</UnitMetalColor>
    <BuildingPrimaryColor>165,255,130</BuildingPrimaryColor>
    <BuildingSecondaryColor>75,255,50</BuildingSecondaryColor>
    <BuildingRoofColor>90,255,10</BuildingRoofColor>
    <ZoneOfControlColor>165,255,30</ZoneOfControlColor>
    <TechTree>TechTree_Froglers</TechTree>
    <KnownStartingTech>Frogler_Starts</KnownStartingTech>
    <EnvironmentTerrainType>2</EnvironmentTerrainType>
    <PreferredLogoType>KingdomCrest2</PreferredLogoType>
    <SovereignUnitType>Lord_Relias</SovereignUnitType>
    <Spellbook>LifeSpellbook</Spellbook>
    <A_CoreManaRegeneration>50</A_CoreManaRegeneration>
  </RaceConfig>

</RaceConfigs>

 

Now, if you pop this in it’ll crash. That’s because we have to define some things first:

  1. RaceClassification
  2. RaceInternalName
  3. TechTree
  4. KnownStartingTech

Without those 4 things defined, the game won’t know what to do with this faction.  It is in these 4 things that we ultimately make what is special and unique.

I also cheated in terms of the 3D modeling. I used Skaths as my units. Skaths kind of look like frogs in the game so I figured…

We’ll need to define what Frogs are as a race. And we’ll need to come up with a technology tree for them.

Stay tuned.