Skip to main content

Ranked Roles

Shows the roles that enemy players selected during hero selection and during the game, right in the top bar.


Visual (Визуалы)  →  Ranked roles (Рейтинговые роли)

What it does

The script reads data about the roles that enemy players chose in Dota 2's ranked roles system and displays their icons in the top bar over the player slots.

When and where it is displayed

  • On the hero selection screen (strategy, draft, player pool): role icons are drawn in the slots above the player positions in the PreGame block.
  • At the start of the game (the PRE_GAME stage, before the match fully begins): icons are displayed above the mana bar slots in the top bar. During this period the icons are larger for better visibility.
  • During active play (GAME_IN_PROGRESS) and after it ends (POST_GAME), the icons are not shown.

What exactly is shown

Each enemy player can select one or more roles. The script displays all of them:

  • If one role is selected, the role icon is shown with a text label.
  • If multiple roles are selected, the icons are lined up in a row centered in the slot.

Available roles: Safelane, Offlane, Midlane, Support, Hard Support.

Conditions for hiding the icon

The role icon for a specific player is not shown if:

  • Their hero's HP has dropped below 50% — the script automatically hides the icon so that it does not overlap other interface elements (for example, the health bar in the top bar).
  • The player is a spectator or is in the DraftPool.

Settings

OptionTypeDefaultDescription
StateToggleOnEnables/disables the display of enemy players' roles.