Help with modding in starting champions

I'm trying to use modified versions of Odinlowbane's Duke the Wolf Lord for starting units for my custom Sov.

I've been able to get 3 of them (Buddy, Blue, and Kia, named after my past/current dogs) to spawn as starting units.  So far so good.

Problem is:

-they are shown as Human race, not beasts.

-they aren't champions, they're regular units.

I modified my custom sov's .xml to add them in:

 

		<GameModifier InternalName="GameModifier 2588">
			<ModType>Map</ModType>
			<Attribute>SummonUnit</Attribute>
			<UnitClass>Champion_GreatWolf_Buddy</UnitClass>
			<Value>1.0000</Value>
			<Multiplier>1.0000</Multiplier>
		</GameModifier>
		<GameModifier InternalName="GameModifier 2589">
			<ModType>Map</ModType>
			<Attribute>SummonUnit</Attribute>
			<UnitClass>Champion_GreatWolf_Blue</UnitClass>
			<Value>1.0000</Value>
			<Multiplier>1.0000</Multiplier>
		</GameModifier>
		<GameModifier InternalName="GameModifier 2590">
			<ModType>Map</ModType>
			<Attribute>SummonUnit</Attribute>
			<UnitClass>Champion_GreatWolf_Kia</UnitClass>
			<Value>1.0000</Value>
			<Multiplier>1.0000</Multiplier>
		</GameModifier>


And then took Odinlowbane's 'Duke the Wolf Lord.xml', copy/pasted 2 more copies (to have 3 pets),
changed the names and a few stats, then put in into the mod folder.

Game starts up fine, runs ok, the 3 wolves are present in my starting party, but they're not champs or beasts.

The Duke .xml has them as champs and beasts. The custom sov .xml doesn't have race/isChamp anywhere.

Any advice/help would be appreciated.


12,454 views 19 replies
Reply #1 Top

I had this same problem. Its how you summoned them. Summonunit makes them summons. summons are just place holders that don't get traits, don't get to pick a class. What you need to do is make it a quest or a spawn unit, I unforunately Have not figured out how to do the second. and I would love to see more dogs in this game. 

Reply #2 Top

Thanks!

A quest to figure this out, cool!

Reply #4 Top

I use this XML when I am testing heroes, It allows me to summon a hero right from the start using the DEBUG spell.

<?xml version="1.0"?>
<SpellDef InternalName="XXXX">
  <DisplayName>DEBUG</DisplayName>
  <Description>If this spell shows up in your game, don't bother playing.</Description>
  <Image>S_SummonEarthElemental_Painting.png</Image>
  <IconFG>S_SummonEarthElemental_Icon.png</IconFG>
  <IconBG>S_SummonEarthElemental_Icon_BG.png</IconBG>
  <IconColor>167,249,131</IconColor>
  <AutoUnlock>1</AutoUnlock>
  <CanStack>0</CanStack>
  <Cooldown>-1</Cooldown>
  <SpellType>Strategic</SpellType>
  <SpellClass>Defensive</SpellClass>
  <SpellSubClass>Summon</SpellSubClass>
  <SpellTargetType>Self</SpellTargetType>
  <Range>0</Range>
  <GameModifier InternalName="Reward2">
    <ModType>Unit</ModType>
    <Attribute>UnitJoinArmy</Attribute>
    <StrVal>Champion_Banshee</StrVal>
    <UnitClass>Champion</UnitClass>
  </GameModifier>
  <AIData AIPersonality="AI_General">
    <AIPriority>70</AIPriority>
  </AIData>
  <HitSoundFX>Spell_Summon_Earth_Elemental_01</HitSoundFX>
  <SpellDefEffect>
    <EffectName>S_SummonEarthElemental_Particle</EffectName>
    <LocalPosition>0,0,0</LocalPosition>
    <EffectScale>0.5</EffectScale>
    <EffectDelay>0</EffectDelay>
    <SnapToTerrain>1</SnapToTerrain>
  </SpellDefEffect>
</SpellDef>
 

Reply #6 Top

Quoting Odinlowbane, reply 3

woah, is that your dog? Good looking dog!
Yep, that's the current dog Kia -- mostly siberian but with a little german shepherd I think.  The pic is 'compressed' a bit to fit, she's 'leaner' than it appears.

A better pic -- her 'impatient' look:

When we first got her:

More recent:

Reply #7 Top

Quoting Heavenfall, reply 4

I use this XML when I am testing heroes, It allows me to summon a hero right from the start using the DEBUG spell.

<snip>

Wow, Thank You!

Frog, if you or anyone from SD is reading this -- Hire This Person!

Please!

Reply #8 Top

omg sir, your dogs, must be confiscated and brought to me, it is illegal to have dogs that cute.

Reply #9 Top

There does seem to be one issue with the spell indicated above - the enemy can get it too.

Reply #10 Top

That's not an issue, that's intended. If you want to limit it there are ways to do that. Check out how existing spells are limited in CoreSpells.xml and CoreAbilities.xml.

Reply #11 Top

Ok I have a fix.

 

First, open up the sovereign in question:

C:\Users\Administrator\Documents\My Games\LegendaryHeroes\Units

 

(or whatever your user is)

 

The second line or so should be:

<UnitTypes>

 

Then above that line, type:

<AbilityBonuses>
    <AbilityBonus InternalName="SummonHeroX">
        <AbilityBonusType>Unit_Design</AbilityBonusType>
        <AbilityBonusOption InternalName="SummonHeroXName">
            <DisplayName>Summon Hero</DisplayName>
            <Description>+1 Dodge and Summons your hero</Description>
            <Icon>Ability_Acrobat_Icon.png</Icon>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustUnitStat</Attribute>
                <StrVal>UnitStat_Dodge</StrVal>
                <Value>1</Value>
                <Provides>+1 Dodge</Provides>
            </GameModifier>
            <AdditionalTrainingTurns>6</AdditionalTrainingTurns>
            <Type>Defensive</Type>
            <AIData AIPersonality="AI_General">
                <AIPriority>100</AIPriority>
            </AIData>
        </AbilityBonusOption>
    </AbilityBonus>
</AbilityBonuses>

 

 

Reply #12 Top

Just below </AbilityBonuses>, and above <UnitTypes> (type in between - open a new line)

 

<Spells>    
    <SpellDef InternalName="TestWaerloga">
      <DisplayName>Summon Waerloga</DisplayName>
      <Description>Summons Waerloga to you, complete with mount!</Description>
      <Image>S_CalltoArms_Painting.png</Image>
      <IconFG>S_CalltoArms_Icon.png</IconFG>
      <IconBG>S_SummonEarthElemental_Icon_BG.png</IconBG>
      <IconColor>167,249,131</IconColor>
      <AutoUnlock>1</AutoUnlock>
      <CanStack>0</CanStack>
      <Cooldown>-1</Cooldown>
      <SpellType>Strategic</SpellType>
      <SpellClass>Defensive</SpellClass>
      <SpellSubClass>Summon</SpellSubClass>
      <SpellTargetType>Self</SpellTargetType>
      <CasterMustBeSov>1</CasterMustBeSov>
      <Range>0</Range>
      <Prereq>
            <Type>AbilityBonusOption</Type>
            <Attribute>SummonHeroXName</Attribute>
          </Prereq>
      <GameModifier InternalName="Reward1">
        <ModType>Unit</ModType>
        <Attribute>UnitJoinArmy</Attribute>
        <StrVal>Champion_Waerloga</StrVal>
        <UnitClass>Champion</UnitClass>
        <Value>20</Value>
      </GameModifier>
      <AIData AIPersonality="AI_General">
        <AIPriority>100</AIPriority>
      </AIData>
      <HitSoundFX>Spell_Summon_Earth_Elemental_01</HitSoundFX>
      <SpellDefEffect>
        <EffectName>S_SummonEarthElemental_Particle</EffectName>
        <LocalPosition>0,0,0</LocalPosition>
        <EffectScale>0.5</EffectScale>
        <EffectDelay>0</EffectDelay>
        <SnapToTerrain>1</SnapToTerrain>
      </SpellDefEffect>
    </SpellDef>
    
    
</Spells>

 

I've set the AI priority to 100 so the AI should cast if you give this spell to it.

 

 

 

 

Reply #13 Top

Finally in the sovereign itself, add:

<SelectedAbilityBonusOption>SummonHeroXName</SelectedAbilityBonusOption>

 

This will give the sovereign in question the spell needed and +1 Dodge.

 

 

 

 

To summon a different champion, change the line

<StrVal>Champion_Waerloga</StrVal>

 

to whatever champion

 

To change the summoning level, change

 

<Value>20</Value>

 

To whatever you wish. Note that this wills summon a level 20 champion at start.

Reply #14 Top

You can change the name of the spells if you want to give more summoning spells to give each AI a different champion, just change the:

 

<AbilityBonus InternalName="SummonHeroX">

   <AbilityBonusOption InternalName="SummonHeroXName">

 

then mod the

<Prereq>
            <Type>AbilityBonusOption</Type>
            <Attribute>SummonHeroXName</Attribute>
          </Prereq>

 

to reflect the new name

 

and for the sovereign, change the

<SelectedAbilityBonusOption>SummonHeroXName</SelectedAbilityBonusOption>

 

to the new ability name.

 

 

Edit:

Is there an easier way to do this?

 

My goal is to give each AI player a unique champion at the start of the game.

Reply #15 Top

Quoting UnleashedElf, reply 14

My goal is to give each AI player a unique champion at the start of the game.

umm...doesn't that already exist with their Sovereign? :fuzzy:

 

Reply #16 Top

A second champion.

Reply #17 Top

Hey Nick and others!

I'm working on a similar idea.  Essentially, introducing an administrator champion to tend the store while the Sov wanders off.  Limiting said Admin's move to 1 MP a turn makes them great homebodies...

Anyways, what I ended up doing is, as suggested above, making a quest that fires on turn 3 (or later if you haven't built your city yet).  Bacco The Beggar was what gave me the idea, although he sometimes doesn't show up, same for my quest, despite putting some ridiculous spawn rate on it (9000).  It shows up most of the time, but not always (autosave 2 turns back helps with this).

The spell idea is probably a more sure fired bet, although I'd suggest having an item, say a Note that Summons George, that casts the spell 'Summon George' when you use it, using the above spell suggestions.  That way, the item goes away once George is summoned, and you don't have this 'Summon George' ability floating around on your Sov's list of abilities.  Which just got me thinking about the Bacco quest...


               
            <GameModifier InternalName="Reward1">
                <ModType>Unit</ModType>
                <Attribute>UnitJoinArmy</Attribute>
                <StrVal>Champion_Bacco</StrVal>
                <StrVal2>Bacco the Beggar</StrVal2>
                <Value>3</Value>
                <UnitClass>Champion</UnitClass>
            </GameModifier>

 

I'd be curious if you took the above .xml and added it to your Sov, what would happen, or if you had an item that included the above code, say...

Code: xml
  1. &lt;/GameItemTypes&gt;
  2.     &lt;GameItemType InternalName="Token_MyThreeWolves"&gt;
  3.         &lt;DisplayName&gt;Token of the Three Wolves&lt;/DisplayName&gt;
  4.         &lt;Description&gt;This token will summon three wolfs to serve you&lt;/Description&gt;
  5.         &lt;ShopValue&gt;90&lt;/ShopValue&gt;
  6.                 &lt;GameModifierInternalName="BuddyJoin"&gt;
  7.                 &lt;ModType&gt;Unit&lt;/ModType&gt;
  8.                 &lt;Attribute&gt;UnitJoinArmy&lt;/Attribute&gt;
  9.                 &lt;StrVal&gt;Champion_GreatWolf_Buddy&lt;/StrVal&gt;
  10.                 &lt;StrVal2&gt;Buddy the Great Wolf&lt;/StrVal2&gt;
  11.                 &lt;Value&gt;3&lt;/Value&gt;
  12.                 &lt;UnitClass&gt;Champion&lt;/UnitClass&gt;
  13.             &lt;/GameModifier&gt;&lt;GameModifier InternalName="BlueJoin"&gt;
  14.                 &lt;ModType&gt;Unit&lt;/ModType&gt;
  15.                 &lt;Attribute&gt;UnitJoinArmy&lt;/Attribute&gt;
  16.                 &lt;StrVal&gt;Champion_GreatWolf_Blue&lt;/StrVal&gt;
  17.                 &lt;StrVal2&gt;Blue the Great Wolf&lt;/StrVal2&gt;
  18.                 &lt;Value&gt;3&lt;/Value&gt;
  19.                 &lt;UnitClass&gt;Champion&lt;/UnitClass&gt;
  20.             &lt;/GameModifier&gt;
  21.            &lt;GameModifier InternalName="KiaJoin"&gt;
  22.                 &lt;ModType&gt;Unit&lt;/ModType&gt;
  23.                 &lt;Attribute&gt;UnitJoinArmy&lt;/Attribute&gt;
  24.                 &lt;StrVal&gt;Champion_GreatWolf_Kia&lt;/StrVal&gt;
  25.                 &lt;StrVal2&gt;KiaTheGreatWolf&lt;/StrVal2&gt;
  26.                 &lt;Value&gt;3&lt;/Value&gt;
  27.                 &lt;UnitClass&gt;Champion&lt;/UnitClass&gt;
  28.             &lt;/GameModifier&gt;
  29.         &lt;IsAvailableForSovereignCustomization&gt;0&lt;/IsAvailableForSovereignCustomization&gt;
  30.         &lt;Likelihood&gt;400&lt;/Likelihood&gt;
  31.         &lt;RarityDisplay&gt;Common&lt;/RarityDisplay&gt;
  32.         &lt;HeroOnly&gt;1&lt;/HeroOnly&gt;
  33.         &lt;IsAvailableForUnitDesign&gt;0&lt;/IsAvailableForUnitDesign&gt;
  34.         &lt;IsUsable&gt;1&lt;/IsUsable&gt;
  35.         &lt;ArtDef&gt;Token_Wolf_ArtDef&lt;/ArtDef&gt;
  36.         &lt;GameItemTypeArtDef InternalName="Token_Wolf_ArtDef"&gt;
  37.             &lt;GameItemTypeModelPack InternalName="Token_Wolf_Default"&gt;
  38.                 &lt;IconFile&gt;Item_TokenoftheWolf.png&lt;/IconFile&gt;
  39.                 &lt;TintR&gt;53&lt;/TintR&gt;
  40.                 &lt;TintG&gt;55&lt;/TintG&gt;
  41.                 &lt;TintB&gt;182&lt;/TintB&gt;
  42.                 &lt;SFX&gt;Equip_MagicRing_01&lt;/SFX&gt;
  43.                 &lt;SFX&gt;Equip_MagicRing_02&lt;/SFX&gt;
  44.                 &lt;SFX&gt;Equip_MagicRing_03&lt;/SFX&gt;
  45.                 &lt;SFX&gt;Equip_MagicRing_04&lt;/SFX&gt;
  46.                 &lt;GameItemTypeModel&gt;
  47.                 &lt;/GameItemTypeModel&gt;
  48.             &lt;/GameItemTypeModelPack&gt;
  49.         &lt;/GameItemTypeArtDef&gt;
  50.     &lt;/GameItemType&gt;
  51. &lt;/GameItemTypes&gt;

Then, simply add this to your Sovereign file:


        <AutoCreateEquipment>Token_MyThreeWolves</AutoCreateEquipment>

Let us know how it goes!

Reply #18 Top

Quick followup.  Here is the the code I just tried out ingame.

First off, I tried adding this to the Sov file, with no luck:

            <GameModifier InternalName="JoinBaccoJoin">
                <ModType>Unit</ModType>
                <Attribute>UnitJoinArmy</Attribute>
                <StrVal>Champion_Bacco</StrVal>
                <StrVal2>Bacco the Beggar</StrVal2>
                <Value>3</Value>
                <UnitClass>Champion</UnitClass>
            </GameModifier>

FYI, I also tried this iteration, no dice:


        <GameModifier InternalName="JoinBaccoJoin">
            <ModType>Map</ModType>
            <Attribute>UnitJoinArmy</Attribute>
            <UnitClass>Champion_Bacco</UnitClass>
            <Value>1.0000</Value>
            <UnitClass>Champion</UnitClass>
        </GameModifier>

Bacco did NOT appear at all when I started the game.

 

So, since that didn't work, I made a BaccoToken.xml file, which I placed in the Mygames/LH/Mods folder, which looks like this:

Code: xml
  1.     &lt;/GameItemTypes&gt;
  2.         &lt;GameItemType InternalName="Token_Bacco"&gt;
  3.             &lt;DisplayName&gt;Token of Bacco&lt;/DisplayName&gt;
  4.             &lt;Description&gt;This token will summon Bacco to serve you&lt;/Description&gt;
  5.             &lt;ShopValue&gt;90&lt;/ShopValue&gt;
  6.             &lt;GameModifier InternalName="JoinBaccoJoin"&gt;
  7.                 &lt;ModType&gt;Unit&lt;/ModType&gt;
  8.                 &lt;Attribute&gt;UnitJoinArmy&lt;/Attribute&gt;
  9.                 &lt;StrVal&gt;Champion_Bacco&lt;/StrVal&gt;
  10.                 &lt;StrVal2&gt;Bacco the Beggar&lt;/StrVal2&gt;
  11.                 &lt;Value&gt;3&lt;/Value&gt;
  12.                 &lt;UnitClass&gt;Champion&lt;/UnitClass&gt;
  13.             &lt;/GameModifier&gt;
  14.             &lt;IsAvailableForSovereignCustomization&gt;0&lt;/IsAvailableForSovereignCustomization&gt;
  15.             &lt;Likelihood&gt;400&lt;/Likelihood&gt;
  16.             &lt;RarityDisplay&gt;Common&lt;/RarityDisplay&gt;
  17.             &lt;HeroOnly&gt;1&lt;/HeroOnly&gt;
  18.             &lt;IsAvailableForUnitDesign&gt;0&lt;/IsAvailableForUnitDesign&gt;
  19.             &lt;IsUsable&gt;1&lt;/IsUsable&gt;
  20.             &lt;ArtDef&gt;Token_Wolf_ArtDef&lt;/ArtDef&gt;
  21.             &lt;GameItemTypeArtDef InternalName="Token_Wolf_ArtDef"&gt;
  22.                 &lt;GameItemTypeModelPack InternalName="Token_Wolf_Default"&gt;
  23.                     &lt;IconFile&gt;Item_TokenoftheWolf.png&lt;/IconFile&gt;
  24.                     &lt;TintR&gt;53&lt;/TintR&gt;
  25.                     &lt;TintG&gt;55&lt;/TintG&gt;
  26.                     &lt;TintB&gt;182&lt;/TintB&gt;
  27.                     &lt;SFX&gt;Equip_MagicRing_01&lt;/SFX&gt;
  28.                     &lt;SFX&gt;Equip_MagicRing_02&lt;/SFX&gt;
  29.                     &lt;SFX&gt;Equip_MagicRing_03&lt;/SFX&gt;
  30.                     &lt;SFX&gt;Equip_MagicRing_04&lt;/SFX&gt;
  31.                     &lt;GameItemTypeModel&gt;
  32.                     &lt;/GameItemTypeModel&gt;
  33.                 &lt;/GameItemTypeModelPack&gt;
  34.             &lt;/GameItemTypeArtDef&gt;
  35.         &lt;/GameItemType&gt;
  36.     &lt;/GameItemTypes&gt;

Then, I added this to my Sov file:

        <AutoCreateEquipment>Token_Bacco</AutoCreateEquipment>

Then I started a new game with my Sov.  Sure enough, there was the Summon Wolf icon in my item/ability bar.  I clicked on the Summon Wolf icon, and voila, Bacco Appeared!  I built my first city, and sure enough, Bacco had shop and trade options, not upgrade options!  Note that he was level 3, per the <value>3<tag>.

 

Soooo, it looks like this is a way to summon a Champion WITHOUT using a spell.  Might save some time maybe, and of course there is also Heavenfall's approach if you like the spell thing!

Reply #19 Top

^ That's really great news!

 

I'm still holding out for a way to do it without a separate summon ability (so they simply start with you the old fashioned way), but this thread has given me some hope.  Thanks guys.