Suggestions for mutli-enchanting?

Post » Fri Sep 10, 2010 11:48 pm

I'm wanting to create a weapon that has two types of elemental damage, but I want the two damages to randomly change or at least randomly change the shader effect. I suppose I need a script to do this or would putting both enchantments on with equal values randomize the shader effects?
scn ElementalWeaponScriptref targetshort randbegin scripteffectstartset target to GetSelfset rand to GetRandomPercent  if rand <= 50   Target.addspell FireSpell   pms effectFireDamage  else if rand > 50   Target.addspell FrostSpell   pms effectFrostDamage  endifend


The script for the Fire Spell would look like one that Raestloz wrote for me not long ago:

scn FireSpellRemovalScriptfloat timerref mebegin GameModeset me to GetSelfset timer to timer + GetSecondsPassedif timer >= 1	me.removespell FireSpell            sms effectFireDamageendifend


And the script for the Frost spell would look like:

scn FrostSpellRemovalScriptfloat timerref mebegin GameModeset me to GetSelfset timer to timer + GetSecondsPassedif timer >= 1	me.removespell FrostSpell            sms effectFrostDamageendifend


That would get both the Fire and Frost damage effects and play the correct magic shaders. Note: Ability type spells will not stop affecting their target until they are removed. That is why you need to attach script to them that will make them remove themselves. I'm working on a mod that uses this setup (or a similar one) on multiple weapons, so I know it works.
User avatar
sharon
 
Posts: 3449
Joined: Wed Nov 22, 2006 4:59 am

Post » Fri Sep 10, 2010 12:41 pm

Abilities ignore resistances though. A fire ability can kill fire atronachs just as well as a frost or shock one could. Except for the shader (I think a fire damage ability would add a shader, wouldn't it?), there's no difference between any damage caused by abilities.

As Raestloz said, the target could be knocked away from the X marker so its touch spell would miss. Could the X marker be scaled up in the cs to several times its size so it would cover a massive area and always hit, or does its size not matter, and it always casts from the center, not the entire object?
User avatar
jennie xhx
 
Posts: 3429
Joined: Wed Jun 21, 2006 10:28 am

Post » Fri Sep 10, 2010 11:11 am

Abilities ignore resistances though. A fire ability can kill fire atronachs just as well as a frost or shock one could. Except for the shader (I think a fire damage ability would add a shader, wouldn't it?), there's no difference between any damage caused by abilities.

As Raestloz said, the target could be knocked away from the X marker so its touch spell would miss. Could the X marker be scaled up in the cs to several times its size so it would cover a massive area and always hit, or does its size not matter, and it always casts from the center, not the entire object?

I'd say an X marker casts only from the center of the object. Besides, if X marker do cast spells from all over its mesh, it wouldn't be a viable solution for a sword, as the user might be close enough to the target to be within the marker's cast range

Maybe a little check on target? See if the target is affected by the spell or not. If not, cast the spell again; if yes then return.
This http://cs.elderscrolls.com/constwiki/index.php/Distinguishing_Between_Physical_and_Magickal_Hits should help about being hit by a spell, but still a check must be performed if it is indeed the intended spell or not
User avatar
megan gleeson
 
Posts: 3493
Joined: Wed Feb 07, 2007 2:01 pm


Return to IV - Oblivion