nasgallery.blogg.se

Screeps doc
Screeps doc













screeps doc
  1. SCREEPS DOC UPDATE
  2. SCREEPS DOC CODE

Grafana is a popular tool used by many players, you can either set up your own with this guide: or use a hosted service provided by Screeps Plus.

  • There are rate-limits in-place for accessing this way, please see the Rate Limiting table for more details, ALWAYS refer to and follow the official doc's requirements.
  • While the Memory & RawMemory objects are limited in-game for storage and do cost in-game CPU to use, it is quite possible to use the web API & Authentication Tokens to access these objects from outside Screeps to store data, and use outside tools to display the data in different ways making it easier to find problems or areas for improvement. While at-a-glance or active monitoring can solve many issues, there can be longer-term trends that you can only notice when looking at larger set / longer-time set of data, such as inefficiencies in energy usage during RCL transitions, higher-than-thought usage of CPU or Bucket due to a bug or unaccounted for error, and much, much more. Be careful adding or editing large-chunks such as from the root or room/all creeps level, as the data was retrieved the tick you opened it and may have since changed, submitting the change will revert the memory to whatever the data you had open was, not what it may be now.

    SCREEPS DOC UPDATE

    Once a path is being viewed, you need to close it and reopen to have it update (they update every tick unless actively viewed), and modifications are submitted next tick. This allows you to check into or even create various memory objects without having to add checks into code, or print it out to the console.

    SCREEPS DOC CODE

    These tools allow the user to see in 'real time' the actions or states of their creeps to determine flaws in logic, code errors or the like.Īlong with your script/console, you also have a Memory tab which is the Memory Viewer. Screeps provides some powerful visual feedback tools for debugging your creep's actions or actions of your script. The returned error should be formatted as File With the Error : The Line it is occurring at : The Character that is the problem Try should print you the stack with the line number to better help determine the source of the error.Įrrors that cause your script to stop executing, these should provide a stack/line number you can trace down into your code to determine where the error is being caused. You can take a look at some examples in the Screepers' Snippets on Github, or check out the #client-abuse channel on Slack. This can be very helpful to add extra information into console, or make it more dynamic / easier to access rooms and much more. This is due to console being mainly able to accept HTML, which allows for a whole host of things ranging from playing audio, creating links and buttons, to actually adding onto the UI itself. While a User should not modify the console.log itself, (the developers have warned against this) it is quite possible to use the console in many ways beyond simple text-output. You can see some examples of this in Screeps' official docs page on debugging, along with helpful tips about how returns from methods work and can be displayed.Ĭonsole & Client-Abuse If you want to see plain-text versions of objects (as they would print as in most cases) you can use JSON.stringifiy() to convert the object to plain text which makes it much easier to determine many things.

    screeps doc

    Console.log() will print to the game's console, you can add various variables, strings and the like to the printout.















    Screeps doc