Skyrim Special Edition

File information

Last updated

Original upload

Created by

FlyingParticle

Uploaded by

FlyingParticle

Virus scan

Safe to use

About this mod

Physically-driven animation in Skyrim. Characters interact with physics and can be grabbed, melee hit detection is physically accurate, and much more.

Requirements
Permissions and credits
Changelogs
Donations
Requirements

SKSE VR 2.0.12 or above
HIGGS 1.6.0 or above

Description

PLANCK fundamentally changes the way characters are normally animated to make the character's ragdoll physically present in the world at all times, and drives the character's ragdoll towards its animation pose along with many other things to make this work nicely. This means you can physically influence other characters using your hands or weapons, or other objects that you pick up or throw at them.
Pet a dog, hold someone's hand, or throw a cauldron at them and watch them react!

When you grab someone (of reasonable size), they will try and stay next to you. For example, if someone is walking past you and you grab them, they will stop. Once you have grabbed someone, they will walk with you when you move. It works when you grab someone you're fighting during combat too!

Grabbing small characters like chickens or skeevers will instantly ragdoll them, allowing you to throw them away or just stab them while holding them.
PLANCK also makes some major improvements to how characters get up after being ragdolled compared to how janky it is in the base game.

Melee hit detection for the player has been completely rewritten and is now physically accurate to the player's weapon colliding with the enemy's ragdoll.
Player vs. other character collision has been changed from being the player's capsule vs. the character's capsule to being the player's capsule vs. the enemy's ragdoll. The player's capsule has been made narrower than in the base game, and together these let you get much closer to enemies than before, and collision between you and other characters is now more representative of what you see rather than a static capsule shape for both of you.
When you hit an enemy, they will flinch in the direction of your hit via physical impulses.

New melee hit detection does mean that the base game's ini values related to melee swings (fMeleeLinearVelocityThreshold, etc.) are obsolete and no longer have any effect. This mod has its own set of parameters around melee swings and cooldowns that can be tweaked in the included activeragdoll.ini file.

Weapon swings and power attacks are also completely re-implemented to work alongside the new hit detection, and weapon swing/bash animation events that are not present in the base game are re-introduced. Base Skyrim VR does not have weapon swing animation events unlike Skyrim SE, so this improves compatibility with SE mods to work in VR. More details on weapon swings, power attacks, and the hit detection are below.

PLANCK includes a papyrus API which can be used by other mods, and has a C++ interface which can be used by skse plugins which can be found on github.

If you would like to support future development, consider supporting me on patreon.





Big thanks to Cangar for the showcase video!

Details and Troubleshooting

Hit Detection

In the base game, the instant your hand goes above a certain threshold, your weapon (which is scaled up to 1.75x its usual size for hit detection purposes) is "activated" for a short time, during which anything you collide with will be hit. After that short time, your weapon is deactivated again and you have to wait for the cooldown.

With this mod, your weapon is not scaled up and is the regular size of your weapon. Under normal circumstances, your weapon can collide with someone at any speed and will influence their ragdoll. If the velocity of your weapon colliding with the ragdoll is above hit[Swing/Stab/Punch]SpeedThreshold (depending on if planck thinks you're trying to swing, stab, or punch), and your hand is moving at a speed above hitRequiredHandSpeedRoomspace, then it counts as a hit and collision will be disabled between your weapon and that npc until the weapon stops colliding with the npc for a very short time (hitCooldownTimeStoppedColliding, default 0.22 seconds), after which you can collide with them again and perform another hit. If you do not stop colliding with the enemy after the hit occurs, then you will be able to hit them again after about 1 second (hitCooldownTimeFallback, default 1.2 seconds).

The velocity thresholds are generally lower with planck than in the base game (the base game needs higher thresholds to prevent accidental hits due to the collision being very scaled up, which they aren't with planck).
It's also worth saying that weapon attack speed has absolutely no impact on any of this.

If it seems as if your hits are not registering with planck, there are a couple of things it could be:
  • You aren't actually hitting the enemy. Without planck, you can hit people that are quite far away from you because of what I mentioned above about your weapon being scaled up to almost 2 times its size. With planck, they need to collide with your actual weapon.
  • The weapon you're using has a bad (small) collision mesh. You can check this pretty easily by opening up the weapon nif in nifskope and viewing the collision. There are a few weapons (like the ancient nord battleaxe) in the base game that have collision that's too small and mod-added weapons could be anything. To see if this is the problem, try just touching someone with the weapon to get a feel for what its collision zone is.
  • After getting an initial hit, you aren't "leaving" the enemy with your weapon before trying to hit them again. As mentioned above collision between your weapon and the enemy is disabled upon getting a hit until you either stop colliding with them (i.e. your weapon passes entirely through and out of the enemy, or you pull your hand back out away from them). If you don't do this, then you need to wait more than a second for you to be able to hit again. This can also be due to bad collision, either of your weapon or of the enemy's ragdoll (which could lead to you visually leaving the enemy with your weapon, but the collision objects could still be touching), so again getting a feel for the collision without actually hitting them is essential here. As a last resort, you can try lowering hitCooldownTimeFallback in activeragdoll.ini to see if this your problem as well, but we warned that if this is at a low value, you will likely either get double-hits (since collision will be enabled after this time even if you are still colliding with the enemy) or be able to waggle your weapon around as the most effective way to damage enemies.

You can use my collision visualizer to view all this in-game, which should help a lot with seeing what's going on.

For hit detection issues, in general it would be a good idea to try some practice hits on some npcs. First just touch them slowly with your weapon to get a feel for the weapon's collision, and then try some swings and see if it's still not behaving how you would expect.

Weapon Swings

Weapon swings are completely re-implemented from the base game. They trigger as soon as your hand slows down after going above the target velocity, instead of as soon as your hand reaches the target velocity. This is more representative of the "peak" of the swing rather than some point during the wind-up.

Regular swings now perform the regular swing animation instantly, triggering hit frames, weapon swing animation events, etc. including swinging your shield as a bash. While weapons swings play the animation instantly, stuff like the attack state, attack data, and bAllowRotation animation variable are spoofed for 200ms after a swing to give mods that listen for hitframe/etc. events time to respond to them. These changes should make more Skyrim SE mods that relied on these animation events that were absent in the base game work properly in VR.

Hits and swings are decoupled with PLANCK, unlike in the base game where a swing must occur before a hit. As a result of this, with PLANCK when a hit occurs, it will check if a swing just occurred, and if it did, it will not do stuff like double-charge stamina and other things the swing already did. If a swing did not occur, then a swing is performed at the time of the hit, deducting stamina and all other swing things like the swing sound, animation, hitframe, callbacks etc.

Power Attacks

Power attacks are totally re-implemented from the base game. As with regular swings, they also play their power attack animation instantly, and do not try to perform a vanilla Skyrim hit during the hitframe part of the animation (the infamous power attack double-hit in VR). Power attack hits should feel similar to regular hits without the vanilla Skyrim VR jankiness, apart from some additional flinch impulse and any special power attack effects.
They are triggered the same way as in the base game, by holding the trigger while swinging.

Power attacks are directional based on swing direction at the peak of the swing. Swing direction is biased vertically for downward swings (so most swings should result in standing power attacks, with left / right / backwards (up) being more deliberate). Standing power attacks (downwards swings or stabbing motions) become forwards power attacks if you are moving forwards.

Due to the way power attacks were done in vanilla Skyrim VR, stuff like the IsPowerAttacking condition were broken. With PLANCK, this is fixed.

Bashes

Unlike vanilla Skyrim VR, bashes (including bash swings) with PLANCK cost their appropriate amount of stamina, as in non-VR Skyrim. Bashing costs no stamina in vanilla skyrim VR, which allows you to infinitely stagger opponents, and was different in this regard from Skyrim SE with no drawbacks.

If you are out of stamina and you try to bash (either swing or hitting someone with the shield), the attack will completely fail and will play the magic cast failed sound and out of breath player dialogue, along with a long haptic pulse (and flash the stamina bar on the hud, for those who have it visible) to communicate this.
To control this behavior, there is the failBashWhenOutOfStamina setting. If this is turned off then you can still bash at 0 stamina (though if above 0, it will still charge stamina), and power bashes at 0 stamina will become regular bashes instead.

Aggression

Touching or grabbing an NPC accumulates an aggression score on them (not related to the "aggression" actor value in the base game).
While a character is touched or grabbed, they will constantly complain and act as if they were bumped into (i.e. move away from the player), until they reach the first aggression threshold of being harassed for aggressionRequiredGrabTimeHigh (default 3.5) seconds. At this point, they will stop using any furniture they're currently using and switch to a more urgent set of dialogue responses.

If they are harassed for more than aggressionRequiredGrabTimeAssault (default 7) seconds, they (and any of their friends) will turn hostile to the player. If the player runs far enough (aggressionStopCombatAlarmDistance, default ~22m) away (or sheathes their weapons as in the base game), they will calm down again.

Followers, summons, and NPCs with a high enough relationship rank with the player are exempt from this system, as well as actors that are calmed.
Relationship rank is a measure of how friendly the NPC is with you, and the relationship rank that planck considers friendly enough can be adjusted with the aggressionMaxRelationshipRank setting.

The aggression system can be disabled by setting doAggression to 0 in activeragdoll.ini.

Experimental Options

There are some experimental options in this mod's accompanying .ini file which will make the physical interaction more realistic in most situations, but will cause issues elsewhere. Try these out if you're fine with the drawbacks and want a taste of things to come!
The config file is called activeragdoll.ini, and is next to the dll. If you are using MO2, mods are inside the mods folder under MO2, each within their own folders. You can also right-click the mod in MO2 and select "Open in Explorer" on the left side of MO2.
There are also many more options that can be tweaked in addition to these.

disableHitIfSheathed
Enabling this allows you to hit enemies while your weapons are sheathed, with either your hands or any object you have held in your hands via higgs. Any hits while sheathed will count as a hit with whatever weapon is equipped in that hand which isn't quite right, so this is off by default.
Note that with this disabled, you can hit people with grabbed objects when unsheathed, which requires that you have no weapon (i.e. fists) equipped in the given hand.
disableBipedCollisionWithWorld
Turning this off will allow (non-player) characters to collide with things such as walls or the ground, and so will prevent any clipping through walls and in general lead to more realistic scenarios, but this causes problems with feet sliding/colliding with the ground and characters getting stuck on things.
ragdollOnGrab
When you grab a character that is marked as "small" (skeevers, mudcrabs, small frostbite spider, etc.), they will be immediately ragdolled when you grab them, so you can for example pick up a chicken and throw it away. This is on by default now.
This can be extended to not just small races by setting smallRaceHealthThreshold to a higher value if you want to play around with ragdolling, say, NPCs when you grab them.

A huge thanks to DarkStarSword, ClarkWasHere, alandtse, blazeyboyyy, CylonSurfer, ntblood, and Cangar for help with testing and feedback!

Source can be found here