Adds a visible shield in First-Person view when your character has one equipped. And nothing if you don't. Includes support for different shield types and material variants. Android-compatible version is now available.
Other user's assetsAll the assets in this file belong to the author, or are from free-to-use modder's resources
Upload permissionYou can upload this file to other sites but you must credit me as the creator of the file
Modification permissionYou are allowed to modify my files and release bug fixes or improve on the features so long as you credit me as the original creator
Conversion permissionYou can convert this file to work with other games as long as you credit me as the creator of the file
Asset use permissionYou are allowed to use the assets in this file without permission as long as you credit me
Asset use permission in mods/files that are being soldYou are not allowed to use assets from this file in any mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou are not allowed to earn Donation Points for your mods if they use my assets
Author notes
This author has not provided any additional notes regarding file permissions
File credits
Magicono43 for access to PCO's source files to learn formula overrides and making a compatibility patch that includes PCO's formulae WilhelmBlack for making frame-by-frame animations of every shield/material/condition combination and properly palletizing all the textures.
Donation Points system
Please log in to find out whether this mod is receiving Donation Points
MOD: Now uses a separate dfaudiosource instead of ScreenWeapon's dfaudiosource for compatibility with Weapon Widget's custom audio handler
Version 1.5.3
Fixed clamp values not being mirrored properly with Animation module and Left-Handed Weapons enabled
Fixed sprite offsets not being set asymmetrically with Animation module and Left-Handed Weapons enabled
Adjusted step transform increments to be smaller
Version 1.5.2
Settings sorted to match Weapon Widget's. Re-enable your modules.
Step transform length scales with resolution
Bob length slider adjusted to have finer increments
Recoil module reworked. Now requires Vanilla Combat Event Handler.
Version 1.5.1
Added a "When Attacking" shield behavior slider
Added "Offscreen" setting to shield behaviors
Added a "Texture Scale Factor" slider for use with higher resolution textures
Fixed "When Casting" behavior not triggering properly if weapons are sheathed
Version 1.5
Zip file folder structure is now Vortex-compatible
Overhauled sprite placement settings. Please readjust your settings if necessary.
Sprite scaling code redone. Inertia movement and recoil scaling should look better
HIDE WHEN SHEATHED checks for both sheathed status and weapon visibility before hiding
Version 1.4.2
Offset speed and frame animation speed now scale with player's live Speed
Fixed stepping being applied to sprite scale
Removed some repeating debug messages when using frame animation
Movement inertia now scales with PlayerMotor MoveDirection instead of Inputs
Version 1.4.1
Messaging system changed to an event-based model instead of constantly polling
Changed Attack/Guard positions to use the same offsets when using Frame Animation
Version 1.4
Sprite Offsets will now be applied when using Frame Animation
Added message listener for compatibility with EOTB
Version 1.3.2
Changed the "Hide" behavior setting for "When Sheathed" to also hide the shield texture when the weapon texture is being actively hidden (like, for example, by a third-person mod)
Version 1.3.1
Added a Direction option to the Animation module to configure which animations can play
DFMods containing sprites that match Mighty Meatus' Teal Elven and Purple Adamantine replacers are now available in Optional Files. Contributed by WilhelmBlack
Fixed Inertia still applying when swinging a weapon with the vanilla weapon control scheme
Added DFMod for the DFU Android port to Main Files.
Version 1.3
Added Condition-based graphics. Shields will have visible damage when at an upper and lower condition threshold that is configurable.
Added option to play a frame-by-frame animation on the shield when attacking or sheathing your weapon. Contributed by WilhelmBlack
All shield graphics (including condition variants and animation frames) have been correctly palletized by WihelmBlack.
Added a Step feature that makes the shield sprite move in steps rather than smoothly. Step distance and conditions are configurable.
Added a toggle to lock the aspect ratio of the shield texture when switching to Retro-Mode
Version 1.2
Fixed Inertia still applying while in cursor mode
Added a Bob Offset slider to adjust the timing of the bob. Will be useful to sync/desync the shield when used with weapon bob (if there is one)
Moved calculations to LateUpdate to stop them from being called multiple times per frame in OnGUI. Some sliders may feel smaller or less impactful. Will require feedback to document for future adjustments.
Version 1.1
Packaged textures into DFMOD instead of as loose files. If you have previously installed 1.0, you can now delete the ShieldWidget folder in StreamingAssets/Textures/. Or not. Idk, I'm not your dad.
Added support for DFU's Left-Handed Weapons startup option.
UPDATE: A DFU Android-compatible version of Shield Widget has been added to Main Files. Take your shield with you when you're on the go!
Android version notes:
Made for use specifically with Vwing's DFU port. I can't guarantee it will work with different forks or projects. Refer to the github for instructions on installing mods.
My access to Android devices is limited, so I'd appreciate any feedback regarding the mod working on other devices. As with the previous point, I can't guarantee it will work perfectly with every device, but with your help, I will try my best to figure out whether it's in my capability to fix.
Many thanks to Vwing for their work on porting DFU to Android as well as being extra mindful of modding support.
---
Main features:
First-Person shield sprite
Includes graphics for every shield type (Buckler, Round, Kite, Tower) as well as material variants*
Adapts to any resolution changes (Widescreen, Retro-mode, etc)
Scale and positional offsets are customizable
Behavior under certain conditions is configurable (sheathed, spellcasting, etc)
Condition tracking where the shield will show visible damage at certain durability thresholds
*Follows vanilla DF's color scheme where Leather/Chain/Silver all use the same material graphic
Visit the Videos page to see some of these features being shown off.
---
Optional modules (Disabled by default, toggle and configure separately in the mod settings):
Bob module - Adds bob and sway to the shield sprite when moving
Inertia module - Delays the shield sprite when looking around to simulate weight
Recoil module** - The shield recoils when an enemy targets a body part that is protected by it
Animation module*** - Plays a frame-by-frame animation when sheathing and attacking instead of offsetting the sprite
Step module - Rounds out the position values on the sprite to give it a stepped movement when being offset or with all transforms
**Has mod dependencies. See compatibility section for more information. ***Will lock the base Offset sliders at specific values
---
All settings (except for enabling the Recoil module) can be accessed even during the game via the Mod Settings menu when paused, so you see any changes immediately. There are also presets available for each module.
---
Compatibility:
Shield, Bob, Inertia, Animation and Step modules should be fully compatible with any setup
Recoil module requires Vanilla Combat Event Handler in order to function. Make sure Shield Widget loads AFTERVCEH in the mod load order.
---
This was inspired and made possible by l3lessed's mod work and posts on the old workshop forum. Magicono43's work on PCO also helped with getting the Recoil module to function as well as providing material to make it compatible with PCO. Carademono talked me through packaging textures into DFMODs on the Lysandus' Tomb Discord server. WilhelmBlack contributed frame-by-frame animations for all shield/material/condition combinations as well as properly palletized sprites. Much thanks to them for allowing others to learn from their work and helping with bringing this to completion.
---
Recommended Mods:
If playing with Retro-Mode's aspect ratio correction, DunnyOfPenwick's Retro-Frame will cover up the Shield sprite crossing the black bars when changing offsets or when Bob, Inertia or Recoil is enabled. And it's just a darn nice mod overall. Highly recommended.
To add on to Retro-Frame, I also recommend WilhelmBlack's Retro Experience mod, mainly because it's a work of art.
The shield is fully compatible with First-Person Lighting, also by DunnyOfPenwick, and I can't recommend that mod enough for the serious dungeon delver.
Excepting the Recoil module, Magicono43's Physical Combat and Armor Overhaul is mostly compatible with Shield Widget and puts a neat twist on how Shields work.
Condition graphics may be difficult to experience in vanilla DF due to how little damage shields (and armor in general) incur with normal gameplay. Roleplay & Realism by Hazelnut, specifically the Armor Damage module, is highly recommended to make this feature more prominent.
If playing with Mighty Meatus' Teal Elven or Purple Adamantium, there are recolor patches available for each in the Optional Files with graphics kindly contributed by WilhelmBlack