How to make Weapon Arts that look like Bloodskal Blade?
Steps:
-
Create a new Magic Effect —> Create a new Spell —> Attach the Magic Efeect to this Spell. (Type:Ability;Self)
-
Create a new Perk —> Attach Perk to a weapon —> When weapon equips, the game gives the Perk to Player —> The Perk initiates another another Weapon Arts Spells to Player.
-
Create the actual Weapon Arts Spells. Just copy Vanilla Bloodskal Blade Spells.Make two of them, one is for Horizontal, another is Vertical. Those spells will shoot shoot Magic Waves when the effects start. When the Magic Waves hit NPC, they deal damage to them.
More detailed tutorial: Link
Two versions:
- Lite version: Good for Two-haned Greatsword. The code is from the Vanilla game.
- Complex version: Used for One-handed weapons and Two-handed Axes and more. Code is from @Azazellz.
Weapon Arts (Lite):
1Scriptname MyWeaponArtsScript extends ActiveMagicEffect2
3Spell Property SpellHoriz auto4Spell Property SpellVert auto5
6Actor SelfRef7
8Event OnEffectStart(Actor akTarget, Actor akCaster)9 SelfRef = akCaster10 registerForAnimationEvent(SelfRef, "AttackPowerStanding_FXstart")11 registerForAnimationEvent(SelfRef, "AttackPowerRight_FXstart")12 registerForAnimationEvent(SelfRef, "AttackPowerLeft_FXstart")13 registerForAnimationEvent(SelfRef, "AttackPowerBackward_FXstart")14 registerForAnimationEvent(SelfRef, "AttackPowerForward_FXstart")15endEvent16
17Event OnEffectFinish(Actor akTarget, Actor akCaster)18;;Automatically Unregisterd when Ability Removed19ENDEVENT20
21Event OnAnimationEvent(ObjectReference akSource, string EventName)22 if (eventName == "AttackPowerRight_FXstart") || (eventName == "AttackPowerLeft_FXstart") || (eventName == "AttackPowerBackward_FXstart")23 SpellHoriz.cast(SelfRef)24
25 elseif (eventName == "AttackPowerStanding_FXstart") || (eventName == "AttackPowerForward_FXstart")26 SpellVert.cast(SelfRef)27 endif28endEVENTExplain:
Whenever the attack event happens, the game listen to Player’s animation types, and apply a magic effect to Player. There are two Properties:
- SpellHoriz - Link it to DLC2BloodskalBladeSpellHoriz
- SpellVert - Link it to DLC2BloodskalBladeSpellVert
Complex Version:
1scriptName TheBloodskalBladeFullScript extends activemagiceffect2
3actor property selfref auto hidden4
5spell property OneHandedSpellForward auto6spell property OneHandedSpellStand auto7spell property OneHandedSpellSide auto8spell property OneHandedSpellBack auto9
10spell property OneHandedSpellForwardLeft auto11spell property OneHandedSpellStandLeft auto12spell property OneHandedSpellSideLeft auto13spell property OneHandedSpellBackLeft auto14
15spell property SpellForward auto16spell property SpellStand auto17spell property SpellSide auto18spell property SpellBack auto19
20spell property AxeSpellForward auto21spell property AxeSpellStand auto22spell property AxeSpellSide auto23spell property AxeSpellBack auto24
25spell property UnarmedSpellForward auto26spell property UnarmedSpellStand auto27spell property UnarmedSpellSide auto28spell property UnarmedSpellBack auto29
30spell property SpellBash auto31
32Float property Direction auto33Float property Speed auto34
35
36function OnEffectStart(actor akTarget, actor akCaster)37
38 selfref = akCaster39 self.registerForAnimationEvent(akCaster as objectreference, "PowerAttack_Start_End")40 self.registerForAnimationEvent(akCaster as objectreference, "AttackPowerStanding_FXStart")41 self.registerForAnimationEvent(akCaster as objectreference, "AttackPowerRight_FXStart")42 self.registerForAnimationEvent(akCaster as objectreference, "AttackPowerLeft_FXStart")43 self.registerForAnimationEvent(akCaster as objectreference, "AttackPowerBackward_FXStart")44 self.registerForAnimationEvent(akCaster as objectreference, "AttackPowerForward_FXStart")45 self.registerForAnimationEvent(akCaster as objectreference, "bashRelease")46 self.registerForAnimationEvent(akCaster as objectreference, "WeaponSwing")47 self.registerForAnimationEvent(akCaster as objectreference, "WeaponLeftSwing")48endFunction49
50function OnAnimationEvent(objectreference akSource, String EventName)51
52 if EventName == "bashRelease"53 SpellBash.Cast(selfref as objectreference, none)54 elseIf EventName == "AttackPowerStanding_FXStart"55 SpellStand.Cast(selfref as objectreference, none)56 elseIf EventName == "AttackPowerForward_FXStart"57 if selfref.IsSprinting()58 SpellForward.Cast(selfref as objectreference, none)59 endIf60 elseIf EventName == "AttackPowerRight_FXStart" || EventName == "AttackPowerLeft_FXStart"61 SpellSide.Cast(selfref as objectreference, none)62 elseIf EventName == "AttackPowerBackward_FXStart"63 SpellBack.Cast(selfref as objectreference, none)64 elseIf EventName == "WeaponSwing"65 Direction = selfref.GetAnimationVariableFloat("Direction")66 Speed = selfref.GetAnimationVariableFloat("Speed")67 Bool PowerAttack = selfref.GetAnimationVariableBool("bAllowRotation")68 if PowerAttack69 if selfref.GetEquippedItemType(0) == 670 if Speed == 0.00000071 AxeSpellStand.Cast(selfref as objectreference, none)72 elseIf Speed > 0.00000073 if Direction == 1.00000 || Direction == 0.00000074 if selfref.IsSprinting() == 075 AxeSpellForward.Cast(selfref as objectreference, none)76 endIf77 elseIf Direction == 0.25000078 AxeSpellSide.Cast(selfref as objectreference, none)79 elseIf Direction == 0.75000080 AxeSpellSide.Cast(selfref as objectreference, none)81 elseIf Direction == 0.50000082 AxeSpellBack.Cast(selfref as objectreference, none)83 endIf84 endIf85 elseIf selfref.GetEquippedItemType(1) == 1 || selfref.GetEquippedItemType(1) == 2 || selfref.GetEquippedItemType(1) == 3 || selfref.GetEquippedItemType(1) == 486 if Speed == 0.00000087 OneHandedSpellStand.Cast(selfref as objectreference, none)88 elseIf Speed > 0.00000089 if Direction == 1.00000 || Direction == 0.00000090 if selfref.IsSprinting() == 091 OneHandedSpellForward.Cast(selfref as objectreference, none)92 endIf93 elseIf Direction == 0.25000094 OneHandedSpellSide.Cast(selfref as objectreference, none)95 elseIf Direction == 0.75000096 OneHandedSpellSide.Cast(selfref as objectreference, none)97 elseIf Direction == 0.50000098 OneHandedSpellBack.Cast(selfref as objectreference, none)99 endIf100 endIf101 elseIf selfref.GetEquippedItemType(1) == 0102 if Speed == 0.000000103 UnarmedSpellStand.Cast(selfref as objectreference, none)104 elseIf Speed > 0.000000105 if Direction == 1.00000 || Direction == 0.000000106 UnarmedSpellForward.Cast(selfref as objectreference, none)107 elseIf Direction == 0.250000108 UnarmedSpellSide.Cast(selfref as objectreference, none)109 elseIf Direction == 0.750000110 UnarmedSpellSide.Cast(selfref as objectreference, none)111 elseIf Direction == 0.500000112 UnarmedSpellBack.Cast(selfref as objectreference, none)113 endIf114 endIf115 endIf116 endIf117 elseIf EventName == "WeaponLeftSwing"118 Direction = selfref.GetAnimationVariableFloat("Direction")119 Speed = selfref.GetAnimationVariableFloat("Speed")120 Bool PowerAttack = selfref.GetAnimationVariableBool("bAllowRotation")121 if PowerAttack122 if selfref.GetEquippedItemType(0) == 6123 if Speed == 0.000000124 AxeSpellStand.Cast(selfref as objectreference, none)125 elseIf Speed > 0.000000126 if Direction == 1.00000 || Direction == 0.000000127 if selfref.IsSprinting() == 0128 AxeSpellForward.Cast(selfref as objectreference, none)129 endIf130 elseIf Direction == 0.250000131 AxeSpellSide.Cast(selfref as objectreference, none)132 elseIf Direction == 0.750000133 AxeSpellSide.Cast(selfref as objectreference, none)134 elseIf Direction == 0.500000135 AxeSpellBack.Cast(selfref as objectreference, none)136 endIf137 endIf138 elseIf selfref.GetEquippedItemType(1) == 1 || selfref.GetEquippedItemType(1) == 2 || selfref.GetEquippedItemType(1) == 3 || selfref.GetEquippedItemType(1) == 4139 if Speed == 0.000000140 OneHandedSpellStandLeft.Cast(selfref as objectreference, none)141 elseIf Speed > 0.000000142 if Direction == 1.00000 || Direction == 0.000000143 if selfref.IsSprinting() == 0144 OneHandedSpellForwardLeft.Cast(selfref as objectreference, none)145 endIf146 elseIf Direction == 0.250000147 OneHandedSpellSideLeft.Cast(selfref as objectreference, none)148 elseIf Direction == 0.750000149 OneHandedSpellSideLeft.Cast(selfref as objectreference, none)150 elseIf Direction == 0.500000151 OneHandedSpellBackLeft.Cast(selfref as objectreference, none)152 endIf153 endIf154 elseIf selfref.GetEquippedItemType(1) == 0155 if Speed == 0.000000156 UnarmedSpellStand.Cast(selfref as objectreference, none)157 elseIf Speed > 0.000000158 if Direction == 1.00000 || Direction == 0.000000159 UnarmedSpellForward.Cast(selfref as objectreference, none)160 elseIf Direction == 0.250000161 UnarmedSpellSide.Cast(selfref as objectreference, none)162 elseIf Direction == 0.750000163 UnarmedSpellSide.Cast(selfref as objectreference, none)164 elseIf Direction == 0.500000165 UnarmedSpellBack.Cast(selfref as objectreference, none)166 endIf167 endIf168 endIf169 endIf170 endIf171endFunction172
173function OnEffectFinish(actor akTarget, actor akCaster)174
175 self.unregisterForAnimationEvent(akCaster as objectreference, "PowerAttack_Start_End")176 self.unregisterForAnimationEvent(akCaster as objectreference, "AttackPowerStanding_FXStart")177 self.unregisterForAnimationEvent(akCaster as objectreference, "AttackPowerRight_FXStart")178 self.unregisterForAnimationEvent(akCaster as objectreference, "AttackPowerLeft_FXStart")179 self.unregisterForAnimationEvent(akCaster as objectreference, "AttackPowerBackward_FXStart")180 self.unregisterForAnimationEvent(akCaster as objectreference, "AttackPowerForward_FXStart")181 self.unregisterForAnimationEvent(akCaster as objectreference, "bashRelease")182 self.unregisterForAnimationEvent(akCaster as objectreference, "WeaponSwing")183 self.unregisterForAnimationEvent(akCaster as objectreference, "WeaponLeftSwing")184endFunctionNote: This version not works for Greatsword.
Related Mods:
Some of my modshave Weapon Arts:
Links: