About this mod
Adds a custom attack input controller and various weapon behaviors like cleaving and reach. Android version available.
- Permissions and credits
- Changelogs
Unbind your vanilla SWING WEAPON action in the controls by right-clicking on it or to a different Key than the one used for the ATTACK key in the Mod Settings (default: MOUSE1). YOU MUST USE THE TOB ATTACK KEY FOR THE NEW FEATURES TO WORK.
For Android users, you can simply remove the SWING WEAPON action mapping from the button you use to attack and replace it with the KeyCode.
Refer to the Unity documentation for a list of valid KeyCodes.
The TOB Mod Settings Weapon Swing Mode takes priority over the DFU settings.
ATTACK INPUT CONTROLLER
Allows specific swing directions to be performed without using the vanilla Drag-to-Swing attack scheme. Includes several control scheme options:
- VANILLA - Hold ATTACK key and drag your mouse to perform a specific attack. Basically the same as base DFU scheme but you can specify by how much the view is locked when the key is being held using the Dampen Strength slider (1 is fully locked like in vanilla).
- HOLD TO ATTACK - Hold ATTACK key to continuously attack. Unlike base DFU behavior, it will not have the chance to randomly perform the same attack over and over. It will perform all swing directions once and alternatingly.
- MOVEMENT - Morrowind-style adapted to Daggerfall. Attack directions will be dependent on the direction you are moving when the attack starts. Standing still and moving backwards or diagonally performs overheads. Moving sideways performs horizontals. Moving forward performs a thrust. Diagonal swings are unusable in this scheme (like in Morrowind).
- SPEED - Swing directions are based on your current speed with a modifier key. Standing still or moving at less than half-speed performs horizontals. Moving at full speed performs diagonals. Holding the RUN input and standing still performs overheads. Moving at full speed while holding the RUN input performs thrusts.
REVAMPED HIT DETECTION (and CLEAVING)
Weapon attacks are now capable of hitting multiple targets and this fixes some problems with the environment and corpses "eating" your attacks and preventing small enemies on the floor from being hit.
HOW HITS ARE DETECTED: Unlike base DFU, weapon collision is made by making a bounding box check in front of the player character and taking all damage-able (entities and villagers) colliders that the box overlaps. Optionally at this point, it can also make a direct weapon reach check to disregard colliders at the far corners of the box, making the hitbox feel more like an arc. That list of colliders is sorted by distance to the origin of the swing (right of the player for a right-to-left horizontal swing, etc) and each is "attacked" in sequence after checking for line-of-sight. If no colliders are detected, then the environment check will proceed as in base DFU for bashing doors and similar.
Weapons will have varying degrees of REACH. This value is used to construct the bounding box for hit detection. For example, Short Blades will have less range than in base DFU, while Long Blades like Claymores can hit enemies further than in base DFU. Thrust attacks will also generally have 25% more REACH than other attacks.
This allows you to hit enemies you are not directly aiming at with directional swings. A small enemy on the floor or in the air can by hit by an overhead swing without having to look directly at it, for example. Same with an enemy to the side of your crosshairs when performing a horizontal swing. This makes crosshair-less gameplay much more comfortable, at least in my opinion. If you wish for a more precise attack, Thrust attacks will generally perform the same as vanilla attacks in terms of precision.
Hand To Hand has a bonus reach multiplier for the kick attacks (Left, Down and Up, in addition to the Thrust attack bonus).
NOTICE: This may cause problems when fighting in populated areas as errant villagers may get caught in your sweeping attacks. Stick to overheads and thrusts when friendlies are around, or enable the SAFEGUARD feature to prevent hitting allies and wandering commoners as long as your crosshair isn't too close to them (about 25% of your screen height in distance)
HOW CLEAVE WORKS: Cleaving works by getting a base CLEAVE value which is derived from the character's STRENGTH stat and equipped weapon. An entity that is successfully hit has a vanilla WEIGHT stat that is used to calculate the effect of knockback on them, and that value is subtracted from CLEAVE. If there are targets left to hit and CLEAVE value is still more than 0, another attack is made against the next target. If CLEAVE value is reduced to 0 or less, the attack stops.
In the Mod Settings, it is possible to configure:
- Disregard boxed targets outside of weapon reach from the player (eg, the furthest corners of the bounding box) This makes the hit box have more of a radial arcing shape. (default: ENABLED)
- Whether allied Entities or MobileNPCs can be unintentionally hit by attacks
- Ignore the LOS check (default: DISABLED)
- A missed attack against an enemy with the ParrySounds flag can prevent a cleave from propagating (default: DISABLED, requires Vanilla Combat Event Handler or a mod that supports VCEH events to work)
- Modify the global reach multiplier for all weapons
- Modify the interval between Cleave update ticks
- Modify the base CLEAVE amount value of weapons
- Modify the target weight that is subtracted from the Cleave amount
- The exact values of REACH and CLEAVE for each weapon can be edited.
Makes archery hit detection more reliable to varying degrees based on mode and comes with some extra features to spice up the gameplay.
There are three MODES you can choose from:
- Vanilla - This uses the regular DFU arrow projectiles, unmodified with one exception: Their Rigidbody detection mode is set to Continuous instead of Discrete, helping to make collisions more reliable for the player's arrows.
- Custom (Global) - This uses a custom Missile class that moves in steps in FixedUpdate and uses Spherecasts and Raycasts to detect collision between those steps. Highly reliable and configurable. Allows for the changing of projectile characteristics like Speed and Gravity.
- Custom (Typed) - Same as above but the base values for projectile characteristics are modified depending on whether you are using a Long Bow or Short Bow. Replaces the original Bow Mode in the Controls section.
- Radius - The size of the Spherecast used in Custom mode. Higher values makes it easier to "hit" enemies, especially useful since some enemy orientation graphics don't line up with their colliders. The Spherecast doesn't collide with the environment.
- Speed - A multiplier on the base speed of the arrow when shot. Straightforward. In Typed mode, Longbows will have a higher base speed multiplier.
- Gravity - Makes the arrow accelerate downwards as it flies, giving its path a parabolic curve. When enabled, includes the option to show the predicted flight path of the arrow. Disabled by default.
- Draw Zoom - When using Draw-And-Release bow controls, drawing the bow will cause your view to zoom by the configurable multiplier. The duration of the zoom-in as well as the delay before the zoom begins are also configurable. In Typed mode, Longbows will have a higher base zoom. Disabled by default.
- Draw Scaling - When using Draw-And-Release bow controls and Custom mode, projectile speed will scale linearly with the duration of the draw, from 50% to a maximum of 200% speed. The value on the slider is the time in seconds it requires the draw to reach the base speed. Twice the value is when it will reach the maximum speed. In Typed mode, Longbows will have a higher value and will take longer to reach maximum draw. Disabled by default.
HOW IS THIS DIFFERENT FROM BETTER ARCHERY - Both mods have the same bottom-line: making archery more reliable and less frustrating. This module simply leverages the control that a completely custom WeaponManager like TOB allows. No FindObjectOfType calls in Update, just directly grab a reference to the missile whenever one is spawned. Also, TOB Arrows completely eschew Rigidbodies and colliders for hit detection and instead use Spherecasts for enemy collisions and Raycasts for environment collisions. In the end, it's up to you which one you prefer.
FEEDBACK
Makes combat a bit more dynamic and player-facing without affecting the mechanics as much. Requires VCEH or a mod that supports VCEH events. (DEFAULT: Disabled)
There are several modules.
- Parry Pause - Enemies with the "Parry" flag will stop moving for a short duration when missed by a physical attack. They can interrupt this state with an attack if their target is already in range.
- Visible Dodge - Enemies that cannot parry will visibly shift position when missed by a physical attack. This does not affect their animation state, timers or their decision-making.
- Failed Spell Save Knockback - When an entity fails a saving throw (usually against a spell) they will be knocked back and play the HURT animation state. This will drastically affect AI mechanics like timers and decision-making, especially for Continuous spells, but I think it's worth adding due to how spells have basically no feedback aside from the text message.
This mod does not override any formula and so is generally compatible with other mods unless they depend on the SWING WEAPON action or with certain values from the WeaponManager class or use their own custom attack input controller (like fully custom weapons).
Recommended mods:
- Roleplay & Realism and R&R - Items by Hazelnut further differentiates weapons by adjusting their attack speeds depending on weight and even adds new weapons that are fully compatible with TOB like the Archer's Axe and Light Flail. The R&R Advanced Archery module works really well with the TOB Archery modules like Draw Scaling.
- Bloodfall by SquidKamer adds some needed viscera to the combat. Just keep in mind that if your settings allow you to cleave through too many enemies, you might notice some micro-stuttering. Increase the Cleave Interval in the TOB mod settings to mitigate this.
- DaggerBlood by Excoriated works similarly to Bloodfall but it uses VCEH so it adds the crunch with little performance impact. Nothing like swinging a warhammer once and watching multiple enemies turn into gory giblets!
- Villager Reactions also by SquidKamer can help mitigate hapless villagers from wandering into your swings when fighting in populated areas. Either that or get comfy with using only overheads and thrusts when there are friendlies around.
- Weapon Widget can improve the look of the weapon handling and sync better with the cleaving. Also, with its Recoil module (requires VCEH), it can show miss effects appearing on individual enemies, informing you of which attacks were missed.
- Horrible Hordes by Ralzar makes certain enemies, like rats, bats, orcs and skeletons, spawn in mobs. Give that cleaving arm a workout!
Much thanks to Magicono43 and DunnyOfPenwick who were extremely helpful in finding existing DFU variables to use for the systems and to the other folks on the Lysandus' Tomb DFU Modding discord server for their feedback.
Hand To Hand has a bonus reach multiplier for the kick attacks (Left, Down and Up, in addition to the Thrust attack bonus).