Перейти к основному содержимому

World Options

Some settings are presentation: text speed, battle animations, window skin. A player who changes those changes what their own screen looks like, and nothing else. They stay on the client, where they belong.

Three settings are rules. They change what happens in a battle. In an online world those cannot live on the client, for the ordinary reason: a player who sets their own difficulty to Easy from their own machine is changing the rules the server plays by.

So MCE splits them. Presentation stays local. Rules come from the server.

Which is which​

A census of the sixteen settings in the options screen sorts them into three groups:

GroupCountWhere it lives
Rule3Server, seeded by the operator
Presentation12Client, the player's own choice
Hidden in online1Not shown at all

The three rule settings are difficulty, trainer level and battle style. The hidden one is Auto‑save on teleporting, and it is hidden rather than shown read‑only because in online play the server owns persistence: an auto‑save toggle would be describing a thing that no longer happens.

How the client uses them​

The client fetches the three values once, with mce_world_options_get, on its way into the world.

The important design decision is what it does not do with them: it does not write them into the player's own configuration. That was the first version, and it was wrong. Those configurations are persisted, so a world set to Set would have overwritten the player's Switch preference — and carried it into their offline game, where no server rules anything.

So instead of writing, the engine asks. Each place that consumes a rule calls the reader for it and gets the world's value when there is a world, or the player's own when there is not. The player's preferences survive untouched.

The options screen inside an online session

Estilo: Fijo at the top of that screen is the world's value, not this player's — they may well have Switch saved from their offline game, and it is still there, untouched, waiting for them. Everything below the rules is ordinary local preference: language, volume, animation speed. The server has no opinion about those and never asks for one.

The options screen is wired to show the three as read‑only when the world rules them, so a player can see what difficulty they are on without being able to change it — the middle ground between hiding them (you cannot find out) and leaving them editable (you can cheat).

Verified by driving

Measured on 2026‑08‑29 against a live server seeded to Hard/Set. The game's own log, on the way into the world:

[R-OPCIONES] el mundo dice: dificultad=Hard estilo=Set aLaCaja=False sembrado=True
[R-OPCIONES] el mundo manda: dificultad=Hard estilo=Set aLaCaja=False

Two lines, and the second is the one that matters: the client fetched the rules and handed authority over to them. Both halves of the round trip say the same thing.

What the server does with them​

Difficulty moves the level of trainer rivals — and only trainers, matching what Core does offline:

DifficultyMultiplier
Easy0.8
Normal1.0
Hard1.2

The result is clamped to 1–100. It is applied in buildTrainerParty, which is the single place the server mints a trainer opponent, so there is no second path that could disagree.

Seeding them​

mce_world_options_seed is server‑to‑server only. It rejects any call that carries a user session, and it needs the Nakama runtime http_key — the same credential and the same rules as species seeding, which means it must never be committed or shipped in a build.

The Hub's Online tab is the buyer‑facing path: you set the three values there and it seeds them for you, reading the key from outside the repository.

It rejects what it does not model, by name​

Send a difficulty or a style the engine does not know, and the seed is refused, and the error says which value was wrong.

The tempting alternative was to accept it and fall back to Normal. That is worse than it sounds. The operator would come away believing they had configured a world, the world would silently be something else, and nothing would ever say so. A rule the server cannot model is rejected, never resolved neutrally.

Not seeded is a distinct state​

Storage starts empty, and empty means not seeded — which is deliberately not the same as Normal, even though today both produce a multiplier of 1.0.

They are the same number now. What differs is what happens the day Normal stops being 1.0: one of those worlds should change, and the other should not. A server that collapsed the two would have thrown away the information needed to tell them apart.

Permissions​

The world_options record is stored with permissionRead: 2 and permissionWrite: 0.

Everyone can read the rules they are playing under. Nobody can write them from a client. There is no upload verb — mce_world_options_get only downloads, and that absence is the design, not an omission.