Skip to content

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

python
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

python
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

python
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

python
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

python
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

python
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

python
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

python
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

python
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

python
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

python
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.

Source: src/gem/catalog/map.py

Top-level functions

load_camp_zones

python
def load_camp_zones() -> dict[str, Any]

Load calibrated neutral-camp zone geometry.

Source: src/gem/catalog/map.py:13

load_map_constants

python
def load_map_constants() -> dict[str, Any]

Load static map calibration constants.

Source: src/gem/catalog/map.py:22

load_neutral_camps

python
def load_neutral_camps() -> list[dict[str, Any]]

Load static neutral-camp center data.

Source: src/gem/catalog/map.py:31

load_neutral_camp_centers

python
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:40

Module gem.catalog.resources

Bundled catalog resource loading.

Source: src/gem/catalog/resources.py

Top-level functions

load_data_text

python
def load_data_text(name: str) -> str

Load a bundled data file as text.

Source: src/gem/catalog/resources.py:16

load_data_json

python
def load_data_json(name: str) -> Any

Load a bundled JSON data file.

Source: src/gem/catalog/resources.py:28