Skyrim Special Edition
0 of 0

File information

Last updated

Original upload

Created by

IJW_Zac

Uploaded by

zxl381

Virus scan

Safe to use

Tags for this mod

About this mod

Makes your weapon and shield able to collide with and parry enemy's weapons and projectiles. Designed for VR, but compatible with AE, SE (up to version 1.6.640)

Requirements
Permissions and credits
Changelogs
Donations
To SE/AE players:
The recent update happened in December 2023 (version 1.6.1130) broke this mod. I worked on this problem for days and still can't solve it due to my limited programming skills. Sorry, but SE/AE players can use this mod only if their game version is before December 2023.

VR players don't need to worry about this since there is no update to SkyrimVR.

Update 1.0.0 to 1.0.2:
  • Projectile Parrying: you can now use weapon and shield to parry projectiles, including arrows, fireballs, spider spits, etc. There is a minimal controller speed requirement for projectile parry. You can also hold trigger on controller to spend magicka to slow down projectiles near you
  • Shield Blocking: you can now use your shield to pseudo physically block enemies' weapons. If you have timed-block mods, please watch the last two minutes of my video to solve an issue.
  • Updates to weapon parrying: you will lose some health if you are holding your weapon still when parry; improve collision for werewolf claws; other small updates like reduce sparks.
  • Now contains Chinese version of config file. 现已包含中文版配置文件
  • Update 1.0.1: small bug fixes and updates as some players required. If you don't want weapon parry to be triggered when controller speed is low in VR, set `WeaponCollisionSpeed` to positive values like 20.0 or higher (by default it's 0.0, meaning speed is not checked).
  • Update 1.0.2: small bug fix that prevents this mod from identifying your returning thrown weapons as incoming projectiles, if you installed Weapon Throw VR. Also adds a note that you can set `PlayerWeaponSpeedReward1` to negative values like `-0.25` so you restore stamina after a good parry. Thanks Shizof for the bug fix and BingCh1lling for the config suggestion!



Update 0.9.0:
Spoiler:  
Show

  • Now option "PlayerUnableToParryThreshold" is set to "0.1" by default, meaning you can't parry if your stamina is below 10%. Feel free to change
  • Added collision for many races: claws of werewolf/werebear/troll/bear/spriggan/hagraven/gargoyle/vampireLord, tooth of wolf/skeever, folding blade of dwarven sphere, tooth and right claw of sabre cat, and right leg and pincher of dwarven spider
  • If you have Spell Wheel VR, parry has slow motion effect, thanks to Shizof: time will be slowed for a few frames, duration based on the speed of your controller. This feature will be added to AE/SE in the next version as an option
  • If you have PLANCK - Physical Animation and Character Kinetics, enemies will be ragdolled if their health is below 25% and the speed of your controller is high
  • Other minor changes



Update 0.8.0:
Spoiler:  
Show

  • Fixed a bug that makes some enemies (especially animals) unable to attack player
  • For VR: If player is passively holding their weapon (controller) still when parry, they can still parry but will be pushed back and can't stagger the enemy. If player is swinging their weapon (controller) when parry, they can push enemy back instead and stagger enemy.
  • Add an option for more engaging combat: parry will fail if stamina is not enough. By default parry never fails, and if you want more engaging combat that requires stamina management, you can set "PlayerUnableToParryThreshold" to "0.2"
  • Other minor changes like spawning more sparks



TL;DR:
  • When both the enemy and the player are attacking (VR players don't need to attack), if the weapons collide, enemy's attack will be parried and nullified
  • Both will lose some stamina based on weapons and skills, and will stagger if stamina is not enough
  • Almost everything is adjustable in "WeaponCollision.ini"
  • Safe to install/uninstall/update anytime

Features:
This mod takes effect when both the enemy and you are attacking (VR players don't need to attack), and the two weapons collide

For the enemy:
  • If player's stamina is above 10%, enemy’s current attack will always be nullified. Simple and reliable. If you don't want the stamina check for player here, you can set "PlayerUnableToParryThreshold" to "0.0"
  • They lose stamina, based on the damage of your weapon and skills (adjustable). Double stamina loss if you power attack
  • For SE/AE: They recoil if their stamina is < 30% (adjustable). They recoil and stagger if their stamina is < 5% (adjustable), or you are power attacking and they are not. They can continue their attack combo if their stamina is above 30% (adjustable).
  • For VR: They recoil if you are swinging controller gently (adjustable). They recoil and stagger if you are swinging controller fast (adjustable), or you are power attacking and they are not. They can continue their attack combo if you are holding your controller still.
  • For VR: Time will slow for a few frames to create hitstop effect, if Spell Wheel VR is installed. Duration based on the speed of your controller.
  • They will spin (rotate) a little, to add juice to hit effect. Magnitude and direction depends on your weapon’s velocity
  • They will be pushed back a little, to add juice to hit effect. This makes you able to parry their combo attacks without moving too much if you are skillful. Distance depends on your weapon’s velocity



For you:
  • You lose stamina, based on the damage of enemy's weapon and skills (adjustable). Double stamina loss if they power attack
  • For VR: Your stamina loss can be reduced by 50% if you are gently moving your weapon at collision instead of holding still, by 80% if moving fast (adjustable). No matter how low your stamina is, you won't recoil or stagger.
  • For SE/AE: Your stamina loss is less than VR players since the mechanism above doesn't apply. You will recoil or stagger if your stamina is low
  • The final stamina loss is reflected by the haptic vibration strength on your controller (currently only on VR controllers) (update: available for all versions)
  • You get blocking exp. And one-handed/two-handed exp based on weapon type. Also hand-to-hand exp if Hand to Hand - An Adamant Addon installed


Almost everything mentioned above is adjustable in the WeaponCollision.ini

Doesn’t affect vanilla skyrim’s blocking system:

  • When you or the enemy is blocking, this mod doesn’t take effect
  • This mod generally has high risk and high gain, while vanilla blocking has lower risk and less gain

Currently in beta testing. Any feedback, suggestions and criticisms are welcome!

Technical details if you are interested: 

Spoiler:  
Show

  • This mod delays melee hit events on the player for 9 frames (adjustable, I set it to 7 for SE/AE), because in Skyrim enemies have some cheating attack animations, where they hit you a few frames before their weapons reach you. A delay for 9 frames is almost unnoticeable and fixes this problem
  • If you wonder how this mod is different from other melee parry mods (see the Credits section below) that also detect the collision between weapons, I think my mod should be the best choice for VR players, and might also appeal to SE/AE players because it's more accurate: it detects collision every frame instead of only the hit frame, delays hit event on player and is very configurable



Requirement:
SE/AE players:
  • SKSE
  • Address Library for SKSE Plugins

VR players:
  • SKSEVR
  • VR Address Library for SKSEVR

Installation:
  • Install like any other mod. Load order doesn't matter
  • Safe to install/uninstall/update anytime

About spark mods:
Spoiler:  
Show

  • This mod is compatible with most spark mods.
  • My personal choice is Seriously Improved Sparks because it has spark with ENB light if Light Limit Fix or any ENB is installed.
  • You can try this one or other spark mods. Spark mods are normally safe to install and uninstall, if they don't contain "Scripts" or "SKSE" folder.
  • Some mods make sparks very large. If you feel a parry is producing too many sparks, set "SpawnSparkFrame = 12" in "WeaponCollision.ini" to a lower value. 12 spawns 3 sparks on your weapon, which is good for vanilla spark IMO.


Almost everything adjustable DYNAMICALLY in game!
You can dynamically adjust settings without restarting the game.
Spoiler:  
Show

  • Edit settings in "Pseudo Physical Weapon Collision and Parry\skse\plugins\WeaponCollision.ini"
  • Save and close the file
  • In the game, when not in combat, open console by pressing "`"
  • Close the console by pressing "`" again, no need to type anything
  • Now settings are updated
Currently there is no plan to add MCM menu, because it may make this mod unsafe to uninstall.



Credits
This mod uses lots of code from other mods and receives help from many modders. I really appreciate the open source modding community!

Source Code
https://github.com/ijwzac/WeaponCollisionVR
The code is fine, but README needs more work.
If you are a mod author, this project contains some stuff that may be interesting, and most of them come from other projects mentioned above.
  • How to hook to every frame update
  • How to hook to melee hit event and nullify it if some conditions are met
  • How to get the position, velocity and rotation of weapons and specific limbos, based on race (e.g., claws of werewolf)
  • How to get actors near player
  • How to create some simple juice for hit effect
  • How to manipulate the velocity of projectiles and nullify them
  • How to invoke blocking pose and bypass the actor angle check and the shield angle check