Skip to content

icecap.infrastructure.name_resolver

The name resolver module.

Classes:

  • NameResolver

    Resolves names for game entities within the game.

NameResolver

Bases: Protocol

Resolves names for game entities within the game.

This class provides methods to resolve names for different types of game entities such as units, players, and game objects.

resolve_game_object_name_by_display_id

resolve_game_object_name_by_display_id(display_id: int) -> str

Resolve the name of a game object by its display ID.

Note that there is no uniqueness guarantee, as multiple game objects can share the same display ID. The method returns the first matching name found.

resolve_game_object_name_by_entry_id

resolve_game_object_name_by_entry_id(entry_id: int) -> str

Resolve the name of a game object by its entry ID.

resolve_name

resolve_name(entity: Entity) -> str

Resolve the name of an entity based on its type.

For game objects, use resolve_game_object_name_by_entry_id instead.

get_name_resolver

get_name_resolver(
    memory_manager: MemoryManager, data_mapping_filename: str | None = None
) -> NameResolver

Create and return a NameResolver instance.

Parameters:

  • memory_manager

    (MemoryManager) –

    The memory manager to use for reading memory.

  • data_mapping_filename

    (str | None, default: None ) –

    Optional path to a custom data mapping file.

Returns: