mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-19 18:46:43 +00:00
Created Debugging (markdown)
parent
a03929f03c
commit
15cb230de4
51
Debugging.md
Normal file
51
Debugging.md
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
### Give yourself 'moderator' priviledges
|
||||||
|
1. Make sure that the game server is closed
|
||||||
|
2. Execute this command:
|
||||||
|
|
||||||
|
Replace "someUser" by your username.
|
||||||
|
```
|
||||||
|
db.user.update({username: {$eq: "someUser"}}, {$set: {moderator: true}})
|
||||||
|
```
|
||||||
|
3. Start the game server
|
||||||
|
|
||||||
|
### Enabling debug console output
|
||||||
|
Execute this command in your browser's console
|
||||||
|
```javascript
|
||||||
|
DEBUG = true
|
||||||
|
```
|
||||||
|
|
||||||
|
## Debug API
|
||||||
|
These commands can be ran from your browser's console
|
||||||
|
|
||||||
|
### User commands
|
||||||
|
```javascript
|
||||||
|
//Navigate to the specified world
|
||||||
|
Debug.goTo(worldX, worldY, dimension)
|
||||||
|
|
||||||
|
//Navigate to the specified world (hex)
|
||||||
|
Debug.goTo(worldX, worldY, dimension)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Moderator commands
|
||||||
|
```javascript
|
||||||
|
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)
|
||||||
|
Debug.setInventoryPosition(objectId, position)
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user