HolloFox_TS-RadialUIPlugin icon

RadialUIPlugin

This is a developer tool based package used to help devs easily configure UI Radial Menus.

Last updated a day ago
Total downloads 18846
Total rating 0 
Categories Client-side Tools
Dependency string HolloFox_TS-RadialUIPlugin-2.2.1
Dependants 28 other mods depend on this mod

This mod requires the following mods to function

bbepisTaleSpire-BepInExPack-5.4.10 icon
bbepisTaleSpire-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 5.4.10
brcoding-SetInjectionFlagPlugin-2.3.0 icon
brcoding-SetInjectionFlagPlugin

Allows players to flag mods are installed

Preferred version: 2.3.0

README

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.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.

Available versions

Please note that the install buttons only work if you have compatible client software installed, such as the Thunderstore Mod Manager. Otherwise use the zip download links instead.

Upload date Version number Downloads Download link  
2022-7-5 2.2.1 195 Version 2.2.1 Install
2022-6-5 2.1.2 1362 Version 2.1.2 Install
2022-4-26 2.1.1 1972 Version 2.1.1 Install
2022-4-23 2.1.0 519 Version 2.1.0 Install
2022-1-19 2.0.7 4635 Version 2.0.7 Install
2021-12-20 2.0.6 1870 Version 2.0.6 Install
2021-11-25 2.0.5 1232 Version 2.0.5 Install
2021-11-25 2.0.4 34 Version 2.0.4 Install
2021-11-21 2.0.3 294 Version 2.0.3 Install
2021-11-17 2.0.2 405 Version 2.0.2 Install
2021-11-17 2.0.1 42 Version 2.0.1 Install
2021-11-6 2.0.0 677 Version 2.0.0 Install
2021-10-5 1.7.0 1376 Version 1.7.0 Install
2021-8-26 1.6.1 1126 Version 1.6.1 Install
2021-8-26 1.6.0 41 Version 1.6.0 Install
2021-8-21 1.5.1 356 Version 1.5.1 Install
2021-8-16 1.5.0 316 Version 1.5.0 Install
2021-7-7 1.4.1 1107 Version 1.4.1 Install
2021-7-3 1.4.0 204 Version 1.4.0 Install
2021-7-1 1.3.1 117 Version 1.3.1 Install
2021-7-1 1.3.0 62 Version 1.3.0 Install
2021-6-28 1.2.5 117 Version 1.2.5 Install
2021-6-26 1.2.4 81 Version 1.2.4 Install
2021-6-20 1.2.3 165 Version 1.2.3 Install
2021-6-20 1.2.2 67 Version 1.2.2 Install
2021-6-20 1.2.1 56 Version 1.2.1 Install
2021-6-19 1.2.0 56 Version 1.2.0 Install
2021-6-18 1.1.1 84 Version 1.1.1 Install
2021-6-16 1.1.0 86 Version 1.1.0 Install
2021-6-14 1.0.2 79 Version 1.0.2 Install
2021-6-14 1.0.1 58 Version 1.0.1 Install
2021-6-14 1.0.0 55 Version 1.0.0 Install