mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-21 23:23:51 +01:00
Documentation added ingame (#667)
This commit is contained in:
parent
6bd5ce38d5
commit
1a8b9a96ec
19
doc/Makefile
19
doc/Makefile
@ -1,19 +0,0 @@
|
|||||||
# Minimal makefile for Sphinx documentation
|
|
||||||
#
|
|
||||||
|
|
||||||
# You can set these variables from the command line.
|
|
||||||
SPHINXOPTS =
|
|
||||||
SPHINXBUILD = python2.7 -msphinx
|
|
||||||
SOURCEDIR = source
|
|
||||||
BUILDDIR = build
|
|
||||||
|
|
||||||
# Put it first so that "make" without argument is like "make help".
|
|
||||||
help:
|
|
||||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
||||||
|
|
||||||
.PHONY: help Makefile
|
|
||||||
|
|
||||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
||||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
||||||
%: Makefile
|
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
35
doc/make.bat
35
doc/make.bat
@ -1,35 +0,0 @@
|
|||||||
@ECHO OFF
|
|
||||||
|
|
||||||
pushd %~dp0
|
|
||||||
|
|
||||||
REM Command file for Sphinx documentation
|
|
||||||
|
|
||||||
if "%SPHINXBUILD%" == "" (
|
|
||||||
set SPHINXBUILD=python -msphinx
|
|
||||||
)
|
|
||||||
set SOURCEDIR=source
|
|
||||||
set BUILDDIR=build
|
|
||||||
|
|
||||||
if "%1" == "" goto help
|
|
||||||
|
|
||||||
%SPHINXBUILD% >NUL 2>NUL
|
|
||||||
if errorlevel 9009 (
|
|
||||||
echo.
|
|
||||||
echo.The Sphinx module was not found. Make sure you have Sphinx installed,
|
|
||||||
echo.then set the SPHINXBUILD environment variable to point to the full
|
|
||||||
echo.path of the 'sphinx-build' executable. Alternatively you may add the
|
|
||||||
echo.Sphinx directory to PATH.
|
|
||||||
echo.
|
|
||||||
echo.If you don't have Sphinx installed, grab it from
|
|
||||||
echo.http://sphinx-doc.org/
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
|
|
||||||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
|
||||||
goto end
|
|
||||||
|
|
||||||
:help
|
|
||||||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
|
||||||
|
|
||||||
:end
|
|
||||||
popd
|
|
@ -1,43 +0,0 @@
|
|||||||
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
|
|
||||||
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
|
|
||||||
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
|
|
||||||
!_TAG_PROGRAM_NAME Exuberant Ctags //
|
|
||||||
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
|
|
||||||
!_TAG_PROGRAM_VERSION 5.8 //
|
|
||||||
author .\conf.py /^author = 'Bitburner'$/;" v
|
|
||||||
copyright .\conf-guzzle.py /^copyright = u'2017, Daniel Xie'$/;" v
|
|
||||||
copyright .\conf.py /^copyright = '2017, Bitburner'$/;" v
|
|
||||||
exclude_patterns .\conf-guzzle.py /^exclude_patterns = ['_build']$/;" v
|
|
||||||
exclude_patterns .\conf.py /^exclude_patterns = []$/;" v
|
|
||||||
extensions .\conf-guzzle.py /^extensions = []$/;" v
|
|
||||||
extensions .\conf.py /^extensions = ['sphinx.ext.autodoc',$/;" v
|
|
||||||
guzzle_sphinx_theme .\conf-guzzle.py /^import guzzle_sphinx_theme$/;" i
|
|
||||||
html_show_sourcelink .\conf-guzzle.py /^html_show_sourcelink = False$/;" v
|
|
||||||
html_static_path .\conf.py /^html_static_path = ['ystatic']$/;" v
|
|
||||||
html_theme .\conf-guzzle.py /^html_theme = 'guzzle_sphinx_theme'$/;" v
|
|
||||||
html_theme .\conf.py /^html_theme = 'agogo'$/;" v
|
|
||||||
html_theme_options .\conf-guzzle.py /^html_theme_options = {$/;" v
|
|
||||||
html_theme_path .\conf-guzzle.py /^html_theme_path = guzzle_sphinx_theme.html_theme_path()$/;" v
|
|
||||||
htmlhelp_basename .\conf.py /^htmlhelp_basename = 'Bitburnerdoc'$/;" v
|
|
||||||
intersphinx_mapping .\conf.py /^intersphinx_mapping = {'https:\/\/docs.python.org\/': None}$/;" v
|
|
||||||
language .\conf.py /^language = 'English'$/;" v
|
|
||||||
latex_documents .\conf.py /^latex_documents = [$/;" v
|
|
||||||
latex_elements .\conf.py /^latex_elements = {$/;" v
|
|
||||||
man_pages .\conf.py /^man_pages = [$/;" v
|
|
||||||
master_doc .\conf-guzzle.py /^master_doc = 'index'$/;" v
|
|
||||||
master_doc .\conf.py /^master_doc = 'index'$/;" v
|
|
||||||
os .\conf-guzzle.py /^import sys, os, subprocess$/;" i
|
|
||||||
project .\conf-guzzle.py /^project = u'Bitburner'$/;" v
|
|
||||||
project .\conf.py /^project = 'Bitburner'$/;" v
|
|
||||||
pygments_style .\conf.py /^pygments_style = 'sphinx'$/;" v
|
|
||||||
release .\conf.py /^release = '1.0'$/;" v
|
|
||||||
source_suffix .\conf-guzzle.py /^source_suffix = '.rst'$/;" v
|
|
||||||
source_suffix .\conf.py /^source_suffix = '.rst'$/;" v
|
|
||||||
subprocess .\conf-guzzle.py /^import sys, os, subprocess$/;" i
|
|
||||||
sys .\conf-guzzle.py /^import sys, os, subprocess$/;" i
|
|
||||||
templates_path .\conf-guzzle.py /^templates_path = ['_templates']$/;" v
|
|
||||||
templates_path .\conf.py /^templates_path = ['ytemplates']$/;" v
|
|
||||||
texinfo_documents .\conf.py /^texinfo_documents = [$/;" v
|
|
||||||
todo_include_todos .\conf.py /^todo_include_todos = True$/;" v
|
|
||||||
version .\conf-guzzle.py /^version = '1.0.0'$/;" v
|
|
||||||
version .\conf.py /^version = '1.0'$/;" v
|
|
@ -1,6 +0,0 @@
|
|||||||
Hi there, hello
|
|
||||||
===============
|
|
||||||
|
|
||||||
It looks like you found a page that doesn't exist!
|
|
||||||
|
|
||||||
If you're looking for documentation of the Netscript API, it moved `here <https://github.com/bitburner-official/bitburner-src/blob/dev/markdown/bitburner.ns.md>`_.
|
|
@ -1,16 +0,0 @@
|
|||||||
Advanced Gameplay
|
|
||||||
=================
|
|
||||||
This section documents Bitburner gameplay elements that are **not** immediately
|
|
||||||
available and/or accessible to the player. These gameplay mechanics
|
|
||||||
must be unlocked.
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 5
|
|
||||||
:caption: Elements:
|
|
||||||
|
|
||||||
BitNodes <advancedgameplay/bitnodes>
|
|
||||||
Source-Files <advancedgameplay/sourcefiles>
|
|
||||||
Intelligence <advancedgameplay/intelligence>
|
|
||||||
Sleeves <advancedgameplay/sleeves>
|
|
||||||
Grafting <advancedgameplay/grafting>
|
|
||||||
Hacking algorithms <advancedgameplay/hackingalgorithms>
|
|
Binary file not shown.
Before Width: | Height: | Size: 50 KiB |
@ -1,60 +0,0 @@
|
|||||||
.. _gameplay_bitnodes:
|
|
||||||
|
|
||||||
.. warning:: This page contains spoilers regarding the game's story/plot-line.
|
|
||||||
|
|
||||||
BitNodes
|
|
||||||
========
|
|
||||||
A BitNode is an important part of the game's storyline. In the game, you discover
|
|
||||||
what BitNodes are by following the trail of clues left by the mysterious jump3r
|
|
||||||
(essentially a minimal questline).
|
|
||||||
|
|
||||||
What is a BitNode
|
|
||||||
^^^^^^^^^^^^^^^^^
|
|
||||||
A BitNode is the complex simulated reality in which you reside. By following the messages
|
|
||||||
from jump3r, you discover that humanity was enslaved by an advanced alien race, called
|
|
||||||
the Enders, using virtual simulations that trapped the minds of humans.
|
|
||||||
|
|
||||||
However, the Enders didn't just create a single virtual reality to enslave humans, but many
|
|
||||||
different simulations. In other words, there are many different BitNodes that exist.
|
|
||||||
These BitNode are very different from each other.
|
|
||||||
|
|
||||||
jump3r tells you that the only hope for humanity is to destroy all of these BitNodes.
|
|
||||||
Therefore, the end goal for the player is to enter and then destroy each BitNode at least once.
|
|
||||||
|
|
||||||
Destroying a BitNode resets most of the player's progress but grants the player a
|
|
||||||
powerful second-tier persistent upgrade called a :ref:`Source-File <gameplay_sourcefiles>`.
|
|
||||||
Different BitNodes grant different Source-Files.
|
|
||||||
|
|
||||||
Each BitNode has unique characteristics that are related to varying backstories. For example,
|
|
||||||
in one BitNode the world is in the middle of a financial catastrophe with a collapsing
|
|
||||||
market. In this BitNode, most forms of income such as working at a company or Hacknet
|
|
||||||
Nodes are significantly less profitable. Servers have less money on them and lowered
|
|
||||||
growth rates, but it is easier to lower their security level using the weaken() Netscript function.
|
|
||||||
|
|
||||||
Furthermore, some BitNodes introduce new content and mechanics. For example there is one
|
|
||||||
BitNode that grants access to the `Singularity API <https://github.com/bitburner-official/bitburner-src/blob/dev/markdown/bitburner.singularity.md>`_.
|
|
||||||
There is another BitNode in which you can manage a gang to earn money and reputation.
|
|
||||||
|
|
||||||
.. _gameplay_bitnodes_howtodestroy:
|
|
||||||
|
|
||||||
How to destroy a BitNode
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Initially, the only way to destroy a BitNode is to join the Daedalus :ref:`Daedalus <gameplay_factions>`.
|
|
||||||
From Daedalus, the player can obtain an Augmentation called 'The Red Pill', which doesn't cost any money
|
|
||||||
but does require a good amount of faction reputation.
|
|
||||||
|
|
||||||
After installing 'The Red Pill', the player must search for and then manually hack a
|
|
||||||
server called 'w0r1d_d43m0n'. This server requires a hacking level of 3000 in order
|
|
||||||
to successfully hack it. This will destroy the player's current BitNode.
|
|
||||||
|
|
||||||
There is a second method of destroying a BitNode, but it must be unlocked by first
|
|
||||||
destroying BitNode-6 or BitNode-7 (Bladeburners).
|
|
||||||
|
|
||||||
.. todo:: Link to Bladeburner documentation page here
|
|
||||||
|
|
||||||
When the player destroys a BitNode, most of his/her progress will be reset. This includes things
|
|
||||||
such as Augmentations and RAM upgrades on the home computer. The only things that will persist
|
|
||||||
through destroying BitNodes is:
|
|
||||||
|
|
||||||
* Source-Files
|
|
||||||
* Scripts on the home computer
|
|
@ -1,19 +0,0 @@
|
|||||||
.. _gameplay_intelligence:
|
|
||||||
|
|
||||||
Intelligence
|
|
||||||
============
|
|
||||||
Intelligence is a :ref:`stat <gameplay_stats>` that is unlocked by having
|
|
||||||
:ref:`Source-File 5 <gameplay_sourcefiles>` (i.e. Destroying BitNode-5).
|
|
||||||
|
|
||||||
Intelligence is unique because it is permanent and persistent. It never gets reset
|
|
||||||
back to 1. However, gaining Intelligence experience is extremely slow. It is a stat
|
|
||||||
that gradually builds up as you continue to play the game.
|
|
||||||
|
|
||||||
Intelligence will boost your production for many actions in the game, including:
|
|
||||||
|
|
||||||
* Hacking
|
|
||||||
* Infiltration
|
|
||||||
* Crime success rate
|
|
||||||
* Bladeburner
|
|
||||||
* Reputation gain for companies & factions
|
|
||||||
* Augmentation grafting speed
|
|
@ -1,94 +0,0 @@
|
|||||||
.. _gameplay_sleeves:
|
|
||||||
|
|
||||||
Sleeves
|
|
||||||
=======
|
|
||||||
When VitaLife unveiled their Persona Core technology that allowed people to digitize
|
|
||||||
and transfer their consciousness into other vessels, human bodies became nothing more
|
|
||||||
than 'sleeves' for the human consciousness. This technology thus became known as
|
|
||||||
"Sleeve technology".
|
|
||||||
|
|
||||||
Sleeve technology unlocks two different gameplay features:
|
|
||||||
|
|
||||||
* Duplicate Sleeves
|
|
||||||
* Grafting
|
|
||||||
|
|
||||||
Sleeve technology is unlocked in :ref:`BitNode-10 <gameplay_bitnodes>`.
|
|
||||||
|
|
||||||
.. _gameplay_duplicatesleeves:
|
|
||||||
|
|
||||||
Duplicate Sleeves
|
|
||||||
^^^^^^^^^^^^^^^^^
|
|
||||||
Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your consciousness
|
|
||||||
has been copied. In other words, these Synthoids contain a perfect duplicate of your mind.
|
|
||||||
|
|
||||||
Duplicate Sleeves are essentially clones which you can use to perform work-type actions,
|
|
||||||
such as working for a company/faction or committing a crime. When sleeves perform these tasks,
|
|
||||||
they will earn money, experience, and reputation.
|
|
||||||
|
|
||||||
Sleeves are their own individuals, which means they each have their own experience and stats.
|
|
||||||
|
|
||||||
When a sleeve earns experience, it earns experience for itself, the player's
|
|
||||||
original consciousness, as well as all of the player's other sleeves.
|
|
||||||
|
|
||||||
Duplicate Sleeves are **not** reset when installing Augmentations, but they are reset
|
|
||||||
when switching BitNodes.
|
|
||||||
|
|
||||||
Obtaining Duplicate Sleeves
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
There are two methods of obtaining Duplicate Sleeves:
|
|
||||||
|
|
||||||
1. Destroy BitNode-10. Each completion gives you one additional Duplicate Sleeve.
|
|
||||||
2. Purchase Duplicate Sleeves from :ref:`the faction The Covenant <gameplay_factions>`.
|
|
||||||
This is only available in BitNode-10. Sleeves purchased this way are **permanent** (they persist
|
|
||||||
through BitNodes). You can purchase up to 5 Duplicate Sleeves from The Covenant.
|
|
||||||
|
|
||||||
Synchronization
|
|
||||||
~~~~~~~~~~~~~~~
|
|
||||||
Synchronization is a measure of how aligned your consciousness is with that of your
|
|
||||||
Duplicate Sleeves. It is a numerical value between 1 and 100, and it affects how much experience
|
|
||||||
is earned when the sleeve is performing a task.
|
|
||||||
|
|
||||||
Synchronization can be increased by assigning sleeves to the 'Synchronize' task.
|
|
||||||
|
|
||||||
Sleeve Shock
|
|
||||||
~~~~~~~~~~~~
|
|
||||||
Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new
|
|
||||||
body. It is a numerical value between 0 and 99, where 99 indicates full shock and 0 indicates
|
|
||||||
no shock. Shock affects the amount of experience earned by the sleeve.
|
|
||||||
|
|
||||||
Sleeve shock slowly decreases over time. You can further increase the rate at which
|
|
||||||
it decreases by assigning sleeves to the 'Shock Recovery' task.
|
|
||||||
|
|
||||||
Let X be the sleeve's shock and Y be the sleeve's synchronization. When the sleeve earns experience by performing
|
|
||||||
a task, the sleeve gains X% of the amount of experience normally earned by the task. player’s original host consciousness and all of the player's other sleeves
|
|
||||||
earn Y% of the experience that the sleeve gained, or X*Y % of the normal experience amount.
|
|
||||||
|
|
||||||
Augmentations
|
|
||||||
~~~~~~~~~~~~~
|
|
||||||
You can purchase :ref:`Augmentations <gameplay_augmentations>` for your Duplicate
|
|
||||||
Sleeves. In order to do this, the sleeve's shock must be at 0. Any Augmentation
|
|
||||||
that is currently available to you through a faction is also available for your
|
|
||||||
Duplicate Sleeves. There are a few Augmentations, such as NeuroFlux Governor and
|
|
||||||
Bladeburner-specific ones, that cannot be purchased for a Duplicate Sleeve.
|
|
||||||
|
|
||||||
When you purchase an Augmentation for a Duplicate Sleeve, it is instantly installed.
|
|
||||||
When this happens, the sleeve's stats are instantly reset back to 0, similar to
|
|
||||||
when you normally install Augmentations.
|
|
||||||
|
|
||||||
The cost of purchasing an Augmentation for a Duplicate Sleeve is **not** affected
|
|
||||||
by how many Augmentations you have purchased for yourself, and vice versa.
|
|
||||||
|
|
||||||
Memory
|
|
||||||
~~~~~~
|
|
||||||
Sleeve memory dictates what a sleeve's synchronization will be when it is reset by
|
|
||||||
switching BitNodes. For example, if a sleeve has a memory of 10, then when you
|
|
||||||
switch BitNodes its synchronization will initially be set to 10, rather than 1.
|
|
||||||
|
|
||||||
Memory can only be increased by purchasing upgrades from The Covenant. Just like
|
|
||||||
the ability to purchase additional sleeves, this is only available in BitNode-10.
|
|
||||||
|
|
||||||
Memory is a persistent stat, meaning it never gets reset back to 1.
|
|
||||||
The maximum possible value for a sleeve's memory is 100.
|
|
||||||
|
|
||||||
Buying memory has no instant affect on synchronization,
|
|
||||||
memory affects only the starting synchronization upon entering a BitNode.
|
|
@ -1,62 +0,0 @@
|
|||||||
.. _gameplay_sourcefiles:
|
|
||||||
|
|
||||||
.. warning:: This page contains spoilers for the game
|
|
||||||
|
|
||||||
Source-Files
|
|
||||||
============
|
|
||||||
Source-Files are a type of persistent upgrade that is more powerful than Augmentations.
|
|
||||||
Source-Files are received by :ref:`destroying a BitNode <gameplay_bitnodes_howtodestroy>`. There are many different BitNodes
|
|
||||||
in the game and each BitNode will grant a different Source-File when it is destroyed.
|
|
||||||
|
|
||||||
A Source-File can be upgraded by destroying its corresponding BitNode a second or
|
|
||||||
third time (AKA playing through that BitNode again). It can be upgraded to a maximum
|
|
||||||
of level 3, with the exception of source-file 12, which has no hard limit.
|
|
||||||
|
|
||||||
List of all Source-Files
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
||||||
| BitNode-1: Source Genesis | * Let the player start with 32 GB of RAM on the home computer. |
|
|
||||||
| | * Increases all of the player's multipliers by 16%/24%/28%. |
|
|
||||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
||||||
| BitNode-2: Rise of the Underworld | * Let the player create Gangs in other BitNodes (although some BitNodes will disable this mechanic). |
|
|
||||||
| | * Increases the player's crime success rate, crime money, and charisma multipliers by 24%/36%/42%. |
|
|
||||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
||||||
| BitNode-3: Corporatocracy | * Let the player create Corporations in other BitNodes (although some BitNodes will disable this mechanic). |
|
|
||||||
| | * Increases the player's charisma and company salary multipliers by 8%/12%/14%. |
|
|
||||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
||||||
| BitNode-4: The Singularity | * Let the player access and use Netscript Singularity Functions in other BitNodes. |
|
|
||||||
| | * Each level of this Source-File reduces the RAM cost of singularity functions. |
|
|
||||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
||||||
| BitNode-5: Artificial Intelligence | * Unlocks :ref:`gameplay_intelligence`. |
|
|
||||||
| | * Unlocks :js:func:`getBitNodeMultipliers` and grants permanent access to Formulas.exe. |
|
|
||||||
| | * Increases all of the player's hacking-related multipliers by 8%/12%/14%. |
|
|
||||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
||||||
| BitNode-6: Bladeburners | * Unlocks the Bladeburner feature in other BitNodes. |
|
|
||||||
| | * Increases all of the player's level and experience gain rate multipliers for combat stats by 8%/12%/14%. |
|
|
||||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
||||||
| BitNode-7: Bladeburners 2079 | * Allows the player to access the `Bladeburner API <https://github.com/bitburner-official/bitburner-src/blob/dev/markdown/bitburner.bladeburner.md>`_ in other BitNodes. |
|
|
||||||
| | * Increases all of the player's Bladeburner multipliers by 8%/12%/14%. |
|
|
||||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
||||||
| BitNode-8: Ghost of Wall Street | * Increases the player's hacking growth multiplier by 12%/18%/21%. |
|
|
||||||
| | * Level 1 grants permanent access to :ref:`WSE <gameplay_stock_market>` and the `TIX <https://github.com/bitburner-official/bitburner-src/blob/dev/markdown/bitburner.tix.md>`_ API. |
|
|
||||||
| | * Level 2 grants permanent access to shorting stocks. |
|
|
||||||
| | * Level 3 grants permanent access to use limit/stop orders. |
|
|
||||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
||||||
| BitNode-9: Hacktocracy | * Level 1 permanently unlocks the Hacknet Server in other BitNodes. |
|
|
||||||
| | * Level 2 lets the player start with 128 GB of RAM on the home computer. |
|
|
||||||
| | * Level 3 grants a highly-upgraded Hacknet Server when entering a new BitNode (it will be lost after installing augments). |
|
|
||||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
||||||
| BitNode-10: Digital Carbon | * Each level of this grants a Duplicate Sleeve. |
|
|
||||||
| | * Allows the player to access the `Sleeve API <https://github.com/bitburner-official/bitburner-src/blob/dev/markdown/bitburner.sleeve.md>`_ in other BitNodes. |
|
|
||||||
| | * Grants the player access to the VitaLife secret laboratory in other BitNodes. Also grants access to the Grafting API. |
|
|
||||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
||||||
| BitNode-11: The Big Crash | * Company favor increases both the player's salary and reputation gain at that company by 1% per favor (rather than just the reputation gain). |
|
|
||||||
| | * Increases the player's company salary and reputation gain multipliers by 32%/48%/56%. |
|
|
||||||
| | * This Source-File reduces the price increase for every aug bought by 4%/5%/7%. |
|
|
||||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
||||||
| BitNode-12: The Recursion | * There is no maximum level for this Source-File. |
|
|
||||||
| | * Let the player start with Neuroflux Governor equal to the level of this Source-File. |
|
|
||||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
||||||
| BitNode-13: They're lunatics | * This Source-File lets the Church of the Machine God appear in other BitNodes. |
|
|
||||||
| | * Each level of this Source-File increases the size of Stanek's Gift. |
|
|
||||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
@ -1,22 +0,0 @@
|
|||||||
Basic Gameplay
|
|
||||||
==============
|
|
||||||
This section documents Bitburner gameplay elements that are immediately
|
|
||||||
available and/or accessible to the player.
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 5
|
|
||||||
:caption: Elements:
|
|
||||||
|
|
||||||
Stats <basicgameplay/stats>
|
|
||||||
Terminal <basicgameplay/terminal>
|
|
||||||
Servers <basicgameplay/servers>
|
|
||||||
Hacking <basicgameplay/hacking>
|
|
||||||
Scripts <basicgameplay/scripts>
|
|
||||||
World <basicgameplay/world>
|
|
||||||
Factions <basicgameplay/factions>
|
|
||||||
Augmentations <basicgameplay/augmentations>
|
|
||||||
Companies <basicgameplay/companies>
|
|
||||||
Crimes <basicgameplay/crimes>
|
|
||||||
Infiltration <basicgameplay/infiltration>
|
|
||||||
Stock Market <basicgameplay/stockmarket>
|
|
||||||
Coding Contracts <basicgameplay/codingcontracts>
|
|
@ -1,417 +0,0 @@
|
|||||||
.. _codingcontracts:
|
|
||||||
|
|
||||||
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" extensions. They can
|
|
||||||
be accessed through the :ref:`terminal` or through scripts using
|
|
||||||
the `Coding Contract API <https://github.com/bitburner-official/bitburner-src/blob/dev/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)
|
|
||||||
|
|
||||||
Currently, Coding Contracts are randomly generated and
|
|
||||||
spawned over time. They can appear on any server (including your
|
|
||||||
home computer), except for your purchased servers.
|
|
||||||
|
|
||||||
|
|
||||||
Running in Terminal
|
|
||||||
^^^^^^^^^^^^^^^^^^^
|
|
||||||
To run a Coding Contract in the Terminal, simply use the
|
|
||||||
:ref:`run_terminal_command` 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/dev/markdown/bitburner.codingcontract.md>`_.
|
|
||||||
Interacting with Coding Contracts via the Terminal can be tedious the more
|
|
||||||
contracts you solve. Consider using the API 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 to automate the
|
|
||||||
process of submitting your solution rather than copy and paste a long
|
|
||||||
solution into an answer box.
|
|
||||||
|
|
||||||
However, using the API comes at a cost. Like most functions in other APIs,
|
|
||||||
each function in the Coding Contract API has a RAM cost. Depending on which
|
|
||||||
function you use, the initial RAM on your home server might not be enough
|
|
||||||
to allow you to use various API functions. Plan on upgrading the RAM on your
|
|
||||||
home server if you want to use the Coding Contract API.
|
|
||||||
|
|
||||||
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]
|
|
||||||
|
|
||||||
However, 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 Reputation for a specific Faction
|
|
||||||
* Faction Reputation for all Factions that you are a member of
|
|
||||||
* Company reputation for a specific Company
|
|
||||||
* Money
|
|
||||||
|
|
||||||
The 'amount' of reward varies based on the difficulty of the problem
|
|
||||||
posed by the Coding Contract. There is no way to know what a
|
|
||||||
Coding Contract's exact reward will be until it is solved.
|
|
||||||
|
|
||||||
Notes
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
* The *scp* Terminal command does not work on Coding Contracts
|
|
||||||
|
|
||||||
List of all Problem Types
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
The following is a list of all of the problem types that a Coding Contract can contain.
|
|
||||||
The list contains the name of (i.e. the value returned by
|
|
||||||
:js:func:`getContractType`) and a brief summary of the problem it poses.
|
|
||||||
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Name | Problem Summary |
|
|
||||||
+=========================================+==========================================================================================+
|
|
||||||
| Find Largest Prime Factor | | Given a number, find its largest prime factor. A prime factor |
|
|
||||||
| | | is a factor that is a prime number. |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Subarray with Maximum Sum | | Given an array of integers, find the contiguous subarray (containing |
|
|
||||||
| | | at least one number) which has the largest sum and return that sum. |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Total Ways to Sum | | Given a number, how many different distinct ways can that number be written as |
|
|
||||||
| | | a sum of at least two positive integers? |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Total Ways to Sum II | | You are given an array with two elements. The first element is an integer n. |
|
|
||||||
| | | The second element is an array of numbers representing the set of available integers. |
|
|
||||||
| | | How many different distinct ways can that number n be written as |
|
|
||||||
| | | a sum of integers contained in the given set? |
|
|
||||||
| | | You may use each integer in the set zero or more times. |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Spiralize Matrix | | Given an array of array of numbers representing a 2D matrix, return the |
|
|
||||||
| | | elements of that matrix in clockwise spiral order. |
|
|
||||||
| | | |
|
|
||||||
| | | Example: The spiral order of |
|
|
||||||
| | | |
|
|
||||||
| | | [1, 2, 3, 4] |
|
|
||||||
| | | [5, 6, 7, 8] |
|
|
||||||
| | | [9, 10, 11, 12] |
|
|
||||||
| | | |
|
|
||||||
| | | is [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7] |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Array Jumping Game | | You are given an array of integers where each element represents the |
|
|
||||||
| | | maximum possible jump distance from that position. For example, if you |
|
|
||||||
| | | are at position i and your maximum jump length is n, then you can jump |
|
|
||||||
| | | to any position from i to i+n. |
|
|
||||||
| | | |
|
|
||||||
| | | Assuming you are initially positioned at the start of the array, determine |
|
|
||||||
| | | whether you are able to reach the last index of the array. |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Array Jumping Game II | | You are given an array of integers where each element represents the |
|
|
||||||
| | | maximum possible jump distance from that position. For example, if you |
|
|
||||||
| | | are at position i and your maximum jump length is n, then you can jump |
|
|
||||||
| | | to any position from i to i+n. |
|
|
||||||
| | | |
|
|
||||||
| | | Assuming you are initially positioned at the start of the array, determine |
|
|
||||||
| | | the minimum number of jumps to reach the end of the array. |
|
|
||||||
| | | |
|
|
||||||
| | | If it's impossible to reach the end, then the answer should be 0. |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Merge Overlapping Intervals | | Given an array of intervals, merge all overlapping intervals. An interval |
|
|
||||||
| | | is an array with two numbers, where the first number is always less than |
|
|
||||||
| | | the second (e.g. [1, 5]). |
|
|
||||||
| | | |
|
|
||||||
| | | The intervals must be returned in ASCENDING order. |
|
|
||||||
| | | |
|
|
||||||
| | | Example: |
|
|
||||||
| | | [[1, 3], [8, 10], [2, 6], [10, 16]] |
|
|
||||||
| | | merges into [[1, 6], [8, 16]] |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Generate IP Addresses | | Given a string containing only digits, return an array with all possible |
|
|
||||||
| | | valid IP address combinations that can be created from the string. |
|
|
||||||
| | | |
|
|
||||||
| | | An octet in the IP address cannot begin with '0' unless the number itself |
|
|
||||||
| | | is actually 0. For example, "192.168.010.1" is NOT a valid IP. |
|
|
||||||
| | | |
|
|
||||||
| | | Examples: |
|
|
||||||
| | | 25525511135 -> [255.255.11.135, 255.255.111.35] |
|
|
||||||
| | | 1938718066 -> [193.87.180.66] |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Algorithmic Stock Trader I | | You are given an array of numbers representing stock prices, where the |
|
|
||||||
| | | i-th element represents the stock price on day i. |
|
|
||||||
| | | |
|
|
||||||
| | | Determine the maximum possible profit you can earn using at most one |
|
|
||||||
| | | transaction (i.e. you can buy an sell the stock once). If no profit |
|
|
||||||
| | | can be made, then the answer should be 0. Note that you must buy the stock |
|
|
||||||
| | | before you can sell it. |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Algorithmic Stock Trader II | | You are given an array of numbers representing stock prices, where the |
|
|
||||||
| | | i-th element represents the stock price on day i. |
|
|
||||||
| | | |
|
|
||||||
| | | Determine the maximum possible profit you can earn using as many transactions |
|
|
||||||
| | | as you'd like. A transaction is defined as buying and then selling one |
|
|
||||||
| | | share of the stock. Note that you cannot engage in multiple transactions at |
|
|
||||||
| | | once. In other words, you must sell the stock before you buy it again. If no |
|
|
||||||
| | | profit can be made, then the answer should be 0. |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Algorithmic Stock Trader III | | You are given an array of numbers representing stock prices, where the |
|
|
||||||
| | | i-th element represents the stock price on day i. |
|
|
||||||
| | | |
|
|
||||||
| | | Determine the maximum possible profit you can earn using at most two |
|
|
||||||
| | | transactions. A transaction is defined as buying and then selling one share |
|
|
||||||
| | | of the stock. Note that you cannot engage in multiple transactions at once. |
|
|
||||||
| | | In other words, you must sell the stock before you buy it again. If no profit |
|
|
||||||
| | | can be made, then the answer should be 0. |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Algorithmic Stock Trader IV | | You are given an array with two elements. The first element is an integer k. |
|
|
||||||
| | | The second element is an array of numbers representing stock prices, where the |
|
|
||||||
| | | i-th element represents the stock price on day i. |
|
|
||||||
| | | |
|
|
||||||
| | | Determine the maximum possible profit you can earn using at most k transactions. |
|
|
||||||
| | | A transaction is defined as buying and then selling one share of the stock. |
|
|
||||||
| | | Note that you cannot engage in multiple transactions at once. In other words, |
|
|
||||||
| | | you must sell the stock before you can buy it. If no profit can be made, then |
|
|
||||||
| | | the answer should be 0. |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Minimum Path Sum in a Triangle | | You are given a 2D array of numbers (array of array of numbers) that represents a |
|
|
||||||
| | | triangle (the first array has one element, and each array has one more element than |
|
|
||||||
| | | the one before it, forming a triangle). Find the minimum path sum from the top to the |
|
|
||||||
| | | bottom of the triangle. In each step of the path, you may only move to adjacent |
|
|
||||||
| | | numbers in the row below. |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Unique Paths in a Grid I | | You are given an array with two numbers: [m, n]. These numbers represent a |
|
|
||||||
| | | m x n grid. Assume you are initially positioned in the top-left corner of that |
|
|
||||||
| | | grid and that you are trying to reach the bottom-right corner. On each step, |
|
|
||||||
| | | you may only move down or to the right. |
|
|
||||||
| | | |
|
|
||||||
| | | |
|
|
||||||
| | | Determine how many unique paths there are from start to finish. |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Unique Paths in a Grid II | | You are given a 2D array of numbers (array of array of numbers) representing |
|
|
||||||
| | | a grid. The 2D array contains 1's and 0's, where 1 represents an obstacle and |
|
|
||||||
| | | |
|
|
||||||
| | | 0 represents a free space. |
|
|
||||||
| | | |
|
|
||||||
| | | Assume you are initially positioned in top-left corner of that grid and that you |
|
|
||||||
| | | are trying to reach the bottom-right corner. In each step, you may only move down |
|
|
||||||
| | | or to the right. Furthermore, you cannot move onto spaces which have obstacles. |
|
|
||||||
| | | |
|
|
||||||
| | | Determine how many unique paths there are from start to finish. |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Shortest Path in a Grid | | You are given a 2D array of numbers (array of array of numbers) representing |
|
|
||||||
| | | a grid. The 2D array contains 1's and 0's, where 1 represents an obstacle and |
|
|
||||||
| | | 0 represents a free space. |
|
|
||||||
| | | |
|
|
||||||
| | | Assume you are initially positioned in top-left corner of that grid and that you |
|
|
||||||
| | | are trying to reach the bottom-right corner. In each step, you may move to the up, |
|
|
||||||
| | | down, left or right. Furthermore, you cannot move onto spaces which have obstacles. |
|
|
||||||
| | | |
|
|
||||||
| | | Determine if paths exist from start to destination, and find the shortest one. |
|
|
||||||
| | | |
|
|
||||||
| | | Examples: |
|
|
||||||
| | | [[0,1,0,0,0], |
|
|
||||||
| | | [0,0,0,1,0]] -> "DRRURRD" |
|
|
||||||
| | | [[0,1], |
|
|
||||||
| | | [1,0]] -> "" |
|
|
||||||
| | | |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Sanitize Parentheses in Expression | | Given a string with parentheses and letters, remove the minimum number of invalid |
|
|
||||||
| | | parentheses in order to validate the string. If there are multiple minimal ways |
|
|
||||||
| | | to validate the string, provide all of the possible results. |
|
|
||||||
| | | |
|
|
||||||
| | | The answer should be provided as an array of strings. If it is impossible to validate |
|
|
||||||
| | | the string, the result should be an array with only an empty string. |
|
|
||||||
| | | |
|
|
||||||
| | | Examples: |
|
|
||||||
| | | "()())()" -> ["()()()", "(())()"] |
|
|
||||||
| | | "(a)())()" -> ["(a)()()", "(a())()"] |
|
|
||||||
| | | ")(" -> [""] |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Find All Valid Math Expressions | | You are given a string which contains only digits between 0 and 9 as well as a target |
|
|
||||||
| | | number. Return all possible ways you can add the +, -, and * operators to the string |
|
|
||||||
| | | of digits such that it evaluates to the target number. |
|
|
||||||
| | | |
|
|
||||||
| | | The answer should be provided as an array of strings containing the valid expressions. |
|
|
||||||
| | | |
|
|
||||||
| | | NOTE: Numbers in an expression cannot have leading 0's |
|
|
||||||
| | | NOTE: The order of evaluation expects script operator precedence |
|
|
||||||
| | | |
|
|
||||||
| | | Examples: |
|
|
||||||
| | | Input: digits = "123", target = 6 |
|
|
||||||
| | | Output: [1+2+3, 1*2*3] |
|
|
||||||
| | | |
|
|
||||||
| | | Input: digits = "105", target = 5 |
|
|
||||||
| | | Output: [1*0+5, 10-5] |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| HammingCodes: Integer to Encoded Binary | | You are given a decimal value. |
|
|
||||||
| | | Convert it into a binary string and encode it as a 'Hamming-Code'. eg: |
|
|
||||||
| | | Value 8 will result into binary '1000', which will be encoded |
|
|
||||||
| | | with the pattern 'pppdpddd', where p is a paritybit and d a databit. The encoding of |
|
|
||||||
| | | 8 is 11110000. As another example, '10101' (Value 21) will result into (pppdpdddpd) |
|
|
||||||
| | | '1001101011'. |
|
|
||||||
| | | NOTE: You need an parity Bit on Index 0 as an 'overall'-paritybit. |
|
|
||||||
| | | NOTE 2: You should watch the HammingCode-video from 3Blue1Brown, which |
|
|
||||||
| | | explains the 'rule' of encoding, |
|
|
||||||
| | | including the first Index parity-bit mentioned on the first note. |
|
|
||||||
| | | Now the only one rule for this encoding: |
|
|
||||||
| | | It's not allowed to add additional leading '0's to the binary value |
|
|
||||||
| | | That means, the binary value has to be encoded as it is |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| HammingCodes: Encoded Binary to Integer | | You are given an encoded binary string. |
|
|
||||||
| | | Treat it as a Hammingcode with 1 'possible' error on an random Index. |
|
|
||||||
| | | Find the 'possible' wrong bit, fix it and extract the decimal value, which is |
|
|
||||||
| | | hidden inside the string.\n\n", |
|
|
||||||
| | | Note: The length of the binary string is dynamic, but its encoding/decoding is |
|
|
||||||
| | | following Hammings 'rule'\n", |
|
|
||||||
| | | Note 2: Index 0 is an 'overall' parity bit. Watch the Hammingcode-video from |
|
|
||||||
| | | 3Blue1Brown for more information\n", |
|
|
||||||
| | | Note 3: There's a ~55% chance for an altered Bit. So... MAYBE |
|
|
||||||
| | | there is an altered Bit 😉\n", |
|
|
||||||
| | | Extra note for automation: return the decimal value as a string", |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Proper 2-Coloring of a Graph | | You are given data, representing a graph. Note that "graph", as used here, refers to |
|
|
||||||
| | | the field of graph theory, and has no relation to statistics or plotting. |
|
|
||||||
| | | |
|
|
||||||
| | | The first element of the data represents the number of vertices in the graph. Each |
|
|
||||||
| | | vertex is a unique number between 0 and ${data[0] - 1}. The next element of the data |
|
|
||||||
| | | represents the edges of the graph. |
|
|
||||||
| | | |
|
|
||||||
| | | Two vertices u,v in a graph are said to be adjacent if there exists an edge [u,v]. |
|
|
||||||
| | | Note that an edge [u,v] is the same as an edge [v,u], as order does not matter. |
|
|
||||||
| | | |
|
|
||||||
| | | You must construct a 2-coloring of the graph, meaning that you have to assign each |
|
|
||||||
| | | vertex in the graph a "color", either 0 or 1, such that no two adjacent vertices have |
|
|
||||||
| | | the same color. Submit your answer in the form of an array, where element i |
|
|
||||||
| | | represents the color of vertex i. If it is impossible to construct a 2-coloring of |
|
|
||||||
| | | the given graph, instead submit an empty array. |
|
|
||||||
| | | |
|
|
||||||
| | | Examples: |
|
|
||||||
| | | |
|
|
||||||
| | | Input: [4, [[0, 2], [0, 3], [1, 2], [1, 3]]] |
|
|
||||||
| | | Output: [0, 0, 1, 1] |
|
|
||||||
| | | |
|
|
||||||
| | | Input: [3, [[0, 1], [0, 2], [1, 2]]] |
|
|
||||||
| | | Output: [] |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Compression I: RLE Compression | | Run-length encoding (RLE) is a data compression technique which encodes data as a |
|
|
||||||
| | | series of runs of a repeated single character. Runs are encoded as a length, followed |
|
|
||||||
| | | by the character itself. Lengths are encoded as a single ASCII digit; runs of 10 |
|
|
||||||
| | | characters or more are encoded by splitting them into multiple runs. |
|
|
||||||
| | | |
|
|
||||||
| | | You are given a string as input. Encode it using run-length encoding with the minimum |
|
|
||||||
| | | possible output length. |
|
|
||||||
| | | |
|
|
||||||
| | | Examples: |
|
|
||||||
| | | aaaaabccc -> 5a1b3c |
|
|
||||||
| | | aAaAaA -> 1a1A1a1A1a1A |
|
|
||||||
| | | 111112333 -> 511233 |
|
|
||||||
| | | zzzzzzzzzzzzzzzzzzz -> 9z9z1z (or 9z8z2z, etc.) |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Compression II: LZ Decompression | | Lempel-Ziv (LZ) compression is a data compression technique which encodes data using |
|
|
||||||
| | | references to earlier parts of the data. In this variant of LZ, data is encoded in two |
|
|
||||||
| | | types of chunk. Each chunk begins with a length L, encoded as a single ASCII digit |
|
|
||||||
| | | from 1 - 9, followed by the chunk data, which is either: |
|
|
||||||
| | | |
|
|
||||||
| | | 1. Exactly L characters, which are to be copied directly into the uncompressed data. |
|
|
||||||
| | | 2. A reference to an earlier part of the uncompressed data. To do this, the length |
|
|
||||||
| | | is followed by a second ASCII digit X: each of the L output characters is a copy |
|
|
||||||
| | | of the character X places before it in the uncompressed data. |
|
|
||||||
| | | |
|
|
||||||
| | | For both chunk types, a length of 0 instead means the chunk ends immediately, and the |
|
|
||||||
| | | next character is the start of a new chunk. The two chunk types alternate, starting |
|
|
||||||
| | | with type 1, and the final chunk may be of either type. |
|
|
||||||
| | | |
|
|
||||||
| | | You are given an LZ-encoded string. Decode it and output the original string. |
|
|
||||||
| | | |
|
|
||||||
| | | Example: decoding '5aaabb450723abb' chunk-by-chunk |
|
|
||||||
| | | 5aaabb -> aaabb |
|
|
||||||
| | | 5aaabb45 -> aaabbaaab |
|
|
||||||
| | | 5aaabb450 -> aaabbaaab |
|
|
||||||
| | | 5aaabb45072 -> aaabbaaababababa |
|
|
||||||
| | | 5aaabb450723abb -> aaabbaaababababaabb |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Compression III: LZ Compression | | Lempel-Ziv (LZ) compression is a data compression technique which encodes data using |
|
|
||||||
| | | references to earlier parts of the data. In this variant of LZ, data is encoded in two |
|
|
||||||
| | | types of chunk. Each chunk begins with a length L, encoded as a single ASCII digit |
|
|
||||||
| | | from 1 - 9, followed by the chunk data, which is either: |
|
|
||||||
| | | |
|
|
||||||
| | | 1. Exactly L characters, which are to be copied directly into the uncompressed data. |
|
|
||||||
| | | 2. A reference to an earlier part of the uncompressed data. To do this, the length |
|
|
||||||
| | | is followed by a second ASCII digit X: each of the L output characters is a copy |
|
|
||||||
| | | of the character X places before it in the uncompressed data. |
|
|
||||||
| | | |
|
|
||||||
| | | For both chunk types, a length of 0 instead means the chunk ends immediately, and the |
|
|
||||||
| | | next character is the start of a new chunk. The two chunk types alternate, starting |
|
|
||||||
| | | with type 1, and the final chunk may be of either type. |
|
|
||||||
| | | |
|
|
||||||
| | | You are given a string as input. Encode it using Lempel-Ziv encoding with the minimum |
|
|
||||||
| | | possible output length. |
|
|
||||||
| | | |
|
|
||||||
| | | Examples (some have other possible encodings of minimal length): |
|
|
||||||
| | | abracadabra -> 7abracad47 |
|
|
||||||
| | | mississippi -> 4miss433ppi |
|
|
||||||
| | | aAAaAAaAaAA -> 3aAA53035 |
|
|
||||||
| | | 2718281828 -> 627182844 |
|
|
||||||
| | | abcdefghijk -> 9abcdefghi02jk |
|
|
||||||
| | | aaaaaaaaaaaa -> 3aaa91 |
|
|
||||||
| | | aaaaaaaaaaaaa -> 1a91031 |
|
|
||||||
| | | aaaaaaaaaaaaaa -> 1a91041 |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Encryption I: Caesar Cipher | | Caesar cipher is one of the simplest encryption technique. It is a type of |
|
|
||||||
| | | substitution cipher in which each letter in the plaintext is replaced by a letter some |
|
|
||||||
| | | fixed number of positions down the alphabet. For example, with a left shift of 3, D |
|
|
||||||
| | | would be replaced by A, E would become B, and A would become X (because of rotation). |
|
|
||||||
| | | You are given an array with two elements. The first element is the plaintext, the |
|
|
||||||
| | | second element is the left shift value. Return the ciphertext as uppercase string. |
|
|
||||||
| | | Spaces remains the same. |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
||||||
| Encryption II: Vigenère Cipher | | Vigenère cipher is a type of polyalphabetic substitution. It uses the Vigenère square |
|
|
||||||
| | | to encrypt and decrypt plaintext with a keyword. |
|
|
||||||
| | | Vignenère square: |
|
|
||||||
| | | A B C D E F G H I J K L M N O P Q R S T U V W X Y Z |
|
|
||||||
| | | +---------------------------------------------------- |
|
|
||||||
| | | A | A B C D E F G H I J K L M N O P Q R S T U V W X Y Z |
|
|
||||||
| | | B | B C D E F G H I J K L M N O P Q R S T U V W X Y Z A |
|
|
||||||
| | | C | C D E F G H I J K L M N O P Q R S T U V W X Y Z A B |
|
|
||||||
| | | D | D E F G H I J K L M N O P Q R S T U V W X Y Z A B C |
|
|
||||||
| | | E | E F G H I J K L M N O P Q R S T U V W X Y Z A B C D |
|
|
||||||
| | | ... |
|
|
||||||
| | | Y | Y Z A B C D E F G H I J K L M N O P Q R S T U V W X |
|
|
||||||
| | | Z | Z A B C D E F G H I J K L M N O P Q R S T U V W X Y |
|
|
||||||
| | | For encryption each letter of the plaintext is paired with the corresponding letter of |
|
|
||||||
| | | a repeating keyword. For example, the plaintext DASHBOARD is encrypted with the |
|
|
||||||
| | | keyword LINUX: |
|
|
||||||
| | | Plaintext: DASHBOARD |
|
|
||||||
| | | Keyword: LINUXLINU |
|
|
||||||
| | | So, the first letter D is paired with the first letter of the key L. Therefore, row D |
|
|
||||||
| | | and column L of the Vigenère square are used to get the first cipher letter O. This |
|
|
||||||
| | | must be repeated for the whole ciphertext. |
|
|
||||||
| | | You are given an array with two elements. The first element is the plaintext, the |
|
|
||||||
| | | second element is the keyword. Return the ciphertext as uppercase string. |
|
|
||||||
+-----------------------------------------+------------------------------------------------------------------------------------------+
|
|
@ -1,17 +0,0 @@
|
|||||||
.. _gameplay_companies:
|
|
||||||
|
|
||||||
Companies
|
|
||||||
=========
|
|
||||||
When exploring the :ref:`world <gameplay_world>`, you can visit various companies. At
|
|
||||||
these companies, you can apply for jobs.
|
|
||||||
|
|
||||||
Working a job lets you earn money, experience, and reputation 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.
|
|
@ -1,58 +0,0 @@
|
|||||||
.. _gameplay_crimes:
|
|
||||||
|
|
||||||
Crimes
|
|
||||||
======
|
|
||||||
Committing crimes is an active gameplay mechanic that allows the player to train
|
|
||||||
their stats and potentially earn money. The player can attempt to commit crimes
|
|
||||||
by visiting 'The Slums' through the 'City' tab (:ref:`Keyboard shortcut <shortcuts>` 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 (and Augmentation multipliers) and 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.
|
|
||||||
|
|
||||||
Crime details
|
|
||||||
^^^^^^^^^^^^^
|
|
||||||
Available crimes, and their descriptions, which all begin with "attempt to..."
|
|
||||||
|
|
||||||
Shoplift …shoplift from a low-end retailer
|
|
||||||
|
|
||||||
Rob store …commit armed robbery on a high-end store
|
|
||||||
|
|
||||||
Mug someone …mug a random person on the street
|
|
||||||
|
|
||||||
Larceny …rob property from someone's house
|
|
||||||
|
|
||||||
Deal Drugs …deal drugs
|
|
||||||
|
|
||||||
Bond Forgery …forge corporate bonds
|
|
||||||
|
|
||||||
Traffick illegal Arms …smuggle illegal arms into the city
|
|
||||||
|
|
||||||
Homicide …murder a random person on the street
|
|
||||||
|
|
||||||
Grand theft Auto …commit grand theft auto
|
|
||||||
|
|
||||||
Kidnap and Ransom …kidnap and ransom a high-profile-target
|
|
||||||
|
|
||||||
Assassinate …assassinate a high-profile target
|
|
||||||
|
|
||||||
Heist …pull off the ultimate heist
|
|
@ -1,255 +0,0 @@
|
|||||||
.. _gameplay_factions:
|
|
||||||
|
|
||||||
Factions
|
|
||||||
========
|
|
||||||
|
|
||||||
.. warning:: This page contains spoilers regarding the game's story/plot-line.
|
|
||||||
|
|
||||||
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
|
|
||||||
:ref:`gameplay_augmentations` 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 except that you don't get paid a
|
|
||||||
salary. You will only earn reputation in your Faction and train your
|
|
||||||
stats. Also, cancelling work early when working for a Faction does
|
|
||||||
**not** result in reduced reputation earnings.
|
|
||||||
|
|
||||||
Earning reputation for a Faction unlocks powerful Augmentations.
|
|
||||||
Purchasing and installing these Augmentations will upgrade your
|
|
||||||
abilities. The Augmentations that are available to unlock vary
|
|
||||||
from faction to faction.
|
|
||||||
|
|
||||||
List of Factions and their Requirements
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
.. raw:: html
|
|
||||||
|
|
||||||
<details><summary><a>Early Game Factions</a></summary>
|
|
||||||
|
|
||||||
.. _gameplay_factions::
|
|
||||||
|
|
||||||
+---------------------+--------------------+-----------------------------------------+-------------------------------+
|
|
||||||
| Early Game | Faction Name | Requirements | Joining this Faction prevents |
|
|
||||||
| Factions | | | you from joining: |
|
|
||||||
+ +--------------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | CyberSec | * Install a backdoor on the CSEC server | |
|
|
||||||
+ +--------------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Tian Di Hui | * $1m | |
|
|
||||||
| | | * Hacking Level 50 | |
|
|
||||||
| | | * Be in Chongqing, New Tokyo, or Ishima | |
|
|
||||||
+ +--------------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Netburners | * Hacking Level 80 | |
|
|
||||||
| | | * Total Hacknet Levels of 100 | |
|
|
||||||
| | | * Total Hacknet RAM of 8 | |
|
|
||||||
| | | * Total Hacknet Cores of 4 | |
|
|
||||||
+ +--------------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Shadows of Anarchy | * Successfully infiltrate a company | |
|
|
||||||
+---------------------+--------------------+-----------------------------------------+-------------------------------+
|
|
||||||
.. raw:: html
|
|
||||||
|
|
||||||
</details>
|
|
||||||
<details><summary><a>City Factions</a></summary>
|
|
||||||
|
|
||||||
.. _gameplay_factions::
|
|
||||||
|
|
||||||
+---------------------+----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| City Factions | Faction Name | Requirements | Joining this Faction prevents |
|
|
||||||
| | | | you from joining: |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Sector-12 | * Be in Sector-12 | * Chongqing |
|
|
||||||
| | | * $15m | * New Tokyo |
|
|
||||||
| | | | * Ishima |
|
|
||||||
| | | | * Volhaven |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Chongqing | * Be in Chongqing | * Sector-12 |
|
|
||||||
| | | * $20m | * Aevum |
|
|
||||||
| | | | * Volhaven |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | New Tokyo | * Be in New Tokyo | * Sector-12 |
|
|
||||||
| | | * $20m | * Aevum |
|
|
||||||
| | | | * Volhaven |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Ishima | * Be in Ishima | * Sector-12 |
|
|
||||||
| | | * $30m | * Aevum |
|
|
||||||
| | | | * Volhaven |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Aevum | * Be in Aevum | * Chongqing |
|
|
||||||
| | | * $40m | * New Tokyo |
|
|
||||||
| | | | * Ishima |
|
|
||||||
| | | | * Volhaven |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Volhaven | * Be in Volhaven | * Sector-12 |
|
|
||||||
| | | * $50m | * Aevum |
|
|
||||||
| | | | * Chongqing |
|
|
||||||
| | | | * New Tokyo |
|
|
||||||
| | | | * Ishima |
|
|
||||||
+---------------------+----------------+-----------------------------------------+-------------------------------+
|
|
||||||
.. raw:: html
|
|
||||||
|
|
||||||
</details>
|
|
||||||
<details><summary><a>Hacking Groups</a></summary>
|
|
||||||
|
|
||||||
.. _gameplay_factions::
|
|
||||||
|
|
||||||
+---------------------+----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| Hacking | Faction Name | Requirements | Joining this Faction prevents |
|
|
||||||
| Groups | | | you from joining: |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | NiteSec | * Install a backdoor on the avmnite-02h | |
|
|
||||||
| | | server | |
|
|
||||||
| | | | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | The Black Hand | * Install a backdoor on the I.I.I.I | |
|
|
||||||
| | | server | |
|
|
||||||
| | | | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | BitRunners | * Install a backdoor on the run4theh111z| |
|
|
||||||
| | | server | |
|
|
||||||
| | | | |
|
|
||||||
+---------------------+----------------+-----------------------------------------+-------------------------------+
|
|
||||||
.. raw:: html
|
|
||||||
|
|
||||||
</details>
|
|
||||||
<details><summary><a>Megacorporations</a></summary>
|
|
||||||
|
|
||||||
.. _gameplay_factions::
|
|
||||||
|
|
||||||
+---------------------+----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| Megacorporations | Faction Name | Requirements | Joining this Faction prevents |
|
|
||||||
| | | | you from joining: |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | ECorp | * Have 400k reputation with | |
|
|
||||||
| | | the Corporation | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | MegaCorp | * Have 400k reputation with | |
|
|
||||||
| | | the Corporation | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | KuaiGong | * Have 400k reputation with | |
|
|
||||||
| | International | the Corporation | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Four Sigma | * Have 400k reputation with | |
|
|
||||||
| | | the Corporation | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | NWO | * Have 400k reputation with | |
|
|
||||||
| | | the Corporation | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Blade | * Have 400k reputation with | |
|
|
||||||
| | Industries | the Corporation | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | OmniTek | * Have 400k reputation with | |
|
|
||||||
| | Incorporated | the Corporation | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Bachman & | * Have 400k reputation with | |
|
|
||||||
| | Associates | the Corporation | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Clarke | * Have 400k reputation with | |
|
|
||||||
| | Incorporated | the Corporation | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Fulcrum Secret | * Have 400k reputation with | |
|
|
||||||
| | Technologies | the Corporation | |
|
|
||||||
| | | * Install a backdoor on the | |
|
|
||||||
| | | fulcrumassets server | |
|
|
||||||
+---------------------+----------------+-----------------------------------------+-------------------------------+
|
|
||||||
.. raw:: html
|
|
||||||
|
|
||||||
</details>
|
|
||||||
<details><summary><a>Criminal Organizations</a></summary>
|
|
||||||
|
|
||||||
.. _gameplay_factions::
|
|
||||||
|
|
||||||
+---------------------+----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| Criminal | Faction Name | Requirements | Joining this Faction prevents |
|
|
||||||
| Organizations | | | you from joining: |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Slum Snakes | * All Combat Stats of 30 | |
|
|
||||||
| | | * -9 Karma | |
|
|
||||||
| | | * $1m | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Tetrads | * Be in Chongqing, New Tokyo, or Ishima | |
|
|
||||||
| | | * All Combat Stats of 75 | |
|
|
||||||
| | | * -18 Karma | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Silhouette | * CTO, CFO, or CEO of a company | |
|
|
||||||
| | | * $15m | |
|
|
||||||
| | | * -22 Karma | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Speakers for | * Hacking Level 100 | |
|
|
||||||
| | the Dead | * All Combat Stats of 300 | |
|
|
||||||
| | | * 30 People Killed | |
|
|
||||||
| | | * -45 Karma | |
|
|
||||||
| | | * Not working for CIA or NSA | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | The Dark Army | * Hacking Level 300 | |
|
|
||||||
| | | * All Combat Stats of 300 | |
|
|
||||||
| | | * Be in Chongqing | |
|
|
||||||
| | | * 5 People Killed | |
|
|
||||||
| | | * -45 Karma | |
|
|
||||||
| | | * Not working for CIA or NSA | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | The Syndicate | * Hacking Level 200 | |
|
|
||||||
| | | * All Combat Stats of 200 | |
|
|
||||||
| | | * Be in Aevum or Sector-12 | |
|
|
||||||
| | | * $10m | |
|
|
||||||
| | | * -90 Karma | |
|
|
||||||
| | | * Not working for CIA or NSA | |
|
|
||||||
+---------------------+----------------+-----------------------------------------+-------------------------------+
|
|
||||||
.. raw:: html
|
|
||||||
|
|
||||||
</details>
|
|
||||||
<details><summary><a>Midgame Factions</a></summary>
|
|
||||||
|
|
||||||
.. _gameplay_factions::
|
|
||||||
|
|
||||||
+---------------------+----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| Midgame | Faction Name | Requirements | Joining this Faction prevents |
|
|
||||||
| Factions | | | you from joining: |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | The Covenant | * 20 Augmentations | |
|
|
||||||
| | | * $75b | |
|
|
||||||
| | | * Hacking Level of 850 | |
|
|
||||||
| | | * All Combat Stats of 850 | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Daedalus | * 30 Augmentations | |
|
|
||||||
| | | * $100b | |
|
|
||||||
| | | * Hacking Level of 2500 OR All Combat | |
|
|
||||||
| | | Stats of 1500 | |
|
|
||||||
+ +----------------+-----------------------------------------+-------------------------------+
|
|
||||||
| | Illuminati | * 30 Augmentations | |
|
|
||||||
| | | * $150b | |
|
|
||||||
| | | * Hacking Level of 1500 | |
|
|
||||||
| | | * All Combat Stats of 1200 | |
|
|
||||||
+---------------------+----------------+-----------------------------------------+-------------------------------+
|
|
||||||
.. raw:: html
|
|
||||||
|
|
||||||
</details>
|
|
||||||
<details><summary><a>Endgame Factions</a></summary>
|
|
||||||
|
|
||||||
.. _gameplay_factions::
|
|
||||||
|
|
||||||
+---------------------+----------------+--------------------------------------------------------------+-------------------------------+
|
|
||||||
| Endgame | Faction Name | Requirements | Joining this Faction prevents |
|
|
||||||
| Factions | | | you from joining: |
|
|
||||||
+ +----------------+--------------------------------------------------------------+-------------------------------+
|
|
||||||
| | Bladeburners | * Join Bladeburner Division | |
|
|
||||||
| | | * Have 25 Rank | |
|
|
||||||
| | | * Be in BitNode 6 or 7 | |
|
|
||||||
| | | * or have Source-File 6 or 7 | |
|
|
||||||
+ +----------------+--------------------------------------------------------------+-------------------------------+
|
|
||||||
| | Church of the | * Have not installed any augmentations in the current BitNode| |
|
|
||||||
| | Machine God | * Be in BitNode 13 | |
|
|
||||||
| | | * or have Source-File 13 | |
|
|
||||||
+---------------------+----------------+--------------------------------------------------------------+-------------------------------+
|
|
||||||
.. raw:: html
|
|
||||||
|
|
||||||
</details><br>
|
|
@ -1,120 +0,0 @@
|
|||||||
.. _gameplay_hacking:
|
|
||||||
|
|
||||||
Hacking
|
|
||||||
=======
|
|
||||||
|
|
||||||
In the year 2077, currency has become digital and decentralized.
|
|
||||||
People and corporations store their money on servers. By hacking
|
|
||||||
these servers, you can steal their money and gain experience.
|
|
||||||
|
|
||||||
Gaining Root Access
|
|
||||||
^^^^^^^^^^^^^^^^^^^
|
|
||||||
The first step to hacking a server is to gain root access to that server.
|
|
||||||
This can be done using the NUKE virus (NUKE.exe). You start the
|
|
||||||
game with a copy of the NUKE virus on your home computer. The
|
|
||||||
NUKE virus attacks the target server's open ports using buffer
|
|
||||||
overflow exploits. When successful, you are granted root
|
|
||||||
administrative access to the machine.
|
|
||||||
|
|
||||||
In order for the NUKE virus to succeed, the target server
|
|
||||||
needs to have enough open ports. Some servers 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, you will need to run programs that attack the server
|
|
||||||
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:**
|
|
||||||
|
|
||||||
1. Connect to the target server through the :ref:`terminal` and use the
|
|
||||||
:ref:`run_terminal_command` Terminal command::
|
|
||||||
|
|
||||||
$ run [programName]
|
|
||||||
2. Use a :ref:`Netscript Function <netscriptfunctions>`:
|
|
||||||
|
|
||||||
* :js:func:`nuke`
|
|
||||||
* :js:func:`brutessh`
|
|
||||||
* :js:func:`ftpcrack`
|
|
||||||
* :js:func:`relaysmtp`
|
|
||||||
* :js:func:`httpworm`
|
|
||||||
* :js:func:`sqlinject`
|
|
||||||
|
|
||||||
**There are two ways to determine how many ports need to be opened
|
|
||||||
on a server in order to successfully NUKE it:**
|
|
||||||
|
|
||||||
1. Connect to that server through the :ref:`terminal` and use the
|
|
||||||
:ref:`analyze_terminal_command` command
|
|
||||||
2. Use the :js:func:`getServerNumPortsRequired` Netscript function
|
|
||||||
|
|
||||||
Once you have enough ports opened on a server and have ran the NUKE virus
|
|
||||||
to gain root access, you will be able to hack it.
|
|
||||||
|
|
||||||
.. _gameplay_hacking_generalhackingmechanics:
|
|
||||||
|
|
||||||
General Hacking Mechanics
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
When you execute the hack command, either manually through the terminal
|
|
||||||
or automatically through a script, you attempt to hack the server.
|
|
||||||
This action takes time. The more advanced a server'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
|
|
||||||
is faster than hacking from a script.
|
|
||||||
|
|
||||||
Your attempt to hack a server will not always succeed. The chance you
|
|
||||||
have to successfully hack a server is also determined by the server'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. You steal a certain percentage
|
|
||||||
of that server's total money. This percentage is, once again, determined by the
|
|
||||||
server's security and your hacking skill level. The amount of money
|
|
||||||
on a server is not limitless. So, if you constantly hack a server
|
|
||||||
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 using a script and
|
|
||||||
the :js:func:`grow` function in Netscript.
|
|
||||||
|
|
||||||
.. _gameplay_hacking_serversecurity:
|
|
||||||
|
|
||||||
Server Security
|
|
||||||
^^^^^^^^^^^^^^^
|
|
||||||
Each server has a security level, typically between 1 and 100.
|
|
||||||
A higher number means the server has stronger security. It is
|
|
||||||
possible for a server to have a security of level 100 or higher, in
|
|
||||||
which case hacking that server will become impossible (0% chance for
|
|
||||||
hack to succeed).
|
|
||||||
|
|
||||||
As mentioned above, a server's security level is an important factor
|
|
||||||
to consider when hacking. You can check a server's security level
|
|
||||||
using the :ref:`analyze_terminal_command` Terminal command. You can
|
|
||||||
also check a server's security in
|
|
||||||
a script, using the :js:func:`getServerSecurityLevel` Netscript
|
|
||||||
Function. See the Netscript documentation for more details.
|
|
||||||
|
|
||||||
Whenever a server is hacked manually or through a script, its security
|
|
||||||
level increases by a small amount. Calling the :js:func:`grow` function in a
|
|
||||||
script will also increase security level of the target server. These
|
|
||||||
actions will make it harder for you to hack the server, and decrease
|
|
||||||
the amount of money you can steal. You can lower a server's security
|
|
||||||
level in a script using the :js:func:`weaken` function in Netscript. See
|
|
||||||
the Netscript documentation for more details
|
|
||||||
|
|
||||||
A server has a minimum security level that is equal to one third of its
|
|
||||||
starting security, rounded to the nearest integer. To be more precise::
|
|
||||||
|
|
||||||
server.minSecurityLevel = Math.max(1, Math.round(server.startingSecurityLevel / 3))
|
|
||||||
|
|
||||||
This means that a server's security level will not fall below this
|
|
||||||
value if you are trying to weaken() it.
|
|
||||||
|
|
||||||
Backdoors
|
|
||||||
^^^^^^^^^
|
|
||||||
Servers 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 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 related to the location.
|
|
@ -1,70 +0,0 @@
|
|||||||
.. _gameplay_infiltration:
|
|
||||||
|
|
||||||
Infiltration
|
|
||||||
============
|
|
||||||
Infiltration is a gameplay mechanic that allows you to infiltrate a
|
|
||||||
company's facility to try and steal the company's classified secrets.
|
|
||||||
These secrets can be sold for money or for reputation with a faction.
|
|
||||||
|
|
||||||
Overview
|
|
||||||
^^^^^^^^
|
|
||||||
Many companies have facilities that you can attempt to infiltrate.
|
|
||||||
By infiltrating, you can steal classified company secrets and then sell
|
|
||||||
these for money or for faction reputation. To try and infiltrate a company,
|
|
||||||
visit a company through the 'World' menu. There will be an option that
|
|
||||||
says 'Infiltrate Company'.
|
|
||||||
|
|
||||||
When infiltrating a company you will be presented with short active challenges.
|
|
||||||
None of the challenges use the mouse.
|
|
||||||
|
|
||||||
The difficulty at the top lowers with better combat stats and charisma. It is not recommended
|
|
||||||
to attempt infiltrations above mid-normal.
|
|
||||||
|
|
||||||
The "maximum level" is the number of challenges you will need to pass to receive
|
|
||||||
the infiltration reward.
|
|
||||||
|
|
||||||
Every time you fail an infiltration challenge, you will take damage based on the
|
|
||||||
difficulty of the infiltration. If you are reduced to 0 hp or below, the
|
|
||||||
infiltration will immediately end.
|
|
||||||
|
|
||||||
* Most use spacebar as "action"
|
|
||||||
* Some use WASD or arrows interchangeably.
|
|
||||||
* A few others use the rest of the keyboard.
|
|
||||||
|
|
||||||
** Slash when his guard is down! **
|
|
||||||
|
|
||||||
Press space when the guard is preparing to attack you.
|
|
||||||
There's 3 phases
|
|
||||||
The first is guarding, where attacking back will result in failure.
|
|
||||||
The 2nd is preparing, where attacking will result in a victory.
|
|
||||||
The 3rd is attack, where the guard will attack you resulting in 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 appears.
|
|
||||||
|
|
||||||
** 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 X.
|
|
||||||
Then 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.
|
|
@ -1,79 +0,0 @@
|
|||||||
.. _gameplay_servers:
|
|
||||||
|
|
||||||
Servers
|
|
||||||
=======
|
|
||||||
In this game, a server refers to a computer that can be connected to,
|
|
||||||
accessed, and manipulated through the Terminal. All servers in the
|
|
||||||
game are connected to each other to form a large, global network.
|
|
||||||
To learn about how to navigate this network and connect to other
|
|
||||||
servers, see the :ref:`Terminal` page.
|
|
||||||
|
|
||||||
Server Statistics
|
|
||||||
^^^^^^^^^^^^^^^^^
|
|
||||||
Each server has it's own statistics, such as RAM, required hacking level and number of
|
|
||||||
ports required to successfully NUKE it.
|
|
||||||
|
|
||||||
Perhaps the most important property of a server to make note of is its RAM,
|
|
||||||
which refers to how much memory is available on that machine. RAM is
|
|
||||||
important because it is required to run Scripts. More RAM allows
|
|
||||||
the user to run more powerful and complicated scripts as well as executing
|
|
||||||
a script with :ref:`more threads <gameplay_scripts_multithreadingscripts>`.
|
|
||||||
|
|
||||||
The `free`, `scan-analyze`, and `analyze` Terminal commands
|
|
||||||
can be used to check how much RAM a server has.
|
|
||||||
|
|
||||||
Some servers have some randomized statistics, such as RAM, max Money or
|
|
||||||
required hacking level. These statistics are randomly generated from a range of values.
|
|
||||||
|
|
||||||
Identifying Servers
|
|
||||||
^^^^^^^^^^^^^^^^^^^
|
|
||||||
A server is identified by its hostname.
|
|
||||||
A hostname is a label assigned to a server.
|
|
||||||
A hostname will usually give you a general idea of what the server
|
|
||||||
is. For example, the company Nova Medical might have a server with
|
|
||||||
the hostname "nova-med".
|
|
||||||
|
|
||||||
Hostnames are unique. This means that if one
|
|
||||||
server has the the hostname "some-server", then no other server
|
|
||||||
in the game can have that that hostname.
|
|
||||||
|
|
||||||
There are many :ref:`Netscript Functions <netscriptfunctions>`
|
|
||||||
and :ref:`terminal` 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:
|
|
||||||
|
|
||||||
1. The home computer's RAM can be upgraded. This can be done by visiting
|
|
||||||
certain locations in the World.
|
|
||||||
|
|
||||||
2. The home computer persists through Augmentation Installations. This means
|
|
||||||
that you will not lose any RAM upgrades or Scripts on your
|
|
||||||
home computer when you install :ref:`gameplay_augmentations` (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, or it can be
|
|
||||||
done automatically through a script using the :js:func:`purchaseServer`
|
|
||||||
Netscript Function. The advantage of purchased servers is that,
|
|
||||||
in terms of RAM, they are cheaper than upgrading your home
|
|
||||||
computer. The disadvantage is that your purchased servers
|
|
||||||
are lost when you install Augmentations.
|
|
||||||
|
|
||||||
Hackable Servers
|
|
||||||
^^^^^^^^^^^^^^^^
|
|
||||||
Most servers that are not owned by the player can be hacked for money
|
|
||||||
and exp. See the :ref:`gameplay_hacking` page for more details.
|
|
||||||
|
|
||||||
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 :ref:`gameplay_augmentations`. In general the
|
|
||||||
further away from home computer a server is the higher it's statistics are.
|
|
@ -1,116 +0,0 @@
|
|||||||
.. _gameplay_stats:
|
|
||||||
|
|
||||||
Stats
|
|
||||||
=====
|
|
||||||
The player has several stats that can be increased in order to progress
|
|
||||||
in the game.
|
|
||||||
|
|
||||||
Hacking
|
|
||||||
^^^^^^^
|
|
||||||
Represents the player's ability to code and hack.
|
|
||||||
|
|
||||||
Affects:
|
|
||||||
|
|
||||||
* Time it takes to hack a server
|
|
||||||
* Time it takes to execute the grow() and weaken() Netscript function
|
|
||||||
* Chance to successfully hack a server
|
|
||||||
* Percent money stolen when hacking a server
|
|
||||||
* Success rate of certain crimes
|
|
||||||
* Time it takes to create a program
|
|
||||||
* Faction reputation gain when carrying out Hacking Contracts or Field Work
|
|
||||||
* Company reputation gain for certain jobs
|
|
||||||
|
|
||||||
Gain experience by:
|
|
||||||
|
|
||||||
* Manually hacking servers through Terminal
|
|
||||||
* Executing hack(), grow(), or weaken() through a script
|
|
||||||
* Committing certain crimes
|
|
||||||
* Carrying out Hacking Contracts or doing Field work for Factions
|
|
||||||
* Working certain jobs at a company
|
|
||||||
* Studying at a university
|
|
||||||
|
|
||||||
Strength
|
|
||||||
^^^^^^^^
|
|
||||||
Represents the player's physical offensive power
|
|
||||||
|
|
||||||
Affects:
|
|
||||||
|
|
||||||
* Success rate of certain crimes
|
|
||||||
* Faction reputation gain for Security and Field Work
|
|
||||||
* Company reputation gain for certain jobs
|
|
||||||
|
|
||||||
Gain experience by:
|
|
||||||
|
|
||||||
* Committing certain crimes
|
|
||||||
* Working out at a gym
|
|
||||||
* Doing Security/Field Work for a faction
|
|
||||||
* Working certain jobs at a company
|
|
||||||
|
|
||||||
Defense
|
|
||||||
^^^^^^^
|
|
||||||
Represents the player's ability to withstand damage
|
|
||||||
|
|
||||||
Affects:
|
|
||||||
|
|
||||||
* Success rate of certain crimes
|
|
||||||
* The player's HP
|
|
||||||
* Faction reputation gain for Security and Field Work
|
|
||||||
* Company reputation gain for certain jobs
|
|
||||||
|
|
||||||
Gain experience by:
|
|
||||||
|
|
||||||
* Committing certain crimes
|
|
||||||
* Working out at a gym
|
|
||||||
* Doing Security/Field Work for a faction
|
|
||||||
* Working certain jobs at a company
|
|
||||||
|
|
||||||
Dexterity
|
|
||||||
^^^^^^^^^
|
|
||||||
Represents the player's skill and adeptness in performing certain tasks
|
|
||||||
|
|
||||||
Affects:
|
|
||||||
|
|
||||||
* Success rate of certain crimes
|
|
||||||
* Faction reputation gain for Security and Field Work
|
|
||||||
* Company reputation gain for certain jobs
|
|
||||||
|
|
||||||
Gain experience by:
|
|
||||||
|
|
||||||
* Committing certain crimes
|
|
||||||
* Working out at a gym
|
|
||||||
* Doing Security/Field Work for a faction
|
|
||||||
* Working certain jobs at a company
|
|
||||||
|
|
||||||
Agility
|
|
||||||
^^^^^^^
|
|
||||||
Represents the player's speed and ability to move
|
|
||||||
|
|
||||||
Affects:
|
|
||||||
|
|
||||||
* Success rate of certain crimes
|
|
||||||
* Faction reputation gain for Security and Field Work
|
|
||||||
* Company reputation gain for certain jobs
|
|
||||||
|
|
||||||
Gain experience by:
|
|
||||||
|
|
||||||
* Committing certain crimes
|
|
||||||
* Working out at a gym
|
|
||||||
* Doing Security/Field Work for a faction
|
|
||||||
* Working certain jobs at a company
|
|
||||||
|
|
||||||
Charisma
|
|
||||||
^^^^^^^^
|
|
||||||
Represents the player's social abilities
|
|
||||||
|
|
||||||
Affects:
|
|
||||||
|
|
||||||
* Success rate of certain crimes
|
|
||||||
* Faction reputation gain for Field Work
|
|
||||||
* Company reputation gain for most jobs
|
|
||||||
|
|
||||||
Gain experience by:
|
|
||||||
|
|
||||||
* Committing certain crimes
|
|
||||||
* Studying at a university
|
|
||||||
* Working a relevant job at a company
|
|
||||||
* Doing Field work for a Faction
|
|
@ -1,652 +0,0 @@
|
|||||||
.. _terminal:
|
|
||||||
|
|
||||||
Terminal
|
|
||||||
========
|
|
||||||
The Terminal is a console emulator program that lets you interface with all of the
|
|
||||||
Servers 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). Alternatively, the :ref:`keyboard
|
|
||||||
shortcut <shortcuts>` Alt + t can be used to open the Terminal.
|
|
||||||
|
|
||||||
.. _terminal_filesystem:
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Here are the Terminal commands you'll commonly use when dealing with the filesystem.
|
|
||||||
|
|
||||||
* :ref:`ls_terminal_command`
|
|
||||||
* :ref:`cd_terminal_command`
|
|
||||||
* :ref:`mv_terminal_command`
|
|
||||||
|
|
||||||
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 :code:`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. The creation and
|
|
||||||
deletion of directories is automatically handled as you name/rename/delete
|
|
||||||
files.
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
Netscript
|
|
||||||
^^^^^^^^^
|
|
||||||
Note that in order to reference a file, :ref:`netscript` functions require the
|
|
||||||
**full** absolute file path. For example
|
|
||||||
|
|
||||||
.. code:: javascript
|
|
||||||
|
|
||||||
ns.run("/scripts/hacking/helpers.myHelperScripts.js");
|
|
||||||
ns.rm("/logs/myHackingLogs.txt");
|
|
||||||
ns.rm("thisIsAFileInTheRootDirectory.txt");
|
|
||||||
|
|
||||||
.. note:: 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
|
|
||||||
* :code:`mv` only accepts full filepaths for the destination argument. It does not accept directories
|
|
||||||
|
|
||||||
Commands
|
|
||||||
--------
|
|
||||||
|
|
||||||
alias
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
$ alias [-g] [name="value"]
|
|
||||||
|
|
||||||
Create or display aliases. An alias enables a replacement of a word with another
|
|
||||||
string. It can be used to abbreviate a commonly used command, or commonly used
|
|
||||||
parts of a command. The NAME of an alias defines the word that will be
|
|
||||||
replaced, while the VALUE defines what it will be replaced by. For example,
|
|
||||||
you could create the alias 'nuke' for the Terminal command 'run NUKE.exe'
|
|
||||||
using the following::
|
|
||||||
|
|
||||||
$ alias nuke="run NUKE.exe"
|
|
||||||
|
|
||||||
Then, to run the NUKE.exe program you would just have to enter 'nuke' in
|
|
||||||
Terminal rather than the full command. It is important to note that 'default'
|
|
||||||
aliases will only be substituted for the first word of a Terminal command. For
|
|
||||||
example, if the following alias was set::
|
|
||||||
|
|
||||||
$ alias worm="HTTPWorm.exe"
|
|
||||||
|
|
||||||
and then you tried to run the following terminal command::
|
|
||||||
|
|
||||||
$ run worm
|
|
||||||
|
|
||||||
This would fail because the worm alias is not the first word of a Terminal
|
|
||||||
command. To allow an alias to be substituted anywhere in a Terminal command,
|
|
||||||
rather than just the first word, you must set it to be a global alias using the -g flag::
|
|
||||||
|
|
||||||
$ alias -g worm="HTTPWorm.exe"
|
|
||||||
|
|
||||||
Now, the 'worm' alias will be substituted anytime it shows up as an individual word in
|
|
||||||
a Terminal command.
|
|
||||||
|
|
||||||
Entering just the command 'alias' without any arguments prints the list of all
|
|
||||||
defined aliases in the reusable form 'alias NAME=VALUE' on the Terminal.
|
|
||||||
|
|
||||||
The :ref:`unalias_terminal_command` Terminal command can be used to remove aliases.
|
|
||||||
|
|
||||||
.. _analyze_terminal_command:
|
|
||||||
|
|
||||||
analyze
|
|
||||||
^^^^^^^
|
|
||||||
|
|
||||||
Prints details and statistics about the current server. The information that is
|
|
||||||
printed includes basic server details such as the hostname, whether the player
|
|
||||||
has root access, what ports are opened/closed, and also hacking-related information
|
|
||||||
such as an estimated chance to successfully hack, an estimate of how much money is
|
|
||||||
available on the server, etc.
|
|
||||||
|
|
||||||
backdoor
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
Installs a backdoor on the current server. Root access is required to do this.
|
|
||||||
|
|
||||||
Servers will give different bonuses when you install a backdoor.
|
|
||||||
This can pass faction tests or give bonuses such as discounts from companies.
|
|
||||||
|
|
||||||
buy
|
|
||||||
^^^
|
|
||||||
|
|
||||||
$ buy [-l/-a/program]
|
|
||||||
|
|
||||||
Purchase a program through the Dark Web. Requires a TOR Router to use.
|
|
||||||
|
|
||||||
If this command is ran with the '-l' flag, it will display a list of all programs
|
|
||||||
that can be purchased through the Dark Web, as well as their costs.
|
|
||||||
|
|
||||||
If this command is ran with the '-a' flag, it will attempt to buy all programs
|
|
||||||
that can be purchased through the Dark Web and if the player can't afford all of them
|
|
||||||
none will be bought.
|
|
||||||
|
|
||||||
Otherwise, the name of the program must be passed in as a parameter. This name
|
|
||||||
is NOT case-sensitive::
|
|
||||||
|
|
||||||
$ buy brutessh.exe
|
|
||||||
|
|
||||||
Note that you do not need to be connected to the actual dark web server in order
|
|
||||||
to run this command. You can use this command at any time on the Terminal.
|
|
||||||
|
|
||||||
cat
|
|
||||||
^^^
|
|
||||||
|
|
||||||
$ cat [filename]
|
|
||||||
|
|
||||||
Display a message (.msg), literature (.lit), or text (.txt) file::
|
|
||||||
|
|
||||||
$ cat j1.msg
|
|
||||||
$ cat foo.lit
|
|
||||||
$ cat servers.txt
|
|
||||||
|
|
||||||
.. _cd_terminal_command:
|
|
||||||
|
|
||||||
cd
|
|
||||||
^^
|
|
||||||
|
|
||||||
$ cd [dir]
|
|
||||||
|
|
||||||
Change to the specified directory.
|
|
||||||
|
|
||||||
See :ref:`terminal_filesystem` for details on directories.
|
|
||||||
|
|
||||||
Note that this command works even for directories that don't exist. If you change
|
|
||||||
to a directory that doesn't exist, it will not be created. A directory is only created
|
|
||||||
once there is a file in it::
|
|
||||||
|
|
||||||
$ cd scripts/hacking
|
|
||||||
$ cd /logs
|
|
||||||
$ cd ..
|
|
||||||
|
|
||||||
check
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
$ check [script name] [args...]
|
|
||||||
|
|
||||||
Print the logs of the script specified by the script name and arguments to the Terminal.
|
|
||||||
Each argument must be separated by a space.
|
|
||||||
**Remember that a running script is uniquely identified both by its name and the arguments that are used to start it**. So,
|
|
||||||
if a script was ran with the following arguments::
|
|
||||||
|
|
||||||
$ run foo.js 1 2 foodnstuff
|
|
||||||
|
|
||||||
Then to run the 'check' command on this script you would have to pass the same arguments in::
|
|
||||||
|
|
||||||
$ check foo.js 1 2 foodnstuff
|
|
||||||
|
|
||||||
clear/cls
|
|
||||||
^^^^^^^^^
|
|
||||||
|
|
||||||
|
|
||||||
Clear the Terminal screen, deleting all of the text. Note that this does not
|
|
||||||
delete the user's command history, so using the up and down arrow keys is
|
|
||||||
still valid. Also note that this is permanent and there is no way to undo this.
|
|
||||||
Both 'clear' and 'cls' do the same thing::
|
|
||||||
|
|
||||||
$ clear
|
|
||||||
$ cls
|
|
||||||
|
|
||||||
.. _connect_terminal_command:
|
|
||||||
|
|
||||||
connect
|
|
||||||
^^^^^^^
|
|
||||||
|
|
||||||
$ connect [hostname/ip]
|
|
||||||
|
|
||||||
Connect to a remote server. The hostname of the remote server must
|
|
||||||
be given as the argument to this command. Note that only servers that are immediately
|
|
||||||
adjacent to the current server in the network can be connected to. To see which
|
|
||||||
servers can be connected to, use the 'scan' command.
|
|
||||||
|
|
||||||
download
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
Downloads a script or text file to your computer (your real-life computer)::
|
|
||||||
|
|
||||||
$ download masterScript.script
|
|
||||||
$ download importantInfo.txt
|
|
||||||
|
|
||||||
You can also download all of your scripts/text files as a zip file using the following
|
|
||||||
Terminal commands::
|
|
||||||
|
|
||||||
$ download *
|
|
||||||
$ download *.script
|
|
||||||
$ download *.txt
|
|
||||||
|
|
||||||
expr
|
|
||||||
^^^^
|
|
||||||
|
|
||||||
$ expr [math expression]
|
|
||||||
|
|
||||||
Evaluate a mathematical expression. The expression is evaluated in JavaScript,
|
|
||||||
and therefore all JavaScript operators should be supported.
|
|
||||||
|
|
||||||
Examples::
|
|
||||||
|
|
||||||
$ expr 5.6 * 10 - 123
|
|
||||||
$ expr 3 ** 3
|
|
||||||
|
|
||||||
|
|
||||||
free
|
|
||||||
^^^^
|
|
||||||
|
|
||||||
Display's the memory usage on the current machine. Print the amount of RAM that
|
|
||||||
is available on the current server as well as how much of it is being used.
|
|
||||||
|
|
||||||
hack
|
|
||||||
^^^^
|
|
||||||
|
|
||||||
Attempt to hack the current server. Requires root access in order to be run.
|
|
||||||
|
|
||||||
Related: Hacking Mechanics :ref:`hacking`
|
|
||||||
|
|
||||||
help
|
|
||||||
^^^^
|
|
||||||
|
|
||||||
$ help [command]
|
|
||||||
|
|
||||||
Display Terminal help information. Without arguments, 'help' prints a list of all
|
|
||||||
valid Terminal commands and a brief description of their functionality. You can
|
|
||||||
also pass the name of a Terminal command as an argument to 'help' to print more
|
|
||||||
detailed information about the Terminal command. Examples::
|
|
||||||
|
|
||||||
$ help alias
|
|
||||||
$ help scan-analyze
|
|
||||||
|
|
||||||
.. _home_terminal_command:
|
|
||||||
|
|
||||||
home
|
|
||||||
^^^^
|
|
||||||
|
|
||||||
Connect to your home computer. This will work no matter what server you are currently connected to.
|
|
||||||
|
|
||||||
hostname
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
Prints the hostname of the server you are currently connected to.
|
|
||||||
|
|
||||||
kill
|
|
||||||
^^^^
|
|
||||||
|
|
||||||
$ kill [script name] [args...]
|
|
||||||
$ kill [pid]
|
|
||||||
|
|
||||||
Kill the script specified by the script filename and arguments OR by its PID. If
|
|
||||||
filename and arguments are used the kill is server-specific, so if you're connected
|
|
||||||
to home and want to kill a script running on n00dles, you have to either use it's PID
|
|
||||||
or :code:`connect` to n00dles first and then use the the kill command.
|
|
||||||
|
|
||||||
If you are killing the script using its filename and arguments, then each argument
|
|
||||||
must be separated by a space. Remember that a running script is identified
|
|
||||||
by both its name and the arguments that are used to start it. So, if a script
|
|
||||||
was ran with the following arguments::
|
|
||||||
|
|
||||||
$ run foo.js 50e3 sigma-cosmetics
|
|
||||||
|
|
||||||
Then to kill this script the same arguments would have to be used::
|
|
||||||
|
|
||||||
$ kill foo.js 50e3 sigma-cosmetics
|
|
||||||
|
|
||||||
If there are multiple copies of a script running with the same arguments, all
|
|
||||||
of them will be killed.
|
|
||||||
|
|
||||||
If you are killing the script using its PID, then the PID argument must be numeric.
|
|
||||||
|
|
||||||
killall
|
|
||||||
^^^^^^^
|
|
||||||
|
|
||||||
Kills all scripts on the current server.
|
|
||||||
|
|
||||||
.. _ls_terminal_command:
|
|
||||||
|
|
||||||
ls
|
|
||||||
^^
|
|
||||||
|
|
||||||
$ ls [dir] [--grep pattern]
|
|
||||||
|
|
||||||
Prints files and directories on the current server to the Terminal screen.
|
|
||||||
|
|
||||||
If this command is run with no arguments, then it prints all files and directories on the current
|
|
||||||
server to the Terminal screen. Directories will be printed first in alphabetical order,
|
|
||||||
followed by the files (also in alphabetical order).
|
|
||||||
|
|
||||||
The :code:`dir` optional parameter allows you to specify the directory for which to display
|
|
||||||
files.
|
|
||||||
|
|
||||||
The :code:`--grep pattern` optional parameter allows you to only display files and directories
|
|
||||||
with a certain pattern in their names.
|
|
||||||
|
|
||||||
The :code:`-l` optional parameter allows you to force each item onto a single line.
|
|
||||||
|
|
||||||
Examples::
|
|
||||||
|
|
||||||
// List files/directories with the '.script' extension in the current directory
|
|
||||||
$ ls -l --grep .script
|
|
||||||
|
|
||||||
// List files/directories with the '.js' extension in the root directory
|
|
||||||
$ ls / -l --grep .js
|
|
||||||
|
|
||||||
// List files/directories with the word 'purchase' in the name, in the 'scripts' directory
|
|
||||||
$ ls scripts -l --grep purchase
|
|
||||||
|
|
||||||
|
|
||||||
lscpu
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
Prints the number of CPU cores the current server has.
|
|
||||||
|
|
||||||
.. _mem_terminal_command:
|
|
||||||
|
|
||||||
mem
|
|
||||||
^^^
|
|
||||||
|
|
||||||
$ mem [script name] [-t] [num threads]
|
|
||||||
|
|
||||||
Displays the amount of RAM needed to run the specified script with a single
|
|
||||||
thread. The command can also be used to print the amount of RAM needed to run
|
|
||||||
a script with multiple threads using the '-t' flag. If the '-t' flag is
|
|
||||||
specified, then an argument for the number of threads must be passed in
|
|
||||||
afterwards. Examples::
|
|
||||||
|
|
||||||
$ mem foo.js
|
|
||||||
$ mem foo.js -t 50
|
|
||||||
|
|
||||||
The first example above will print the amount of RAM needed to run 'foo.js'
|
|
||||||
with a single thread. The second example above will print the amount of RAM needed
|
|
||||||
to run 'foo.js' with 50 threads.
|
|
||||||
|
|
||||||
.. _mv_terminal_command:
|
|
||||||
|
|
||||||
mv
|
|
||||||
^^
|
|
||||||
|
|
||||||
$ mv [source] [destination]
|
|
||||||
|
|
||||||
Move the source file to the specified destination in the filesystem.
|
|
||||||
See :ref:`terminal_filesystem` for more details about the Terminal's filesystem.
|
|
||||||
This command only works for scripts and text files (.txt). It cannot, however, be used
|
|
||||||
to convert from script to text file, or vice versa.
|
|
||||||
|
|
||||||
This function can also be used to rename files.
|
|
||||||
|
|
||||||
.. note:: Unlike the Linux :code:`mv` command, the *destination* argument must be the
|
|
||||||
full filepath. It cannot be a directory.
|
|
||||||
|
|
||||||
Examples::
|
|
||||||
|
|
||||||
$ mv hacking.script scripts/hacking.script
|
|
||||||
$ mv myScript.js myOldScript.js
|
|
||||||
|
|
||||||
nano
|
|
||||||
^^^^
|
|
||||||
|
|
||||||
$ nano [filename]
|
|
||||||
|
|
||||||
Opens up the specified file in the Text Editor. Only scripts (.script, .js) and
|
|
||||||
text files (.txt) can be edited. If the file does not already exist, then a new
|
|
||||||
empty file will be created.
|
|
||||||
|
|
||||||
ps
|
|
||||||
^^
|
|
||||||
|
|
||||||
$ ps [-g, --grep pattern]
|
|
||||||
|
|
||||||
Prints all scripts that are currently running on the current server.
|
|
||||||
The :code:`-g, --grep pattern` option will only output running scripts where the name matches the provided pattern.
|
|
||||||
|
|
||||||
rm
|
|
||||||
^^
|
|
||||||
|
|
||||||
$ rm [filename]
|
|
||||||
|
|
||||||
Removes the specified file from the current server. This works for every file type
|
|
||||||
except literature files (.lit).
|
|
||||||
|
|
||||||
**WARNING: This is permanent and cannot be undone**
|
|
||||||
|
|
||||||
|
|
||||||
.. _run_terminal_command:
|
|
||||||
|
|
||||||
run
|
|
||||||
^^^
|
|
||||||
|
|
||||||
$ run [file name] [-t] [num threads] [args...]
|
|
||||||
|
|
||||||
Execute a program, script, or :ref:`codingcontracts`.
|
|
||||||
|
|
||||||
The '[-t]', '[num threads]', and '[args...]' arguments are only valid when
|
|
||||||
running a script. The '-t' flag is used to indicate that the script should
|
|
||||||
be run with the specified integer number of threads. If the flag is omitted,
|
|
||||||
the script will be run with a single thread by default. If the '-t' flag is
|
|
||||||
used, then it MUST come immediately after the script name, and the
|
|
||||||
[num threads] argument MUST come immediately afterwards.
|
|
||||||
|
|
||||||
[args...] represents a variable number of arguments that will be passed into
|
|
||||||
the script. See the documentation about script arguments. Each specified
|
|
||||||
argument must be separated by a space.
|
|
||||||
|
|
||||||
**Examples**
|
|
||||||
|
|
||||||
Run a program::
|
|
||||||
|
|
||||||
$ run BruteSSH.exe
|
|
||||||
|
|
||||||
Run *foo.js* with 50 threads and the arguments [1e3, 0.5, foodnstuff]::
|
|
||||||
|
|
||||||
$ run foo.js -t 50 1e3 0.5 foodnstuff
|
|
||||||
|
|
||||||
Run a Coding Contract::
|
|
||||||
|
|
||||||
$ run foo-contract.cct
|
|
||||||
|
|
||||||
scan
|
|
||||||
^^^^
|
|
||||||
|
|
||||||
Prints all immediately-available network connections. This will print a list
|
|
||||||
of all servers that you can currently connect to using the 'connect' Terminal command.
|
|
||||||
|
|
||||||
|
|
||||||
.. _scan_analyze_terminal_command:
|
|
||||||
|
|
||||||
scan-analyze
|
|
||||||
^^^^^^^^^^^^
|
|
||||||
|
|
||||||
$ scan-analyze [depth]
|
|
||||||
|
|
||||||
Prints detailed information about all servers up to *[depth]* nodes away on the
|
|
||||||
network. Calling 'scan-analyze 1' will display information for the same servers
|
|
||||||
that are shown by the 'scan' Terminal command. This command also shows the
|
|
||||||
relative paths to reach each server.
|
|
||||||
|
|
||||||
By default, the maximum depth that can be specified for 'scan-analyze' is 3.
|
|
||||||
However, once you have the *DeepscanV1.exe* and *DeepscanV2.exe* programs, you can
|
|
||||||
execute 'scan-analyze' with a depth up to 5 and 10, respectively.
|
|
||||||
|
|
||||||
The information 'scan-analyze' displays about each server includes whether or
|
|
||||||
not you have root access to it, its required hacking level, the number of open
|
|
||||||
ports required to run NUKE.exe on it, and how much RAM it has. When used the
|
|
||||||
information is structured like:
|
|
||||||
|
|
||||||
n00dles
|
|
||||||
--Root Access: YES, Required hacking skill: 1
|
|
||||||
--Number of open ports required to NUKE: 0
|
|
||||||
--RAM: 4.00GB
|
|
||||||
|
|
||||||
----zer0
|
|
||||||
------Root Access: NO, Required hacking skill: 75
|
|
||||||
------Number of open ports required to NUKE: 1
|
|
||||||
------RAM: 32.00GB
|
|
||||||
|
|
||||||
foodnstuff
|
|
||||||
--Root Access: NO, Required hacking skill: 1
|
|
||||||
--Number of open ports required to NUKE: 0
|
|
||||||
--RAM: 16.00GB
|
|
||||||
|
|
||||||
In this case :code:`n00dles` and :code:`foodnstuff` are connected to the current server
|
|
||||||
and :code:`zer0` is connected to :code:`n00dles`.
|
|
||||||
|
|
||||||
.. _scp_terminal_command:
|
|
||||||
|
|
||||||
scp
|
|
||||||
^^^
|
|
||||||
|
|
||||||
$ scp [script name] [target server]
|
|
||||||
|
|
||||||
Copies the specified script from the current server to the target server.
|
|
||||||
The second argument passed in must be the hostname or IP of the target server.
|
|
||||||
|
|
||||||
sudov
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
Prints whether or not you have root access to the current server.
|
|
||||||
|
|
||||||
.. _tail_terminal_command:
|
|
||||||
|
|
||||||
tail
|
|
||||||
^^^^
|
|
||||||
|
|
||||||
$ tail [pid]
|
|
||||||
or
|
|
||||||
$ tail [script name] [args...]
|
|
||||||
|
|
||||||
Displays dynamic logs for the script specified by PID or the script name and arguments.
|
|
||||||
Each argument must be separated by a space. Remember that a running script is
|
|
||||||
identified by both its name and the arguments that were used to run
|
|
||||||
it. So, if a script was ran with the following arguments::
|
|
||||||
|
|
||||||
$ run foo.js 10 50000
|
|
||||||
|
|
||||||
Then in order to check its logs with 'tail' the same arguments must be used::
|
|
||||||
|
|
||||||
$ tail foo.js 10 50000
|
|
||||||
|
|
||||||
top
|
|
||||||
^^^
|
|
||||||
|
|
||||||
Prints a list of all scripts running on the current server as well as their
|
|
||||||
thread count and how much RAM they are using in total.
|
|
||||||
|
|
||||||
.. _unalias_terminal_command:
|
|
||||||
|
|
||||||
unalias
|
|
||||||
^^^^^^^
|
|
||||||
|
|
||||||
$ unalias "[alias name]"
|
|
||||||
|
|
||||||
Deletes the specified alias. Note that the double quotation marks are required.
|
|
||||||
|
|
||||||
As an example, if an alias was declared using::
|
|
||||||
|
|
||||||
$ alias r="run"
|
|
||||||
|
|
||||||
Then it could be removed using::
|
|
||||||
|
|
||||||
$ unalias "r"
|
|
||||||
|
|
||||||
It is not necessary to differentiate between global and non-global aliases when using 'unalias'
|
|
||||||
|
|
||||||
wget
|
|
||||||
^^^^
|
|
||||||
|
|
||||||
$ wget [url] [target file]
|
|
||||||
|
|
||||||
Retrieves data from a url and downloads it to a file on the current server.
|
|
||||||
The data can only be downloaded to a script (.script, .js) or a text file
|
|
||||||
(.txt). If the target file already exists, it will be overwritten by this command.
|
|
||||||
|
|
||||||
Note that will not be possible to download data from many websites because they
|
|
||||||
do not allow cross-origin resource sharing (CORS). This includes websites such
|
|
||||||
as gist and pastebin. One notable site it will work on is rawgithub. Example::
|
|
||||||
|
|
||||||
$ wget https://raw.githubusercontent.com/bitburner-official/bitburner-src/master/README.md game_readme.txt
|
|
||||||
|
|
||||||
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 is important to know in more detail how arguments are parsed.
|
|
||||||
There are two main points:
|
|
||||||
|
|
||||||
1. 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.
|
|
||||||
2. Anything that can represent a number is automatically cast to a number, unless its
|
|
||||||
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) and args: [123, 1000, "5", "this is a single argument"].
|
|
||||||
May take a few seconds to start up the process...
|
|
||||||
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 (;).
|
|
||||||
|
|
||||||
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 :code:`hack`, :code:`wget`, etc.
|
|
@ -1,16 +0,0 @@
|
|||||||
.. _gameplay_world:
|
|
||||||
|
|
||||||
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 it's own map and :ref:`faction`. Each city also
|
|
||||||
offers different services, such as gyms, universities, hardware
|
|
||||||
stores and places of work.
|
|
File diff suppressed because it is too large
Load Diff
@ -1,25 +0,0 @@
|
|||||||
import sys, os, subprocess
|
|
||||||
|
|
||||||
project = u'Bitburner'
|
|
||||||
copyright = u'2017, Daniel Xie'
|
|
||||||
master_doc = 'index'
|
|
||||||
templates_path = ['_templates']
|
|
||||||
extensions = []
|
|
||||||
source_suffix = '.rst'
|
|
||||||
version = '1.0.0'
|
|
||||||
exclude_patterns = ['_build']
|
|
||||||
|
|
||||||
# -- HTML theme settings ------------------------------------------------
|
|
||||||
|
|
||||||
html_show_sourcelink = False
|
|
||||||
|
|
||||||
import guzzle_sphinx_theme
|
|
||||||
|
|
||||||
extensions.append("guzzle_sphinx_theme")
|
|
||||||
html_theme_path = guzzle_sphinx_theme.html_theme_path()
|
|
||||||
html_theme = 'guzzle_sphinx_theme'
|
|
||||||
|
|
||||||
# Guzzle theme options (see theme.conf for more information)
|
|
||||||
html_theme_options = {
|
|
||||||
"project_nav_name": "Bitburner",
|
|
||||||
}
|
|
@ -1,192 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# Bitburner documentation build configuration file, created by
|
|
||||||
# sphinx-quickstart on Wed Oct 4 15:03:07 2017.
|
|
||||||
#
|
|
||||||
# This file is execfile()d with the current directory set to its
|
|
||||||
# containing dir.
|
|
||||||
#
|
|
||||||
# Note that not all possible configuration values are present in this
|
|
||||||
# autogenerated file.
|
|
||||||
#
|
|
||||||
# All configuration values have a default; values that are commented out
|
|
||||||
# serve to show the default.
|
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
|
||||||
# add these directories to sys.path here. If the directory is relative to the
|
|
||||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
||||||
#
|
|
||||||
# import os
|
|
||||||
# import sys
|
|
||||||
# sys.path.insert(0, os.path.abspath('.'))
|
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration ------------------------------------------------
|
|
||||||
|
|
||||||
# If your documentation needs a minimal Sphinx version, state it here.
|
|
||||||
#
|
|
||||||
# needs_sphinx = '1.0'
|
|
||||||
|
|
||||||
# Add any Sphinx extension module names here, as strings. They can be
|
|
||||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
||||||
# ones.
|
|
||||||
extensions = ['sphinx.ext.autodoc',
|
|
||||||
'sphinx.ext.doctest',
|
|
||||||
'sphinx.ext.intersphinx',
|
|
||||||
'sphinx.ext.todo',
|
|
||||||
'sphinx.ext.coverage',
|
|
||||||
'sphinx.ext.mathjax',
|
|
||||||
'sphinx.ext.ifconfig',
|
|
||||||
'sphinx.ext.viewcode',
|
|
||||||
'sphinx.ext.githubpages']
|
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
|
||||||
templates_path = ['ytemplates']
|
|
||||||
|
|
||||||
# The suffix(es) of source filenames.
|
|
||||||
# You can specify multiple suffix as a list of string:
|
|
||||||
#
|
|
||||||
# source_suffix = ['.rst', '.md']
|
|
||||||
source_suffix = '.rst'
|
|
||||||
|
|
||||||
# The master toctree document.
|
|
||||||
master_doc = 'index'
|
|
||||||
|
|
||||||
# General information about the project.
|
|
||||||
project = 'Bitburner'
|
|
||||||
author = 'Bitburner'
|
|
||||||
copyright = '2016, {0}'.format(author)
|
|
||||||
documentation_title = '{0} Documentation'.format(project)
|
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
|
||||||
# |version| and |release|, also used in various other places throughout the
|
|
||||||
# built documents.
|
|
||||||
#
|
|
||||||
# The short X.Y version.
|
|
||||||
version = '2.2'
|
|
||||||
# The full version, including alpha/beta/rc tags.
|
|
||||||
release = '2.2.2'
|
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
||||||
# for a list of supported languages.
|
|
||||||
#
|
|
||||||
# This is also used if you do content translation via gettext catalogs.
|
|
||||||
# Usually you set "language" from the command line for these cases.
|
|
||||||
language = 'en'
|
|
||||||
|
|
||||||
# List of patterns, relative to source directory, that match files and
|
|
||||||
# directories to ignore when looking for source files.
|
|
||||||
# This patterns also effect to html_static_path and html_extra_path
|
|
||||||
exclude_patterns = []
|
|
||||||
|
|
||||||
# The name of the Pygments (syntax highlighting) style to use.
|
|
||||||
pygments_style = 'sphinx'
|
|
||||||
|
|
||||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
|
||||||
todo_include_todos = True
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for HTML output ----------------------------------------------
|
|
||||||
|
|
||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
||||||
# a list of builtin themes.
|
|
||||||
#
|
|
||||||
#html_theme = 'agogo'
|
|
||||||
html_theme = "sphinx_rtd_theme"
|
|
||||||
html_theme_options = {
|
|
||||||
"navigation_depth": 5,
|
|
||||||
}
|
|
||||||
|
|
||||||
# Theme options are theme-specific and customize the look and feel of a theme
|
|
||||||
# further. For a list of options available for each theme, see the
|
|
||||||
# documentation.
|
|
||||||
#
|
|
||||||
#html_theme_options = {'stickysidebar':'true'}
|
|
||||||
|
|
||||||
# Add any paths that contain custom static files (such as style sheets) here,
|
|
||||||
# relative to this directory. They are copied after the builtin static files,
|
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
||||||
html_static_path = ['ystatic']
|
|
||||||
|
|
||||||
# Custom sidebar templates, must be a dictionary that maps document names
|
|
||||||
# to template names.
|
|
||||||
#
|
|
||||||
# This is required for the alabaster theme
|
|
||||||
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
|
|
||||||
# html_sidebars = {
|
|
||||||
# '**': [
|
|
||||||
# 'about.html',
|
|
||||||
# 'navigation.html',
|
|
||||||
# 'relations.html', # needs 'show_related': True theme option to display
|
|
||||||
# 'searchbox.html',
|
|
||||||
# 'donate.html',
|
|
||||||
# ]
|
|
||||||
# }
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for HTMLHelp output ------------------------------------------
|
|
||||||
|
|
||||||
# Output file base name for HTML help builder.
|
|
||||||
htmlhelp_basename = '{0}doc'.format(project)
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for LaTeX output ---------------------------------------------
|
|
||||||
|
|
||||||
latex_elements = {
|
|
||||||
# The paper size ('letterpaper' or 'a4paper').
|
|
||||||
#
|
|
||||||
# 'papersize': 'letterpaper',
|
|
||||||
|
|
||||||
# The font size ('10pt', '11pt' or '12pt').
|
|
||||||
#
|
|
||||||
# 'pointsize': '10pt',
|
|
||||||
|
|
||||||
# Additional stuff for the LaTeX preamble.
|
|
||||||
#
|
|
||||||
# 'preamble': '',
|
|
||||||
|
|
||||||
# Latex figure (float) alignment
|
|
||||||
#
|
|
||||||
# 'figure_align': 'htbp',
|
|
||||||
}
|
|
||||||
|
|
||||||
# Grouping the document tree into LaTeX files. List of tuples
|
|
||||||
# (source start file, target name, title,
|
|
||||||
# author, documentclass [howto, manual, or own class]).
|
|
||||||
latex_documents = [
|
|
||||||
(master_doc, '{0}.tex'.format(project), documentation_title,
|
|
||||||
author, 'manual'),
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for manual page output ---------------------------------------
|
|
||||||
|
|
||||||
# One entry per manual page. List of tuples
|
|
||||||
# (source start file, name, description, authors, manual section).
|
|
||||||
man_pages = [
|
|
||||||
(master_doc, project.lower(), documentation_title,
|
|
||||||
[author], 1)
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for Texinfo output -------------------------------------------
|
|
||||||
|
|
||||||
# Grouping the document tree into Texinfo files. List of tuples
|
|
||||||
# (source start file, target name, title, author,
|
|
||||||
# dir menu entry, description, category)
|
|
||||||
texinfo_documents = [
|
|
||||||
(master_doc, project, documentation_title,
|
|
||||||
author, project, 'One line description of project.',
|
|
||||||
'Miscellaneous'),
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# Example configuration for intersphinx: refer to the Python standard library.
|
|
||||||
intersphinx_mapping = {'https://docs.python.org/': None}
|
|
||||||
|
|
||||||
|
|
||||||
def setup(app):
|
|
||||||
print("Initializing (setup())");
|
|
||||||
app.add_stylesheet('maxwidthoverride.css')
|
|
||||||
app.add_stylesheet('dark_theme.css')
|
|
@ -1,12 +0,0 @@
|
|||||||
Guides & Tips
|
|
||||||
=============
|
|
||||||
|
|
||||||
Getting Started Guide for Intermediate Programmers
|
|
||||||
|
|
||||||
Beginners FAQ
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 3
|
|
||||||
|
|
||||||
Getting Started Guide for Beginner Programmers <guidesandtips/gettingstartedguideforbeginnerprogrammers>
|
|
||||||
What BitNode should I do?<guidesandtips/recommendedbitnodeorder>
|
|
@ -1,902 +0,0 @@
|
|||||||
Getting Started Guide for Beginner Programmers
|
|
||||||
==============================================
|
|
||||||
|
|
||||||
.. note:: Note that the scripts 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.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Introduction
|
|
||||||
------------
|
|
||||||
Bitburner is a cyberpunk-themed incremental RPG. The player progresses by raising
|
|
||||||
their :ref:`gameplay_stats`, earning money, and :ref:`climbing the corporate ladder <gameplay_companies>`.
|
|
||||||
Eventually, after reaching certain criteria, the player will begin receiving invitations
|
|
||||||
from :ref:`gameplay_factions`. Joining these factions and working for them will unlock
|
|
||||||
:ref:`gameplay_augmentations`. Purchasing and installing Augmentations provide persistent
|
|
||||||
upgrades and are necessary for progressing in the game.
|
|
||||||
|
|
||||||
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".
|
|
||||||
|
|
||||||
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 called :code:`n00dles.js` and ran it
|
|
||||||
on the :code:`n00dles` server. Right now, we'll kill this script. There are two ways
|
|
||||||
to do this:
|
|
||||||
|
|
||||||
1. You can go to the Terminal and enter::
|
|
||||||
|
|
||||||
$ kill n00dles.js
|
|
||||||
|
|
||||||
2. You can go to the :code:`Active Scripts` page (|Keyboard shortcut| Alt + s) and
|
|
||||||
press the "Kill Script" button for :code:`n00dles.js`.
|
|
||||||
|
|
||||||
If you skipped the introductory tutorial, then ignore the part above. Instead, go to the
|
|
||||||
:code:`Hacknet Nodes` page (|Keyboard shortcut| Alt + h) and purchase a
|
|
||||||
Hacknet Node to start generating some passive income.
|
|
||||||
|
|
||||||
Creating our First Script
|
|
||||||
-------------------------
|
|
||||||
Now, we'll create a generic hacking script that can be used early on in the game (or throughout the
|
|
||||||
entire game, if you want).
|
|
||||||
|
|
||||||
Before we write the script, here are some things you'll want to familiarize yourself with:
|
|
||||||
|
|
||||||
* :ref:`gameplay_hacking_generalhackingmechanics`
|
|
||||||
* :ref:`gameplay_hacking_serversecurity`
|
|
||||||
* :js:func:`hack`
|
|
||||||
* :js:func:`grow`
|
|
||||||
* :js:func:`weaken`
|
|
||||||
* :js:func:`brutessh`
|
|
||||||
* :js:func:`nuke`
|
|
||||||
|
|
||||||
To briefly summarize the information from the links above: Each server has a
|
|
||||||
security level that affects how difficult it is to hack. Each server also has a
|
|
||||||
certain amount of money, as well as a maximum amount of money it can hold. Hacking a
|
|
||||||
server steals a percentage of that server's money. The :js:func:`hack` Netscript function
|
|
||||||
is used to hack a server. The :js:func:`grow` Netscript function is used to increase
|
|
||||||
the amount of money available on a server. The :js:func:`weaken` Netscript function is
|
|
||||||
used to decrease a server's security level.
|
|
||||||
|
|
||||||
Now let's move on to actually creating the script.
|
|
||||||
Go to your home computer and then create a script called :code:`early-hack-template.js` by
|
|
||||||
going to Terminal and entering the following two commands::
|
|
||||||
|
|
||||||
$ home
|
|
||||||
$ nano early-hack-template.js
|
|
||||||
|
|
||||||
This will take you to the script editor, which you can use to code and create
|
|
||||||
:ref:`gameplay_scripts`. It will be helpful to consult the :ref:`netscript` documentation.
|
|
||||||
Specifically, you'll want to take a look at :ref:`netscriptfunctions`.
|
|
||||||
|
|
||||||
Enter the following code in the script editor:
|
|
||||||
|
|
||||||
.. code:: javascript
|
|
||||||
|
|
||||||
/** @param {NS} ns */
|
|
||||||
export async function main(ns) {
|
|
||||||
// Defines the "target server", which is the server
|
|
||||||
// that we're going to hack. In this case, it's "n00dles"
|
|
||||||
const target = "n00dles";
|
|
||||||
|
|
||||||
// Defines how much money a server should have before we hack it
|
|
||||||
// In this case, it is set to 75% of the server's max money
|
|
||||||
const moneyThresh = ns.getServerMaxMoney(target) * 0.75;
|
|
||||||
|
|
||||||
// Defines the maximum security level the target server can
|
|
||||||
// have. If the target's security level is higher than this,
|
|
||||||
// we'll weaken it before doing anything else
|
|
||||||
const securityThresh = ns.getServerMinSecurityLevel(target) + 5;
|
|
||||||
|
|
||||||
// If we have the BruteSSH.exe program, use it to open the SSH Port
|
|
||||||
// on the target server
|
|
||||||
if (ns.fileExists("BruteSSH.exe", "home")) {
|
|
||||||
ns.brutessh(target);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get root access to target server
|
|
||||||
ns.nuke(target);
|
|
||||||
|
|
||||||
// Infinite loop that continously hacks/grows/weakens the target server
|
|
||||||
while(true) {
|
|
||||||
if (ns.getServerSecurityLevel(target) > securityThresh) {
|
|
||||||
// If the server's security level is above our threshold, weaken it
|
|
||||||
await ns.weaken(target);
|
|
||||||
} else if (ns.getServerMoneyAvailable(target) < moneyThresh) {
|
|
||||||
// If the server's money is less than our threshold, grow it
|
|
||||||
await ns.grow(target);
|
|
||||||
} else {
|
|
||||||
// Otherwise, hack it
|
|
||||||
await ns.hack(target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
The script above contains comments that document what it does, but let's go through it
|
|
||||||
step-by-step anyways.
|
|
||||||
|
|
||||||
.. code:: javascript
|
|
||||||
|
|
||||||
const target = "n00dles";
|
|
||||||
|
|
||||||
This first command defines a string which contains our target server. That's the server
|
|
||||||
that we're going to hack. For now, it's set to `n00dles` because that's the only
|
|
||||||
server with a required hacking level of 1. If you want to hack a different server,
|
|
||||||
simply change this
|
|
||||||
variable to be the hostname of another server.
|
|
||||||
|
|
||||||
.. code:: javascript
|
|
||||||
|
|
||||||
const moneyThresh = ns.getServerMaxMoney(target) * 0.75;
|
|
||||||
|
|
||||||
This second command defines a numerical value representing the minimum
|
|
||||||
amount of money that must be available on the target server in order for our script
|
|
||||||
to hack it. If the money available on the target server is less than this value,
|
|
||||||
then our script will :js:func:`grow` the server rather than hacking it.
|
|
||||||
It is set to 75% of the maximum amount of money that can be available on the server.
|
|
||||||
The :js:func:`getServerMaxMoney` Netscript function is used to find this value
|
|
||||||
|
|
||||||
.. code:: javascript
|
|
||||||
|
|
||||||
const securityThresh = ns.getServerMinSecurityLevel(target) + 5;
|
|
||||||
|
|
||||||
This third command defines a numerical value representing the maximum security level
|
|
||||||
the target server can have. If the target server's security level is higher than
|
|
||||||
this value, then our script will :js:func:`weaken` the script before doing anything else.
|
|
||||||
|
|
||||||
.. code:: javascript
|
|
||||||
|
|
||||||
if (ns.fileExists("BruteSSH.exe", "home")) {
|
|
||||||
ns.brutessh(target);
|
|
||||||
}
|
|
||||||
|
|
||||||
ns.nuke(target);
|
|
||||||
|
|
||||||
This section of code is used to gain root access on the target server. This is
|
|
||||||
necessary for hacking. See :ref:`here for more details <gameplay_hacking>`.
|
|
||||||
|
|
||||||
.. code:: javascript
|
|
||||||
|
|
||||||
while (true) {
|
|
||||||
if (ns.getServerSecurityLevel(target) > securityThresh) {
|
|
||||||
// If the server's security level is above our threshold, weaken it
|
|
||||||
await ns.weaken(target);
|
|
||||||
} else if (ns.getServerMoneyAvailable(target) < moneyThresh) {
|
|
||||||
// Otherwise, if the server's money is less than our threshold, grow it
|
|
||||||
await ns.grow(target);
|
|
||||||
} else {
|
|
||||||
// Otherwise, hack it
|
|
||||||
await ns.hack(target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
This is the main section that drives our script. It dictates the script's logic
|
|
||||||
and carries out the hacking operations. The `while (true)` creates an infinite loop
|
|
||||||
that will continuously run the hacking logic until the the script is killed.
|
|
||||||
|
|
||||||
The await keyword is needed for `hack` / `grow` / `weaken` because these commands take
|
|
||||||
time to execute, unlike the others. If you forget to await these commands, you will get
|
|
||||||
an exception saying you tried to do multiple things at once, because your code will
|
|
||||||
immediately finish the function call without waiting for the operation to be done. Also
|
|
||||||
important is that await can only be used in functions marked async (which main() is).
|
|
||||||
|
|
||||||
Running our Scripts
|
|
||||||
-------------------
|
|
||||||
Now we want to start running our hacking script so that it can start earning us
|
|
||||||
money and experience. Our home computer only has 8GB of RAM and we'll be using it for
|
|
||||||
something else later. So instead, we'll take advantage of the RAM on other machines.
|
|
||||||
|
|
||||||
Go to |Terminal| and enter the following command::
|
|
||||||
|
|
||||||
$ scan-analyze 2
|
|
||||||
|
|
||||||
This will show detailed information about some servers on the network. The
|
|
||||||
**network is randomized so it will be different for every person**.
|
|
||||||
Here's what mine showed at the time I made this::
|
|
||||||
|
|
||||||
[home ~]> scan-analyze 2
|
|
||||||
~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~
|
|
||||||
|
|
||||||
n00dles
|
|
||||||
--Root Access: YES, Required hacking skill: 1
|
|
||||||
--Number of open ports required to NUKE: 0
|
|
||||||
--RAM: 4.00GB
|
|
||||||
|
|
||||||
----zer0
|
|
||||||
------Root Access: NO, Required hacking skill: 75
|
|
||||||
------Number of open ports required to NUKE: 1
|
|
||||||
------RAM: 32.00GB
|
|
||||||
|
|
||||||
foodnstuff
|
|
||||||
--Root Access: NO, Required hacking skill: 1
|
|
||||||
--Number of open ports required to NUKE: 0
|
|
||||||
--RAM: 16.00GB
|
|
||||||
|
|
||||||
sigma-cosmetics
|
|
||||||
--Root Access: NO, Required hacking skill: 5
|
|
||||||
--Number of open ports required to NUKE: 0
|
|
||||||
--RAM: 16.00GB
|
|
||||||
|
|
||||||
joesguns
|
|
||||||
--Root Access: NO, Required hacking skill: 10
|
|
||||||
--Number of open ports required to NUKE: 0
|
|
||||||
--RAM: 16.00GB
|
|
||||||
|
|
||||||
----max-hardware
|
|
||||||
------Root Access: NO, Required hacking skill: 80
|
|
||||||
------Number of open ports required to NUKE: 1
|
|
||||||
------RAM: 32.00GB
|
|
||||||
|
|
||||||
----CSEC
|
|
||||||
------Root Access: NO, Required hacking skill: 54
|
|
||||||
------Number of open ports required to NUKE: 1
|
|
||||||
------RAM: 8.00GB
|
|
||||||
|
|
||||||
hong-fang-tea
|
|
||||||
--Root Access: NO, Required hacking skill: 30
|
|
||||||
--Number of open ports required to NUKE: 0
|
|
||||||
--RAM: 16.00GB
|
|
||||||
|
|
||||||
----nectar-net
|
|
||||||
------Root Access: NO, Required hacking skill: 20
|
|
||||||
------Number of open ports required to NUKE: 0
|
|
||||||
------RAM: 16.00GB
|
|
||||||
|
|
||||||
harakiri-sushi
|
|
||||||
--Root Access: NO, Required hacking skill: 40
|
|
||||||
--Number of open ports required to NUKE: 0
|
|
||||||
--RAM: 16.00GB
|
|
||||||
|
|
||||||
iron-gym
|
|
||||||
--Root Access: NO, Required hacking skill: 100
|
|
||||||
--Number of open ports required to NUKE: 1
|
|
||||||
--RAM: 32.00GB
|
|
||||||
|
|
||||||
Take note of the following servers:
|
|
||||||
|
|
||||||
* |sigma-cosmetics|
|
|
||||||
* |joesguns|
|
|
||||||
* |nectar-net|
|
|
||||||
* |hong-fang-tea|
|
|
||||||
* |harakiri-sushi|
|
|
||||||
|
|
||||||
All of these servers have 16GB of RAM. Furthermore, all of these servers do not require
|
|
||||||
any open ports in order to NUKE. In other words, we can gain root access to all of these
|
|
||||||
servers and then run scripts on them.
|
|
||||||
|
|
||||||
First, let's determine how many threads of our hacking script we can run.
|
|
||||||
:ref:`Read more about multithreading scripts here <gameplay_scripts_multithreadingscripts>`
|
|
||||||
The script we wrote
|
|
||||||
uses 2.6GB of RAM. You can check this using the following |Terminal| command::
|
|
||||||
|
|
||||||
$ mem early-hack-template.js
|
|
||||||
|
|
||||||
This means we can run 6 threads on a 16GB server. Now, to run our scripts on all of these
|
|
||||||
servers, we have to do the following:
|
|
||||||
|
|
||||||
1. Use the :ref:`scp_terminal_command` |Terminal| command to copy our script to each server.
|
|
||||||
2. Use the :ref:`connect_terminal_command` |Terminal| command to connect to a server.
|
|
||||||
3. Use the :ref:`run_terminal_command` |Terminal| command to run the `NUKE.exe` program and
|
|
||||||
gain root access.
|
|
||||||
4. Use the :ref:`run_terminal_command` |Terminal| command again to run our script.
|
|
||||||
5. Repeat steps 2-4 for each server.
|
|
||||||
|
|
||||||
Here's the sequence of |Terminal| commands I used in order to achieve this::
|
|
||||||
|
|
||||||
$ home
|
|
||||||
$ scp early-hack-template.js n00dles
|
|
||||||
$ scp early-hack-template.js sigma-cosmetics
|
|
||||||
$ scp early-hack-template.js joesguns
|
|
||||||
$ scp early-hack-template.js nectar-net
|
|
||||||
$ scp early-hack-template.js hong-fang-tea
|
|
||||||
$ scp early-hack-template.js harakiri-sushi
|
|
||||||
$ connect n00dles
|
|
||||||
$ run NUKE.exe
|
|
||||||
$ run early-hack-template.js -t 1
|
|
||||||
$ home
|
|
||||||
$ connect sigma-cosmetics
|
|
||||||
$ run NUKE.exe
|
|
||||||
$ run early-hack-template.js -t 6
|
|
||||||
$ home
|
|
||||||
$ connect joesguns
|
|
||||||
$ run NUKE.exe
|
|
||||||
$ run early-hack-template.js -t 6
|
|
||||||
$ home
|
|
||||||
$ connect hong-fang-tea
|
|
||||||
$ run NUKE.exe
|
|
||||||
$ run early-hack-template.js -t 6
|
|
||||||
$ home
|
|
||||||
$ connect harakiri-sushi
|
|
||||||
$ run NUKE.exe
|
|
||||||
$ run early-hack-template.js -t 6
|
|
||||||
$ home
|
|
||||||
$ connect hong-fang-tea
|
|
||||||
$ connect nectar-net
|
|
||||||
$ run NUKE.exe
|
|
||||||
$ run early-hack-template.js -t 6
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
Pressing the :code:`Tab` key in the middle of a Terminal command will attempt to
|
|
||||||
auto-complete the command. For example, if you type in :code:`scp ea` and then
|
|
||||||
hit :code:`Tab`, the rest of the script's name should automatically be filled in.
|
|
||||||
This works for most commands in the game!
|
|
||||||
|
|
||||||
The :ref:`home_terminal_command` |Terminal| command is used to connect to the home
|
|
||||||
computer. When running our scripts with the :code:`run early-hack-template.js -t 6`
|
|
||||||
command, the :code:`-t 6` specifies that the script should be run with 6 threads.
|
|
||||||
|
|
||||||
Note that the |nectar-net| server isn't in the home computer's immediate network.
|
|
||||||
This means you can't directly connect to it from home. You will have to search for it
|
|
||||||
inside the network. The results of the `scan-analyze 2` command we ran before
|
|
||||||
will show where it is. In my case, I could connect to it by going from
|
|
||||||
`hong-fang-tea -> nectar-net`. However, this will probably be different for you.
|
|
||||||
|
|
||||||
After running all of these |Terminal| commands, our scripts are now up and running.
|
|
||||||
These will earn money and hacking experience over time. These gains will be
|
|
||||||
really slow right now, but they will increase once our hacking skill rises and
|
|
||||||
we start running more scripts.
|
|
||||||
|
|
||||||
Increasing Hacking Level
|
|
||||||
------------------------
|
|
||||||
There are many servers besides |n00dles| that can be hacked, but they have
|
|
||||||
higher required hacking levels. Therefore, we should raise our hacking level. Not only
|
|
||||||
will this let us hack more servers, but it will also increase the effectiveness of our hacking
|
|
||||||
against |n00dles|.
|
|
||||||
|
|
||||||
The easiest way to train your hacking level is to visit Rothman University. You can do this by
|
|
||||||
clicking the `City` tab on the left-hand navigation menu, or you can use the
|
|
||||||
:ref:`keyboard shortcut <shortcuts>` Alt + w. Rothman University should be one of the buttons
|
|
||||||
near the top. Click the button to go to the location.
|
|
||||||
|
|
||||||
Once you go to Rothman University, you should see a screen with several options. These
|
|
||||||
options describe different courses you can take. You should click the first button, which
|
|
||||||
says: "Study Computer Science (free)".
|
|
||||||
|
|
||||||
After you click the button, you will start studying and earning hacking experience. While you
|
|
||||||
are doing this, you cannot interact with any other part of the game until you click the button
|
|
||||||
that says "Stop taking course".
|
|
||||||
|
|
||||||
Right now, we want a hacking level of 10. You need approximately 174 hacking experience to reach
|
|
||||||
level 10. You can check how much hacking experience you have by clicking the `Stats` tab
|
|
||||||
on the left-hand navigation menu, or by using |Keyboard shortcut| Alt + c.
|
|
||||||
Since studying at Rothman University earns you 1 experience per second, this will take
|
|
||||||
174 seconds, or approximately 3 minutes. Feel free to do something in the meantime!
|
|
||||||
|
|
||||||
Editing our Hacking Script
|
|
||||||
--------------------------
|
|
||||||
Now that we have a hacking level of 10, we can hack the :code:`joesguns` server. This server
|
|
||||||
will be slightly more profitable than :code:`n00dles`. Therefore, we want to change our hacking
|
|
||||||
script to target :code:`joesguns` instead of :code:`n00dles`.
|
|
||||||
|
|
||||||
Go to |Terminal| and edit the hacking script by entering::
|
|
||||||
|
|
||||||
$ home
|
|
||||||
$ nano early-hack-template.js
|
|
||||||
|
|
||||||
At the top of the script, change the `target` variable to be `joesguns`:
|
|
||||||
|
|
||||||
.. code:: javascript
|
|
||||||
|
|
||||||
const target = "joesguns";
|
|
||||||
|
|
||||||
Note that this will **NOT** affect any instances of the script that are already running.
|
|
||||||
This will only affect instances of the script that are ran from this point forward.
|
|
||||||
|
|
||||||
Creating a New Script to Purchase New Servers
|
|
||||||
---------------------------------------------
|
|
||||||
Next, we're going to create a script that automatically purchases additional servers. These
|
|
||||||
servers will be used to run many scripts. Running this script will initially be very
|
|
||||||
expensive since purchasing a server costs money, but it will pay off in the long run.
|
|
||||||
|
|
||||||
In order to create this script, you should familiarize yourself with the following
|
|
||||||
Netscript functions:
|
|
||||||
|
|
||||||
* :js:func:`purchaseServer`
|
|
||||||
* :js:func:`getPurchasedServerCost`
|
|
||||||
* :js:func:`getPurchasedServerLimit`
|
|
||||||
* :js:func:`getServerMoneyAvailable`
|
|
||||||
* :js:func:`scp`
|
|
||||||
* :js:func:`exec`
|
|
||||||
|
|
||||||
Create the script by going to |Terminal| and typing::
|
|
||||||
|
|
||||||
$ home
|
|
||||||
$ nano purchase-server-8gb.js
|
|
||||||
|
|
||||||
Paste the following code into the script editor:
|
|
||||||
|
|
||||||
.. code:: javascript
|
|
||||||
|
|
||||||
/** @param {NS} ns */
|
|
||||||
export async function main(ns) {
|
|
||||||
// How much RAM each purchased server will have. In this case, it'll
|
|
||||||
// be 8GB.
|
|
||||||
const ram = 8;
|
|
||||||
|
|
||||||
// Iterator we'll use for our loop
|
|
||||||
let i = 0;
|
|
||||||
|
|
||||||
// Continuously try to purchase servers until we've reached the maximum
|
|
||||||
// amount of servers
|
|
||||||
while (i < ns.getPurchasedServerLimit()) {
|
|
||||||
// Check if we have enough money to purchase a server
|
|
||||||
if (ns.getServerMoneyAvailable("home") > ns.getPurchasedServerCost(ram)) {
|
|
||||||
// If we have enough money, then:
|
|
||||||
// 1. Purchase the server
|
|
||||||
// 2. Copy our hacking script onto the newly-purchased server
|
|
||||||
// 3. Run our hacking script on the newly-purchased server with 3 threads
|
|
||||||
// 4. Increment our iterator to indicate that we've bought a new server
|
|
||||||
let hostname = ns.purchaseServer("pserv-" + i, ram);
|
|
||||||
ns.scp("early-hack-template.js", hostname);
|
|
||||||
ns.exec("early-hack-template.js", hostname, 3);
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
//Make the script wait for a second before looping again.
|
|
||||||
//Removing this line will cause an infinite loop and crash the game.
|
|
||||||
await ns.sleep(1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
This code uses a while loop to purchase the maximum amount of servers using the
|
|
||||||
:js:func:`purchaseServer` Netscript function. Each of these servers will have
|
|
||||||
8GB of RAM, as defined in the :code:`ram` variable. Note that the script uses the command
|
|
||||||
:code:`getServerMoneyAvailable("home")` to get the amount of money you currently have.
|
|
||||||
This is then used to check if you can afford to purchase a server.
|
|
||||||
|
|
||||||
Whenever the script purchases a new server, it uses the :js:func:`scp` function to copy
|
|
||||||
our script onto that new server, and then it uses the :js:func:`exec` function to
|
|
||||||
execute it on that server.
|
|
||||||
|
|
||||||
To run this script, go to |Terminal| and type::
|
|
||||||
|
|
||||||
$ run purchase-server-8gb.js
|
|
||||||
|
|
||||||
This purchase will continuously run until it has purchased the maximum number of servers.
|
|
||||||
When this happens, it'll mean that you have a bunch of new servers that are all running
|
|
||||||
hacking scripts against the :code:`joesguns` server!
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
The reason we're using so many scripts to hack :code:`joesguns` instead of targeting other
|
|
||||||
servers is because it's more effective. This early in the game, we don't have enough RAM
|
|
||||||
to efficiently hack multiple targets, and trying to do so would be slow as we'd be spread
|
|
||||||
too thin. You should definitely do this later on, though!
|
|
||||||
|
|
||||||
Note that purchasing a server is fairly expensive, and purchasing the maximum amount of
|
|
||||||
servers even more so. At the time of writing this guide, the script above requires
|
|
||||||
$11 million in order to finish purchasing all of the 8GB servers.
|
|
||||||
Therefore, we need to find additional ways to make money to speed
|
|
||||||
up the process! These are covered in the next section.
|
|
||||||
|
|
||||||
Additional Sources of Income
|
|
||||||
----------------------------
|
|
||||||
There are other ways to gain money in this game besides scripts & hacking.
|
|
||||||
|
|
||||||
Hacknet Nodes
|
|
||||||
^^^^^^^^^^^^^
|
|
||||||
If you completed the introductory tutorial, you were already introduced to this method: Hacknet Nodes.
|
|
||||||
Once you have enough money, you can start upgrading your Hacknet Nodes in order to increase
|
|
||||||
your passive income stream. This is completely optional. Since each Hacknet Node upgrade
|
|
||||||
takes a certain amount of time to "pay itself off", it may not necessarily be in your best
|
|
||||||
interest to use these.
|
|
||||||
|
|
||||||
Nonetheless, Hacknet Nodes are a good source of income early in the game, although
|
|
||||||
their effectiveness tapers off later on. If you do wind up purchasing and upgrading Hacknet Nodes,
|
|
||||||
I would suggest only upgrading their levels for now. I wouldn't bother with RAM and Core
|
|
||||||
upgrades until later on.
|
|
||||||
|
|
||||||
Crime
|
|
||||||
^^^^^
|
|
||||||
The best source of income right now is from :ref:`committing crimes <gameplay_crimes>`.
|
|
||||||
This is because it not only gives you a large amount of money, but it also raises your
|
|
||||||
hacking level. To commit crimes, click on the :code:`City` tab on the left-hand
|
|
||||||
navigation menu or use the |Keyboard shortcut| Alt + w.
|
|
||||||
Then, click on the link that says :code:`The Slums`.
|
|
||||||
|
|
||||||
In the Slums, you can attempt to commit a variety of crimes, each of which gives certain
|
|
||||||
types of experience and money if successful. See :ref:`gameplay_crimes` for more details.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
You are not always successful when you attempt to commit a crime. Nothing bad happens
|
|
||||||
if you fail a crime, but you won't earn any money and the experience gained will be
|
|
||||||
reduced. Raising your stats improves your chance of successfully committing a crime.
|
|
||||||
|
|
||||||
Right now, the best option is the :code:`Rob Store` crime. This takes 60 seconds to attempt
|
|
||||||
and gives $400k if successful. I suggest this crime because you don't have to click or check
|
|
||||||
in too often since it takes a whole minute to attempt. Furthermore, it gives hacking experience,
|
|
||||||
which is very important right now.
|
|
||||||
|
|
||||||
Alternatively, you can also use the :code:`Shoplift` crime. This takes 2 seconds to attempt
|
|
||||||
and gives $15k if successful. This crime is slightly easier and is more profitable
|
|
||||||
than :code:`Rob Store`, but it requires constant clicking and it doesn't give
|
|
||||||
hacking experience.
|
|
||||||
|
|
||||||
Work for a Company
|
|
||||||
^^^^^^^^^^^^^^^^^^
|
|
||||||
If you don't want to constantly check in on the game to commit crimes, there's another option
|
|
||||||
that's much more passive: working for a :ref:`company <gameplay_companies>`.
|
|
||||||
This will not be nearly as profitable as crimes, but it's completely passive.
|
|
||||||
|
|
||||||
Go to the :code:`City` tab on the left-hand navigation menu and then go to
|
|
||||||
:code:`Joe's Guns`. At :code:`Joe's Guns`, there will be an option that says
|
|
||||||
:code:`Apply to be an Employee`. Click this to get the job. Then, a new option
|
|
||||||
will appear that simply says :code:`Work`. Click this to start working.
|
|
||||||
Working at :code:`Joe's Guns` earns $110 per second and also grants some experience
|
|
||||||
for every stat except hacking.
|
|
||||||
|
|
||||||
Working for a company is completely passive. You can choose to focus on your work, do
|
|
||||||
something else simultaneously, or switch between those two. While you focus on work,
|
|
||||||
you will not be able to do anything else in the game. If you do something else meanwhile,
|
|
||||||
you will not gain reputation at the same speed. You can cancel working at any time.
|
|
||||||
You'll notice that cancelling your work early causes you to lose out on some reputation
|
|
||||||
gains, but you shouldn't worry about this. Company reputation isn't important right now.
|
|
||||||
|
|
||||||
Once your hacking hits level 75, you can visit :code:`Carmichael Security` in the city
|
|
||||||
and get a software job there. This job offers higher pay and also earns you
|
|
||||||
hacking experience.
|
|
||||||
|
|
||||||
There are many more companies in the |City tab| that offer more pay and also more gameplay
|
|
||||||
features. Feel free to explore!
|
|
||||||
|
|
||||||
After you Purchase your New Servers
|
|
||||||
-----------------------------------
|
|
||||||
After you've made a total of $11 million, your automatic server-purchasing script should
|
|
||||||
finish running. This will free up some RAM on your home computer. We don't want this RAM
|
|
||||||
to go to waste, so we'll make use of it. Go to |Terminal| and enter the following commands::
|
|
||||||
|
|
||||||
$ home
|
|
||||||
$ run early-hack-template.js -t 3
|
|
||||||
|
|
||||||
Reaching a Hacking Level of 50
|
|
||||||
------------------------------
|
|
||||||
Once you reach a hacking level of 50, two new important parts of the game open up.
|
|
||||||
|
|
||||||
Creating your first program: BruteSSH.exe
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
On the left-hand navigation menu you will notice a :code:`Create Programs` tab with a
|
|
||||||
red notification icon. This indicates that there are programs available to be created.
|
|
||||||
Click on that tab (or use |Keyboard shortcut| Alt + p) and you'll see a
|
|
||||||
list of all the programs you can currently create. Hovering over a program will give a
|
|
||||||
brief description of its function. Simply click on a program to start creating it.
|
|
||||||
|
|
||||||
Right now, the program we want to create is :code:`BruteSSH.exe`. This program is used
|
|
||||||
to open up SSH ports on servers. This will allow you to hack more servers,
|
|
||||||
as many servers in the game require a certain number of opened ports in order for
|
|
||||||
:code:`NUKE.exe` to gain root access.
|
|
||||||
|
|
||||||
When you are creating a program, you cannot interact with any other part of the game.
|
|
||||||
Feel free to cancel your work on creating a program at any time, as your progress will
|
|
||||||
be saved and can be picked back up later. :code:`BruteSSH.exe` takes about
|
|
||||||
10 minutes to complete.
|
|
||||||
|
|
||||||
Optional: Create AutoLink.exe
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
On the :code:`Create Programs` page, you will notice another program you can create
|
|
||||||
called :code:`AutoLink.exe`. If you don't mind waiting another 10-15 minutes, you should
|
|
||||||
go ahead and create this program. It makes it much less tedious to connect to other servers,
|
|
||||||
but it's not necessary for progressing.
|
|
||||||
|
|
||||||
Joining your first faction: CyberSec
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Shortly after you reached level 50 hacking, you should have received a message that
|
|
||||||
said this::
|
|
||||||
|
|
||||||
Message received from unknown sender:
|
|
||||||
|
|
||||||
We've been watching you. Your skills are very impressive. But you're wasting
|
|
||||||
your talents. If you join us, you can put your skills to good use and change
|
|
||||||
the world for the better. If you join us, we can unlock your full potential.
|
|
||||||
But first, you must pass our test. Find and hack our server using the Terminal.
|
|
||||||
|
|
||||||
-CyberSec
|
|
||||||
|
|
||||||
This message was saved as csec-test.msg onto your home computer.
|
|
||||||
|
|
||||||
If you didn't, or if you accidentally closed it, that's okay! Messages get saved onto
|
|
||||||
your home computer. Enter the following |Terminal| commands to view the message::
|
|
||||||
|
|
||||||
$ home
|
|
||||||
$ cat csec-test.msg
|
|
||||||
|
|
||||||
This message is part of the game's main "quest-line". It is a message from the
|
|
||||||
|CyberSec faction| that is asking you to pass their test.
|
|
||||||
Passing their test is simple, you just have to find their server and hack it through
|
|
||||||
the |Terminal|. Their server is called :code:`CSEC`.
|
|
||||||
To do this, we'll use the :ref:`scan_analyze_terminal_command`
|
|
||||||
Terminal command, just like we did before::
|
|
||||||
|
|
||||||
$ home
|
|
||||||
$ scan-analyze 2
|
|
||||||
|
|
||||||
This will show you the network for all servers that are up to 2 "nodes" away from
|
|
||||||
your home computer. Remember that the network is randomly generated so it'll look
|
|
||||||
different for everyone. Here's the relevant part of my :code:`scan-analyze` results::
|
|
||||||
|
|
||||||
>iron-gym
|
|
||||||
--Root Access: NO, Required hacking skill: 100
|
|
||||||
--Number of open ports required to NUKE: 1
|
|
||||||
--RAM: 32
|
|
||||||
|
|
||||||
---->zer0
|
|
||||||
------Root Access: NO, Required hacking skill: 75
|
|
||||||
------Number of open ports required to NUKE: 1
|
|
||||||
------RAM: 32
|
|
||||||
|
|
||||||
---->CSEC
|
|
||||||
------Root Access: NO, Required hacking skill: 54
|
|
||||||
------Number of open ports required to NUKE: 1
|
|
||||||
------RAM: 8
|
|
||||||
|
|
||||||
This tells me that I can reach :code:`CSEC` by going through :code:`iron-gym`::
|
|
||||||
|
|
||||||
$ connect iron-gym
|
|
||||||
$ connect CSEC
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
If you created the :code:`AutoLink.exe` program earlier, then there is an easier
|
|
||||||
method of connecting to :code:`CSEC`. You'll notice that in the :code:`scan-analyze`
|
|
||||||
results, all of the server hostnames are white and underlined. You can simply
|
|
||||||
click one of the server hostnames in order to connect to it. So, simply click
|
|
||||||
:code:`CSEC`!
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
Make sure you notice the required hacking skill for the :code:`CSEC` server.
|
|
||||||
This is a random value between 51 and 60. Although you receive the message
|
|
||||||
from CSEC once you hit 50 hacking, you cannot actually pass their test
|
|
||||||
until your hacking is high enough to install a backdoor on their server.
|
|
||||||
|
|
||||||
After you are connected to the :code:`CSEC` server, you can backdoor it. Note that this
|
|
||||||
server requires one open port in order to gain root access. We can open the SSH port
|
|
||||||
using the :code:`BruteSSH.exe` program we created earlier. In |Terminal|::
|
|
||||||
|
|
||||||
$ run BruteSSH.exe
|
|
||||||
$ run NUKE.exe
|
|
||||||
$ backdoor
|
|
||||||
|
|
||||||
After you successfully install the backdoor, you should receive a faction
|
|
||||||
invitation from |CyberSec| shortly afterwards. Accept it. If you accidentally
|
|
||||||
reject the invitation, that's okay. Just go to the :code:`Factions` tab
|
|
||||||
(|Keyboard shortcut| Alt + f) and you should see an option that lets you
|
|
||||||
accept the invitation.
|
|
||||||
|
|
||||||
Congrats! You just joined your first faction. Don't worry about doing anything
|
|
||||||
with this faction yet, we can come back to it later.
|
|
||||||
|
|
||||||
Using Additional Servers to Hack Joesguns
|
|
||||||
-----------------------------------------
|
|
||||||
Once you have the |BruteSSH| program, you will be able to gain root access
|
|
||||||
to several additional servers. These servers have more RAM that you can use to
|
|
||||||
run scripts. We'll use the RAM on these servers to run more scripts that target
|
|
||||||
:code:`joesguns`.
|
|
||||||
|
|
||||||
Copying our Scripts
|
|
||||||
^^^^^^^^^^^^^^^^^^^
|
|
||||||
The server's we'll be using to run our scripts are:
|
|
||||||
|
|
||||||
* :code:`neo-net`
|
|
||||||
* :code:`zer0`
|
|
||||||
* :code:`max-hardware`
|
|
||||||
* :code:`iron-gym`
|
|
||||||
|
|
||||||
All of these servers have 32GB of RAM. You can use the |Terminal| command
|
|
||||||
:code:`scan-analyze 3` to see for yourself. To copy our hacking scripts onto these servers,
|
|
||||||
go to |Terminal| and run::
|
|
||||||
|
|
||||||
$ home
|
|
||||||
$ scp early-hack-template.js neo-net
|
|
||||||
$ scp early-hack-template.js zer0
|
|
||||||
$ scp early-hack-template.js max-hardware
|
|
||||||
$ scp early-hack-template.js iron-gym
|
|
||||||
|
|
||||||
Since each of these servers has 32GB of RAM, we can run our hacking script with 12 threads
|
|
||||||
on each server. By now, you should know how to connect to servers. So find and connect to
|
|
||||||
each of the servers above using the :code:`scan-analyze 3` |Terminal| command. Then, use
|
|
||||||
following |Terminal| command to run our hacking
|
|
||||||
script with 12 threads::
|
|
||||||
|
|
||||||
$ run early-hack-template.js -t 12
|
|
||||||
|
|
||||||
Remember that if you have the |AutoLink| program, you can simply click on the hostname of a server
|
|
||||||
after running :ref:`scan_analyze_terminal_command` to connect to it.
|
|
||||||
|
|
||||||
Profiting from Scripts & Gaining Reputation with CyberSec
|
|
||||||
---------------------------------------------------------
|
|
||||||
Now it's time to play the waiting game. It will take some time for your scripts to start
|
|
||||||
earning money. Remember that most of your scripts are targeting |joesguns|. It will take a
|
|
||||||
bit for them to :js:func:`grow` and :js:func:`weaken` the server to the appropriate values
|
|
||||||
before they start hacking it. Once they do, however, the scripts will be very profitable.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
For reference, in about two hours after starting my first script, my scripts had a
|
|
||||||
production rate of $20k per second and had earned a total of $70 million.
|
|
||||||
(You can see these stats on the :code:`Active Scripts` tab).
|
|
||||||
|
|
||||||
After another 15 minutes, the production rate had increased to $25k per second
|
|
||||||
and the scripts had made an additional $55 million.
|
|
||||||
|
|
||||||
Your results will vary based on how fast you earned money from crime/working/hacknet nodes,
|
|
||||||
but this will hopefully give you a good indication of how much the scripts can earn.
|
|
||||||
|
|
||||||
In the meantime, we are going to be gaining reputation with the |CyberSec faction|.
|
|
||||||
Go to the |Factions tab| on the left-hand
|
|
||||||
navigation menu, and from there select |CyberSec|. In the middle of
|
|
||||||
the page there should be a button for :code:`Hacking Contracts`.
|
|
||||||
Click it to start earning reputation for the |CyberSec| faction (as well
|
|
||||||
as some hacking experience). The higher your hacking level, the more reputation you
|
|
||||||
will gain. Note that while you are working for a faction, you can choose to not interact
|
|
||||||
with the rest of the game in any way to gain reputation at full speed. You can also select to
|
|
||||||
do something else simultaneously, gaining reputation a bit more slowly, until you focus again.
|
|
||||||
You can cancel your faction work at any time with no penalty to your reputation gained so far.
|
|
||||||
|
|
||||||
Purchasing Upgrades and Augmentations
|
|
||||||
-------------------------------------
|
|
||||||
As I mentioned before, within 1-2 hours I had earned over $200 million. Now, it's time
|
|
||||||
to spend all of this money on some persistent upgrades to help progress!
|
|
||||||
|
|
||||||
Upgrading RAM on Home computer
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
The most important thing to upgrade right now is the RAM on your home computer. This
|
|
||||||
will allow you to run more scripts.
|
|
||||||
|
|
||||||
To upgrade your RAM, go to the |City tab| and visit the company |Alpha Enterprises|.
|
|
||||||
There will be an option that says :code:`Purchase additional RAM for Home Computer`.
|
|
||||||
Click it and follow the dialog box to upgrade your RAM.
|
|
||||||
|
|
||||||
I recommend getting your home computer's RAM to *at least* 128GB. Getting it even
|
|
||||||
higher would be better.
|
|
||||||
|
|
||||||
Purchasing your First Augmentations
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Once you get ~1000 reputation with the |CyberSec faction|, you can purchase
|
|
||||||
your first :ref:`Augmentation <gameplay_augmentations>` from them.
|
|
||||||
|
|
||||||
To do this, go to the |Factions tab| on the left-hand navigation menu
|
|
||||||
(|Keyboard shortcut| Alt + f) and select |CyberSec|. There is an button
|
|
||||||
near the bottom that says :code:`Purchase Augmentations`. This will bring up a
|
|
||||||
page that displays all of the Augmentations available from |CyberSec|. Some of them
|
|
||||||
may be locked right now. To unlock these, you will need to earn more
|
|
||||||
reputation with |CyberSec|.
|
|
||||||
|
|
||||||
Augmentations give persistent upgrades in the form of multipliers. These aren't very
|
|
||||||
powerful early in the game because the multipliers are small. However, the effects
|
|
||||||
of Augmentations stack multiplicatively **with each other**, so as you continue to install
|
|
||||||
many Augmentations their effects will increase significantly.
|
|
||||||
|
|
||||||
Because of this, I would recommend investing more in RAM upgrades for your home computer rather
|
|
||||||
than Augmentations early on. Having enough RAM to run many scripts will allow you to make
|
|
||||||
much more money, and then you can come back later on and get all these Augmentations.
|
|
||||||
|
|
||||||
Right now, I suggest purchasing at the very least the :code:`Neurotrainer I` Augmentation from
|
|
||||||
|CyberSec|. If you have the money to spare, I would also suggest getting :code:`BitWire` and
|
|
||||||
several levels of the :code:`NeuroFlux Governor` (:code:`NFG`) Augmentations. Note that each time
|
|
||||||
you purchase an Augmentation,
|
|
||||||
:ref:`the price of purchasing another increases by 90% <gameplay_augmentations_purchasingmultiple>`,
|
|
||||||
so make sure you buy the most expensive Augmentation first. Don't worry, once you choose to
|
|
||||||
install Augmentations, their prices will reset back to their original values.
|
|
||||||
|
|
||||||
Next Steps
|
|
||||||
----------
|
|
||||||
That's the end of the walkthrough portion of this guide! You should continue to explore
|
|
||||||
what the game has to offer. There's quite a few features that aren't covered or mentioned
|
|
||||||
in this guide, and even more that get unlocked as you continue to play!
|
|
||||||
|
|
||||||
Also, check out the :ref:`netscript` documentation to see what it has to offer. Writing
|
|
||||||
scripts to perform and automate various tasks is where most of the fun in the game comes
|
|
||||||
from (in my opinion)!
|
|
||||||
|
|
||||||
The following are a few things you may want to consider doing in the near future.
|
|
||||||
|
|
||||||
Installing Augmentations (and Resetting)
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
If you've purchased any :ref:`gameplay_augmentations`, you'll need to install them before you
|
|
||||||
actually gain their effects. Installing Augmentations is the game's "soft-reset" or "prestige"
|
|
||||||
mechanic. You can :ref:`read more details about it here <gameplay_augmentations_installing>`.
|
|
||||||
|
|
||||||
To install your Augmentations, click the |Augmentations tab| on the left-hand navigation
|
|
||||||
menu (|Keyboard shortcut| Alt + a). You will see a list of all of the Augmentations
|
|
||||||
you have purchased. Below that, you will see a button that says :code:`Install Augmentations`.
|
|
||||||
Be warned, after clicking this there is no way to undo it (unless you load an earlier save).
|
|
||||||
|
|
||||||
Automating the Script Startup Process
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Whenever you install Augmentations, all of your scripts are killed and you'll have to
|
|
||||||
re-run them. Doing this every time you install Augmentations would be very tedious and annoying,
|
|
||||||
so you should write a script to automate the process. Here's a simple example for a
|
|
||||||
startup script. Feel free to adjust it to your liking.
|
|
||||||
|
|
||||||
.. code:: javascript
|
|
||||||
|
|
||||||
/** @param {NS} ns */
|
|
||||||
export async function main(ns) {
|
|
||||||
// Array of all servers that don't need any ports opened
|
|
||||||
// to gain root access. These have 16 GB of RAM
|
|
||||||
const servers0Port = ["sigma-cosmetics",
|
|
||||||
"joesguns",
|
|
||||||
"nectar-net",
|
|
||||||
"hong-fang-tea",
|
|
||||||
"harakiri-sushi"];
|
|
||||||
|
|
||||||
// Array of all servers that only need 1 port opened
|
|
||||||
// to gain root access. These have 32 GB of RAM
|
|
||||||
const servers1Port = ["neo-net",
|
|
||||||
"zer0",
|
|
||||||
"max-hardware",
|
|
||||||
"iron-gym"];
|
|
||||||
|
|
||||||
// Copy our scripts onto each server that requires 0 ports
|
|
||||||
// to gain root access. Then use nuke() to gain admin access and
|
|
||||||
// run the scripts.
|
|
||||||
for (let i = 0; i < servers0Port.length; ++i) {
|
|
||||||
const serv = servers0Port[i];
|
|
||||||
|
|
||||||
ns.scp("early-hack-template.js", serv);
|
|
||||||
ns.nuke(serv);
|
|
||||||
ns.exec("early-hack-template.js", serv, 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wait until we acquire the "BruteSSH.exe" program
|
|
||||||
while (!ns.fileExists("BruteSSH.exe")) {
|
|
||||||
await ns.sleep(60000);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copy our scripts onto each server that requires 1 port
|
|
||||||
// to gain root access. Then use brutessh() and nuke()
|
|
||||||
// to gain admin access and run the scripts.
|
|
||||||
for (let i = 0; i < servers1Port.length; ++i) {
|
|
||||||
const serv = servers1Port[i];
|
|
||||||
|
|
||||||
ns.scp("early-hack-template.js", serv);
|
|
||||||
ns.brutessh(serv);
|
|
||||||
ns.nuke(serv);
|
|
||||||
ns.exec("early-hack-template.js", serv, 12);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Random Tips
|
|
||||||
-----------
|
|
||||||
* Early on in the game, it's better to spend your money on upgrading RAM and purchasing
|
|
||||||
new servers rather than spending it on Augmentations
|
|
||||||
* The more money available on a server, the more effective the :js:func:`hack` and
|
|
||||||
:js:func:`grow` Netscript functions will be. This is because both of these functions
|
|
||||||
use percentages rather than flat values. :js:func:`hack` steals a percentage of a server's
|
|
||||||
total available money, and :js:func:`grow` increases a server's money by X%.
|
|
||||||
* There is a limit to how much money can exist on a server. This value is different for each
|
|
||||||
server. The :js:func:`getServerMaxMoney` function will tell you this maximum value.
|
|
||||||
* At this stage in the game, your combat stats (strength, defense, etc.) are not nearly
|
|
||||||
as useful as your hacking stat. Do not invest too much time or money into gaining combat
|
|
||||||
stat exp.
|
|
||||||
* As a rule of thumb, your hacking target should be the server with highest max money that's
|
|
||||||
required hacking level is under 1/2 of your hacking level.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.. Substitution definitions
|
|
||||||
.. |Alpha Enterprises| replace:: :code:`Alpha Enterprises`
|
|
||||||
.. |Augmentations tab| replace:: :code:`Augmentations` tab
|
|
||||||
.. |AutoLink| replace:: :code:`AutoLink.exe`
|
|
||||||
.. |BruteSSH| replace:: :code:`BruteSSH.exe`
|
|
||||||
.. |City tab| replace:: :code:`City` tab
|
|
||||||
.. |CyberSec| replace:: :code:`CyberSec`
|
|
||||||
.. |CyberSec faction| replace:: :code:`CyberSec` :ref:`faction <gameplay_factions>`
|
|
||||||
.. |Factions tab| replace:: :code:`Factions` tab
|
|
||||||
.. |Keyboard shortcut| replace:: :ref:`Keyboard shortcut <shortcuts>`
|
|
||||||
.. |NUKE| replace:: :code:`NUKE.exe`
|
|
||||||
.. |Terminal| replace:: :code:`Terminal`
|
|
||||||
.. |n00dles| replace:: :code:`n00dles`
|
|
||||||
.. |harakiri-sushi| replace:: :code:`harakiri-sushi`
|
|
||||||
.. |hong-fang-tea| replace:: :code:`hong-fang-tea`
|
|
||||||
.. |joesguns| replace:: :code:`joesguns`
|
|
||||||
.. |nectar-net| replace:: :code:`nectar-net`
|
|
||||||
.. |sigma-cosmetics| replace:: :code:`sigma-cosmetics`
|
|
@ -1,593 +0,0 @@
|
|||||||
What BitNode should I do?
|
|
||||||
=========================
|
|
||||||
|
|
||||||
.. warning:: This page contains spoilers regarding the game's story/plot-line.
|
|
||||||
|
|
||||||
After destroying their first :ref:`BitNode <gameplay_bitnodes>`, many players
|
|
||||||
wonder which BitNode they should tackle next. This guide hopefully helps answer
|
|
||||||
that question.
|
|
||||||
|
|
||||||
Overview of each BitNode
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
BitNode-1: Source Genesis
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Description
|
|
||||||
The first BitNode created by the Enders to imprison the minds of humans. It became
|
|
||||||
the prototype and testing-grounds for all of the BitNodes that followed.
|
|
||||||
|
|
||||||
This is the first BitNode that you play through. It has no special
|
|
||||||
modifications or mechanics.
|
|
||||||
|
|
||||||
Source-File
|
|
||||||
:Max Level: 3
|
|
||||||
|
|
||||||
This Source-File lets the player start with 32GB of RAM on his/her home computer when
|
|
||||||
entering a new BitNode, and also increases all of the player's multipliers by:
|
|
||||||
|
|
||||||
* Level 1: 16%
|
|
||||||
* Level 2: 24%
|
|
||||||
* Level 3: 28%
|
|
||||||
|
|
||||||
Difficulty
|
|
||||||
The easiest BitNode
|
|
||||||
|
|
||||||
BitNode-2: Rise of the Underworld
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Description
|
|
||||||
From the shadows, they rose.
|
|
||||||
|
|
||||||
Organized crime groups quickly filled the void of power left behind from the collapse of
|
|
||||||
Western government in the 2050s. As society and civilization broke down, people quickly
|
|
||||||
succumbed to the innate human impulse of evil and savagery. The organized crime
|
|
||||||
factions quickly rose to the top of the modern world.
|
|
||||||
|
|
||||||
In this BitNode:
|
|
||||||
|
|
||||||
* Your hacking level is reduced by 20%
|
|
||||||
* The growth rate and maximum amount of money available on servers are significantly decreased
|
|
||||||
* The amount of money gained from crimes and Infiltration is tripled
|
|
||||||
* Certain Factions (Slum Snakes, Tetrads, The Syndicate, The Dark Army, Speakers for the Dead,
|
|
||||||
NiteSec, The Black Hand) give the player the ability to form and manage their own gangs. These gangs
|
|
||||||
will earn the player money and reputation with the corresponding Faction
|
|
||||||
* Every Augmentation* in the game will be available through the Factions listed above
|
|
||||||
* For every Faction NOT listed above, reputation gains are halved
|
|
||||||
* You will no longer gain passive reputation with Factions
|
|
||||||
|
|
||||||
(* except Neuroflux Governor, The Red Pill and augments of secret factions)
|
|
||||||
|
|
||||||
Source-File
|
|
||||||
:Max Level: 3
|
|
||||||
|
|
||||||
This Source-File allows you to form gangs in other BitNodes once your karma decreases to a certain value.
|
|
||||||
It also increases the player's crime success rate, crime money, and charisma multipliers by:
|
|
||||||
|
|
||||||
* Level 1: 24%
|
|
||||||
* Level 2: 36%
|
|
||||||
* Level 3: 42%
|
|
||||||
|
|
||||||
Difficulty
|
|
||||||
Fairly easy, as hacking is still very profitable and the costs of various purchases/upgrades
|
|
||||||
is not increased. The gang mechanic may seem strange as its very different from anything
|
|
||||||
else, but it can be very powerful once you get the hang of it.
|
|
||||||
|
|
||||||
BitNode-3: Corporatocracy
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Description
|
|
||||||
Our greatest illusion is that a healthy society can revolve around a
|
|
||||||
single-minded pursuit of wealth.
|
|
||||||
|
|
||||||
Sometime in the early 21st century economic and political globalization turned
|
|
||||||
the world into a corporatocracy, and it never looked back. Now, the privileged
|
|
||||||
elite will happily bankrupt their own countrymen, decimate their own community,
|
|
||||||
and evict their neighbors from houses in their desperate bid to increase their wealth.
|
|
||||||
|
|
||||||
In this BitNode you can create and manage your own corporation. Running a successful corporation
|
|
||||||
has the potential of generating massive profits. All other forms of income are reduced by 75%. Furthermore:
|
|
||||||
|
|
||||||
* The price and reputation cost of all Augmentations is tripled
|
|
||||||
* The starting and maximum amount of money on servers is reduced by 80%
|
|
||||||
* Server growth rate is reduced by 80%
|
|
||||||
* You now only need 75 favour with a faction in order to donate to it, rather than 150
|
|
||||||
|
|
||||||
Source-File
|
|
||||||
:Max Level: 3
|
|
||||||
|
|
||||||
This Source-File lets you create corporations on other BitNodes (although
|
|
||||||
some BitNodes will disable this mechanic) and level 3 permanently unlocks the full API. This Source-File also increases your
|
|
||||||
charisma and company salary multipliers by:
|
|
||||||
|
|
||||||
* Level 1: 8%
|
|
||||||
* Level 2: 12%
|
|
||||||
* Level 3: 14%
|
|
||||||
|
|
||||||
Difficulty
|
|
||||||
Somewhat-steep learning curve as you learn how to use and manage Corporations. Afterwards,
|
|
||||||
however, the BitNode is easy as Corporations can be very profitable.
|
|
||||||
|
|
||||||
BitNode-4: The Singularity
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Description
|
|
||||||
The Singularity has arrived. The human race is gone, replaced by artificially superintelligent
|
|
||||||
beings that are more machine than man.
|
|
||||||
|
|
||||||
In this BitNode, progressing is significantly harder:
|
|
||||||
|
|
||||||
* Experience gain rates for all stats are reduced.
|
|
||||||
* Most methods of earning money will now give significantly less.
|
|
||||||
|
|
||||||
In this BitNode you will gain access to a new set of Netscript Functions known as Singularity Functions.
|
|
||||||
These functions allow you to control most aspects of the game through scripts, including
|
|
||||||
working for factions/companies, purchasing/installing Augmentations, and creating programs.
|
|
||||||
|
|
||||||
Source-File
|
|
||||||
:Max Level: 3
|
|
||||||
|
|
||||||
This Source-File lets you access and use the Singularity Functions in other BitNodes.
|
|
||||||
Each level of this Source-File will reduce RAM costs:
|
|
||||||
|
|
||||||
* Level 1: 16x
|
|
||||||
* Level 2: 4x
|
|
||||||
* Level 3: 1x
|
|
||||||
|
|
||||||
Difficulty:
|
|
||||||
Depending on what Source-Files you have unlocked before attempting this BitNode,
|
|
||||||
it can range from easy to moderate.
|
|
||||||
|
|
||||||
BitNode-5: Artificial Intelligence
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Description
|
|
||||||
They said it couldn't be done. They said the human brain,
|
|
||||||
along with its consciousness and intelligence, couldn't be replicated. They said the complexity
|
|
||||||
of the brain results from unpredictable, nonlinear interactions that couldn't be modeled
|
|
||||||
by 1's and 0's. They were wrong.
|
|
||||||
|
|
||||||
In this BitNode:
|
|
||||||
|
|
||||||
* The base security level of servers is doubled
|
|
||||||
* The starting money on servers is halved, but the maximum money is doubled
|
|
||||||
* Most methods of earning money now give significantly less
|
|
||||||
* Infiltration gives 50% more reputation and money
|
|
||||||
* Corporations have 50% lower valuations and are therefore less profitable
|
|
||||||
* Augmentation price is doubled
|
|
||||||
* Hacking experience gain rates are reduced
|
|
||||||
|
|
||||||
Source-File
|
|
||||||
:Max Level: 3
|
|
||||||
|
|
||||||
This Source-File grants you a special new stat called Intelligence.
|
|
||||||
|
|
||||||
Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However
|
|
||||||
gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know
|
|
||||||
when you gain experience and how much). Higher Intelligence levels will boost your production for many actions
|
|
||||||
in the game.
|
|
||||||
|
|
||||||
In addition, this Source-File will unlock the :js:func:`getBitNodeMultipliers()` Netscript function,
|
|
||||||
and will also raise all of your hacking-related multipliers by:
|
|
||||||
|
|
||||||
* Level 1: 8%
|
|
||||||
* Level 2: 12%
|
|
||||||
* Level 3: 14%
|
|
||||||
|
|
||||||
Difficulty
|
|
||||||
Depending on what Source-Files you have unlocked before attempting this BitNode, it
|
|
||||||
can range from easy to moderate.
|
|
||||||
|
|
||||||
BitNode-6: Bladeburners
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Description
|
|
||||||
In the middle of the 21st century, OmniTek Incorporated began designing and manufacturing advanced synthetic
|
|
||||||
androids, or Synthoids for short. They achieved a major technological breakthrough in the sixth generation
|
|
||||||
of their Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was
|
|
||||||
the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent
|
|
||||||
than the humans that had created them.
|
|
||||||
|
|
||||||
In this BitNode you will be able to access the Bladeburner Division at the NSA, which provides
|
|
||||||
a new mechanic for progression. Furthermore:
|
|
||||||
|
|
||||||
* Hacking and Hacknet Nodes will be less profitable
|
|
||||||
* Your hacking level is reduced by 65%
|
|
||||||
* Hacking experience gain is reduced by 75%
|
|
||||||
* Corporations have 80% lower valuations and are therefore less profitable
|
|
||||||
* Working for companies is 50% less profitable
|
|
||||||
* Crimes and Infiltration are 25% less profitable
|
|
||||||
|
|
||||||
Source-File
|
|
||||||
:Max Level: 3
|
|
||||||
|
|
||||||
This Source-File allows you to access the NSA's Bladeburner Division in other
|
|
||||||
BitNodes. In addition, this Source-File will raise both the level and experience
|
|
||||||
gain rate of all your combat stats by:
|
|
||||||
|
|
||||||
* Level 1: 8%
|
|
||||||
* Level 2: 12%
|
|
||||||
* Level 3: 14%
|
|
||||||
|
|
||||||
Difficulty
|
|
||||||
Initially difficult due to the fact that hacking is no longer profitable and you have
|
|
||||||
to learn a new mechanic. After you get the hang of the Bladeburner mechanic, however,
|
|
||||||
it becomes moderately easy.
|
|
||||||
|
|
||||||
BitNode-7: Bladeburners 2079
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Description
|
|
||||||
In the middle of the 21st century, you were doing cutting-edge work at OmniTek Incorporated
|
|
||||||
as part of the AI design team for advanced synthetic androids, or Synthoids for short. You helped
|
|
||||||
achieve a major technological breakthrough in the sixth generation of the company's Synthoid
|
|
||||||
design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first
|
|
||||||
sentient AI ever created. This resulted in Synthoid models that were stronger, faster,
|
|
||||||
and more intelligent than the humans that had created them.
|
|
||||||
|
|
||||||
In this BitNode you will be able to access the Bladeburner API, which allows you to access
|
|
||||||
Bladeburner functionality through Netscript. Furthermore:
|
|
||||||
|
|
||||||
* The rank you gain from Bladeburner contracts/operations is reduced by 40%
|
|
||||||
* Bladeburner skills cost twice as many skill points
|
|
||||||
* Augmentations are 3x more expensive
|
|
||||||
* Hacking and Hacknet Nodes will be significantly less profitable
|
|
||||||
* Your hacking level is reduced by 65%
|
|
||||||
* Hacking experience gain is reduced by 75%
|
|
||||||
* Corporations have 80% lower valuations and are therefore less profitable
|
|
||||||
* Working for companies is 50% less profitable
|
|
||||||
* Crimes and Infiltration are 25% less profitable
|
|
||||||
|
|
||||||
Source-File
|
|
||||||
:Max Level: 3
|
|
||||||
|
|
||||||
This Source-File allows you to access the Bladeburner Netscript API in other
|
|
||||||
BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:
|
|
||||||
|
|
||||||
* Level 1: 8%
|
|
||||||
* Level 2: 12%
|
|
||||||
* Level 3: 14%
|
|
||||||
|
|
||||||
Difficulty
|
|
||||||
Slightly more difficult than BitNode-6. However, you will be able to automate more
|
|
||||||
aspects of the Bladeburner feature, which means it will be more passive.
|
|
||||||
|
|
||||||
BitNode-8: Ghost of Wall Street
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Description
|
|
||||||
You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.
|
|
||||||
|
|
||||||
In this BitNode:
|
|
||||||
|
|
||||||
* You start with $250 million
|
|
||||||
* The only way to earn money is by trading on the stock market
|
|
||||||
* You start with a WSE membership and access to the TIX API
|
|
||||||
* You are able to short stocks and place different types of orders (limit/stop)
|
|
||||||
* You can immediately donate to factions to gain reputation
|
|
||||||
|
|
||||||
Source-File
|
|
||||||
:Max Level: 3
|
|
||||||
|
|
||||||
This Source-File grants the following benefits:
|
|
||||||
|
|
||||||
* Level 1: Permanent access to WSE and TIX API
|
|
||||||
* Level 2: Ability to short stocks in other BitNodes
|
|
||||||
* Level 3: Ability to use limit/stop orders in other BitNodes
|
|
||||||
|
|
||||||
This Source-File also increases your hacking growth multipliers by:
|
|
||||||
|
|
||||||
* Level 1: 12%
|
|
||||||
* Level 2: 18%
|
|
||||||
* Level 3: 21%
|
|
||||||
|
|
||||||
Difficulty
|
|
||||||
Very difficult until you unlock the Four Sigma (4S) Market Data API. After you
|
|
||||||
unlock the API however, it becomes moderately easy.
|
|
||||||
|
|
||||||
BitNode-9: Hacktocracy
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Description
|
|
||||||
When Fulcrum Technologies released their open-source Linux distro Chapeau, it quickly
|
|
||||||
became the OS of choice for the underground hacking community. Chapeau became especially
|
|
||||||
notorious for powering the Hacknet, a global, decentralized network used for nefarious
|
|
||||||
purposes. Fulcrum quickly abandoned the project and dissociated themselves from it.
|
|
||||||
|
|
||||||
This BitNode unlocks the Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers generate
|
|
||||||
hashes, which can be spent on a variety of different upgrades.
|
|
||||||
|
|
||||||
In this BitNode:
|
|
||||||
|
|
||||||
* Your stats are significantly decreased
|
|
||||||
* You cannot purchase additional servers
|
|
||||||
* Hacking is significantly less profitable
|
|
||||||
|
|
||||||
Source-File
|
|
||||||
:Max Level: 3
|
|
||||||
|
|
||||||
This Source-File grants the following benefits:
|
|
||||||
|
|
||||||
* Level 1: Permanently unlocks the Hacknet Server in other BitNodes
|
|
||||||
* Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode
|
|
||||||
* Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode
|
|
||||||
|
|
||||||
(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT
|
|
||||||
when installing Augmentations.)
|
|
||||||
|
|
||||||
This Source-File also increases hacknet production and reduces hacknet costs by:
|
|
||||||
|
|
||||||
* Level 1: 12%
|
|
||||||
* Level 2: 18%
|
|
||||||
* Level 3: 21%
|
|
||||||
|
|
||||||
Difficulty
|
|
||||||
Hard
|
|
||||||
|
|
||||||
BitNode-10: Digital Carbon
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Description
|
|
||||||
In 2084, VitaLife unveiled to the world the Persona Core, a technology that allowed people
|
|
||||||
to digitize their consciousness. Their consciousness could then be transferred into Synthoids
|
|
||||||
or other bodies by trasmitting the digitized data. Human bodies became nothing more than 'sleeves'
|
|
||||||
for the human consciousness. Mankind had finally achieved immortality - at least for those
|
|
||||||
that could afford it.
|
|
||||||
|
|
||||||
This BitNode unlocks Sleeve and grafting technologies. Sleeve technology allows you to:
|
|
||||||
|
|
||||||
1. Re-sleeve: Purchase and transfer your consciousness into a new body
|
|
||||||
2. Duplicate Sleeves: Duplicate your consciousness into Synthoids, allowing you to perform different tasks synchronously
|
|
||||||
|
|
||||||
Grafting technology allows you to graft Augmentations, which is an alternative way of installing Augmentations.
|
|
||||||
|
|
||||||
In this BitNode:
|
|
||||||
|
|
||||||
* Your stats are significantly decreased
|
|
||||||
* All methods of gaining money are half as profitable (except Stock Market)
|
|
||||||
* Purchased servers are more expensive, have less max RAM, and a lower maximum limit
|
|
||||||
* Augmentations are 5x as expensive and require twice as much reputation
|
|
||||||
|
|
||||||
Source-File
|
|
||||||
:Max Level: 3
|
|
||||||
|
|
||||||
This Source-File unlocks Sleeve and grafting technologies in other BitNodes.
|
|
||||||
Each level of this Source-File also grants you a Duplicate Sleeve.
|
|
||||||
|
|
||||||
Difficulty
|
|
||||||
Hard
|
|
||||||
|
|
||||||
BitNode-11: The Big Crash
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Description
|
|
||||||
The 2050s was defined by the massive amounts of violent civil unrest and anarchic rebellion that rose all around the world. It was this period
|
|
||||||
of disorder that eventually lead to the governmental reformation of many global superpowers, most notably
|
|
||||||
the USA and China. But just as the world was slowly beginning to recover from these dark times, financial catastrophe hit.
|
|
||||||
|
|
||||||
In many countries, the high cost of trying to deal with the civil disorder bankrupted the governments. In all of this chaos and confusion, hackers
|
|
||||||
were able to steal billions of dollars from the world's largest electronic banks, prompting an international banking crisis as
|
|
||||||
governments were unable to bail out insolvent banks. Now, the world is slowly crumbling in the middle of the biggest economic crisis of all time.
|
|
||||||
|
|
||||||
In this BitNode:
|
|
||||||
|
|
||||||
* Your hacking stat and experience gain are reduced
|
|
||||||
* The starting and maximum amount of money available on servers are reduced by 90%
|
|
||||||
* The growth rate of servers is significantly reduced
|
|
||||||
* Weakening a server is twice as effective
|
|
||||||
* Company wages are decreased by 50%
|
|
||||||
* Corporation valuations are 90% lower and are therefore significantly less profitable
|
|
||||||
* Hacknet Node production is significantly decreased
|
|
||||||
* Crime and Infiltration are more lucrative
|
|
||||||
* Augmentations are twice as expensive
|
|
||||||
|
|
||||||
Source-File
|
|
||||||
:Max Level: 3
|
|
||||||
|
|
||||||
Destroying this BitNode will give you Source-File 11, or if you already have this Source-File it will
|
|
||||||
upgrade its level up to a maximum of 3. This Source-File makes it so that company favor increases BOTH
|
|
||||||
the player's salary and reputation gain rate at that company by 1% per favor (rather than just the reputation gain).
|
|
||||||
This Source-File also increases the player's company salary and reputation gain multipliers by:
|
|
||||||
|
|
||||||
* Level 1: 32%
|
|
||||||
* Level 2: 48%
|
|
||||||
* Level 3: 56%
|
|
||||||
|
|
||||||
This Source-File reduces the price increase for every aug bought by:
|
|
||||||
|
|
||||||
* Level 1: 4%
|
|
||||||
* Level 2: 6%
|
|
||||||
* Level 3: 7%
|
|
||||||
|
|
||||||
Difficulty
|
|
||||||
Hard
|
|
||||||
|
|
||||||
BitNode-12: The Recursion
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Description
|
|
||||||
Every time this BitNode is destroyed, it becomes slightly harder.
|
|
||||||
|
|
||||||
Source-File
|
|
||||||
:Max Level: Infinity
|
|
||||||
|
|
||||||
Each level of Source-File 12 will let you start with Neuroflux Governor
|
|
||||||
equal to the level of this Source-File.
|
|
||||||
|
|
||||||
This BitNode is meant to be done passively or when waiting for new content.
|
|
||||||
|
|
||||||
Difficulty
|
|
||||||
Initially very easy, but then it (obviously) becomes harder as you continue to do it.
|
|
||||||
|
|
||||||
BitNode-13: They're lunatics
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Description
|
|
||||||
With the invention of Augmentations in the 2040s a religious group known as the Church of the Machine God has rallied far more support than anyone would have hoped.
|
|
||||||
|
|
||||||
Their leader, Allison "Mother" Stanek is said to have created her own Augmentation whose power goes beyond any other. Find her in Chongqing and gain her trust.
|
|
||||||
|
|
||||||
In this BitNode:
|
|
||||||
|
|
||||||
* Your hacking stat is reduced by 75% and exp by 90%
|
|
||||||
* Your combat stats are reduced by 30%
|
|
||||||
* Class and gym exp gains halved
|
|
||||||
* The starting and maximum amount of money available on servers is decreased
|
|
||||||
* The starting security on servers is significantly increased
|
|
||||||
* Hacking money is decreased by 80%
|
|
||||||
* Company wages are decreased by 60% and exp gains by 50%
|
|
||||||
* Hacknet Node production is decreased by 60%
|
|
||||||
* Crime money is decreased by 60% and exp gains by 50%
|
|
||||||
* Stockmarket data costs are increased 10-fold
|
|
||||||
* Corporation valuations are 99.9% lower and are therefore extremely less profitable
|
|
||||||
* The rank you gain from Bladeburner contracts/operations is reduced by 55%
|
|
||||||
* Bladeburner skills cost twice as many skill points
|
|
||||||
* Coding contracts rewards reduced by 60%
|
|
||||||
* Gangs gain are reduced significantly and offer low amount of Augmentations
|
|
||||||
* Size of Stanek's Gift is increased by 1 size
|
|
||||||
|
|
||||||
Source-File
|
|
||||||
:Max Level: 3
|
|
||||||
|
|
||||||
Destroying this BitNode will give you Source-File 13, or if you already have this Source-File it will upgrade its level up to a maximum of 3.
|
|
||||||
This Source-File lets the Church of the Machine God appear in other BitNodes.
|
|
||||||
|
|
||||||
Each level of this Source-File increases the size of Stanek's Gift.
|
|
||||||
|
|
||||||
* Level 1: 5x5
|
|
||||||
* Level 2: 6x6
|
|
||||||
* Level 3: 7x7
|
|
||||||
|
|
||||||
Difficulty
|
|
||||||
Hard
|
|
||||||
|
|
||||||
Recommended BitNodes
|
|
||||||
--------------------
|
|
||||||
As a player, you are not forced to tackle the BitNodes in any particular order. You are
|
|
||||||
free to choose whichever ones you want. The "best" order can vary between players,
|
|
||||||
depending on what you like to do any what kind of player you are. In general, here
|
|
||||||
are the recommended BitNodes for different things:
|
|
||||||
|
|
||||||
For fast progression
|
|
||||||
^^^^^^^^^^^^^^^^^^^^
|
|
||||||
.. note:: These paths do not recommend the absolute fastest path, since speed of progression is
|
|
||||||
highly dependant on playing style. Path 1 is the recommended path according to the discord community.
|
|
||||||
|
|
||||||
Path 1 (new):
|
|
||||||
|
|
||||||
1. (Optional) Repeat **BitNode-1: Source Genesis** until you max out its Source-File. Its Source-File
|
|
||||||
is extremely powerful, as it raises all multipliers by a significant amount. This also a let's you
|
|
||||||
get used to augments and other features resetting.
|
|
||||||
|
|
||||||
2. Do **BitNode-3: Corporatocracy** at least once to unlock the Corporation mechanic, finishing all
|
|
||||||
3 levels unlocks the full API for free allowing fully scripted corp. This mechanic has highest
|
|
||||||
profit potential in the game.
|
|
||||||
|
|
||||||
3. Do **BitNode-10: Digital Carbon** once to unlock sleeves and grafting. Sleeves are useful in all nodes
|
|
||||||
and grafting can be useful in future BitNodes (especially 8). It's recommended to buy all purchasable sleeves and
|
|
||||||
their memory during the first run.
|
|
||||||
|
|
||||||
The ordering of the next three is dependant on playing style and wants/needs.
|
|
||||||
|
|
||||||
4. Do **BitNode-5: Artificial Intelligence** once or twice. The intelligence stat it unlocks
|
|
||||||
will gradually build up as you continue to play the game, and will be helpful
|
|
||||||
in the future. The Source-File also provides hacking multipliers, which are
|
|
||||||
strong because hacking is typically one of the best ways of earning money.
|
|
||||||
|
|
||||||
5. Do **BitNode-4: The Singularity**. Its Source-File does not directly make you
|
|
||||||
more powerful in any way, but it does unlock the `Singularity API <https://github.com/bitburner-official/bitburner-src/blob/dev/markdown/bitburner.singularity.md>`_ which
|
|
||||||
let you automate significantly more aspects of the game. Consider repeating until Level 3,
|
|
||||||
since each level decreases the RAM cost of Singularity functions.
|
|
||||||
|
|
||||||
6. Do **BitNode-2: Rise of the Underworld** once to unlock the gang mechanic. This mechanic
|
|
||||||
has high profit potential and offers large amounts of Augmentations in a single faction.
|
|
||||||
Having sleeves (Source-File 10) greatly reduces the time it takes to get access to gangs
|
|
||||||
outside this BitNode.
|
|
||||||
|
|
||||||
7. Do **BitNode-9: Hacktocracy** to unlock the Hacknet Server mechanic. You can
|
|
||||||
consider repeating it as well, as its Level 2 and 3 effects are pretty helpful as well.
|
|
||||||
|
|
||||||
Path 2 (old):
|
|
||||||
|
|
||||||
1. Repeat **BitNode-1: Source Genesis** until you max out its Source-File. Its Source-File
|
|
||||||
is extremely powerful, as it raises all multipliers by a significant amount.
|
|
||||||
|
|
||||||
2. Do **BitNode-5: Artificial Intelligence** once or twice. The intelligence stat it unlocks
|
|
||||||
will gradually build up as you continue to play the game, and will be helpful
|
|
||||||
in the future. The Source-File also provides hacking multipliers, which are
|
|
||||||
strong because hacking is typically one of the best ways of earning money.
|
|
||||||
|
|
||||||
3. (Optional) Consider doing **BitNode-4: The Singularity**. Its Source-File does not directly make you
|
|
||||||
more powerful in any way, but it does unlock the `Singularity API <https://github.com/bitburner-official/bitburner-src/blob/dev/markdown/bitburner.singularity.md>`_ which
|
|
||||||
let you automate significantly more aspects of the game.
|
|
||||||
|
|
||||||
4. Do **BitNode-3: Corporatocracy** once to unlock the Corporation mechanic. This mechanic
|
|
||||||
has high profit potential.
|
|
||||||
|
|
||||||
5. Do **BitNode-6: Bladeburners** once to unlock the Bladeburners mechanic. The Bladeburner
|
|
||||||
mechanic is useful for some of the future BitNodes (such as 9 and 10).
|
|
||||||
|
|
||||||
6. Do **BitNode-9: Hacktocracy** to unlock the Hacknet Server mechanic. You can
|
|
||||||
consider repeating it as well, as its Level 2 and 3 effects are pretty helpful as well.
|
|
||||||
|
|
||||||
.. todo:: To be continued as more BitNodes get added
|
|
||||||
|
|
||||||
For the strongest Source-Files
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Note that the strongest Source-Files are typically rewarded by the hardest BitNodes.
|
|
||||||
|
|
||||||
The strongest Source-File is that from **BitNode-1: Source Genesis**, as it raises
|
|
||||||
all multipliers by a significant amount.
|
|
||||||
|
|
||||||
Similarly, the Source-File from **BitNode-12: The Recursion** is also very strong
|
|
||||||
because it raises all multipliers. Each level of Source-File 12 is fairly weak,
|
|
||||||
but its effectiveness gets better over time since the effects of Source-Files and
|
|
||||||
Augmentations are multiplicative with each other.
|
|
||||||
|
|
||||||
The Source-File from **BitNode-9: Hacktocracy** is good because it unlocks the Hacknet
|
|
||||||
Server mechanic. The Hacknet Server mechanic causes Hacknet Nodes to produce a new
|
|
||||||
currency called *hashes*, rather than money. *Hashes* can be spent on powerful upgrades
|
|
||||||
that benefit your hacking, Corporation, Bladeburner, etc.
|
|
||||||
|
|
||||||
The Duplicate Sleeves granted by the Source-File from **BitNode-10: Digital Carbon**
|
|
||||||
are strong, but only after you have several of them and have spent some time/money upgrading
|
|
||||||
them.
|
|
||||||
|
|
||||||
For more scripting/hacking
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
**BitNode-4: The Singularity** unlocks the `Singularity API <https://github.com/bitburner-official/bitburner-src/blob/dev/markdown/bitburner.singularity.md>`_, which
|
|
||||||
can be used to automate many different aspects of the game, including working for factions/companies,
|
|
||||||
purchasing & installing Augmentations, and creating programs
|
|
||||||
|
|
||||||
**BitNode-6** and **BitNode-7** unlock Bladeburner and its corresponding
|
|
||||||
`Netscript API <https://github.com/bitburner-official/bitburner-src/blob/dev/markdown/bitburner.bladeburner.md>`_. This allows you to automate an entire
|
|
||||||
new mechanic.
|
|
||||||
|
|
||||||
**BitNode-2: Rise of the Underworld** also unlocks a new mechanic and Netscript API for automating
|
|
||||||
it (the Gang mechanic). However, it is not as interesting as Bladeburner (in my opinion)
|
|
||||||
|
|
||||||
**BitNode-9: Hacktocracy** unlocks the Hacknet Server mechanic and several new
|
|
||||||
functions in the :ref:`Hacknet Node API <netscript_hacknetnodeapi>` for using it.
|
|
||||||
|
|
||||||
For new mechanics
|
|
||||||
^^^^^^^^^^^^^^^^^
|
|
||||||
**BitNode-2: Rise of the Underworld** unlocks a new mechanic in which you can
|
|
||||||
manage a gang. Gangs earn you money and can be very profitable once they get large
|
|
||||||
and powerful. The biggest benefit of gangs, however, is that they make all
|
|
||||||
Augmentations available to you through their corresponding faction.
|
|
||||||
|
|
||||||
**BitNode-3: Corporatocracy** unlocks a new mechanic in which you can manage a
|
|
||||||
corporation. You can earn money through Corporations by selling your stocks, or by
|
|
||||||
configuring your corporation to pay dividends to shareholders. If your Corporation
|
|
||||||
gets big enough, it can also bribe factions in exchange for faction reputation.
|
|
||||||
|
|
||||||
**BitNode-6: Bladeburners** unlocks a new mechanic that centers around combat rather
|
|
||||||
than hacking. The main benefit of the Bladeburner mechanic is that it offers a new
|
|
||||||
method of destroying a BitNode.
|
|
||||||
|
|
||||||
**BitNode-9: Hacktocracy** unlocks the Hacknet Server, which is an upgraded version of a
|
|
||||||
Hacknet Node. The Hacknet Server generates a computational unit called a *hash*. *Hashes*
|
|
||||||
can be spent on a variety of different upgrades that can benefit your hacking,
|
|
||||||
Corporation, Bladeburner progress, and more. It transforms the Hacknet Node from a
|
|
||||||
simple money-generator to a more interesting mechanic.
|
|
||||||
|
|
||||||
**BitNode-10: Digital Carbon** unlocks two new mechanics: Re-Sleeving and
|
|
||||||
Duplicate Sleeves.
|
|
||||||
|
|
||||||
**BitNode-13: They're lunatics** unlocks Stanek's Gift. This gift can improve skills,
|
|
||||||
hacknet production and costs, working and crime gains as well hacking power and speed.
|
|
||||||
|
|
||||||
For a Challenge
|
|
||||||
^^^^^^^^^^^^^^^
|
|
||||||
In general, the higher BitNodes are more difficult than the lower ones.
|
|
||||||
**BitNode-12: The Recursion** is an obvious exception as it gets progressively harder.
|
|
||||||
|
|
||||||
**BitNode-8: Ghost of Wall Street** provides a unique challenge as the only method
|
|
||||||
of earning money in that BitNode is through trading at the stock market.
|
|
@ -1,42 +0,0 @@
|
|||||||
.. Bitburner documentation master file, created by
|
|
||||||
sphinx-quickstart on Wed Oct 4 15:03:07 2017.
|
|
||||||
You can adapt this file completely to your liking, but it should at least
|
|
||||||
contain the root `toctree` directive.
|
|
||||||
|
|
||||||
Welcome to Bitburner's documentation!
|
|
||||||
=====================================
|
|
||||||
Bitburner is a programming-based `incremental game <https://en.wikipedia.org/wiki/Incremental_game>`_
|
|
||||||
that revolves around hacking and cyberpunk themes. The game is currently in the
|
|
||||||
early beta stage of development. It `can be played here <https://danielyxie.github.io/bitburner/>`_.
|
|
||||||
|
|
||||||
What is Bitburner?
|
|
||||||
------------------
|
|
||||||
Bitburner is a cyberpunk-themed incremental RPG where you, the player, take the role of an unknown hacker in a dark, dystopian world.
|
|
||||||
When a mysterious hacker called jump3R messages you, they confirm your suspicions that there is something wrong with the world around you.
|
|
||||||
Now, aided by jump3R, you embark on a quest to gain money and power by any means necessary, in the hopes that this will lead you to uncover the
|
|
||||||
secrets that you've been searching for.
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 5
|
|
||||||
:caption: Contents:
|
|
||||||
|
|
||||||
Full documentation <https://github.com/bitburner-official/bitburner-src/blob/dev/markdown/bitburner.ns.md>
|
|
||||||
Basic documentation <netscript>
|
|
||||||
Basic Gameplay <basicgameplay>
|
|
||||||
Advanced Gameplay <advancedgameplay>
|
|
||||||
Remote API <remoteapi.rst>
|
|
||||||
Keyboard Shortcuts <shortcuts>
|
|
||||||
Game Frozen or Stuck? <gamefrozen>
|
|
||||||
Guides & Tips <guidesandtips>
|
|
||||||
Tools & Resources <toolsandresources>
|
|
||||||
Changelog <changelog>
|
|
||||||
v1.0.0 script migration guide <v1.0.0_migration.rst>
|
|
||||||
v2.0.0 script migration guide <v2.0.0_migration.rst>
|
|
||||||
404 <404.rst>
|
|
||||||
|
|
||||||
Indices and tables
|
|
||||||
==================
|
|
||||||
|
|
||||||
* :ref:`genindex`
|
|
||||||
* :ref:`modindex`
|
|
||||||
* :ref:`search`
|
|
@ -1,26 +0,0 @@
|
|||||||
.. _netscript:
|
|
||||||
|
|
||||||
Netscript
|
|
||||||
=========
|
|
||||||
Netscript is the programming language used in the world of Bitburner.
|
|
||||||
|
|
||||||
When you write scripts in Bitburner, they are written in the Netscript language.
|
|
||||||
Netscript is simply a subset of `JavaScript <https://developer.mozilla.org/en-US/docs/Web/JavaScript>`_.
|
|
||||||
This means that Netscript's syntax is
|
|
||||||
identical to that of JavaScript, but it does not implement some of the features
|
|
||||||
that JavaScript has.
|
|
||||||
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 5
|
|
||||||
:caption: Sections:
|
|
||||||
|
|
||||||
Full documentation <https://github.com/bitburner-official/bitburner-src/blob/dev/markdown/bitburner.ns.md>
|
|
||||||
Learn to Program <netscript/netscriptlearntoprogram>
|
|
||||||
Netscript 1.0 <netscript/netscript1>
|
|
||||||
NetscriptJS (Netscript 2.0) <netscript/netscriptjs>
|
|
||||||
Script Arguments <netscript/netscriptscriptarguments>
|
|
||||||
Basic Functions <netscript/netscriptfunctions>
|
|
||||||
Advanced Functions <netscript/netscriptadvancedfunctions>
|
|
||||||
Hacknet Node API <netscript/netscripthacknetnodeapi>
|
|
||||||
Miscellaneous <netscript/netscriptmisc>
|
|
@ -1,39 +0,0 @@
|
|||||||
autocomplete() Netscript Function
|
|
||||||
=================================
|
|
||||||
|
|
||||||
.. warning:: This feature is not officially supported yet and the API might change. It is also only supported in ns2
|
|
||||||
|
|
||||||
.. js:function:: autocomplete(data, args)
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
:param Object data: general data about the game you might want to autocomplete.
|
|
||||||
:param string[] args: current arguments. Minus `run script.js`
|
|
||||||
|
|
||||||
data is an object with the following properties::
|
|
||||||
|
|
||||||
{
|
|
||||||
servers: list of all servers in the game.
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
This function is special as it must be declared as a top level function like `main`.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
export function autocomplete(data, args) {
|
|
||||||
return [...data.servers]; // This script autocompletes the list of servers.
|
|
||||||
return [...data.servers, ...data.scripts]; // Autocomplete servers and scripts
|
|
||||||
return ["low", "medium", "high"]; // Autocomplete 3 specific strings.
|
|
||||||
}
|
|
||||||
|
|
||||||
Terminal:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
$ run demo.js mega\t
|
|
||||||
// results in
|
|
||||||
$ run demo.js megacorp
|
|
@ -1,35 +0,0 @@
|
|||||||
Injecting HTML in the game
|
|
||||||
==========================
|
|
||||||
|
|
||||||
Bitburner uses React and Material-UI to render everything. Modifying the UI is possible but
|
|
||||||
not officially supported.
|
|
||||||
|
|
||||||
To automatically enter commands in the terminal (only works if looking at the terminal):
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
// Acquire a reference to the terminal text field
|
|
||||||
const terminalInput = document.getElementById("terminal-input");
|
|
||||||
|
|
||||||
// Set the value to the command you want to run.
|
|
||||||
terminalInput.value="home;connect n00dles;home;connect n00dles;home;";
|
|
||||||
|
|
||||||
// Get a reference to the React event handler.
|
|
||||||
const handler = Object.keys(terminalInput)[1];
|
|
||||||
|
|
||||||
// Perform an onChange event to set some internal values.
|
|
||||||
terminalInput[handler].onChange({target:terminalInput});
|
|
||||||
|
|
||||||
// Simulate an enter press
|
|
||||||
terminalInput[handler].onKeyDown({key:'Enter',preventDefault:()=>null});
|
|
||||||
|
|
||||||
|
|
||||||
To add lines to the terminal (only works if looking at the terminal):
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
// Acquire a reference to the terminal list of lines.
|
|
||||||
const list = document.getElementById("generic-react-container").querySelector("ul");
|
|
||||||
|
|
||||||
// Inject some HTML.
|
|
||||||
list.insertAdjacentHTML('beforeend',`<li><p color=lime>whatever custom html</p></li>`)
|
|
Binary file not shown.
Before Width: | Height: | Size: 60 KiB |
@ -1,17 +0,0 @@
|
|||||||
brutessh() Netscript Function
|
|
||||||
=============================
|
|
||||||
|
|
||||||
.. js:function:: brutessh(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.05 GB
|
|
||||||
|
|
||||||
:param string hostname: Hostname of the target server.
|
|
||||||
|
|
||||||
Runs the ``BruteSSH.exe`` program on the target server. ``BruteSSH.exe``
|
|
||||||
must exist on your home computer.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.brutessh("foodnstuff");
|
|
@ -1,15 +0,0 @@
|
|||||||
clearLog() Netscript Function
|
|
||||||
===============================
|
|
||||||
|
|
||||||
.. js:function:: clearLog()
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
|
|
||||||
Clears the script’s logs.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
//Opens the logs, clears it of whatever may have been there before and prevents non-print() functions from printing to log
|
|
||||||
ns.tail();ns.clearLog();ns.disableLog("ALL");
|
|
@ -1,19 +0,0 @@
|
|||||||
closeTail() Netscript Function
|
|
||||||
===============================
|
|
||||||
|
|
||||||
.. js:function:: closeTail([scriptPid = current script])
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
|
|
||||||
:param number scriptPid: PID of the script of which to open the logs.
|
|
||||||
|
|
||||||
Closes a script’s logs.
|
|
||||||
|
|
||||||
If the function is called with no arguments, it will open the current script’s logs.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.closeTail(12);
|
|
||||||
ns.closeTail();
|
|
@ -1,21 +0,0 @@
|
|||||||
deleteServer() Netscript Function
|
|
||||||
=================================
|
|
||||||
|
|
||||||
.. js:function:: deleteServer(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 2.25 GB
|
|
||||||
:param string hostname: Hostname of the server to delete.
|
|
||||||
:returns: ``true`` if successful.
|
|
||||||
|
|
||||||
Deletes the specified purchased server.
|
|
||||||
|
|
||||||
The ``hostname`` argument can be any data type, but it will be converted to
|
|
||||||
a string. Whitespace is automatically removed from the string. This function
|
|
||||||
will not delete a server that still has scripts running on it.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.killall("dummyServer");
|
|
||||||
ns.deleteServer("dummyServer"); //returns: true if purhcased server 'dummyServer'existed
|
|
@ -1,18 +0,0 @@
|
|||||||
disableLog() Netscript Function
|
|
||||||
===============================
|
|
||||||
|
|
||||||
.. js:function:: disableLog(functionName)
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
|
|
||||||
:param string functionName: Name of function for which to disable logging.
|
|
||||||
|
|
||||||
Disables logging for the given function. Logging can be disabled for
|
|
||||||
all functions by passing 'ALL' as the argument. Print() can always print to log.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
//Opens the logs, clears it of whatever may have been there before and prevents non-print() functions from logging
|
|
||||||
ns.tail();ns.clearLog();ns.disableLog("ALL");
|
|
@ -1,21 +0,0 @@
|
|||||||
enableLog() Netscript Function
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. js:function:: enableLog(functionName)
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
|
|
||||||
:param string functionName: Name of function for which to enable logging.
|
|
||||||
|
|
||||||
Re-enables logging for the given function. If 'ALL' is passed into this
|
|
||||||
function as an argument, then it will revert the effects of
|
|
||||||
``disableLog('ALL')``
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
//Opens the logs, clears it of whatever may have been there before and prevents non-print() functions from printing to log
|
|
||||||
ns.tail();ns.clearLog();ns.disableLog("ALL");
|
|
||||||
//let hack() log normally
|
|
||||||
ns.enableLog("hack");
|
|
@ -1,40 +0,0 @@
|
|||||||
exec() Netscript Function
|
|
||||||
=========================
|
|
||||||
|
|
||||||
.. js:function:: exec(script, hostname[, numThreads=1[, args...]])
|
|
||||||
|
|
||||||
:RAM cost: 1.3 GB
|
|
||||||
|
|
||||||
:param string script: Filename of script to execute.
|
|
||||||
:param string hostname: Hostname of the target server on which to execute the script.
|
|
||||||
:param number numThreads: Optional thread count for new script. Set to 1 by
|
|
||||||
default. Has to be an integer.
|
|
||||||
:param args...: Additional arguments to pass into the new script that is
|
|
||||||
being run. Note that if any arguments are being
|
|
||||||
passed into the new script, then the third argument ``numThreads`` must
|
|
||||||
be filled in with a value.
|
|
||||||
:returns: Newly created process id (PID) on success, 0 on failure.
|
|
||||||
|
|
||||||
Run a script as a separate process on a specified server. This is similar to
|
|
||||||
the :doc:`run<run>` function except that it can be used to run a script on any
|
|
||||||
server, instead of just the current server.
|
|
||||||
|
|
||||||
.. warning:: Running this function with a ``numThreads`` argument of 0 or
|
|
||||||
less will cause a runtime error.
|
|
||||||
|
|
||||||
The simplest way to use the :doc:`exec<exec>` command is to call it with
|
|
||||||
just the script name and the target server. The following example will try
|
|
||||||
to run ``generic-hack.js`` on the ``foodnstuff`` server::
|
|
||||||
|
|
||||||
ns.exec("generic-hack.js", "foodnstuff");
|
|
||||||
|
|
||||||
The following example will try to run the script ``generic-hack.js`` on
|
|
||||||
the ``joesguns`` server with 10 threads::
|
|
||||||
|
|
||||||
ns.exec("generic-hack.js", "joesguns", 10);
|
|
||||||
|
|
||||||
This last example will try to run the script ``foo.js`` on the
|
|
||||||
``foodnstuff`` server with 5 threads. It will also pass the number 1 and the
|
|
||||||
string "test" in as arguments to the script::
|
|
||||||
|
|
||||||
ns.exec("foo.js", "foodnstuff", 5, 1, "test");
|
|
@ -1,29 +0,0 @@
|
|||||||
fileExists() Netscript Function
|
|
||||||
===============================
|
|
||||||
|
|
||||||
.. js:function:: fileExists(filename[, hostname = current hostname])
|
|
||||||
|
|
||||||
:RAM cost: 0.1 GB
|
|
||||||
|
|
||||||
:param string filename: Filename of file to check.
|
|
||||||
:param string hostname:
|
|
||||||
Hostname of target server. This is optional. If it is not specified then
|
|
||||||
the function will use the current server as the target server.
|
|
||||||
:returns: ``true`` if the file exists.
|
|
||||||
|
|
||||||
The filename for scripts and .txt files is case-sensitive, but for other types of files it
|
|
||||||
is not. For example, ``fileExists("brutessh.exe")`` will work fine, even
|
|
||||||
though the actual program is named ``BruteSSH.exe``.
|
|
||||||
|
|
||||||
If the ``hostname`` argument is omitted, then the function will search
|
|
||||||
through the server running the script that calls this function for the file.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.fileExists("foo.js", "foodnstuff"); // returns: false
|
|
||||||
ns.fileExists("ftpcrack.exe"); // returns: true
|
|
||||||
|
|
||||||
The first example above will return true if the script named ``foo.js`` exists on the ``foodnstuff`` server, and false otherwise.
|
|
||||||
The second example above will return true if the current server contains the ``FTPCrack.exe`` program, and false otherwise.
|
|
@ -1,29 +0,0 @@
|
|||||||
formatRam() Netscript Function
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. js:function:: formatRam(number[, fractionalDigits = 3[, suffixStart = 1000[, isInteger = false]]])
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
|
|
||||||
:param number number: Number to format.
|
|
||||||
:param number fractionalDigits: Number of digits to show in the fractional part of the decimal number.
|
|
||||||
:param number suffixStart: How high a number must be before a suffix will be added.
|
|
||||||
:param boolean isInteger: Whether the number represents an integer. Integers do not display fractional digits until a suffix is present.
|
|
||||||
|
|
||||||
:returns: Formatted string.
|
|
||||||
|
|
||||||
Converts a number into a string with formatting.
|
|
||||||
|
|
||||||
The format depends on the Numeric Display settings (all options on the "Numeric Display" options page).
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
const number = 1.23456789
|
|
||||||
ns.print(ns.formatNumber(number)); //1.235
|
|
||||||
ns.print(ns.formatNumber(number,4)); //1.2346
|
|
||||||
ns.print(ns.formatNumber(number*1e9,3,1e10)); //1234567890
|
|
||||||
ns.print(ns.formatNumber(number*1e10,5,1e6)); //12.34568b or 1.23457e9
|
|
||||||
ns.print(ns.formatNumber(number,4,1000, true)); //1.235
|
|
||||||
ns.print(ns.formatNumber(number,4,1000, false)); //1.2346
|
|
@ -1,23 +0,0 @@
|
|||||||
formatPercent() Netscript Function
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. js:function:: formatPercent(number[, fractionalDigits = 2])
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
|
|
||||||
:param number number: Number to format.
|
|
||||||
:param number fractionalDigits: Number of digits to show in the fractional part of the decimal number.
|
|
||||||
|
|
||||||
:returns: Formatted string.
|
|
||||||
|
|
||||||
Converts a number into a string with percent formatting.
|
|
||||||
|
|
||||||
The format depends on the Numeric Display settings (all options on the "Numeric Display" options page).
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
const number = 1.23456789
|
|
||||||
ns.print(ns.formatPercent(number)); //123.46%
|
|
||||||
ns.print(ns.formatPercent(number,4)); //123.4568%
|
|
@ -1,26 +0,0 @@
|
|||||||
formatRam() Netscript Function
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. js:function:: formatRam(number[, fractionalDigits = 2])
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
|
|
||||||
:param number number: Number to format.
|
|
||||||
:param number fractionalDigits: Number of digits to show in the fractional part of the decimal number.
|
|
||||||
|
|
||||||
:returns: Formatted string.
|
|
||||||
|
|
||||||
Converts a number into a string with ram formatting.
|
|
||||||
|
|
||||||
The format depends on the Numeric Display settings (all options on the "Numeric Display" options page).
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
const number = 1.23456789
|
|
||||||
ns.print(ns.formatRam(number)); //1.23GB or 1.23GiB
|
|
||||||
ns.print(ns.formatRam(number,0)); //1GB or 1GiB
|
|
||||||
ns.print(ns.formatRam(number,3)); //1.235GB or 1.235GiB
|
|
||||||
ns.print(ns.formatRam(2**12,3)); //4.096tB or 4tiB
|
|
||||||
ns.print(ns.formatRam(2**20,3)); //1.049PB or 1PiB
|
|
@ -1,17 +0,0 @@
|
|||||||
ftpcrack() Netscript Function
|
|
||||||
=============================
|
|
||||||
|
|
||||||
.. js:function:: ftpcrack(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.05 GB
|
|
||||||
|
|
||||||
:param string hostname: Hostname of the target server.
|
|
||||||
|
|
||||||
Runs the ``FTPCrack.exe`` program on the target server. ``FTPCrack.exe``
|
|
||||||
must exist on your home computer.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.ftpcrack("foodnstuff");
|
|
@ -1,13 +0,0 @@
|
|||||||
getHackingLevel() Netscript Function
|
|
||||||
====================================
|
|
||||||
|
|
||||||
.. js:function:: getHackingLevel()
|
|
||||||
|
|
||||||
:RAM cost: 0.05 GB
|
|
||||||
:returns: The player's current hacking level.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.getHackingLevel(); // returns: 124
|
|
@ -1,26 +0,0 @@
|
|||||||
getHackingMultipliers() Netscript Function
|
|
||||||
==========================================
|
|
||||||
|
|
||||||
.. js:function:: getHackingMultipliers()
|
|
||||||
|
|
||||||
:RAM cost: 0.25 GB
|
|
||||||
:returns: object containing the player's hacking multipliers. These
|
|
||||||
multipliers are returned in decimal forms, not percentages (e.g. 1.5
|
|
||||||
instead of 150%).
|
|
||||||
|
|
||||||
Structure::
|
|
||||||
|
|
||||||
{
|
|
||||||
chance: Player's hacking chance multiplier,
|
|
||||||
speed: Player's hacking speed multiplier,
|
|
||||||
money: Player's hacking money stolen multiplier,
|
|
||||||
growth: Player's hacking growth multiplier
|
|
||||||
}
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
const mults = ns.getHackingMultipliers();
|
|
||||||
ns.print(mults.chance);
|
|
||||||
ns.print(mults.growth);
|
|
@ -1,27 +0,0 @@
|
|||||||
getHacknetMultipliers() Netscript Function
|
|
||||||
==========================================
|
|
||||||
|
|
||||||
.. js:function:: getHacknetMultipliers()
|
|
||||||
|
|
||||||
:RAM cost: 0.25 GB
|
|
||||||
:returns: object containing the player's hacknet multipliers. These
|
|
||||||
multipliers are returned in decimal forms, not percentages (e.g. 1.5
|
|
||||||
instead of 150%).
|
|
||||||
|
|
||||||
Structure::
|
|
||||||
|
|
||||||
{
|
|
||||||
production: Player's hacknet production multiplier,
|
|
||||||
purchaseCost: Player's hacknet purchase cost multiplier,
|
|
||||||
ramCost: Player's hacknet ram cost multiplier,
|
|
||||||
coreCost: Player's hacknet core cost multiplier,
|
|
||||||
levelCost: Player's hacknet level cost multiplier
|
|
||||||
}
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
const mults = ns.getHacknetMultipliers();
|
|
||||||
ns.print(mults.production);
|
|
||||||
ns.print(mults.purchaseCost);
|
|
@ -1,14 +0,0 @@
|
|||||||
getHostname() Netscript Function
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. js:function:: getHostname()
|
|
||||||
|
|
||||||
:RAM cost: 0.05 GB
|
|
||||||
|
|
||||||
Returns a string with the hostname of the server that the script is running on.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.tprint(ns.getHostname())
|
|
@ -1,17 +0,0 @@
|
|||||||
getPurchasedServerCost() Netscript Function
|
|
||||||
===========================================
|
|
||||||
|
|
||||||
.. js:function:: getPurchasedServerCost(ram)
|
|
||||||
|
|
||||||
:RAM cost: 0.25 GB
|
|
||||||
|
|
||||||
:param number ram: Amount of RAM of a potential purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of :doc:`getPurchasedServerMaxRam<getPurchasedServerMaxRam>`
|
|
||||||
:returns: Cost to purchase a server with the specified amount of ``ram``.
|
|
||||||
|
|
||||||
Giving any non-power-of-2 as an argument results in the function returning `Infinity`
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.getPurchasedServerCost(8192); // returns: 450560000
|
|
@ -1,13 +0,0 @@
|
|||||||
getPurchasedServerLimit() Netscript Function
|
|
||||||
============================================
|
|
||||||
|
|
||||||
.. js:function:: getPurchasedServerLimit()
|
|
||||||
|
|
||||||
:RAM cost: 0.05 GB
|
|
||||||
:returns: The maximum number of servers you can purchase.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.getPurchasedServerLimit() // returns: 25
|
|
@ -1,13 +0,0 @@
|
|||||||
getPurchasedServerMaxRam() Netscript Function
|
|
||||||
=============================================
|
|
||||||
|
|
||||||
.. js:function:: getPurchasedServerMaxRam()
|
|
||||||
|
|
||||||
:RAM cost: 0.05 GB
|
|
||||||
:returns: The maximum RAM that a purchased server can have.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.getPurchasedServerMaxRam(); // returns: 1048576
|
|
@ -1,18 +0,0 @@
|
|||||||
getPurchasedServerUpgradeCost() Netscript Function
|
|
||||||
===========================================
|
|
||||||
|
|
||||||
.. js:function:: getPurchasedServerUpgradeCost(hostname, ram)
|
|
||||||
|
|
||||||
:RAM cost: 0.1 GB
|
|
||||||
|
|
||||||
:param string hostname: Hostname of target purchased server.
|
|
||||||
:param number ram: Target amount of RAM for purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of :doc:`getPurchasedServerMaxRam<getPurchasedServerMaxRam>`
|
|
||||||
:returns: Cost to purchase a server with the specified amount of ``ram``.
|
|
||||||
|
|
||||||
Giving any non-power-of-2 as an argument results in the function returning `-1`
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
ns.purchaseServer("smallServer",2) //costs 110000
|
|
||||||
ns.getPurchasedServerUpgradeCost("smallServer",8); // returns: 330000
|
|
@ -1,13 +0,0 @@
|
|||||||
getPurchasedServers() Netscript Function
|
|
||||||
========================================
|
|
||||||
|
|
||||||
.. js:function:: getPurchasedServers()
|
|
||||||
|
|
||||||
:RAM cost: 2.25 GB
|
|
||||||
:returns: String array of hostnames of all of the servers you have purchased.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.getPurchasedServers(); // returns: ['grow-server-0', 'grow-server-1', 'weaken-server-0']
|
|
@ -1,16 +0,0 @@
|
|||||||
getScriptRam() Netscript Function
|
|
||||||
=================================
|
|
||||||
|
|
||||||
.. js:function:: getScriptRam(filename[, hostname = current hostname])
|
|
||||||
|
|
||||||
:RAM cost: 0.1 GB
|
|
||||||
:param string filename: Filename of script.
|
|
||||||
:param string hostname: Hostname of target server the script is located on.
|
|
||||||
Default to the server this script is running on.
|
|
||||||
:returns: Amount of RAM required to run the script, 0 if it does not exist.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.getScriptRam("grow.js"); // returns: 1.75
|
|
@ -1,14 +0,0 @@
|
|||||||
getServerMaxMoney() Netscript Function
|
|
||||||
======================================
|
|
||||||
|
|
||||||
.. js:function:: getServerMaxMoney(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.1 GB
|
|
||||||
:param string hostname: Hostname of target server.
|
|
||||||
:returns: Maximum amount of money that can be available on a server.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.getServerMaxMoney('foodnstuff'); // returns: 50000000
|
|
@ -1,15 +0,0 @@
|
|||||||
getServerMaxRam() Netscript Function
|
|
||||||
====================================
|
|
||||||
|
|
||||||
.. js:function:: getServerMaxRam(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.05 GB
|
|
||||||
:param string hostname: Hostname of target server.
|
|
||||||
:returns: Total ram available on that server. In GB.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
const maxRam = ns.getServerMaxRam("helios"); // returns: 16
|
|
||||||
ns.print("helios has "+maxRam + "GB");
|
|
@ -1,14 +0,0 @@
|
|||||||
getServerMinSecurityLevel() Netscript Function
|
|
||||||
==============================================
|
|
||||||
|
|
||||||
.. js:function:: getServerMinSecurityLevel(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.1 GB
|
|
||||||
:param string hostname: Hostname of target server.
|
|
||||||
:returns: The minimum security level of the target server.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.getServerMinSecurityLevel('foodnstuff'); // returns: 3
|
|
@ -1,19 +0,0 @@
|
|||||||
getServerMoneyAvailable() Netscript Function
|
|
||||||
============================================
|
|
||||||
|
|
||||||
.. js:function:: getServerMoneyAvailable(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.1 GB
|
|
||||||
:param string hostname: Hostname of target server.
|
|
||||||
:returns: Money available on that server.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
Running this function on the home computer will return the player's money.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.getServerMoneyAvailable("foodnstuff"); // returns: 120000
|
|
||||||
ns.getServerMoneyAvailable("home"); // returns: 1000
|
|
@ -1,15 +0,0 @@
|
|||||||
getServerNumPortsRequired() Netscript Function
|
|
||||||
==============================================
|
|
||||||
|
|
||||||
.. js:function:: getServerNumPortsRequired(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.1 GB
|
|
||||||
:param string hostname: Hostname of target server.
|
|
||||||
:returns: The number of open ports required to successfully run NUKE.exe on
|
|
||||||
the specified server.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.getServerNumPortsRequired("unitalife"); // returns: 4
|
|
@ -1,14 +0,0 @@
|
|||||||
getServerRequiredHackingLevel() Netscript Function
|
|
||||||
==================================================
|
|
||||||
|
|
||||||
.. js:function:: getServerRequiredHackingLevel(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.1 GB
|
|
||||||
:param string hostname: Hostname of target server.
|
|
||||||
:returns: The required hacking level of target server.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.getServerRequiredHackingLevel("foodnstuff"); // returns: 5
|
|
@ -1,14 +0,0 @@
|
|||||||
getServerSecurityLevel() Netscript Function
|
|
||||||
===========================================
|
|
||||||
|
|
||||||
.. js:function:: getServerSecurityLevel(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.1 GB
|
|
||||||
:param string hostname: Hostname of target server.
|
|
||||||
:returns: The security level of the target server.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.getServerSecurityLevel("foodnstuff"); // returns: 3.45
|
|
@ -1,15 +0,0 @@
|
|||||||
getServerUsedRam() Netscript Function
|
|
||||||
=====================================
|
|
||||||
|
|
||||||
.. js:function:: getServerUsedRam(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.05 GB
|
|
||||||
:param string hostname: Hostname of target server.
|
|
||||||
:returns: Used ram on that server. In GB.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
const usedRam = ns.getServerUsedRam("harakiri-sushi"); // returns: 5.6
|
|
||||||
ns.print("harakiri-sushi uses "+ usedRam + "GB"); // prints: "harakiri-sushi uses 5.6GB"
|
|
@ -1,16 +0,0 @@
|
|||||||
getSharePower() Netscript Function
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. js:function:: getSharePower()
|
|
||||||
|
|
||||||
:RAM cost: 0.2 GB
|
|
||||||
|
|
||||||
:returns: Reputation gain rate multiplier from sharing. i.e. 1.5 means +50% rep gain rate.
|
|
||||||
|
|
||||||
Calculate your share power, based on all the active share calls.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.tprint(ns.getSharePower())
|
|
@ -1,38 +0,0 @@
|
|||||||
grow() Netscript Function
|
|
||||||
=========================
|
|
||||||
|
|
||||||
.. js:function:: grow(hostname[, opts={}])
|
|
||||||
|
|
||||||
:RAM cost: 0.15 GB
|
|
||||||
:param string hostname: Hostname of the target server.
|
|
||||||
:param object opts: Optional parameters for configuring function behavior. Properties:
|
|
||||||
|
|
||||||
* threads (*number*) - Number of threads to use for this function.
|
|
||||||
Must be less than or equal to the number of threads the script is running with.
|
|
||||||
* stock (*boolean*) - If true, the function can affect the stock market. See
|
|
||||||
:ref:`gameplay_stock_market_player_actions_influencing_stock`
|
|
||||||
|
|
||||||
:returns: The number by which the money on the server was multiplied for the growth
|
|
||||||
|
|
||||||
Increase the amount of money available on a server. The time it takes to
|
|
||||||
execute depends on your hacking level and the target server's security
|
|
||||||
level. When :doc:`grow<grow>` completes, the money available on a target
|
|
||||||
server will be increased by the number of threads used and a certain, fixed percentage.
|
|
||||||
The percentage is determined by the target server's growth rate (which varies between servers)
|
|
||||||
and security level. Generally, higher-level servers have higher growth
|
|
||||||
rates.
|
|
||||||
|
|
||||||
Like :doc:`hack<hack>`, :doc:`grow<grow>` can be called on any server, from
|
|
||||||
any server. The :doc:`grow<grow>` command requires root access to the target
|
|
||||||
server, but there is no required hacking level to run the command. It also
|
|
||||||
raises the security level of the target server by 0.004 per thread.
|
|
||||||
|
|
||||||
Action time is calculated at the start, effect is calculated at the end.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
while(true) {
|
|
||||||
await ns.grow("foodnstuff");
|
|
||||||
}
|
|
@ -1,38 +0,0 @@
|
|||||||
hack() Netscript Function
|
|
||||||
=========================
|
|
||||||
|
|
||||||
.. js:function:: hack(hostname[, opts={}])
|
|
||||||
|
|
||||||
:RAM cost: 0.1 GB
|
|
||||||
:param string hostname: Hostname of the target server.
|
|
||||||
:param object opts: Optional parameters for configuring function behavior. Properties:
|
|
||||||
|
|
||||||
* threads (*number*) - Number of threads to use for this function.
|
|
||||||
Must be less than or equal to the number of threads the script is running with.
|
|
||||||
* stock (*boolean*) - If true, the function can affect the stock market. See
|
|
||||||
:ref:`gameplay_stock_market_player_actions_influencing_stock`
|
|
||||||
:returns: The amount of money stolen if the hack is successful, and zero otherwise
|
|
||||||
|
|
||||||
Function that is used to try and hack servers to steal money and gain
|
|
||||||
hacking experience. The runtime for this command depends on your hacking
|
|
||||||
level and the target server's security level. In order to hack a server you
|
|
||||||
must first gain root access to that server and also have the required
|
|
||||||
hacking level.
|
|
||||||
|
|
||||||
A script can hack a server from anywhere. It does not need to be running on
|
|
||||||
the same server to hack that server. For example, you can create a script
|
|
||||||
that hacks the 'foodnstuff' server and run that script on any server in the
|
|
||||||
game.
|
|
||||||
|
|
||||||
A successful :doc:`hack<hack>` on a server will raise that server's security
|
|
||||||
level by 0.002.
|
|
||||||
|
|
||||||
Action time is calculated at the start, effect is calculated at the end.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
await ns.hack("foodnstuff");
|
|
||||||
await ns.hack("10.1.2.3");
|
|
||||||
await ns.hack("foodnstuff", { threads: 5 }); // Only use 5 threads to hack
|
|
@ -1,22 +0,0 @@
|
|||||||
hasRootAccess() Netscript Function
|
|
||||||
==================================
|
|
||||||
|
|
||||||
.. js:function:: hasRootAccess(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.05 GB
|
|
||||||
:param string hostname: Hostname of the target server.
|
|
||||||
:returns: ``true`` if you have root access on the target server.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
if (ns.hasRootAccess("foodnstuff") == false) {
|
|
||||||
ns.nuke("foodnstuff");
|
|
||||||
}
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
if (ns.hasRootAccess("foodnstuff")) {
|
|
||||||
ns.exec("foo.js", 1, "foodnstuff");
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
httpworm() Netscript Function
|
|
||||||
=============================
|
|
||||||
|
|
||||||
.. js:function:: httpworm(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.05 GB
|
|
||||||
:param string hostname: Hostname of the target server.
|
|
||||||
|
|
||||||
Runs the ``HTTPWorm.exe`` program on the target server. ``HTTPWorm.exe``
|
|
||||||
must exist on your home computer.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.httpworm("foodnstuff");
|
|
@ -1,14 +0,0 @@
|
|||||||
isLogEnabled() Netscript Function
|
|
||||||
=================================
|
|
||||||
|
|
||||||
.. js:function:: isLogEnabled(functionName)
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
:param string functionName: Name of function to check.
|
|
||||||
:returns: ``true`` is logs are enabled for this function or for 'ALL'
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.isLogEnabled('hack'); // returns: true
|
|
@ -1,55 +0,0 @@
|
|||||||
isRunning() Netscript Function
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. js:function:: isRunning(filename[, hostname = current hostname[, args...]])
|
|
||||||
.. js:function:: isRunning(PID)
|
|
||||||
|
|
||||||
:RAM cost: 0.1 GB
|
|
||||||
:param string filename: Filename of script to check. case-sensitive.
|
|
||||||
:param string hostname: Hostname of target server. Defaults to current server
|
|
||||||
:param args...: Arguments to specify/identify which scripts to search for
|
|
||||||
:returns: ``true`` if that script with those args is running on that server.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
Remember that a script is uniquely identified by both its name and its arguments.
|
|
||||||
|
|
||||||
**Examples:**
|
|
||||||
|
|
||||||
In this first example below, the function call will return true if there is
|
|
||||||
a script named ``foo.js`` with no arguments running on the
|
|
||||||
``foodnstuff`` server, and false otherwise:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.isRunning("foo.js", "foodnstuff");
|
|
||||||
|
|
||||||
In this second example below, the function call will return true if there is
|
|
||||||
a script named ``foo.js`` with no arguments running on the current
|
|
||||||
server, and false otherwise:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.isRunning("foo.js", ns.getHostname());
|
|
||||||
|
|
||||||
In this next example below, the function call will return true if there is a
|
|
||||||
script named ``foo.script`` running with the arguments 1, 5, and "test" (in
|
|
||||||
that order) on the ``joesguns`` server, and false otherwise:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.isRunning("foo.js", "joesguns", 1, 5, "test");
|
|
||||||
|
|
||||||
|
|
||||||
.. js:function:: isRunning(scriptPid)
|
|
||||||
|
|
||||||
:RAM cost: 0.1 GB
|
|
||||||
:param number scriptPid: PID of the script to check.
|
|
||||||
|
|
||||||
Same as the above version but with pid.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.isRunning(39);
|
|
@ -1,58 +0,0 @@
|
|||||||
kill() Netscript Function
|
|
||||||
=========================
|
|
||||||
|
|
||||||
.. js:function:: kill(script[, hostname=current hostname[, args...]])
|
|
||||||
|
|
||||||
:RAM cost: 0.5 GB
|
|
||||||
:param string script: Filename of the script to kill.
|
|
||||||
:param string hostname: Hostname of the server on which to kill the script.
|
|
||||||
:param args...: Arguments to identify which script to kill.
|
|
||||||
:returns: ``true`` is that script was killed.
|
|
||||||
|
|
||||||
Kills the script on the target server specified by the script's name and
|
|
||||||
arguments. Remember that scripts are uniquely identified by both their name
|
|
||||||
and arguments. For example, if ``foo.js`` is run with the argument 1,
|
|
||||||
then this is not the same as ``foo.js`` run with the argument 2, even
|
|
||||||
though they have the same code.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
The following example will try to kill a script named ``foo.js`` on the
|
|
||||||
``foodnstuff`` server that was ran with no arguments:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.kill("foo.js", "foodnstuff");
|
|
||||||
|
|
||||||
The following will try to kill a script named ``foo.js`` on the current
|
|
||||||
server that was ran with no arguments:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.kill("foo.js");
|
|
||||||
|
|
||||||
The following will try to kill a script named ``foo.js`` on the current
|
|
||||||
server that was ran with the arguments 1 and "foodnstuff":
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.kill("foo.js", ns.getHostname(), 1, "foodnstuff");
|
|
||||||
|
|
||||||
.. js:function:: kill(scriptPid)
|
|
||||||
|
|
||||||
:RAM cost: 0.5 GB
|
|
||||||
:param number scriptPid: PID of the script to kill
|
|
||||||
:returns: ``true`` that script was killed.
|
|
||||||
|
|
||||||
Kills the script with the specified PID. Killing a script by its PID will
|
|
||||||
typically have better performance, especially if you have many scripts
|
|
||||||
running.
|
|
||||||
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
if (ns.kill(10)) {
|
|
||||||
ns.print("Killed script with PID 10!");
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
killall() Netscript Function
|
|
||||||
============================
|
|
||||||
|
|
||||||
.. js:function:: killall([hostname = current hostname[, safetyguard = true]])
|
|
||||||
|
|
||||||
:RAM cost: 0.5 GB
|
|
||||||
:param string hostname: Hostname of the server on which to kill all scripts.
|
|
||||||
:param boolean safetyguard: Whether the function will safeguard the current script or not.
|
|
||||||
:returns: ``true`` if scripts were killed on target server.
|
|
||||||
|
|
||||||
Kills all running scripts on the specified server.
|
|
||||||
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.killall('foodnstuff'); // returns: true
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.killall(); // returns: true, kills all scripts on the current server, except the current script
|
|
||||||
ns.killall(); // returns: false, because all no available scripts are running anymore
|
|
||||||
ns.killall(ns.getHostname(),false) // returns: true, but also kills the current script
|
|
@ -1,17 +0,0 @@
|
|||||||
ls() Netscript Function
|
|
||||||
=======================
|
|
||||||
|
|
||||||
.. js:function:: ls(hostname[, grep])
|
|
||||||
|
|
||||||
:RAM cost: 0.2 GB
|
|
||||||
:param string hostname: Hostname of the target server.
|
|
||||||
:param string grep: a substring to search for in the filename.
|
|
||||||
:returns: String array of all files in alphabetical order.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.ls("home"); // returns: ["demo.js", "msg1.txt"]
|
|
||||||
ns.ls("home", ".txt"); // returns: ["msg1.txt"]
|
|
||||||
ns.ls("home", ".script"); // returns: []
|
|
@ -1,28 +0,0 @@
|
|||||||
moveTail() Netscript Function
|
|
||||||
===============================
|
|
||||||
|
|
||||||
.. js:function:: moveTail(x , y[, pid = current script])
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
|
|
||||||
:param number x: X coordinate to move the tail window to.
|
|
||||||
:param number y: Y coordinate to move the tail window to.
|
|
||||||
:param number pid: PID of the script of which tail window to move. Defaults to current script.
|
|
||||||
|
|
||||||
Moves the tail window to the specified coordinates. The top left corner is (0,0).
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
Due to inner workings, something has to be awaited between opening a tail window and moving or resizing it.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
//open tail
|
|
||||||
ns.tail();
|
|
||||||
await ns.sleep(0);
|
|
||||||
|
|
||||||
//move the tail close to top left corner and make it big
|
|
||||||
ns.moveTail(10, 10);
|
|
||||||
ns.resizeTail(780, 510)
|
|
@ -1,22 +0,0 @@
|
|||||||
mv() Netscript Function
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. js:function:: mv(hostname, sourceFile, targetFile)
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
|
|
||||||
:param string hostname: Hostname of the target server.
|
|
||||||
:param string sourceFile: Name of the file to be moved/renamed.
|
|
||||||
:param string targetFile: Target name of the file.
|
|
||||||
|
|
||||||
Move the source file to target file on the given server.
|
|
||||||
|
|
||||||
This command only works for scripts and text files (.txt). It cannot, however, be used to convert from script to text file, or vice versa.
|
|
||||||
|
|
||||||
This function can also be used to rename files.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.mv("home", "foo.js", "old_foo.txt")
|
|
@ -1,24 +0,0 @@
|
|||||||
nFormat() Netscript Function
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. js:function:: nFormat(number, format)
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
|
|
||||||
:param number number: Number to format.
|
|
||||||
:param string format: Formatting to use. Read http://numeraljs.com/#format for specifics.
|
|
||||||
:returns: Formatted string.
|
|
||||||
|
|
||||||
Deprecated, might be removed in 2.3 version of the game. Use :doc:`formatPercent<formatPercent>` for formatting percentages,
|
|
||||||
:doc:`formatRam<formatRam>` for formatting ram amounts and :doc:`formatNumber<formatNumber>` for formatting other numbers.
|
|
||||||
|
|
||||||
Converts a number into a string with the specified formatter.
|
|
||||||
This uses the numeral.js library, so the formatters must be compatible with that.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.print(ns.nFormat(123456789.1,"0,0")) //logs "123,456,789"
|
|
||||||
ns.print(ns.nFormat(123456789.1,"0.00a")) //logs "123.46m"
|
|
||||||
ns.print(ns.nFormat(200000,"$0.00a")) //logs "$200.00k"
|
|
@ -1,18 +0,0 @@
|
|||||||
nuke() Netscript Function
|
|
||||||
=========================
|
|
||||||
|
|
||||||
.. js:function:: nuke(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.05 GB
|
|
||||||
:param string hostname: Hostname of the target server.
|
|
||||||
|
|
||||||
Runs the ``NUKE.exe`` program on the target server. ``NUKE.exe`` must exist
|
|
||||||
on your home computer. Requires the targeted server to have enough ports opened,
|
|
||||||
otherwise will throw an error.
|
|
||||||
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.nuke("foodnstuff");
|
|
@ -1,18 +0,0 @@
|
|||||||
print() Netscript Function
|
|
||||||
===========================
|
|
||||||
|
|
||||||
.. js:function:: print(args...)
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
:param args: Values to be printed.
|
|
||||||
|
|
||||||
Prints any number of values to the script's logs.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.print("Hello world!"); // Prints "Hello world!" in the logs.
|
|
||||||
ns.print({a:5}); // Prints '{"a":5}' in the logs.
|
|
||||||
const text = "can"
|
|
||||||
ns.print("I "+ text +" use variables :)") // Prints "I can use variables :)"
|
|
@ -1,31 +0,0 @@
|
|||||||
ps() Netscript Function
|
|
||||||
=======================
|
|
||||||
|
|
||||||
.. js:function:: ps([hostname=current hostname])
|
|
||||||
|
|
||||||
:RAM cost: 0.2 GB
|
|
||||||
:param string hostname: Hostname address of the target server.
|
|
||||||
If not specified, it will be the current server's IP by default.
|
|
||||||
:returns: array of objects
|
|
||||||
|
|
||||||
Returns an array with general information about all scripts running on the
|
|
||||||
specified target server. The information for each server is given in an
|
|
||||||
object with the following structure::
|
|
||||||
|
|
||||||
{
|
|
||||||
filename: Script name,
|
|
||||||
threads: Number of threads script is running with,
|
|
||||||
args: Script's arguments,
|
|
||||||
pid: Script's pid
|
|
||||||
}
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
const processes = ns.ps("home");
|
|
||||||
for (const i = 0; i < processes.length; ++i) {
|
|
||||||
ns.tprint(processes[i].filename + ' ' + processes[i].threads);
|
|
||||||
ns.tprint(processes[i].args);
|
|
||||||
ns.tprint(processes[i].pid);
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
purchaseServer() Netscript Function
|
|
||||||
===================================
|
|
||||||
|
|
||||||
.. js:function:: purchaseServer(hostname, ram)
|
|
||||||
|
|
||||||
:RAM cost: 2.25 GB
|
|
||||||
:param string hostname: Hostname of the purchased server.
|
|
||||||
:param number ram: Amount of RAM of the purchased server. Must be a power of
|
|
||||||
2. Maximum value of :doc:`getPurchasedServerMaxRam<getPurchasedServerMaxRam>`
|
|
||||||
:returns: The hostname of the newly purchased server. Empty string on failure.
|
|
||||||
|
|
||||||
Purchases a server with the specified hostname and amount of RAM.
|
|
||||||
|
|
||||||
The ``hostname`` argument can be any data type, but it will be converted to
|
|
||||||
a string and have whitespace removed. Anything that resolves to an empty
|
|
||||||
string will cause the function to fail. If there is already a server with
|
|
||||||
the specified hostname, then the function will automatically append a number
|
|
||||||
at the end of the ``hostname`` argument value until it finds a unique
|
|
||||||
hostname. For example, if the script calls ``purchaseServer("foo", 4)`` but
|
|
||||||
a server named "foo" already exists, the it will automatically change the
|
|
||||||
hostname to "foo-0". If there is already a server with the hostname "foo-0",
|
|
||||||
then it will change the hostname to "foo-1", and so on.
|
|
||||||
|
|
||||||
Note that there is a maximum limit to the amount of servers you can purchase.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
const ram = 64;
|
|
||||||
const name = "pserv-";
|
|
||||||
for (const i = 0; i < 5; ++i) {
|
|
||||||
ns.purchaseServer(name + i, ram);
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
relaysmtp() Netscript Function
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. js:function:: relaysmtp(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.05 GB
|
|
||||||
:param string hostname: Hostname of the target server.
|
|
||||||
|
|
||||||
Runs the ``relaySMTP.exe`` program on the target server. ``relaySMTP.exe``
|
|
||||||
must exist on your home computer.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.relaysmtp("foodnstuff");
|
|
@ -1,17 +0,0 @@
|
|||||||
renamePurchasedServer() Netscript Function
|
|
||||||
===================================
|
|
||||||
|
|
||||||
.. js:function:: renamePurchasedServer(hostname, newName)
|
|
||||||
|
|
||||||
:RAM cost: 2 GB
|
|
||||||
:param string hostname: Hostname of the purchased server.
|
|
||||||
:param string newName: New name for the given server.
|
|
||||||
:returns: ``true`` if the renaming was succesful.
|
|
||||||
|
|
||||||
Renames the purchased server with the specified ``hostname`` to have the new name ``newName``.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.renamePurchasedServer("server", "old_server");
|
|
@ -1,28 +0,0 @@
|
|||||||
resizeTail() Netscript Function
|
|
||||||
===============================
|
|
||||||
|
|
||||||
.. js:function:: resizeTail(width, heigth[, pid = current script])
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
|
|
||||||
:param number width: Width of the window.
|
|
||||||
:param number heigth: Heigth of the window.
|
|
||||||
:param number pid: PID of the script of which tail window to resize. Defaults to current script.
|
|
||||||
|
|
||||||
resizes the tail window to the specified size.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
Due to inner workings, something has to be awaited between opening a tail window and moving or resizing it.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
//open tail
|
|
||||||
ns.tail();
|
|
||||||
await ns.sleep(0);
|
|
||||||
|
|
||||||
//move the tail close to top left corner and make it big
|
|
||||||
ns.moveTail(10, 10);
|
|
||||||
ns.resizeTail(780, 510)
|
|
@ -1,19 +0,0 @@
|
|||||||
rm() Netscript Function
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. js:function:: rm(Filename [,hostname = current hostname])
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
|
|
||||||
:param string Filename: Name of the file to be deleted.
|
|
||||||
:param string hostname: Hostname of the target server.
|
|
||||||
|
|
||||||
Delete a file on the given server.
|
|
||||||
|
|
||||||
.. warning!:: There is no safetychecks or recycling bins. Deleted files are lost.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.rm("foo.js");
|
|
@ -1,43 +0,0 @@
|
|||||||
run() Netscript Function
|
|
||||||
========================
|
|
||||||
|
|
||||||
.. js:function:: run(script[, numThreads=1[, args...]])
|
|
||||||
|
|
||||||
:RAM cost: 1 GB
|
|
||||||
:param string script: Filename of script to run
|
|
||||||
:param number numThreads: Optional thread count for new script. Set to 1 by
|
|
||||||
default. Has to be an integer.
|
|
||||||
:param args...:
|
|
||||||
Additional arguments to pass into the new script that is being run. Note
|
|
||||||
that if any arguments are being passed into the new script, then the
|
|
||||||
second argument ``numThreads`` must be filled in with a value.
|
|
||||||
:returns: The process id (PID) of the new process or 0 on failure.
|
|
||||||
|
|
||||||
Run a script as a separate process. This function can only be used to run
|
|
||||||
scripts located on the current server (the server running the script that
|
|
||||||
calls this function).
|
|
||||||
|
|
||||||
.. warning:: Running this function with a ``numThreads`` argument of 0 or
|
|
||||||
less will cause a runtime error.
|
|
||||||
|
|
||||||
The simplest way to use the :doc:`run<run>` command is to call it with just
|
|
||||||
the script name. The following example will run ``foo.js``
|
|
||||||
single-threaded with no arguments:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.run("foo.js");
|
|
||||||
|
|
||||||
The following example will run 'foo.js' but with 5 threads instead of
|
|
||||||
single-threaded:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.run("foo.js", 5);
|
|
||||||
|
|
||||||
This next example will run ``foo.js`` single-threaded, and will pass the
|
|
||||||
string ``foodnstuff`` into the script as an argument:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.run("foo.sj", 1, 'foodnstuff');
|
|
@ -1,15 +0,0 @@
|
|||||||
scan() Netscript Function
|
|
||||||
=========================
|
|
||||||
|
|
||||||
.. js:function:: scan(hostname = current hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.2 GB
|
|
||||||
:param string hostname: Hostname of the server to scan.
|
|
||||||
:returns: array of strings of all the host directly connected to the target
|
|
||||||
server.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.scan("home"); // returns: ["foodnstuff", "sigma-cosmetics", "joesguns", "hong-fang-tea", "harakiri-sushi", "iron-gym"]
|
|
@ -1,33 +0,0 @@
|
|||||||
scp() Netscript Function
|
|
||||||
========================
|
|
||||||
|
|
||||||
.. js:function:: scp(files, destination [, source = current hostname])
|
|
||||||
|
|
||||||
:RAM cost: 0.6 GB
|
|
||||||
:param string/array files: Filename or an array of filenames of script/literature files to copy
|
|
||||||
:param string destination: Hostname of the destination server, which is the server to which the file will be copied.
|
|
||||||
:param string source:
|
|
||||||
Hostname of the source server, which is the server from which the file will be copied.
|
|
||||||
This argument is optional and if it's omitted the source will be the current server.
|
|
||||||
:returns: ``true`` if the copy was a success.
|
|
||||||
|
|
||||||
Copies a script or literature (.lit) file(s) to another server. The
|
|
||||||
``files`` argument can be either a string specifying a single file to copy,
|
|
||||||
or an array of strings specifying multiple files to copy.
|
|
||||||
|
|
||||||
If the ``files`` argument is an array then this function will return true if
|
|
||||||
at least one of the files in the array is successfully copied.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
//Copies "hack-template.script" from the current server to "foodnstuff"
|
|
||||||
ns.scp("hack-template.script", "foodnstuff"); // returns: true
|
|
||||||
|
|
||||||
//Copies "foo.lit" from the helios server to the "home" computer
|
|
||||||
ns.scp("foo.lit", "home", "helios"); // returns: true
|
|
||||||
|
|
||||||
//Tries to copy three files from "rothman-uni" to "home" computer
|
|
||||||
const files = ["foo1.lit", "foo2.script", "foo3.script"];
|
|
||||||
ns.scp(files, "home", "rothman-uni"); // returns: true
|
|
@ -1,18 +0,0 @@
|
|||||||
scriptKill() Netscript Function
|
|
||||||
===============================
|
|
||||||
|
|
||||||
.. js:function:: scriptKill(scriptname, hostname)
|
|
||||||
|
|
||||||
:RAM cost: 1 GB
|
|
||||||
:param string scriptname: Filename of script to kill. case-sensitive.
|
|
||||||
:param string hostname: Hostname of target server.
|
|
||||||
:returns: ``true`` if any scripts were killed.
|
|
||||||
|
|
||||||
Kills all scripts with the specified filename on the target server specified
|
|
||||||
by ``hostname``, regardless of arguments.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.scriptKill("demo.js", "home"); // returns: true
|
|
@ -1,30 +0,0 @@
|
|||||||
scriptRunning() Netscript Function
|
|
||||||
==================================
|
|
||||||
|
|
||||||
.. js:function:: scriptRunning(scriptname, hostname)
|
|
||||||
|
|
||||||
:RAM cost: 1 GB
|
|
||||||
:param string scriptname: Filename of script to check. case-sensitive.
|
|
||||||
:param string hostname: Hostname of target server.
|
|
||||||
:returns: ``true`` if any script with that file name is running on that
|
|
||||||
server.
|
|
||||||
|
|
||||||
This is different than the :doc:`isRunning<isRunning>` function because it
|
|
||||||
does not try to identify a specific instance of a running script by its
|
|
||||||
arguments.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
The example below will return true if there is any script named
|
|
||||||
``foo.js`` running on the ``foodnstuff`` server, and false otherwise:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.scriptRunning("foo.js", "foodnstuff");
|
|
||||||
|
|
||||||
The example below will return true if there is any script named
|
|
||||||
``foo.js`` running on the current server, and false otherwise:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.scriptRunning("foo.js", ns.getHostname());
|
|
@ -1,14 +0,0 @@
|
|||||||
serverExists() Netscript Function
|
|
||||||
=================================
|
|
||||||
|
|
||||||
.. js:function:: serverExists(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.1 GB
|
|
||||||
:param string hostname: Hostname of target server.
|
|
||||||
:returns: ``true`` if the target server exists.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.serverExists("foodnstuff"); // returns: true
|
|
@ -1,14 +0,0 @@
|
|||||||
share() Netscript Function
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. js:function:: share()
|
|
||||||
|
|
||||||
:RAM cost: 2.4 GB
|
|
||||||
|
|
||||||
Increases your rep gain of all faction work types while share is called. Scales with thread count.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
while(true) await ns.share();
|
|
@ -1,15 +0,0 @@
|
|||||||
sleep() Netscript Function
|
|
||||||
==========================
|
|
||||||
|
|
||||||
.. js:function:: sleep([n = 0])
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
:param number n: Number of milliseconds to sleep
|
|
||||||
|
|
||||||
Suspends the script for n milliseconds.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
await ns.sleep(3000); // Will wait 3 seconds.
|
|
@ -1,25 +0,0 @@
|
|||||||
spawn() Netscript Function
|
|
||||||
==========================
|
|
||||||
|
|
||||||
.. js:function:: spawn(script[, numThreads = 1[, args...]])
|
|
||||||
|
|
||||||
:RAM cost: 2 GB
|
|
||||||
:param string script: Filename of script to execute
|
|
||||||
:param number numThreads: Number of threads to spawn new script with. Has to be an integer.
|
|
||||||
:param args...:
|
|
||||||
Additional arguments to pass into the new script that is being run.
|
|
||||||
|
|
||||||
Terminates the current script, and then after a delay of about 10 seconds it
|
|
||||||
will execute the newly-specified script. The purpose of this function is to
|
|
||||||
execute a new script without being constrained by the RAM usage of the
|
|
||||||
current one. This function can only be used to run scripts on the local
|
|
||||||
server.
|
|
||||||
|
|
||||||
.. warning:: Running this function with a ``numThreads`` argument of 0 or
|
|
||||||
less will cause a runtime error.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.spawn('foo.js', 10, 'foodnstuff', 90); // "run foo.js foodnstuff 90 -t 10" in 10 seconds.
|
|
@ -1,16 +0,0 @@
|
|||||||
sqlinject() Netscript Function
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. js:function:: sqlinject(hostname)
|
|
||||||
|
|
||||||
:RAM cost: 0.05 GB
|
|
||||||
:param string hostname: Hostname of the target server.
|
|
||||||
|
|
||||||
Runs the ``SQLInject.exe`` program on the target server. ``SQLInject.exe``
|
|
||||||
must exist on your home computer.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.sqlinject("foodnstuff");
|
|
@ -1,19 +0,0 @@
|
|||||||
tFormat() Netscript Function
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. js:function:: tFormat(milliseconds[, milliPrecision = false])
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
|
|
||||||
:param string milliseconds: Number of millisecond to format.
|
|
||||||
:param boolean milliPrecision: Format time with subsecond precision.
|
|
||||||
:returns: Formatted string.
|
|
||||||
|
|
||||||
Format time to a readable string.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.print(ns.tFormat(123456789)) //logs "1 day 10 hours 17 minutes 36 seconds"
|
|
||||||
ns.print(ns.tFormat(123456789,true)) //logs "1 day 10 hours 17 minutes 36.789 seconds"
|
|
@ -1,34 +0,0 @@
|
|||||||
tail() Netscript Function
|
|
||||||
===============================
|
|
||||||
|
|
||||||
.. js:function:: tail([script, hostname[, numThreads=1[, args...]]])
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
|
|
||||||
:param string script: Filename of the script of which to open the logs.
|
|
||||||
:param string hostname: Hostname of the server on which the script is running on.
|
|
||||||
:param args...: Arguments to identify which script's log to open.
|
|
||||||
|
|
||||||
Opens a script’s logs. This is functionally the same as the tail Terminal command.
|
|
||||||
|
|
||||||
If the function is called with no arguments, it will open the current script’s logs.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.tail("foo.js", "foodnstuff");
|
|
||||||
ns.tail();
|
|
||||||
|
|
||||||
.. js:function:: tail(scriptPid)
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
:param number scriptPid: PID of the script of which to open the logs.
|
|
||||||
|
|
||||||
Same as the above version but with pid.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.tail(12);
|
|
@ -1,16 +0,0 @@
|
|||||||
tprint() Netscript Function
|
|
||||||
===========================
|
|
||||||
|
|
||||||
.. js:function:: tprint(args...)
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
:param args: Values to be printed
|
|
||||||
|
|
||||||
Prints any number of values to the Terminal.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
ns.tprint("Hello world!"); // Prints "Hello world!" to the terminal.
|
|
||||||
ns.tprint({a:5}); // Prints '{"a":5}' to the terminal.
|
|
@ -1,27 +0,0 @@
|
|||||||
upgradePurchasedServer() Netscript Function
|
|
||||||
===================================
|
|
||||||
|
|
||||||
.. js:function:: upgradePurchasedServer(hostname, ram)
|
|
||||||
|
|
||||||
:RAM cost: 0.25 GB
|
|
||||||
:param string hostname: Hostname of the purchased server.
|
|
||||||
:param number ram: Amount of RAM of the purchased server. Must be a power of
|
|
||||||
2. Maximum value of :doc:`getPurchasedServerMaxRam<getPurchasedServerMaxRam>`
|
|
||||||
:returns: ``true`` if the upgrade succeeded.
|
|
||||||
|
|
||||||
Upgrades the purchased server with the specified hostname to have specified amount of RAM.
|
|
||||||
|
|
||||||
The ``hostname`` argument can be any data type, but it will be converted to
|
|
||||||
a string and have whitespace removed. New RAM amount has to be higher than the current RAM
|
|
||||||
and a power of 2. Upgrading a server costs the difference of old RAM server cost and new RAM
|
|
||||||
server cost.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
const ram = 64;
|
|
||||||
const name = "pserv-";
|
|
||||||
for (const i = 0; i < 5; ++i) {
|
|
||||||
ns.upgradePurchasedServer(name + i, ram);
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
weaken() Netscript Function
|
|
||||||
===========================
|
|
||||||
|
|
||||||
.. js:function:: weaken(hostname[, opts={}])
|
|
||||||
|
|
||||||
:RAM cost: 0.15 GB
|
|
||||||
:param string hostname: Hostname of the target server to weaken.
|
|
||||||
:param object opts: Optional parameters for configuring function behavior. Properties:
|
|
||||||
|
|
||||||
* threads (*number*) - Number of threads to use for this function.
|
|
||||||
Must be less than or equal to the number of threads the script is running with.
|
|
||||||
:returns: The amount by which the target server's security level was
|
|
||||||
decreased. This is equivalent to 0.05 multiplied by the number of script
|
|
||||||
threads.
|
|
||||||
|
|
||||||
Use your hacking skills to attack a server's security, lowering the server's
|
|
||||||
security level. The runtime for this command depends on your hacking level
|
|
||||||
and the target server's security level. This function lowers the security
|
|
||||||
level of the target server by 0.05.
|
|
||||||
|
|
||||||
Like :doc:`hack<hack>` and :doc:`grow<grow>`, :doc:`weaken<weaken>` can be
|
|
||||||
called on any server, regardless of where the script is running. This
|
|
||||||
command requires root access to the target server, but there is no required
|
|
||||||
hacking level to run the command.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
await ns.weaken("foodnstuff");
|
|
||||||
await ns.weaken("foodnstuff", { threads: 5 }); // Only use 5 threads to weaken
|
|
@ -1,12 +0,0 @@
|
|||||||
getCoreUpgradeCost() Netscript Function
|
|
||||||
=======================================
|
|
||||||
|
|
||||||
.. js:function:: getCoreUpgradeCost(i, n)
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
:param number i: Index of Hacknet Node. :ref:`See here for details <netscript_hacknetnodeapi_referencingahacknetnode>`
|
|
||||||
:param number n: Number of times to upgrade cores. Must be positive. Rounded to nearest integer
|
|
||||||
:returns: Cost of upgrading the number of cores of the specified Hacknet Node by ``n``.
|
|
||||||
|
|
||||||
If an invalid value for ``n`` is provided, then this function returns ``0``. If the
|
|
||||||
specified Hacknet Node is already at the max number of cores, then ``Infinity`` is returned.
|
|
@ -1,12 +0,0 @@
|
|||||||
getLevelUpgradeCost() Netscript Function
|
|
||||||
========================================
|
|
||||||
|
|
||||||
.. js:function:: getLevelUpgradeCost(i, n)
|
|
||||||
|
|
||||||
:RAM cost: 0 GB
|
|
||||||
:param number i: Index of Hacknet Node. :ref:`See here for details <netscript_hacknetnodeapi_referencingahacknetnode>`
|
|
||||||
:param number n: Number of levels to upgrade. Must be positive. Rounded to nearest integer
|
|
||||||
:returns: Cost of upgrading the specified Hacknet Node by ``n`` levels.
|
|
||||||
|
|
||||||
If an invalid value for ``n`` is provided, then this function returns ``0``. If the
|
|
||||||
specified Hacknet Node is already at max level, then ``Infinity`` is returned.
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user