api you get is built for whatever game you’re currently in, so some parts of it change from game to game. There are two kinds of namespace.
Shared vs game-specific
Shared namespaces are there in every game:
Game-specific namespaces only show up in some games:
api.feature groups per-feature namespaces. The table itself exists in every game; a sub-namespace is only there where its feature is, so check before using it: if api.feature.autoloot then ... end.
Universal mode
In a game Limerence has no built-in support for, it loads universal mode and api.getGame() returns"universal". You still get api.ui, api.utility, api.bind, api.client, api.players, and api.legitbot, plus api.universal for teaching universal mode where that game keeps characters, health, teams, and weapons.
Reading the docs
The call tables in theapi.* pages are split by game so you can tell at a glance where something works:
- All: works in every game (as long as that namespace exists in your game).
- Bloxstrike: only when you’re in Bloxstrike.
- Rivals: only when you’re in Rivals.
- AR2: only when you’re in Apocalypse Rising 2.
Writing scripts that work in any game
api.client and api.players share the same core, and then each game piles its own extras on top (for example, Rivals adds api.client.getEnvironmentId(), isInDuel(), and getDisplayElo()). If something is game-specific, it just isn’t there in other games. It won’t error, so check that a call exists before you use it, or branch on api.getGame():