Require/use item on spell cast ?

Hi all,

Bit of a longshot, but anyone know if there is a way to use/delete an item when casting a spell ?

So for example let's say that to cast a particular spell requires 3 different scroll items... that is do-able with unitstats.... but then what if you wanted to have the 3 scroll items "consumed" when casting the spell..... possible?

I was fairly sure I had seen something like somewhere... but I could be wrong.

Thanks.

3,387 views 5 replies
Reply #1 Top

What about blizzard scrolls? They are usable, so you could make any other item usable, right?

Here's the code

Code: xml
  1. <GameItemType InternalName="Scroll_Blizzard">
  2.         <DisplayName>Blizzard Scroll</DisplayName>
  3.         <Description>Use this scroll to do 16 cold damage (+2 per water shard) per member to enemy units.</Description>
  4.         <ShopValue>90</ShopValue>
  5.         <GameModifier>
  6.             <ModType>Unit</ModType>
  7.             <Attribute>UseSpell</Attribute>
  8.             <StrVal>Blizzard_Ability</StrVal>
  9.             <Provides>Allows the unit to cast Blizzard, which does cold damage to all units within a 2 tile radius</Provides>
  10.         </GameModifier>
  11.         <IsAvailableForSovereignCustomization>0</IsAvailableForSovereignCustomization>
  12.         <Likelihood>20</Likelihood>
  13.         <RarityDisplay>Uncommon</RarityDisplay>
  14.         <HeroOnly>1</HeroOnly>
  15.         <IsAvailableForUnitDesign>0</IsAvailableForUnitDesign>
  16.         <IsUsable>0</IsUsable>
  17.         <UsableInBattle>1</UsableInBattle>
  18.         <UsableOnlyOnceInBattle>0</UsableOnlyOnceInBattle>
  19.         <ArtDef>Scroll_Blizzard_ArtDef</ArtDef>
  20.         <GameItemTypeArtDef InternalName="Scroll_Blizzard_ArtDef">
  21.             <GameItemTypeModelPack InternalName="Scroll_Blizzard_Default">
  22.                 <IconFile>Item_BlizzardScroll_Icon.png</IconFile>
  23.                 <GameItemTypeModel>
  24.                 </GameItemTypeModel>
  25.             </GameItemTypeModelPack>
  26.         </GameItemTypeArtDef>
  27.     </GameItemType>

Ever tried just adding the UseSpell game modifier tags to something equippable?

Not sure if that's eaxctly what you are looking for, but might be worth testing.

Reply #2 Top

Yep for sure that works.

But the complexity i'm looking for is a spell that requires (and consumes) 2 different scrolls when cast.

So let's say your champion is carrying a "scroll of death" and a "scroll of fire".... I want that to unlock the "Spell of Flaming Death", which when cast... consumes both scrolls (and kills everyone via fiery death).

I'm sure it's possible to unlock the spell by making each scroll generate a different unitstat, and then having an autounlocked spell that requires both unitstats.... but what i'm not sure about is if it's possible to use/consume more than one item when casting a spell in this way.  I'll have a look into the blizzard scroll stuff though.

Cheers.

 

Reply #4 Top

There was an alchemy and crafts mod that basically let you turn reagents into global world resources, then you used those to craft your final scroll/item.

Reply #5 Top

Quoting Primal_Savage, reply 3
You wouldn't be getting the UnitStat values to unlock the spell w/o first consuming the scrolls though since consumables are not equipped. 

Oh yeah good point.

 

OK thanks for the thoughts though, the quest thing is an interesting idea but not sure if the AI would do it... will check it out though.  The global resource thing would work pretty well for a human but again possibly too complicated for AI.  

 

All good will look into those ideas though thanks all.