Advertisement
jarppaaja

MyMinimalPlugin

Feb 5th, 2019
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 7.57 KB | None | 0 0
  1. using System.Collections.Generic;
  2. using Turbo.Plugins.Default;
  3.  
  4. namespace Turbo.Plugins.User
  5. {
  6.     // This is my opinion how to make very minimal THUD gameplay with barebones essiential stuff avaialble in default plugins.
  7.  
  8.     public class MyMinimalPlugin : BasePlugin, ICustomizer
  9.     {
  10.         public MyMinimalPlugin() { Enabled = true; }
  11.  
  12.         /*
  13.          * Disable Experience run stats display (in top center screen):
  14.          * config\ui_default\ui_default_labels_run_stats.xml
  15.          *      line 30: <activator enabled="0" ...
  16.          *      line 39: <default enabled="0" ...
  17.          *
  18.          * Disable 3 damage numbers in player portrait:
  19.          * config\ui_default\ui_default_main.xml
  20.                line 64: <real_dps enabled="0" ...
  21.                line 67: <run_dps enabled="0" ...
  22.                line 70: <total_dmg enabled="0" ...
  23.          */
  24.  
  25.         public void Customize()
  26.         {
  27.             // Setup original InventoryAndStashPlugin & Co.!
  28.             Hud.RunOnPlugin<InventoryAndStashPlugin>(plugin =>
  29.             {
  30.                 plugin.LooksGoodDisplayEnabled = false;
  31.                 plugin.NotGoodDisplayEnabled = false;
  32.                 plugin.DefinitelyBadDisplayEnabled = false;
  33.                 plugin.CanCubedEnabled = false;
  34.             });
  35.             Hud.TogglePlugin<HoveredItemInfoPlugin>(false);
  36.  
  37.             Hud.RunOnPlugin<MonsterRiftProgressionColoringPlugin>(plugin =>
  38.             {
  39.                 // These are trash mobs and do not deserve separate color.
  40.                 plugin.Decorator2 = plugin.Decorator1;
  41.                 plugin.Decorator3 = plugin.Decorator1;
  42.             });
  43.  
  44.             // Disable labels under monsters
  45.             //--Hud.TogglePlugin<StandardMonsterPlugin>(false);
  46.             Hud.TogglePlugin<EliteMonsterAffixPlugin>(false);
  47.             Hud.TogglePlugin<DangerousMonsterPlugin>(false);
  48.             Hud.TogglePlugin<ExplosiveMonsterPlugin>(false);
  49.  
  50.             // disable numbers over skillbar
  51.             Hud.TogglePlugin<AttributeLabelListPlugin>(false);
  52.             // disable latency numbers
  53.             Hud.TogglePlugin<NetworkLatencyPlugin>(false);
  54.             // disable elemental numbers under hp ball
  55.             Hud.TogglePlugin<DamageBonusPlugin>(false);
  56.             // turn off Experience Statistics on the right
  57.             Hud.TogglePlugin<TopExperienceStatistics>(false);
  58.             // Don't know if this draws anything but disable it anyway!
  59.             Hud.TogglePlugin<UiHiddenPlayerSkillBarPlugin>(false);
  60.             // Disable *multiplayer* "DPS dealt to monsters" graphic label under player portraits.
  61.             Hud.TogglePlugin<PortraitBottomStatsPlugin>(false);
  62.  
  63.             // Turn off the Automated Paragon Screen captured saved to disc
  64.             Hud.TogglePlugin<ParagonCapturePlugin>(false);
  65.             // Turn off the Paragon and experience boxes at the center top of the screen
  66.             Hud.TogglePlugin<PlayerTopBuffListPlugin>(false);
  67.             Hud.TogglePlugin<TopExperienceStatistics>(false);
  68.  
  69.             // Turn off the "Strength in Numbers" buff in multiplayer games
  70.             Hud.TogglePlugin<MultiplayerExperienceRangePlugin>(false);
  71.  
  72.             // Disable some default UI plugins.
  73.             Hud.TogglePlugin<GameInfoPlugin>(false);
  74.             Hud.TogglePlugin<NotifyAtRiftPercentagePlugin>(false);
  75.             Hud.TogglePlugin<PickupRangePlugin>(false);
  76.  
  77.             // Turn off the weapon rack minimap location dots - we seldom open them.
  78.             Hud.TogglePlugin<RackPlugin>(false);
  79.  
  80.             // Checsts with Harrington Waistguard on minimap - for fun!
  81.             Hud.TogglePlugin<ClickableChestGizmoPlugin>(false);
  82.             // Dead bodies white rectangle on minimap.
  83.             Hud.TogglePlugin<DeadBodyPlugin>(false);
  84.  
  85.             // Hide most extras - draws buf icons to left side of mini map.
  86.             Hud.RunOnPlugin<MiniMapLeftBuffListPlugin>(plugin =>
  87.             {
  88.                 plugin.RuleCalculator.Rules.Clear();
  89.                 // During Greater Rift only.
  90.                 var p = Hud.Sno.SnoPowers;
  91.                 uint Invulnerable = p.Generic_PagesBuffInvulnerable.Sno;    // 266254 Shield - invincible
  92.                 uint Damage = p.Generic_PagesBuffDamage.Sno;                // 262935 Power - 5x damage
  93.                 plugin.RuleCalculator.Rules.Add(new BuffRule(Invulnerable) { MinimumIconCount = 1 });
  94.                 plugin.RuleCalculator.Rules.Add(new BuffRule(Damage) { MinimumIconCount = 1 });
  95.             });
  96.             // Disable - draws buf icons to right side of mini map.
  97.             Hud.TogglePlugin<CheatDeathBuffFeederPlugin>(false);
  98.  
  99.             // Just (sub optimization?) for performance.
  100.             Hud.TogglePlugin<SkillRangeHelperPlugin>(false);
  101.  
  102.             Hud.TogglePlugin<ConventionOfElementsBuffListPlugin>(false);    // Not needed.
  103.  
  104.             // Fix Sentry minimap icon
  105.             Hud.RunOnPlugin<PlayerSkillPlugin>(plugin =>
  106.             {
  107.                 List<IWorldDecorator> decorators = new List<IWorldDecorator>();
  108.                 decorators.AddRange(plugin.SentryDecorator.Decorators);
  109.                 decorators.AddRange(plugin.SentryWithCustomEngineeringDecorator.Decorators);
  110.  
  111.                 foreach (var decorator in decorators)
  112.                 {
  113.                     if (decorator is MapShapeDecorator)
  114.                     {
  115.                         ((MapShapeDecorator)decorator).Brush = Hud.Render.CreateBrush(255, 255, 255, 255, 2);   // White.
  116.                         ((MapShapeDecorator)decorator).ShapePainter = new PlusShapePainter(Hud);
  117.                     }
  118.                 }
  119.             });
  120.  
  121.             Hud.RunOnPlugin<ItemsPlugin>(plugin =>
  122.             {
  123.                 plugin.EnableSpeakPrimal = true;
  124.                 plugin.EnableSpeakPrimalSet = true;
  125.  
  126.                 // Disable unnecessary item decorators.
  127.                 plugin.LegendaryDecorator.Enabled = false;
  128.                 plugin.SetDecorator.Enabled = false;
  129.                 plugin.InArmorySetDecorator.Enabled = false;
  130.  
  131.                 // Show ancient and primal items on mini map.
  132.                 plugin.AncientDecorator.Decorators.Add(new MapLabelDecorator(Hud)
  133.                 {
  134.                     LabelFont = Hud.Render.CreateFont("tahoma", 6, 255, 235, 120, 0, true, false, false),
  135.                     RadiusOffset = 14,
  136.                     Up = true,
  137.                 });
  138.                 plugin.AncientSetDecorator.Decorators.Add(new MapLabelDecorator(Hud)
  139.                 {
  140.                     LabelFont = Hud.Render.CreateFont("tahoma", 6, 255, 0, 170, 0, true, false, false),
  141.                     RadiusOffset = 14,
  142.                     Up = true,
  143.                 });
  144.                 plugin.PrimalDecorator.Decorators.Add(new MapLabelDecorator(Hud)
  145.                 {
  146.                     LabelFont = Hud.Render.CreateFont("tahoma", 7, 255, 240, 20, 0, true, false, false),
  147.                     RadiusOffset = 14,
  148.                     Up = true,
  149.                 });
  150.                 plugin.PrimalSetDecorator.Decorators.Add(new MapLabelDecorator(Hud)
  151.                 {
  152.                     LabelFont = Hud.Render.CreateFont("tahoma", 7, 255, 240, 20, 0, true, false, false),
  153.                     RadiusOffset = 14,
  154.                     Up = true,
  155.                 });
  156.                 // Add ground circle for Death Breaths.
  157.                 plugin.DeathsBreathDecorator.Add(new GroundCircleDecorator(Hud)
  158.                 {
  159.                     Brush = Hud.Render.CreateBrush(192, 102, 202, 177, -2),
  160.                     Radius = 1.25f,
  161.                 });
  162.             });
  163.         }
  164.     }
  165. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement