mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-26 16:07:33 +01:00
DOCS: Updates to basic documentations (#788)
This commit is contained in:
parent
7b2e8e5312
commit
3c42880185
27
src/Documentation/doc/advanced/offlineandbonustime.md
Normal file
27
src/Documentation/doc/advanced/offlineandbonustime.md
Normal file
@ -0,0 +1,27 @@
|
||||
# How Scripts Work Offline
|
||||
|
||||
The scripts you write and execute in the BitVerse are real, working JavaScript.
|
||||
For this reason, it is not possible for Bitburner scripts to run when
|
||||
|
||||
- the game is closed
|
||||
- the browser tab is inactive (if playing Bitburner in a web browser)
|
||||
- or your system is sleeping
|
||||
|
||||
all of which we call being "offline" for game purposes.
|
||||
|
||||
It is important to know that logic such as `if`/`else` statements and most functions such as `ns.purchaseHacknetNode()`, `ns.hack()`, and `ns.nuke()` will not work while the game is offline.
|
||||
|
||||
However, scripts WILL continue to generate money and hacking exp for you while offline.
|
||||
This offline production is based on the average online production of all your hacking scripts since your last augmentation, as shown on your Active Scripts page.
|
||||
|
||||
`ns.grow()` and `ns.weaken()` methods are also applied when the game is offline, although at a slower rate.
|
||||
This is done by having each script track the rate at which the `ns.grow()` and `ns.weaken()` commands are called while online,
|
||||
then determining how many calls would have been made while offline, and their effect is applied.
|
||||
|
||||
Also, note that because of the way the JavaScript engine works, whenever you reload or re-open the game all of your Active Scripts will start again from the BEGINNING of their code. The game does not keep track of where exactly the execution of a script is when it saves/loads.
|
||||
|
||||
# Bonus Time
|
||||
|
||||
Because of the above details, some activities in Bitburner accumulate "Bonus Time" while the game is closed or in an inactive browser tab . For mechanics that have a Bonus Time effect, the rate of the associated activity or task is significantly increased.
|
||||
|
||||
For example if a certain [Bladeburner](bladeburners.md) contract requires 15 seconds to complete under normal conditions, the same task will be finished instead in 3 seconds if the Bonus Time effect is 5x. The specific details and effects of Bonus Time vary by mechanic.
|
@ -37,6 +37,10 @@ on a [server](servers.md) in order to successfully NUKE it:**
|
||||
|
||||
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).
|
||||
|
@ -1,9 +1,9 @@
|
||||
# Hacknet nodes
|
||||
|
||||
This distributed network of computers allows you to gain money passively.
|
||||
By upgrading a node's stats you can increase the amount of money it earns.
|
||||
If the cost gets too high, it is also possile to purchase brand new 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 scripts, but they can be useful at the start.
|
||||
**Hacknet nodes won't make as much money as basic hacking scripts, and they are not enough to progress alone.**
|
||||
|
||||
There is a very powerful upgrade to them called [Hacknet Servers](../advanced/hacknetservers.md)
|
||||
Later in the game, there is a powerful change to the Hacknet system called [Hacknet Servers](../advanced/hacknetservers.md).
|
||||
|
16
src/Documentation/doc/basic/programs.md
Normal file
16
src/Documentation/doc/basic/programs.md
Normal file
@ -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 `.js` [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)>).
|
@ -5,4 +5,4 @@ In Bitburner, RAM determines how many [Scripts](scripts.md) can run on a [Server
|
||||
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 computers as source of additional RAM.
|
||||
You can also use other purchased or hacked servers as a source of additional RAM.
|
||||
|
@ -1,64 +1,77 @@
|
||||
# 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 are programs that can be used to automate the hacking process and almost every other part of the game.
|
||||
Scripts must be written in JavaScript.
|
||||
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.
|
||||
|
||||
It is highly recommended that you have a basic background in programming to start writing scripts.
|
||||
You by no means need to be an expert.
|
||||
All you need is some familiarity with basic programming constructs like `for`/`while` loops, conditionals (`if`/`else`), `functions`, `variables`, etc.
|
||||
If you'd like to learn a little bit about programming, see [this page](../programming/learn.md).
|
||||
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](server.md) you have root access to, but not all servers you find will have useable RAM.
|
||||
|
||||
## Script Arguments
|
||||
## How Scripts work offline
|
||||
|
||||
When running a script, you can choose to pass arguments to that script.
|
||||
The script's logic can access and act on these arguments.
|
||||
This allows for flexibility in your scripts.
|
||||
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 act on an executing script (i.e. a script that is running).
|
||||
Therefore, there must be a way to specify which script you want those commands & functions to act on.
|
||||
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.
|
||||
|
||||
The best way to identify a script is by its PID (Process IDentifier).
|
||||
This unique number is returned from `run`, `exec`, etc., and also shows in the output of `ps`.
|
||||
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 secondary way to identify scripts is by name **and** arguments.
|
||||
However (by default) you can run a multiple copies of a script with the same arguments, so this does not necessarily **uniquely** identify a script.
|
||||
In case of multiple matches, most functions will return an arbitrary one (typically the first one to be started).
|
||||
An exception is `kill`, which will kill all the matching scripts.
|
||||
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).
|
||||
|
||||
The arguments must be an **exact** match.
|
||||
This means that both the order and type of the arguments matter.
|
||||
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/bec737a25307be29c7efef147fc31effca65eedc/markdown/bitburner.ns.flags.md) and [arguments](https://github.com/bitburner-official/bitburner-src/blob/bec737a25307be29c7efef147fc31effca65eedc/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.
|
||||
This is also called multithreading.
|
||||
The effect of multithreading is that every call to the `hack`, `grow`, and `weaken` functions will have their results multiplied by the number of threads.
|
||||
For example, if a normal single-threaded script is able to hack $10,000, then running the same script with 5 threads would yield $50,000.
|
||||
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.
|
||||
|
||||
(This is the **only** affect of running a script with multiple threads.
|
||||
Scripts will not actually become multithreaded in the real-world sense.)
|
||||
[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 base [RAM](ram.md) cost of the script with the number of threads, where the base cost refers to the amount of [RAM](ram.md) required to run the script single-threaded.
|
||||
In the [terminal](terminal.md), you can run the `mem` [Terminal](terminal.md) command to see how much [RAM](ram.md) a script requires with `n` threads:
|
||||
|
||||
$ mem [scriptname] -t n
|
||||
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/bec737a25307be29c7efef147fc31effca65eedc/markdown/bitburner.ns.getscriptram.md) or the `mem` terminal command detailed below]
|
||||
|
||||
## Working with Scripts in Terminal
|
||||
|
||||
Running a script requires [RAM](ram.md).
|
||||
The more complex a script is, the more [RAM](ram.md) it requires to run.
|
||||
Scripts can be run on any [server](server.md) you have root access to.
|
||||
|
||||
Here are some [terminal](terminal.md) commands that are useful when working with scripts:
|
||||
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.
|
||||
Remember that scripts are uniquely identified by their arguments as well as their name.
|
||||
For example, if you ran a script `foo.js` with the argument `foodnstuff` then in order to 'check' it you must also add the `foodnstuff` argument to the check command::
|
||||
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
|
||||
|
||||
@ -69,21 +82,24 @@ 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.
|
||||
Remember that scripts are identified by their arguments as well as their name.
|
||||
For example, if you ran a script `foo.js` with the argument 1 and 2, then just typing `kill foo.js` will not work.
|
||||
You have to use:
|
||||
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
|
||||
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 the script must end with `.js`
|
||||
The name of a script must end with `.js`, but you can also create `.txt` files.
|
||||
|
||||
**ps**
|
||||
|
||||
@ -91,14 +107,14 @@ Displays all scripts that are actively running on the current [server](servers.m
|
||||
|
||||
**rm [script]**
|
||||
|
||||
Delete a script from the [server](servers.md). This is permanent
|
||||
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 arguments and thread specification are optional.
|
||||
If neither are specified, then the script will be run single-threaded with no arguments.
|
||||
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:
|
||||
|
||||
@ -110,36 +126,24 @@ 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` 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` 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 name and arguments.
|
||||
Note that scripts are identified by their arguments as well as their name.
|
||||
For example, if you ran a script `foo.js` with the argument `foodnstuff` then in order to `tail` it you must also add the `foodnstuff` argument to the tail command as so: `tail foo.js foodnstuff`
|
||||
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**
|
||||
|
||||
Displays all active scripts and their [RAM](ram.md) usage
|
||||
Prints all scripts running on the server and their [RAM](ram.md) usage.
|
||||
|
||||
## Notes about how Scripts work offline
|
||||
|
||||
The scripts that you write and execute are in JavaScript.
|
||||
For this reason, it is not possible for these scripts to run while offline (when the game is closed).
|
||||
It is important to note that for this reason, conditionals such as `if`/`else` statements and certain commands such as `purchaseHacknetNode()` or `nuke()` will not work while the game is offline.
|
||||
|
||||
However, Scripts WILL continue to generate money and hacking exp for you while the game is offline.
|
||||
This offline production is based off of the scripts' production while the game is online.
|
||||
|
||||
`grow()` and `weaken()` are two functions that will also be applied when the game is offline, although at a slower rate compared to if the game was open.
|
||||
This is done by having each script keep track of the rate at which the `grow()` and `weaken()` commands are called when the game is online.
|
||||
These calculated rates are used to determine how many times these function calls would be made while the game is offline.
|
||||
|
||||
Also, note that because of the way the JavaScript engine works, whenever you reload or re-open the game all of the scripts that you are running will start running from the BEGINNING of the code.
|
||||
The game does not keep track of where exactly the execution of a script is when it saves/loads.
|
||||
$ top
|
||||
|
@ -1,103 +1,54 @@
|
||||
# Stats
|
||||
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 sidemenu, or with API methods like `ns.getPlayer()`.
|
||||
|
||||
The player has several stats that can be increased in order to progress in the game.
|
||||
## Hack Skill
|
||||
|
||||
## Hacking
|
||||
|
||||
Represents the player's ability to code and hack.
|
||||
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 it takes to hack a server
|
||||
- Time it takes to execute the `grow()` and `weaken()` function
|
||||
- Chance to successfully hack a server
|
||||
- Percent of money stolen when hacking a server
|
||||
- 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 it takes to create a program
|
||||
- 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 experience by:
|
||||
Gain Hack experience by:
|
||||
|
||||
- Manually hacking servers through [Terminal](terminal.md)
|
||||
- Executing `hack()`, `grow()`, or `weaken()` through a script
|
||||
- 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)
|
||||
- Working certain jobs at a [Company](companies.md)
|
||||
- Some [Company](companies.md) jobs and other types of work
|
||||
- Studying at a university
|
||||
|
||||
## Strength
|
||||
## Combat Skills
|
||||
|
||||
Represents the player's physical offensive power
|
||||
### 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:
|
||||
|
||||
- Committing certain [crimes](crimes.md)
|
||||
- Working out at a gym
|
||||
- Doing Security/Field Work for a [Faction](factions.md)
|
||||
- Working certain jobs at a [Company](companies.md)
|
||||
|
||||
## Defense
|
||||
|
||||
Represents the player's ability to withstand damage
|
||||
|
||||
Affects:
|
||||
|
||||
- Success rate of certain [crimes](crimes.md)
|
||||
- The player's HP
|
||||
- [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:
|
||||
|
||||
- Committing certain [crimes](crimes.md)
|
||||
- Working out at a gym
|
||||
- Doing Security/Field Work for a [Faction](factions.md)
|
||||
- Working certain jobs at a [Company](companies.md)
|
||||
|
||||
## Dexterity
|
||||
|
||||
Represents the player's skill and adeptness in performing certain tasks
|
||||
|
||||
Affects:
|
||||
|
||||
- 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:
|
||||
|
||||
- Committing certain [crimes](crimes.md)
|
||||
- Working out at a gym
|
||||
- Doing Security/Field Work for a [Faction](factions.md)
|
||||
- Working certain jobs at a [Company](companies.md)
|
||||
|
||||
## Agility
|
||||
|
||||
Represents the player's speed and ability to move
|
||||
|
||||
Affects:
|
||||
|
||||
- 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:
|
||||
|
||||
- Committing certain [crimes](crimes.md)
|
||||
- Working out at a gym
|
||||
- Doing Security/Field Work for a [Faction](factions.md)
|
||||
- Doing Security or Field Work for a [Faction](factions.md)
|
||||
- Working certain jobs at a [Company](companies.md)
|
||||
|
||||
## Charisma
|
||||
|
||||
Represents the player's social abilities
|
||||
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:
|
||||
|
||||
@ -109,5 +60,7 @@ Gain experience by:
|
||||
|
||||
- Committing certain [crimes](crimes.md)
|
||||
- Studying at a university
|
||||
- Working a relevant job at a [Company](companies.md)
|
||||
- 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.
|
||||
|
@ -1,21 +1,20 @@
|
||||
# Terminal
|
||||
|
||||
The Terminal is a console emulator program that lets you interface with all of the [Servers](servers.md) in the game.
|
||||
The Terminal 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).
|
||||
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 that allows you to store and organize your files into different directories.
|
||||
Note that this is **not** a true filesystem implementation.
|
||||
Instead, it is done almost entirely using string manipulation.
|
||||
For this reason, many of the nice & useful features you'd find in a real filesystem do not exist.
|
||||
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:
|
||||
|
||||
Here are the Terminal commands you'll commonly use when dealing with the filesystem.
|
||||
- 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.**
|
||||
|
||||
- `ls` (view all files in the current folder)
|
||||
- `cd` (change folder)
|
||||
- `mv` (rename a file)
|
||||
These features are typically in Linux filesystems and have not yet been added to the game.
|
||||
|
||||
## Directories
|
||||
|
||||
@ -32,8 +31,8 @@ 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.
|
||||
The creation and deletion of directories is automatically handled as you name/rename/delete files.
|
||||
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
|
||||
|
||||
@ -56,24 +55,7 @@ Note that the Linux-style dot symbols will work for relative paths:
|
||||
$ nano ../scripts/myScript.js
|
||||
$ nano ../../helper.js
|
||||
|
||||
## Scripts
|
||||
|
||||
Note that 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.
|
||||
|
||||
## Missing Features
|
||||
|
||||
These features that are typically in Linux filesystems have not yet been added to the game:
|
||||
|
||||
- Tab autocompletion does not work with relative paths
|
||||
- `mv` only accepts full filepaths for the destination argument.
|
||||
It does not accept directories
|
||||
For additional details about specifying paths and references in scripts, see [Scripts](scripts.md).
|
||||
|
||||
## Argument Parsing
|
||||
|
||||
@ -81,8 +63,7 @@ When evaluating a terminal command, arguments are initially parsed based on whit
|
||||
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 is important to know in more detail how arguments are parsed.
|
||||
There are two main points:
|
||||
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.
|
||||
@ -114,10 +95,8 @@ We'll see the following in the Terminal:
|
||||
## Chaining Commands
|
||||
|
||||
You can run multiple Terminal commands at once by separating each command
|
||||
with a semicolon (;).
|
||||
|
||||
Example:
|
||||
with a semicolon (;). For example:
|
||||
|
||||
$ run foo.js; tail foo.js
|
||||
|
||||
This does **not** wait for commands with a delay to finish executing, so it generally doesn't work with things like `hack`, `wget`, etc.
|
||||
Chained commands do **not** wait for functions like `hack` or `wget` to finish executing, and so may not always work as expected.
|
||||
|
@ -1,30 +1,26 @@
|
||||
# Getting Started Guide for Beginner Programmers
|
||||
|
||||
_Note_: The [Scripts](../basic/scripts.md) and strategies given in this guide aren't necessarily optimal.
|
||||
They're just meant to introduce you to the game and help you get started.
|
||||
_Note_: The [Scripts](../basic/scripts.md) and strategies in this guide aren't necessarily optimal or comperhensive.
|
||||
This guide is tailored to help those with minimal programming knowledge experience Bitburner during early stages of the game.
|
||||
|
||||
This is an introductory guide to getting started with Bitburner.
|
||||
It is not meant to be a comprehensive guide for the entire game, only the early stages.
|
||||
If you are confused or overwhelmed by the game, especially the programming and scripting aspects, this guide is perfect for you!
|
||||
|
||||
Note that this guide is tailored towards those with minimal programming experience.
|
||||
If you are confused or overwhelmed by the game, especially the coding and scripting aspects, this guide is perfect for you!
|
||||
|
||||
## Introduction
|
||||
|
||||
Bitburner is a cyberpunk-themed incremental RPG.
|
||||
The player progresses by raising their [Stats](../basic/stats.md), earning money, and climbing the corporate ladder.
|
||||
Eventually, after reaching certain criteria, the player will begin receiving invitations from [Factions](../basic/factions.md).
|
||||
Joining these [Factions](../basic/factions.md) and working for them will unlock [Augmentations](../basic/augmentations.md).
|
||||
Purchasing and installing [Augmentations](../basic/augmentations.md) provides persistent upgrades and is necessary for progressing in the game.
|
||||
You will progress by raising your [Stats](../basic/stats.md), earning money, and with practice, advancing your real-world coding skills.
|
||||
After reaching certain criteria, you will receive invitations from in-game [Factions](../basic/factions.md).
|
||||
Joining [Factions](../basic/factions.md) and working for them will unlock various [Augmentations](../basic/augmentations.md),
|
||||
which are purchased and "installed," adding a persistent bonus to [stats](../basic/stats.md) and other abilities. Working with Factions and installing Augmentations is a basic step for progressing in Bitburner.
|
||||
|
||||
The game has a minimal story/quest-line that can be followed to reach the end of the game.
|
||||
Since this guide is only about getting started with Bitburner, it will not cover the entire "quest-line".
|
||||
The game has an open, minimalistic storyline that can be played in multiple ways to reach your goals.
|
||||
Since this guide is written as a basic introduction to Bitburner, it will not expose the entire scope or storyline available.
|
||||
|
||||
## First Steps
|
||||
|
||||
I'm going to assume you followed the introductory tutorial when you first began the game.
|
||||
In this introductory tutorial, you created a [Script](../basic/scripts.md) called `n00dles.js` and ran it on the `n00dles` server.
|
||||
Right now, we'll kill this [Script](../basic/scripts.md). There are two ways to do this:
|
||||
Now, we'll kill this [Script](../basic/scripts.md). There are two ways to do this:
|
||||
|
||||
- You can go to the Terminal and enter: `$ kill n00dles.js`
|
||||
- You can go to the `Active Scripts` page (Alt + s) and press the `Kill Script` button for `n00dles.js`.
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
## [Beginners guide](help/getting_started.md)
|
||||
|
||||
## Mechanics
|
||||
## Basic Mechanics
|
||||
|
||||
- [stats](basic/stats.md)
|
||||
- [terminal](basic/terminal.md)
|
||||
@ -16,6 +16,7 @@
|
||||
- [factions](basic/factions.md)
|
||||
- [crimes](basic/crimes.md)
|
||||
- [infiltration](basic/infiltration.md)
|
||||
- [programs](basic/programs.md)
|
||||
- [reputation](basic/reputation.md)
|
||||
- [stockmarket](basic/stockmarket.md)
|
||||
- [world](basic/world.md)
|
||||
@ -30,6 +31,7 @@
|
||||
- [Grafting](advanced/grafting.md)
|
||||
- [Hacknet Servers](advanced/hacknetservers.md)
|
||||
- [Intelligence](advanced/intelligence.md)
|
||||
- [Offline Scripts and Bonus Time](advanced/offlineandbonustime.md)
|
||||
- [Sleeves](advanced/sleeves.md)
|
||||
- [Source-Files](advanced/sourcefiles.md)
|
||||
- [Stanek's Gift](advanced/stanek.md)
|
||||
|
@ -6,36 +6,38 @@ import file3 from "!!raw-loader!./doc/advanced/gang.md";
|
||||
import file4 from "!!raw-loader!./doc/advanced/grafting.md";
|
||||
import file5 from "!!raw-loader!./doc/advanced/hacknetservers.md";
|
||||
import file6 from "!!raw-loader!./doc/advanced/intelligence.md";
|
||||
import file7 from "!!raw-loader!./doc/advanced/sleeves.md";
|
||||
import file8 from "!!raw-loader!./doc/advanced/sourcefiles.md";
|
||||
import file9 from "!!raw-loader!./doc/advanced/stanek.md";
|
||||
import file10 from "!!raw-loader!./doc/basic/augmentations.md";
|
||||
import file11 from "!!raw-loader!./doc/basic/codingcontracts.md";
|
||||
import file12 from "!!raw-loader!./doc/basic/companies.md";
|
||||
import file13 from "!!raw-loader!./doc/basic/crimes.md";
|
||||
import file14 from "!!raw-loader!./doc/basic/factions.md";
|
||||
import file15 from "!!raw-loader!./doc/basic/hacking.md";
|
||||
import file16 from "!!raw-loader!./doc/basic/hacknet_nodes.md";
|
||||
import file17 from "!!raw-loader!./doc/basic/infiltration.md";
|
||||
import file18 from "!!raw-loader!./doc/basic/ram.md";
|
||||
import file19 from "!!raw-loader!./doc/basic/reputation.md";
|
||||
import file20 from "!!raw-loader!./doc/basic/scripts.md";
|
||||
import file21 from "!!raw-loader!./doc/basic/servers.md";
|
||||
import file22 from "!!raw-loader!./doc/basic/stats.md";
|
||||
import file23 from "!!raw-loader!./doc/basic/stockmarket.md";
|
||||
import file24 from "!!raw-loader!./doc/basic/terminal.md";
|
||||
import file25 from "!!raw-loader!./doc/basic/world.md";
|
||||
import file26 from "!!raw-loader!./doc/changelog.md";
|
||||
import file27 from "!!raw-loader!./doc/help/bitnode_order.md";
|
||||
import file28 from "!!raw-loader!./doc/help/getting_started.md";
|
||||
import file29 from "!!raw-loader!./doc/help/tools_and_resources.md";
|
||||
import file30 from "!!raw-loader!./doc/index.md";
|
||||
import file31 from "!!raw-loader!./doc/migrations/v1.md";
|
||||
import file32 from "!!raw-loader!./doc/migrations/v2.md";
|
||||
import file33 from "!!raw-loader!./doc/programming/game_frozen.md";
|
||||
import file34 from "!!raw-loader!./doc/programming/hackingalgorithms.md";
|
||||
import file35 from "!!raw-loader!./doc/programming/learn.md";
|
||||
import file36 from "!!raw-loader!./doc/programming/remote_api.md";
|
||||
import file7 from "!!raw-loader!./doc/advanced/offlineandbonustime.md";
|
||||
import file8 from "!!raw-loader!./doc/advanced/sleeves.md";
|
||||
import file9 from "!!raw-loader!./doc/advanced/sourcefiles.md";
|
||||
import file10 from "!!raw-loader!./doc/advanced/stanek.md";
|
||||
import file11 from "!!raw-loader!./doc/basic/augmentations.md";
|
||||
import file12 from "!!raw-loader!./doc/basic/codingcontracts.md";
|
||||
import file13 from "!!raw-loader!./doc/basic/companies.md";
|
||||
import file14 from "!!raw-loader!./doc/basic/crimes.md";
|
||||
import file15 from "!!raw-loader!./doc/basic/factions.md";
|
||||
import file16 from "!!raw-loader!./doc/basic/hacking.md";
|
||||
import file17 from "!!raw-loader!./doc/basic/hacknet_nodes.md";
|
||||
import file18 from "!!raw-loader!./doc/basic/infiltration.md";
|
||||
import file19 from "!!raw-loader!./doc/basic/programs.md";
|
||||
import file20 from "!!raw-loader!./doc/basic/ram.md";
|
||||
import file21 from "!!raw-loader!./doc/basic/reputation.md";
|
||||
import file22 from "!!raw-loader!./doc/basic/scripts.md";
|
||||
import file23 from "!!raw-loader!./doc/basic/servers.md";
|
||||
import file24 from "!!raw-loader!./doc/basic/stats.md";
|
||||
import file25 from "!!raw-loader!./doc/basic/stockmarket.md";
|
||||
import file26 from "!!raw-loader!./doc/basic/terminal.md";
|
||||
import file27 from "!!raw-loader!./doc/basic/world.md";
|
||||
import file28 from "!!raw-loader!./doc/changelog.md";
|
||||
import file29 from "!!raw-loader!./doc/help/bitnode_order.md";
|
||||
import file30 from "!!raw-loader!./doc/help/getting_started.md";
|
||||
import file31 from "!!raw-loader!./doc/help/tools_and_resources.md";
|
||||
import file32 from "!!raw-loader!./doc/index.md";
|
||||
import file33 from "!!raw-loader!./doc/migrations/v1.md";
|
||||
import file34 from "!!raw-loader!./doc/migrations/v2.md";
|
||||
import file35 from "!!raw-loader!./doc/programming/game_frozen.md";
|
||||
import file36 from "!!raw-loader!./doc/programming/hackingalgorithms.md";
|
||||
import file37 from "!!raw-loader!./doc/programming/learn.md";
|
||||
import file38 from "!!raw-loader!./doc/programming/remote_api.md";
|
||||
|
||||
interface Document {
|
||||
default: string;
|
||||
@ -48,33 +50,35 @@ AllPages["advanced/gang.md"] = file3;
|
||||
AllPages["advanced/grafting.md"] = file4;
|
||||
AllPages["advanced/hacknetservers.md"] = file5;
|
||||
AllPages["advanced/intelligence.md"] = file6;
|
||||
AllPages["advanced/sleeves.md"] = file7;
|
||||
AllPages["advanced/sourcefiles.md"] = file8;
|
||||
AllPages["advanced/stanek.md"] = file9;
|
||||
AllPages["basic/augmentations.md"] = file10;
|
||||
AllPages["basic/codingcontracts.md"] = file11;
|
||||
AllPages["basic/companies.md"] = file12;
|
||||
AllPages["basic/crimes.md"] = file13;
|
||||
AllPages["basic/factions.md"] = file14;
|
||||
AllPages["basic/hacking.md"] = file15;
|
||||
AllPages["basic/hacknet_nodes.md"] = file16;
|
||||
AllPages["basic/infiltration.md"] = file17;
|
||||
AllPages["basic/ram.md"] = file18;
|
||||
AllPages["basic/reputation.md"] = file19;
|
||||
AllPages["basic/scripts.md"] = file20;
|
||||
AllPages["basic/servers.md"] = file21;
|
||||
AllPages["basic/stats.md"] = file22;
|
||||
AllPages["basic/stockmarket.md"] = file23;
|
||||
AllPages["basic/terminal.md"] = file24;
|
||||
AllPages["basic/world.md"] = file25;
|
||||
AllPages["changelog.md"] = file26;
|
||||
AllPages["help/bitnode_order.md"] = file27;
|
||||
AllPages["help/getting_started.md"] = file28;
|
||||
AllPages["help/tools_and_resources.md"] = file29;
|
||||
AllPages["index.md"] = file30;
|
||||
AllPages["migrations/v1.md"] = file31;
|
||||
AllPages["migrations/v2.md"] = file32;
|
||||
AllPages["programming/game_frozen.md"] = file33;
|
||||
AllPages["programming/hackingalgorithms.md"] = file34;
|
||||
AllPages["programming/learn.md"] = file35;
|
||||
AllPages["programming/remote_api.md"] = file36;
|
||||
AllPages["advanced/offlineandbonustime.md"] = file7;
|
||||
AllPages["advanced/sleeves.md"] = file8;
|
||||
AllPages["advanced/sourcefiles.md"] = file9;
|
||||
AllPages["advanced/stanek.md"] = file10;
|
||||
AllPages["basic/augmentations.md"] = file11;
|
||||
AllPages["basic/codingcontracts.md"] = file12;
|
||||
AllPages["basic/companies.md"] = file13;
|
||||
AllPages["basic/crimes.md"] = file14;
|
||||
AllPages["basic/factions.md"] = file15;
|
||||
AllPages["basic/hacking.md"] = file16;
|
||||
AllPages["basic/hacknet_nodes.md"] = file17;
|
||||
AllPages["basic/infiltration.md"] = file18;
|
||||
AllPages["basic/programs.md"] = file19;
|
||||
AllPages["basic/ram.md"] = file20;
|
||||
AllPages["basic/reputation.md"] = file21;
|
||||
AllPages["basic/scripts.md"] = file22;
|
||||
AllPages["basic/servers.md"] = file23;
|
||||
AllPages["basic/stats.md"] = file24;
|
||||
AllPages["basic/stockmarket.md"] = file25;
|
||||
AllPages["basic/terminal.md"] = file26;
|
||||
AllPages["basic/world.md"] = file27;
|
||||
AllPages["changelog.md"] = file28;
|
||||
AllPages["help/bitnode_order.md"] = file29;
|
||||
AllPages["help/getting_started.md"] = file30;
|
||||
AllPages["help/tools_and_resources.md"] = file31;
|
||||
AllPages["index.md"] = file32;
|
||||
AllPages["migrations/v1.md"] = file33;
|
||||
AllPages["migrations/v2.md"] = file34;
|
||||
AllPages["programming/game_frozen.md"] = file35;
|
||||
AllPages["programming/hackingalgorithms.md"] = file36;
|
||||
AllPages["programming/learn.md"] = file37;
|
||||
AllPages["programming/remote_api.md"] = file38;
|
||||
|
Loading…
Reference in New Issue
Block a user