Aller au contenu

Photo

Items With Rechargable Powers


  • Veuillez vous connecter pour répondre
8 réponses à ce sujet

#1
trias10

trias10
  • Members
  • 10 messages
Does anyone know if it is possible to create an item which has an activated effect, but does not consume the item in the process? So for example (balance issues aside), a Gem of Healing, where you can put the item on your quickslot bar, and every time you use the gem (click on it), it casts a healing spell on the character, then has a cooldown of X seconds, and then can be used again.

I have tried to create just such an item. I created a custom ABI_base GDA for which I had an entry of ITEM_GEM_HEALING, then created the .uti item in the Toolset, and set the Activated Ability to ITEM_GEM_HEALING. I set the ability_type in the ABI_base to 4, and the use_type to  4 as well. Ability_mode I set to 0.

The item works perfectly in the game when testing, except for the fact that it disappears after you use it. It is consumed, like a potion. I need it to stay persistent, and just have a cooldown timer instead. I have not been able to figure out how to do this, however, I know the Engine supports it because in the SinglePlayer campaign, there is a plot item called the Litany of Andrala which is a multiple use, cooldown based item. However, I have not been able to locate this item in the Toolset in order to see how it works (and copy over the settings).

If anyone knows how to accomplish what I am trying to do or knows where the Litany is in the Toolset, I would greatly appreciate any help.

#2
Bsett100

Bsett100
  • Members
  • 28 messages
I would like to know how to do this as well. It would be nice to have a unlimited stack of ice arrows for my archer.

#3
MadaSnave2

MadaSnave2
  • Members
  • 12 messages
you could base it on the item you get in game that has reuseable values and a like 10 min timer (spoiler from this point on ) the one in the mage tower for the final fight

just copy it change name icon and the effect

Modifié par MadaSnave2, 23 novembre 2009 - 06:52 .


#4
eiham

eiham
  • Members
  • 38 messages
best bet is to change the "spellscript" for your ability (in your ABI_ 2da) and in your spellscript increase the stack size by one each time the item is used.

#5
trias10

trias10
  • Members
  • 10 messages

MadaSnave2 wrote...

you could base it on the item you get in game that has reuseable values and a like 10 min timer (spoiler from this point on ) the one in the mage tower for the final fight

just copy it change name icon and the effect


Yes, this is the Litany of Andrala which I mention in my original post. The problem is, I cannot find this item anywhere in the toolset (as I mention in my original post).

It may be saved under another name, but I have gone through every item in the Toolset and cannot find this one :(

#6
trias10

trias10
  • Members
  • 10 messages
Sorry, been out of the scene for a bit. Has this been discovered in the new 1.01 toolset? I had a quick look but still can't find the Litany. Has anyone figured out how to create unlimited use items?

#7
Apolyon6k

Apolyon6k
  • Members
  • 175 messages
open single plyer module, click on items, in the search field type lit and you find i in the broken circle folder, it uses the activated ability ITEM_ABILITY_UNIQUE_POWER_UNLIMITED_USE

maybe thats the one you need

#8
trias10

trias10
  • Members
  • 10 messages
Cheers, will take a look.

#9
trias10

trias10
  • Members
  • 10 messages
I did some digging into this via the SinglePlayer campaign (which I never loaded up before because I read it was a very, very bad thing to do so). Anyway, it appears that the ITEM_ABILITY_UNIQUE_POWER_UNLIMITED_USE activated ability triggers a simple wrapper script called ITEM_UNIQUE_POWER, which simply re-instantiates the triggering event into one of type EVENT_TYPE_UNIQUE_POWER, and passes it's params via the original event's param struct.



Events of type EVENT_TYPE_UNIQUE_POWER are automatically handled by the module script, so you need a handler inside your module script to do whatever it is you want to happen when the item is activated. For the Litany of Andralla, the power is hardcoded into a resource script which is called by the main SinglePlayer module script.



My original design idea was to create an infinite use item that can shapeshift the user into a Golem. So in my script I need to somehow handle the EVENT_TYPE_UNIQUE_POWER callback and re-cast it into a spell event which I can pass to the shapeshift.ncs handler. My only problem is that I'm not sure how to accomplish this re-cast.



Does anyone know how to essentially create a spell effect on the caster via an Event callback where the triggering event is not the spell itself but some other event (such as using an item or opening a door)?