[V9.1] [INTERNATIONAL] [Miqui] CustomizableActorDecorators + PhantasmDecorator menu

User Tag List

Results 1 to 6 of 6
  1. #1
    Miquiqui's Avatar Active Member
    Reputation
    21
    Join Date
    Feb 2018
    Posts
    19
    Thanks G/R
    5/17
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [V9.1] [INTERNATIONAL] [Miqui] CustomizableActorDecorators + PhantasmDecorator

    Supported TurboHUD version: 9.1

    This plugin allows you to somewhat simply create dynamic (or not dynamic too) actor decorators. It is meant as a way for other plugin developers to plug into and add decorators that can evolve as things happen within the game.
    For example: a circle around WDs phantasm that turns red for the last 2 seconds before the explosion, so that you know you need to get the elites in quickly if you want them to take damage.
    An InnerSanctuary that changes color when you're inside... Etc.

    Downloads:
    - CustomizableActorDecoratorsPlugin.cs
    - IActorDecorator.cs

    Installation: Put the files in /plugins/Miqui/CustomizableActorDecorators/

    How to use:
    - Create a new plugin that extends ICustomizer
    - Add the namespace Turbo.Plugins.Miqui.CustomizableActorDecorators
    - Create a class that implements IActorDecorator
    -> This interface only has one function
    PHP Code:
    WorldDecoratorCollection getActorDecorator(IController hudIActor actor); 
    -> It should return whatever decorator you want to be using for the actor. You have access to the IController value, so you can calculate things like player positions, mob positions, timings....
    -> Note that C# does not support Anonymous Innerclasses (wtf ?) so you have to declare full-on classes even for such a simple interface...
    - Find which ActorSnoEnum you want to decorate (in game, you can press F11 and cast the skill to get its name, you can then find it in the Actor.cs class
    - In the Customize function Run on plugin AddDecorator with the ActorSnoEnum you choose and the IActorDecorator you decided
    PHP Code:
    public void Customize()
            {
                
    Hud.RunOnPlugin<CustomizableActorDecoratorsPlugin>(plugin => 
                {
                    
    plugin.AddDecorator(ActorSnoEnum.ACTOR_YOU_CHOOSEYOUR_DECORATOR); // First one
                    
    plugin.AddDecorator(ActorSnoEnum.ANOTHER_ACTOR_(CAN_BE_THE_SAME), ANOTHER_DECORATOR); // Can add as many as you want
                
    });
            } 
    There is not limit to how many decorators you can add per actor, except the number of item you can fit in a C# List (wouldn't try it).
    You can also create as many customizer plugins as you want, I personnaly do one per skill.

    Note: The content of your IActorDecorator is not called if no actor with the right ActorSnoEnum is in range, however if one is in range, it will be called once per tick so try not to make it too computing heavy. For example, I would advise creating your WorldDecoratorCollection's in the Constructor of your IActorDecorator and never during the getActorDecorator(..) phase, and simply using logic to return the right one at the right time.

    As an example, here is my own wd Phantasm plugin, it shows a dashed outline for the explosion radius until 2 seconds before the explosion, where it becomes solid.
    Screenshot
    Download:
    - PhantasmDecoratorCustomizer.cs

    Installation: Install the two .cs files mentionned at the start (obviously... ^^), then add this file in /plugins/Miqui/
    That's it.

    If there is any C# coding style I did not respect... sorry not sorry. I come from a pure java background and it was already hard enough not use keep the { on the same line as the function declaration. I might have missed a couple but couldn't be bothered.
    This is quite over-engineered but I had fun doing it, so I thought I might as well share it if someone ever needs it.

    @Jack if you ever come around here, would it be possible to make VSC auto format code on save when using your intellisense thingy ?
    Last edited by Miquiqui; 03-10-2020 at 06:55 AM.

    [V9.1] [INTERNATIONAL] [Miqui] CustomizableActorDecorators + PhantasmDecorator
  2. Thanks BeeAntOS, RNN, mois, JohnWick (4 members gave Thanks to Miquiqui for this useful post)
  3. #2
    takayo72's Avatar Active Member
    Reputation
    17
    Join Date
    Jan 2018
    Posts
    203
    Thanks G/R
    43/15
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Could barb able to see it ?

  4. #3
    Miquiqui's Avatar Active Member
    Reputation
    21
    Join Date
    Feb 2018
    Posts
    19
    Thanks G/R
    5/17
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The Phantasm plugin I assume ? Yes.

  5. #4
    rogue00722's Avatar Member
    Reputation
    4
    Join Date
    Mar 2018
    Posts
    45
    Thanks G/R
    22/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can I make it a different color when I add it?

    Can I make it a different color of skill when I add it?

  6. #5
    Miquiqui's Avatar Active Member
    Reputation
    21
    Join Date
    Feb 2018
    Posts
    19
    Thanks G/R
    5/17
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can edit the PhantasmDecoratorCustomizer if you want to change the colors of the circles.
    It's fairly simple, every time you see hud.Render.CreateBrush(A, R, G, B, W) (for example : hud.Render.CreateBrush(100, 130, 213, 255, 10), line 17), the A is the opacity of the brush, R is how much red in the circle color, G green, B blue, and W is the width (how fat the line should be)
    In a WorldDecoratorCollection, the first brush is the circle color, and the last is the cooldown color. So let's say you want a red brush, you would change line 17 to hud.Render.CreateBrush(100, 255, 0, 0, 10),.

    You can google color picker to get an easy to use color picker and choose your r, g, b colors you want for your circle.
    As far as which is which, MainSpiritBarrageCircle is the small circle. Solid/DashedExplosionSpiritBarrageCircle is the bigger circle for the explosion.

  7. #6
    rogue00722's Avatar Member
    Reputation
    4
    Join Date
    Mar 2018
    Posts
    45
    Thanks G/R
    22/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your help always.

Similar Threads

  1. [V9.0] [INTERNATIONAL] [RNN] Icount
    By RNN in forum TurboHUD Community Plugins
    Replies: 21
    Last Post: 2 Weeks Ago, 04:48 AM
  2. [V9.0] [INTERNATIONAL] [RNN] OtherShrinePlugin
    By RNN in forum TurboHUD Community Plugins
    Replies: 137
    Last Post: 3 Weeks Ago, 04:25 PM
  3. [V9.0] [INTERNATIONAL] [RNN] BLueLines
    By RNN in forum TurboHUD Community Plugins
    Replies: 28
    Last Post: 03-20-2022, 07:48 PM
  4. [V9.0] [INTERNATIONAL] [RNN] TimersBarGR
    By RNN in forum TurboHUD Community Plugins
    Replies: 37
    Last Post: 04-09-2021, 09:20 AM
  5. [V9.0] [INTERNATIONAL] [RNN] LogChat
    By RNN in forum TurboHUD Community Plugins
    Replies: 19
    Last Post: 01-08-2021, 09:14 AM
All times are GMT -5. The time now is 05:17 PM. 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