Jump to content

Setting a Perk Condition to Remove a Spell.


KravisGile

Recommended Posts

 

 

I'm really trying to make this mod as script-free as possible. Hmmm...

 

Did you create this NPC? If you do not use script to remove, unequip and equip the spells and shouts the results are not going to be very good. There will be lags between the times the spell is no longer available and the NPC equips the new spell.

 

 

It is a custom boss, yes. Scripting was never something I was good at. I was hoping there was an alternative via entry points and conditions. Setting events with GetHealthPercentage works flawlessly. It's a shame there's no entry point to remove or unequip a spell.

Link to comment
Share on other sites

 

 

 

I'm really trying to make this mod as script-free as possible. Hmmm...

 

Did you create this NPC? If you do not use script to remove, unequip and equip the spells and shouts the results are not going to be very good. There will be lags between the times the spell is no longer available and the NPC equips the new spell.

 

 

It is a custom boss, yes. Scripting was never something I was good at. I was hoping there was an alternative via entry points and conditions. Setting events with GetHealthPercentage works flawlessly. It's a shame there's no entry point to remove or unequip a spell.

 

 

As I mentioned above, there is. Tho it isn't a entry point, but as ability in the Perk Entries. Heck, even the Creation Kit website clearly states

 

 

Ability: An Ability Perk Entry adds the selected Ability or Spell to the player when they acquire the perk. Spells and Abilities added in this way will be removed when the Perk is removed.

 

Source: https://www.creationkit.com/index.php?title=Perk

 

Tho as some people above have mentioned, this will only allow the NPC to use the spell when the perk is added, it does not make the NPC equip it. I also assume that you have found a way to add and remove a perk to the NPC without scripting since you are using perks as a way to prevent the NPC from using said spell.

Edited by Laydor
Link to comment
Share on other sites

Sorry if this is immediately obvious, but I assume I place the HealthPercentage condition in the perk's main window instead? (Ability Perk Entries don't allow conditions from within). Also, shouts cannot be chosen in Ability Perk Entries.

Edited by KravisGile
Link to comment
Share on other sites

Sorry if this is immediately obvious, but I assume I place the HealthPercentage condition in the perk's main window instead? (Ability Perk Entries don't allow conditions from within). Also, shouts cannot be chosen in Ability Perk Entries.

 

No, putting conditions in the main window only affects what's required to purchase the perk in the skills menu. It won't enable/disable the perk itself.

 

Do you need the spell to be a shout?

Link to comment
Share on other sites

 

 

I also assume that you have found a way to add and remove a perk to the NPC without scripting since you are using perks as a way to prevent the NPC from using said spell.

 

If he can add an remove a perk, why not just do that with the spells? How would you add and remove a perk without using script?

 

 

 

It is a custom boss, yes. Scripting was never something I was good at. I was hoping there was an alternative via entry points and conditions. Setting events with GetHealthPercentage works flawlessly. It's a shame there's no entry point to remove or unequip a spell.

 

 

Yes it is. You have some really good help here, however I think you guys are wasting your time with attempting to find a viable alternative to scripting this.

Edited by Masterofnet
Link to comment
Share on other sites

 

 

 

I also assume that you have found a way to add and remove a perk to the NPC without scripting since you are using perks as a way to prevent the NPC from using said spell.

 

If he can and an remove a perk, why not just do that with the spells? How would you add and remove a perk without using script?

 

 

You can't. You also can't add and remove a perk WITH a script, unless you're doing it to the player :p

 

I agree that the most direct solution is to use a script, which would be very simple to write. But scripts also complicate things re: savegames and would prevent the mod from ever being made available on PS4. Anything you're able to do with conditions and such is handled by the engine directly rather than by Papyrus, so it's much faster and more reliable. Saying "I refuse to use a script for this" is unreasonable, but saying "If there's a not-horrendously-inconvenient way to do this without a script, I want to do it that way" is probably universally a good idea.

Link to comment
Share on other sites

 

You also can't add and remove a perk WITH a script, unless you're doing it to the player :tongue:

 

I did not know that. Never tried it. You would have to put the perk on an alias and force the NPC to alias at the appropriate time.

 

 

 

"I refuse to use a script for this" is unreasonable, but saying "If there's a not-horrendously-inconvenient way to do this without a script, I want to do it that way" is probably universally a good idea.

 

 

Do you think that is the case here?

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.

Edited by Laydor
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.

 

Where did you come from Man?? That is incredible! I am going to be keeping my eye on you. Very interesting.

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.

 

Where did you come from Man?? That is incredible! I am going to be keeping my eye on you. Very interesting.

 

 

Lol, I'm just a simple programmer who just recently decided to try modding for Skyrim. Heck really first time creating mods for any game really.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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