The validator and its codes
What greengames validar checks and in what order, the shape of a problem, and the full list of GB codes with their level, message and how to resolve each one.
DescribesFormato 1, API 1 For those who write code This page is generated from the SDK sources.
On this page
What it checks and in what order#
It checks, in this order: that the files exist and are JSON; that the script can be bundled; the script's types with TypeScript (it only knows standard JavaScript and the API: fetch or setTimeout are type errors); the schemas; and the rules of the format. Each problem is an object:
interface Problema {
nivel: 'error' | 'aviso'; // an error blocks packaging and testing
codigo: string; // stable: GB001, GB210...
archivo: string; // 'juego.json', 'escenas/principal.json', 'scripts/principal.ts', 'pruebas/bot.json'
ruta: string; // inside the file: 'piezas[3].tamano' or 'linea 40, columna 16'
mensaje: string;
sugerencia?: string; // how to fix it
}--json writes { "<slug>": { "valido": boolean, "errores": Problema[], "avisos": Problema[] } }.
Script problems carry the file and line of the source code (scripts/principal.ts, linea 48), not of the bundled script. A schema error in a scene does not produce false errors about missing pieces or zones. With --idioma en (or validarPaquete(paquete, { idioma: 'en' })) the message and the suggestion come out in English; codigo, archivo, ruta and nivel do not change.
The messages below are the English ones, as printed with --idioma en; without that flag the tool prints them in Spanish.
Code groups#
| Group | Codes | What they check |
|---|---|---|
| Reading | GB001 to GB003 | malformed JSON, a missing file, an id different from the directory |
| Manifest | GB101 to GB122 | schema, difficulties, tables, initial scene, cover, the same texts in both languages; maximum number of players and multiplayer modes |
| Scenes | GB200 to GB248 | schema, repeated ids, colors, spheres and cylinders, movement, spawn points with no ground; aire reserved, colors, blocks and biomes that do not exist or are repeated, a table with no land biomes, structures; pieces with the lamina shape and tile maps |
| Script | GB300 to GB330 | imports that are not allowed, syntax errors, size, empty script; uses something that does not exist in the room (network, DOM, timers, eval, async); warnings for Date and Math.random; warnings: never calls terminar, does not register alIniciar; text keys, pieces, zones, spawn points or tables that do not exist; TypeScript type errors |
| Bot script | GB400 to GB419 | schema, destinations that do not exist, incomplete conditions |
| Package | GB501 to GB521 | format, number of scenes, resources, sizes |
| Sprites | GB600 to GB606 | each sprite's schema, frame sizes, palette colors, animations and the number of sprites |
| Models, textures and sounds | GB700 to GB742 | container, external addresses (GB703), unsupported extensions (GB704), free data (GB705), unsupported parts (GB706), triangles (GB707), bones (GB708), nodes and parts (GB709), textures (GB710, GB711), clips (GB712, GB713), box (GB714), collision (GB715); Number and size of models, textures and sounds; total of binaries (GB723); model triangles per scene (GB730), pieces that name a model, clip or texture that does not exist; format, asset that does not exist, assets without credit (warning); the format of each model (.glb), its collision settings, the game’s textures and sounds, their budgets, pieces with shape modelo and the credits |
Reading#
| Code | Level | What it means | How to resolve it |
|---|---|---|---|
| GB001 | error | the file is not valid JSON: {msg} | Open the file at the line and column given in ruta. Check for extra or missing commas, double quotes on every key, and no comments. |
| GB002 | error | the file does not existthe script path leaves the game directory | Create the file named in archivo. A game needs juego.json, escenas/, scripts/, recursos/ and pruebas/; the script is the one at the path given by "script" in juego.json, and that path cannot leave the game directory. |
| GB003 | error | the id "{id}" does not match the directory name ("…") | Set "id" to the directory name, or rename the directory to match the id. |
Manifest#
| Code | Level | What it means | How to resolve it |
|---|---|---|---|
| GB101 | error | The file does not match its schema (juego.json). The message is one of those under Schema errors. | Fix the property given in ruta in juego.json. See Manifest. |
| GB110 | error | "min" ({min}) cannot be greater than "max" ({max}) | In jugadores, make min less than or equal to max. |
| GB111 | error | the difficulty "{id}" is repeated | Give each difficulty a different id. |
| GB112 | error | "{dificultadInicial}" is not in "dificultades" | Set dificultadInicial to the id of one of the dificultades, or remove that key if the game declares no difficulties. |
| GB113 | warning (aviso) | the game declares {dificultades} difficulty(ies); the catalog asks for three | Declare three difficulties, for example facil, normal and dificil. It is a warning: the game still packages. |
| GB114 | error | the score table "{id}" is repeated | Give each table in puntajes a different id. |
| GB115 | warning (aviso) | the game declares no score table; the catalog asks every game to have a score | Add a table to puntajes, for example { "id": "puntos", "nombre": {...}, "orden": "mayor", "formato": "numero" }. |
| GB116 | error | the scene "{escenaInicial}" does not exist | Create escenas/<escenaInicial>.json or fix the name in escenaInicial. |
| GB117 | error | the resource "{portada}" does not exist | Put the image at the path given in portada, inside the game directory, or fix the path. |
| GB118 | error | missing key "…" (it exists in "es")missing key "…" (it exists in "en") | Add the missing key: textos.es and textos.en must have the same keys. |
| GB119 | error | variables differ between languages: es uses {…} and en uses {…} | Use the same variables in braces in the Spanish and the English text of that key. |
| GB120 | warning (aviso) | the catalog asks the game to work with keyboard, touch and gamepad | Set teclado, tactil and mando to true in controles and test the game with each one: the player already maps all three to the same actions. |
| GB121 | error | the maximum number of players is 16 | Lower jugadores.max to the maximum given in the message. See Current limits. |
| GB122 | error | A multijugador mode asks for more players than jugadores.max.the game allows {max} player(s) ("jugadores.max") and the local mode asks for {max}the game allows {max} player(s) ("jugadores.max") and the en linea mode asks for {max} | Raise jugadores.max or lower the max of the mode named in ruta (multijugador.local.max or multijugador.enLinea.max). See Manifest. |
Scenes#
| Code | Level | What it means | How to resolve it |
|---|---|---|---|
| GB200 | error | The file does not match its schema (escenas/<id>.json). The message is one of those under Schema errors. | Fix the property given in ruta in that scene. See Scenes. |
| GB201 | error | the id "{id}" does not match the file name ("{clave}") | Set "id" to the scene's file name, without .json. |
| GB202 | error | the difficulty "…" does not exist in juego.json | In the dificultades list given in ruta, use only ids declared in dificultades of juego.json. |
| GB203 | error | "desde" must be less than "hasta" | In ambiente.niebla, make desde less than hasta. |
| GB204 | error | the id "{id}" is already used by piezas[…] | Give each piece an id that is unique in the scene. For several pieces of the same kind, use a shared tag and drop the id. |
| GB205 | error | there are {dinamicas} dynamic pieces and the maximum is 150 | Keep as "fija" everything that does not need to move with physics. |
| GB206 | error | the spawn point "{id}" is repeated | Give each spawn point a different id. |
| GB207 | warning (aviso) | there is no solid piece under the spawn point "{id}" […]: the player would fall into the void | Put the spawn point on a platform: its posicion is where the feet go. |
| GB208 | error | the zone "{id}" is repeated | Give each zone a different id. |
| GB210 | error | the color "{color}" is not in the palette | Use a palette color (the problem's suggestion proposes the closest one) or add your own in the scene's paleta. |
| GB211 | error | a sphere needs three equal sizes, but has […]a spherical zone needs three equal sizes | Make the three values of tamano equal: it is the diameter. |
| GB212 | error | a cylinder needs equal width and length (the diameter), but has […]a cylindrical zone needs equal width and length | Make the width and the length of tamano equal (the diameter). The cylinder's axis is Y; to lay it down use rotacion. |
| GB213 | error | "movimiento" does not work with "dinamica" physics: that piece is moved by physics | Remove movimiento, or change fisica to "fija" (or to "ninguna" if it is scenery). |
| GB214 | warning (aviso) | "solida": false is not needed on a piece with "ninguna" physics (it is already scenery without collision) | Remove "solida": false: a piece with "ninguna" physics already has no collision. |
| GB220 | error | a piece with shape "lamina" must say which one: "lamina" is missing | Add "lamina": "<id>" to the piece, with the id of a sprite in laminas/ (the suggestion lists the ones there are). If there are none, create laminas/<id>.json. See Scenes. |
| GB221 | error | the sprite "{lamina}" does not exist | Fix the id (the suggestion proposes the closest one or lists the sprites of the game) or create laminas/<id>.json. A tile that names a sprite that does not exist raises it too. |
| GB222 | error | the sprite "{lamina}" has no animation "{animacion}"the sprite "{lamina}" has {cuadros} frame(s) and frame {animacion} was requested | Use an animation the sprite declares in animaciones (the suggestion lists them) or a frame number that exists: frames are counted from 0. On a tile, fix cuadro. |
| GB223 | warning (aviso) | a sprite with "dinamica" physics collides as a box of its own size | It does not prevent packaging. If the sprite is scenery, use "fisica": "ninguna"; if physics really must move it, keep in mind that it collides as a box of its size. |
| GB224 | warning (aviso) | "lamina" is only used with "forma": "lamina" (this piece is "{forma}") | It does not prevent packaging. Remove "lamina" from the piece, or change its "forma" to "lamina" if you wanted a flat image. |
| GB230 | error | more than one map has the id "{id}" | Give every map in the scene a different id. |
| GB231 | error | the row uses the tile "…", which is not in the map's "baldosas" | Declare that character in the baldosas of the map or change it in the row given by ruta. Empty cells are written with . or with a space. |
| GB232 | error | the tile "…" does not say how it is drawn | Add "material" (a color) or "lamina" (the id of a sprite) to the tile. |
| GB234 | error | the collision "{col}" only exists in vertical maps ("plano": "xy")the collision "suelo" only exists in ground maps ("plano": "xz") | Use a collision that exists in that kind of map. In a ground map ("plano": "xz"): solida, suelo, peligro or ninguna. In a vertical one ("plano": "xy"): solida, plataforma, peligro, escalera or ninguna. See Scenes. |
| GB235 | error | the maps of the scene add up to {celdas} tiles and the maximum is 200000 | Split the world into several scenes or leave empty what is not seen. See Current limits. |
| GB236 | warning (aviso) | "paralaje" only applies to background layers"paralaje" only applies to vertical maps ("plano": "xy") | It does not prevent packaging. paralaje only acts on background layers of vertical maps: add "fondo": true to the layer (background layers do not collide) or remove paralaje. |
| GB240 | error | the block id "aire" is reserved for empty space | Use another id for that block. aire is empty space: you write it without declaring it. |
| GB241 | error | the color "…" of block "{id}" is not in the palette and is not a "#rrggbb" color | Use a palette name, one from the paleta of the scene or a "#rrggbb" color. The suggestion proposes the closest one. |
| GB242 | error | the block "{id}" is not in "bloques" of the terrain | Declare that block in the bloques of the terrain or fix the id where ruta points. The suggestion lists the declared ones. |
| GB243 | error | the biome "{id}" is repeatedthe structure "{id}" is repeated | Give every biome and every structure a different id. |
| GB244 | error | the biome table has no land biome | Leave at least one biome without zona (or with "zona": "tierra"): that is where players spawn. |
| GB245 | error | the biome "{b}" is not in the biome table | In the biomas of the structure use only ids from the biome table. The suggestion lists the declared ones. |
| GB246 | warning (aviso) | the block "{id}" has the shape "cruz": a cross is never solidthe block "{agua}" fills the sea but is not a liquid | It is a warning. Remove solido from a block with the cruz shape (or use the cubo shape), and add "liquido": true to the block that fills the sea so players can swim in it. |
| GB247 | error | "alto" goes from lowest to highest, but it says […] | Write the alto of the tree from lowest to highest: [minimum, maximum]. |
| GB248 | error | the row uses "…", which is not in "leyenda" of the structure | Declare that character in the leyenda of the structure or change it in the row given by ruta. . touches nothing and _ leaves air. |
Script#
| Code | Level | What it means | How to resolve it |
|---|---|---|---|
| GB300 | error | The script could not be bundled. Besides the messages below, it can carry the syntax or import error the tool found while bundling.a TypeScript script must be bundled before it can runthe script imports other files or uses export | Fix the line given in ruta. A script may only import @greengames/sdk and relative files of the game itself. If the script is TypeScript, bundle it with greengames empaquetar. |
| GB301 | error | the bundled script weighs … KB and the maximum is 512 KB | Move large data to the scenes (pieces, datos) and keep only the logic in the script. |
| GB302 | error | the script is emptythe package has no script | Write the script: at the very least register juego.alIniciar(() => { ... }) and call juego.terminar(...) when the match ends. |
| GB310 | error | the script uses {nombre} (`…`), which does not exist inside the room | Replace that use with the matching service. See the table below. |
| GB311 | warning (aviso) | the script uses {nombre} (`…`) | It is a warning: it works, but you should change it. See the table below. |
| GB312 | warning (aviso) | the script never calls `juego.terminar(...)`: the match would have no ending | Call juego.terminar({ resultado, puntaje }) when the match ends; resultado is 'victoria', 'derrota' or 'fin'. |
| GB313 | warning (aviso) | the script does not register `juego.alIniciar(...)` | Register the game's events inside juego.alIniciar(...): it runs once the scene and the players are ready. |
| GB320 | error | the text "{clave}" is not in "textos" of juego.json | Add the key to textos.es and textos.en in juego.json, or fix the name in the script. |
| GB321 | error | the script names {que} "{id}", which is not in any scene | Fix the id in the script or add that piece, zone or spawn point to a scene. |
| GB322 | warning (aviso) | the script names {que} "{id}", which is not in any scene | Fix the id or add the piece to a scene. If the script creates it with mundo.crear, ignore the warning. |
| GB323 | error | the score table "…" is not declared in "puntajes" of juego.json | Declare the table in puntajes of juego.json or use the id of one that already exists. |
| GB330 | error | A TypeScript type error in the script: the number and the message are TypeScript's.TS{code}: {mensaje} | Fix the type at the line given in ruta. If the error is about a name that does not exist (console, setTimeout, localStorage, fetch), use the API service that replaces it. |
What GB310 and GB311 detect#
The validator looks for these uses in the script. Those at error level give GB310; those at warning level, GB311.
| What the script uses | Level | What to use instead |
|---|---|---|
| fetch | error | Games have no network. Package the data in the scene or in the pieces' datos. |
networking (XMLHttpRequest, WebSocket, EventSource...) | error | Games have no network. |
importScripts or require | error | Import other files from scripts/ with a relative import; packaging bundles them into one. |
dynamic import() | error | Use a static import at the top of the file. |
the DOM (document, window, navigator, location, history) | error | There is no page inside the room. To show something use interfaz (hud, mensaje, marcador, menu). |
site storage (localStorage, sessionStorage, indexedDB...) | error | Use progreso.guardar(jugador, clave, valor) and progreso.leer(...). |
eval or Function | error | It is blocked by the room's security policy. Write the code directly. |
workers and channels (Worker, BroadcastChannel, MessageChannel) | error | They are not available inside the room. |
postMessage or close | error | The room handles communication with the player. Use the greengames services. |
browser timers (setTimeout, setInterval, requestAnimationFrame, queueMicrotask) | error | Use reloj.despues(segundos, fn), reloj.cada(segundos, fn) or juego.cadaCuadro(fn): they follow match time and respect the pause. |
async or await | error | The API is synchronous and there is nothing to await. To "wait", use reloj.despues(segundos, fn). |
the system clock (Date.now(), new Date(), performance.now()) | warning (aviso) | Use reloj.ahora (match seconds): the system clock does not stop on pause and breaks replays. |
Math.random() | warning (aviso) | Use azar.numero(), azar.entero(a, b) or azar.elegir(lista): they come from the match seed. |
Bot script#
| Code | Level | What it means | How to resolve it |
|---|---|---|---|
| GB400 | error | The file does not match its schema (pruebas/bot.json, pruebas/bot-<nombre>.json). The message is one of those under Schema errors. | Fix the property given in ruta in the bot script. See Bot script. |
| GB401 | warning (aviso) | the game has no bot script: `greengames probar` cannot check that it can be played and finished | Create pruebas/bot.json with the steps to win the match. See Bot script. |
| GB410 | error | the zone "{enZona}" does not exist in the scenesthe scene "{escena}" does not exist… "{id}" does not exist in the scenes | Fix the id: the destination of ir, the zone in enZona or the scene must exist in the game. |
| GB411 | error | the piece "{pieza}" does not exist in the scenes | Fix the piece id in the step or the condition, or add the piece to a scene. |
| GB412 | error | "esperarPieza" needs at least one condition | Add at least one condition to esperarPieza: cerca (with radio), con, sin or giroY. |
| GB413 | error | "cerca" needs a "radio" | Add radio next to cerca. |
| GB414 | error | the difficulty "…" does not exist in juego.json | In porDificultad and esperadoPorDificultad, use only ids declared in dificultades of juego.json. |
| GB415 | warning (aviso) | the bot script does not say how the match must end | Add "esperado": { "resultado": "victoria" } so the test checks that the game can be won. |
| GB416 | error | the condition uses "con", "sin", "cerca", "giroY", "dato" or "existe" but does not say which piece"es", "mayor" and "menor" compare the value of a signal: "senal" is missing | Add "pieza": "<id>" to the condition if it asks about a piece, or "senal": "<name>" if it compares the value of a signal. For the player's position use "jugador": { "cerca": [...], "radio": 1 }. |
| GB417 | warning (aviso) | the script never calls juego.senalar('{senal}', ...) | Call juego.senalar('<name>') in the script, or fix the signal's name: if the script never sets it, the condition never holds. |
| GB418 | error | "mantener" needs "segundos" or "hasta" | Add segundos or hasta to the step, for example { "mantener": "accion", "segundos": 2 }. |
| GB419 | error | "aprobarCon" ({aprobarCon}) cannot be greater than the number of seeds ({cuantas}) | Lower aprobarCon or add seeds: it cannot ask for more passing runs than the runs there are. |
Package#
| Code | Level | What it means | How to resolve it |
|---|---|---|---|
| GB501 | error | it is not a Green Games package of format 1 | Generate the .ggx with greengames empaquetar: it is gzip-compressed JSON starting with { "gbx": 1, ... }. |
| GB502 | error | the game has no scenes | Create escenas/principal.json with piezas and apariciones. |
| GB503 | error | there are {claves} scenes and the maximum is 16 | Reduce the number of scenes to the maximum. See Current limits. |
| GB510 | error | unsupported resource type | Use an svg, png, webp or jpg image. |
| GB511 | error | the declared type "{tipo}" does not match the extension (expected "{tipo}") | Make the resource's tipo match the file extension (for example image/png for .png). |
| GB512 | error | it weighs … KB and the maximum per resource is 2048 KB | Shrink the image or use SVG. |
| GB520 | error | the uncompressed package weighs … MB and the maximum is 20 MB | Remove or shrink content: the heaviest part is usually the images in recursos/. |
| GB521 | error | the .ggx weighs … MB and the maximum is 5 MB | Shrink the images in recursos/: they are usually the heaviest part. |
Sprites#
| Code | Level | What it means | How to resolve it |
|---|---|---|---|
| GB600 | error | The file does not match its schema (laminas/<id>.json). The message is one of those under Schema errors. | Fix the property given in ruta in that sprite. See Scenes. |
| GB601 | error | the frame has {filas} row(s) and the sprite is {alto} highthe row has {fila} character(s) and the sprite is {ancho} wide | Every frame needs exactly alto rows of ancho characters. Fill with . (transparent) or trim. |
| GB602 | error | the row uses color "…" (number …), but the palette has {paleta} color(s) | Use only characters that correspond to a color in paleta (0 is the first, 9 the tenth, a the eleventh) or add the missing color to paleta. The dot . is transparent. |
| GB603 | error | the color "…" does not exist | Use a name from the Green Games palette (the suggestion proposes the closest one) or a "#rrggbb" color. |
| GB604 | error | the animation names frame {mala}, but the sprite has {cuadros} | Fix the frame number in animaciones: frames are counted from 0 and the last one is the number of frames minus one. |
| GB605 | error | there are {ids} sprites and the maximum is 128 | Reduce the number of sprites: several images can be frames of a single sprite. See Current limits. |
| GB606 | error | the file name "{id}" cannot be used as an id | Rename the file: lowercase letters, numbers and hyphens, for example laminas/heroe-azul.json. |
Models, textures and sounds#
| Code | Level | What it means | How to resolve it |
|---|---|---|---|
| GB700 | error | the model has no .glb filethe document does not declare glTF 2.0 | A model is a .glb file (binary glTF 2.0) in modelos/<id>.glb. Other formats are converted: convert it again with the editor’s importer (File › Import…) or with greengames importar: it writes a .glb that meets the format. |
| GB701 | error | the model weighs … KB and the maximum is … KB | A .glb weighs 2 MB at most. Reduce triangles or the size of its textures; the importer does it with its conversion options. |
| GB702 | error | the model document is too large to checkthe model has {buffers} buffers and one is supported (the BIN chunk)the declared buffer does not fit in the binary chunk of the .glbthe buffer view runs past the binary chunk or does not point to buffer 0the accessor does not declare its type or count correctlythe accessor does not point to any buffer viewthe accessor points to a missing buffer viewthe accessor reads past its buffer viewthe image is not embedded in the .glb (missing "bufferView")the texture does not point to an image of the modelthe texture points to a missing samplerthe material points to a missing texturethe material is not an objectthe alpha mode is not OPAQUE, MASK or BLENDthe primitive declares no attributesthe attribute points to a missing accessorthe primitive has no positions (POSITION)the position accessor must be VEC3 and carry "min" and "max"all attributes of a primitive must have the same vertex countJOINTS_0 and WEIGHTS_0 go togetherindices must be unsigned integersthe primitive points to a missing materialthe number of indices (or vertices) is not a multiple of 3the skeleton names missing bonesthe skeleton matrices do not match its bonesthe skeleton root is missingthe node is not an objectthe node points to a missing meshthe node points to a missing skeletona node name can have up to 64 charactersthe node names a missing child"…" must be a list of {largo} numbersthe model must have exactly one scene (it has {escenas})the scene names a missing nodethe node hierarchy has a cycle or a node with two parentsthe clip is not an objectthe sampler points to missing accessorsclip times must be floating point numbers with "min" and "max"the channel does not point to a sampler of the clipthe channel animates a missing node | The .glb is damaged or badly built inside (buffers, buffer views, accessors or images that do not fit). Convert it again with the editor’s importer (File › Import…) or with greengames importar: it writes a .glb that meets the format. |
| GB703 | error | the model points to an external file or address ("uri") | Everything goes inside the .glb: the binary in its BIN chunk and the images embedded, with no uri. Convert it again with the editor’s importer (File › Import…) or with greengames importar: it writes a .glb that meets the format. |
| GB704 | error | the extension "…" is not supported"extensions" must be an object | Only the extensions KHR_materials_unlit, KHR_materials_emissive_strength, KHR_mesh_quantization and EXT_texture_webp are supported. Mesh compression is an extension too: export again without it. Convert it again with the editor’s importer (File › Import…) or with greengames importar: it writes a .glb that meets the format. |
| GB705 | error | the "extras" key is not allowed in a model | Remove the extras key: it is free data the engine does not use. Convert it again with the editor’s importer (File › Import…) or with greengames importar: it writes a .glb that meets the format. |
| GB706 | error | the model has cameras, which are not supportedsparse accessors are not supportedtextures can only use the first coordinate set (TEXCOORD_0)morph targets are not supportedonly triangle primitives are supported (mode 4)the attribute "…" is not supportedcameras are not supportedthe interpolation "…" is not supported"…" cannot be animated | The model has something the format does not support: cameras, morph targets, sparse accessors, primitives that are not triangles or attributes outside the list. Remove it when exporting, or convert it again with the editor’s importer (File › Import…) or with greengames importar: it writes a .glb that meets the format. |
| GB707 | error | the model has {triangulos} triangles and the maximum is {triangulosPorModelo} | A model has 20,000 triangles at most. Reduce triangles; the importer does it with its maximum triangles option. |
| GB708 | error | the model has {pieles} skeletons and the maximum is {esqueletosPorModelo}the skeleton has {j} bones and the maximum is {huesosPorModelo} | Up to 4 skeletons per model and 64 bones per skeleton. Remove finger, face or accessory bones when exporting. |
| GB709 | error | the model has {materiales} materials and the maximum is {materialesPorModelo}the model has {primitivas} primitives and the maximum is {primitivasPorModelo}the model has {nodos} nodes and the maximum is {nodosPorModelo} | Up to 256 nodes, 32 primitives and 16 materials per model. Merge meshes that share a material. |
| GB710 | error | the model has {imagenes} images and the maximum is {texturasPorModelo} | Up to 8 images inside a model. Merge textures into one or remove the unused ones. |
| GB711 | error | the image is not PNG, JPEG or WebPthe image declares "…" and its content is {tipo}the image is {ancho} x {alto} and the maximum is {texturaLado} per side | A model’s images are PNG, JPEG or WebP, up to 1024 pixels per side. Convert or shrink the texture; the importer does it with its maximum texture size. |
| GB712 | error | the model has {animaciones} clips and the maximum is {clipsPorModelo}the clip name … cannot be usedthe clip "{name}" is repeated | Up to 32 clips per model, each with a unique name of lowercase letters, numbers and hyphens, up to 32 characters: caminar, ataque-fuerte. |
| GB713 | error | the clip animates nothingclip times cannot be negativethe clip lasts … s and the maximum is {clipSegundos} sthe clip lasts 0 seconds | A clip animates something, starts at 0 or later and lasts more than 0 and up to 30 seconds. Trim the clip or split it into several. |
| GB714 | error | the model has no mesh in its scenethe model box measures … and must measure between {modeloLadoMinimo} and {tamanoMaximo} | The model needs at least one mesh, and its box must measure between 0.001 and 500 per side. One world unit is roughly half an avatar wide: adjust the scale when exporting or importing. |
| GB715 | error | the property "…" is not allowed in model settings | Check modelos/<id>.json: it only accepts colision, which is caja, capsula, envolvente (4 to 32 points inside the model’s box) or ninguna. The importer generates the hull with its collision option. |
| GB720 | error | there are {idsModelos} models and the maximum is 64 | A game has up to 64 models. Remove the unused ones. |
| GB721 | error | there are {idsTexturas} textures and the maximum is 64 | A game has up to 64 loose textures. Remove the unused ones. |
| GB722 | error | the texture is not a png, jpg or webp imageweighs … KB and the maximum per texture is 1024 KBthe content is not a {tipo} imagethe image is {ancho} x {alto} and the maximum is 1024 per side | A loose texture is PNG, JPEG or WebP, weighs up to 1 MB and measures up to 1024 pixels per side. The type is taken from the file extension. Convert or shrink the image; the importer does it. |
| GB723 | error | models, textures and sounds add up to … MB and the maximum is 12 MB | A game’s models, textures and sounds add up to 12 MB at most. Reduce textures and triangles, or remove what is not used. |
| GB724 | error | the file name "{id}" cannot be used as an id | The file name is its id: lowercase letters, numbers and hyphens, up to 48 characters, like modelos/robot-azul.glb. Rename it; the importer does it by itself. |
| GB725 | error | there are {idsSonidos} sounds and the maximum is 32the sound is not a wav or mp3 fileweighs … KB and the maximum per sound is 1024 KBthe content is not a {tipo} sound | A game has up to 32 recorded sounds, in WAV or MP3, up to 1 MB each. Convert the sound, trim it or lower its quality; the importer converts WAV and shrinks the ones over 1 MB. |
| GB730 | error | the models in the scene add up to {trisDeModelos} triangles and the maximum is 150000there are {piezasModelo} pieces with shape "modelo" and the maximum is 300 | Each piece that uses a model counts its triangles: a scene adds up to 150,000 at most and has up to 300 pieces with shape modelo. Use fewer copies or lighter models. |
| GB731 | error | a piece with shape "modelo" must say which one: "modelo" is missing | A piece with shape modelo says which one in modelo: the id of a file in modelos/. |
| GB732 | error | The piece names in modelo a model that is not in modelos/. | Put the file in modelos/<id>.glb or fix the id: the validator’s suggestion lists the game’s models and proposes the closest one. |
| GB733 | error | the animation of a model is a clip name, not a numberthe model "{modelo}" has no clip "{animacion}" | animacion is the name of a clip the model has. The suggestion lists that model’s clips. |
| GB734 | warning (aviso) | "lamina" and "textura" are not used in a piece with shape "modelo""modelo" is only used with "forma": "modelo" (this piece is "{forma}")the piece names both a "lamina" and a "textura": the texture is drawnan image from texturas/ has no animations | It is a warning: some properties are not used with that shape. modelo only goes with the modelo shape; lamina and textura do not go on a model; if a flat piece names both lamina and textura, the texture is drawn. |
| GB735 | error | A piece names a texture that is not in texturas/. | Put the image in texturas/<id>.png (or .jpg, .webp) or fix the id: the suggestion lists the game’s textures. |
| GB736 | warning (aviso) | the material texture is not drawn on a piece with shape "{forma}""textura" on the piece is only used with "forma": "lamina" (this piece is "{forma}") | It is a warning: the texture is not drawn there. To cover a piece with an image, it goes in material.textura; for a flat image, textura goes on the piece with shape lamina; a model brings its own textures. |
| GB740 | error | The file does not match its schema (creditos.json). The message is one of those under Schema errors. | creditos.json is a list of entries { recurso, titulo, autor, licencia, origen?, cambios? }. Check the one named in ruta. |
| GB741 | error | the credit names "{recurso}", which is not in the gamethe credit for "{recurso}" is repeated | Each credit names an asset that is in the game (modelos/<id>, texturas/<id> or sonidos/<id>), only once. Remove the credit or fix the name. |
| GB742 | warning (aviso) | {sinCredito} asset(s) have no credit: …… | It is a warning. If you made it, record it with "licencia": "propia" (the workshop and the importer do it by themselves). If it comes from elsewhere, record its author and license: you must have the right to use it in your game. |
Schema errors#
GB101 (juego.json), GB200 (a scene), GB400 (a bot script) and GB600 (a sprite) are raised when the file does not have the shape its schema requires. The ruta of the problem tells which property, and the message is one of these:
expected …, but found …does not match any of the valid shapes: …expected …, but found …must be exactly …, but found …… is not an allowed value. Options: …must not be emptyis too short: at least {minLength} charactersis too long: {valor} characters, maximum {maxLength}… does not have the expected format{valor} is below the minimum allowed ({minimum}){valor} is above the maximum allowed ({maximum})must be greater than {exclusiveMinimum}, but is {valor}must have exactly {minItems} items, but has {valor}must have at least {minItems} item(s), but has {valor}has {valor} items and the maximum is {maxItems}… is repeatedmissing required property "…"must have at least {minProperties} property(ies)has {claves} properties and the maximum is {maxProperties}unknown property "…"
To resolve them, fix that property: its type, its name or its value. The shape of each file is in Manifest, Scenes and Bot script.
Next#
- The command line: how to run
greengames validar. - Current limits
- Bot script