Jump to content

Setting a Perk Condition to Remove a Spell.


KravisGile

Recommended Posts

Ok I think I figured it out. Not completely sure if it will work or not.

 

  • First we have to start with a Spell. We'll give this the ID MonitorAbility and a descriptive Name. Change the Effect Archetype to Ability, set Casting Type to Constant Effect and Delivery to Self.
  • Then we create an effect for each stage of the boss. Give each effect an ID relating to which stage it is and a descriptive Name. Change the Effect Archetype to Value Modifier, set Casting Type to Constant Effect and Delivery to Self. Under Flags, check No Death Dispel, No Hit Event, and Hide in UI.
  • Add each Stage effect to the MonitorAbility, with no duration required. Add the condition you want for that stage to be active.
  • Next create a Perk for each Stage. For each Stage add the spells you want the NPC to be able to use as an Ability.
  • After that for each Stage Effect, set Perk to Apply to the perk that is for each stage.

Lastly add the spell to the NPC's spell list. This in theory should work. It might not. What this is doing is adding a spell that is constantly working, and only the magical effects for a stage are active. Meaning that the perk for each stage should only be active for each stage. Now this will only work for Spells and not shouts as you have mentioned that you can't add shouts to the perk (Tho you can add the Spell for the Word of a Shout).

 

But honestly it would probably be easier to do this as a script. As you would attach the script to the boss and just do register for update and do the condition checks and depending on what stage, you can add/equip a spell/shout to the NPC and remove/unequip a spell/shout when the condition is over.

 

This is a really good idea, but unfortunately it won't work due to the limitation I mentioned earlier. The "PerkToApply" field is only applicable to the player. There is no way to add a perk to a non-player actor at runtime. Period.

 

And on that subject @Masterofnet: Aliases don't have a perk field.

Link to comment
Share on other sites

 

And on that subject @Masterofnet: Aliases don't have a perk field.

 

 

 

You are correct. I have not worked in the kit for just three months and the cobwebs have already set in. I must apologize. At least I am correct about the script.

 

And to that "Wild Man" Laydor. Keep up the good work! :devil:

Link to comment
Share on other sites

 

 

And on that subject @Masterofnet: Aliases don't have a perk field.

 

 

 

You are correct. I have not worked in the kit for just three months and the cobwebs have already set in. I must apologize. At least I am correct about the script.

 

And to that "Wild Man" Laydor. Keep up the good work! :devil:

 

 

No worries dude. My experience with perks and NPCs is perhaps uniquely storied. Not everyone has tried and failed as many times as I XD

Link to comment
Share on other sites

I really appreciate all the help and suggestions. My reservations regarding scripts is mainly focused on avoiding any potential bad line of script from corrupting someone's save. However, I decided to "bite the bullet" and attempt a script for an Unequip Shout/Equip Shout based on Health Percentage... and what happened? As soon as I went to make a new script, I get the error message "Extend Script does not exist" for ObjectReference.

 

Googled the error. Mentions unzipping Scripts.zip into the right area.. which I've already done.

 

They really don't make this easy, do they?

Edited by KravisGile
Link to comment
Share on other sites

 

Ok I think I figured it out. Not completely sure if it will work or not.

 

  • First we have to start with a Spell. We'll give this the ID MonitorAbility and a descriptive Name. Change the Effect Archetype to Ability, set Casting Type to Constant Effect and Delivery to Self.
  • Then we create an effect for each stage of the boss. Give each effect an ID relating to which stage it is and a descriptive Name. Change the Effect Archetype to Value Modifier, set Casting Type to Constant Effect and Delivery to Self. Under Flags, check No Death Dispel, No Hit Event, and Hide in UI.
  • Add each Stage effect to the MonitorAbility, with no duration required. Add the condition you want for that stage to be active.
  • Next create a Perk for each Stage. For each Stage add the spells you want the NPC to be able to use as an Ability.
  • After that for each Stage Effect, set Perk to Apply to the perk that is for each stage.

Lastly add the spell to the NPC's spell list. This in theory should work. It might not. What this is doing is adding a spell that is constantly working, and only the magical effects for a stage are active. Meaning that the perk for each stage should only be active for each stage. Now this will only work for Spells and not shouts as you have mentioned that you can't add shouts to the perk (Tho you can add the Spell for the Word of a Shout).

 

But honestly it would probably be easier to do this as a script. As you would attach the script to the boss and just do register for update and do the condition checks and depending on what stage, you can add/equip a spell/shout to the NPC and remove/unequip a spell/shout when the condition is over.

 

This is a really good idea, but unfortunately it won't work due to the limitation I mentioned earlier. The "PerkToApply" field is only applicable to the player. There is no way to add a perk to a non-player actor at runtime. Period.

 

And on that subject @Masterofnet: Aliases don't have a perk field.

 

 

Darn. So close but so far

Link to comment
Share on other sites

I really appreciate all the help and suggestions. My reservations regarding scripts is mainly focused on avoiding any potential bad line of script from corrupting someone's save. However, I decided to "bite the bullet" and attempt a script for an Unequip Shout/Equip Shout based on Health Percentage... and what happened? As soon as I went to make a new script, I get the error message "Extend Script does not exist" for ObjectReference.

 

Googled the error. Mentions unzipping Scripts.zip into the right area.. which I've already done.

 

They really don't make this easy, do they?

 

From my understanding of scripting, it will only corrupt someone's save if you modify an exist Form or script to call a new script or a modified existing script or modified part of a script. But if you only add scripts to your Forms and only modify those scripts, it shouldn't corrupt the save.

Link to comment
Share on other sites

I really appreciate all the help and suggestions. My reservations regarding scripts is mainly focused on avoiding any potential bad line of script from corrupting someone's save. However, I decided to "bite the bullet" and attempt a script for an Unequip Shout/Equip Shout based on Health Percentage... and what happened? As soon as I went to make a new script, I get the error message "Extend Script does not exist" for ObjectReference.

 

Googled the error. Mentions unzipping Scripts.zip into the right area.. which I've already done.

 

They really don't make this easy, do they?

 

Just to make sure you've got the scripts unzipped properly, just find something in the CK that has a script attached, right-click and select "edit source." If a text editor pops up with the source code in it, then the CK can find the scripts. If it gives you an error, then the CK can't find the source scripts for some reason. But either way, we'll have a better idea of what might be wrong.

Link to comment
Share on other sites

I've tried everything I could think of. The scripts, extracted from the Misc.bsa and the Scripts.zip file are all in Scripts or Scripts\Source. The "Edit Source" option on scripts in the CK is grayed out and unclickable. Creating a new script extending to ObjectReference gives an "Extend Script does not exist" even though I am literally looking at the ObjectReference script, sitting in the list when filtered...

 

Is there something inherently disabled in the SSE CK (perhaps a CreationKit.ini line) that is preventing me from doing anything with scripting?

Edited by KravisGile
Link to comment
Share on other sites

I've tried everything I could think of. The scripts, extracted from the Misc.bsa and the Scripts.zip file are all in Scripts or Scripts\Source. The "Edit Source" option on scripts in the CK is grayed out and unclickable. Creating a new script extending to ObjectReference gives an "Extend Script does not exist" even though I am literally looking at the ObjectReference script, sitting in the list when filtered...

 

Is there something inherently disabled in the SSE CK (perhaps a CreationKit.ini line) that is preventing me from doing anything with scripting?

 

The source scripts should be in "Skyrim Special Edition\Data\Source" not "Skyrim Special Edition\Data\Scripts\Source". But just so you know, all your created scripts go into the \Scripts folder when you compile them.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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