James009D James009D

Champion/Hero Modding Guide

Champion/Hero Modding Guide

We can have custom heroes ingame. Find out how!

http://depositfiles.com/files/si4eydpvt

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:

  1. I started by making a new file under "C:\Users\??\Documents\My Games\Elemental\Units" called "Heroes_01.XML"
  2. Then input the data of my custom heroes after creating them with the Sovereign Creator.
  3. I then input the "new" champion data (see XML Code below) and removed any references to being Sovereign.
  4. You can put multiple characters in one file just like the in CoreUnits file.

 

XML Code:

Code: xml
  1. <DisplayName>Champion</DisplayName>
  2. <Class>Adventurer</Class>
  3. <SelectedAbilityBonusOption>History_Adventurer</SelectedAbilityBonusOption>
  4. <SpawnRating>1</SpawnRating>
  5. <NPCSpawnLikelihood>800</NPCSpawnLikelihood>
  6. <NPCTalentValue>1</NPCTalentValue>
  7. <NPCRecruitmentText>Bonjourno, for %d gildar I am a deal like none other.</NPCRecruitmentText>
  8. <Rumor>Rumors whisper of a legendary dude in the wilderness around %s.</Rumor>
  9. <MountedAnimationPack>MountedSoldierAnimationPack</MountedAnimationPack>
  10. <IsSovereign>0</IsSovereign>
  11. <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
    • NPC_GoldProduction1
  • Inventor
    • NPC_ResearchProduction1
  • Loremaster
    • NPC_SpellPtProduction1
    • LoreMaster_SpellPtProduction1
  • Administrator
    • NPC_CityProduction1
  • Farmer
    • NPC_CityFarming1

[Other abilities]

  • Tutor_ResearchProduction1
  • Ironeer_MetalProduction1
  • Archivist_ResearchProduction1

 

Sovereign Histories:

  • History_Miner
    • 1.2 metal bonus
  • History_Warlord
    • 2 sentinel units
  • History_Warrior
    • 1.1X attack
  • History_Merchant
    • +2 G/turn
  • History_Adventurer
    • 1+ movement
  • History_Hunter
    • Unlocks wild game improvement
  • History_Royalty
    • 2X prestige
  • History_Assassin
    • 2X initial damage for champions
  • History_Thief
    • +20 to looting
  • History_Bard
    • -25% recruitment
  • History_DungeonMaster
    • 2X creature damage

 

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
  1. <SoundPack>SOUNDPACK</SoundPack>

 

Also a few more animation options:

  • ReliasAnimationPack
  • LadyProcipineeAnimationPack
  • GeneralCarrodusAnimationPack
  • LadyIraneAnimationPack
  • LordMarkinnAnimationPack
  • OracleCeresaAnimationPack
  • EmperorKaravoxAnimationPack
  • EmperorMagnarIIIAnimationPack
  • WarlordVergaAnimationPack

Code: xml
  1. <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
  1.         <Medallions InternalName="">
  2.             <All>C:\Users\USER\Documents\My Games\Elemental\units\icons\IMAGE.png</All>
  3.         </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:

  1. First, go to "C:\??\Elemental\data\English" and look up the "CoreRaceConfigs.XML" file for reference.
  2. Create a NEW .XML file under "C:\Users\??\Documents\My Games\Elemental\Race".
  3. 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.

 

Hero Modpack

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...

134,934 views 33 replies
Reply #26 Top

NPCspawnlikelihood is 1 to 1000. So, you are correct that 800 = 80%. TalentValue is probably some kind of a multiplier based on the characters "talent", I'm not entirely sure.

Reply #27 Top

I'm really shocked how not many people care about something this interesting. The defualt heroes were kinda bland. Mostly being ugly peasents or farmers. And a rare powerhouse like Rilis.


I dunno if people tried your character set yet, but I was wondering if you knew you had their images set to:

"C:\Users\James\Documents\My Games\Elemental\units\icons\Greg_0_-670364115-25.png"

Which has your name in the filepath, wouldn't that not work for everyone else? Maybe you could put the images in a more neutral filepath like Progams\Elemental\Mods or whatever the defualt installation path for everyone is.

Reply #28 Top

The images should be commented out or deleted by now. Regardless, the images regenerate themselves if there isn't an image or if they are invalid paths. Obviously, nobody should have access to my "Users/James/Documents" folder for champion Greg's image. I also don't want to upload them because these images take up A LOT more memory.

Also, if your interested in submitting your hero we could start the "Community of Heroes" Mod. I can't understand why more people aren't interested, tbh.

 

Reply #29 Top

I'm really shocked how not many people care about something this interesting. The defualt heroes were kinda bland.

 

I'm interested now that I know about it. =)

Especially as the Devs make more progress with ironing out stats, custom Champions become more interesting and less likely to break in future versions.

Reply #30 Top
For a per turn city resource:
I want to say, this doesn't work just for a city. It workes global, so it doesn't matter if a Sovereign or a NPC is in a city or not, The resource will be produce. Mod Type "resource" only works for cities with impovements. It seems that just this Mod Types works exclusive for cities with NPCs or Sovereigns:
Code
  1. <ModType>ResourceMultiplier</ModType>
  2. <ModType>City</ModType>
  3. <Attribute>BuildingDiscount</Attribute>
  4. <ModType>UsageMultiplier</ModType>
  5. <ModType>ResourceStorage</ModType>
Reply #31 Top

Quoting xStarfirex, reply 25
I have been testing some champions i have made. When i set <npcspawnlikelihood>1000</NPCSpawnLikelihood> they always seem to appear... so my guess is 800 = 80% otherwise what would be the point of a number above 100.

 

You are correct.  There is one implied decimal point in that number.

Reply #32 Top

I had a problem, I did set <IsSovereign>0</IsSovereign> yet, they still able to cast power, and I unable cast Death Ward on I created or mod...

 

Reply #33 Top

"I had a problem, I did set <IsSovereign>0</IsSovereign> yet, they still able to cast power, and I unable cast Death Ward on I created or mod..."

 

I believe IsSovereign only makes it so you can or cannot select that character in the character selection screen and if they can be a random leader. If you want to add them as a random hero you'd need to add the character to one of the units ".xml" files. As for spells, you'd probably need to disable something from the created character so they can't use magic.

 

Quoting Jounk33, reply 30

For a per turn city resource:

Notes: Seeing if I even need all this shit
Resource Is it a resource. What resource is it?
DiplomaticCapital Input resource here (Gold, DiplomaticCapital, Research, Metal...)
1.0 Total value provided?
1 Per # turns?
1 How many shared with city? EDIT: I'm unusure what it's sharing with, seems unrelated to city. Unknown. Appears to be unneeded

+1 Diplomatic Capital Hopefully just a description. EDIT: Nope, looks like this determines overall output and will crash if wrong. Might also be unused and unneeded.



I want to say, this doesn't work just for a city. It workes global, so it doesn't matter if a Sovereign or a NPC is in a city or not, The resource will be produce. Mod Type "resource" only works for cities with impovements.
It seems that just this Mod Types works exclusive for cities with NPCs or Sovereigns:

ResourceMultiplier

City
BuildingDiscount

UsageMultiplier

ResourceStorage

This was REALLY old code, lol. Back upon release'ish time there was a way to code resources and certain bonuses so they'd tie in with a city or only activate when in a city. Unfortunately, this was changed and I don't know if there is any way to resurrect it or if it's still changed or what.

 

p.s. Can we not have multiple quotes?

God... I just noticed the last date of a response. Apologies. I saw January and assumed it was '12.