Jump to content

Photo

Attaching a Script to a Magic Effect Item via Scripts

obse construction set cse oblivion

  • Please log in to reply
1 reply to this topic

#1
VencGanence

VencGanence

    Enthusiast

  • Supporter
  • PipPip
  • 130 posts

Is it possible to dynamically add script effects to enchantments like regular effects can?

 

As in after RemoveAllEffectItems Ench

I can do some wizardry to re-add the script effect

 

A Ctrl+F through the list of functions showed a lot of stuff for setting and getting script effect items, but none for adding.

GetNthEffectItemScript	
GetNthEffectItemScriptName	
GetNthEffectItemScriptSchool	
GetNthEffectItemScriptVisualEffect
GetSpellScriptEffectAlwaysApplies
IsNthEffectItemScripted	
IsNthEffectItemScriptHostile
MagicItemHasEffectItemScript
ModNthEffectItemScriptName
ScriptEffectElapsedSeconds
SetNthEffectItemScript
SetNthEffectItemScriptHostile	
SetNthEffectItemScriptName	
SetNthEffectItemScriptNameEX	
SetNthEffectItemScriptSchool	
SetNthEffectItemScriptVisualEffect	
SetNthEffectItemScriptVisualEffectC
SetSpellScriptEffectAlwaysApplies

is what turned up.



#2
VencGanence

VencGanence

    Enthusiast

  • Supporter
  • PipPip
  • 130 posts

I ended up making 2 methods to accomplish what I wanted, leaving only scripted effects on a dynamically generated enchantment.

 

One is very simple:

 

Create Ench

Create EnchBase

RemoveAllEffectItems Ench

CopyAllEffectItems EnchBase Ench

 

The other is to make my own RemoveAllEffectItems function that ignores scripted effects.







Also tagged with one or more of these keywords: obse, construction set, cse, oblivion

Page loaded in: 1.017 seconds