Jump to content

CK Spell Effect 'Condition' Questions


WintersFury55

Recommended Posts

I have never been sure how to use conditions for spell effects in the CK. I would like to create a version of a flesh spell that is toggleable, yet when on, automatically activates during combat.

Also, I would like to know if there is a condition to make spells ignore followers, such as fear or rage spells.

Link to comment
Share on other sites

Conditions on spell effects deterimine if an effect is applied to target or not. For example, if you set a condition that target is not in 'CurrentFollowerFaction', then this will not affect followers. You can make a spell apply only in certain locations, only on particular races or factions, during specific times of day, etc etc.
Link to comment
Share on other sites

Conditions on spell effects deterimine if an effect is applied to target or not. For example, if you set a condition that target is not in 'CurrentFollowerFaction', then this will not affect followers. You can make a spell apply only in certain locations, only on particular races or factions, during specific times of day, etc etc.

That is a bit more helpful. I wasn't sure how to approach the problem of not affecting followers.

 

it's just a simple test. If this thing matches that condition do this, otherwise do something else (or nothing at all)

 

simple example:

 

If blah == "THIS"

then (do something)

else (do something else)

end

That much was kind of clear, but I have seen things like !=.

 

I am still wondering how to make toggleable spells.

Link to comment
Share on other sites

Scriptname spelltoggle extends activemagiceffect


; ----- ----- ----- ----- ----- ----- ----- ----- ----- -----


Spell Property YourAbility Auto


Event OnEffectStart (Actor akTarget, Actor akCaster)

If akTarget.HasSpell(YourAbility) == false

akTarget.AddSpell(YourAbility, false)

Else

akTarget.RemoveSpell(YourAbility)

EndIf

EndEvent


1. Create your desired magic effect with the casting type constant effect, delivery self


2. Make the spell for your magic effect an ability, constant effect, self, either hand (in this spell set the properties to self, Isincombat==1 AND)


3. Create another magic effect with the archetype set to script, casting type fire and forget, delivery self, add the spelltoggle script to this effect, in the script properties select your previously created constant effect spell and set it


4. Make the spell for the above magic effect a lesser power, fire and forget, self, equip type voice, set the magnitude of the magic effect in it to 0.00


5. Done, the spell you want to give yourself is the fire and forget one you created, cast to turn on, cast again to turn off


Alternatively you can grab my mod here https://www.nexusmods.com/skyrimspecialedition/mods/70085 (Vampire version) it has the script plus you can have an actual look at how to do a toggle if unclear :smile:


Look at aaamistformAB and aaamistformFF

Edited by Dashyburn
Link to comment
Share on other sites

 

Scriptname spelltoggle extends activemagiceffect
; ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Spell Property YourAbility Auto
Event OnEffectStart (Actor akTarget, Actor akCaster)
If akTarget.HasSpell(YourAbility) == false
akTarget.AddSpell(YourAbility, false)
Else
akTarget.RemoveSpell(YourAbility)
EndIf
EndEvent
1. Create your desired magic effect with the casting type constant effect, delivery self
2. Make the spell for your magic effect an ability, constant effect, self, either hand (in this spell set the properties to self, Isincombat==1 AND)
3. Create another magic effect with the archetype set to script, casting type fire and forget, delivery self, add the spelltoggle script to this effect, in the script properties select your previously created constant effect spell and set it
4. Make the spell for the above magic effect a lesser power, fire and forget, self, equip type voice, set the magnitude of the magic effect in it to 0.00
5. Done, the spell you want to give yourself is the fire and forget one you created, cast to turn on, cast again to turn off
Alternatively you can grab my mod here https://www.nexusmods.com/skyrimspecialedition/mods/70085 (Vampire version) it has the script plus you can have an actual look at how to do a toggle if unclear :smile:
Look at aaamistformAB and aaamistformFF

 

This mod seems pretty promising. I had previously made custom cloak spells that would activate in combat, but I made them passive effects and they would break a lot. I will play around with making my custom toggle spells some more.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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