Define script effect spell magnitude through property

Post » Mon Feb 27, 2017 5:11 pm

Is it at all possible to define spell magnitude of a script effect through adding another script, I was thinking along the lines of a property? Scripting is a foreign language to me, so I barely understand it.



I'm trying to create custom illusion "Command" spells, through the use of the allegiance script from the Animal Allegiance Shout. I've been using conditions in the magic effect to define the level limits of the spell, as well as dual cast effects, since spell magnitude cannot be used as opposed to regular Frenzy spells etc.



The spells work if cast single-handedly if the target's level is low enough, however dual-casting won't work despite a different level requirement. Through testing, this seems caused by the first effect failing, single cast with lower level limit, and ignoring other spell effects even if they would work.



Anyone have ideas?

User avatar
ruCkii
 
Posts: 3360
Joined: Mon Mar 26, 2007 9:08 pm

Post » Mon Feb 27, 2017 9:42 pm

http://www.creationkit.com/index.php?title=Spell_Script



http://www.creationkit.com/index.php?title=SetNthEffectMagnitude_-_Spell



i dont understand what you're asking. you want to change the duration of a magiceffect? then second link.



it won't be a persistent change though, it will only apply for one game session. much like some console commands.



you need to be much more specific with what you're trying to accomplish and how its supposed to work

User avatar
JUan Martinez
 
Posts: 3552
Joined: Tue Oct 16, 2007 7:12 am

Post » Mon Feb 27, 2017 7:49 pm

I think he wants to set the spell magnitude at run-time which is not possible and the SKSE team once explained why SetMagnitude was difficult to create. SetNthEfftectMagnitude is the best you can do.

User avatar
Dina Boudreau
 
Posts: 3410
Joined: Thu Jan 04, 2007 10:59 pm

Post » Mon Feb 27, 2017 6:53 pm

Thank you for your replies.



Basically, I want the spell magnitude the same as other Illusion spells, in other words: magnitude = subject's level. So e.g. spell magnitude 7 -> affects all actors at or below level 7. I've tried with simple "<= level 7" conditions, and checks for dualcasting and perks. The spell works as intended when the subject is level 7 or lower, however when they're level 10 and dualcast would be needed, the spell still won't work, and I believe it's because the first spell effect (being <= level 7) fails, and it ignores the other spell effects which would work (dualcast -> <= level 15). So if conditions won't work to set the spell magnitude, I could think of two options: use a script to define magnitude, so it will benefit from dualcast and perks as intended, or use perhaps a sort of perk system that replaces spells depending on dualcast and perks, but I don't think that's feasible.



I'm terrible with scripts though, I can't really write them. I usually just use existing ones, or copy and alter them slightly and hope I did what I wanted it to do.



If I get it right, SetNthEffectMagnitude will only work 1 game session? So I'd have to have the script run on every load? That is to say if I even manage to write one that works as I intend it to.

User avatar
daniel royle
 
Posts: 3439
Joined: Thu May 17, 2007 8:44 am


Return to V - Skyrim