mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-19 15:54:09 +02:00
DOC: Move all docs into en/ subdirectory (#1505)
* DOC: Move all docs into en/ subdirectory PR #1502 is working on adding a Chinese translation to the docs. In general, I encouraged this (in #1452) as a path towards getting useful translated content in the game without requiring a massive refactor/rearchitecting of everything. To support this, this takes the first step of moving our docs into an en/ subdirectory, so that other languages can live alongside. No effort is made at this time to support or select between alternate languages; this is a pure-rename refactor.
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
# Augmentations
|
||||
|
||||
Advances in science and medicine have led to powerful new technologies that allow people to augment themselves beyond normal human capabilities.
|
||||
There are many different types of Augmentations, ranging from cybernetic to genetic to biological.
|
||||
Acquiring these Augmentations enhances the user's physical and mental faculties.
|
||||
|
||||
Augmentations provide persistent upgrades in the form of multipliers.
|
||||
These multipliers apply to a wide variety of things such as stats, experience gain, and [hacking](hacking.md), just to name a few.
|
||||
The effects of Augmentations stack multiplicatively.
|
||||
Your multipliers can be viewed in the `Character` pages.
|
||||
|
||||
## How to acquire Augmentations
|
||||
|
||||
Because of how powerful Augmentations are, the technology behind them is kept private and secret by the corporations and organizations that create them.
|
||||
Therefore, the only way for the player to obtain Augmentations is through [Factions](factions.md).
|
||||
After joining a [Faction](factions.md) and earning enough [Reputation](reputation.md) in it, you will be able to purchase its Augmentations.
|
||||
Different [Factions](factions.md) offer different Augmentations.
|
||||
Augmentations must be purchased in order to be installed, and they are fairly expensive.
|
||||
They also require [Reputation](reputation.md) with a [Faction](factions.md) before they will let you purchase their Augmentations.
|
||||
|
||||
## Installing Augmentations
|
||||
|
||||
You will not gain the benefits of your purchased Augmentations until you install them.
|
||||
You can choose to install Augmentations through the `Augmentations` menu tab, found under `Character`.
|
||||
|
||||
Unfortunately, installing Augmentations has side effects.
|
||||
You will lose most of the progress you've made, including your skills, stats, and money.
|
||||
You will have to start over, but you will have all of the Augmentations you have installed to help you progress.
|
||||
This is the game's "soft reset" or "prestige" mechanic.
|
||||
|
||||
To summarize, here is a list of everything you will **LOSE** when you install an Augmentation:
|
||||
|
||||
- Stats/Skills
|
||||
- Money
|
||||
- [Scripts](scripts.md) on all [servers](servers.md) EXCEPT your home computer
|
||||
- Purchased [servers](servers.md)
|
||||
- [Hacknet Nodes](hacknet_nodes.md)
|
||||
- [Company](companies.md) / [Faction](factions.md) [Reputation](reputation.md), but you gain [Favor](reputation.md).
|
||||
- Jobs and [Faction](factions.md) memberships
|
||||
- Programs
|
||||
- [Stocks](stockmarket.md)
|
||||
- TOR router
|
||||
|
||||
Here is everything you will **KEEP** when you install an Augmentation:
|
||||
|
||||
- Every Augmentation you have previously installed
|
||||
- [Scripts](scripts.md) on your home computer
|
||||
- [RAM](ram.md) / Core Upgrades on your home computer
|
||||
- [World Stock Exchange account](stockmarket.md) and [TIX API](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.tix.md) Access
|
||||
|
||||
## Purchasing Multiple Augmentations
|
||||
|
||||
You do not have to install an Augmentation right after you purchase it.
|
||||
You can purchase as many Augmentations as you'd like before you choose to install them.
|
||||
When you install your purchased Augmentations they will **ALL** get installed at once.
|
||||
|
||||
There are a few drawbacks to this, however.
|
||||
First, obviously, you won't gain the benefits of your purchased Augmentations until after you install them.
|
||||
Second, purchasing multiple Augmentations before installing them will cause the Augmentations to get progressively more expensive.
|
||||
When you purchase an Augmentation, the price of purchasing another Augmentation doubles.
|
||||
This multiplier stacks for each Augmentation you purchase.
|
||||
Once you install your purchased Augmentations, their costs are reset back to the original prices.
|
||||
You can only purchase each augmentation once, with the exception of `NeuroFlux Governor`, which can be purchased infinitely at increasing cost.
|
||||
@@ -0,0 +1,97 @@
|
||||
# Autocomplete
|
||||
|
||||
The BitBurner terminal offers tab-completion, where pressing tab after typing a command offers suggestions for arguments to pass. You can customize this behavior for your scripts.
|
||||
|
||||
This relies on an exported function named "autocomplete" that is placed _outside_ of main, in the base scope of the script.
|
||||
|
||||
This function must return an array, the contents of which make up the autocomplete options.
|
||||
|
||||
A basic example as a complete script;
|
||||
|
||||
```javascript
|
||||
/**
|
||||
* @param {AutocompleteData} data - context about the game, useful when autocompleting
|
||||
* @param {string[]} args - current arguments, not including "run script.js"
|
||||
* @returns {string[]} - the array of possible autocomplete options
|
||||
*/
|
||||
export function autocomplete(data, args) {
|
||||
return ["argument0", "argument1", "argument2"];
|
||||
}
|
||||
|
||||
/** @param {NS} ns */
|
||||
export function main(ns) {
|
||||
const args = ns.args;
|
||||
ns.tprint(args[0], args[1], args[2]);
|
||||
}
|
||||
```
|
||||
|
||||
Running this script from the terminal like `run script.js` or `./script.js` and pressing tab, would offer "argument0", "argument1" and "argument2" as autocomplete options.
|
||||
|
||||
## AutocompleteData
|
||||
|
||||
To make this feature more useful, an [AutocompleteData](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.autocompletedata.md) object is provided to the autocomplete function that holds information commonly passed as arguments to scripts, such as server names and filenames.
|
||||
|
||||
AutocompleteData is an object with the following properties;
|
||||
|
||||
```javascript
|
||||
{
|
||||
command: // the command being run, as seen on the terminal.
|
||||
enums: // the ns.enums object with various in-game strings.
|
||||
filename: // the name of the script file containing the autocomplete function.
|
||||
hostname: // the name of the host server the script would be running on.
|
||||
processes: // list of all processes running on the current server.
|
||||
servers: // list of all servers in the game. Some servers are hidden until you satisfy their requirements. This array does not contain those servers if you do not satisfy their requirements.
|
||||
txts: // list of all text files on the current server.
|
||||
scripts: // list of all scripts on the current server.
|
||||
flags: // the same flags function as passed with ns. Calling this function adds all the flags as autocomplete arguments.
|
||||
}
|
||||
```
|
||||
|
||||
Here is a more complete example, utilising and returning information from the AutocompleteData object.
|
||||
|
||||
```javascript
|
||||
/**
|
||||
* @param {AutocompleteData} data - context about the game, useful when autocompleting
|
||||
* @param {string[]} args - current arguments, not including "run script.js"
|
||||
* @returns {string[]} - the array of possible autocomplete options
|
||||
*/
|
||||
export function autocomplete(data, args) {
|
||||
const scripts = data.scripts;
|
||||
const servers = data.servers;
|
||||
|
||||
const gymTypesObject = data.enums.GymType; // The data.enums holds the enum information as objects.
|
||||
const gymTypes = Object.values(gymTypesObject); // We are only interested in the string values from the enums object.
|
||||
|
||||
return [...scripts, ...servers, ...gymTypes]; // Offer a list of all servers, all scripts on the current server, and gym jobs ("str", "agi" etc) as autocomplete options.
|
||||
}
|
||||
```
|
||||
|
||||
## args
|
||||
|
||||
The args array is also passed to the autocomplete function as a second parameter. Similar to ns.args passed to `main` in normal scripts, this array contains the arguments currently inputted into the terminal.
|
||||
|
||||
This can be used to remove already passed arguments from the autocomplete suggestions.
|
||||
|
||||
For example;
|
||||
|
||||
```javascript
|
||||
/**
|
||||
* @param {AutocompleteData} data - context about the game, useful when autocompleting
|
||||
* @param {string[]} args - current arguments, not including "run script.js"
|
||||
* @returns {string[]} - the array of possible autocomplete options
|
||||
*/
|
||||
export function autocomplete(data, args) {
|
||||
const servers = data.servers;
|
||||
const serversWithArgsRemoved = servers.filter((server) => !args.includes(server));
|
||||
|
||||
return serversWithArgsRemoved;
|
||||
}
|
||||
```
|
||||
|
||||
In that example typing `run script.js` and pressing tab would initially suggest every server for autocomplete. Then if "n00dles" is added to the arguments and tab is pressed again, "n00dles" would no longer be suggested in subsequent autocomplete calls.
|
||||
|
||||
# Notes
|
||||
|
||||
- The autocomplete function in the file is called each time the tab key is pressed following `run file.js` or `./file.js` in the terminal.
|
||||
- The autocomplete function is separate from `main`, and does not receive an `ns` context as a parameter. This means no `ns` game commands will work in autocomplete functions.
|
||||
- If a multi-element array is returned then multiple options are displayed. If a single-element array is returned then that element is auto-filled to the terminal. This is handy for the "--tail" run argument, for example.
|
||||
@@ -0,0 +1,74 @@
|
||||
# Coding Contracts
|
||||
|
||||
Coding Contracts are a mechanic that lets players earn rewards in exchange for solving programming problems.
|
||||
|
||||
Coding Contracts are files with the `.cct` extension.
|
||||
They can be accessed through the [Terminal](terminal.md) or through [Scripts](scripts.md) using the [Coding Contract API](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.codingcontract.md).
|
||||
|
||||
Each contract has a limited number of attempts.
|
||||
If you provide the wrong answer too many times and exceed the number of attempts, the contract will self destruct (delete itself).
|
||||
|
||||
Coding Contracts are randomly generated and spawn over time. Initially, you'll only see a small range of the easier contracts, but as you progress further through the game more challenging ones will unlock.
|
||||
They can appear on any [server](servers.md) (including your home computer), except for your purchased [servers](servers.md).
|
||||
|
||||
## Running in Terminal
|
||||
|
||||
To run a Coding Contract in the [Terminal](terminal.md), simply use the `run` command:
|
||||
|
||||
$ run some-contract.cct
|
||||
|
||||
Doing this will bring up a popup.
|
||||
The popup will display the contract's problem, the number of attempts remaining, and an area to provide an answer.
|
||||
|
||||
## Interacting through Scripts
|
||||
|
||||
See the [Coding Contract API](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.codingcontract.md).
|
||||
Interacting with Coding Contracts via the [Terminal](terminal.md) can be tedious the more contracts you solve.
|
||||
Consider using the [API](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.codingcontract.md) to automate various aspects of your solution.
|
||||
For example, some contracts have long solutions while others have even longer solutions.
|
||||
You might want to use the [API](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.codingcontract.md) to automate the process of submitting your solution rather than copy and paste a long solution into an answer box.
|
||||
The [Coding Contract API](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.codingcontract.md) can also be used to find out useful information about a contract including the number of attempts you have left, the type of contract and its difficulty.
|
||||
|
||||
However, using the [API](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.codingcontract.md) comes at a cost.
|
||||
Like most functions in other APIs, almost all of the functions in the [Coding Contract API](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.codingcontract.md) have a RAM cost.
|
||||
|
||||
Depending on which function you use, the initial [RAM](ram.md) on your home server might not be enough to allow you to use various [API](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.codingcontract.md) functions.
|
||||
Plan on upgrading the [RAM](ram.md) on your home server if you want to use the [Coding Contract API](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.codingcontract.md).
|
||||
|
||||
The [`getContractTypes`](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.codingcontract.getcontracttypes.md) function is free, and returns a list of all of the contract types currently in the game.
|
||||
|
||||
## Submitting Solutions
|
||||
|
||||
Different contract problem types will require different types of solutions.
|
||||
Some may be numbers, others may be strings or arrays.
|
||||
If a contract asks for a specific solution format, then use that.
|
||||
Otherwise, follow these rules when submitting solutions:
|
||||
|
||||
- String-type solutions should **not** have quotation marks surrounding the string (unless specifically asked for).
|
||||
Only quotation marks that are part of the actual string solution should be included.
|
||||
- Array-type solutions should be submitted with each element in the array separated by commas.
|
||||
Brackets are optional.
|
||||
For example, both of the following are valid solution formats:
|
||||
- `1,2,3`
|
||||
- `[1,2,3]`
|
||||
- If the solution is a multidimensional array, then all arrays that are not the outer-most array DO require the brackets.
|
||||
For example, an array of arrays can be submitted as one of the following:
|
||||
- `[1,2],[3,4]`
|
||||
- `[[1,2],[3,4]]`
|
||||
|
||||
Numeric solutions should be submitted normally, as expected
|
||||
|
||||
## Rewards
|
||||
|
||||
There are currently four possible rewards for solving a Coding Contract:
|
||||
|
||||
- [Faction](factions.md) [Reputation](reputation.md) for a specific [Faction](factions.md)
|
||||
- [Faction](factions.md) [Reputation](reputation.md) for all [Factions](factions.md) that you are a member of
|
||||
- [Company](companies.md) [Reputation](reputation.md) for a specific [Company](companies.md)
|
||||
- Money
|
||||
|
||||
The `amount` of the reward varies based on the difficulty of the problem posed by the Coding Contract.
|
||||
|
||||
## Notes
|
||||
|
||||
- The `scp` [Terminal](terminal.md) command does not work on Coding Contracts
|
||||
@@ -0,0 +1,14 @@
|
||||
# Companies
|
||||
|
||||
When exploring the [World](world.md), you can visit various companies.
|
||||
At these companies, you can apply for jobs.
|
||||
|
||||
Working a job lets you earn money, experience, and [Reputation](reputation.md) with that company.
|
||||
|
||||
While working for a company, you can click `Do something else simultaneously` to be able to do things while you continue to work in the background.
|
||||
There is a 20% penalty to the related gains.
|
||||
Clicking the `Focus` button under the overview will return you to the current work.
|
||||
|
||||
If you've been hired to do a job you can click that `Apply for X Job` button again to get a promotion if you meet the requirements.
|
||||
You can see the requirements by hovering your cursor over the button.
|
||||
Higher positions give increased rewards.
|
||||
@@ -0,0 +1,24 @@
|
||||
# Crimes
|
||||
|
||||
Committing crimes is an active gameplay mechanic that allows the player to train their [Stats](stats.md) and potentially earn money.
|
||||
The player can attempt to commit crimes by visiting `The Slums` through the `City` tab (Alt + w).
|
||||
`The Slums` is available in every city.
|
||||
|
||||
## Basic Mechanics
|
||||
|
||||
When you visit `The Slums` you will see a list of buttons that show all of the available crimes.
|
||||
Simply select one of the options to begin attempting that crime.
|
||||
Attempting to commit a crime takes a certain amount of time.
|
||||
This time varies between crimes.
|
||||
|
||||
While doing crimes, you can click `Do something else simultaneously` to be able to do things while you continue to do crimes in the background.
|
||||
There is a 20% penalty to the related gains.
|
||||
Clicking the `Focus` button under the overview will return you to the current task.
|
||||
|
||||
Crimes are not always successful.
|
||||
Your rate of success is determined by your [Stats](stats.md) and [Augmentations](augmentations.md).
|
||||
The odds can be seen on the crime-selection page.
|
||||
If you are unsuccessful at committing a crime you will gain EXP, but you will not earn money.
|
||||
If you are successful at committing the crime you will gain extra EXP (4x of what an unsuccessful attempt would give) and earn money.
|
||||
|
||||
Harder crimes are typically more profitable, and also give more EXP.
|
||||
@@ -0,0 +1,22 @@
|
||||
# Factions
|
||||
|
||||
Throughout the game you may receive invitations from factions.
|
||||
There are many different factions, and each faction has different criteria for determining its potential members.
|
||||
Joining a faction and furthering its cause is crucial to progressing in the game and unlocking endgame content.
|
||||
|
||||
It is possible to join multiple factions if you receive invitations from them.
|
||||
However, note that joining a faction may prevent you from joining other rival factions.
|
||||
(Don't worry, this usually isn't the case.
|
||||
Also, it would only be temporary since resetting the game by installing [Augmentations](augmentations.md) will clear all your factions)
|
||||
|
||||
The `Factions` link on the menu brings up a list of all factions that you have joined.
|
||||
You can select a Faction on this list to go to that Faction page.
|
||||
This page displays general information about the Faction and also lets you perform work for the faction.
|
||||
Working for a Faction is similar to working for a [Company](companies.md) except that you don't get paid a salary.
|
||||
You will only earn [Reputation](reputation.md) in your Faction and train your [Stats](stats.md).
|
||||
|
||||
Earning [Reputation](reputation.md) for a Faction unlocks powerful [Augmentations](augmentations.md).
|
||||
Purchasing and installing these [Augmentations](augmentations.md) will upgrade your abilities.
|
||||
The [Augmentations](augmentations.md) that are available to unlock vary from Faction to Faction.
|
||||
|
||||
See also the complete [List of Factions and their Requirements](../advanced/faction_list.md) (contains spoilers).
|
||||
@@ -0,0 +1,87 @@
|
||||
# Hacking
|
||||
|
||||
In the year 2077, currency has become digital and decentralized.
|
||||
People and corporations store their money on [servers](servers.md).
|
||||
By hacking these [servers](servers.md), you can steal their money and gain experience.
|
||||
|
||||
## Gaining Root Access
|
||||
|
||||
The first step to hacking a [server](servers.md) is to gain root access to that [server](servers.md).
|
||||
This can be done using the `NUKE.exe` virus.
|
||||
You start the game with a copy of the `NUKE.exe` virus on your home computer.
|
||||
The `NUKE.exe` virus attacks the target [server](servers.md)'s open ports using buffer overflow exploits.
|
||||
When successful, you are granted root administrative access to the machine.
|
||||
|
||||
In order for the `NUKE.exe` virus to succeed, the target [server](servers.md) needs to have enough open ports.
|
||||
Some [servers](servers.md) have no security and will not need any ports opened.
|
||||
Some will have very high security and will need many ports opened.
|
||||
In order to open ports on another [server](servers.md), you will need to run programs that attack the [server](servers.md) to open specific ports.
|
||||
These programs can be coded once your hacking skill gets high enough, or they can be purchased if you can find a seller.
|
||||
|
||||
**There are two ways to execute port-opening programs and the NUKE virus:**
|
||||
|
||||
- Connect to the target [server](servers.md) through the [Terminal](terminal.md) and use the `run` command: `$ run [programName]`
|
||||
- Use a function:
|
||||
- `nuke`
|
||||
- `brutessh`
|
||||
- `ftpcrack`
|
||||
- `relaysmtp`
|
||||
- `httpworm`
|
||||
- `sqlinject`
|
||||
|
||||
**There are two ways to determine how many ports need to be opened
|
||||
on a [server](servers.md) in order to successfully NUKE it:**
|
||||
|
||||
- Connect to that [server](servers.md) through the [Terminal](terminal.md) and use the `analyze` command.
|
||||
- Use the `getServerNumPortsRequired` function.
|
||||
|
||||
Once you have enough ports opened on a [server](servers.md) and have ran the NUKE virus to gain root access, you will be able to hack it.
|
||||
|
||||
### For specific details of how Hacking work "offline"
|
||||
|
||||
See [Offline And Bonus Time](../advanced/offlineandbonustime.md).
|
||||
|
||||
## General Hacking Mechanics
|
||||
|
||||
When you execute the `hack` command, either manually through the [Terminal](terminal.md) or automatically through a script, you attempt to hack the [server](servers.md).
|
||||
This action takes time.
|
||||
The more advanced a [server](servers.md)'s security is, the more time it will take.
|
||||
Your hacking skill level also affects the hacking time, with a higher hacking skill leading to shorter hacking times.
|
||||
Also, running the hack command manually through [Terminal](terminal.md)
|
||||
is faster than hacking from a script.
|
||||
|
||||
Your attempt to hack a [server](servers.md) will not always succeed.
|
||||
The chance you have to successfully hack a [server](servers.md) is also determined by the [server](servers.md)'s security and your hacking skill level.
|
||||
Even if your hacking attempt is unsuccessful, you will still gain experience points.
|
||||
|
||||
When you successfully hack a [server](servers.md).
|
||||
You steal a certain percentage of that [server](servers.md)'s total money.
|
||||
This percentage is, once again, determined by the [server](servers.md)'s security and your hacking skill level.
|
||||
The amount of money on a [server](servers.md) is not limitless.
|
||||
So, if you constantly hack a [server](servers.md) and deplete its money, then you will encounter diminishing returns in your hacking (since you are only hacking a certain percentage).
|
||||
You can increase the amount of money on a [server](servers.md) using a script and the `grow` function.
|
||||
|
||||
## Server Security
|
||||
|
||||
Each [server](servers.md) has a security level, typically between `1` and `100`.
|
||||
A higher number means the [server](servers.md) has stronger security.
|
||||
|
||||
As mentioned above, a [server](servers.md)'s security level is an important factor to consider when hacking.
|
||||
You can check a [server](servers.md)'s security level using the `analyze` [Terminal](terminal.md) command.
|
||||
You can also check a [server](servers.md)'s security in a script, using the `getServerSecurityLevel` function.
|
||||
|
||||
Whenever a [server](servers.md) is hacked manually or through a script, its security level increases by a small amount.
|
||||
Calling the `grow` function in a script will also increase security level of the target [server](servers.md).
|
||||
These actions will make it harder for you to hack the [server](servers.md), and decrease the amount of money you can steal.
|
||||
You can lower a [server](servers.md)'s security level in a script using the `weaken` function.
|
||||
|
||||
Each server has a minimum security level. The [server](servers.md)'s security level will not fall below this value if you try to `weaken` it. You can get this value with the `getServerMinSecurityLevel` function.
|
||||
|
||||
## Backdoors
|
||||
|
||||
[Servers](servers.md) that can be hacked can also have backdoors installed.
|
||||
These backdoors will provide you with a benefit - the services may be cheaper, penalties may be reduced or there may be other results.
|
||||
Honeypots exist and will let factions know when you have succeeded at backdooring their system.
|
||||
Once you have a backdoor installed, you can connect to that [server](servers.md) directly.
|
||||
|
||||
When you visit a location in the city and see that the name is partially scrambled, this indicates that you have backdoored the [server](servers.md) related to the location.
|
||||
@@ -0,0 +1,9 @@
|
||||
# Hacknet nodes
|
||||
|
||||
This distributed network of computers allows you to gain passive income.
|
||||
By upgrading a node's level, RAM, and CPU cores you can increase the amount of money it earns.
|
||||
You can also purchase new nodes to expand your Hacknet - The cost for each node increases as your network grows.
|
||||
|
||||
**Hacknet nodes won't make as much money as basic hacking scripts, and they are not enough to progress alone.**
|
||||
|
||||
Later in the game, there is a powerful change to the Hacknet system called [Hacknet Servers](../advanced/hacknetservers.md).
|
||||
@@ -0,0 +1,93 @@
|
||||
# Infiltration
|
||||
|
||||
Infiltration is a gameplay mechanic that allows you to infiltrate a [Company](companies.md)'s facility to try and steal the [Company](companies.md)'s classified secrets.
|
||||
These secrets can be sold for money or for [Reputation](reputation.md) with a [Faction](factions.md).
|
||||
|
||||
## Overview
|
||||
|
||||
Many companies have facilities that you can attempt to infiltrate.
|
||||
By infiltrating, you can steal classified [Company](companies.md) secrets and then sell these for money or for [Faction](factions.md) [Reputation](reputation.md).
|
||||
To try and infiltrate a [Company](companies.md), visit a [Company](companies.md) through the [World](world.md) menu.
|
||||
There will be an option that says 'Infiltrate [Company](companies.md)'.
|
||||
|
||||
When infiltrating a [Company](companies.md), you will be presented with short active challenges.
|
||||
|
||||
- None of the challenges uses the mouse.
|
||||
- Most challenges use spacebar as the `action`.
|
||||
- Some challenges use WASD or arrows interchangeably.
|
||||
- A few others use the rest of the keyboard.
|
||||
|
||||
Each location that can be infiltrated has 3 important values:
|
||||
|
||||
- Difficulty: It affects how difficult the challenges are. This value depends on your "common" stats (combat stats and charisma). It's reduced when you improve your stats. It is not recommended to attempt infiltrations when the difficulty is above normal.
|
||||
- Max clearance level: It is the number of challenges you need to pass to receive the infiltration reward.
|
||||
- Starting security level: It affects the difficulty and rewards.
|
||||
|
||||
Every time you successfully complete an infiltration challenge and go to the higher clearance level, the "effective" difficulty is increased. The difficulty value in the introduction screen is the initial value for the first clearance level. When you go to higher levels, this value will be increased, so the challenges will become harder.
|
||||
|
||||
Every time you fail an infiltration challenge, you will take damage based on the starting security level of the location.
|
||||
If your HP is reduced to 0, you will be hospitalized, and the infiltration will immediately end.
|
||||
|
||||
Infiltration rewards depend on:
|
||||
|
||||
- Max clearance level. Higher max clearance level = Higher rewards.
|
||||
- Starting security level. Higher starting security level = Higher rewards.
|
||||
- Your stats' **multipliers** (**NOT** skill levels). **Lower** multipliers = Higher rewards.
|
||||
- "SoA - phyzical WKS harmonizer" augmentation.
|
||||
- An endgame stat [1]. You will know what it is when you reach the endgame.
|
||||
- An endgame multiplier [2]. You will know what it is when you reach the endgame.
|
||||
|
||||
The most common misconception of infiltration rewards is that they depend on skill levels. This is wrong. The rewards do **NOT** depend on skill levels. They depend on stats' multipliers. When you install augmentations that improve stats' multipliers, the rewards are reduced.
|
||||
|
||||
In some special cases, you may observe this behavior: When you install augmentations or soft reset, your skill levels drop to 1 and infiltration rewards are increased. Some players mistakenly think that this is why infiltrations should be done with low stats to optimize the rewards. This is totally wrong. Again, infiltration rewards do **NOT** depend on skill levels. In these special cases, the rewards are increased because stats' **multipliers** are reduced due to losing bonuses from other mechanics (IPvGO and some endgame mechanics).
|
||||
|
||||
Raising raw values of stats (skill levels) is one of the proper ways to optimize the infiltration. Having higher stats does not increase the rewards, but it allows you to infiltrate harder locations (higher max clearance level, higher starting security level, easier to complete more infiltrations in the same time frame, etc.).
|
||||
|
||||
Proper ways to optimize the infiltration (with the same [2] and the same stats' multipliers) are:
|
||||
|
||||
- Raise stats. Do NOT purposely keep them low. Having higher stats does not increase the rewards, but it allows you to infiltrate harder locations. Training at gyms, committing crimes, and working for companies/factions are good and easy ways to raise stats without changing stats' multipliers.
|
||||
- Infiltrate harder locations after getting higher stats (higher max clearance level, higher starting security level, easier to complete more infiltrations in the same time frame, etc.).
|
||||
- Increase [1].
|
||||
- Buy SoA augmentations (especially "SoA - phyzical WKS harmonizer").
|
||||
|
||||
## Challenge list
|
||||
|
||||
### Attack the distracted sentinel
|
||||
|
||||
Press space bar to attack when the sentinel drops his guard and is distracted. Do not alert him!
|
||||
|
||||
There are 3 phases:
|
||||
|
||||
1. Guarding - The sentinel is guarding. Attacking will result in a failure.
|
||||
2. Distracted - The sentinel is distracted. Attacking will result in a victory.
|
||||
3. Alerted - The sentinel is alerted. Attacking will result in a failure.
|
||||
|
||||
### Close the brackets
|
||||
|
||||
Enter all the matching brackets in reverse order.
|
||||
|
||||
### Type it backward
|
||||
|
||||
Type the words that are written backward.
|
||||
|
||||
### Say something nice about the guard.
|
||||
|
||||
Use the arrows to find a compliment for the guard.
|
||||
|
||||
### Enter the Code!
|
||||
|
||||
Match the arrows as they appear.
|
||||
|
||||
### Match the symbols!
|
||||
|
||||
Move the cursor to the matching symbol and press space to confirm.
|
||||
|
||||
### Remember all the mines!
|
||||
|
||||
At first, the cursor cannot be moved - remember the positions of the mines.
|
||||
Next, move the cursor and press space to mark the mines on the board.
|
||||
|
||||
### Cut the wires
|
||||
|
||||
Follow the instructions and press the numbers `1` through `9` to cut the appropriate
|
||||
wires.
|
||||
@@ -0,0 +1,16 @@
|
||||
## Programs
|
||||
|
||||
In Bitburner "Programs" refer specifically to the list of `.exe` files found in the Programs tab of the side menu.
|
||||
|
||||
Unlike [scripts](scripts.md) you write for yourself with JavaScript, Programs are supplied to you by Bitburner and are only "programs" in name; they do not require or allow you to access actual lines of code. Instead once you have a Program you will be able to use it directly as a function in the [Terminal](terminal.md) or scripts.
|
||||
|
||||
[n00dles /]> run BruteSSH.exe
|
||||
[n00dles /]> scan-analyze 10
|
||||
|
||||
or
|
||||
|
||||
ns.sqlinject("n00dles")
|
||||
|
||||
After meeting the [Hacking Skill level](stats.md) threshold shown on each Program, you have the option to Create Program, allowing you to do that as a focused or unfocused activity. The time needed to create a Program generally increases with their level requirement, and scales with your [stats](stats.md).
|
||||
|
||||
Alternatively, you may also find the same Programs available for purchase by connecting to the in-game `Darkweb`, accessed after finding a tech store in a City and purchasing Tor [("The Onion Router")](<https://en.wikipedia.org/wiki/Tor_(network)>).
|
||||
@@ -0,0 +1,8 @@
|
||||
# RAM
|
||||
|
||||
In Bitburner, RAM determines how many [Scripts](scripts.md) can run on a [Server](servers.md).
|
||||
|
||||
Multiplying the number of threads a [Script](scripts.md) uses multiplies its RAM cost, but also multiplies the effectiveness of several functions such as `ns.hack()`, `ns.grow()`, and `ns.weaken()`.
|
||||
|
||||
You can purchase more RAM for your home computer from tech vendors.
|
||||
You can also use other purchased or hacked servers as a source of additional RAM.
|
||||
@@ -0,0 +1,14 @@
|
||||
# Reputation
|
||||
|
||||
In order to acquire [Augmentations](augmentations.md) from [Factions](factions.md), you need to earn their trust.
|
||||
|
||||
This can be done in a variety of ways, but the most common is offering your services to a [Faction](factions.md).
|
||||
Another option is to give them intel from [Infiltrations](infiltration.md).
|
||||
|
||||
When installing [Augmentations](augmentations.md), all your reputation gets converted to favor.
|
||||
Favor increases the rate at which reputation is gained with that faction.
|
||||
|
||||
With enough favor, donations are unlocked.
|
||||
Donations allow you to spend money to acquire reputation directly.
|
||||
Without working for the faction.
|
||||
This feature is particularly useful when a very large amount of reputation is needed for an augmentation.
|
||||
@@ -0,0 +1,162 @@
|
||||
# Before you start
|
||||
|
||||
It is highly recommended that you have a basic familiarity with programming concepts like [`for`/`while` loops](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for), [conditionals like `if`/`else`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else), [`functions`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions),[`arrays`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) and [`variables`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) before starting to write scripts - but you can start with basic skills and learn with practice.
|
||||
|
||||
If you'd like to first learn a bit about programming, see [this page](../programming/learn.md).
|
||||
|
||||
# Scripts
|
||||
|
||||
Scripts you write in Bitburner are real, working JavaScript and can be used to automate basic hacking logic, and almost any mechanic in the game.
|
||||
|
||||
Running any script requires in-game [RAM](ram.md), with a minimum cost of 1.6 GB per script.
|
||||
More complex scripts and API functions generally require more [RAM](ram.md), which you will gain in many ways.
|
||||
Scripts can be run on any [server](servers.md) you have root access to, but not all servers you find will have useable RAM.
|
||||
|
||||
## How Scripts work offline
|
||||
|
||||
Being actual JavaScript, Bitburner also contains some quirks and limitations.
|
||||
For this reason, it is not possible for Bitburner scripts to run the same way at all times.
|
||||
However, you will continue to earn money and exp when Bitburner is not running, though at a slower rate.
|
||||
See [How Scripts Work Offline](../advanced/offlineandbonustime.md) for more details.
|
||||
|
||||
## Identifying a Script
|
||||
|
||||
Many commands and functions target other scripts running on the same or a different server.
|
||||
Therefore, there must be a way to specify which script you want to affect.
|
||||
|
||||
One way to identify a script is by its unique PID (Process IDentifier).
|
||||
A PID number is returned from `ns.run()`, `ns.exec()`, etc; and is also shown in the output of `ns.ps()`.
|
||||
|
||||
A second way to identify scripts is by filename, hostname **and** arguments.
|
||||
However, you will probably run multiple copies of a script with the same arguments, so this method is not necessarily **unique** to a script.
|
||||
In case of multiple matches, most functions will return an arbitrary one (typically the oldest).
|
||||
|
||||
If searching by filename, arguments must be an **exact** match - both the order and [type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) of the arguments you supply matter.
|
||||
|
||||
## Referencing Other Scripts
|
||||
|
||||
In order to reference a file, `functions` require the **full** absolute file path.
|
||||
For example
|
||||
|
||||
ns.run("/scripts/hacking/helpers.myHelperScripts.js");
|
||||
ns.rm("/logs/myHackingLogs.txt");
|
||||
ns.rm("thisIsAFileInTheRootDirectory.txt");
|
||||
|
||||
A full file path **must** begin with a forward slash (/) if that file is not in the root directory.
|
||||
For details on references in terminal commands, see [Terminal](terminal.md).
|
||||
|
||||
## Script Arguments
|
||||
|
||||
When running a script, you can use [flags](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.ns.flags.md) and [arguments](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.ns.args.md), which the script's logic can access and act on, allowing flexibility in your script designs. For example allowing you to get different results or attack different targets without re-writing your code:
|
||||
|
||||
$ run hack.js "harakiri-sushi"
|
||||
$ run hack.js "silver-helix"
|
||||
|
||||
## Multithreading scripts
|
||||
|
||||
A script can be run with multiple threads, which we call "multithreading."
|
||||
Multithreading affects every call to the `ns.hack()`, `ns.grow()`, and `ns.weaken()` methods, multiplying their effects by the number of threads used.
|
||||
For example, if a script run with 1 thread is able to hack \$10,000, then running the same script with 5 threads would hack \$50,000.
|
||||
|
||||
[Note -- Scripts will not actually become multithreaded in the real-world sense - Javascript is a "single-threaded" coding language.]
|
||||
|
||||
When "multithreading" a script, the total [RAM](ram.md) cost can be calculated by simply multiplying the [RAM](ram.md) cost of a single instance of your script by the number of threads you will use. [See [`ns.getScriptRam()`](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.ns.getscriptram.md) or the `mem` terminal command detailed below]
|
||||
|
||||
## Never-ending scripts
|
||||
|
||||
Sometimes it might be necessary for a script to never end and keep doing a particular task.
|
||||
In that case you would want to write your script in a never-ending loop, like `while (true)`.
|
||||
|
||||
However, if you are not careful, this can crash your game.
|
||||
If the code inside the loop doesn't `await` for some time, it will never give other scripts and the game itself time to process.
|
||||
|
||||
To help you find this potential bug, any `while (true)` loop without any `await` statement inside it will be marked.
|
||||
A red decoration will appear on the left side of the script editor, telling you about the issue.
|
||||
|
||||
If you are really sure that this is not an oversight, you can suppress the warning using the comment `// @ignore-infinite` directly above the loop.
|
||||
|
||||
## Working with Scripts in Terminal
|
||||
|
||||
Here are some [terminal](terminal.md) commands you will find useful when working with scripts:
|
||||
|
||||
**check [script] [args...]**
|
||||
|
||||
Prints the logs of the script specified by the name and arguments to [Terminal](terminal.md).
|
||||
Remember that scripts are uniquely identified by their arguments as well as their name, and
|
||||
Arguments should be separated by a space.
|
||||
For example, if you ran a script `foo.js` with the argument `foodnstuff` then in order to 'check' it you must also add `foodnstuff` as an argument for the `check` command:
|
||||
|
||||
$ check foo.js foodnstuff
|
||||
|
||||
**free**
|
||||
|
||||
Shows the current server's [RAM](ram.md) usage and availability
|
||||
|
||||
**kill [pid]** or **kill [script] [args...]**
|
||||
|
||||
Stops a script that is running with the specified PID, or script name and arguments.
|
||||
Remember that scripts are identified by their arguments as well as their name, and
|
||||
Arguments should be separated by a space.
|
||||
For example, if you ran a script `foo.js` with the arguments `1` and `2`, then just typing `kill foo.js` will not work.
|
||||
Instead use:
|
||||
|
||||
$ kill foo.js 1 2
|
||||
|
||||
**mem [script] [-t] [n]**
|
||||
|
||||
Check how much [RAM](ram.md) a script requires to run with "n" threads
|
||||
|
||||
$ mem [scriptname] -t n
|
||||
$ mem hack.js -t 500
|
||||
|
||||
**nano [script]**
|
||||
|
||||
Create/Edit a script.
|
||||
The name of a script must end with a script extension (.js, .jsx, .ts, .tsx). You can also create a text file with a text extension (.txt, .json).
|
||||
|
||||
**ps**
|
||||
|
||||
Displays all scripts that are actively running on the current [server](servers.md)
|
||||
|
||||
**rm [script]**
|
||||
|
||||
Permanently delete a script from the [server](servers.md). Can only be undone with a save import.
|
||||
|
||||
**run [script] [-t] [n] [args...]**
|
||||
|
||||
Run a script with n threads and the specified arguments.
|
||||
Each argument should be separated by a space.
|
||||
Both the thread count and arguments are optional.
|
||||
If neither are specified, then the script will be run with a single thread and no arguments.
|
||||
|
||||
Examples:
|
||||
|
||||
Run `foo.js` single-threaded with no arguments::
|
||||
|
||||
$ run foo.js
|
||||
|
||||
Run `foo.js` with 10 threads and no arguments:
|
||||
|
||||
$ run foo.js -t 10
|
||||
|
||||
Run `foo.js` single-threaded with three arguments: `[foodnstuff, sigma-cosmetics, 10]`:
|
||||
|
||||
$ run foo.js foodnstuff sigma-cosmetics 10
|
||||
|
||||
Run `foo.js` with 50 threads and a single argument: `foodnstuff`:
|
||||
|
||||
$ run foo.js -t 50 foodnstuff
|
||||
|
||||
**tail [pid]** or **tail [script] [args...]**
|
||||
|
||||
Displays the logs of the script specified by the PID or filename and arguments.
|
||||
Remember that scripts are identified by their arguments as well as their filename.
|
||||
For example, if you ran a script `foo.js` with the argument `foodnstuff`, in order to `tail` it you must also add the `foodnstuff` argument to the `tail` command as so:
|
||||
|
||||
$ tail foo.js foodnstuff
|
||||
|
||||
**top**
|
||||
|
||||
Prints all scripts running on the server and their [RAM](ram.md) usage.
|
||||
|
||||
$ top
|
||||
@@ -0,0 +1,58 @@
|
||||
# Servers
|
||||
|
||||
In this game, a server refers to a computer that can be connected to, accessed, and manipulated through the [Terminal](terminal.md).
|
||||
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](terminal.md) page.
|
||||
|
||||
## Server Statistics
|
||||
|
||||
Each server has its own statistics, such as [RAM](ram.md), 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](ram.md), which refers to how much memory is available on that machine. [RAM](ram.md) is important because it is required to run [Scripts](scripts.md).
|
||||
More [RAM](ram.md) allows the user to run more powerful and complicated [scripts](scripts.md), as well as executing scripts with more threads.
|
||||
|
||||
The `free`, `scan-analyze`, and `analyze` [Terminal](terminal.md) commands can be used to check how much [RAM](ram.md) a server has.
|
||||
|
||||
Some servers have some randomized statistics, such as [RAM](ram.md), 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](terminal.md) commands in the game that will require you to target a specific server by hostname.
|
||||
|
||||
## Player-owned Servers
|
||||
|
||||
The player starts with a single server: his/her 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](ram.md) can be upgraded.
|
||||
This can be done by visiting certain locations in the [World](world.md).
|
||||
- The home computer persists through [Augmentation](augmentations.md) installations.
|
||||
This means that you will not lose any [RAM](ram.md) upgrades or [Scripts](scripts.md) on your home computer when you install [Augmentations](augmentations.md)
|
||||
(you will, however, lose programs and messages on your home computer).
|
||||
|
||||
The player can also purchase additional servers.
|
||||
This can be done by visiting certain locations in the [World](world.md), or it can be done automatically through a script using the `purchaseServer` function.
|
||||
The advantage of purchased servers is that, in terms of [RAM](ram.md), they are cheaper than upgrading your home computer.
|
||||
The disadvantage is that your purchased servers are lost when you install [Augmentations](augmentations.md).
|
||||
|
||||
## Hackable Servers
|
||||
|
||||
Most servers that are not owned by the player can be [hacked](hacking.md) 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](augmentations.md).
|
||||
In general, the further away from home computer a server is the higher its statistics are.
|
||||
@@ -0,0 +1,66 @@
|
||||
Below are some of the stats that will increase with play and reset during augmentation installs as you progress through the game.
|
||||
Your stats can be found in the Overview panel, the Stats subpage of the side menu, or with API methods like `ns.getPlayer()`.
|
||||
|
||||
## Hack Skill
|
||||
|
||||
For many aspects of Bitburner, increasing your Hack skill will be an important goal. Primarily affected by the efficiency of your hacking strategies, you will also be offered [Augmentations](augmentations.md) that greatly enhance your Hack Skill level and how effective its results are.
|
||||
|
||||
Affects:
|
||||
|
||||
- Time needed to execute `hack`, `grow`, or `weaken` and similar methods
|
||||
- Your chance to successfully hack a server
|
||||
- Percent of a server's money stolen when hacking it
|
||||
- Success rate of certain [crimes](crimes.md)
|
||||
- Time needed to create a [Program](programs.md)
|
||||
- [Faction](factions.md) [Reputation](reputation.md) gain when carrying out Hacking Contracts or Field Work
|
||||
- [Company](companies.md) [Reputation](reputation.md) gain for certain jobs
|
||||
|
||||
Gain Hack experience by:
|
||||
|
||||
- Manually hacking servers through the [Terminal](terminal.md)
|
||||
- Using `ns.hack()`, `ns.grow()`, or `ns.weaken()` through scripts
|
||||
- Committing certain [crimes](crimes.md)
|
||||
- Carrying out Hacking Contracts or doing Field work for [Factions](factions.md)
|
||||
- Some [Company](companies.md) jobs and other types of work
|
||||
- Studying at a university
|
||||
|
||||
## Combat Skills
|
||||
|
||||
### Strength, Defense, Dexterity, and Agility
|
||||
|
||||
These represent your physical skill and attributes, including your ability to sneak, inflict or endure damage, and pull off high precision tasks. Similar to your Hack skill, you will be offered [Faction](factions.md) [Augmentations](augmentations.md) to multiplicatively enhance your Combat Skills and exp gain.
|
||||
|
||||
Affects:
|
||||
|
||||
- HP scales with Defense. Infiltration and some jobs may cause you to take damage.
|
||||
- Success rate of certain [crimes](crimes.md)
|
||||
- [Faction](factions.md) [Reputation](reputation.md) gain for Security and Field Work
|
||||
- [Company](companies.md) [Reputation](reputation.md) gain for certain jobs
|
||||
|
||||
Gain experience by:
|
||||
|
||||
- Working out at a gym
|
||||
- Committing certain [crimes](crimes.md)
|
||||
- Doing Security or Field Work for a [Faction](factions.md)
|
||||
- Working certain jobs at a [Company](companies.md)
|
||||
|
||||
## Charisma
|
||||
|
||||
Rarely as useful as Hacking and Physical skills, Charisma can help get a company job, gain trust, or calm chaos in social situations.
|
||||
|
||||
Charisma can also be enhanced with [Augmentations](augmentations.md).
|
||||
|
||||
Affects:
|
||||
|
||||
- Success rate of certain [crimes](crimes.md)
|
||||
- [Faction](factions.md) [Reputation](reputation.md) gain for Field Work
|
||||
- [Company](companies.md) [Reputation](reputation.md) gain for most jobs
|
||||
|
||||
Gain experience by:
|
||||
|
||||
- Committing certain [crimes](crimes.md)
|
||||
- Studying at a university
|
||||
- Working certain jobs at a [Company](companies.md)
|
||||
- Doing Field work for a [Faction](factions.md)
|
||||
|
||||
### Other Stats and abilities are available in later stages of the game.
|
||||
@@ -0,0 +1,185 @@
|
||||
# Stock Market
|
||||
|
||||
The Stock Market refers to the World Stock Exchange (WSE), through which you can buy and sell stocks in order to make money.
|
||||
|
||||
The WSE can be found in the `City` tab, and is accessible in every city.
|
||||
|
||||
## Fundamentals
|
||||
|
||||
The Stock Market is not as simple as "buy at price X and sell at price Y".
|
||||
The following are several fundamental concepts you need to understand about the stock market.
|
||||
|
||||
For those that have experience with finance/trading/investing, please be aware that the game's stock market does not function exactly like it does in the real world.
|
||||
So these concepts below should seem similar, but won't be exactly the same.
|
||||
|
||||
## Positions: Long vs Short
|
||||
|
||||
First off, note that _all_ transactions have a flat commission fee, so
|
||||
high-frequency trading is not a good strategy.
|
||||
|
||||
When making a transaction on the stock market, there are two types of positions: Long and Short.
|
||||
A Long position is the typical scenario where you buy a stock and earn a profit if the price of that stock increases.
|
||||
Meanwhile, a Short position is the exact opposite.
|
||||
|
||||
In a Short position, you borrow shares of a stock to sell and earn a profit if the price of that stock decreases.
|
||||
This is also called 'shorting' a stock. The proceeds from the sale are held as
|
||||
collateral, called 'margin'. You also have to add additional margin equal to
|
||||
the current value of the stock - this is the cost to 'purchase' the short.
|
||||
|
||||
When you close a short position, you buy back the shares to pay back the securities loan.
|
||||
You then get the margin back, minus whatever was used to repurchase the shares.
|
||||
So, your profit is still the change in price times the number of shares.
|
||||
Beware that, unlike Long positions which have unlimited upside and limited
|
||||
downside, shorts have limited upside and unlimited downside, and selling a
|
||||
sufficiently underwater short can cause your money to go negative.
|
||||
|
||||
Shorting stocks is not available immediately, and must be unlocked later in the game.
|
||||
|
||||
## Forecast & Second-Order Forecast
|
||||
|
||||
A stock's forecast is its likelihood of increasing or decreasing in value.
|
||||
The forecast is typically represented by its probability of increasing in either a decimal or percentage form.
|
||||
For example, a forecast of `70%` means the stock has a `70%` chance of increasing and a `30%` chance of decreasing.
|
||||
|
||||
A stock's second-order forecast is the target value that its forecast trends towards.
|
||||
For example, if a stock has a forecast of `60%` and a second-order forecast of `70%`, then the stock's forecast should slowly trend towards `70%` over time.
|
||||
However, this is determined by RNG so there is a chance that it may never reach `70%`.
|
||||
|
||||
Both the forecast and the second-order forecast change over time.
|
||||
|
||||
A stock's forecast can be viewed after purchasing Four Sigma (4S) Market Data access.
|
||||
This lets you see the forecast info on the Stock Market UI.
|
||||
If you also purchase access to the 4S Market Data TIX API, then you can view a stock's forecast using the `getStockForecast` function.
|
||||
|
||||
A stock's second-order forecast is always hidden.
|
||||
|
||||
## Spread (Bid Price & Ask Price)
|
||||
|
||||
The **bid price** is the maximum price at which someone will buy a stock on the stock market.
|
||||
|
||||
The **ask price** is the minimum price that a seller is willing to receive for a stock on the stock market
|
||||
|
||||
The ask price will always be higher than the bid price (This is because if a seller is willing to receive less than the bid price, that transaction is guaranteed to happen).
|
||||
The difference between the bid and ask price is known as the **spread**.
|
||||
A stock's "price" will be the average of the bid and ask price.
|
||||
|
||||
The bid and ask price are important because these are the prices at which a transaction actually occurs.
|
||||
If you purchase a stock in the long position, the cost of your purchase depends on that stock's ask price.
|
||||
If you then try to sell that stock (still in the long position), the price at which you sell is the stock's bid price.
|
||||
Note that this is reversed for a short position.
|
||||
Purchasing a stock in the short position will occur at the stock's bid price, and selling a stock in the short position will occur at the stock's ask price.
|
||||
|
||||
## Transactions Influencing Stock Forecast
|
||||
|
||||
Buying or selling a large number of shares of a stock will influence that stock's forecast & second-order forecast.
|
||||
The forecast is the likelihood that the stock will increase or decrease in price.
|
||||
The magnitude of this effect depends on the number of shares being transacted.
|
||||
More shares will have a bigger effect.
|
||||
|
||||
The effect that transactions have on a stock's second-order forecast is significantly smaller than the effect on its forecast.
|
||||
|
||||
## Order Types
|
||||
|
||||
There are three different types of orders you can make to buy or sell stocks on the exchange:
|
||||
Market Order, Limit Order, and Stop Order.
|
||||
|
||||
Limit Orders and Stop Orders are not available immediately, and must be unlocked later in the game.
|
||||
|
||||
When you place a Market Order to buy or sell a stock, the order executes immediately at whatever the current price of the stock is.
|
||||
For example if you choose to short a stock with 5000 shares using a Market Order, you immediately purchase those 5000 shares in a Short position at whatever the current market price is for that stock.
|
||||
|
||||
A Limit Order is an order that only executes under certain conditions.
|
||||
A Limit Order is used to buy or sell a stock at a specified price or better.
|
||||
For example, lets say you purchased a Long position of 100 shares of some stock at a price of \$10 per share.
|
||||
You can place a Limit Order to sell those 100 shares at \$50 or better.
|
||||
The Limit Order will execute when the price of the stock reaches a value of \$50 or higher.
|
||||
|
||||
A Stop Order is the opposite of a Limit Order.
|
||||
It is used to buy or sell a stock at a specified price (before the price gets 'worse').
|
||||
For example, lets say you purchased a Short position of 100 shares of some stock at a price of \$100 per share.
|
||||
The current price of the stock is \$80 (a profit of \$20 per share).
|
||||
You can place a Stop Order to sell the Short position if the stock's price reaches \$90 or higher.
|
||||
This can be used to lock in your profits and limit any losses.
|
||||
|
||||
Here is a summary of how each order works and when they execute:
|
||||
|
||||
**In a LONG Position:**
|
||||
|
||||
A Limit Order to buy will execute if the stock's price <= order's price
|
||||
|
||||
A Limit Order to sell will execute if the stock's price >= order's price
|
||||
|
||||
A Stop Order to buy will execute if the stock's price >= order's price
|
||||
|
||||
A Stop Order to sell will execute if the stock's price <= order's price
|
||||
|
||||
**In a SHORT Position:**
|
||||
|
||||
A Limit Order to buy will execute if the stock's price >= order's price
|
||||
|
||||
A Limit Order to sell will execute if the stock's price <= order's price
|
||||
|
||||
A Stop Order to buy will execute if the stock's price <= order's price
|
||||
|
||||
A Stop Order to sell will execute if the stock's price >= order's price.
|
||||
|
||||
## Player Actions Influencing Stocks
|
||||
|
||||
It is possible for your actions elsewhere in the game to influence the stock market.
|
||||
|
||||
### Hacking
|
||||
|
||||
If a server has a corresponding stock (e.g. _foodnstuff_ server -> FoodNStuff stock), then hacking that server can decrease the stock's second-order forecast.
|
||||
This causes the corresponding stock's forecast to trend downwards in value over time.
|
||||
|
||||
This effect only occurs if you set the stock option to true when calling the `hack` function.
|
||||
The chance that hacking a server will cause this effect is based on what percentage of the server's total money you steal.
|
||||
|
||||
A single hack will have a minor effect, but continuously hacking a server for lots of money over time will have a noticeable effect in making the stock's forecast trend downwards.
|
||||
|
||||
### Growing
|
||||
|
||||
If a server has a corresponding stock (e.g. `foodnstuff` server -> FoodNStuff stock), then growing that server's money can increase the stock's second-order forecast.
|
||||
This causes the corresponding stock's forecast to trend upwards in value over time.
|
||||
|
||||
This effect only occurs if you set the `stock` option to true when calling the `grow` function.
|
||||
The chance that growing a server will cause this effect is based on what percentage of the server's total money to add to it.
|
||||
|
||||
A single grow operation will have a minor effect, but continuously growing a server for lots of money over time will have a noticeable effect in making the stock's forecast trend upwards.
|
||||
|
||||
### Working for a Company
|
||||
|
||||
If a [Company](companies.md) has a corresponding stock, then working for that [Company](companies.md) will increase the corresponding stock's second-order forecast.
|
||||
This will cause the stock's forecast to (slowly) trend upwards in value over time.
|
||||
|
||||
The potency of this effect is based on how effective you are when you work (i.e. it's based on your stats and multipliers).
|
||||
|
||||
## Automating the Stock Market
|
||||
|
||||
You can write scripts to perform automatic and algorithmic trading on the Stock Market.
|
||||
See [TIX API](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.tix.md) for more details.
|
||||
|
||||
## Under the Hood
|
||||
|
||||
Stock prices are updated every ~6 seconds.
|
||||
|
||||
Whether a stock's price moves up or down is random.
|
||||
However, stocks have properties that can influence the way their price moves.
|
||||
These properties are hidden, although some of them can be made visible by purchasing the Four Sigma (4S) Market Data upgrade.
|
||||
Some examples of these properties are:
|
||||
|
||||
- Volatility
|
||||
- Likelihood of increasing or decreasing (i.e. the stock's forecast)
|
||||
- Likelihood of forecast increasing or decreasing (i.e. the stock's second-order forecast)
|
||||
- How easily a stock's price/forecast is influenced by transactions
|
||||
- Spread percentage
|
||||
- Maximum price (not a real maximum, more of a "soft cap")
|
||||
|
||||
Each stock has its own unique values for these properties.
|
||||
|
||||
## Offline Progression
|
||||
|
||||
The Stock Market does not change or process anything while the game has closed.
|
||||
However, it does accumulate time when offline.
|
||||
This accumulated time allows the stock market to run `50%` faster when the game is opened again.
|
||||
This means that stock prices will update every ~4 seconds instead of 6.
|
||||
@@ -0,0 +1,102 @@
|
||||
# Terminal
|
||||
|
||||
The Terminal is a console emulator program that lets you interface with other [Servers](servers.md) in the game.
|
||||
It can be accessed by clicking the `Terminal` tab on the navigation menu on the left-hand side of the game (you may need to expand the 'Hacking' header in order to see the `Terminal` tab).
|
||||
Alternatively, the shortcut Alt + t can be used to open the Terminal.
|
||||
|
||||
## Filesystem (Directories)
|
||||
|
||||
The Terminal contains a very basic filesystem to help you organize files into different directories.
|
||||
Note that this is **not** a _true_ filesystem implementation and instead relies almost entirely on string manipulation.
|
||||
For this reason, some features found in real-world filesystems do not exist in our Terminal. For example:
|
||||
|
||||
- Tab autocompletion does not work with relative paths
|
||||
- **`mv` and `rm` commands only accept full filepaths in their arguments.**
|
||||
**They do not act on directories.**
|
||||
|
||||
These features are typically in Linux filesystems and have not yet been added to the game.
|
||||
|
||||
## Directories
|
||||
|
||||
In order to create a directory, simply name a file using a full absolute Linux-style path:
|
||||
|
||||
/scripts/myScript.js
|
||||
|
||||
This will automatically create a "directory" called `scripts`.
|
||||
This will also work for subdirectories:
|
||||
|
||||
/scripts/hacking/helpers/myHelperScripts.js
|
||||
|
||||
Files in the root directory do not need to begin with a forward slash:
|
||||
|
||||
thisIsAFileInTheRootDirectory.txt
|
||||
|
||||
Note that **there is no way to manually create or remove directories.**
|
||||
Creation and deletion of "directories" is automatically handled as you create, rename, or delete files in game.
|
||||
|
||||
## Absolute vs Relative Paths
|
||||
|
||||
Many Terminal commands accept both absolute and relative paths for specifying a file.
|
||||
|
||||
An absolute path specifies the location of the file from the root directory (/).
|
||||
Any path that begins with the forward slash is an absolute path:
|
||||
|
||||
$ nano /scripts/myScript.js
|
||||
$ cat /serverList.txt
|
||||
|
||||
A relative path specifies the location of the file relative to the current working directory.
|
||||
Any path that does **not** begin with a forward slash is a relative path.
|
||||
Note that the Linux-style dot symbols will work for relative paths:
|
||||
|
||||
. (a single dot) - represents the current directory
|
||||
.. (two dots) - represents the parent directory
|
||||
|
||||
$ cd ..
|
||||
$ nano ../scripts/myScript.js
|
||||
$ nano ../../helper.js
|
||||
|
||||
For additional details about specifying paths and references in scripts, see [Scripts](scripts.md).
|
||||
|
||||
## Argument Parsing
|
||||
|
||||
When evaluating a terminal command, arguments are initially parsed based on whitespace (usually spaces).
|
||||
Each whitespace character signifies the end of an argument, and potentially the start of new one.
|
||||
For most terminal commands, this is all you need to know.
|
||||
|
||||
When running scripts, however, it may be important to know specific detail, especially two main points:
|
||||
|
||||
- Quotation marks can be used to wrap a single argument and force it to be parsed as a string.
|
||||
Any whitespace inside the quotation marks will not cause a new argument to be parsed.
|
||||
- Anything that can represent a number is automatically cast to a number, unless it's surrounded by quotation marks.
|
||||
|
||||
Here's an example to show how these rules work.
|
||||
Consider the following script `argType.js`:
|
||||
|
||||
export async function main(ns) {
|
||||
ns.tprint("Number of args: " + ns.args.length);
|
||||
for (var i = 0; i < ns.args.length; ++i) {
|
||||
ns.tprint(typeof ns.args[i]);
|
||||
}
|
||||
}
|
||||
|
||||
Then if we run the following terminal command:
|
||||
|
||||
$ run argType.js 123 1e3 "5" "this is a single argument"
|
||||
|
||||
We'll see the following in the Terminal:
|
||||
|
||||
Running script with 1 thread(s), pid 1 and args: [123, 1000, "5", "this is a single argument"].
|
||||
argType.js: Number of args: 4
|
||||
argType.js: number
|
||||
argType.js: number
|
||||
argType.js: string
|
||||
argType.js: string
|
||||
|
||||
## Chaining Commands
|
||||
|
||||
You can run multiple Terminal commands at once by separating each command
|
||||
with a semicolon (;). For example:
|
||||
|
||||
$ run foo.js; tail foo.js
|
||||
|
||||
Chained commands do **not** wait for functions like `hack` or `wget` to finish executing, and so may not always work as expected.
|
||||
@@ -0,0 +1,13 @@
|
||||
# World
|
||||
|
||||
In Bitburner, the world consists of six different cities:
|
||||
|
||||
- Sector-12 (this is where you start out)
|
||||
- Aevum
|
||||
- Ishima
|
||||
- New Tokyo
|
||||
- Chongqing
|
||||
- Volhaven
|
||||
|
||||
Each city has its own map and [Factions](factions.md).
|
||||
Each city also offers different services such as gyms, universities, hardware stores, and places of work.
|
||||
Reference in New Issue
Block a user