Jump to content

Help For Adding Cooldowns to Shouts or Spells for my Dragon Mod


Recommended Posts

 

Hey all author of Dragons Use Thu'um here. I am in dire need for assistance. I want to add some sort of cooldown to my dragons so once they use a shout, they won't be able to use that certain shout again until the cooldown is up. I don't know how to approach the situation. I created an empty magic effect (script) and set a duration at the end of shouts spell (didnt work)  I selected the "no recast" option did not work as well sadly. How can I give the shouts individual cooldowns so lets say when the dragon uses disarm, he wont be able to use disarm again until cooldown is up, but he can still use other shouts while disarm is under CD.

The issue is most shout\spells are DELIVERY: Aimed, or Concentration and the CASTING TYPES are fire and forget so controlling them are harder. With Self Delivery spells and shouts, the cooldowns actually work.

Ideas?

-A script that removes the used shout and re adds it back to the dragon after the  cooldown? (I have very limited scripted knowledge so would need help)

-A method that adds some sort of a cooldown to the casted shout so the enemy won't use that shout while its under CD but still use other shouts

Kindly requesting help!

Link to comment
Share on other sites

This is how I would do it. Whenever the dragon casts the spell, cast a spell with a duration on the caster via script. Put the condition on the original spell HasMagicEffect akEffect == 0 where akEffect is the magic effect of the spell cast on the caster. Be sure to check the swap target and caster box in the condition. This will make it so your dragon can't cast the spell if they have the akEffect.

  • Like 1
Link to comment
Share on other sites

None. An empty script magic effect without any scripts works well.
It just needs to get attached to the dragon so it is seen by the condition on the 1st spell.
Using such empty script magic effects is a common modding technique to mark an actor based on time and/or conditions, so it can then be targeted by another spell or an alias fill.
Link to comment
Share on other sites

Thank you so much. So how will I use the empty script magic effect like that xkkmEl? On Aimed fire and forget and on aimed concentration spells? That method works on self fire and forget  spells but not on aimed fire and forget or concentration. How would I attach it to the dragon via the magic effect condition? Btw there are a lot of shouts and spells so I am assuming I need to do it individually? Like alduin has 13 shouts so I need to do this for each shout correct? How would I do that ideally?

Link to comment
Share on other sites

Add an ActiveMagicEffect script to each magic effect you want to respect/trigger your timeout:

event OnEffectStart( Actor akTarget, Actor akCaster)
	MyTimeoutSpell.cast( akCaster, akCaster)
endevent

Your timeout spell is fire and forget, self targeted, and has a single marker magic effect with the duration of your choice.  This marker magic effect is of type script, without any scripts attached.

Now, for each spell that casts a magic effect on which you placed the script, add a condition that tests the absence of the marker magic effect.

Now, anyone who casts any spell that uses a modified magic effect will trigger your script, that may not be what you want (you want it to be dragons, as I understand).  In this case, place any conditions you need to scope this correctly on the timeout spell and its marker magic effect.

Modifying vanilla spells and magic effects like this may bring compatibility issues with other mods making similar modifications.  I have no experience with that, and so I can only warn of the potential.  Adding the script will be fine, but the spell conditions are another matter.

Link to comment
Share on other sites

  • 8 months later...

So I tried all those but sadly the dragons still use the shouts, however the targets become immune to the shout effects during the cooldown duration. So the targets are immune to the shouts while the cooldown is active. Did I do it wrong? Or is that how its supposed to work? I wanted the dragons to simply not use the shouts while the cooldown is active

Link to comment
Share on other sites

Can't shout if it doesn't HAVE any shouts. To make this problem go away you can have a routine in place to simply remove all their shouts for x time, then re-add them. I'd probably find another way if it was me, but that would def solve your issue for the time being. Can always tweak approaches later once you get something working at all, as you are wanting

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...