Catalog
Grouped accessors for bundled Dota metadata and static map data.
gem.constants remains available as a compatibility facade; new code can use
gem.catalog or the more specific gem.catalog.* modules.
Generated API
Module gem.catalog.heroes
Hero catalog lookups backed by bundled dotaconstants data.
Source: src/gem/catalog/heroes.py
Top-level functions
hero_display
def hero_display(npc_name: str) -> str
Return the localized display name for an npc_dota_hero_* string.
Source: src/gem/catalog/heroes.py:16
hero_short
def hero_short(npc_name: str) -> str
Return display name from either a full npc_dota_hero_* or a bare suffix.
Source: src/gem/catalog/heroes.py:31
hero_npc_name
def hero_npc_name(name: str) -> str | None
Resolve a display name to its npc_dota_hero_* NPC name.
Source: src/gem/catalog/heroes.py:45
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/catalog/heroes.py:76
hero_id
def hero_id(npc_name: str) -> int
Return the numeric Dota 2 hero ID for an npc_dota_hero_* name.
Source: src/gem/catalog/heroes.py:88
Module gem.catalog.items
Item and permanent-buff catalog lookups.
Source: src/gem/catalog/items.py
Top-level functions
item_display
def item_display(internal: str) -> str
Return display name for an item_* prefixed internal name.
Source: src/gem/catalog/items.py:24
item_key_by_id
def item_key_by_id(item_id: int) -> str | None
Return the internal item key for an item ability ID.
Source: src/gem/catalog/items.py:42
permanent_buff_name
def permanent_buff_name(buff_id: int) -> str
Return the item name for a permanent buff integer ID.
Source: src/gem/catalog/items.py:54
Module gem.catalog.abilities
Ability catalog lookups backed by bundled dotaconstants data.
Source: src/gem/catalog/abilities.py
Top-level functions
ability_display
def ability_display(internal: str) -> str
Return display name for an ability or item internal name.
Source: src/gem/catalog/abilities.py:44
Module gem.catalog.xp
Hero experience threshold catalog.
Source: src/gem/catalog/xp.py
Top-level functions
xp_to_next_level
def xp_to_next_level(level: int, current_xp: int) -> int | None
Return XP needed to reach the next level, or None at max level.
Source: src/gem/catalog/xp.py:14
Module gem.catalog.leagues
League catalog lookups.
Source: src/gem/catalog/leagues.py
Top-level functions
league_name
def league_name(leagueid: int) -> str | None
Return the league name for a given league ID, or None if unknown/not found.
Source: src/gem/catalog/leagues.py:14
Module gem.catalog.map
Map catalog lookups for static map and neutral-camp data, and the map calibration.
Source: src/gem/catalog/map.py
Top-level functions
world_to_map_image
def world_to_map_image(x: float, y: float, width: float = MAP_IMAGE_WIDTH, height: float = MAP_IMAGE_HEIGHT) -> tuple[float, float]
Project world coordinates onto the 7.41 map image.
Source: src/gem/catalog/map.py:30
map_image_to_world
def map_image_to_world(px: float, py: float, width: float = MAP_IMAGE_WIDTH, height: float = MAP_IMAGE_HEIGHT) -> tuple[float, float]
Project a 7.41 map image pixel to world coordinates (inverse of :func:world_to_map_image).
Source: src/gem/catalog/map.py:54
load_camp_zones
def load_camp_zones() -> dict[str, Any]
Load calibrated neutral-camp zone geometry.
Source: src/gem/catalog/map.py:74
load_map_constants
def load_map_constants() -> dict[str, Any]
Load static map calibration constants.
Source: src/gem/catalog/map.py:83
load_neutral_camps
def load_neutral_camps() -> list[dict[str, Any]]
Load each neutral camp's ID, centre and type.
Source: src/gem/catalog/map.py:92
load_neutral_camp_centers
def load_neutral_camp_centers() -> dict[int, tuple[float, float]]
Load neutral camp IDs mapped to world-coordinate centers.
Source: src/gem/catalog/map.py:112
Module gem.catalog.resources
Bundled catalog resource loading.
Source: src/gem/catalog/resources.py
Top-level functions
load_data_text
def load_data_text(name: str) -> str
Load a bundled data file as text.
Source: src/gem/catalog/resources.py:16
load_data_json
def load_data_json(name: str) -> Any
Load a bundled JSON data file.
Source: src/gem/catalog/resources.py:28