How to add Melee Applies Spell

I am having some trouble getting my special melee attacks for weapon types to properly use the "AppliesRandomModifier" tag. Does "MeleeAppliesSpell" negate the use of said tag? I did the standard thing where the spell Berserker has 10 game modifiers and 9 are empty. That should be a 10% chance to have the spell do damage, but for some reason it always does damage. 

 

Beyond this method, is there any code that can simply make the meleeappliesspell have a modifiable chance to hit?

13,906 views 10 replies
Reply #1 Top

Hf, wake up and fix the game for me!!!

Reply #2 Top

http://i.snag.gy/0ZPQ3.jpg

Shrug. It works for me. Show the XML of how you apply the meleeappliesspell, and the xml for the spell you are applying.

 

Reply #3 Top


Code: xml
  1. <SpellDef InternalName="Berserker">
  2. <DisplayName>Berserker</DisplayName>
  3. <Description>Does double damage</Description>
  4. <Image>Ability_PoisonousI_Icon.png</Image>
  5. <IconFG>Ability_PoisonousI_Icon.png</IconFG>
  6. <IconColor>210,110,210</IconColor>
  7. <SpellBookSortCategory>Unit</SpellBookSortCategory>
  8. <SpellBookSortSubCategory>UnitDamage</SpellBookSortSubCategory>
  9. <SpellType>Tactical</SpellType>
  10. <SpellClass>Offensive</SpellClass>
  11. <SpellSubClass>Damage</SpellSubClass>
  12. <SpellTargetType>EnemyUnit</SpellTargetType>
  13. <HideInHiergamenon>1</HideInHiergamenon>
  14. <AppliesRandomModifier>1</AppliesRandomModifier>
  15. <IsCastable>0</IsCastable>
  16. <GameModifier>
  17. <ModType>Unit</ModType>
  18. <Attribute>DefendableDamage</Attribute>
  19. <Description>Berserked</Description>
  20. </GameModifier>
  21. <GameModifier>
  22. </GameModifier>
  23. <GameModifier>
  24. </GameModifier>
  25. <GameModifier>
  26. </GameModifier>
  27. <GameModifier>
  28. </GameModifier>
  29. <GameModifier>
  30. </GameModifier>
  31. <GameModifier>
  32. </GameModifier>
  33. <GameModifier>
  34. </GameModifier>
  35. <GameModifier>
  36. </GameModifier>
  37. <GameModifier>
  38. </GameModifier>
  39. <AIData AIPersonality="AI_General">
  40. <AIPriority>5</AIPriority>
  41. </AIData>
  42. </SpellDef>

 

Code: xml
  1. <GameModifier>
  2. <ModType>Unit</ModType>
  3. <Attribute>MeleeAppliesSpell</Attribute>
  4. <StrVal>Berserker</StrVal>
  5. <Provides>10% Chance to get an extra attack</Provides>
  6. <Value>10</Value>
  7. </GameModifier>

Reply #4 Top

I tried it with and without the value thing, hoping that having it would trigger a percent chance like bash.

Reply #5 Top

How abouts you make proper gamemodifiers? Not empty husks, shells, illusions of what they could be?

Also, in what context is that meleeappliesspell modifier?

Reply #6 Top

I put this on the axes to make them get a little extra attack now and then.

Reply #7 Top

What do I need to put in the modifier to get it to count?

Reply #8 Top


I know I haven't a clue what you are doing, but recall that some of the mod stuff from the main directory wouldn't register for me unless I ran it in admin mode.

Reply #9 Top

Quoting seanw3, reply 8
What do I need to put in the modifier to get it to count?

<GameModifier>
            <ModType>Unit</ModType>
            <Attribute>AdjustUnitStat</Attribute>
            <StrVal>donothingunitstat</StrVal>
            <Value>0</Value>
            <Duration>0</Duration>
    </GameModifier>

+1 Loading…