Creating a secondary Maul spell?


I would like to attach a different maul spell on weapons that, say have different "accuracy penalty", while keeping the Maul effect on monsters and the sort the same.

Is this possible? I've looked at all xml files that contains maul, and none of them seem to deal directly with the maul scripts...

11,877 views 8 replies
Reply #1 Top

I found this in CoreAbilities.xml - you might try messing around with the <Value>100</Value rating. Perhaps <Value>200</Value> means -30% to accuracy [or -7.5%]?

 

    <AbilityBonus InternalName="MaulAbility">
        <AbilityBonusType>Unit_Design</AbilityBonusType>
        <AbilityBonusOption InternalName="Maul">
            <DisplayName>Maul</DisplayName>
            <Description>Unit continues to attack until it misses, each attack has a cumulative -15% to Accuracy</Description>
            <Icon>Ability_Maul_Icon.png</Icon>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustUnitStat</Attribute>
                <StrVal>UnitStat_MaulChance</StrVal>
                <Value>100</Value>
                <Provides>Unit continues to attack until it misses, each attack has a cumulative -15% to Accuracy</Provides>
            </GameModifier>
            <AdditionalTrainingTurns>60</AdditionalTrainingTurns>
            <CombatRating>100</CombatRating>
            <IsCombatAbility>1</IsCombatAbility>
            <Type>Aggressive</Type>
            <SupportedUnitModelType>JuggernautMale</SupportedUnitModelType>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
        </AbilityBonusOption>
    </AbilityBonus>

Reply #2 Top

Quoting random_thoughts_7, reply 1
I found this in CoreAbilities.xml - you might try messing around with the <Value>100</Value rating. Perhaps <Value>200</Value> means -30% to accuracy [or -7.5%]?

 

    <AbilityBonus InternalName="MaulAbility">
        <AbilityBonusType>Unit_Design</AbilityBonusType>
        <AbilityBonusOption InternalName="Maul">
            <DisplayName>Maul</DisplayName>
            <Description>Unit continues to attack until it misses, each attack has a cumulative -15% to Accuracy</Description>
            <Icon>Ability_Maul_Icon.png</Icon>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustUnitStat</Attribute>
                <StrVal>UnitStat_MaulChance</StrVal>
                <Value>100</Value>
                <Provides>Unit continues to attack until it misses, each attack has a cumulative -15% to Accuracy</Provides>
            </GameModifier>
            <AdditionalTrainingTurns>60</AdditionalTrainingTurns>
            <CombatRating>100</CombatRating>
            <IsCombatAbility>1</IsCombatAbility>
            <Type>Aggressive</Type>
            <SupportedUnitModelType>JuggernautMale</SupportedUnitModelType>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
        </AbilityBonusOption>
    </AbilityBonus>


I'll give that a shot!

By the way, do you know a way of making a unit scale bigger as it levels up?

I've tried:

    <GameModifier>
      <ModType>Unit</ModType>
      <Attribute>AdjustUnitStat</Attribute>
      <StrVal>ModelScale</StrVal>
      <Value>0.05</Value>
      <PerLevel>1</PerLevel>
    </GameModifier>

But it doesn't do anything

I've tried

    <GameModifier>
      <ModType>Unit</ModType>
      <Attribute>AdjustUnitStat</Attribute>
      <StrVal>UnitStat_TacticalScaleMultiplier</StrVal>
      <Value>0.05</Value>
      <PerLevel>1</PerLevel>
    </GameModifier>

But it only affects the model in tactical battles, where as in main map, it is still same size

Further, when ir educe the Model scale, it works if the unit is by itself, however if the unit is within an army, it becomes the original size again. :/

Reply #3 Top

No I'm pretty sure that that's the chance of the Maul ability triggering when you attack.  (So if you want Maul to trigger less often you could probably lower that, but I don't think raising it would make it more effective?)

I know if you manage to look at the effects of a unit that's in the middle of mauling you'll see an effect called "maul debuff" but I'm not quite sure how you'd change that.

Reply #4 Top

Quoting tentacled-godqueen, reply 3
sure how you'd change that.

I know about the maul debuff, unfortunately, the game files goes something like this

something tagged with Maul -> looks into elementaldefs for what maul file it is -> redirects to mauldebuff

I have no clue how to make it so that:

something tagged with Maul -> ___________________ -> redirects to newmauldebuff

Reply #5 Top

Here is the effect that reduces the accuracy by 15% each successive attack. 

   <SpellDef InternalName="MaulDebuff">
        <DisplayName>Maul Debuff</DisplayName>
        <Description>Effect after a successful Maul attack</Description>
        <IconFG>Ability_Maul_Icon.png</IconFG>
        <SpellBookSortCategory>Unit</SpellBookSortCategory>
        <SpellBookSortSubCategory>UnitCurse</SpellBookSortSubCategory>
        <SpellType>Tactical</SpellType>
        <SpellClass>Defensive</SpellClass>
        <SpellSubClass>Debuff</SpellSubClass>
        <SpellTargetType>Self</SpellTargetType>
        <HideInHiergamenon>1</HideInHiergamenon>
        <IsCastable>0</IsCastable>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>AdjustUnitStat</Attribute>
            <StrVal>UnitStat_Accuracy</StrVal>
            <Duration>1</Duration>
            <Calculate InternalName="Calc" ValueOwner="CastingUnit">
                <Expression><![CDATA[[UnitStat_Accuracy] * 15]]></Expression>
            </Calculate>
            <Calculate InternalName="Value">
                <Expression><![CDATA[[Calc] / -100]]></Expression>
            </Calculate>
        </GameModifier>
        <AIData AIPersonality="AI_General">
            <AIPriority>5</AIPriority>
        </AIData>
    </SpellDef>

If you want to change this for different weapons and other such items you will have to do a little bit of background making for particular weapons. Use some background stats as Heavenfall has set up the foundation in that sense. Then your calculations will go a little more indepth as now equiping items will adjust stats and reduce stat when un-equipped. (UnitStat_IsShield) is kindof the idea.

So if you want axes to loose more accuracy, then you would have to add a UnitStat_IsAxe to the game

        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>AdjustUnitStat</Attribute>
            <StrVal>UnitStat_IsAxe</StrVal>
            <Value>1</Value>
         </GameModifier>

Then in your calculations above you need to change it to say something like this

             <Calculate InternalName="Calc" ValueOwner="CastingUnit">
                 <Expression><![CDATA[[UnitStat_Accuracy] * 15]]></Expression>
             </Calculate>
             <Calculate InternalName="Calc2" ValueOwner="CastingUnit">
                 <Expression><![CDATA[ ([UnitStat_IsAxe] + 1) * [Calc]]]></Expression>
             </Calculate>
              <Calculate InternalName="Value">
                 <Expression><![CDATA[[Calc2] / -100]]></Expression>
             </Calculate>

This will then double the accuracy penalty with anyone who is carrying the axe. Of course you can change things in a whole lot of ways, this is just one of them.

The value in your ability stat is the percent chance that maul will actually take place, in the above 100% of the time.

Reply #6 Top

Quoting parrottmath, reply 5
percent chance that maul

Awesome!

Do I ned to add a definition of "IsAxe" into the UnitStat file?

Reply #7 Top

Something like this.

    <UnitStatType InternalName="UnitStat_IsAxe">
        <DisplayName>Is Axe</DisplayName>
        <Description>Is this unit wielding an axe?</Description>
        <Hidden>1</Hidden>
        <DefaultValue>0.0</DefaultValue>
    </UnitStatType>

+1 Loading…
Reply #8 Top

Quoting parrottmath, reply 7
Something like this.

    <UnitStatType InternalName="UnitStat_IsAxe">
        <DisplayName>Is Shield</DisplayName>
        <Description>Is this unit wielding an axe?</Description>
        <Hidden>1</Hidden>
        <DefaultValue>0.0</DefaultValue>
    </UnitStatType>

sweet!

Thank you so much!