### Creep build() Method Example Source: https://screeps-cn.github.io/api Provides an example of the build() method for Creeps, which requires WORK and CARRY body parts. The code finds the closest construction site and initiates building, moving to the site if it's out of range. The target must be within a 7x7 area around the creep. ```javascript const target = creep.pos.findClosestByRange(FIND_CONSTRUCTION_SITES); if (target) { if (creep.build(target) == ERR_NOT_IN_RANGE) { creep.moveTo(target); } } ``` -------------------------------- ### Install Screeps PTR Version Locally Source: https://screeps-cn.github.io/ptr This command installs the private server package for the Screeps PTR engine locally. This is useful for running the PTR environment on your own machine, as PTR engine code changes are deployed to the 'ptr' branch of the npm package. ```bash npm install screeps@ptr ``` -------------------------------- ### Accessing Structure Energy in Screeps Source: https://screeps-cn.github.io/game-loop This example demonstrates how to get the current energy level of an energy-providing structure, such as an Extension. The `StructureExtension.energy` property (or similar properties for other structures like `StructureTower.energy`) provides this information. It's crucial for managing power levels and construction/repair needs. ```javascript // Assuming 'myExtension' is a valid StructureExtension object const currentEnergy = myExtension.energy; console.log("Extension energy level:", currentEnergy); ``` -------------------------------- ### Install grunt-rsync for Private Server Deployment Source: https://screeps-cn.github.io/contributed/advanced_grunt Installs the grunt-rsync plugin, which is recommended for deploying code to private Screeps servers, especially when the Steam client might cause issues with the standard copy plugin. It facilitates efficient file transfers by only uploading changed files. ```bash npm install grunt-rsync --save-dev ``` -------------------------------- ### Install time-grunt for Task Timing Source: https://screeps-cn.github.io/contributed/advanced_grunt Installs the 'time-grunt' npm package as a development dependency. This plugin helps in analyzing the time spent on each Grunt task, providing insights into build process performance. ```bash npm install time-grunt --save-dev ``` -------------------------------- ### Getting Used CPU in Screeps Source: https://screeps-cn.github.io/game-loop This example shows how to retrieve the amount of CPU time that has been used within the current tick. `Game.getUsedCpu()` returns a numerical value representing the consumed CPU. This is essential for performance monitoring and optimizing code to stay within the `Game.cpuLimit`. ```javascript const usedCpu = Game.getUsedCpu(); console.log("CPU used in this tick:", usedCpu); ``` -------------------------------- ### Install grunt-jsbeautifier for Code Formatting Source: https://screeps-cn.github.io/contributed/advanced_grunt Installs the grunt-jsbeautifier plugin, which is used for code formatting and style enforcement in JavaScript projects. This plugin helps maintain consistent code style across the project. ```bash npm install grunt-jsbeautifier --save-dev ``` -------------------------------- ### 初始化 Screeps 服务器环境 (npm) Source: https://screeps-cn.github.io/contributed/ps_ubuntu 在 `screeps` 用户的主目录下创建 `world` 目录,并安装 Screeps 服务器。使用 `npm install screeps` 和 `npx screeps init` 命令初始化服务器配置文件 `.screepsrc`。 ```bash mkdir ~/world cd ~/world npm install screeps npx screeps init ``` -------------------------------- ### Using Grunt for Code Submission Source: https://screeps-cn.github.io/commit This section details how to use the `grunt-screeps` npm package to automate code submission to your Screeps account. It includes installation, Gruntfile configuration, and execution commands. ```APIDOC ## Using Grunt for Code Submission ### Description Automate code submission to your Screeps account using the `grunt-screeps` npm package. ### Installation ```bash npm install grunt-screeps ``` ### Configuration (Gruntfile.js) ```javascript module.exports = function(grunt) { grunt.loadNpmTasks('grunt-screeps'); grunt.initConfig({ screeps: { options: { email: '', token: '', branch: 'default', //server: 'season' }, dist: { src: ['dist/*.js'] } } }); } ``` ### Execution ```bash gruntscreeps ``` ``` -------------------------------- ### Creep attackController() Method Example Source: https://screeps-cn.github.io/api Illustrates the use of the attackController() method for Creeps with CLAIM body parts. This method is used to attack or claim a room's controller. The example checks if the room has a controller and if it's not owned by the player, then attempts to attack it, moving closer if necessary. It handles ERR_NOT_IN_RANGE. ```javascript if (creep.room.controller && !creep.room.controller.my) { if (creep.attackController(creep.room.controller) == ERR_NOT_IN_RANGE) { creep.moveTo(creep.room.controller); } } ``` -------------------------------- ### C Function for WebAssembly Compilation Source: https://screeps-cn.github.io/modules A simple C function that adds two integers. This code serves as an example input for compilation into a WebAssembly binary module. ```c int addTwo(int a, int b) { return a + b; } ``` -------------------------------- ### Use Power - JavaScript Source: https://screeps-cn.github.io/api This example demonstrates how a power creep can use a specific power, in this case, PWR_GENERATE_OPS. This is a core mechanic for power creeps to exert influence and gain advantages within the game. ```javascript Game.powerCreeps['PowerCreep1'].usePower(PWR_GENERATE_OPS); ``` -------------------------------- ### Set Shard CPU Limits - JavaScript Source: https://screeps-cn.github.io/api This example demonstrates how to set CPU limits for different shards. The total CPU allocated across all shards must equal Game.cpu.shardLimits. This operation has a 12-hour cooldown. ```javascript Game.cpu.setShardLimits({shard0: 20, shard1: 10}); ``` -------------------------------- ### Get World Size in Screeps Source: https://screeps-cn.github.io/api Returns the total size of the game world, defined as the number of rooms between the world's opposite corners. For example, a world from W50N50 to E50S50 would return 102. ```javascript Game.map.getWorldSize() ``` -------------------------------- ### 创建 Screeps Systemd 服务文件 (Ubuntu) Source: https://screeps-cn.github.io/contributed/ps_ubuntu 创建一个 systemd 服务文件 `/etc/systemd/system/screeps-world.service`,用于管理 Screeps 服务器作为系统服务运行。配置服务描述、依赖关系、工作目录、启动命令、运行用户和用户组。 ```ini [Unit] Description=Screeps Server (world) Wants=network-online.target After=network-online.target [Service] Type=simple WorkingDirectory=/home/screeps/world ExecStart=/home/screeps/world/node_modules/screeps/bin/screeps.js start User=screeps Group=screeps [Install] WantedBy=multi-user.target ``` -------------------------------- ### 安装 Redis 服务器 (Ubuntu) Source: https://screeps-cn.github.io/contributed/ps_ubuntu 通过添加 PPA 仓库安装较新版本的 Redis 服务器。首先安装 `software-properties-common` 以支持 `add-apt-repository` 命令,然后添加 PPA,更新包列表,最后安装 `redis-server`。 ```bash sudo apt install software-properties-common sudo add-apt-repository ppa:chris-lea/redis-server sudo apt update sudo apt install redis-server ``` -------------------------------- ### Getting Creep Position in Screeps Source: https://screeps-cn.github.io/game-loop This example demonstrates how to access a creep's current position in the game world. The `creep.pos` property returns a RoomPosition object, which contains coordinates (x, y) and the room name. This position is updated at the beginning of each tick based on movement commands from the previous tick. ```javascript // Assuming 'myCreep' is a valid creep object const creepPosition = myCreep.pos; console.log("Creep position:", creepPosition.x, creepPosition.y, "in room", creepPosition.roomName); ``` -------------------------------- ### 安装构建工具 (Ubuntu) Source: https://screeps-cn.github.io/contributed/ps_ubuntu 安装编译和开发所需的常用构建工具,包括 `build-essential`, `tcl`, 和 `git`。这些工具是后续软件编译和安装的基础。 ```bash sudo apt install -y build-essential tcl git ``` -------------------------------- ### Install grunt-file-append for Screeps Source: https://screeps-cn.github.io/contributed/advanced_grunt Installs the grunt-file-append plugin, which is used to automatically version control your Screeps game code by appending a timestamp to a version file. ```bash npm install grunt-file-append --save-dev ``` -------------------------------- ### 启动并启用 MongoDB 服务 (Ubuntu) Source: https://screeps-cn.github.io/contributed/ps_ubuntu 启动 MongoDB 服务 (`mongod`) 并配置其在系统启动时自动运行。使用 `systemctl` 命令来管理服务。 ```bash sudo systemctl start mongod sudo systemctl enable mongod ``` -------------------------------- ### 启用并启动 Screeps Systemd 服务 (Ubuntu) Source: https://screeps-cn.github.io/contributed/ps_ubuntu 加载新的 systemd 服务配置,然后启动 `screeps-world` 服务并设置其在系统启动时自动运行。这确保了 Screeps 服务器在服务器重启后能够自动启动。 ```bash sudo systemctl daemon-reload sudo systemctl start screeps-world sudo systemctl enable screeps-world ``` -------------------------------- ### Game.map.getRoomStatus Source: https://screeps-cn.github.io/api Gets the status of a room. ```APIDOC ## Game.map.getRoomStatus(roomName) ### Description Gets the open status of a room. Click [here](https://docs.screeps.com/api/#Game.map.getRoomStatus) to learn more about novice/respawn areas. ### Method `Game.map.getRoomStatus` ### Parameters #### Path Parameters - **roomName** (string) - Required - The name of the room. ### Return Value An object with the following properties: - **status** (string): One of the following string values: - `normal` – The room has no restrictions. - `closed` – The room is not available. - `novice` – The room is part of a novice area. - `respawn` – The room is part of a respawn area. - **timestamp** (number | null): A UNIX timestamp in milliseconds when the status will end. This property is `null` if the room status does not have an expiration time. ### Request Example ```javascript const roomStatus = Game.map.getRoomStatus(room.name); if (roomStatus.status == 'normal') { nuker.launchNuke(room.getPositionAt(25, 25)); } ``` ``` -------------------------------- ### 安装 Node.js 8.x (Ubuntu) Source: https://screeps-cn.github.io/contributed/ps_ubuntu 安装 Node.js 8.x 版本,以满足 Screeps 游戏引擎的运行需求。通过添加 NodeSource 的 PPA 仓库来获取比 Ubuntu 默认仓库更新的版本。 ```bash curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt install -y nodejs ``` -------------------------------- ### Submit Screeps Code with Grunt Source: https://screeps-cn.github.io/commit This snippet shows how to configure and use the `grunt-screeps` npm package to automate code submission to your Screeps account. Ensure you have Node.js and npm installed, and have created an authentication token in your Screeps account settings. The configuration requires your email, auth token, and the path to your compiled JavaScript files. ```bash npm install grunt-screeps ``` ```javascript module.exports = function(grunt) { grunt.loadNpmTasks('grunt-screeps'); grunt.initConfig({ screeps: { options: { email: '', token: '', branch: 'default', //server: 'season' }, dist: { src: ['dist/*.js'] } } }); } ``` ```bash grunt screeps ``` -------------------------------- ### Game.map.getRoomLinearDistance Source: https://screeps-cn.github.io/api Gets the linear distance between two rooms. ```APIDOC ## Game.map.getRoomLinearDistance(roomName1, roomName2, [continuous]) ### Description Gets the linear distance (in number of rooms) between two rooms. This function can be used to estimate the energy cost of sending resources via terminals or for using observers and nukes. ### Method `Game.map.getRoomLinearDistance` ### Parameters #### Path Parameters - **roomName1** (string) - Required - The name of the first room. - **roomName2** (string) - Required - The name of the second room. - **continuous** (boolean) - Optional - Whether to consider the world map as continuous at the boundaries. Set to `true` if calculating trade or terminal shipping costs. Defaults to `false`. ### Return Value The number of rooms between the two given rooms. ### Request Example ```javascript Game.map.getRoomLinearDistance('W1N1', 'W4N2'); // Returns 3 Game.map.getRoomLinearDistance('E65S55', 'W65S55', false); // Returns 131 Game.map.getRoomLinearDistance('E65S55', 'W65S55', true); // Returns 11 ``` ``` -------------------------------- ### 配置 MongoDB 3.6 仓库并安装 (Ubuntu) Source: https://screeps-cn.github.io/contributed/ps_ubuntu 配置 MongoDB 官方 APT 仓库以安装最新版本的 MongoDB (3.6)。添加 GPG 密钥,配置软件源列表,更新包列表,然后安装 `mongodb-org` 包。 ```bash sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list sudo apt update sudo apt-get install -y mongodb-org ``` -------------------------------- ### Get Terrain at Specific Coordinates in Screeps Source: https://screeps-cn.github.io/api Gets the terrain type at specified X and Y coordinates within a given room. This method is deprecated and will be removed in favor of `Game.map.getRoomTerrain`. It can be used with either individual coordinates or a RoomPosition object. It returns a string indicating the terrain type: 'plain', 'swamp', or 'wall'. ```javascript console.log(Game.map.getTerrainAt(25,20,'W10N10')); ``` ```javascript console.log(Game.map.getTerrainAt(new RoomPosition(25,20,'W10N10'))); ``` -------------------------------- ### PowerCreep create() Method Source: https://screeps-cn.github.io/api Adds a new Power Creep instance to your account. The Power Creep is initially in an unspawned state and must be spawned using the 'spawn' method. Requires a sufficient Global Power Level (GPL) to perform. Returns an error code if the name already exists, GPL is insufficient, or arguments are invalid. ```javascript PowerCreep.create('MyPowerCreep', POWER_CLASS.OPERATOR); ``` -------------------------------- ### 启动 Screeps 服务器 (npx) Source: https://screeps-cn.github.io/contributed/ps_ubuntu 以 `screeps` 用户身份在 `~/world` 目录下启动 Screeps 服务器。该命令会在第一个终端中运行,直到手动停止。 ```bash cd ~/world npx screeps start ``` -------------------------------- ### Get Room Terrain Data in Screeps Source: https://screeps-cn.github.io/api Retrieves a Room.Terrain object for a given room name, allowing access to static terrain data like walls and swamps. This method is accessible for all rooms, even those that are not currently visible or accessible. The returned object has a `get(x, y)` method to query the terrain at specific coordinates. ```javascript const terrain = Game.map.getRoomTerrain("E2S7"); switch(terrain.get(10,15)) { case TERRAIN_MASK_WALL: break; case TERRAIN_MASK_SWAMP: break; case 0: break; } ``` -------------------------------- ### Load and Instantiate WebAssembly Module in Screeps Source: https://screeps-cn.github.io/modules Demonstrates loading a WebAssembly binary module ('addTwo.wasm') in Screeps. It shows how to instantiate the module and call its exported functions using the WebAssembly JavaScript API. ```javascript // This will return an ArrayBuffer with the binary contents of 'addTwo.wasm' const bytecode = require('addTwo'); const wasmModule = new WebAssembly.Module(bytecode); const imports = {}; // See Emscripten's allowed environment for details: // https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md imports.env = { memoryBase: 0, tableBase: 0, memory: new WebAssembly.Memory({ initial: 256 }), table: new WebAssembly.Table({ initial: 0, element: 'anyfunc' }) }; const wasmInstance = new WebAssembly.Instance(wasmModule, imports); console.log(wasmInstance.exports.addTwo(2,3)); ``` -------------------------------- ### 切换到 Screeps 用户 (Ubuntu) Source: https://screeps-cn.github.io/contributed/ps_ubuntu 使用 `su` 命令切换到 `screeps` 用户,以便以该用户的身份执行后续的安装和配置命令。 ```bash sudo su screeps ``` -------------------------------- ### Game.map.getRoomTerrain Source: https://screeps-cn.github.io/api Gets the Room.Terrain object for quick access to static terrain data. ```APIDOC ## Game.map.getRoomTerrain(roomName) ### Description Gets the `Room.Terrain` object for quick access to static terrain data. This method works for all rooms, even those that are not accessible. ### Method `Game.map.getRoomTerrain` ### Parameters #### Path Parameters - **roomName** (string) - Required - The name of the room. ### Return Value A new `Room.Terrain` object. ### Request Example ```javascript const terrain = Game.map.getRoomTerrain("E2S7"); switch(terrain.get(10,15)) { case TERRAIN_MASK_WALL: console.log('Wall at (10,15)'); break; case TERRAIN_MASK_SWAMP: console.log('Swamp at (10,15)'); break; case 0: console.log('Plain at (10,15)'); break; } ``` ``` -------------------------------- ### Use Power Source: https://screeps-cn.github.io/api Activates a power ability for a power creep. Example usage for PWR_GENERATE_OPS. ```APIDOC ## usePower(powerConstant) ``` Game.powerCreeps['PowerCreep1'].usePower(PWR_GENERATE_OPS); ``` Activates a power ability for a power creep. ``` -------------------------------- ### 重置 Screeps 数据库 (CLI) Source: https://screeps-cn.github.io/contributed/ps_ubuntu 在另一个终端中,以 `screeps` 用户身份运行 Screeps CLI 工具,并执行 `system.resetAllData()` 命令来重置所有游戏数据。这是在使用新的存储引擎(如 MongoDB)后必需的步骤。 ```bash sudo su screeps cd ~/world npx screeps cli > system.resetAllData() ``` -------------------------------- ### Get Structure Type Source: https://screeps-cn.github.io/api Returns the type of the structure, represented by a `STRUCTURE_*` constant. This property is inherited from Structure. ```javascript structure.structureType; ``` -------------------------------- ### Get Structure Ownership Status Source: https://screeps-cn.github.io/api Checks if a structure is owned by the current player. This property is inherited from OwnedStructure. ```javascript structure.my; ``` -------------------------------- ### StructureSpawn API Source: https://screeps-cn.github.io/api Documentation for StructureSpawn, covering its role in spawning creeps, energy regeneration, and available properties. ```APIDOC ## StructureSpawn The spawn is the center of your colony. This structure can create, update, and recycle creeps. You can access all spawns via the `Game.spawns` hash list. Spawns regenerate a small amount of energy each tick to prevent players from getting into a situation where they have no creeps available and no creeps to build. **Controller Level**: * 1-6: 1 spawn * 7: 2 spawns * 8: 3 spawns **Cost**: 15,000 **Hits**: 5,000 **Capacity**: 300 **Spawn time**: 3 ticks per body part **Energy auto-regeneration**: When energy in the room (in all spawns and extensions) is below 300, spawns regenerate 1 unit of energy per tick. ### Properties * **effects** (array): An array of objects with the following properties: * `effect` (number): The ID of the effect. Can be a natural effect ID or a Power ID. * `level` (optional, number): The Power level of the effect. This property does not exist if the effect is not a Power effect. * `ticksRemaining` (number): How long until this effect is lost. * **hits** (number): The current hit points of this structure. * **hitsMax** (number): The maximum hit points of this structure. * **id** (string): A unique object identifier. You can use `Game.getObjectById` method to get the object instance. * **structureType** (string): One of the `STRUCTURE_*` constants. * **my** (boolean): Whether this is your owned structure. * **owner** (object): Structure owner information, an object with the following properties: * `username` (string): The owner's username. * **energy** (number): Deprecated property. Alias for `.store[RESOURCE_ENERGY]`. * **energyCapacity** (number): Deprecated property. Alias for `.store.getCapacity(RESOURCE_ENERGY)`. * **memory** (any): A shorthand for `Memory.spawns[spawn.name]`. You can use this to quickly access spawn-specific memory data objects. * **name** (string): The name of the spawn. Assigned when creating a new spawn, and cannot be changed unless demolished and rebuilt. This name is a hash key used to access it via the `Game.spawns` object. * **spawning** (StructureSpawn.Spawning | null): If the spawn is currently spawning a new creep, it will contain a `StructureSpawn.Spawning` object, otherwise null. * **store** (Store): A `Store` object containing all the commodities of this structure. ### Inherited from Structure * **destroy()**: Immediately destroys this structure. * Returns: Error codes: `OK` (0), `ERR_NOT_OWNER` (-1), `ERR_BUSY` (-4). * **isActive()**: Checks if this structure is active. * Returns: boolean. * **notifyWhenAttacked(enabled)**: Toggles automatic notifications when this structure is attacked. * Parameters: * `enabled` (boolean) - Whether to enable notifications. * Returns: Error codes: `OK` (0), `ERR_NOT_OWNER` (-1), `ERR_INVALID_ARGS` (-10). ### Inherited from RoomObject * **pos**: The RoomPosition of this object. * **room**: A link to the Room object. ``` -------------------------------- ### Submit Screeps Code via API with Node.js Source: https://screeps-cn.github.io/commit This example demonstrates how to programmatically upload code to Screeps using Node.js and the built-in `https` module. It directly interacts with the Screeps Web API at `https://screeps.com/api/user/code`. You need to provide your email, password (or preferably an auth token for security), and the code modules structured as a JSON object. The request uses basic authentication and sends the code as JSON. ```javascript var https = require('https'); var email = '', password = '', // Consider using an auth token instead for better security data = { branch: 'default', modules: { main: 'require("hello");', hello: 'console.log("Hello World!");' } }; var req = https.request({ hostname: 'screeps.com', port: 443, path: '/api/user/code', method: 'POST', auth: email + ':' + password, headers: { 'Content-Type': 'application/json; charset=utf-8' } }); req.write(JSON.stringify(data)); req.end(); ``` -------------------------------- ### Get Maximum Structure Hit Points Source: https://screeps-cn.github.io/api Returns the maximum hit points a structure can have. This property is inherited from Structure. ```javascript structure.hitsMax; ``` -------------------------------- ### Get Structure Owner Information Source: https://screeps-cn.github.io/api Retrieves information about the owner of a structure, including their username. This property is inherited from OwnedStructure. ```javascript structure.owner.username; ``` -------------------------------- ### RoomVisual Constructor (JavaScript) Source: https://screeps-cn.github.io/api Creates a RoomVisual object to draw graphics in a specific room or all rooms. If no room name is provided, visualizations apply to all rooms. Graphics persist for one tick unless updated. Useful for debugging and visual feedback. ```javascript Game.rooms['W10N10'].visual.circle(10,20).line(0,0,10,20); // 等同于: new RoomVisual('W10N10').circle(10,20).line(0,0,10,20); ``` ```javascript // 所有房间都会显示该文本: new RoomVisual().text('Some text', 1, 1, {align: 'left'}); ``` -------------------------------- ### 创建 Screeps 用户 (Ubuntu) Source: https://screeps-cn.github.io/contributed/ps_ubuntu 创建一个名为 `screeps` 的新用户,用于运行 Screeps 服务器。禁用密码登录,因为该用户不需要直接登录。 ```bash sudo adduser --disabled-password --gecos "" screeps ``` -------------------------------- ### PathFinder.CostMatrix get() Method Source: https://screeps-cn.github.io/api Retrieves the movement cost for a specified position from the CostMatrix. This method is used to query the custom costs set for pathfinding. ```javascript let costAtPos = costs.get(x, y); ``` -------------------------------- ### Halt and Reset VM - JavaScript Source: https://screeps-cn.github.io/api This command halts the current virtual machine environment and erases all data from its heap. This is an 'Isolated' VM feature, used for a clean reset. ```javascript Game.cpu.halt(); ``` -------------------------------- ### Game.map.getTerrainAt (Deprecated) Source: https://screeps-cn.github.io/api Gets the terrain type at the specified coordinates within a room. This method is deprecated and will be removed soon. Use `Game.map.getRoomTerrain` instead. ```APIDOC ## Game.map.getTerrainAt(x, y, roomName) or Game.map.getTerrainAt(pos) ### Description Gets the terrain type at the specified coordinates within a room. This method works for all rooms, even those that are not accessible. **This method is deprecated and will be removed soon. Please use the more efficient `Game.map.getRoomTerrain` instead.** ### Method `Game.map.getTerrainAt` ### Parameters #### Path Parameters - **x** (number) - Required - The X coordinate within the room. - **y** (number) - Required - The Y coordinate within the room. - **roomName** (string) - Required - The name of the room. - **pos** (RoomPosition) - Required - A RoomPosition object. ### Return Value One of the following string values: - `plain` - `swamp` - `wall` ### Request Example ```javascript // Using coordinates console.log(Game.map.getTerrainAt(25, 20, 'W10N10')); // Using RoomPosition object console.log(Game.map.getTerrainAt(new RoomPosition(25, 20, 'W10N10'))); ``` ``` -------------------------------- ### RawMemory.get: Get Raw Memory String Source: https://screeps-cn.github.io/api Retrieves the raw string representation of the `Memory` object. This can be useful for custom memory serialization or debugging purposes. ```javascript const myMemory = JSON.parse(RawMemory.get()); ```