> ## Documentation Index
> Fetch the complete documentation index at: https://ej3mplo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cheats and maps

> ejg.trainer and ejg.maps: each game's FLiNG trainers and Map Genie maps.

ejGames brings two tools per game, used mostly **during play**, from the overlay:

* **Cheats**: the game's trainer from [FLiNG](https://flingtrainer.com). ejGames
  opens it when you play (without administrator permission and with the window
  hidden), presses its keys from the overlay, and closes it with the game.
* **Map**: the game's interactive map from [Map Genie](https://mapgenie.io), with
  its points of interest. In the overlay it can be pinned in a corner, over the game.

On your theme's game page, **two buttons** that open the host's windows are
enough. Searching for and installing a trainer always goes through the host,
which shows where it comes from, how big it is and its warnings, and asks for
confirmation. No theme can install anything.

```js theme={null}
h("button", { onclick: () => ejg.trainer.open(game.id) }, "Trucos");
h("button", { onclick: () => ejg.maps.open(game.id) }, "Mapa");
```

The six built-in platform themes put them next to the guides: links in the game
bar (Steam), cards (PS5), hub buttons (Xbox), game options (Switch), round
buttons (Cinema) and `* CHEATS` / `# MAP` (Retro).

## Showing the state

If you want to say more than "Cheats", ask for the summary:

```js theme={null}
const t = await ejg.trainer.info(gameId);
// null (no trainer) or { name, title, options, gameVersion, autoStart, present, anticheat }

const m = await ejg.maps.info(gameId);
// { game: { name: "Elden Ring", maps: ["The Lands Between", "The Shadow Realm"] } | null, none }
```

| Field | What it is |
| - | - |
| `options` | how many options the trainer has |
| `gameVersion` | game versions it covers, according to FLiNG (`"v1.02-v1.16.*+"`) |
| `autoStart` | it opens on its own when you play |
| `present` | the `.exe` is still in place (an antivirus may have removed it) |
| `anticheat` | the game has anti-cheat (`"EasyAntiCheat"`, `"BattlEye"`…): offline only |
| `m.game` | `null` if ejGames did not find the game on Map Genie (it is chosen by hand in the host window) |
| `m.none` | the user said the game has no map |

```js theme={null}
const t = await ejg.trainer.info(game.id);
button.textContent = t ? `Trucos · ${t.options}` : "Buscar trucos";
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.