Données de jeu
Lire des textes, des enregistrements et des tables, et exécuter du SQL depuis un script
3 archives dans cette catégorie
-
What game data a script can read, which game version and language it comes from, when it's available, and the limits every lookup shares. Messages are full of numbers that stand for something: an item, a monster, a map, a line of text. asterobot:gamedata lets a script look those up in the game data Asterobot extracted from the bot's game version. What a script can read Function What it reads Result text() One game text, by its numeric id or its text key Returned right away record() O
- 112 vues
-
Read game texts, records and tables with text(), record(), table(), find() and search(), what each one returns, and the errors each one can raise. Five functions of asterobot:gamedata cover most of what a script looks up: a text by its id, a record by its key, a whole table, the rows matching some values, and records by their name. import { text, record, table, find, search } from "asterobot:gamedata"; What a row looks like record(), table() and find() return rows as plain objects: The keys
- 83 vues
-
Run read-only SQL on a game version's data with query(), pass parameters, read the result, stay within the limits, and try queries in the SQL tab first. Some questions need a join, a count or a sort that the lookups can't do. query() runs SQL on the bot's game data and hands back the result. Queries are written in SQLite's dialect of SQL, the same one the game version's SQL tab runs. query() query(sql, params, options) resolves to an object with three properties: Property What it holds
- 89 vues