Skip to content

Debugging & Console Commands

ReactX edited this page Dec 12, 2024 · 6 revisions

Server-side logging

Logs generated from the client using the LOGGER.as class, are sent to the endpoint /api/player/recorddebugdata and are logged to the server console.

An example of how we can use the logger on the client:

/*
* @param {String} logType - sets the log level.
* @param {String} message - the log message to be logged.
*/
LOGGER.Log("log", "Value of var1" + var1);
LOGGER.Log("err", "We ran into an issue here");

Client console

In DevSettings.ts we can enabled debugMode - this flag enables a debug developer console on the client which can be enabled by pressing the > (not the arrow keys) key on the keyboard, or in other cases the tilde key. This gives us direct access to print() statements on the client. An example:

print("This is a print statement in BASE.as");

Console Commands

The client has some built-in console commands which can be executed from the debug console by typing in the following:

unlockquest
lockquest
lab
academy
setfeedtime
setstarvetime
tut_stage
tutorialArrowRotation
resetfrontpage
frontpageShow
removeDP
settime
gettime
setscore
getscore
startevent
clearers
setwmi2level
kothendin
kothdata
setKorathLevel
champCageHasKoth
debugChampion
giveChampion
setChampionPL
deletechamps
sam
ROFLPWN
printMaxResources
showbuffradius
setkrallenlevel
expirationDate
renewalDate
changeAlpha
forceAFK
plannerZoom
plannerTool
plannerRedraw
showbaseresources
getsubscriptiondata
startsubscription
reactivatesubscription
changesubscription
cancelsubscription
givesubscription
trojan
wmattack
showsubscriptiondata
toggleBuildingBases
toggleBuildingTops
toggleRenderer
rendererdebug
numBuildings
version
printJS
fullscreen
ncpElligible