-
Notifications
You must be signed in to change notification settings - Fork 90
Debugging
Simon Fortier edited this page Dec 4, 2018
·
4 revisions
- Make sure that the game server is closed
- Execute this command:
Replace "someUser" by your username.
db.user.update({username: {$eq: "someUser"}}, {$set: {moderator: true}})
- Start the game server
Execute this command in your browser's console
DEBUG = trueHere is a list of available variables
Debug.SELF_ID // Object id of your cubotThese commands can be ran from your browser's console
//Navigate to the specified world
Debug.goTo(worldX, worldY, dimension)
//Navigate to the specified world (hex)
Debug.goToHex(worldX, worldY, dimension)Debug.setTileAt(x, y, newTile)
Debug.createWorld(x, y, dimension)
Debug.createWorldHex(x, y, dimension)
Debug.killAll(x, y)
Debug.objInfo(x, y)
Debug.userInfo(username)
Debug.moveObj(objectId, x, y)
Debug.tpObj(objectId, x, y, worldX, worldY, dimension)
Debug.tpObjHex(objectId, x, y, worldX, worldY, dimension)
Debug.spawnObj(data)
Debug.comPortMsg(objectId, message)
Debug.healObj(objectId, amount)
Debug.damageObj(objectId, amount)
Debug.chargeShield(objectId, amount)
Debug.setEnergy(objectId, amount)
Debug.saveGame()
Debug.popItem(objectId)
Debug.putItem(objectId, item)
//Example:
Debug.putItem(Debug.SELF_ID, '{"type": 5, "blueprint": "net.simon987.constructionplugin.ObstacleBlueprint"}')
Debug.setInventoryPosition(objectId, position)