TaleSpire.RadialUI 2.2.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package TaleSpire.RadialUI --version 2.2.3
NuGet\Install-Package TaleSpire.RadialUI -Version 2.2.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TaleSpire.RadialUI" Version="2.2.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TaleSpire.RadialUI --version 2.2.3
#r "nuget: TaleSpire.RadialUI, 2.2.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install TaleSpire.RadialUI as a Cake Addin
#addin nuget:?package=TaleSpire.RadialUI&version=2.2.3

// Install TaleSpire.RadialUI as a Cake Tool
#tool nuget:?package=TaleSpire.RadialUI&version=2.2.3

Radial UI Plugin

This is a plugin for TaleSpire using BepInEx.

Install

Currently you need to either follow the build guide down below or use the R2ModMan.

Usage

This plugin is specifically for developers to easily implement extra Radial buttons based on a entity properties. Developers should reference the DLL for their own projects. This does not provide anything out of the box.

Example Usage

	void Awake()
        {

	    // Adds Callbacks to append new mapmenu item
            AddOnCharacter(Guid, new MapMenu.ItemArgs
            {
                Action = Action,
                Title = "On Character",
                CloseMenuOnActivate = true
            }); // Callback comparator is optional

            AddOnCanAttack(Guid, new MapMenu.ItemArgs
            {
                Action = Action,
                Title = "On Can Attack",
                CloseMenuOnActivate = true
            }, Check);

            AddOnCantAttack(Guid, new MapMenu.ItemArgs
            {
                Action = Action,
                Title = "On Cant Attack",
                CloseMenuOnActivate = true
            }, Check);

            AddOnHideVolume(Guid, new MapMenu.ItemArgs
            {
                Action = Action,
                Title = "On HideVolume",
                CloseMenuOnActivate = true
            }, Check2);
        }

        private Boolean Check(NGuid selectedCreature, NGuid creatureTargetedFromRadial)
        {
            Debug.Log($"{selectedCreature},{creatureTargetedFromRadial}");
            return true;
        }

        private Boolean Check2(HideVolumeItem args2)
        {
            Debug.Log($"{args2}");
            return true;
        }

        private void Action(MapMenuItem args, object args2) => Debug.Log($"{args},{args2}");

Loading a Sprite

Dimensions for sprites should be 32 by 32, Below is an example script supplied by LordAshes loading in an image to be used as an icon for the new Radial Component.

string dir = "path to directory";
Texture2D tex = new Texture2D(32, 32);
tex.LoadImage(System.IO.File.ReadAllBytes(dir + "Images/Icons/KO.Png"));
Sprite icon = Sprite.Create(tex, new Rect(0, 0, 32, 32), new Vector2(0.5f, 0.5f));

How to Compile / Modify

Open RadialUIPlugin.sln in Visual Studio.

You will need to add references to:

* BepInEx.dll  (Download from the BepInEx project.)
* Bouncyrock.TaleSpire.Runtime (found in Steam\steamapps\common\TaleSpire\TaleSpire_Data\Managed)
* 0Harmony.dll
* UnityEngine.dll
* UnityEngine.CoreModule.dll
* UnityEngine.InputLegacyModule.dll 
* UnityEngine.UI
* Unity.TextMeshPro

Build the project.

Browse to the newly created bin/Debug or bin/Release folders and copy the RadialUIPlugin.dll to Steam\steamapps\common\TaleSpire\BepInEx\plugins

Changelog

  • 2.2.3: Fix lasers
  • 2.2.2: CyberPunk update release
  • 2.2.1: Patch for Polymorph feature (backwards compatible with sys reflec checker)
  • 2.2.0: Added in sys reflec checkers
  • 2.1.2: Fly fix
  • 2.1.1: HF Release Fix
  • 2.1.0: GMBlock compatibility added.
  • 2.0.7: Patch for TS Update
  • 2.0.6: Patch for Hide Volume Filters Update.
  • 2.0.5: Fix missed logic in extension.
  • 2.0.4: Slight optimization and refactor repeating code.
  • 2.0.3: Adjusted last creature targeted instantiation to prefix.
  • 2.0.2: GetLastHideVolume is now supported.
  • 2.0.1: HideVolume support
  • 2.0.0: Completed Refactor, Code has been optimized whilst keeping same Interface

Shoutouts

Shoutout to my Patreons on https://www.patreon.com/HolloFox recognising your mighty contribution to my caffeine addiciton:

Lord Ashes providing dependent code unify snippet controlling submenus.

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on TaleSpire.RadialUI:

Package Downloads
TaleSpire.AdvanceGMBlocks

Extends configurability of GM blocks to apply selected attributes instead of all.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.6.0 100 3/7/2024
2.5.0 90 2/15/2024
2.4.1 243 7/25/2023
2.4.0 147 5/2/2023
2.3.2 178 4/20/2023
2.3.1 297 1/29/2023
2.3.0 300 12/12/2022
2.2.7 299 12/12/2022
2.2.6 290 12/12/2022
2.2.5 338 11/27/2022
2.2.4 313 11/27/2022
2.2.3 326 11/25/2022