Skip to main content
Monsters

Monster Markers

This plugin allows you to define custom conditions for which text markers and/or decorators (both ground and map) are drawn on monsters. For example, easily define rules to mark frozen monsters or monsters in execute range with a symbol and/or decorator only when specific conditions are met. They stack horizontally like ground labels do, but the relatively high drawing priority allows it to draw above all world decorators.

It is inspired by Stone.ReflectDamageMonstersPlugin, Jack.DangerousAffixMonsterPlugin, Razor.RunStats.MenuUptimeTracker, and Default.Decorator.GroundLabelDecoratorPainterPlugin.

I've included a few example marker definitions to help you get started in the MonsterMarkersConfig.cs file, but you can remove, edit, or add to them however you like:

  • snowflake icon with a cross on the minimap if monsters are frozen (and commented out, I included the code you would need to swap in to make that show only if the Buriza ethereal item is equipped)
  • skull and crossbones icon with a dashed circle around monsters in Execute range if any party members have an execute skill or power equipped
  • lightning bolt icon on monsters that can trigger your Halo of Karini, if you have HoK equipped
  • small reticle icon on monsters that are the target of Command Skeletons, if you have Command Skeletons on your action bar
  • (commented out/disabled) arm flex symbol on monsters that don't have Strongarms applied, if someone in your party has the Strongarms power equipped

Customization

You can define your own conditions, markers and decorators in MonsterMarkersConfig.cs in a similar fashion to UptimeRule from Razor.RunStats.MenuUptimeTracker

Each MonsterMarker rule has a few useful configuration options:

  • MonsterMarker.IsRelevant - only run IsMarked() if this function returns true; this condition is independent of IMonster and only gets evaluated once per loop
  • MonsterMarker.IsMarked - only draw markers if this function returns true; unlike IsRelevant, it is evaluated for each monster in the loop and can examine each monster's properties
  • MonsterMarker.Symbol - optional, text to draw if IsMarked returns true
  • MonsterMarker.Font - optional, text font (color, size, opacity, shadow) to draw with
  • MonsterMarker.Decorator - optional, WorldDecoratorCollection to draw if IsMarked returns true
  • MonsterMarker.DecoratorPosition - optional, a function that returns a custom position relative to its input IMonster

The default DecoratorPosition function is set to IMonster.FloorCoordinate, but it can be redefined in the config file.

The default SymbolPosition function is set to IMonster.FloorCoordinate.ToScreenCoordinate(), but it can be redefined in the config file.

The DefaultMarker rule is what is drawn for a monster if no other MonsterMarker rules match it when the MarkAllMonsters variable is set to true. By default, MarkAllMonsters is true, and it draws a white smiley face.

Installation

MonsterMarkers_Aug-22-2021.zip

Extract the archive into your TurboHUD directory. The files should be in the following locations when you're done:

TurboHUD \ plugins \ Razor \ Monster \ MonsterMarkers.cs
TurboHUD \ plugins \ Razor \ Monster \ MonsterMarkersConfig.cs
TurboHUD \ plugins \ Razor \ Util \ UtilExtensions.cs

You probably already have UtilExtensions.cs if you have the Menu Plugin System installed. It is okay to either skip or overwrite it with the version included in this download because they are the same.

Then (re)start TurboHUD.

Changelog

August 22, 2021

  • Cleaned up code and moved the rules into a separate config file for a public release 
November 26, 2020

  • Rewrite

Works with Diablo 3 patch 2.7.1, TurboHUD v21.7.22.20, API v9.2

Comments

  1. This is sick! Something I noticed, strongarms symbol is commented out by default and the logo is a bit difficult to see as it's small and is positioned directly on top of elite affix indicators. I just changed it's size and color for now. Thank you for this plugin and for the extensive commenting in your code. Super helpful. Cheers!

    ReplyDelete
    Replies
    1. I guess I take the FloorCoordinate positioning for granted because I wrote my own version of the affix labels plugin, repositioning them so that they're offset from the FloorCoordinate - gives better visibility around monsters' feet. But you can shift the position of the markers and decorators by redefining their default position functions (Func SymbolPosition and Func DecoratorPosition).

      Delete
    2. That makes sense. Yeah, I'll attempt to mess around with their position until my OCD feels satisfied. That's all this is really about. xD Thank you again, Razorfish.

      Delete

Post a Comment