convert_steamid.RdConverts between Steam ID64, Steam2, Steam3 and vanity IDs. Based on the SteamID library by xPaw.
convert_steamid simply converts a vector of Steam IDs while
lookup_steamid compiles all types of Steam IDs for all input
IDs.
lookup_steamid(ids, include_vanity = TRUE, vanity_type = "profile")
convert_steamid(ids, to, vanity_type = "profile")
parse_steam64(ids, resolve = FALSE)
parse_steam2(ids, resolve = FALSE)
parse_steam3(ids, resolve = FALSE)String of a Steam ID. Can be ID64, Steam2, Steam3, or a vanity ID. The format is automatically detected. If not format can be identified, assumes vanity.
Whether to include vanity IDs in the output of
lookup_steamid. Useful to prevent Web API lookups.
Type of profile identified by the vanity ID. Passed to
resolve_vanity. Ignored if ids does not contain
vanity IDs.
Steam ID format to convert to. Must be one of steam64,
steam2, steam3, or vanity. Conversions from or to
vanity require a Steam API key to be set.
If TRUE, resolves the codes parsed by the
parse_* functions to descriptive factors.
Steam knows four types of IDs (excluding invite codes):
ID64 is largely used by the Steam Web API and storefront API. It is a 64-bit representation of a profile that can also be used in steamcommunity URLs.
Steam2 is a textual representation of a profile that consists of descriptive components: the universe, authentication server, and account number.
Steam3 is a newer textual format that is used by many games. It consists of account type, universe, account number, and account instance.
Vanity IDs are the self-chosen account names of an individual or group. They can be found in steamcommunity URLs. To resolve or convert them, access to Steam's Web API is required.
Each Steam ID explicitly or implicitly consists of several components:
The authentication server (0 or 1)
The account number
The account instance (number between 0 and 4)
The account type (number between 0 and 10)
The universe (number between 0 and 5)
The parse_* functions are able to parse the individual components of
Steam64, Steam2, and Steam3 IDs. The meaning of each number is finely
documented in the source code of the
https://github.com/xPaw/SteamID.php/blob/master/SteamID.php
This function is not perfect, but should suffice for most use cases. Special cases and older profiles sometimes return the wrong account number or universe.
A Steam ID consists of five components. The auth server (auth) can be
either 0 or 1. The account number (number) is a unique identifier for the
account.
Instance values correspond to the following meanings:
| Instance | Description |
| 0 | All instances |
| 1 | Desktop instance |
| 2 | Console instance |
| 4 | Web instance |
Types values correspond to the following meanings:
| Type | Description |
| 0 | Invalid |
| 1 | Individual |
| 2 | Multiseat |
| 3 | Game server |
| 4 | Anonymous game server |
| 5 | Pending |
| 6 | Content server |
| 7 | Clan |
| 8 | Chat |
| 9 | P2P super seeder |
| 10 | Anonymous user |
Universe values correspond to the following meanings:
| Universe | Description |
| 0 | Invalid |
| 1 | Public |
| 2 | Beta |
| 3 | Internal |
| 4 | Dev |
if (FALSE) { # \dontrun{
convert_steamid("vgenkin", "steam64") |>
convert_steamid("steam2") |>
convert_steamid("steam3") |>
convert_steamid("vanity")
lookup_steamid("vgenkin")
} # }