Table apps and puzzles
Interactive pages you present to players: bringing them, presenting them, resources, puzzles and menus.
A table app is a small page (HTML, CSS and JavaScript) that whoever runs the game puts in front of the table as a floating window: a puzzle everyone touches at once, a ship console, a vote, a countdown. This guide covers how to bring one in, present it, take it back, and what an app can and cannot do inside.
Where it is
- Table apps opens the Table apps window, for whoever runs the game only. The same list lives in Bring and show, under its Apps tab.
- Puzzles creates ready-made locks, ready to present.
- Apps are written in the creator, opened with New app from the window; puzzles without code are built there too (Puzzle Builder).
- Players need nothing: the app opens by itself as a window when it is presented.
In Escena. In the previous skin apps were presented from the App tab of Show to the table. Now they are presented from this window or from Bring and show.
Presenting an app
- Open Table apps. Under My apps are the ones you saved in the creator.
- Press Present to the table on the app's row. It appears as a floating window for whoever should see it, which can be moved, resized and minimised.
- While it is on the table, the app is listed under On the table with its counter (up to 3 at once). From its row: View opens it for you, Open by hand counts the puzzle as open without it being solved, and «Remove» removes it for everyone.
- Prepare loads an app as a draft without presenting it yet: it stays under "Ready to present" until you present or discard it.
Players see the app window as soon as it is presented. If they close it, it does not open by itself again until it is presented anew; if you take it back, it closes for everyone. Each app reads the house theme, and the viewer always sees that it is GM content and which fields of their sheet it reads.
Context menus
A right-click (or a long press, or Shift + F10) on a row opens its actions:
- App on the table: View, Open by hand and Remove.
- Saved app: Present to the table, Prepare, Edit and removing it from your apps.
- The header of a presented app's window opens the presented-item menu: take back, close for me, to whom, bring to front, pin.
Ready-made puzzles
Puzzles lists the classic locks: runes, digit keypad, rings, lights out, repeat the melody, logic grid, riddle, torchlit slide, three-hands panel and "everything in its place". Press Create and it is added to your apps with a random answer, and the apps window opens so you can present it. There is a cap by plan: if you have reached the apps limit, the table tells you and you must delete one.
A puzzle's answer never travels in the app's code: it is stored on the server and the app only asks whether what was entered is right. How to build your own is in Puzzle Builder.
Creator templates
The creator (Apps and puzzles) starts with templates that work as they are:
| Template | What it is | What to change |
|---|---|---|
| Rune lock | Four spinning runes; the server checks the combination | The four indexes of the answer |
| Table vote | A question, some options, live tally | The question and options, on the first line of the JS |
| Countdown | The clock runs for everyone; only the GM starts and stops it | SEGUNDOS |
| Shared whiteboard | A canvas everyone draws on at once | Nothing |
| Blank | A title and a paragraph to start from almost scratch | Everything |
| Shared counter | A shared number that survives reloads | Each button's step |
| Editable table | Rows of name and value written live | The sample rows |
Resources
The images and sounds an app can load are only those you upload as Resources in the creator, up to 24 per app. Each has a name, which is the key the code asks for it with: roliando.assets.gong or roliando.sonar('gong'). An image from an outside address is blocked without warning.
Talking to the table
Inside your app you have a roliando object. It is the only way to ask Roliando for anything:
// ── WHO AND WHAT IS THERE ──────────────────────────────────────────────────
roliando.yo // { nombre, esMaster } — who is looking
roliando.assets // { nombre: url } of what you have uploaded
roliando.jugadores() // [{ id, nombre, esMaster }] — who is seated RIGHT NOW
roliando.alJugadores(fn) // fn(list) when someone joins or leaves
// ── WHAT GETS SAVED ────────────────────────────────────────────────────────
roliando.estado // what was saved when your app started (or null)
roliando.partida() // what is saved RIGHT NOW (a function, not a value)
roliando.versionPartida() // its version, in case you are debugging
roliando.guardar(datos) // make it survive a reload
roliando.alEstado(fn) // fn(state, who) when the game changes
roliando.alAviso(fn) // fn(reason) if something could NOT be saved
// ── TALKING LIVE ───────────────────────────────────────────────────────────
roliando.enviar(datos) // send it to the others, now (ephemeral)
roliando.alRecibir(fn) // fn(data, who) — the other half of `enviar`
// ── PUZZLES ────────────────────────────────────────────────────────────────
await roliando.comprobar(intento) // → { ok, intentos, agotado }
await roliando.miParte() // → { hay, master, mia, partes } — your piece of the split
roliando.alAbrir(fn) // the GM opened it by hand: the puzzle is over
roliando.progreso() // who is where (null if you are not running it)
roliando.alProgreso(fn) // fn(list) when it changes (only if you are running it)
// ── OUTWARD ────────────────────────────────────────────────────────────────
roliando.resuelto('has opened the lock.') // to the campaign chat
roliando.sonar('gong') // through each person's volume
await roliando.tirar('2d6+3', { etiqueta: 'Attack' }) // real 3D dice → { ok, total, dados }roliando.partida() and roliando.progreso() are functions and not values because a value would have to travel inside the document, and changing the document reloads the frame and restarts your app. This caused a real loop in production.
The English names
Everything on roliando also has an English name that does exactly the same thing. The Spanish names still work (no existing app breaks) and you can mix them, but one language per app is the usual choice.
| Spanish | English | Spanish | English |
|---|---|---|---|
roliando.yo | roliando.me | roliando.enviar(datos) | roliando.send(data) |
roliando.estado | roliando.state | roliando.alRecibir(fn) | roliando.onReceive(fn) |
roliando.partida() | roliando.game() | roliando.guardar(datos) | roliando.save(data) |
roliando.versionPartida() | roliando.gameVersion() | roliando.alEstado(fn) | roliando.onState(fn) |
roliando.jugadores() | roliando.players() | roliando.alJugadores(fn) | roliando.onPlayers(fn) |
roliando.alAviso(fn) | roliando.onNotice(fn) | roliando.comprobar(intento) | roliando.check(attempt) |
roliando.miParte() | roliando.myPart() | roliando.alAbrir(fn) | roliando.onOpen(fn) |
roliando.progreso() | roliando.progress() | roliando.alProgreso(fn) | roliando.onProgress(fn) |
roliando.miFicha() | roliando.mySheet() | roliando.mesa() | roliando.table() |
roliando.pedir(accion) | roliando.request(action) | roliando.datos(fuente, consulta) | roliando.data(source, query) |
roliando.red(url) | roliando.net(url) | roliando.resuelto(texto) | roliando.solved(text) |
roliando.sonar(nombre) | roliando.play(name) | roliando.tirar(formula) | roliando.roll(formula) |
roliando.assets and roliando.version do not change. Inside roliando.yo (or roliando.me) you have nombre and esMaster, and also name and isMaster. The options of tirar/roll accept etiqueta/label, quien/who, tipoDano/damageType and secreta/secret. The editor's Help tab and the autocomplete list both names.
The sheet of whoever is looking
An app can read a few numbers from the sheet of whoever has it in front of them, and only those it declares beforehand:
// In the app, next to the HTML/CSS/JS: which fields you need.
ficha: ['fuerza', 'pg']const f = await roliando.miFicha();
// → { hay: true, nombre: 'Kira', campos: { fuerza: 14, pg: 22 }, faltan: [] }
if (f.hay) pintar(f.nombre, f.campos.fuerza);Four rules, enforced by the engine:
- Only your own. Each browser answers with its own; there is no way to ask for someone else's.
- Only what is declared. What is not in
fichadoes not arrive, and what is declared is shown in the window before anyone touches it. - No free text. Only numbers. No background, notes, story, contacts or inventory, since that is what someone might be keeping from their own table.
- It never writes. An app does not touch anyone's sheet.
What this does not prevent, and it's worth knowing. The box stops your app from sending anything to the internet, but not from telling the table. If your app reads everyone's Strength and shows it with
enviar(), everyone sees it. That's normal in a tabletop game, but it's your call.
If you build it in Creations, tell it which system it's for. There is no table in front of you there, so the Sheet tab asks you to choose between your systems and D&D (or none, if you'd rather fill it in by hand). This doesn't lock it: the app can be presented at any table, and it warns you if its fields belong to another system.
Don't memorize the keys. In the big editor there is a Sheet tab: it shows you the numeric fields of your table's system with their key and label. Pick them with a click and it writes the code for you. The Test with my sheet button shows what miFicha() would return right now, using the real function.
The same app at another table
fuerza and pg are the fields of one system. The same app at a table playing something else does not find them, so the response comes with faltan listing what it couldn't provide:
const f = await roliando.miFicha();
if (f.faltan.length) pedirlosAMano(f.faltan); // and the app keeps workingWhen the app is presented, anyone missing a number gets a strip inside the window ("this app needs some numbers your sheet can't give it") to enter them once. They arrive the same way as the values read from the sheet and take precedence over them, so the app can't tell the difference. This lets you build minigames whose numbers are not on any sheet, such as the Strength of the beast a party rides, which belongs to nobody.
Also save which system you wrote it for (sistema), so it warns you before you present it at a different table instead of breaking in front of everyone.
Reading the table and asking it for things
An app can look at a part of the table if it declares it, and ask for a specific action if it declares that too. In both cases what the viewer can see rules: a player never receives anything the GM keeps hidden.
// The app declares: lee: ['combate', 'puertas'], puede: ['abrir_puerta:door-id']
const mesa = await roliando.mesa(); // { hay, lee, combate, puertas }
if (mesa.combate.activo) pintarRonda(mesa.combate.ronda);
const r = await roliando.pedir({ tipo: 'abrir_puerta', muro: 'door-id' });
if (!r.ok) console.log(r.motivo); // 'no_declarada', 'solo_master', 'demasiado_rapido'lee accepts escena, combate, puertas, luces, zonas, jugadores and tokens (the tokens in view, with their conditions, tags, elevation, owner and side; an NPC's health and defence are only visible to the GM). puede accepts mensaje, abrir_puerta, cerrar_puerta, cerrar_con_llave, luz, oscuridad, siguiente_turno and texto_flotante, with or without an id (abrir_puerta:ID only works for that door). The app does not touch the world: it hands over the action and the GM's table runs it with the GM's permissions, one every 800 ms.
Own data and external network
Two more doors, both declared in the app manifest and both read-only.
roliando.datos(source, query) reads Roliando data without going online. Declare the sources in datos: sistema (sections of the campaign system), tablas (roll tables; tirar: true rolls one), bases (CSV or JSON tables the GM uploads to the campaign), mundo (the table snapshot), directorio, biblioteca, wiki and fichas. What arrives is already filtered by role: a player never gets what the GM marked as GM-only.
| Source | What it returns | What a player sees |
|---|---|---|
directorio | The table index: tipo, nombre, sub, carpeta, etiquetas, nivel. Not the content of each item. | Their own sheets, visible notes and the system's tables. No NPCs, items or hidden notes. |
biblioteca | The campaign's items and tables. | Only the system's tables. Items belong to the GM. |
wiki | The World entries: titulo, tipo, carpeta, etiquetas and texto (up to 2,000 characters). | What their team can see. The GM's hidden entries and "GM only" passages never arrive. The GM's own app doesn't get those passages either. |
fichas | One row per sheet with campos (only those you declare in ficha, numbers only), faltan and mia. | Their own and, if the GM turned on "Players can see each other's sheets", their companions' sheets that are not drafts. |
fichas follows the same rules as miFicha(): with no ficha in the manifest nothing comes out, free text (background, notes, contacts) never comes out even if you declare it, and the app never writes. One thing to keep in mind: whatever an app receives it can tell the table with enviar(), so declare only what you really need.
// Declare: datos: ['bases']
const r = await roliando.datos('bases', { nombre: 'armas', where: { nivel: { gte: 3 } }, orden: '-nivel', limite: 10 });
if (r.ok) draw(r.filas); // r.total is how many there were in allThe query accepts where (equality or gt, gte, lt, lte, ne, in, contiene, empieza), orden, limite (200 at most), desde and campos. There is no query language and no code: only comparisons.
roliando.red(url, options) asks for an internet address through Roliando's server; the app still has no network of its own. Two things are needed: declare the domain in red, and have the GM approve it in the app's Network screen. https only, GET or POST, JSON or text responses up to 256 KB and 8 seconds, redirects are not followed, 30 per minute per person.
// Declare: red: ['api.example.com']
const r = await roliando.red('https://api.example.com/v1/weather?city=Vigo', {
cabeceras: { Authorization: 'Bearer {{secreto:WEATHER_KEY}}' },
cache: 30,
});
if (r.ok) draw(r.json); else console.log(r.motivo); // 'dominio_no_permitido', 'ritmo', 'tiempo_agotado'...Keys never go in the app code (anyone playing can read it): the GM stores them under a name in the Network screen and you write {{secreto:NAME}} in a header. The server substitutes it on the way out and, if the third party echoes the key back, blanks it before returning the response. There is no direct database connection, only HTTP APIs.
Who can spend the keys. Only their owner: the campaign GM (or, for a system, whoever created it). The database checks it against the caller's session, not the app or the browser, so a player who calls the server by hand with {{secreto:...}} gets secreto_solo_dueno and the key never leaves. When a player's app asks for network access with keys, the player's browser does not call the server: it sends the request over the app's channel to the GM's browser, which runs it with the GM's session and returns the response only to the app that asked (rate-limited, and only to domains the app declares and the GM approved, with their paths). If the GM is not connected, the app gets master_ausente ("the GM is not at the table"). Requests without keys to approved domains and paths are made directly by each member (public APIs), within their quota. Scripts of a published system follow the same rule: no keys unless their creator runs them.
Names that point inside. Before going out, the server resolves the domain and rejects the request (host_privado) if any address is private, local, metadata, CGNAT or multicast, even if the name looks public (such as 127.0.0.1.nip.io).
Uploaded databases. Each person can have up to 50. If a campaign database is "GM only", whoever uploaded it stops reading it once they are no longer that campaign's GM.
In D&D the keys are fixed
A D&D sheet has no fields that anyone sets, so the vocabulary is always the same:
| What | Keys |
|---|---|
| Ability scores | str dex con int wis cha, plus their modifier, str_mod… |
| Skills | athletics, animal_handling, sleight_of_hand, stealth… (with underscore) |
| Derived | ac hp hp_max initiative speed level prof passive_perception |
They come out effective: if you wear a Belt of Giant Strength, str is the belt's value, not the one on the sheet. The editor's Sheet tab lists them just like those of a System Builder system.
One thing worth knowing: in D&D those numbers are read from a copy your sheet saves when it opens (the same one combat uses for AC and saving throws). If the owner hasn't opened the sheet for three levels, that copy is stale. If a number looks wrong, ask them to open their sheet once.
What still can't be reached
Anyone's free text, and writing to any sheet. There is no way to do it. Another player's sheet only arrives through roliando.datos('fichas'), with its declared numbers, and only if the GM turned on "Players can see each other's sheets" (or you are the GM).
Making everyone see the same thing
enviar and alRecibir are two halves of the same thing. If an app only sends, everyone sees their own version:
// When turning a rune: let the others see it turn
roliando.enviar({ giros: giros });
// And the other way around
roliando.alRecibir(function (datos) {
if (datos.giros) { giros = datos.giros; pintar(); }
});enviar is fast and ephemeral, for live interaction. Anything that must survive an F5 goes in guardar, which persists but is less frequent. Usually you call both.
The two faces of an app
The same code receives roliando.yo.esMaster, so players can see the lock while you see the board:
if (roliando.yo.esMaster) {
roliando.alProgreso(function (lista) {
// [{ nombre: 'Cerbrick', intentos: 3, resuelto: false }, ...]
pintarTablero(lista);
});
}What does not exist inside the box
The code runs in each player's browser, inside an isolated box: it cannot see their session or their data and sends nothing out on its own. So:
| Does not exist | What happens | Instead |
|---|---|---|
localStorage, sessionStorage | They throw an error | A variable; roliando.guardar() for what must last |
alert, confirm, prompt | Blocked | Draw the message on the page |
fetch, XMLHttpRequest | No direct network | roliando.enviar() for the table or roliando.red() for the internet |
window.open | Blocked | Nothing |
import, require | No modules | Paste what you need |
Sound works, but the browser does not let anything play until someone touches the window: create or resume the AudioContext inside a click, or call roliando.sonar() from one.
Limits
- Three apps at once per table.
- 72,000 characters across HTML, CSS and JS (24,000, 20,000 and 26,000), and up to 24 resources of 8 MB. The whole document travels to the table when presented, hence the cap.
- A tenth or two of a second round trip: fine for puzzles, dials and reveals; not for anything that depends on reflexes.
- In broadcast mode the app shows, but as a still picture: nobody can touch it (see Broadcast for OBS).
Common problems
"Nothing shows." A syntax error leaves the app mute: the HTML is drawn and nothing else happens. Check the error counter and the console of the creator's preview.
"The image does not load." Upload it as a resource: an external address is blocked without warning.
"It says no even when I get it right." The puzzle's answer is missing: without it, comprobar says no to everything.
"Everyone sees something different." You are sending with roliando.enviar but not listening with roliando.alRecibir.
"There is no sound." The browser does not let anything play until someone touches the window.
"I cannot create another app." You have reached your plan's cap: delete one of your apps.