Movable plugins system menu

User Tag List

Page 1 of 7 12345 ... LastLast
Results 1 to 15 of 104
  1. #1
    Razorfish's Avatar Contributor
    Reputation
    188
    Join Date
    Apr 2019
    Posts
    178
    Thanks G/R
    19/158
    Trade Feedback
    0 (0%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Movable plugins system

    While working on RunStats v2, I started to play around with implementing plugins that can be moved around on the screen dynamically. After a few iterations and a game-changing tip about how to detect mouse clicks (thanks, Dys!), I turned it into a separate system to make it easier to write standalone plugins where you can drag, resize, and toggle the display on or off in-game and then save those modifications.

    [Verified as working with TH version 21.2.20.0][API version 9.2]
    [Developed and tested with TH versions 20.6.28.1, 20.7.12.0][API version 9.1]



    Features:
    Unified Modification
    Each plugin doesn't have to do it's own handling of mouse or key presses, and it doesn't have to define yet another hotkey for toggling stuff on or off, it can just focus on drawing data on the screen.

    Drag (or Hotkey) to Move
    Press F12 to toggle Edit Mode on, which shows outlines of all the movable plugin display areas on the screen. You can drag and drop them freely while in this mode. Alternatively, because clicking around on the screen causes your character to move around or perform actions, you can press Ctrl+C to simulate a mouse click.

    Drag (or Hotkey) to Resize
    While in Edit mode, hovering over a resizable plugin area shows little triangle corners on the bottom left and bottom right of the outline. Hovering over them will show what sort of resizing you can do. There are 4 Resize modes that plugins can specify: On (free resize), Fixed Ratio, Horizontal, and Vertical. Not all areas are resizable, just depends on the plugin and whether or not it does the extra size calculations.


    Toggle Off or On
    While in Edit mode, press Ctrl + X while you have a plugin area selected or hovered over to toggle that area display on or off.

    Undo
    While in Edit mode, press Ctrl + Z while you have a plugin area selected or hovered over to undo drag or resize actions applied to it.

    Save Settings to File
    Changing the position, size or on/off state of any of the movable areas will automatically generate a config file (MovablePluginConfig.txt) that you can copy from the TurboHUD\logs folder and rename and put into TurboHUD\plugins\User\MovablePluginConfig.cs. This will allow you to retain the changes you made when you load TH next time. Note that TH version 20.7.12.0 or newer has a limitation on when log files can be written - only in menus or game difficulties below Torment 1 and not in special areas (such as rifts) - but the framework will wait until you're in a valid logging state before trying to create the config file.

    Hotkeys (configurable):
    F12 - toggle Edit Mode on or off
    Ctrl + C - pick up or put down (because when you click around the screen, D3 moves your character around and interacts with the game world, it's probably easier just to press Ctrl+C)
    Ctrl + X - toggle display on or off
    Ctrl + G - toggle placement grid display on or off
    Ctrl + Z - undo movement or resize
    Ctrl + 0 - undo all movements or resizes (ctrl + ZERO)
    Ctrl + S - save config file now (this is separate from auto-save, but is still subject to the logging limitations of your TH version)
    Esc - cancel your current move or resize action
    Right - cycle forwards through all areas under your cursor and pick up the next one
    Left - cycle backwards through all areas under your cursor and pick up the previous one



    How to Install:
    Download: Project Page

    If you were one of my guinea pigs or happen have an older version of some of my plugins installed, please delete the following before installing. If you don't have them, there's nothing extra to do:
    TurboHUD\plugins\Razor\Movable\MovablePluginConfig.cs (move this to TurboHUD\plugins\User\, open in a text editor and change the namespace from Turbo.Plugins.Razor.Movable to Turbo.Plugins.User)
    TurboHUD\plugins\Razor\PartyProcTracker.cs
    TurboHUD\plugins\Razor\Painter\
    TurboHUD\plugins\Razor\Reflect\ (this plugin has been updated to not use the Movable system, latest version is standalone)
    TurboHUD\plugins\Razor\RunStats\ (v2 has been transitioned to v3 (WIP), which will use Movable)

    Put these files and folders here:
    TurboHUD\plugins\Razor\Click\ (required) for mouse click handling
    TurboHUD\plugins\Razor\Log\ (required) for config file writing handling
    TurboHUD\plugins\Razor\Movable\ (required) for Movable plugin handling


    Sample Movable plugins:
    Some optional plugins using the Movable system are available at the download link.

    (Season 22) Clone Tracker
    This is a tracker for the Season 22 Shadow Clones theme. It shows (movable) countdown bars by the minimap, class-color-coded circular countdown timers at the feet of the clones, and corresponding minimap icons. You can choose to show only the clones for your class+gender** (default), or everyone's clones (set ShowAllClones = true on line 33 of CloneTracker.cs). Also lists the party members out of shrine activation range (to spawn a clone) when you are near a shrine.

    (Season 21) Tempest Tracker
    This shows your damage stack count and draws a countdown bar until a weather effect is triggered, then it shows the name of the effect and a countdown bar for its duration. Also shows your teammates stack counts (when in range) and estimates their countdown when out of range. Adds visual indicators for Flame Wave, Twisters, Meteors, and Snowball that can be turned off if desired.

    GoD Generator Hint
    This draws a little resizable icon of the current generator your Gears set 4pc will be duplicating with Strafe if you have 2 or more generators equipped.

    Jesseth Hint
    This draws a little resizable icon of Command Skeletons when Jesseth's set bonus is not active.

    Immunity Indicator
    This shows a color customizable visual hint and countdown when your character is immune to damage. The countdown can be moved around the screen.

    Party Proc Tracker
    This is a rewrite of my old Party Proc Tracker, which tracks the procs of all seen party members as countdown bars and shows the time remaining even if they (or you) leave the area. Can be resized horizontally to change the width of the countdown bars. It now also shows "extra lives" - the numbers of cheat death effects you are running as hearts by your portrait. It also doubles as a system for handling proc events, such as taking screenshots (only a proof of concept, TH doesn't allow screenshotting in difficulties above Master anymore), and proc report logging (possible future project).

    Monster Counter
    This is a movable monster counting plugin, inspired by GLQ_MonstersCountPlugin, but with a different visual way to display the data. It includes counters for various monster statuses relevant to your party - Bleed, Locust, Haunt, Decrepify, Frailty, Leech, Krysbin, Strongarms, Entangle, Marked for Death, Ignite - and more can be defined as a "Countable" rule in the code), and if in a rift, it will show progress % value and progress time value.

    Movable Player Buff Lists
    This plugin makes TurboHUD's default player buff list plugins movable and resizable: PlayerBottomBuffListPlugin, PlayerTopBuffListPlugin, PlayerLeftBuffListPlugin, PlayerRightBuffListPlugin, MiniMapLeftBuffListPlugin, MiniMapRightBuffListPlugin. All your customizations (via Customize()) for these plugins should still work.

    Mage Gauge
    For necromancer players, this shows a stack of countdown duration bars for each of your Skeletal Mages. It also displays the resource spent to cast them, which may be useful to gauge the strength of your current collection of Singularity-runed mages.

    Volumn Controls
    This allows you to adjust TurboHUD's sound (Text-To-Speech or custom sounds) volume in-game. Supports both Constant and Master-Volume-And-Effects (scales based on your game sounds volume setting) modes.

    Party Tracker
    WIP - Allows you to "track" your teammates with movable and resizable health/shield + resource bars, customizable-colored highlight circles, health arcs at their feet with proc indicator, selective buff countdown tracking (countdowns are remembered even when they move out of range), and lines to their character in the game world and minimap.


    How it works:
    Basically, a plugin that wants to be movable references the Movable library and implements the IMovable interface, which requires the plugin to implement two functions:
    void OnRegister(...) //define the starting position and behavior of the movable/resizable/toggle-able areas drawn by this plugin
    void PaintArea(...) //draw the areas defined in OnRegister, works like PaintTopInGame
    PaintArea provides the x, y, width, height and any movement delta values necessary to position your elements on the screen

    Here is a heavily commented plugin template that explains a lot of the features, and shows how simple (relatively) it is to implement in any plugin:
    MyMovablePluginTemplate.cs
    A movable plugin can be in any plugin folder as long as it includes the line using Turbo.Plugins.Razor.Movable, just update the plugin's namespace declaration accordingly.
    Last edited by Razorfish; 09-14-2021 at 12:46 PM. Reason: updated download link

    Movable plugins system
  2. Thanks s4000, mois, Wasted75, RNN, JohnWick, Stormreaver, takayo72, TobiaSBooN, BeeAntOS, SeaDragon, kolonija, 731113, rogue00722, xblade2k7, thewhatguy, alternate_, Wasted74 (17 members gave Thanks to Razorfish for this useful post)
  3. #2
    s4000's Avatar Contributor
    Reputation
    284
    Join Date
    Oct 2018
    Posts
    489
    Thanks G/R
    18/271
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    What is the limitation of the Log function in latest Thud? I have not tested it yet.
    Is it totally skip the log process or save & wait until condition is satisfied?

  4. #3
    Razorfish's Avatar Contributor
    Reputation
    188
    Join Date
    Apr 2019
    Posts
    178
    Thanks G/R
    19/158
    Trade Feedback
    0 (0%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by s4000 View Post
    What is the limitation of the Log function in latest Thud? I have not tested it yet.
    Is it totally skip the log process or save & wait until condition is satisfied?
    This is a change to logging starting with TH version 20.7.12.0 (it is mentioned in its changelog):
    Code:
     - removed: ITextLogController.LogException
     - changed: IController.Log and IController.Debug no longer works in special areas and above T1 difficulty
    It totally skips the log process in special areas (neph rifts, greater rifts, challenge hub, challenge rift) and game difficulties higher than T1. I tested screenshotting (for the proc tracker) and it only works in Master difficulty or lower. I wrote it into the Movable system to try to write the config file later when conditions are met, but it would be really nice if KJ would add a save and wait option to the log process.

  5. #4
    RNN's Avatar Legendary
    Reputation
    790
    Join Date
    Sep 2018
    Posts
    1,032
    Thanks G/R
    102/753
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Is incredible!
    A great contribution

    Last edited by RNN; 07-30-2020 at 07:26 AM.

  6. #5
    s4000's Avatar Contributor
    Reputation
    284
    Join Date
    Oct 2018
    Posts
    489
    Thanks G/R
    18/271
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Just write an extend plugin for textlog, use Hud.TextLog.LogQueue(x, x, x, x) as replacement,
    It will save until condition is satisfied (not special area & master diff or lower, & it seems need a new game for hud to detect change of difficulty)

    DAV_Extend_TextLogPlugin - Pastebin.com

    Originally Posted by Razorfish View Post
    This is a change to logging starting with TH version 20.7.12.0 (it is mentioned in its changelog):
    Code:
     - removed: ITextLogController.LogException
     - changed: IController.Log and IController.Debug no longer works in special areas and above T1 difficulty
    It totally skips the log process in special areas (neph rifts, greater rifts, challenge hub, challenge rift) and game difficulties higher than T1. I tested screenshotting (for the proc tracker) and it only works in Master difficulty or lower. I wrote it into the Movable system to try to write the config file later when conditions are met, but it would be really nice if KJ would add a save and wait option to the log process.

  7. Thanks Razorfish (1 members gave Thanks to s4000 for this useful post)
  8. #6
    RNN's Avatar Legendary
    Reputation
    790
    Join Date
    Sep 2018
    Posts
    1,032
    Thanks G/R
    102/753
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    There is a little bug ( "," -> ".") using the saved configuration (MovablePluginConfig.cs)
    Code:
    plugin.Configure("TimersRiftBar", 0, 1598,8f, 997,8f, 147,08f, 26,6f, true); //Bar
    Code:
    2020.07.28 15:17:48.130	20.6.26.0 ...\Plugins\Razor\Movable\MovablePluginConfig.cs(28,12) : error CS1501: No overload for method 'Configure' takes 11 arguments
    Last edited by RNN; 07-28-2020 at 08:27 AM.

  9. #7
    Razorfish's Avatar Contributor
    Reputation
    188
    Join Date
    Apr 2019
    Posts
    178
    Thanks G/R
    19/158
    Trade Feedback
    0 (0%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by RNN View Post
    There is a little bug ( "," -> ".") using the saved configuration (MovablePluginConfig.cs)
    Code:
    plugin.Configure("TimersRiftBar", 0, 1598,8f, 997,8f, 147,08f, 26,6f, true); //Bar
    Code:
    2020.07.28 15:17:48.130	20.6.26.0 ...\Plugins\Razor\Movable\MovablePluginConfig.cs(28,12) : error CS1501: No overload for method 'Configure' takes 11 arguments
    Ah, localization! Hmm, I guess I can either escape the commas or round to integer values. Thanks for letting me know about the issue.

  10. #8
    Razorfish's Avatar Contributor
    Reputation
    188
    Join Date
    Apr 2019
    Posts
    178
    Thanks G/R
    19/158
    Trade Feedback
    0 (0%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    I've updated the download in the first post (Movable plugins system) to include these file updates:

    TurboHUD\plugins\Razor\Movable\MovableController.cs - fixes issue with config files when decimal points are written as commas instead of periods
    TurboHUD\plugins\Razor\Click\ClickEventHandler.cs - small optimization for mouse event notifications
    Last edited by Razorfish; 07-28-2020 at 02:53 PM. Reason: updated ClickEventHandler link

  11. Thanks BeeAntOS (1 members gave Thanks to Razorfish for this useful post)
  12. #9
    Saico's Avatar Active Member
    Reputation
    21
    Join Date
    Apr 2019
    Posts
    379
    Thanks G/R
    35/20
    Trade Feedback
    0 (0%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Got exceptions when copying logs/MovablePluginConfig.txt to Movable/MovablePluginConfig.cs to save changes.

    Code:
    2020.07.28 15:41:34.369	20.7.12.0		C:\Users\nasares\Desktop\TURBOHUD\TURBOHUD\Plugins\Razor\Movable\MovablePluginConfig.cs(21,12) : error CS1501: No overload for method 'Configure' takes 11 arguments
    2020.07.28 15:41:34.369	20.7.12.0		C:\Users\nasares\Desktop\TURBOHUD\TURBOHUD\Plugins\Razor\Movable\MovablePluginConfig.cs(22,12) : error CS1501: No overload for method 'Configure' takes 9 arguments
    2020.07.28 15:41:34.369	20.7.12.0		C:\Users\nasares\Desktop\TURBOHUD\TURBOHUD\Plugins\Razor\Movable\MovablePluginConfig.cs(23,12) : error CS1501: No overload for method 'Configure' takes 9 arguments
    2020.07.28 15:41:34.369	20.7.12.0		C:\Users\nasares\Desktop\TURBOHUD\TURBOHUD\Plugins\Razor\Movable\MovablePluginConfig.cs(24,12) : error CS1501: No overload for method 'Configure' takes 10 arguments
    2020.07.28 15:41:34.369	20.7.12.0		C:\Users\nasares\Desktop\TURBOHUD\TURBOHUD\Plugins\Razor\Movable\MovablePluginConfig.cs(25,12) : error CS1501: No overload for method 'Configure' takes 11 arguments
    2020.07.28 15:41:34.369	20.7.12.0		C:\Users\nasares\Desktop\TURBOHUD\TURBOHUD\Plugins\Razor\Movable\MovablePluginConfig.cs(26,12) : error CS1501: No overload for method 'Configure' takes 9 arguments
    2020.07.28 15:41:34.369	20.7.12.0		C:\Users\nasares\Desktop\TURBOHUD\TURBOHUD\Plugins\Razor\Movable\MovablePluginConfig.cs(27,12) : error CS1501: No overload for method 'Configure' takes 10 arguments
    2020.07.28 15:41:34.369	20.7.12.0		C:\Users\nasares\Desktop\TURBOHUD\TURBOHUD\Plugins\Razor\Movable\MovablePluginConfig.cs(28,12) : error CS1501: No overload for method 'Configure' takes 11 arguments
    2020.07.28 15:41:34.369	20.7.12.0		C:\Users\nasares\Desktop\TURBOHUD\TURBOHUD\Plugins\Razor\PartyHealthTracker.cs(76,15) : warning CS0169: The field 'PartyHealthTracker.TickInterval' is never used
    2020.07.28 15:41:34.369	20.7.12.0		C:\Users\nasares\Desktop\TURBOHUD\TURBOHUD\Plugins\Razor\PartyHealthTracker.cs(77,15) : warning CS0169: The field 'PartyHealthTracker.LastRecordedTick' is never used
    2020.07.28 15:41:34.369	20.7.12.0		C:\Users\nasares\Desktop\TURBOHUD\TURBOHUD\Plugins\Razor\Reflect\ReflectNotifications.cs(60,16) : warning CS0649: Field 'ReflectNotifications.Reflecting' is never assigned to, and will always have its default value false
    2020.07.28 15:41:34.369	20.7.12.0		C:\Users\nasares\Desktop\TURBOHUD\TURBOHUD\Plugins\Razor\PartyHealthTracker.cs(78,19) : warning CS0169: The field 'PartyHealthTracker.CursorPlayer' is never used

  13. #10
    RNN's Avatar Legendary
    Reputation
    790
    Join Date
    Sep 2018
    Posts
    1,032
    Thanks G/R
    102/753
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    With the latest version, a repeated exception appears:

    Code:
    2020.07.28 21:11:31.589	20.7.8.0	OnCollectFinishedUnSafe exception (System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.
       en Turbo.Plugins.Razor.Click.ClickEventHandler.AfterCollect()
       en ‪*‎‫‬*​‎*‏‪‏‏‪‬‪‏‏‪‪‪**​***.‪*​‪***​*‎*‫‪*‏‏*‪**‫‏*‪*​*‏**.****‬‬‎‫*‬*‫***‬‫*‫‬​‫​‬*()
       en ‪*‎‫‬*​‎*‏‪‏‏‪‬‪‏‏‪‪‪**​***.***​‏*​****‪**‬‏*‪​‬‫‪‬‪**(IPlugin , String , Action )
       en ‪*‎‫‬*​‎*‏‪‏‏‪‬‪‏‏‪‪‪**​***.‎*‏*​****​‎‏*‏‏‎*‬‫‬*‫​‏‬*(Object , EventArgs )
    ‏ Clean installation of TH (latest version, defaults plugins) and this plugin (just downloaded)

    update: If I use the ClickEventHandler.cs file from the previous version everything works fine, also the configuration

    Originally Posted by Saico View Post
    Got exceptions when copying logs/MovablePluginConfig.txt to Movable/MovablePluginConfig.cs to save changes.
    Do a clean installation, that happened with the previous version
    You must delete those files: MovablePluginConfig.cs and MovablePluginConfig.txt (and re-create the .txt)
    Last edited by RNN; 07-28-2020 at 02:42 PM.

  14. #11
    Razorfish's Avatar Contributor
    Reputation
    188
    Join Date
    Apr 2019
    Posts
    178
    Thanks G/R
    19/158
    Trade Feedback
    0 (0%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by RNN View Post
    With the latest version, a repeated exception appears:

    Code:
    2020.07.28 21:11:31.589	20.7.8.0	OnCollectFinishedUnSafe exception (System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.
       en Turbo.Plugins.Razor.Click.ClickEventHandler.AfterCollect()
       en ‪*‎‫‬*​‎*‏‪‏‏‪‬‪‏‏‪‪‪**​***.‪*​‪***​*‎*‫‪*‏‏*‪**‫‏*‪*​*‏**.****‬‬‎‫*‬*‫***‬‫*‫‬​‫​‬*()
       en ‪*‎‫‬*​‎*‏‪‏‏‪‬‪‏‏‪‪‪**​***.***​‏*​****‪**‬‏*‪​‬‫‪‬‪**(IPlugin , String , Action )
       en ‪*‎‫‬*​‎*‏‪‏‏‪‬‪‏‏‪‪‪**​***.‎*‏*​****​‎‏*‏‏‎*‬‫‬*‫​‏‬*(Object , EventArgs )
    Thanks for the catch, ClickEventHandler.cs is updated again in the main download and my previous post.

  15. Thanks BeeAntOS (1 members gave Thanks to Razorfish for this useful post)
  16. #12
    RNN's Avatar Legendary
    Reputation
    790
    Join Date
    Sep 2018
    Posts
    1,032
    Thanks G/R
    102/753
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    It works fine for me now

  17. #13
    Razorfish's Avatar Contributor
    Reputation
    188
    Join Date
    Apr 2019
    Posts
    178
    Thanks G/R
    19/158
    Trade Feedback
    0 (0%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Updated the download in the first post with a small fix, and here is the changed file by itself:

    TurboHUD\plugins\Razor\Reflect\ReflectNotifications.cs - fixed the issue with the reflect warning text not showing up

  18. Thanks BeeAntOS (1 members gave Thanks to Razorfish for this useful post)
  19. #14
    Saico's Avatar Active Member
    Reputation
    21
    Join Date
    Apr 2019
    Posts
    379
    Thanks G/R
    35/20
    Trade Feedback
    0 (0%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Got expection overflow with latest files, didn`t modify any file from original

    Edit: Forgot what I said above, somehow it got exception earlier but its fine now.


    I was trying to remove tts procs and found strings in PartyProcTracker.cs and also deactiveted some bools in PartyHealthTracker.cs that helped me

    Silly question, what is that heart at portrait and how do I move or remove it ?

    and how do I remove the ( ) Parentesis on char when immune ?

    Btw your plugin is dope and it would be great if it implemented in many useful plugins we already use, so practice to move them.
    Last edited by Saico; 07-28-2020 at 05:49 PM.

  20. #15
    Stormreaver's Avatar Contributor
    Reputation
    152
    Join Date
    Jul 2012
    Posts
    290
    Thanks G/R
    40/136
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Woooo this is great. Reminds me of the customizable UIs windows in modern MMOs

Page 1 of 7 12345 ... LastLast

Similar Threads

  1. User Infraction Warning System
    By Matt in forum Community Chat
    Replies: 28
    Last Post: 11-03-2006, 04:47 PM
  2. Where can i get a Cord mod/plugin?
    By Mike3667 in forum World of Warcraft General
    Replies: 1
    Last Post: 09-09-2006, 07:20 PM
  3. New to the honor system? Guide here
    By Amedis in forum World of Warcraft Guides
    Replies: 0
    Last Post: 06-16-2006, 09:21 AM
  4. The Honour System Explained
    By Cush in forum World of Warcraft Guides
    Replies: 2
    Last Post: 05-27-2006, 06:50 PM
  5. Replies: 0
    Last Post: 03-24-2006, 01:43 AM
All times are GMT -5. The time now is 05:55 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search