Skip to main content

AchievementList

ClassDataClassSource

AchievementList(
achievements: list[Achievement] = [], steam_appid: int, lang: str = "english"
)

The list of achievements.

Fields​

NameTypeRequired
Description
achievementslist[Achievement]The list of detected achievements.
steam_appidintThe app ID. It specifies the game where the achievements belong.
langstrThe language of the parsed achievments.

Methods​

add_extra_info​

v_1: Self = self.add_extra_info(user_profile: str)

Add extra information to this achievement list.

Requires​

NameTypeRequired
Description
user_profilestrThe profile name used to compensate the current list. This name needs to be strictly configured as the name in the following link: https://steamcommunity.com/id/{name}/

Returns​

NameType
Description
v_1SelfThe updated list. Note that the changes are inplace.

from_app​

v_1: Self = AchievementList.from_app(
app: int | AppQuerySimple,
lang: str = "english",
extra_user_profiles: Sequence[str] | None = None,
)

Detect the achievements from a Steam game.

Requires​

NameTypeRequired
Description
appint | AppQuerySimpleThe steam app ID or the query object. It is used for locating the game achievement page.
langstrThe language used for accessing the achievement profile.
extra_user_profilesSequence[str] | NoneA list of extra Steam user profile names. If provided, will attempt to parse more achievement information from the given profiles. Ideally, a profile with all achievements unlocked and another profile with all achievements locked will yield the full information.

Returns​

NameType
Description
v_1SelfThe achievement list detected from the app.

get_icon_names​

v_1: list[AchievementIconName] = self.get_icon_names()

Get the list of achievement icon names.

Returns​

NameType
Description
v_1list[AchievementIconName]The list of achievement icon names. These names will be used by self.save_icons(...).

save_icons​

v_1: list[AchievementIconName] = self.save_icons(out_dir: str | PathLike[str])

Save the acheivement icons in a folder.

Requires​

NameTypeRequired
Description
out_dirstr | PathLike[str]The path to the directory where the icons will be savd.

Returns​

NameType
Description
v_1list[AchievementIconName]The list of saved achievement icon names. It provides a mapping from an achievement to the saved file name.

Properties​

names​

names: list[str] = self.names

A mapping from all achievement names to their indicies.