Champion/Hero Modding Guide
By Folcik009
Overview:
I love making custom characters in these games, it's probably the main thing I've wanted to do in Elemental especially given all the options I'm uncovering. Eventually, I'd like to release a download-able mod with tons of new heroes. Additionally, I have an idea for a "MMORPG" style hero mod where forum users submit their heroes into a database and you'd see them in your game. For example, Folcik009's hero would be running around in the game. There is so much we can do with this!
I looked into the CoreNPCUnits.XML file for this data. I might not have found everything. I also am exploring if we can make a hero pack.
I believe that custom heroes can be created with the Sovereign Creator tool and then converted into NPC's.
How To Create New Heroes:
- I started by making a new file under "C:\Users\??\Documents\My Games\Elemental\Units" called "Heroes_01.XML"
- Then input the data of my custom heroes after creating them with the Sovereign Creator.
- I then input the "new" champion data (see XML Code below) and removed any references to being Sovereign.
- You can put multiple characters in one file just like the in CoreUnits file.
XML Code:
Code: xml
- <DisplayName>Champion</DisplayName>
- <Class>Adventurer</Class>
- <SelectedAbilityBonusOption>History_Adventurer</SelectedAbilityBonusOption>
- <SpawnRating>1</SpawnRating>
- <NPCSpawnLikelihood>800</NPCSpawnLikelihood>
- <NPCTalentValue>1</NPCTalentValue>
- <NPCRecruitmentText>Bonjourno, for %d gildar I am a deal like none other.</NPCRecruitmentText>
- <Rumor>Rumors whisper of a legendary dude in the wilderness around %s.</Rumor>
- <MountedAnimationPack>MountedSoldierAnimationPack</MountedAnimationPack>
- <IsSovereign>0</IsSovereign>
- <NPCPartyMember>NAME</NPCPartyMember>
Hero Unit Class, History, and Ability Types:
- Adventurer
- History_Adventurer
- History_Royalty
- History_Assassin
- History_Merchant
- History_Swindler
- History_Miner
- History_Thief
- History_Warlord
- History_Bard
- Merchant
- Inventor
- Loremaster
- NPC_SpellPtProduction1
- LoreMaster_SpellPtProduction1
- Administrator
- Farmer
[Other abilities]
- Tutor_ResearchProduction1
- Ironeer_MetalProduction1
- Archivist_ResearchProduction1
Sovereign Histories:
- History_Miner
- History_Warlord
- History_Warrior
- History_Merchant
- History_Adventurer
- History_Hunter
- Unlocks wild game improvement
- History_Royalty
- History_Assassin
- 2X initial damage for champions
- History_Thief
- History_Bard
- History_DungeonMaster
Unit Attributes: Thanks Dioxus!
- UnitStat_HitPoints : How much damage a unit can withstand.
- UnitStat_Attack : The physical damage that this unit can deal.
- UnitStat_Defense : Ability to absorb physical attacks.
- UnitStat_AttackRange : Max distance the unit can attack.
- UnitStat_Moves : Movement points that a unit has per/turn.
- UnitStat_Sight : How far a unit can see into the fog of war.
- UnitStat_StructuralAttack : Attack strength against city walls and buildings.
- UnitStat_Experience : How much experience defeating this unit is worth.
- UnitStat_ExpToNextLevel : Experience needed for this unit to reach it's next level.
- UnitStat_HealthRegen : Unit regenerates this amount of health per turn.
- UnitStat_Strength : Increases attack.
- UnitStat_Dexterity : Increases defense.
- UnitStat_Essence : Magical might of this unit.
- UnitStat_Intelligence : Increases effectiveness of spells.
- UnitStat_Wisdom : Determines max unspent spell points.
- UnitStat_Charisma : Affects cost of recruiting champions.
- UnitStat_Constitution : Determines hit points.
- UnitStat_CombatSpeed : The unit's dexterity in battle.
UPDATE: I just discovered code for custom soundpacks for characters (from Sovereigns.XML). Found more (under sfx folder)..
Soundpack Variables include:
- Soundpack_MaleKnight1
- Soundpack_BlkKnight1
- Soundpack_OldWizard1
- Soundpack_DarkOracle1
- Soundpack_FemaleAdv1
- Soundpack_FemaleAdv2
- Soundpack_FemaleAdv3
- Soundpack_Princess1
Code: xml
- <SoundPack>SOUNDPACK</SoundPack>
Also a few more animation options:
- ReliasAnimationPack
- LadyProcipineeAnimationPack
- GeneralCarrodusAnimationPack
- LadyIraneAnimationPack
- LordMarkinnAnimationPack
- OracleCeresaAnimationPack
- EmperorKaravoxAnimationPack
- EmperorMagnarIIIAnimationPack
- WarlordVergaAnimationPack
Code: xml
- <AnimationPack>ANIMATION</AnimationPack>
Custom Image:
- You can also change your champions/sovereign's image to something else just by changing the destination. jshores states that this works with any image size.
Code: xml
- <Medallions InternalName="">
- <All>C:\Users\USER\Documents\My Games\Elemental\units\icons\IMAGE.png</All>
- </Medallions>
You could put these into your custom heroes or sovereigns and make 'em sound even better.
Interesting Notes:
- There are diplomats or "swindlers", people of royalty, assassins, warlords, thiefs, and bards. Basically, all of the sovereign traits can be applied to NPC champions.
- NPC's can start with parties. See <NPCPartyMember> code. Cool!
- I believe that the first NPC "history" sets their job next to their name. Otherwise, it is their class.
- Characters can have multiple histories and abilities. NPC champions can also have sovereign abilities and histories but I'm unsure what this does.
- Looks like it's only one level per ability. Certainly looks moddable though.
Custom Factions WORK:
Custom factions DO WORK. I created my own custom faction by copying Kingdom of Altar data, merging it with some other Kingdoms, and making my own Kingdom.XML file under the "Race" directory in "My Games".
To Create a Custom Faction:
- First, go to "C:\??\Elemental\data\English" and look up the "CoreRaceConfigs.XML" file for reference.
- Create a NEW .XML file under "C:\Users\??\Documents\My Games\Elemental\Race".
- Basically copy the CoreData of ONE faction and modify it. Good luck!
To Do:
- What do some of these values mean? NPCTalentValue and SpawnRating? Do they mean cost and # of spawns? Also, is 1000 = 100% spawn likelihood?
- Understand how "per city" bonuses work. For example, stationing an administrator generates some city bonus.
- How does class work? Can the NPC bonuses be applied to Kings? I theorize yes.
- Can we make custom buildings? I believe so.
Character Modpack:
I've uploaded a .rar with 10 new NPC hero units. Read the thread here or just download the file.
Anyone interested in contributing is welcome to
How to:
For a per turn city resource:
<GameModifier> Notes: Seeing if I even need all this shit
<ModType>Resource</ModType> Is it a resource. What resource is it?
<Attribute>DiplomaticCapital</Attribute> Input resource here (Gold, DiplomaticCapital, Research, Metal...)
<Value>1.0</Value> Total value provided?
<PerTurn>1</PerTurn> Per # turns?
<ResourceShared>1</ResourceShared> How many shared with city? EDIT: I'm unusure what it's sharing with, seems unrelated to city. Unknown. Appears to be unneeded
<Provides>+1 Diplomatic Capital</Provides> Hopefully just a description. EDIT: Nope, looks like this determines overall output and will crash if wrong. Might also be unused and unneeded.
</GameModifier>
For a per turn city multiplied resource (ex. 2X gold): FINALLY GOT IT WORKING! So simple.
<GameModifier>
<ModType>ResourceMultiplier</ModType>
<Attribute>Gold</Attribute>
<Value>2.0</Value>
<PerTurn>1</PerTurn>
</GameModifier>
File References: For R&D
AbilityBonuses.XML - All the 'racial' specific bonuses for factions
SovereignHistories.XML - All the histories for sovereign creation
SovereignTalents.XML - All the sovereign and NPC talents available
KingdomSpecialImprovements.XML - All the Kingdom buildings, good for seeing bonuses
CoreSpecialAbilities.XML - More 'hidden' abilities
FactionAbilities.XML - No idea where or what this is anymore...