Skip to content

btigi/ddWidget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

D&DWidget

D&DWidget is a Windows Widget (built and tested against Windows 11 25H2) to display random NPC stats (from a predefined lists of attributes) on each activation of the Widget area.

screenshot showing output

Download

Compiled downloads are not available.

Compiling

To clone and run this application, you'll need Git and .NET installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/btigi/ddWidget

# Go into the repository
$ cd src

# Build  the app
$ dotnet build

Installation

Despite being the latest in a long line of attempts at Widgets by Microsoft, the Widget area still seems pretty finicky. To install:

Generate a certificate by running Create-DevMsixCert.ps1 (as Admin) - this is a one-off step

Import the certificate to the certificate store Import-Certificate -FilePath ".\DdWidget_Dev.cer" -CertStoreLocation Cert:\LocalMachine\Root

Publish the solution dotnet publish -c Release -p:Platform=x64 -p:RuntimeIdentifier=win-x64 -p:SelfContained=false -p:GenerateAppxPackageOnBuild=true

Remove any existing installation Get-AppxPackage *DdWidget* | Remove-AppxPackage

Install the widget Add-AppxPackage -Path ".\MsixOutput\DdWidget_1.0.0.0_x64_Test\DdWidget_1.0.0.0_x64.msix"

Bring the Windows Widget area (Windows+W), click the gear icon (top right) then select 'Discover new Widgets' and select D&D NPC Widget. You may need to repeat this step a couple of times, and/or kill widgets.exe before the widget shows up.

Configuration

D&DWidget reads values from XML files location in the current user's LocalAppData directory, i.e. C:\Users%username%\AppData\Local\DdWidget.

The primary file is racex.xml - this contains a list of races, and references an XML file for names, genders and features, and provides an acceptable age range. Races can be pointed at a single set of common files, or at race-specific files.

The second config file is settings.xml which currently contains one element StatBlock which controls the rolling mechanism for rolling stats - supported values are 3d6 and 4d6DropLowest.

References

https://xakpc.dev/windows-widgets/create-windows-widget/

https://www.adaptivecards.io/designer/

https://learn.microsoft.com/en-gb/windows/apps/desktop/modernize/desktop-to-uwp-distribute

https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/Widgets

https://learn.microsoft.com/en-us/windows/apps/develop/widgets/implement-widget-provider-cs

Licencing

DWidget is licenced under the MIT licence Full licence details are available in licence.md

About

A Windows 11 Widget for generating a random D&D NPC

Topics

Resources

License

Stars

Watchers

Forks

Contributors