Scripts for Powers: Toggle and Cooldowns

Post » Thu Jun 21, 2012 10:44 am

Hi everyone. First I must say I have no idea of programing or Papyrus. I took a look at Papyrus tutorials but sadly it seems beyond my posibilities...

My problem is that I tried to make some new Powers but there are a few things CK doesnt support, so I guess it will need some scripting, These are the things I wanted:

1- I wanted some of these Powers to have a cooldown like Shouts, in seconds or even minutes, but not a full Skyrim day.

2- I wanted some of them toggleable like the Khajit Night Vision Power. This is very frustrating because I looked at other mods scripts that use toggleable spells, but couldnt make mine to work (I guess copy-paste with a few changes isnt enough).

3- I wanted some of those toggleable Powers to also drain magicka or stamina while active, so the Power will be deactivated when magicka or stamina reach cero.

I dont think its so hard and I usually try do it this things by myself, but this is bigger than me, so thank you very much for your help.
User avatar
Red Sauce
 
Posts: 3431
Joined: Fri Aug 04, 2006 1:35 pm

Post » Thu Jun 21, 2012 2:00 pm

Make two powers. One of them is the effect you want. The second one is the delivery mechanism. It's only effect is a script that adds the first power to the player.

You can then make cooldown powers by setting a timer that has to expire before the delivery mechanism will operate again. Or toggles by making the power constant, and having repeated use of the first power either add it to or remove it from the player.
User avatar
Kieren Thomson
 
Posts: 3454
Joined: Sat Jul 21, 2007 3:28 am

Post » Thu Jun 21, 2012 3:46 am

Hi everyone. First I must say I have no idea of programing or Papyrus. I took a look at Papyrus tutorials but sadly it seems beyond my posibilities...

My problem is that I tried to make some new Powers but there are a few things CK doesnt support, so I guess it will need some scripting, These are the things I wanted:

1- I wanted some of these Powers to have a cooldown like Shouts, in seconds or even minutes, but not a full Skyrim day.

2- I wanted some of them toggleable like the Khajit Night Vision Power. This is very frustrating because I looked at other mods scripts that use toggleable spells, but couldnt make mine to work (I guess copy-paste with a few changes isnt enough).

3- I wanted some of those toggleable Powers to also drain magicka or stamina while active, so the Power will be deactivated when magicka or stamina reach cero.

I dont think its so hard and I usually try do it this things by myself, but this is bigger than me, so thank you very much for your help.

Not sure about the first point but for the second one, this is something I have implemented for myself with the candlelight spell since it is so annoying having to cast every 60 seconds. I created a duplicate of the existing candlelight spell and changed it to an ability. Then create a new perk which has that ability on it. Then whenever I press a hotkey (skse thing) it will add the perk to the player, if the player already has the perk then it will just remove it instead.

As for the third I am not too sure but it may be possible to use the modAV command to reduce the player's current magicka by a set amount. Used in conjunction with a registerforUpdate(0.5) and an event onUpdate() you could have a reliable means to deduct magicka. Like I said though I'm not sure as I haven't tinkered with the modAV command yet. I dunno if it would deduct from the maximum magicka or the current magicka. Personally with my mod I implied a 50% penalty to magicka regeneration and a 60 point reduction in maximum magicka, both abilities added to the same perk.
User avatar
Juanita Hernandez
 
Posts: 3269
Joined: Sat Jan 06, 2007 10:36 am


Return to V - Skyrim