[Question/SOLVED]How to add new abilities to Sovereign creation?

I'm trying to add in a few Master of Magic-esque abilities (trying to get the Mastery abilities at first), but they aren't showing up to character creation. I've been looking at the hotfix mods, and have been trying to base my code off that.

However, I'm having a lot of trouble getting this new ability to show up in the creation screen. I've got the code below. I'm just trying stuff out, so ignore the values for now.

Code: xml
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <AbilityBonuses>
  3.     
  4.     <DataChecksum NoParse="1">
  5.         <Ignore>DisplayName</Ignore>
  6.         <Translate>DisplayName</Translate>
  7.     </DataChecksum>
  8.     
  9.     <AbilityBonus InternalName = "MoM_ShardMaster">
  10.         
  11.         <AbilityBonusType>Player</AbilityBonusType>
  12.         
  13.         <AbilityBonusOption InternalName = "Sovereign_Ability_ShardMaster">
  14.             <DisplayName>Shard Master</DisplayName>
  15.             <Description>Just a test.</Description>
  16.             <Icon>Profession_Royalty.png</Icon>
  17.             <Cost>5</Cost>
  18.             
  19.             <GameModifier>
  20.                 <ModType>Unit</ModType>
  21.                 <Attribute>AdjustUnitStat</Attribute>
  22.                 <StrVal>UnitStat_Essense</StrVal>
  23.                 <Multiplier>2.00</Multiplier>
  24.             </GameModifier>
  25.             
  26.         </AbilityBonusOption>
  27.         
  28.     </AbilityBonus>
  29. </AbilityBonuses>

I've got the mods enabled, as the hotfix mod is working, but I'm completely stumped.

Any help is greatly appreciated.

4,793 views 8 replies
Reply #1 Top

You forgot to mark it as a champion talent... something like this:



<AbilityBonuses>
    <AbilityBonus InternalName = "MoM_ShardMaster">
        <AbilityBonusType>Champion_Talent</AbilityBonusType>
         
        <AbilityBonusOption InternalName = "Sovereign_Ability_ShardMaster">
            <DisplayName>Shard Master</DisplayName>
            <Description>Just a test.</Description>
            <Icon>Profession_Royalty.png</Icon>
            <Cost>5</Cost>
             
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustUnitStat</Attribute>
                <StrVal>UnitStat_Essense</StrVal>
                <Multiplier>2.00</Multiplier>
            </GameModifier>
             
        </AbilityBonusOption>
         
    </AbilityBonus>
</AbilityBonuses>

 

Edit, fixed, silly cut and paste.

Reply #2 Top

Oh, excellent! That's done it.

Now it's not actually multiplying the Essense. I'm a tad new to this, and I'm not having much fun wrestling with the small amount of resources I can find. Is there actually a <Multiplier> tag or have I misused AdjustUnitStat when it should be something else?

Reply #3 Top

To be honest I'm not exactly sure what you are trying to do (because I see Player tag and Unit tag, so I'm a bit confused), but here's how the tower of essence handles multiplier:

 

        <GameModifier>
            <ModType>Player</ModType>
            <Attribute>AbilityBonus</Attribute>
            <StrVal>A_UnitStat_Essence</StrVal>
            <Value>50</Value>
            <Provides>+50% Unit Essence</Provides>
        </GameModifier>

 

 

Reply #4 Top

I think I'm starting to see how this works.

Sorry about being vague, I've been scouring the forums for tutorials and come up with stuff that I think might be outdated. Been poking through the code for the hotfix mod and trying to learn from it, but not done too well so far, apparently.

Thanks for being so patient with me, just having a hard time getting to grips with all this.

EDIT: To clarify what I'm trying to do, I'm just trying to double essense at the moment. Later, I'm going to try and make the Shard Shrines produce a small amount of spell research and a bigger boost to essense.

Reply #5 Top

That much I got, hehe. I just wasn't sure if you wanted to double the essence for all your units, or just for the one with that ability only.

 

As for the shard shrines, that's easy enough to do, just remember that modifier to improvements doubles.

Reply #6 Top

I'm not sure which would be more Master of Magic-like. Probably that it should just be the units with the abilities. I'm not sure which, really. I've got it working for all units, I think, so I'll provide the code.

Code: xml
  1. &lt;AbilityBonuses&gt;
  2.     
  3.     &lt;AbilityBonus InternalName = "MoM_ShardMaster"&gt;
  4.         
  5.         &lt;AbilityBonusType&gt;Champion_Talent&lt;/AbilityBonusType&gt;
  6.         
  7.         &lt;AbilityBonusOption InternalName = "Sovereign_Ability_ShardMaster"&gt;
  8.             &lt;DisplayName&gt;Shard Master&lt;/DisplayName&gt;
  9.             &lt;Description&gt;Just a test.&lt;/Description&gt;
  10.             &lt;Icon&gt;Talent_Brilliant.png&lt;/Icon&gt;
  11.             &lt;Cost&gt;5&lt;/Cost&gt;
  12.             
  13.             &lt;GameModifier&gt;
  14.                 &lt;ModType&gt;Player&lt;/ModType&gt;
  15.                 &lt;Attribute&gt;AbilityBonus&lt;/Attribute&gt;
  16.                 &lt;StrVal&gt;A_UnitStat_Essence&lt;/StrVal&gt;
  17.                 &lt;Value&gt;100&lt;/Value&gt;
  18.                 &lt;Provides&gt;An extra 100% essence for all units.&lt;/Provides&gt;
  19.             &lt;/GameModifier&gt;
  20.             
  21.         &lt;/AbilityBonusOption&gt;
  22.         
  23.     &lt;/AbilityBonus&gt;
  24.     
  25. &lt;/AbilityBonuses&gt;

But I think I'd like to do it only for units with the ability. How would I do that?

Now, all I've got to do is make it so that it provides 20% extra essence for each shard of your mastery type that you control. But I'm not sure where I'd do that, or if it's possible. How would that be done? I have the feeling I'll need to use <Calculate> quite a bit.

Reply #7 Top

As far as I can tell <Calculate> doesn't work yet for abilities. Hopefully this will be fixed in a patch.

Reply #8 Top

Try this. Use the multiplier tag instead of value. This tag is great for doing multiplicative stat adjustments, and is actually better than value for these types of adjustments.

Code: xml
  1. <ol></ol>
  2. &lt;AbilityBonuses&gt;
  3.     &lt;AbilityBonus InternalName = "MoM_ShardMaster"&gt;  
  4.         &lt;AbilityBonusType&gt;Champion_Talent&lt;/AbilityBonusType&gt;
  5.         &lt;AbilityBonusOption InternalName = "Sovereign_Ability_ShardMaster"&gt;
  6.             &lt;DisplayName&gt;Shard Master&lt;/DisplayName&gt;
  7.             &lt;Description&gt;Just a test.&lt;/Description&gt;
  8.             &lt;Icon&gt;Talent_Brilliant.png&lt;/Icon&gt;
  9.             &lt;Cost&gt;5&lt;/Cost&gt;   
  10.             &lt;GameModifier&gt;
  11.                 &lt;ModType&gt;Player&lt;/ModType&gt;
  12.                 &lt;Attribute&gt;AbilityBonus&lt;/Attribute&gt;
  13.                 &lt;StrVal&gt;A_UnitStat_Essence&lt;/StrVal&gt;
  14.                 &lt;Multiplier&gt;2&lt;Multiplier&gt;
  15.                 &lt;Provides&gt;An extra 100% essence for all units.&lt;/Provides&gt;
  16.             &lt;/GameModifier&gt;  
  17.         &lt;/AbilityBonusOption&gt;
  18.     &lt;/AbilityBonus&gt;
  19. &lt;/AbilityBonuses&gt;
  20. <ol></ol>