Jump to content

How to make a toggle power that costs stamina per second?


Killerwolf1010

Recommended Posts

I'm trying to edit a lesser power spell I got from a mod to use stamina as a replacement for mana basically, and drain a certain amount per second (I've accomplished this easy enough by making a stamina drain effect on it and making a condition for the spell be that you must have the total cost of the stamina drained available to use the spell) but the spell is timed and cancels after a set period of time.

 

I also want it to be able to toggle on and off freely to cancel the effect of the spell and the stamina drain early so I don't have to make multiple versions of the spell for different time lengths and so I can allow the spell to continue on longer as well, that's the part where I'm having trouble because for some reason I can't open other toggle scripts I've found because of some error with it to have a gander at how it works.

 

 

 

So quick version of what I'm trying to accomplish:

 

Toggle Power Spell (Activates with Z) that uses stamina per second as a cost instead of magicka per second, will last as long as you have stamina for the cost or until you use it again to toggle it off. Obviously it shouldn't cost any stamina to cancel the effect as well, another problem I'm having.

 

 

What I've already accomplished:

 

Power Spell (Activates with Z) that lasts a set amount of time and drains/costs stamina instead of magicka.

 

 

Is it possible? I'm at a loss of where to start, or finish, rather. If all else fails, I'll just have to make like 3-5 different lengths of the spell I guess. I'm going to keep trying to figure a way to do this without scripting since it seems to be having some kind of trouble and I haven't used it yet, maybe there are conditions I can use?

Edited by Killerwolf1010
Link to comment
Share on other sites

You'll probably need to extract the spell's psc from the addon's bsa archive if you want to see the source code - assuming the author released the source code. Many do not.

 

To make the spell a toggle, look into States on the CK Wiki.

If it was a simple toggle spell, I'd be fine. The problem is the stamina cost. I want it drain stamina per second and forcibly cancel when you don't have enough to maintain it BUT also be able to toggle it on and off as well. I've already made a timed version that has a stamina drain/cost to use, and already seen a version of the spell that has no cost but is a toggle (Though I can't see the script used), combining it is the tricky part... Out of all the spell packs I've used, I've never seen a spell that uses both a toggle and a cost per second.

 

Like hitting the spell again can make the stamina drain again or the stamina drain could be a constant effect but then doesn't cancel when I cancel the spell and instead doubles the stamina drain in activate effects.

 

So I need some condition to tell it to shut up and stop draining stamina if the spell is no longer active after it's toggled off. But I don't know how to tell it to do that, I don't see a solution in conditions.

 

I haven't really scripted before and as I said, I can't look at this script to know how it functions which is a big problem since I learn best that way. Looking at the tutorials on the wiki don't usually help me much, I get it much better seeing live examples of things I'm trying to use which I think is how most people learn the best. Seeing some default setup example doesn't help me do something specific.

 

 

Edit: One thing I've managed to do is make it so the stamina drain cancels when my stamina is completely drained, so that's a step closer anyways though the spell will keep activating as soon as I can use it again if it's not toggled off. I think there's something screwy with the script because the spell is re-added whenever it's used, I think I'm stuck unless I can see what the heck it's doing :P There are multiple different versions of the toggle spell in this mod I'm trying to edit so I think it adds, changes, deletes them from your effects or magic list depending on the circumstance. Oh well x.x

 

If anybody knows how to do this though, let me know.

Edited by Killerwolf1010
Link to comment
Share on other sites

Check out my mod Nature of the beast and look for adrenaline surge. Its togglable spell and it burns stamina. It even burns stamina more when when you are low level character. All source file is there.

 

Thank you! Will do and post results.

 

 

 

Well I got as far as learning to unpack it and open it with Notepad++ but it looks weird and is crammed together and has a bunch of "NUL" and random letter combinations like that...hmm. I assume Notepad++ isn't set up correctly to view the pex file. Ah, works with psc file.

 

Your mod does pretty much exactly what I was trying to do, and is even more complex so that's good if I can figure it all out :P Ah it's so much easier to understand like this. You should make a standalone version of just the adrenaline spell/effect that doesn't rely on script dragon. Is it even being updated anymore? I had to delete a bunch of my mods for it to play 1.6 Skyrim because it hadn't updated.

Edited by Killerwolf1010
Link to comment
Share on other sites

Check out my mod Nature of the beast and look for adrenaline surge. Its togglable spell and it burns stamina. It even burns stamina more when when you are low level character. All source file is there.

 

Thank you! Will do and post results.

 

 

 

Well I got as far as learning to unpack it and open it with Notepad++ but it looks weird and is crammed together and has a bunch of "NUL" and random letter combinations like that...hmm. I assume Notepad++ isn't set up correctly to view the pex file. Ah, works with psc file.

 

Your mod does pretty much exactly what I was trying to do, and is even more complex so that's good if I can figure it all out :P Ah it's so much easier to understand like this. You should make a standalone version of just the adrenaline spell/effect that doesn't rely on script dragon. Is it even being updated anymore? I had to delete a bunch of my mods for it to play 1.6 Skyrim because it hadn't updated.

Script Dragon has been updated pretty fast this time and it works with Skyrim 1.6 very well. Adrenaline surge works without Script Dragon too just the custom button doesnt work (you can turn it on/off via shout button though) and jump height isnt increased. Thats the only difference.

Edited by gulogulo
Link to comment
Share on other sites

  • Recently Browsing   0 members

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