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:
XML Code:
Hero Unit Class, History, and Ability Types:
[Other abilities]
Tutor_ResearchProduction1 Ironeer_MetalProduction1 Archivist_ResearchProduction1
Sovereign Histories:
Unit Attributes: Thanks Dioxus!
UPDATE: I just discovered code for custom soundpacks for characters (from Sovereigns.XML). Found more (under sfx folder)..
Soundpack Variables include:
Also a few more animation options:
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.
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:
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...
That is Awesome, my friend. Well done indeed. I knew it would be doable in XML but I didn't know if it would work or not until they enabled custom factions. Now we know. I know what I'm doing next....
To you brother!!
Where can I find the Kingdoms.xml file?
I didn't find Kingdoms.xml. but I found CoreRacesTypes.xml and CoreRacesConfig.xml in C:\Program Files\Stardock Games\Elemental\data\English
These have all the stock races. I figure creating a new file and cut/pasting one as a template and go from there?
Going to try it out and see.
Got everything to work (at least at the new game screens) except the crest.
Have to find the internal names of the logos for the kingdom crests.
These are from the "SovereignTalents.XML" file, if you want to try and use them to give the heroes some flavor. They're divided broadly into two categories, Sovereign and NPC, dont know what effect that will have on which characters can use them.
- I want to see how many levels there are to abilities. For example, is there NPC_CityProduction2? I also would like to document what each ability does.
There dosnt seem to be any second-level skills, unless the game automatically makes them itself using the ones in the SovereignTalents.xml file as a baseline. There shouldnt be anything prevent you from making abilities and histories yourself though.
NPC
Sovereign
Throwing this into a second post to keep it from becomming too long. If you want to get in deeper and start modifying the units base-values this might be of some help:
Found it.
CoreLogos.xml
Thanks for posting this!
I just wanted to add a minor thing. In the units folder is another folder called "Icons". You can replace the sovereign's picture in that folder with any size *.png and it will use that picture for a medallion.
For instance, i created a sovereign that looks like Jafar from Master of Magic. Then I took a screen shot of Jafar's portrait in Master of Magic and replaced the icon for that sovereign with mine. It worked perfectly and replaced the sovereign's medallion. I did not need to resize the image or anything.
So, does this mean there won't be a more user friendly form of custom faction creation for the final game? Or am I reading too much into it? I'm fine with editing XML, but... It lacks panache. One of my favorite parts of GalCiv 2 was imagining new alien species and running them through the creator to see how they'd pan out...
Any feedback would be much appreciated on this.
If you really want to read into things then read into the "AbilityBonuses.xml" file located under the DATA folder. This file is relating to faction specific abilities and each "abilities" has a specific cost associated with it. I believe there might be a faction creation tool that they'll eventually release with the workshop (have they done it before?) but you'll probably be able to do A LOT more with the .XML code then any ingame editor. Personally, I'd like the ability to do the more graphical and difficult stuff with an ingame editor and then exit out for XML tweaking... that's what I did with GalCiv 2, as well.
Same.
Brad has said recently that faction creation is going to have a tool, they wanted to take it out of the "new game" area because it was adding too much time to setting up a game.
Thanks for the guide Folcik009, quite helpful.
It does sound like there will be more tools released in the future for modding. That Faction Creation Tool does look like it will be in the release, especially since they already have a CustomizeFactionScene.xml file in the CutScenes folder. They are also working on a coat of arms creation tool as well though not sure if we'll see that on release. There's also been mention of Item, Quest, and Effects editors as well.
Good start to the guide.
I have made a few NPCs in the beta4 version already, mostly females to increase my poor ugly Sovereign's chances of finding a wife. It is a pretty easy system to use.
Thanks
Yeah, I've been considering making more female characters, especially ones that are more attractive. I've also been planning out some "personality traits" for a next release of the Abilities Mod to make marriage possibly more interesting (eventually).
UnitStat_ManaRegen does not seem to be working. I've been modifing it, but with no impact in game. Has anyone tested with it?
I just get sick of only having 1 mana point regen / turn early in the game
for some reason my hero isn't appearing in the game, please help, is there something I'm doing wrong?
<UnitType InternalName="Lady Azula"> <DisplayName>Champion</DisplayName> <UnitDisplayName>Lady Azula</UnitDisplayName> <Quote>'For the spirits I will endure, for the people I scrifice'</Quote> <Backstory>Far beneath the withered planes of the world, Lady Azula discovered her call to do far greater things than dig. A mining expedition on the eastern side of the Skarps had Lady Azula and a dozen other men toiling for years. With no family, home, or drive to adventure, the humble miner spent long days digging downwards and restful nights under the sky gazing upwards. One morning, as the stirred dust hung heavy in the small tunnel, Lady Azula uncovered a relic of the Cataclysm. Accidentally touching this innocuous crystal, visions pierced her mind of dusty wastes brought to life by her touch. From that day Lady Azula worked to discover herself and the great powers beheld in that vision.</Backstory> <ModelPath>Gfx\HKB\Units\K_Female_Mesh_01.hkb</ModelPath> <SkeletonPath>Gfx\HKB\Units\K_Male_Skeleton_01.hkb</SkeletonPath> <EyeTexture>gfx\eyes\blinks\eyeblink_f3_brwn.png</EyeTexture> <AnimationPack>FemaleSovereignAnimationPack</AnimationPack> <MountedAnimationPack>MountedSoldierAnimationPack</MountedAnimationPack> <MovementType>land</MovementType> <BobbingFrequency>0.0000</BobbingFrequency> <ClothPoseIndex>5</ClothPoseIndex> <InfoCardBackground>BG36_HighlvlShop</InfoCardBackground> <InfoCardBackgroundFlipped>0</InfoCardBackgroundFlipped> <CanBeDesigned>0</CanBeDesigned> <MovingSFX>TEMP_KnightMarching1</MovingSFX> <LevelMilestone InternalName=""> <Level>1</Level> <UnitStat_Attack>0.0000</UnitStat_Attack> <UnitStat_Charisma>12.0000</UnitStat_Charisma> <UnitStat_Constitution>8.0000</UnitStat_Constitution> <UnitStat_Defense>0.0000</UnitStat_Defense> <UnitStat_Dexterity>8.0000</UnitStat_Dexterity> <UnitStat_ExpToNextLevel>20.0000</UnitStat_ExpToNextLevel> <UnitStat_HitPoints>0.0000</UnitStat_HitPoints> <UnitStat_Intelligence>12.0000</UnitStat_Intelligence> <UnitStat_ManaRegen>0.0000</UnitStat_ManaRegen> <UnitStat_Sight>2.0000</UnitStat_Sight> <UnitStat_Strength>8.0000</UnitStat_Strength> <UnitStat_Wisdom>12.0000</UnitStat_Wisdom> <UnitStat_CombatSpeed>2</UnitStat_CombatSpeed> </LevelMilestone> <Equipment>K_Female_Head_05</Equipment> <Equipment>Fallen_Teased_Hair</Equipment> <Equipment>DarkWizardFemaleRobeID2</Equipment> <Equipment>Basic_Wraith_Skirt_ID1</Equipment> <Equipment>TightBoots_Dark</Equipment> <Equipment>Staff</Equipment> <Color_Clothing1>25,70,111,255</Color_Clothing1> <Color_Clothing2>35,35,35,255</Color_Clothing2> <Color_Metal>145,145,145,255</Color_Metal> <Color_Skin>160,115,75,255</Color_Skin> <Color_Hair>35,35,35,255</Color_Hair> <Texture_Skin>K_Female_Thinbrows_Texture_01.png</Texture_Skin> <Texture_Eyes>gfx\eyes\blinks\eyeblink_f3_brwn.png</Texture_Eyes> <Gender>Female</Gender> <UnitModelType>KingdomFemale</UnitModelType> <SelectedAbilityBonusOption>History_Royalty</SelectedAbilityBonusOption> <UnitDisplayName>Lady Azula</UnitDisplayName> <Class>Adventurer</Class> <NPCTalentValue>1</NPCTalentValue> <SpawnRating>1</SpawnRating> <NPCSpawnLikelihood>p00</NPCSpawnLikelihood> <SelectedAbilityBonusOption>Dominate</SelectedAbilityBonusOption> <NPCRecruitmentText>I need gildar to continue the search for my brother. For %d I'll join your faction, and together, search for Rilohi.</NPCRecruitmentText> <Backstory>Azula is a good hearted soul who consistently finds herself in strange company. She was born with a twin brother who has since vanished into the night without a trace. Lilohki is a caring priestess who sows the seeds of hope everywhere she goes but takes none for herself. Deep down, she knows she will never see her brother again and is slowly losing faith in the very concept of 'hope.'</Backstory> </UnitTypes>
I think your missing the "<UnitTypes>" at the very beginning and "</UnitTypes>" at the end. Also a typo in <NPCSpawnLikelihood> (so character wont show up) and spelled "scrifice" wrong (sacrifice ).
I was browsing the files and in an attempt to find out "what goes", I let my text editor collect all occurrences of UnitStat_.
This list has a few mroe entries than yours but not all will necessarily work. "Mana Regen", for instance, is apparently commented out in another file but in theory, it's there.
A_UnitStat_AttackA_UnitStat_CombatSpeedA_UnitStat_DefenseA_UnitStat_EssenceA_UnitStat_HitPointsUnitStat_AssassinationUnitStat_AttackUnitStat_AttackRangeUnitStat_BluntDamageUnitStat_BluntDefenseUnitStat_CharismaUnitStat_CombatSpeedUnitStat_ConstitutionUnitStat_CounterattackMultiplierUnitStat_CuttingDamageUnitStat_CuttingDefenseUnitStat_DaringUnitStat_DefenseUnitStat_DexterityUnitStat_DodgeUnitStat_EssenceUnitStat_ExpToNextLevelUnitStat_ExperienceUnitStat_HealthRegenUnitStat_HitPointsUnitStat_IntelligenceUnitStat_ManaRegenUnitStat_MoraleUnitStat_MovesUnitStat_PierceDamageUnitStat_ReputationUnitStat_SightUnitStat_StrengthUnitStat_StructuralAttackUnitStat_TacticalHealthRegenUnitStat_TacticalManaRegenUnitStat_TacticalMovementCostMultiplierUnitStat_Wisdom
Nice list. Those values are good to know. I'll update the original list with some of them.
Do we know any more on how to get make a created hero more likely to spawn... I am finding ti difficult to test any heros I make atm and would be nice to know how to get them to spawn 100% of the time.
Yes, this code will help in that endveour.
<SpawnRating>1</SpawnRating><NPCSpawnLikelihood>800</NPCSpawnLikelihood><NPCTalentValue>1</NPCTalentValue>
Rating is = the Adventure tech level
Likelihood = % chance of spawning
NPCTalent = The cost of hiring
I believe... this is all theoretical, imo, lol.
On NPCSpawnlikelihood, is that 800%, 80.0% or 8.00%?
And on the NPCTalentValue, is that 1 Gilder?
Inquiring minds, want to know.
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.
There are many great features available to you once you register, including:
Sign in or Create Account