* Convert purchased server functions to cloud API - Create `ns.cloud` - Change `bitnode multipliers` and `server constants` wording for consistency - change `server`, `ram` and `getting started` docs for consistency - Added changes to 3.0.0 API Break and `setRemovedFunctions` in NetscriptFunctions.js Tested by - running tutorial `purchase-server-8gb.js`, and a more typical player one - buying manually using vendor (Alpha Ent in Sector 12) - deleting them all using script, and checked all deleted functions gave correct error - Imported completed save to ensure auto-transfer of function work * Revision in line with comments - changed more `purchased` to `cloud` references - Added BN mults auto-conversion * Update getting_started.md - Corrected function names for new `cloud API` * Don't show `cloud API` warning v3.0.0 API break auto-replaces `cloud` functions, not warning suggested. * API Break correction - `cloud` affected API break replacement changed to be more descriptive and functional * Fix typo and add empty lines * Update many things (check commit's description) - Comments - Terminal message - UI Text - TSDoc - md docs - Improve error messages in src\NetscriptFunctions\Cloud.ts
3.5 KiB
Servers
In this game, a server refers to a computer that can be connected to, accessed, and manipulated through the Terminal. All servers in the game are connected to each other to form a large, global network. To learn about how to navigate this network and connect to other servers, see the terminal page.
Server Statistics
Each server has its own statistics, such as RAM, required hacking level, and number of ports required to successfully NUKE it.
Perhaps the most important property of a server to make note of is its RAM, which refers to how much memory is available on that machine. RAM is important because it is required to run Scripts. More RAM allows the user to run more powerful and complicated scripts, as well as executing scripts with more threads.
The free, scan-analyze, and analyze Terminal commands can be used to check how much RAM a server has.
Some servers have some randomized statistics, such as RAM, max Money, or required hacking level. These statistics are randomly generated from a range of values.
Identifying Servers
A server is identified by its hostname.
A hostname is a label assigned to a server.
A hostname will usually give you a general idea of what the server is.
For example, the company Nova Medical might have a server with the hostname nova-med.
Hostnames are unique.
This means that if one server has the the hostname some-server, then no other server in the game can have that that hostname.
There are many functions and terminal commands in the game that will require you to target a specific server by hostname.
Cloud Servers
The player starts with a single server: their home computer.
This server will have the hostname home.
The player's home computer is special for a variety of reasons:
- The home computer's RAM can be upgraded. This can be done by visiting certain locations in the World.
- The home computer persists through Augmentation installations. This means that you will not lose any RAM upgrades or Scripts on your home computer when you install Augmentations (you will, however, lose programs and messages on your home computer).
The player can also purchase access to additional cloud servers for their use. These are virtual machines hosted remotely that the player has access to.
This can be done by visiting certain locations in the World, or it can be done automatically through a script using the purchaseServer function in the Cloud API.
The advantage of cloud servers is that, in terms of RAM, they are cheaper than upgrading your home computer.
The disadvantage is that access to your cloud servers is lost when you install Augmentations, and you will need to purchase access again.
Hackable Servers
Most servers that are not owned by the player can be hacked for money and exp.
Different servers have different levels of security, but also offer different rewards when being hacked.
Server Connections
The servers are in a randomly organized tree-structure. The distance from the home computer to each server is fixed, but the exact route to them is randomized when you install augmentations. In general, the further away from home computer a server is the higher its statistics are.