@v12-engine/engine/debug
Classes
| Name | What |
|---|---|
| EventLog beta | The events and hooks of the last seconds of a world, the game's own among them, with the listeners and handlers that ran on them. Hooks run often (every target search asks one), so a hook is one line a tick, with how many times. Following costs a little: it is only on while attached |
Interfaces
| Name | What |
|---|---|
| DebugChecks beta | Checks the engine can run on itself, for tests and development. Each one redoes or re-verifies work that the engine normally skips or caches, and throws as soon as the shortcut gave a different answer. They are slow; a real game leaves them off. A world's are its own (world.checks, CreateWorldOptions.checks); these are what a world that says nothing starts with (setDebugChecks), and what a computer player's brain, which has no world, reads |
Functions
| Name | What |
|---|---|
| defineDebugCommand beta | A debug command of a game's or a scene's own: one that goes through only for players allowed the debug tools (world.debugPlayers), and tells others so. Otherwise like defineCommand |
| inspect beta | Something as the simulation has it right now, or null when there is no such entity or player |
| setDebugChecks beta | Turns every check on or off for the worlds made from now on that say nothing of their own (CreateWorldOptions.checks), and for computer players' brains |
Values
| Name | What |
|---|---|
| cellStylesCommand beta | A layer's values (its styles: name, colour and rules, CellLayerValue) put in the place of what the world's game has, for who may use the debug tools: what the editor's Play here sends as a style is changed while the map plays, the game's values with its data and the map's definitions laid over them. From then on the styles hide, burn and slow as they say: the hiding patches are worked out again, the fire reads them at its next turn, and the ways are weighed again where a style's speed changed or it stops one on foot now and did not (walkable), or the other way; the layer painted later in play weighs them too, a layer that slowed nowhere before among them. The ways weigh the ground only in a game whose ground slowed somewhere as the world was made (hasGroundSpeeds): in one that did not, a style given a speed here slows who walks on it and not the ways. A layer the game has not is refused. Not kept in a save as such: a save of the map is made with the map's definitions as they are |
| cheatCommand beta | A switch for trying things out: abilities used again at once, abilities that cost no mana, the units of those who may use the debug tools unharmed (World.cheats) |
| debugCommands beta | The debug commands of the engine, which every game has; they go through only for who may use them |
| experienceCommand beta | Gives the sender's heroes this much experience |
| exploreCommand beta | The whole map explored for everyone, as a map that starts explored has it (FogSettings.startExplored): the fog stays, over what is not seen now, but the ground is dim, not black, and what stands on it and is no player's is known. Or no longer: each team has explored what it sees now, and forgets what it does not |
| foliageCommand beta | Grass of a layer done something to in a circle, for who may use the debug tools (FoliageBrushAct): what the editor's Play here brushes send. A game without the foliage pack, or a layer it has not, is said to the sender and nothing is done |
| foliageDebugCommands beta | The debug commands of grass and bushes, which every game has: they go through only for who may use them |
| giveCommand beta | Gives the sender this much of every resource |
| giveItemCommand beta | Puts an item of the game's in the first free slot of what carries things |
| groundCommand beta | Reshapes a part of the ground as the patch has it (World.reshapeGround): what the editor's Play here sends of the map's ground as its heights, cliffs, water and paint are edited while it plays. A patch that does not fit the ground is refused |
| hourCommand beta | The time of day, in a game with days and nights |
| killCommand beta | Kills what it names, whoever's it is: what cannot be hurt included, but not scenery the map is made of |
| loseCommand beta | Puts the sender out of the game, as if beaten: the others play on, or win by the game's own rule |
| mapObjectCommand beta | An object placed on the map put in the world as the map's are as the world is made (spawnMapObject): its type, owner, where it stands and how it is turned, and the rest the map says of it (its health, level, items, the game's fields, its orders), kept as the entity of that object (World.fromMap): what the editor's Play here sends as something is placed on the map while it plays (EQ10). A building where there is no room is refused, as debug.spawn refuses it |
| paintCommand beta | A brush: fills a circle with what stands on the grid (trees, rocks), thinner towards its edge, wherever there is room; or, with erase, clears it of that type |
| placeCommand beta | Moves what an object of the map became (World.fromMap, by the object's id) where it stands on the map now, turned as it is: a unit is put there (World.place), the way there not its concern. A structure is not moved: the editor takes it away and puts it down again |
| redefineCommand beta | Changes a field of a definition while the game runs, as the editor's Data panel tries it: only one the game lets be changed (Rules.editable), and for players allowed the debug tools |
| revealCommand beta | Lifts the fog for the sender's team, or puts it back: in the simulation itself, so that units react to what is shown |
| setLevelCommand beta | Raises heroes to a level (never down, and no further than they can go: setHeroLevel) |
| spawnCommand beta | Creates something at a point, for a player: a building or a resource where there is room, or a group of units (count, 50 at most). hidden: what can be invisible is out of sight from the start |
| spawnPrefabCommand beta | A prefab of the game's put down where it says, for the sender, turned as said: to try one out, and for the editor's Play |
| speedCommand beta | How fast the game goes, 0 to pause, 8 at most: whoever runs it (a session in the page, a server) goes by it |
| unplaceCommand beta | Takes what objects of the map became (World.fromMap, by the objects' ids) out of the world, whatever they are, scenery included: no corpse is left. What the editor's Play here sends as something is taken off the map |
| winCommand beta | Wins the game for the sender's team: the others are out, and it is over. A game with a way to win of its own is ended all the same |
| windCommand beta | The world's wind turned and made stronger or weaker (MapEnvironment.wind, as the client's MapWind says it), eased into on the screens over a second, for who may use the debug tools: the editor's Play here wind dial. What is not given stays as the wind was |
Types
| Name | What |
|---|---|
| FoliageBrushAct beta | What the foliage brush of the debug tools does where it is used (debug.foliage): ignite sets the grass alight, extinguish puts it out, cut cuts it to stubble (ruin with cut), regrow has it grow back |