Arael54 Posted July 22, 2022 Share Posted July 22, 2022 Hello, Is there a way to make a perk only apply to the hand the weapon is in ?I'd like to add damage, but only if the weapon attacking is in the right hand, and a different kind of damage if the weapon is in the left hand.I tried the condition "getequippeditemtype" but it only check if a weapon is equipped is the left or the right, not if it's the weapon actually used. So if I dual wield, I'll get both bonuses, regardless of the hand attacking. is it possible without script ? Thanks. Link to comment Share on other sites More sharing options...
maxarturo Posted July 22, 2022 Share Posted July 22, 2022 Using the engine's default Condition Functions it's not possible, you can only achieve this with scripting with a running quest or adding/removing an 'Ability Spell' that will listen for the equipped object and where is equipped. But, there is still the issue that the perk/perks added will not be able to detect when to apply damage, and this is because of how damage is applied by the engine, it's directly connected to the player's camera and not to the weapon. For example: If you have an enemy in front of you and in third person you rotate the camera to an angle that the enemy is no longer in the center / the field of the camera where damage is applied, no matter how and what attack you do you will not apply damage to the anemy. Link to comment Share on other sites More sharing options...
dylbill Posted July 22, 2022 Share Posted July 22, 2022 You can use the GetEquipped condition. According to the Wiki, this condition only works for armor or weapons in the right hand. https://www.creationkit.com/index.php?title=GetEquipped Link to comment Share on other sites More sharing options...
Arael54 Posted July 23, 2022 Author Share Posted July 23, 2022 (edited) You can use the GetEquipped condition. According to the Wiki, this condition only works for armor or weapons in the right hand. https://www.creationkit.com/index.php?title=GetEquippedSadly, to my knowledge, this condition check if you have a weapon equipped, not if the weapon is used. So it will not only apply to the weapon you use to attack with, it will apply to all attacks, regardless of the weapon used, as long as it is equipped. Using the engine's default Condition Functions it's not possible, you can only achieve this with scripting with a running quest or adding/removing an 'Ability Spell' that will listen for the equipped object and where is equipped. But, there is still the issue that the perk/perks added will not be able to detect when to apply damage, and this is because of how damage is applied by the engine, it's directly connected to the player's camera and not to the weapon. For example: If you have an enemy in front of you and in third person you rotate the camera to an angle that the enemy is no longer in the center / the field of the camera where damage is applied, no matter how and what attack you do you will not apply damage to the anemy. Thanks, that what I feared. Edited July 23, 2022 by Arael54 Link to comment Share on other sites More sharing options...
dylbill Posted July 23, 2022 Share Posted July 23, 2022 If you want an effect to apply when only attacking with a weapon, I suggest to use an enchantment on the weapon itself Link to comment Share on other sites More sharing options...
Arael54 Posted July 23, 2022 Author Share Posted July 23, 2022 Wouldn't I have to add it to all weapons manually if I want it to affect every weapon in the game ? Link to comment Share on other sites More sharing options...
dylbill Posted July 23, 2022 Share Posted July 23, 2022 So you want an effect to apply when the actor attacks with any weapon in the right hand? If so, then yes you will need a script. You can use animation events. You can make an ability spell and put a script on the magic effect, something like this: Actor Target Event OnEffectStart(Actor akTarget, Actor akCaster) Target = akTarget If Target.GetEquippedWeapon() RegisterForAnimationEvent(Target, "weaponSwing") ;weaponSwing fires when attacking with right hand. weaponLeftSwing for left. Endif EndEvent Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) If Target.GetEquippedWeapon() ;target has weapon in right hand RegisterForAnimationEvent(Target, "weaponSwing") Endif EndEvent Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference) If !Target.GetEquippedWeapon() ;target does not have weapon in right hand UnRegisterForAnimationEvent(Target, "weaponSwing") Endif EndEvent Event OnAnimationEvent(ObjectReference akSource, String asEventName) ;do something EndEventHere's a list of animation events for reference. https://www.creationkit.com/index.php?title=Animation_Events Link to comment Share on other sites More sharing options...
Arael54 Posted July 23, 2022 Author Share Posted July 23, 2022 (edited) Thank you. This and a answer in another thread gave me roughly the idea of what I should do I think.I want to add a stagger effect, with a different magnitude relative to the type of weapon used (dagger, bow, etc).So I think the difference between left weapon and right weapon is not necessary anymore, but I need to make a different animation (on swing ? Would it work as expected ?) event for each type of weapon (bow, sword, etc), each with a different spell attached with a different stagger value.I'm pretty sure don't have the knowledge to do this yet. I have to find some mods which do something similar to understand it a bit better. Thank you again. Edit : In fact, the mod "Dynamic animation casting" let you do exactly what I was looking for. Edited July 24, 2022 by Arael54 Link to comment Share on other sites More sharing options...
dylbill Posted July 24, 2022 Share Posted July 24, 2022 Cool cool. Another thing to consider, weapons have their own stagger attribute. With script there is getStagger and setStagger functions (require skse) to affect weapons directly. https://www.creationkit.com/index.php?title=GetStagger_-_Weapon https://www.creationkit.com/index.php?title=SetStagger_-_Weapon Link to comment Share on other sites More sharing options...
maxarturo Posted July 25, 2022 Share Posted July 25, 2022 Yeah... GetStagger(), SetStagger()... How did I miss these? But still doesn't makes the script less smaller. Link to comment Share on other sites More sharing options...
Recommended Posts