Scruggsywuggsy the ferret told me to PM him this thread LINK so he could help here instead of on the OBSE 19 thread.
But I may not PM him because I would like to see if anyone else can help on this as he is really swamped right now with the beta OBSE 19 and I feel bad about taking up his time on this.
This script will be included in an object script that I already am giving to all NPC that are classified as magic specialization.
This script is intended to change all the base spells it can find to multiply the elemental attacks by a modifier (in this test it will be 5).
For this test I am only trying to change the fire damage spells.
Ok what follows is a BOAT LOAD OF GUESSING on my part. I understand about 65% of this, but this is my first time trying to do OBSE arrays. But it is time for me to try to catch up with the new OBSE language anyway. What in the following will prevent the script from running?
array_var AdjustedSpellsshort indexshort countref ActorReflong damageshort DoonceBegin gamemodeif doonce == 0 set actorRef to getcontainer;---- This is not really going to be here as I already do this in the beginning of the rest of the script. But I left this in so that I would not confuse anyone.set doonce to 1 if ActorRef.isactor == 1 if AcrotRef.ismovingforward == 1;---------------- This is a little trick I came up with to test if the NPC is alive, not parallelized, not unconscious, not let AdjustedSpells := ActorRef.GetSpells; disabled, not stuck and is valid all in ONE check! IT tastes great and is less filling! endif; Works 99% of the time thus I only use it in cases where if it does not work it is not harmful just if not a little inconvenient. endifendifif eval (ar_Size AdjustedSpells) > 0 ForEach index < ar_Size AdjustedSpells;------------- Loop through all spells in the list if CompareName "{}" SpellRef != 1;-------------------- check to see if the spell has already been processed once before. set count to GetMagicItemEffectCount SpellRef while (count) set count to count - 1 if GetNthEICode spellRef count == FIDG set Damage to ( GetNthEIMagnitude SpellRef count * 5 );------------- multiply the magnitude by 5 to make spells 5 times normal damage. SetNthEIMagnitude Damage SpellRef count if CompareName "{}" SpellRef != 1. AppendToName " {}" spellRef;------------- append the name of the spell with the symbol {} so players and the script knows the spell has been processed once endif loop endif Set index to index + 1 endifendifend