Playing on Nulls Royale¶
Nulls Royale is a fan-run server for Clash Royale. With RoyaleBot, a bot you made with RoyaleGym plays real matches there, card by card. Two steps: train on the version Nulls runs, then play.
1. Train on the Nulls version¶
Nulls Royale runs game version 15.535. RoyaleGym plays today's version by default, and a few
cards and rules differ between the two. To train on the rules your bot will meet on Nulls, pass
client="15.535.29":
from royalegym import make_env
for client in (None, "15.535.29"):
env = make_env(client=client)
fire_spirits = next(card for card in env.engine.cards() if card.name == "FireSpirits")
print(client or "today", fire_spirits.hitpoints)
That one setting switches both the card values and the game mechanics to version 15.535's. It
needs royalegym 0.1.24 or newer: pip install --upgrade "royalegym[all]".
In your quickstart.py
In build_env, change RustEngine() to
RustEngine(calibration_overrides=client_overrides("15.535.29")), and add
from royalegym.rust_engine import client_overrides to the imports at the top of
build_env. It changes the battles, so it needs a new bot: change save_dir to a new name
too.
How close is it? We checked this setup against 750 short test scenes recorded on version 15.535. The engine put 99.6% of units within a quarter tile of where the game had them and got 99.9% of hitpoints exactly right, and 684 scenes matched on every tick (RoyaleSim 0.1.32, and the same scores on every release since, up to 0.1.42). These are short scenes, not whole battles: over a whole battle, small differences add up. Nulls can also change cards in its own updates.
2. Play it with RoyaleBot¶
- Download the Nulls Royale app (the
.apkfile) yourself from Nulls' page. RoyaleBot supports Nulls Royale 15.535.13, the version that page has now. - Follow RoyaleBot's setup. It
prepares your copy of the app, then
royalebot-play --bot <your bot's folder>plays your bot in your matches.
Put AI or Bot in your in-game name, so the people you play know.