Constants
Display-name helpers and lookup tables backed by bundled dotaconstants data.
Generated API
Module gem.constants
Backward-compatible facade for Dota catalog lookups.
Source: src/gem/constants.py
Top-level functions
hero_display
def hero_display(npc_name: str) -> strReturn the localized display name for an npc_dota_hero_* string.
Source: src/gem/constants.py:52
hero_short
def hero_short(npc_name: str) -> strReturn display name from either a full npc_dota_hero_* or a bare suffix.
Source: src/gem/constants.py:64
hero_npc_name
def hero_npc_name(name: str) -> str | NoneResolve a display name to its npc_dota_hero_* NPC name.
Source: src/gem/constants.py:76
hero_meta
def hero_meta(npc_name: str) -> dict[str, Any]Return the full hero metadata dict, or an empty dict if not found.
Source: src/gem/constants.py:88
item_display
def item_display(internal: str) -> strReturn display name for an item_* prefixed internal name.
Source: src/gem/constants.py:100
item_key_by_id
def item_key_by_id(item_id: int) -> str | NoneReturn the internal item key for an item ability ID.
Source: src/gem/constants.py:112
ability_display
def ability_display(internal: str) -> strReturn display name for an ability or item internal name.
Source: src/gem/constants.py:124
xp_to_next_level
def xp_to_next_level(level: int, current_xp: int) -> int | NoneReturn XP needed to reach the next level, or None at max level.
Source: src/gem/constants.py:136
permanent_buff_name
def permanent_buff_name(buff_id: int) -> strReturn the item name for a permanent buff integer ID.
Source: src/gem/constants.py:149
league_name
def league_name(leagueid: int) -> str | NoneReturn the league name for a given league ID, or None if unknown/not found.
Source: src/gem/constants.py:161