Constants
Display-name helpers and lookup tables backed by bundled dotaconstants data.
Generated API
Module gem.constants
Dota 2 game constants — heroes, items, abilities, XP thresholds.
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:67
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:81
hero_meta
def hero_meta(npc_name: str) -> dictReturn the full hero metadata dict, or an empty dict if not found.
Source: src/gem/constants.py:108
item_display
def item_display(internal: str) -> strReturn display name for an item_* prefixed internal name.
Source: src/gem/constants.py:125
ability_display
def ability_display(internal: str) -> strReturn display name for an ability or item internal name.
Source: src/gem/constants.py:176
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:202
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:222
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:239