Sorcerer King: Rivals

Sorcerer King: Rivals

Not enough ratings
Modding Units
By El Bandito
This guide is designed to give a start to those who want to mod units for Sorcerer King:Rivals.
   
Award
Favorite
Favorited
Unfavorite
Introduction
Hello. This guide is designed to help people learn to mod units in Sorcerer King: Rivals. It's intended to give an overview and not designed as a step-by-step process. Please keep in mind that modding units can result in over- or under-powered units and messing up can hose your game files.
Modding CoreUnits.xml
The file which controls units is the CoreUnits.xml file (here after called the Units file). I'm going to give an example of a unit and how to modify it. There are many ways to modify a unit, so we will look at some of the more common ways.

The Wolf
The unit I'm going to start with is the wolf unit. Now, it is important to know that there are often multiple copies of the same unit in the Units file. The wolf is one such example. Below is a copy of the code from Units file.

<UnitType InternalName="Unit_Misc_Wolf"> <DisplayName>Wolf</DisplayName> <UnitDisplayName>Wolf</UnitDisplayName> <Description>A ferocious wolf that seems to prefer the company of Bandits. A bit meaner than Bandits. A bit stinkier too.</Description> <CreatureType>Beast</CreatureType> <RaceType>Race_Type_Shadow</RaceType> <Base_UnitStat_Accuracy>40</Base_UnitStat_Accuracy> <Base_UnitStat_Attack_Physical>4</Base_UnitStat_Attack_Physical> <Base_UnitStat_CombatSpeed>20</Base_UnitStat_CombatSpeed> <Base_UnitStat_Dodge>5</Base_UnitStat_Dodge> <Base_UnitStat_Defense_Physical>1</Base_UnitStat_Defense_Physical> <Base_UnitStat_HitPoints>5</Base_UnitStat_HitPoints> <Base_UnitStat_Moves>3</Base_UnitStat_Moves> <BonusPerLevel_UnitStat_Accuracy>0.4</BonusPerLevel_UnitStat_Accuracy> <BonusPerLevel_UnitStat_Attack_Physical>0.4</BonusPerLevel_UnitStat_Attack_Physical> <BonusPerLevel_UnitStat_CombatSpeed>0.4</BonusPerLevel_UnitStat_CombatSpeed> <BonusPerLevel_UnitStat_Dodge>2</BonusPerLevel_UnitStat_Dodge> <BonusPerLevel_UnitStat_Defense_Physical>1</BonusPerLevel_UnitStat_Defense_Physical> <BonusPerLevel_UnitStat_HitPoints>2</BonusPerLevel_UnitStat_HitPoints> <SelectedAbilityBonusOption>Spell_Howl_AI</SelectedAbilityBonusOption> <SelectedAbilityBonusOption>VulnerableToCold</SelectedAbilityBonusOption> <SelectedAbilityBonusOption>VulnerableToFire</SelectedAbilityBonusOption> <SelectedAbilityBonusOption>VulnerableToLightning</SelectedAbilityBonusOption> <SelectedAbilityBonusOption>Bloodthirsty</SelectedAbilityBonusOption> <Prereq> <Type>Race</Type> <Attribute>Race_Type_Shadow</Attribute> </Prereq> <Treasure> <Liklihood>20</Liklihood> <GameModifier> <ModType>GiveItem</ModType> <Attribute>Loot_WolfPelt</Attribute> </GameModifier> </Treasure> <Medallions InternalName=""> <All>Unit_Misc_Wolf_Portrait.png</All> </Medallions> <AnimationPack>WolfAnimationPack</AnimationPack> <BattleAnimationBehavior>Melee</BattleAnimationBehavior> <BobbingFrequency>0</BobbingFrequency> <ClothMapScale>0</ClothMapScale> <ClothPoseIndex>6</ClothPoseIndex> <Color_Hair>163,118,83,255</Color_Hair> <CutSceneDataPack>DefaultUnitCutscenePack</CutSceneDataPack> <EyeTexture>gfx\eyes\blinks\eyeblink_f2_ltblue.png</EyeTexture> <InfoCardBackground>BG_KingdomRugged</InfoCardBackground> <InfoCardBackgroundFlipped>0</InfoCardBackgroundFlipped> <ModelPath>Gfx\HKB\Units\Unit_Misc_Wolf_Mesh_01.hkb</ModelPath> <ModelScale>1.1</ModelScale> <MovingSFX>TEMP_KnightMarching1</MovingSFX> <OnHitParticleName>Bloody_OnHit</OnHitParticleName> <SkeletonPath>Gfx\HKB\Units\Unit_Misc_Wolf_Skeleton_01.hkb</SkeletonPath> <SoundPack>SoundPack_Dire Wolf</SoundPack> <TacticalModelScale>1.8</TacticalModelScale> <Texture_Eyes>gfx\eyes\blinks\eyeblink_f2_ltblue.png</Texture_Eyes> <Texture_Skin>Unit_Misc_DireWolf.dds</Texture_Skin> <UnitModelType>KingdomMale</UnitModelType> <Treasure> <Liklihood>20</Liklihood> <GameModifier> <ModType>GiveItem</ModType> <Attribute>Loot_WolfPelt</Attribute> </GameModifier> </Treasure> </UnitType>
Changing Hitpoints
Now, one of the most common and easiest ways to mod a unit is to give it more hit points. To do so, you'll need to find <Base_UnitStat_HitPoints> and change the number from 5 to let's say 8. Now the Wolf is over 50% tougher than it was before.

Changing Other Attributes
It is just as easy to change some of the other attributes such as defense, dodge, etc.. Find the right field and change the value of it.

Changing Gain per level
Another way to make units tougher is to change how much they gain of an attribute per level. In this case, you'll want to look at the fields which begin with "BonusPerLevel". This affects how much it gains each time the unit levels up.

Abilities
Abilities are a bit harder to do because they involve working with the CoreAbilities.xml file. In our case, we are going to remove an ability from the wolf, in this case, it's Vulnerability to Cold. To me, it doesn't make sense for it to have a vulnerability to Cold. It's got fur which is supposed to keep it from being cold. So, simply delete the whole line which says "<SelectedAbilityBonusOption>VulnerableToCold</SelectedAbilityBonusOption>". Now, this wolf unit is no longer vulnerable to cold.
Adding new Abilities to a Unit
Introduction
So, if we now want to add a new ability to a unit, we need to open another file, CoreAbilities.xml (hereafter known as the Abilities file). You need the abilities file to find your new abilities and use the proper name.

Adding Berserk to a Wolf
So, using the same Wolf we've been playing with, we are going to add a new ability that makes the wolf go berserk (why not). What you are going to need to do is copy this line:
<SelectedAbilityBonusOption>Spell_Howl_AI</SelectedAbilityBonusOption>
and paste it right below it, so you'll have to lines that read:
<SelectedAbilityBonusOption>Spell_Howl_AI</SelectedAbilityBonusOption> <SelectedAbilityBonusOption>Spell_Howl_AI</SelectedAbilityBonusOption>

We are going to replace one of the "Spell_Howl_AI" with "Berzerk". When wanting to add an ability, you need to use the name listed in AbilityBonusOption, not AbilityBonus.

Berzerk Ability
The ability we are going to use is Berzerk:
<AbilityBonus InternalName="BerzerkAbility"> <AbilityBonusOption InternalName="Berzerk"> <DisplayName>Berzerk</DisplayName> <Description>Unit can cast Berzerk on themselves.</Description> <Icon>Skill_Sov_Commander_Berserk.png</Icon> <GameModifier> <ModType>Unit</ModType> <Attribute>UnlockCombatAbility</Attribute> <StrVal>Berserk_Self</StrVal> <Provides>Unit can cast Berzerk on themselves.</Provides> </GameModifier> <Type>Ability</Type> <AIData AIPersonality="AI_General"> <AIPriority>5</AIPriority> </AIData> </AbilityBonusOption> </AbilityBonus>
6 Comments
El Bandito  [author] 19 Mar, 2018 @ 9:28am 
You will find I posted a mod with the fixes you wanted a whole lot more. Check the steam forums.
Burusagi 17 Mar, 2018 @ 8:42pm 
That'd be grand. AFAIK there are no fan patches/mods to fix this mess....
El Bandito  [author] 17 Mar, 2018 @ 7:31pm 
Maybe I'll go back and install the game and put together a mod where things actually work correctly and are done right...
Burusagi 17 Mar, 2018 @ 9:16am 
Woopie. It is very annoying to have my thematically favourite Sov not being useable due to this bug. >_>
El Bandito  [author] 17 Mar, 2018 @ 9:00am 
@Alcohol Fueled Brewtality: It should be. It's been a long time since I've played, but as I recall, it definitely should be.
Burusagi 17 Mar, 2018 @ 8:34am 
Would it be possible to fix the bug with the Tyrant leader (if customized in any way) not being able to build Pioneers or Scouts?