Movable plugins system menu

User Tag List

Page 1 of 4 1234 LastLast
Results 1 to 15 of 51
  1. #1
    Razorfish's Avatar Contributor
    Reputation
    121
    Join Date
    Apr 2019
    Posts
    92
    Thanks G/R
    11/94
    Trade Feedback
    0 (0%)
    Mentioned
    0 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 20.8.19.0, API version 9.2]
    [Developed and tested with TH versions 20.6.28.1 and 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\Razor\Movable\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


    Sample Movable plugins:
    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.


    Reflect Notifications - I dusted off my old plugin from the Impale era a while back for this Demon Hunter centric season, but the notification text is now movable. It shows decorators (world and minimap) on mobs that can reflect projectiles, and the decorators animate with optional text and audio notification when the monsters are using their reflection abilities.


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

    Party Health Tracker - This is the newest iteration of my one of my old plugins for showing player bars, circles and lines. It probably deserves its own post to explain all the features and configuration options, but I'll have to do that later! You can use a hotkey (Ctrl+C) when hovering over a party member's portrait to create a health bar that you can then place, move around the screen, and resize. Ctrl+X while in Edit mode will delete them or you can Ctrl+C the player's portrait to do the same thing.

    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.

    How to Install:
    Download: MovablePluginsPublic-September-3-2020.zip

    If you were one of my guinea pigs and have older versions of the Click and Movable folders installed, please delete or disable them before installing. Put these files and folders here:
    TurboHUD\plugins\Razor\Click\ (required) for mouse click handling
    TurboHUD\plugins\Razor\Movable\ (required) for Movable plugin handling

    TurboHUD\plugins\Razor\Proc\ (optional) Party Proc Tracker
    TurboHUD\plugins\Razor\Reflect\ (optional) Reflect Notifications
    TurboHUD\plugins\Razor\Override\ (optional) Movable Player Buff Lists

    TurboHUD\plugins\Razor\GoDGeneratorHint.cs (optional)
    TurboHUD\plugins\Razor\ImmunityIndicator.cs (optional)
    TurboHUD\plugins\Razor\JessethHint.cs (optional)
    TurboHUD\plugins\Razor\PartyHealthTracker.cs (optional, but requires the Proc folder to also be installed)
    TurboHUD\plugins\Razor\TempestTracker.cs (optional)

    TurboHUD\sounds\ProcYou.wav (optional) for Party Proc Tracker
    TurboHUD\sounds\Reflecting.wav (optional) for Reflect Notifications

    If you have my old Party Proc Tracker installed at TurboHUD\plugins\Razor\PartyProcTracker.cs, please delete or disable it.

    If you have my old Reflect Notifications installed at TurboHUD\plugins\Razor\ReflectNotifications.cs, please delete or disable it.

    If you have my old TurboHUD\plugins\Razor\Painter folder installed, please delete or disable its contents except for GroundMonsterDecorator.cs.

    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
    Last edited by Razorfish; 1 Week Ago at 11:32 PM. Reason: updated download

    These ads disappear when you log in.

  2. Thanks s4000, mois, Wasted75, RNN, JohnWick, Stormreaver, takayo72, TobiaSBooN, BeeAntOS, SeaDragon, kolonija, 731113, rogue00722, xblade2k7 (14 members gave Thanks to Razorfish for this useful post)
  3. #2
    s4000's Avatar Contributor
    Reputation
    199
    Join Date
    Oct 2018
    Posts
    423
    Thanks G/R
    14/192
    Trade Feedback
    0 (0%)
    Mentioned
    2 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
    121
    Join Date
    Apr 2019
    Posts
    92
    Thanks G/R
    11/94
    Trade Feedback
    0 (0%)
    Mentioned
    0 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
    681
    Join Date
    Sep 2018
    Posts
    899
    Thanks G/R
    94/653
    Trade Feedback
    0 (0%)
    Mentioned
    6 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
    199
    Join Date
    Oct 2018
    Posts
    423
    Thanks G/R
    14/192
    Trade Feedback
    0 (0%)
    Mentioned
    2 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
    681
    Join Date
    Sep 2018
    Posts
    899
    Thanks G/R
    94/653
    Trade Feedback
    0 (0%)
    Mentioned
    6 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
    121
    Join Date
    Apr 2019
    Posts
    92
    Thanks G/R
    11/94
    Trade Feedback
    0 (0%)
    Mentioned
    0 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
    121
    Join Date
    Apr 2019
    Posts
    92
    Thanks G/R
    11/94
    Trade Feedback
    0 (0%)
    Mentioned
    0 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
    16
    Join Date
    Apr 2019
    Posts
    352
    Thanks G/R
    25/15
    Trade Feedback
    0 (0%)
    Mentioned
    0 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
    681
    Join Date
    Sep 2018
    Posts
    899
    Thanks G/R
    94/653
    Trade Feedback
    0 (0%)
    Mentioned
    6 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
    121
    Join Date
    Apr 2019
    Posts
    92
    Thanks G/R
    11/94
    Trade Feedback
    0 (0%)
    Mentioned
    0 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
    681
    Join Date
    Sep 2018
    Posts
    899
    Thanks G/R
    94/653
    Trade Feedback
    0 (0%)
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    It works fine for me now

  17. #13
    Razorfish's Avatar Contributor
    Reputation
    121
    Join Date
    Apr 2019
    Posts
    92
    Thanks G/R
    11/94
    Trade Feedback
    0 (0%)
    Mentioned
    0 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
    16
    Join Date
    Apr 2019
    Posts
    352
    Thanks G/R
    25/15
    Trade Feedback
    0 (0%)
    Mentioned
    0 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
    132
    Join Date
    Jul 2012
    Posts
    280
    Thanks G/R
    34/116
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Woooo this is great. Reminds me of the customizable UIs windows in modern MMOs

Page 1 of 4 1234 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 09:08 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search