Compare commits

...

40 Commits

Author SHA1 Message Date
Snarling 3162fd2590 RELEASE: Fix release version name 2026-05-17 02:29:08 -04:00
Snarling 783aa36b72 Fix version name
Oops
2026-05-17 02:26:20 -04:00
Snarling 20c2eff528 3.0.1 release (#2774) 2026-05-17 02:14:22 -04:00
David Walker 5a9df19e51 One more changelog update (#2773) 2026-05-16 18:50:38 -07:00
Mathekatze 0257a37b9e NETSCRIPT: allow getFunctionRamCost to get base RAM cost for scripts (#2771) 2026-05-16 18:37:58 -07:00
catloversg 6fcdb46888 DOCUMENTATION: Clarify ns.scp and ns.isRunning (#2769) 2026-05-16 11:52:14 -07:00
catloversg 42a3cbfa47 BLADEBURNER: Do not decrease player reputation when failing actions (#2768) 2026-05-16 11:51:02 -07:00
catloversg a46dd5df80 DARKNET: Ensure induceServerMigration moves servers randomly (#2767) 2026-05-16 11:49:20 -07:00
catloversg 8e9dff3579 MISC: Update changelog (#2764) 2026-05-14 13:36:25 +07:00
catloversg 19cedfd817 BUGFIX: Duplicate .lit and .cache files can be generated in dnet (#2763) 2026-05-13 22:49:30 -07:00
catloversg c496ca7831 MISC: Temporarily remove servers with unusual hostnames (#2757) 2026-05-13 10:32:47 -07:00
gmcew a1e191a1d1 CCT: Follow up to #2603 (#2759)
* CCT: Follow up to #2603

In #2603 we rebalanced ccts to spawn 3x more of them, and reduce the rewards by the same fact of 3.

The hash exchange multipliers were unchanged, resulting in a 3x nerf to hashnet's cct generation.

In this PR i change the cost per level to (almost) a third of the current cost - noting 200/3 is ugly and no other scale changes by a non factor of 10 currently. It could be `70` instead of `65`, but I feel this slight buff is not excessive for being a closer "round value". Another alternative is to spawn 3x ccts at once, and change the description too.

I chose this option as the least "invasive" to player perceptions.

* Feedback
2026-05-13 10:31:52 -07:00
Sai Asish Y 0d18ac80fe BUGFIX: getAugmentationBasePrice ignores bitnode mult for SoA augs (#2756) 2026-05-13 10:29:39 -07:00
Naga 99cdd80fa1 API: Reduce the RAM cost of ns.rm() to match ns.scp() (#2761)
* API: Reduce the RAM cost of `ns.rm()` to match `ns.scp`

* Fix: Run 'doc'
2026-05-13 10:26:12 -07:00
catloversg 021bcd9351 MISC: Harden saving to avoid save data corruption (#2755) 2026-05-13 10:24:06 -07:00
Michael Ficocelli 3acdf019f8 DNET: simplify getServer return type; add all missing dnet properties to getServerAuthDetails (#2746) 2026-05-12 16:22:25 -07:00
gmcew 00f0756a59 DOC: Augmentation description spelling (#2760)
Per title; fixed some spelling, hyphen and apostrophe usage. Some words are pseudo-sci-fi so I've left hyphenation/spacing untouched there.
2026-05-12 16:04:04 -07:00
catloversg b2a9aaf350 API: Change getDarkwebPrograms return type to ProgramName[] (#2754) 2026-05-11 19:20:08 -07:00
catloversg 9ea1ec0f28 MISC: Support angle bracket type assertions in RAM calculation (#2751) 2026-05-09 23:59:39 -07:00
catloversg b79d5b1017 DARKNET: Prevent generating malformed darknet server hostname (#2744) 2026-05-09 16:18:19 -07:00
Berdes 0fe28a9fea DOC: remove spoiler for Offline scripts and bonus time page and make it accessible early-game (#2749)
* DOC: remove spoiler for Offline scripts and bonus time page and make it accessible early-game

It was suggested in
https://discord.com/channels/415207508303544321/415213435974975508/1501708264147259472

I manually checked that all the modified links work in-game.

* Move the link next to another non-spoiler link
2026-05-09 16:12:33 -07:00
Berdes 8c9635a7a8 DOC: Remove non-existent influence namespace in Darknet documentation (#2748)
Mentioned in
https://discord.com/channels/415207508303544321/415213413745164318/1501709972705378336
2026-05-09 16:08:58 -07:00
Michael Ficocelli a7f54ea152 DNET: Fix money mults on hard nodes (#2743) 2026-05-07 16:18:49 -07:00
gmcew b9699c2a95 UI: Break out Darknet BN and player mults as separate entries (#2745)
On the stats page, this change separates Darknet mults from crime in player mults, and additionally includes the BN mults for Darknet.
2026-05-07 16:14:31 -07:00
Mads Ahlquist Jensen 7dd06b5b37 Add HJKL key mappings for infiltration arrows (#2742) 2026-05-07 15:36:27 -07:00
catloversg eb431145ee UI: Show hints of Gang mechanic in pre-endgame (#2723) 2026-05-06 15:22:43 -07:00
Andrey Andreyevich Bienkowski 2ab144cff2 CLI: Add new command to upload a directory (#2659) 2026-05-06 15:20:42 -07:00
catloversg 7c6d147ff7 BUGFIX: Player can switch tabs without losing focus on current work (#2724) 2026-05-06 15:11:30 -07:00
catloversg 4ee26edb85 MISC: Update game version (#2732) 2026-05-06 15:07:36 -07:00
catloversg a99197a9ea BUGFIX: Tutorial links to outdated faq url (#2733) 2026-05-06 15:06:58 -07:00
catloversg c616ba3b46 DARKNET: Fix typo in authentication response message (#2734) 2026-05-06 15:05:50 -07:00
catloversg a7b34b110c DOCUMENTATION: Fix incorrect cloud API example (#2738) 2026-05-06 14:30:48 -07:00
Michael Ficocelli 15a67d0156 DNET: Cache reward fixes (#2731) 2026-05-05 15:56:02 -07:00
CTN 530392eeee DOC: Update list of RFA community tools (#2722) 2026-05-05 15:53:25 -07:00
catloversg 2ef68d31ae MISC: Cancel faction work instead of finishing it when creating gang (#2726) 2026-05-04 15:24:08 -07:00
catloversg ec307241e0 CODEBASE: Remove duplicate getStockFromSymbol function (#2725) 2026-05-04 14:31:20 -07:00
Michael Ficocelli d324a93bac DNET: Remove TS type annotation from doc example script (#2721) 2026-05-04 14:29:52 -07:00
Snarling d3bdfc44a4 WORKFLOWS: Update action versions
Missed one
2026-05-02 02:05:21 -04:00
Snarling 0fb913d158 WORKFLOWS: Update action versions (#2718) 2026-05-02 01:58:38 -04:00
Snarling 63c3993995 Initial changes for 3.0.1 dev cycle (#2716) 2026-05-01 23:15:47 -04:00
135 changed files with 1745 additions and 1959 deletions
+11 -11
View File
@@ -22,11 +22,11 @@ jobs:
name: Build Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.git-sha || inputs.git-sha || github.sha }}
- name: Use Node.js 24
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 24
cache: "npm"
@@ -39,14 +39,14 @@ jobs:
shell: bash
run: npm run electron-win
- name: Upload x64 artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: bitburner-win32-x64
include-hidden-files: true
path: .build/bitburner-win32-x64/*
if-no-files-found: error
- name: Upload arm64 artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: bitburner-win32-arm64
include-hidden-files: true
@@ -57,11 +57,11 @@ jobs:
name: Build Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.git-sha || inputs.git-sha || github.sha }}
- name: Use Node.js 24
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 24
cache: "npm"
@@ -72,14 +72,14 @@ jobs:
- name: Build the Electron app
run: npm run electron-linux
- name: Upload x64 artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: bitburner-linux-x64
include-hidden-files: true
path: .build/bitburner-linux-x64/*
if-no-files-found: error
- name: Upload arm64 artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: bitburner-linux-arm64
include-hidden-files: true
@@ -90,11 +90,11 @@ jobs:
name: Build macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.git-sha || inputs.git-sha || github.sha }}
- name: Use Node.js 24
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 24
cache: "npm"
@@ -105,7 +105,7 @@ jobs:
- name: Build the Electron app
run: npm run electron-mac
- name: Upload darwin-universal artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: bitburner-darwin-universal
include-hidden-files: true
+2 -2
View File
@@ -19,9 +19,9 @@ jobs:
contents: write
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Download artifacts
uses: actions/download-artifact@v7
uses: actions/download-artifact@v8
with:
path: .build
pattern: bitburner-*
+4 -4
View File
@@ -25,8 +25,8 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
- run: npm ci
@@ -38,9 +38,9 @@ jobs:
else
npm run build
fi
- uses: actions/upload-pages-artifact@v3
- uses: actions/upload-pages-artifact@v5
with:
path: ".app"
- name: Deploy to gh pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "bitburner",
"version": "3.0.0",
"version": "3.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "bitburner",
"version": "3.0.0",
"version": "3.0.1",
"dependencies": {
"@catloversg/steamworks.js": "0.0.3",
"arg": "^5.0.2",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "bitburner",
"version": "3.0.0",
"version": "3.0.1",
"description": "A cyberpunk-themed programming incremental game",
"main": "main.js",
"author": "Daniel Xie, hydroflame, et al.",
@@ -1,60 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Darknet](./bitburner.darknet.md) &gt; [getServerAuthDetails](./bitburner.darknet.getserverauthdetails.md)
## Darknet.getServerAuthDetails() method
Returns the server's authentication protocol details.
**Signature:**
```typescript
getServerAuthDetails(host?: string): ServerAuthDetails & { isOnline: boolean };
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
host
</td><td>
string
</td><td>
_(Optional)_ Hostname/IP of the server to analyze. Defaults to the running script's server if not specified.
</td></tr>
</tbody></table>
**Returns:**
[ServerAuthDetails](./bitburner.serverauthdetails.md) &amp; { isOnline: boolean }
An object containing the server's authentication protocol details.
## Remarks
RAM cost: 0.1 GB
@@ -0,0 +1,62 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Darknet](./bitburner.darknet.md) &gt; [getServerDetails](./bitburner.darknet.getserverdetails.md)
## Darknet.getServerDetails() method
Returns the darknet-specific details of the server.
If the darknet server has recently gone offline, the returned object will be a dummy server object with `isOnline: false`<!-- -->.
**Signature:**
```typescript
getServerDetails(host?: string): DarknetServerDetails & { isOnline: boolean };
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
host
</td><td>
string
</td><td>
_(Optional)_ Hostname/IP of the server to analyze. Defaults to the running script's server if not specified.
</td></tr>
</tbody></table>
**Returns:**
[DarknetServerDetails](./bitburner.darknetserverdetails.md) &amp; { isOnline: boolean }
An object containing the server's darknet-specific details.
## Remarks
RAM cost: 0.1 GB
+4 -2
View File
@@ -96,12 +96,14 @@ Returns -1 if the server is offline, not found, or not a darkweb server.
</td></tr>
<tr><td>
[getServerAuthDetails(host)](./bitburner.darknet.getserverauthdetails.md)
[getServerDetails(host)](./bitburner.darknet.getserverdetails.md)
</td><td>
Returns the server's authentication protocol details.
Returns the darknet-specific details of the server.
If the darknet server has recently gone offline, the returned object will be a dummy server object with `isOnline: false`<!-- -->.
</td></tr>
@@ -9,7 +9,12 @@ Gets the time it will take to authenticate a server.
**Signature:**
```typescript
getAuthenticateTime(darknetServerData: DarknetServerData, threads?: number, player?: Person): number;
getAuthenticateTime(
serverDetails: DarknetServerDetails,
threads?: number,
player?: Person,
correctCharactersInPassword?: number,
): number;
```
## Parameters
@@ -32,12 +37,12 @@ Description
</th></tr></thead>
<tbody><tr><td>
darknetServerData
serverDetails
</td><td>
[DarknetServerData](./bitburner.darknetserverdata.md)
[DarknetServerDetails](./bitburner.darknetserverdetails.md)
</td><td>
@@ -77,6 +82,22 @@ player
_(Optional)_ The player object. Optional, defaults to the current player status
</td></tr>
<tr><td>
correctCharactersInPassword
</td><td>
number
</td><td>
_(Optional)_ only used for 2G\_cellular model servers. The number of correct characters in the attempted password. Optional, defaults to 0
</td></tr>
</tbody></table>
@@ -9,7 +9,7 @@ Gets the expected amount off ram that will be freed by a call to dnet.memoryReal
**Signature:**
```typescript
getExpectedRamBlockRemoved(darknetServerData: DarknetServerData, threads?: number, player?: Person): number;
getExpectedRamBlockRemoved(serverDetails: DarknetServerDetails, threads?: number, player?: Person): number;
```
## Parameters
@@ -32,12 +32,12 @@ Description
</th></tr></thead>
<tbody><tr><td>
darknetServerData
serverDetails
</td><td>
[DarknetServerData](./bitburner.darknetserverdata.md)
[DarknetServerDetails](./bitburner.darknetserverdetails.md)
</td><td>
@@ -9,7 +9,7 @@ Gets the time it will take to scrape logs from a server.
**Signature:**
```typescript
getHeartbleedTime(darknetServerData: DarknetServerData, threads?: number, player?: Person): number;
getHeartbleedTime(serverDetails: DarknetServerDetails, threads?: number, player?: Person): number;
```
## Parameters
@@ -32,12 +32,12 @@ Description
</th></tr></thead>
<tbody><tr><td>
darknetServerData
serverDetails
</td><td>
[DarknetServerData](./bitburner.darknetserverdata.md)
[DarknetServerDetails](./bitburner.darknetserverdetails.md)
</td><td>
+3 -3
View File
@@ -27,7 +27,7 @@ Description
</th></tr></thead>
<tbody><tr><td>
[getAuthenticateTime(darknetServerData, threads, player)](./bitburner.darknetformulas.getauthenticatetime.md)
[getAuthenticateTime(serverDetails, threads, player, correctCharactersInPassword)](./bitburner.darknetformulas.getauthenticatetime.md)
</td><td>
@@ -38,7 +38,7 @@ Gets the time it will take to authenticate a server.
</td></tr>
<tr><td>
[getExpectedRamBlockRemoved(darknetServerData, threads, player)](./bitburner.darknetformulas.getexpectedramblockremoved.md)
[getExpectedRamBlockRemoved(serverDetails, threads, player)](./bitburner.darknetformulas.getexpectedramblockremoved.md)
</td><td>
@@ -49,7 +49,7 @@ Gets the expected amount off ram that will be freed by a call to dnet.memoryReal
</td></tr>
<tr><td>
[getHeartbleedTime(darknetServerData, threads, player)](./bitburner.darknetformulas.getheartbleedtime.md)
[getHeartbleedTime(serverDetails, threads, player)](./bitburner.darknetformulas.getheartbleedtime.md)
</td><td>
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [backdoorInstalled](./bitburner.darknetserverdata.backdoorinstalled.md)
## DarknetServerData.backdoorInstalled property
Flag indicating whether this server has a backdoor installed by the player
**Signature:**
```typescript
backdoorInstalled: boolean;
```
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [cpuCores](./bitburner.darknetserverdata.cpucores.md)
## DarknetServerData.cpuCores property
Number of CPU cores
**Signature:**
```typescript
cpuCores: number;
```
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [hasAdminRights](./bitburner.darknetserverdata.hasadminrights.md)
## DarknetServerData.hasAdminRights property
Flag indicating whether the player has admin/root access to this server
**Signature:**
```typescript
hasAdminRights: boolean;
```
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [hasStasisLink](./bitburner.darknetserverdata.hasstasislink.md)
## DarknetServerData.hasStasisLink property
If the server has a stasis link applied
**Signature:**
```typescript
hasStasisLink: boolean;
```
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [hostname](./bitburner.darknetserverdata.hostname.md)
## DarknetServerData.hostname property
Hostname. Must be unique
**Signature:**
```typescript
hostname: string;
```
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [ip](./bitburner.darknetserverdata.ip.md)
## DarknetServerData.ip property
IP Address. Must be unique
**Signature:**
```typescript
ip: string;
```
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [isConnectedTo](./bitburner.darknetserverdata.isconnectedto.md)
## DarknetServerData.isConnectedTo property
Flag indicating whether the player's terminal is currently connected to this server
**Signature:**
```typescript
isConnectedTo: boolean;
```
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [logTrafficInterval](./bitburner.darknetserverdata.logtrafficinterval.md)
## DarknetServerData.logTrafficInterval property
The interval at which the server periodically adds to its logs, in seconds.
**Signature:**
```typescript
logTrafficInterval: number;
```
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [maxRam](./bitburner.darknetserverdata.maxram.md)
## DarknetServerData.maxRam property
Max RAM (GB) of this server
**Signature:**
```typescript
maxRam: number;
```
-400
View File
@@ -1,400 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md)
## DarknetServerData interface
Darknet server data.
**Signature:**
```typescript
export interface DarknetServerData
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[backdoorInstalled](./bitburner.darknetserverdata.backdoorinstalled.md)
</td><td>
</td><td>
boolean
</td><td>
Flag indicating whether this server has a backdoor installed by the player
</td></tr>
<tr><td>
[blockedRam](./bitburner.darknetserverdata.blockedram.md)
</td><td>
</td><td>
number
</td><td>
The amount of ram blocked by the server owner
</td></tr>
<tr><td>
[cpuCores](./bitburner.darknetserverdata.cpucores.md)
</td><td>
</td><td>
number
</td><td>
Number of CPU cores
</td></tr>
<tr><td>
[depth](./bitburner.darknetserverdata.depth.md)
</td><td>
</td><td>
number
</td><td>
The depth of the server in the net
</td></tr>
<tr><td>
[difficulty](./bitburner.darknetserverdata.difficulty.md)
</td><td>
</td><td>
number
</td><td>
The difficulty rating of the server, associated with its original depth in the net
</td></tr>
<tr><td>
[hasAdminRights](./bitburner.darknetserverdata.hasadminrights.md)
</td><td>
</td><td>
boolean
</td><td>
Flag indicating whether the player has admin/root access to this server
</td></tr>
<tr><td>
[hasStasisLink](./bitburner.darknetserverdata.hasstasislink.md)
</td><td>
</td><td>
boolean
</td><td>
If the server has a stasis link applied
</td></tr>
<tr><td>
[hostname](./bitburner.darknetserverdata.hostname.md)
</td><td>
</td><td>
string
</td><td>
Hostname. Must be unique
</td></tr>
<tr><td>
[ip](./bitburner.darknetserverdata.ip.md)
</td><td>
</td><td>
string
</td><td>
IP Address. Must be unique
</td></tr>
<tr><td>
[isConnectedTo](./bitburner.darknetserverdata.isconnectedto.md)
</td><td>
</td><td>
boolean
</td><td>
Flag indicating whether the player's terminal is currently connected to this server
</td></tr>
<tr><td>
[isStationary](./bitburner.darknetserverdata.isstationary.md)
</td><td>
</td><td>
boolean
</td><td>
If this darknet server cannot be moved. True for fixed/story servers.
</td></tr>
<tr><td>
[logTrafficInterval](./bitburner.darknetserverdata.logtrafficinterval.md)
</td><td>
</td><td>
number
</td><td>
The interval at which the server periodically adds to its logs, in seconds.
</td></tr>
<tr><td>
[maxRam](./bitburner.darknetserverdata.maxram.md)
</td><td>
</td><td>
number
</td><td>
Max RAM (GB) of this server
</td></tr>
<tr><td>
[modelId](./bitburner.darknetserverdata.modelid.md)
</td><td>
</td><td>
string
</td><td>
The model of the server. Similar models have similar vulnerabilities. The model list is intentionally undocumented. You are supposed to experiment and discover the models.
</td></tr>
<tr><td>
[passwordHintData](./bitburner.darknetserverdata.passwordhintdata.md)
</td><td>
</td><td>
string
</td><td>
Data associated with the password hint
</td></tr>
<tr><td>
[purchasedByPlayer](./bitburner.darknetserverdata.purchasedbyplayer.md)
</td><td>
</td><td>
boolean
</td><td>
Whether this server was purchased by the player. Always false for darknet servers
</td></tr>
<tr><td>
[ramUsed](./bitburner.darknetserverdata.ramused.md)
</td><td>
</td><td>
number
</td><td>
Used RAM (GB). i.e. unavailable RAM
</td></tr>
<tr><td>
[requiredCharismaSkill](./bitburner.darknetserverdata.requiredcharismaskill.md)
</td><td>
</td><td>
number
</td><td>
The charisma skill required to heartbleed the server
</td></tr>
<tr><td>
[staticPasswordHint](./bitburner.darknetserverdata.staticpasswordhint.md)
</td><td>
</td><td>
string
</td><td>
The generic password prompt for the server
</td></tr>
</tbody></table>
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [passwordHintData](./bitburner.darknetserverdata.passwordhintdata.md)
## DarknetServerData.passwordHintData property
Data associated with the password hint
**Signature:**
```typescript
passwordHintData: string;
```
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [purchasedByPlayer](./bitburner.darknetserverdata.purchasedbyplayer.md)
## DarknetServerData.purchasedByPlayer property
Whether this server was purchased by the player. Always false for darknet servers
**Signature:**
```typescript
purchasedByPlayer: boolean;
```
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [ramUsed](./bitburner.darknetserverdata.ramused.md)
## DarknetServerData.ramUsed property
Used RAM (GB). i.e. unavailable RAM
**Signature:**
```typescript
ramUsed: number;
```
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [requiredCharismaSkill](./bitburner.darknetserverdata.requiredcharismaskill.md)
## DarknetServerData.requiredCharismaSkill property
The charisma skill required to heartbleed the server
**Signature:**
```typescript
requiredCharismaSkill: number;
```
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [staticPasswordHint](./bitburner.darknetserverdata.staticpasswordhint.md)
## DarknetServerData.staticPasswordHint property
The generic password prompt for the server
**Signature:**
```typescript
staticPasswordHint: string;
```
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [blockedRam](./bitburner.darknetserverdata.blockedram.md)
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerDetails](./bitburner.darknetserverdetails.md) &gt; [blockedRam](./bitburner.darknetserverdetails.blockedram.md)
## DarknetServerData.blockedRam property
## DarknetServerDetails.blockedRam property
The amount of ram blocked by the server owner
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerDetails](./bitburner.darknetserverdetails.md) &gt; [data](./bitburner.darknetserverdetails.data.md)
## DarknetServerDetails.data property
Data from the passwordHint, if any.
**Signature:**
```typescript
data: string;
```
@@ -1,10 +1,10 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [depth](./bitburner.darknetserverdata.depth.md)
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerDetails](./bitburner.darknetserverdetails.md) &gt; [depth](./bitburner.darknetserverdetails.depth.md)
## DarknetServerData.depth property
## DarknetServerDetails.depth property
The depth of the server in the net
The current depth in the darknet of the server
**Signature:**
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [difficulty](./bitburner.darknetserverdata.difficulty.md)
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerDetails](./bitburner.darknetserverdetails.md) &gt; [difficulty](./bitburner.darknetserverdetails.difficulty.md)
## DarknetServerData.difficulty property
## DarknetServerDetails.difficulty property
The difficulty rating of the server, associated with its original depth in the net
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [ServerAuthDetails](./bitburner.serverauthdetails.md) &gt; [hasSession](./bitburner.serverauthdetails.hassession.md)
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerDetails](./bitburner.darknetserverdetails.md) &gt; [hasSession](./bitburner.darknetserverdetails.hassession.md)
## ServerAuthDetails.hasSession property
## DarknetServerDetails.hasSession property
True if the current script has authenticated to this server with the right password using authenticate() or connectToSesssion()
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerDetails](./bitburner.darknetserverdetails.md) &gt; [isConnectedToCurrentServer](./bitburner.darknetserverdetails.isconnectedtocurrentserver.md)
## DarknetServerDetails.isConnectedToCurrentServer property
True if the server is directly connected to the current server
**Signature:**
```typescript
isConnectedToCurrentServer: boolean;
```
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [isStationary](./bitburner.darknetserverdata.isstationary.md)
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerDetails](./bitburner.darknetserverdetails.md) &gt; [isStationary](./bitburner.darknetserverdetails.isstationary.md)
## DarknetServerData.isStationary property
## DarknetServerDetails.isStationary property
If this darknet server cannot be moved. True for fixed/story servers.
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [ServerAuthDetails](./bitburner.serverauthdetails.md) &gt; [logTrafficInterval](./bitburner.serverauthdetails.logtrafficinterval.md)
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerDetails](./bitburner.darknetserverdetails.md) &gt; [logTrafficInterval](./bitburner.darknetserverdetails.logtrafficinterval.md)
## ServerAuthDetails.logTrafficInterval property
## DarknetServerDetails.logTrafficInterval property
The frequency (in seconds) of the server adding its own messages to its logs, visible with heartBleed().
+286
View File
@@ -0,0 +1,286 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerDetails](./bitburner.darknetserverdetails.md)
## DarknetServerDetails interface
Details about a darknet server
**Signature:**
```typescript
interface DarknetServerDetails
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[blockedRam](./bitburner.darknetserverdetails.blockedram.md)
</td><td>
</td><td>
number
</td><td>
The amount of ram blocked by the server owner
</td></tr>
<tr><td>
[data](./bitburner.darknetserverdetails.data.md)
</td><td>
</td><td>
string
</td><td>
Data from the passwordHint, if any.
</td></tr>
<tr><td>
[depth](./bitburner.darknetserverdetails.depth.md)
</td><td>
</td><td>
number
</td><td>
The current depth in the darknet of the server
</td></tr>
<tr><td>
[difficulty](./bitburner.darknetserverdetails.difficulty.md)
</td><td>
</td><td>
number
</td><td>
The difficulty rating of the server, associated with its original depth in the net
</td></tr>
<tr><td>
[hasSession](./bitburner.darknetserverdetails.hassession.md)
</td><td>
</td><td>
boolean
</td><td>
True if the current script has authenticated to this server with the right password using authenticate() or connectToSesssion()
</td></tr>
<tr><td>
[isConnectedToCurrentServer](./bitburner.darknetserverdetails.isconnectedtocurrentserver.md)
</td><td>
</td><td>
boolean
</td><td>
True if the server is directly connected to the current server
</td></tr>
<tr><td>
[isStationary](./bitburner.darknetserverdetails.isstationary.md)
</td><td>
</td><td>
boolean
</td><td>
If this darknet server cannot be moved. True for fixed/story servers.
</td></tr>
<tr><td>
[logTrafficInterval](./bitburner.darknetserverdetails.logtrafficinterval.md)
</td><td>
</td><td>
number
</td><td>
The frequency (in seconds) of the server adding its own messages to its logs, visible with heartBleed().
</td></tr>
<tr><td>
[modelId](./bitburner.darknetserverdetails.modelid.md)
</td><td>
</td><td>
string
</td><td>
The model of the server. Similar models have similar vulnerabilities. The model list is intentionally undocumented. You are supposed to experiment and discover the models.
</td></tr>
<tr><td>
[passwordFormat](./bitburner.darknetserverdetails.passwordformat.md)
</td><td>
</td><td>
"numeric" \| "alphabetic" \| "alphanumeric" \| "ASCII" \| "unicode"
</td><td>
The character set used in the password
</td></tr>
<tr><td>
[passwordHint](./bitburner.darknetserverdetails.passwordhint.md)
</td><td>
</td><td>
string
</td><td>
Static password reminder text set for this server.
</td></tr>
<tr><td>
[passwordLength](./bitburner.darknetserverdetails.passwordlength.md)
</td><td>
</td><td>
number
</td><td>
The number of characters in the password
</td></tr>
<tr><td>
[requiredCharismaSkill](./bitburner.darknetserverdetails.requiredcharismaskill.md)
</td><td>
</td><td>
number
</td><td>
The charisma skill required to authenticate on the server
</td></tr>
</tbody></table>
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerData](./bitburner.darknetserverdata.md) &gt; [modelId](./bitburner.darknetserverdata.modelid.md)
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerDetails](./bitburner.darknetserverdetails.md) &gt; [modelId](./bitburner.darknetserverdetails.modelid.md)
## DarknetServerData.modelId property
## DarknetServerDetails.modelId property
The model of the server. Similar models have similar vulnerabilities. The model list is intentionally undocumented. You are supposed to experiment and discover the models.
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [ServerAuthDetails](./bitburner.serverauthdetails.md) &gt; [passwordFormat](./bitburner.serverauthdetails.passwordformat.md)
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerDetails](./bitburner.darknetserverdetails.md) &gt; [passwordFormat](./bitburner.darknetserverdetails.passwordformat.md)
## ServerAuthDetails.passwordFormat property
## DarknetServerDetails.passwordFormat property
The character set used in the password
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerDetails](./bitburner.darknetserverdetails.md) &gt; [passwordHint](./bitburner.darknetserverdetails.passwordhint.md)
## DarknetServerDetails.passwordHint property
Static password reminder text set for this server.
**Signature:**
```typescript
passwordHint: string;
```
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerDetails](./bitburner.darknetserverdetails.md) &gt; [passwordLength](./bitburner.darknetserverdetails.passwordlength.md)
## DarknetServerDetails.passwordLength property
The number of characters in the password
**Signature:**
```typescript
passwordLength: number;
```
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [DarknetServerDetails](./bitburner.darknetserverdetails.md) &gt; [requiredCharismaSkill](./bitburner.darknetserverdetails.requiredcharismaskill.md)
## DarknetServerDetails.requiredCharismaSkill property
The charisma skill required to authenticate on the server
**Signature:**
```typescript
requiredCharismaSkill: number;
```
+2 -13
View File
@@ -382,12 +382,12 @@ Instability of the darknet caused by excessive backdoor-ing of servers.
</td></tr>
<tr><td>
[DarknetServerData](./bitburner.darknetserverdata.md)
[DarknetServerDetails](./bitburner.darknetserverdetails.md)
</td><td>
Darknet server data.
Details about a darknet server
</td></tr>
@@ -1218,17 +1218,6 @@ Various info about resets
A server. Not all servers have all of these properties - optional properties are missing on certain servers.
</td></tr>
<tr><td>
[ServerAuthDetails](./bitburner.serverauthdetails.md)
</td><td>
Details about a server's authentication schema
</td></tr>
<tr><td>
+14 -2
View File
@@ -4,7 +4,9 @@
## NS.getFunctionRamCost() method
Get the ram cost of a netscript function.
Get the RAM cost of a netscript function.
The base RAM cost per script thread can also be retrieved by using `"baseCost"` as argument to this function.
**Signature:**
@@ -42,7 +44,7 @@ string
</td><td>
The fully-qualified function name, without the leading `ns`<!-- -->. Example inputs: `hack`<!-- -->, `tprint`<!-- -->, `stock.getPosition`<!-- -->.
The fully-qualified function name, without the leading `ns`<!-- -->.
</td></tr>
@@ -56,3 +58,13 @@ number
RAM cost: 0 GB
## Example
```js
const RAM_baseCost = ns.getFunctionRamCost('baseCost');
const RAM_for_hack = ns.getFunctionRamCost('hack');
const RAM_for_tprint = ns.getFunctionRamCost('tprint');
const RAM_for_stock_getPosition = ns.getFunctionRamCost('stock.getPosition');
```
+3 -3
View File
@@ -6,12 +6,12 @@
Returns data of a server.
If the server is a darknet server and has recently gone offline, it will return a dummy server object with `isOnline: false`<!-- -->.
If the server is a darknet server, it will also contain the "isOnline" field. If the darknet server has recently gone offline, the returned object will be a dummy server object with `isOnline: false`<!-- -->.
**Signature:**
```typescript
getServer(host?: string): Server | (DarknetServerData & { isOnline: boolean });
getServer(host?: string): Server & { isOnline?: boolean };
```
## Parameters
@@ -52,7 +52,7 @@ _(Optional)_ Optional. Hostname/IP of the server. Defaults to the hostname of th
**Returns:**
[Server](./bitburner.server.md) \| ([DarknetServerData](./bitburner.darknetserverdata.md) &amp; { isOnline: boolean })
[Server](./bitburner.server.md) &amp; { isOnline?: boolean }
Data of the server.
+2 -2
View File
@@ -9,7 +9,7 @@ Check if a script is running.
**Signature:**
```typescript
isRunning(script: FilenameOrPID, host?: string, ...args: ScriptArg[]): boolean;
isRunning(script?: FilenameOrPID, host?: string, ...args: ScriptArg[]): boolean;
```
## Parameters
@@ -42,7 +42,7 @@ script
</td><td>
Filename or PID of script to check. This is case-sensitive.
_(Optional)_ Filename (case-sensitive) or PID of script to check. Optional, default to the current script's pid.
</td></tr>
+4 -2
View File
@@ -718,7 +718,9 @@ Get the metadata of a file.
</td><td>
Get the ram cost of a netscript function.
Get the RAM cost of a netscript function.
The base RAM cost per script thread can also be retrieved by using `"baseCost"` as argument to this function.
</td></tr>
@@ -929,7 +931,7 @@ Get the ram cost of a script.
Returns data of a server.
If the server is a darknet server and has recently gone offline, it will return a dummy server object with `isOnline: false`<!-- -->.
If the server is a darknet server, it will also contain the "isOnline" field. If the darknet server has recently gone offline, the returned object will be a dummy server object with `isOnline: false`<!-- -->.
</td></tr>
+1 -1
View File
@@ -72,7 +72,7 @@ True if it successfully deletes the file, and false otherwise.
## Remarks
RAM cost: 1 GB
RAM cost: 0.6 GB
Removes the specified file from the current server. This function works for every file type except message (.msg) files.
+2 -2
View File
@@ -42,7 +42,7 @@ string \| string\[\]
</td><td>
Filename or an array of filenames of script/literature files to copy. Note that if a file is located in a subdirectory, the filename must include the leading `/`<!-- -->.
Filename or an array of filenames of text/script/literature files to copy. Note that if a file is located in a subdirectory, the filename must include the leading `/`<!-- -->.
</td></tr>
@@ -90,7 +90,7 @@ True if the file is successfully copied over and false otherwise. If the files a
RAM cost: 0.6 GB
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.
Copies text, 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.
## Example 1
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [ServerAuthDetails](./bitburner.serverauthdetails.md) &gt; [data](./bitburner.serverauthdetails.data.md)
## ServerAuthDetails.data property
Data from the passwordHint, if any.
**Signature:**
```typescript
data: string;
```
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [ServerAuthDetails](./bitburner.serverauthdetails.md) &gt; [isConnectedToCurrentServer](./bitburner.serverauthdetails.isconnectedtocurrentserver.md)
## ServerAuthDetails.isConnectedToCurrentServer property
True if the server is directly connected to the current server
**Signature:**
```typescript
isConnectedToCurrentServer: boolean;
```
-191
View File
@@ -1,191 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [ServerAuthDetails](./bitburner.serverauthdetails.md)
## ServerAuthDetails interface
Details about a server's authentication schema
**Signature:**
```typescript
interface ServerAuthDetails
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[data](./bitburner.serverauthdetails.data.md)
</td><td>
</td><td>
string
</td><td>
Data from the passwordHint, if any.
</td></tr>
<tr><td>
[hasSession](./bitburner.serverauthdetails.hassession.md)
</td><td>
</td><td>
boolean
</td><td>
True if the current script has authenticated to this server with the right password using authenticate() or connectToSesssion()
</td></tr>
<tr><td>
[isConnectedToCurrentServer](./bitburner.serverauthdetails.isconnectedtocurrentserver.md)
</td><td>
</td><td>
boolean
</td><td>
True if the server is directly connected to the current server
</td></tr>
<tr><td>
[logTrafficInterval](./bitburner.serverauthdetails.logtrafficinterval.md)
</td><td>
</td><td>
number
</td><td>
The frequency (in seconds) of the server adding its own messages to its logs, visible with heartBleed().
</td></tr>
<tr><td>
[modelId](./bitburner.serverauthdetails.modelid.md)
</td><td>
</td><td>
string
</td><td>
The model ID of the server. Similar models share vulnerabilities.
</td></tr>
<tr><td>
[passwordFormat](./bitburner.serverauthdetails.passwordformat.md)
</td><td>
</td><td>
"numeric" \| "alphabetic" \| "alphanumeric" \| "ASCII" \| "unicode"
</td><td>
The character set used in the password
</td></tr>
<tr><td>
[passwordHint](./bitburner.serverauthdetails.passwordhint.md)
</td><td>
</td><td>
string
</td><td>
Static password reminder text set for this server.
</td></tr>
<tr><td>
[passwordLength](./bitburner.serverauthdetails.passwordlength.md)
</td><td>
</td><td>
number
</td><td>
The number of characters in the password
</td></tr>
</tbody></table>
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [ServerAuthDetails](./bitburner.serverauthdetails.md) &gt; [modelId](./bitburner.serverauthdetails.modelid.md)
## ServerAuthDetails.modelId property
The model ID of the server. Similar models share vulnerabilities.
**Signature:**
```typescript
modelId: string;
```
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [ServerAuthDetails](./bitburner.serverauthdetails.md) &gt; [passwordHint](./bitburner.serverauthdetails.passwordhint.md)
## ServerAuthDetails.passwordHint property
Static password reminder text set for this server.
**Signature:**
```typescript
passwordHint: string;
```
@@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [ServerAuthDetails](./bitburner.serverauthdetails.md) &gt; [passwordLength](./bitburner.serverauthdetails.passwordlength.md)
## ServerAuthDetails.passwordLength property
The number of characters in the password
**Signature:**
```typescript
passwordLength: number;
```
@@ -52,9 +52,11 @@ Name of Augmentation.
number
Base price of the augmentation, before price multiplier.
Base price of the augmentation, before the player's price multiplier.
## Remarks
RAM cost: 2.5 GB \* 16/4/1
This excludes the player's price multiplier, but does include the relevant BitNode multiplier (for all augs that aren't part of Shadows of Anarchy, which doesn't use BitNode multipliers).
@@ -9,11 +9,11 @@ Get a list of programs offered on the dark web.
**Signature:**
```typescript
getDarkwebPrograms(): string[];
getDarkwebPrograms(): ProgramName[];
```
**Returns:**
string\[\]
[ProgramName](./bitburner.programname.md)<!-- -->\[\]
- a list of programs available for purchase on the dark web, or \[\] if Tor has not been purchased
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "bitburner",
"version": "3.0.0",
"version": "3.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "bitburner",
"version": "3.0.0",
"version": "3.0.1",
"hasInstallScript": true,
"license": "SEE LICENSE IN license.txt",
"dependencies": {
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "bitburner",
"license": "SEE LICENSE IN license.txt",
"version": "3.0.0",
"version": "3.0.1",
"main": "electron-main.js",
"author": {
"name": "Daniel Xie, hydroflame, et al."
+1 -1
View File
@@ -14,7 +14,7 @@ import { mergeMultipliers } from "../PersonObjects/Multipliers";
import { currentNodeMults } from "../BitNode/BitNodeMultipliers";
import { prestigeWorkerScripts } from "../NetscriptWorker";
const soaAugmentationNames = [
export const soaAugmentationNames = [
AugmentationName.BeautyOfAphrodite,
AugmentationName.ChaosOfDionysus,
AugmentationName.FloodOfPoseidon,
+14 -14
View File
@@ -75,7 +75,7 @@ export const Augmentations: Record<AugmentationName, Augmentation> = (() => {
repCost: 1e4,
moneyCost: 1e6,
info:
"Pheromone extruder injected in the thoracodorsal nerve. Emits pleasing scent guaranteed to " +
"Pheromone extruder injected in the thoracodorsal nerve. Emits a pleasing scent guaranteed to " +
"make conversational partners more agreeable.",
stats: "This augmentation makes the Bribe minigame easier by indicating the incorrect paths.",
charisma: 1.1,
@@ -90,7 +90,7 @@ export const Augmentations: Record<AugmentationName, Augmentation> = (() => {
info:
"A chip containing the psyche of the greatest BitRunner to ever exist. " +
"Installing this relic significantly increases ALL of your stats. " +
"However, it may have unintended consequence on the users mental well-being.",
"However, it may have unintended consequences on the user's mental well-being.",
stats: "Grants access to unimaginable power.",
hacking: 2,
strength: 2,
@@ -274,7 +274,7 @@ export const Augmentations: Record<AugmentationName, Augmentation> = (() => {
`A cybernetic foot augmentation that was specifically created for ${FactionName.Bladeburners} ` +
"during the Synthoid Uprising. The organic musculature of the human foot " +
"is enhanced with flexible carbon nanotube matrices that are controlled by " +
"intelligent servo-motors.",
"intelligent servomotors.",
agility: 1.05,
bladeburner_max_stamina: 1.05,
bladeburner_stamina_gain: 1.05,
@@ -285,10 +285,10 @@ export const Augmentations: Record<AugmentationName, Augmentation> = (() => {
repCost: 1.25e3,
moneyCost: 1.5e11,
info:
"A highly-advanced matter phase-shifter module that is embedded " +
"A highly advanced matter phase-shifter module that is embedded " +
"in the brainstem and cerebellum. This augmentation allows " +
"the user to project and control a holographic simulacrum within an " +
"extremely large radius. These specially-modified holograms were specifically " +
"extremely large radius. These specially modified holograms were specifically " +
"weaponized by Bladeburner units to be used against Synthoids.",
stats:
"This augmentation allows you to perform Bladeburner actions and other actions (such as working, committing crimes, etc.) at the same time.",
@@ -1028,7 +1028,7 @@ export const Augmentations: Record<AugmentationName, Augmentation> = (() => {
repCost: 1.5e3,
moneyCost: 5e6,
info:
"A skin implant that reinforces the skin with highly-advanced synthetic cells. These " +
"A skin implant that reinforces the skin with highly advanced synthetic cells. These " +
"cells, when powered, have a negative refractive index. As a result, they bend light " +
"around the skin, making the user much harder to see with the naked eye.",
agility: 1.05,
@@ -1041,7 +1041,7 @@ export const Augmentations: Record<AugmentationName, Augmentation> = (() => {
moneyCost: 3e7,
info:
"This is a more advanced version of the LuminCloaking-V1 augmentation. This skin implant " +
"reinforces the skin with highly-advanced synthetic cells. These " +
"reinforces the skin with highly advanced synthetic cells. These " +
"cells, when powered, are capable of not only bending light but also of bending heat, " +
"making the user more resilient as well as stealthy.",
prereqs: [AugmentationName.LuminCloaking1],
@@ -1095,7 +1095,7 @@ export const Augmentations: Record<AugmentationName, Augmentation> = (() => {
repCost: 5.625e5,
moneyCost: 2.875e9,
info:
"A highly-advanced techno-organic drug that is injected into the skeletal " +
"A highly advanced techno-organic drug that is injected into the skeletal " +
"and integumentary system. The drug permanently modifies the DNA of the " +
"body's skin and bone cells, granting them the ability to repair " +
"and restructure themselves.",
@@ -1459,7 +1459,7 @@ export const Augmentations: Record<AugmentationName, Augmentation> = (() => {
moneyCost: 3.375e9,
info:
"A cutting-edge knowledgebase entirely built off of nanotech rod-logic, training the user on social engineering. " +
"Thought to be stolen technology, its existance has been a secret until recently.",
"Thought to be stolen technology, its existence has been a secret until recently.",
charisma: 1.1,
charisma_exp: 1.4,
factions: [FactionName.TheDarkArmy, FactionName.TheSyndicate],
@@ -1507,7 +1507,7 @@ export const Augmentations: Record<AugmentationName, Augmentation> = (() => {
moneyCost: 4.875e9,
info:
"The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an " +
"artificially-synthesized gene that was developed by DARPA to create " +
"artificially synthesized gene that was developed by DARPA to create " +
"super-soldiers through genetic modification. The gene was outlawed in " +
"2056.",
strength: 1.75,
@@ -1708,7 +1708,7 @@ export const Augmentations: Record<AugmentationName, Augmentation> = (() => {
repCost: 8.75e5,
moneyCost: 3.25e9,
info:
"The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. " +
"The NEMEAN Subdermal Weave is a thin, lightweight, graphene plating that houses a dilatant fluid. " +
"The material is implanted underneath the skin, and is the most advanced form of defensive enhancement " +
"that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective " +
"at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to " +
@@ -1882,8 +1882,8 @@ export const Augmentations: Record<AugmentationName, Augmentation> = (() => {
repCost: 1e4,
moneyCost: 1e6,
info:
"This unique augmentation allows the user to strike stright to the heart of the matter and sweep aside obstacles in the way of their goals. " +
"Appearing as a simple insignia on the user's forarm, its true function is unknown. It is said to be one of the tools of The Sculptor. " +
"This unique augmentation allows the user to strike straight to the heart of the matter and sweep aside obstacles in the way of their goals. " +
"Appearing as a simple insignia on the user's forearm, its true function is unknown. It is said to be one of the tools of The Sculptor. " +
"Awarded to those who discover the secrets of the labyrinth.",
stats:
"This augmentation increases the stasis link limit by one, and raises charisma by 7%, strength by 10%, and darknet money by 10%.",
@@ -1898,7 +1898,7 @@ export const Augmentations: Record<AugmentationName, Augmentation> = (() => {
repCost: 1e4,
moneyCost: 1e6,
info:
"This skeletal augmentation greatly enhances the users durability and health. Inspired by the original Staff of Medicine that is said to " +
"This skeletal augmentation greatly enhances the user's durability and health. Inspired by the original Staff of Medicine that is said to " +
"have been given to Daedalus as a reward for the completion of the Labyrinth, which all modern augments are a descendant of. ",
stats:
"This augmentation increases the stasis link limit by one, and raises charisma xp, defense, and darknet money by 10%.",
+2 -2
View File
@@ -836,7 +836,7 @@ export function getBitNodeMultipliers(n: number, lvl: number): BitNodeMultiplier
StaneksGiftPowerMultiplier: 0.5,
StaneksGiftExtraSize: 2,
DarknetMoneyMultiplier: 0.5,
DarknetMoneyMultiplier: 0.05,
WorldDaemonDifficulty: 2,
});
@@ -1036,7 +1036,7 @@ export function getBitNodeMultipliers(n: number, lvl: number): BitNodeMultiplier
StaneksGiftPowerMultiplier: 2,
StaneksGiftExtraSize: 1,
DarknetMoneyMultiplier: 0.5,
DarknetMoneyMultiplier: 0.1,
WorldDaemonDifficulty: 3,
});
@@ -68,6 +68,7 @@ export const BitNodeMultipliersDisplay = ({ n, level, hideMultsIfCannotAccessFea
<CloudServersMults n={n} mults={mults} />
<StockMults n={n} mults={mults} />
<CrimeMults n={n} mults={mults} />
<DarknetMults n={n} mults={mults} />
<InfiltrationMults n={n} mults={mults} />
<CompanyMults n={n} mults={mults} />
<GangMults n={n} mults={mults} hideMultsIfCannotAccessFeature={hideMultsIfCannotAccessFeature} />
@@ -226,6 +227,17 @@ function CrimeMults({ mults }: IMultsProps): React.ReactElement {
return <BNMultTable sectionName="Crime" rowData={rows} mults={mults} />;
}
function DarknetMults({ mults }: IMultsProps): React.ReactElement {
const rows: IBNMultRows = {
DarknetMoneyMultiplier: {
name: "Darknet Money",
color: Settings.theme.money,
},
};
return <BNMultTable sectionName="Darknet" rowData={rows} mults={mults} />;
}
function SkillMults({ mults }: IMultsProps): React.ReactElement {
const rows: IBNMultRows = {
HackingLevelMultiplier: {
+5 -3
View File
@@ -1274,9 +1274,11 @@ export class Bladeburner implements OperationTeam {
}
this.maxRank = Math.max(this.rank, this.maxRank);
const bladeburnerFaction = Factions[FactionName.Bladeburners];
if (bladeburnerFaction.isMember) {
bladeburnerFaction.playerReputation += calculateActionReputationGain(person, change);
if (change > 0) {
const bladeburnerFaction = Factions[FactionName.Bladeburners];
if (bladeburnerFaction.isMember) {
bladeburnerFaction.playerReputation += calculateActionReputationGain(person, change);
}
}
// Gain skill points
+36 -446
View File
@@ -4,10 +4,10 @@
* Constants for specific mechanics or features will NOT be here.
*/
export const CONSTANTS = {
VersionString: "3.0.0",
VersionString: "3.0.1",
isDevBranch: false,
isInTestEnvironment: globalThis.process?.env?.JEST_WORKER_ID !== undefined,
VersionNumber: 50,
VersionNumber: 51,
/** Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience
* and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then
@@ -111,467 +111,57 @@ export const CONSTANTS = {
// Also update Documentation/doc/en/changelog.md when appropriate (when doing a release)
LatestUpdate: `
## v3.0.0 Release: 1 May 2026
## v3.0.1: 17 May 2026
### BREAKING CHANGES
- Remove API server (#2084) (@catloversg)
- Remove support for running NS1 scripts (#2083) (@catloversg)
- Enforce stricter param check on ns.getBitNodeMultipliers and ns.hacknet.spendHashes (#2085) (@catloversg)
- Remove APIs that were deprecated a long time ago (#2088) (@catloversg)
- Moved formatting functions to their own interface (#1635) (@G4mingJon4s)
- Remove fuzzy matching when checking params (#2091) (@catloversg)
- Remove deprecated tail-related APIs (#2143) (@catloversg)
- Rename setAutoJobAssignment API to setJobAssignment (#2146) (@catloversg)
- Make nuke and port cracking APIs return false instead of throwing error (#1023, #2153) (@Hydrogeniouss, @catloversg)
- Standardize names of Stock APIs (#2173) (@catloversg)
- Rename BN multiplier RepToDonateToFaction to FavorToDonateToFaction (#2178) (@catloversg)
- Make ns.bladeburner.getActionRepGain return the expected reputation gain (#2186) (@catloversg)
- Rename FactionName.BachmanAssociates to FactionName.BachmanAndAssociates (#2048, #2183) (@masarakki, @catloversg)
- Remove DreamSense upgrade (#2232) (@catloversg)
- Use different term for dividend modifier instead of tax (#2237) (@catloversg)
- Remove Spring Water industry (#2240) (@catloversg)
- Remove VeChain (#2245) (@catloversg)
- Make some APIs throw error when server is invalid (#2261) (@catloversg)
- Rename equipment that uses real brand names (#2293) (@catloversg)
- Make TIX access independent from WSE account (#2342) (@catloversg)
- Move and rename purchased server functions to cloud API (#2367) (@gmcew)
- Fix: Coding contracts may have duplicate names (#2399) (@aaaa-imcute)
- Generate test contracts on executing host by default. Add support for optional parameter to specify the server (#2417) (@1337JiveTurkey)
- The "darkweb" server becomes a darknet server (Check new Dark Net feature in #2139) (@ficocelliguy)
- Remove RAM cost of hacknet namespace and set RAM cost of each hacknet API (#2502) (@catloversg)
- Cancel sleeve's current task when calling ns.sleeve.travel() (#2559) (@catloversg)
- Make ns.cloud.purchaseServer() and ns.cloud.deleteServer() use hostname as provided (#2560) (@catloversg)
- Make implicit string conversion consistent across all coding contracts (#2608) (@catloversg)
- Rename ns.gang.getOtherGangInformation to getAllGangInformation (#2635) (@lstutzman)
- Standardize "nextCompletion" promise in tasks (#2687) (@catloversg)
### MAJOR CHANGES
- Added Darknet, a new mechanic based on spreading through an unstable network and cracking passwords. Purchase DarkscapeNavigator.exe in the terminal to unlock access. (#2139) (@ficocelliguy)
- Balance change: IPvGO: Improve favor gain from wins to balance around the rep value of favor (#2131) (@ficocelliguy)
- Search and read NS API docs in editor tab and documentation tab (#2163) (@catloversg)
- Balance change: Infiltration: Rebalance rewards, add min stat requirement, add market demand (#2210) (@ficocelliguy, @d0sboots, @catloversg)
### UI
- Fix: Hacknet's RAM upgrade button is off-by-one (#2093) (@catloversg)
- Add visual indicators for tooltips of reputation/favor (#2092) (@catloversg)
- Mitigate crash in Terminal page in edge cases (#2099) (@catloversg)
- Update favicon files (#2122) (@catloversg)
- Add option to enable/disable syncing Steam achievements (#2117) (@catloversg)
- Change min and step value of "Tail render interval" setting (#2129) (@catloversg)
- Realign and update text in achievement icons (#2127) (@catloversg)
- Show achievement lists in grids (#2109) (@catloversg)
- Fix styling of IPvGO score modal (#2166) (@ficocelliguy)
- Add RAM usage and file size to "ls -l" output (#2135) (@HansLuft778)
- Fix: Coding contract UI does not handle error properly when answer format is invalid (#2171) (@catloversg)
- Improve Recovery Mode screen (#2206) (@catloversg)
- Add "Recent Errors" tab and improved error modal (#2169) (@ficocelliguy)
- Validate bet input of casino mini games (#1694) (@catloversg)
- Scroll to top when opening new NS API doc page in popup mode (#2181) (@catloversg)
- Fix nbsp rendering as text rather than a space (#2225) (@gmcew)
- Show terminal warning instead of popup for breaking changes (#2244) (@catloversg)
- Show money in exponential form instead of "0.000" for dividends when it's > 0 but still too small (#2243) (@catloversg)
- Place tooltips and popups in front of log windows (#2253) (@catloversg)
- Fix: Go history page shows favor bonus instead of reputation bonus (#2251) (@catloversg)
- Fix: Error message shows blob URL instead of script name (#2265) (@catloversg)
- Add tooltip for reputation/favor in page of faction's augmentation list (#2268) (@catloversg)
- Fix: Dropdown list appears behind modal when it's used in modal (#2282) (@catloversg)
- Close coding contract popup on prestige (#2285) (@catloversg)
- Add "Run Beautify on Save" option for built-in editor (#2287) (@TheCleric)
- Add configurable option for auto-reconnecting to RFA client (#2297) (@catloversg)
- Fix: Active Scripts page may mix up UI after prestige (#2303) (@catloversg)
- Better status bar animations (#2317) (@d0sboots)
- Prevent text from overflowing when script's args are too long in Active Scripts page (#2324) (@catloversg)
- Print error detail to terminal if script cannot be compiled or there is runtime error while autocompleting (#2328) (@catloversg)
- Fix: Color picker appears behind theme editor (#2321) (@catloversg)
- Allow automatically hiding the top menu in Electron (#2325) (@femboyfireball)
- Clarify why you can't buy 4S when disabled (#2311) (@femboyfireball)
- Warn player if they run no-arg programs with arguments (#2338) (@catloversg)
- Show server's money in exponential form if it's too small (#2343) (@catloversg)
- Format the shared RAM multipler on the factions (#2355) (@mctylr-gh)
- Fix: Electron app does not show achievement icons (#2362) (@catloversg)
- Reword tutorial steps to distinguish between instruction and example (#2370) (@catloversg)
- Prevent showing redundant error toasts on failed RFA auto connect attempts (#2381) (@shyguy1412)
- Fix: Company's job list shows wrong starting jobs (#2391) (@catloversg)
- Improve instructions in recovery mode (#2394) (@catloversg)
- Add option to set fractional digits (#2419) (@CTNOriginals)
- Add links to documentation pages in tutorial's last step (#2424) (@catloversg)
- Show useful error messages when loading unsupported save data from newer versions (#2425) (@catloversg)
- Change notice for breaking changes in v2 (#2426) (@catloversg)
- Do not show error popup related to Stanek's Gift data when loading save files from pre-v1.1.0 (#2429) (@catloversg)
- Add Script Editor toggle for Sticky Scroll (#2431) (@gmcew)
- Display contract answers on completely failed contracts (#2440) (@TheCleric)
- Remove BitNode's difficulty in BitNode selection popup (#2454) (@catloversg)
- Add settings to change currency symbol and whether to show it after money value (#2453) (@kaoticengineering)
- Fix: Monaco shows wrong TSDoc of APIs that have "export" word (#2473) (@catloversg)
- Show karma in Stats page and explain what it is in documentation (#2475) (@catloversg)
- Update icon of DARKNET_BACKDOOR and DARKNET_DEPTHS achievements (#2480) (@catloversg)
- Update incorrect ps command shown in help (#2484) (@Groot-0909)
- Improve help text of scp and run (#2493) (@catloversg)
- Add option to disable minimap in script editor (#2504) (@catloversg)
- Improve navigation system of in-game documentation viewer (#2499) (@catloversg)
- Use font family setting when rendering MUI Link component (#2511) (@catloversg)
- Show hints of BitNode documentation and allow opening it in BitVerse (#2513) (@catloversg)
- Show errors if using nano/vim with patterns that do not match any files (#2515) (@catloversg)
- Tweak CSS/Position of Darknet Docs link (#2517) (@d0sboots)
- Add indicator of RFA connection status to overview panel (#2497) (@catloversg)
- Fix issues with RFA auto-reconnecting feature (#2535) (@catloversg)
- Add inline script RAM usage text to each active script (#2546) (@vadien)
- Update toolbar of in-game editor (#2551) (@catloversg)
- Show "undefined" instead of -1 as pid in error popup when catching promise errors (#2555) (@catloversg)
- Add option to autosave scripts on focus change (#2565) (@catloversg)
- Prevent joining banned factions via UI (#2573) (@catloversg)
- Fix: Import save comparison popup shows wrong BN level (#2595) (@catloversg)
- Fix: Cannot type in text boxes rendered by players' scripts when terminal tab is shown (#2615, #2622) (@lstutzman, @catloversg)
- Navigate to gym/university instead of city when stopping focusing on gym/class work (#2613) (@lstutzman)
- Ensure prompts shown by ns.prompt do not lose focus in the terminal tab (#2631) (@catloversg)
- Remove unnecessary max-width of tab list in in-game editor (#2643) (@catloversg)
- Add hooks to sidebar for players to attach custom content (#2651) (@catloversg)
- Use exponential notation when formatting very small HP or thread values (#2656) (@catloversg)
- Show effective amount of shared RAM when using UI (#2691) (@catloversg)
- Use "success" theme color for low infiltration difficulty instead of "primary" (#2693) (@catloversg)
- Reload immediately after importing, deleting save data or killing all scripts (#2697) (@catloversg)
- Activate recovery mode on critical BN prestige bugs (#2699) (@catloversg)
- Change getServer return type; rename getServerAuthDetails and add missing dnet properties (#2746) (@ficocelliguy)
### MISC
- Ensure IPvGO board has at least 1 offline node (#2072) (@ficocelliguy)
- Fix: Game crashes when generating CCT in weird case (#2077) (@catloversg)
- Add ns.dynamicImport() to dynamically import a script (#2036) (@shyguy1412)
- Add functionality and support to fully allow Players to use IP addresses in place of hostnames (#1990) (@NagaOuroboros)
- Fix: IPvGO tutorial was getting stuck if you left the tab and returned (#2071) (@ficocelliguy)
- Fix: Passive faction reputation gain applies Player.mults.faction_rep twice (#2125) (@catloversg)
- Fix: Electron app does not run on Linux due to incompatible glibc version and wrong usage of net.fetch (#2114) (@catloversg)
- Change how enums are exposed in NetscriptDefinitions.d.ts (#1998) (@catloversg)
- Add formulas API for calculating share power and move UI of sharing RAM (#2126) (@catloversg)
- Use FactionName enum in relevant APIs (#2101) (@catloversg)
- Prevent running multiple instances of Electron app (#2095) (@catloversg)
- Tweak "The Covenant" faction's rumor condition (#2110) (@catloversg)
- Export crash report when a fatal error occurs (#2106) (@catloversg)
- Correctly end game & winstreak if a cheat attempt critically fails (#2130) (@ficocelliguy)
- Show custom error message when player imports decompressed save file (#2108) (@catloversg)
- Add "Total Number of Primes" contract (#2116) (@gmcew)
- Make IP addresses use the full 32 bit space (#2113) (@whiskeyfur)
- Add "--tail" to default autocomplete options (#2103) (@catloversg)
- Update blood donation (#2151, #2216, #2508) (@catloversg, @hydroflame, @d0sboots)
- Fix typo in sector-12-crime.lit (#2159) (@Boingostarr)
- Add versionNumber to ns.ui.getGameInfo() (#2155) (@catloversg)
- Fix typos in literature files (#2164) (@catloversg)
- Add more enums to ns.enums (#2165) (@catloversg)
- Add removal of fuzzy matching to list of breaking changes (#2149) (@catloversg)
- Fix: API break detector does not detect affected code in some cases (#2172) (@catloversg)
- Mention bug-report channel on Discord for reporting bugs (#2201) (@catloversg)
- Add file metadata (timestamps) (#1271, #2199) (@Hoekstraa, @catloversg)
- Allow using E notation in expr CLI (#2209) (@catloversg)
- Fix: Current work is not shown in edge cases (#2208) (@catloversg)
- Make ns.codingcontract.createDummyContract throw error if type is invalid (#2188) (@catloversg)
- Fix: Documentation navigator does not handle external URL properly (#2202) (@catloversg)
- Detect circular dependencies when generating modules (#2194) (@catloversg)
- Fix: Running scripts may be loaded before main UI (#1726) (@catloversg)
- Fix: Autocomplete of "connect" command does not list purchased servers (#2229) (@gmcew)
- Expose difficulty value of coding contract in NS API (#2230) (@gmcew)
- Fix: Exporting game via menu of Steam app does not give export bonus (#2241) (@catloversg)
- Update migration instruction for breaking change of ns.nFormat (#2247) (@catloversg)
- Fix: Loading code discards entire Go data due to missing migration code for favor/rep (#2252) (@catloversg)
- Add removal of API server to list of breaking changes (#2205) (@catloversg)
- Fix typo in KARMA_1000000 achievement (#2264) (@UncleCeiling)
- Clarify the reason of failure when trying to move a running script (#2160) (@UncleCeiling)
- Fix: ns.mv writes to destination file even if it cannot delete source file (#2267) (@catloversg)
- Update messages related to text files (#2266) (@catloversg)
- Fix calculateExp so that it won't return a too small result (#2274) (@d0sboots)
- Change ns.alert to accept multiple args as other print functions (#2278) (@vamo89)
- Fix: Coding contract can be solved manually via UI after it is removed on prestige (#2281) (@TheCleric)
- Ensure ns.go.analysis.getValidMoves correctly handles playing as white (#2292) (@ficocelliguy)
- Ensure that player's promises are changed to "gameOver" once the game is over (#2198) (@ficocelliguy)
- Export save data before migrating to v3 (#2304) (@catloversg)
- Prevent tiny islands surrounded by offline nodes during initial board generation (#2310) (@ficocelliguy)
- Add FragmentType to NS Enums (#2341) (@TheCleric)
- Do not round down amount of hacked money in "hack" CLI (#2344, #2345) (@catloversg)
- Rename "TIX" interface to "Stock" (#2351) (@catloversg)
- Add --temporary flag to run command (#2354) (@catloversg)
- Let ServerProfiler.exe autocomplete servers (#2356) (@rladenson)
- Correct phrasing in SmartSonar description (#2368) (@The-Chaddeus)
- Make ActiveFragment extend Fragment (#2373) (@catloversg)
- Expose theme as css custom props (#2380) (@shyguy1412)
- Support css file type (#2378) (@shyguy1412)
- Do not update captures on passed analysis boards (#2415) (@ficocelliguy)
- Update error message when backdooring without admin rights (#2435) (@CicaProductions)
- Add literature expanding the augment prestige lore (#2433) (@Nick-Colclasure)
- Improve script args validation message (#2451) (@ficocelliguy)
- Add sleeve commands to purchase sleeves and memory via the API (#2443) (@TheAimMan)
- Allow ns.read to read .msg and .lit files (#2455) (@catloversg)
- Fix scoring of very large open areas in IPvGO (#2464) (@ficocelliguy)
- Make threads' bonus apply to timing attack puzzle's extra time per char (#2466) (@ficocelliguy)
- Improve documentation; remove requirement that getBlockedRam and getDepth be called on a darknet server (#2472) (@ficocelliguy)
- Prevent blocked ram on the "darkweb" server (#2468) (@ficocelliguy)
- Add extra hint to sorted echo puzzle at high levels (#2465) (@ficocelliguy)
- Change coding contract's fallback reward priorities (#2481) (@gmcew)
- Add JS object properties as server names; refactor save/load/server storage to support this (#2482) (@ficocelliguy)
- Buff packet sniffing slightly (#2485) (@d0sboots)
- Fix: Darknet state is not reset properly on prestige (#2486) (@catloversg)
- Change how coding contract rewards are randomized (#2490) (@catloversg)
- Expose ProgramName enum (#2492) (@catloversg)
- More fixes and feedback in darknet (#2489) (@ficocelliguy)
- Fix missed cases in offline server handling (#2495) (@d0sboots)
- Adjust darknet balance from player feedback (#2512) (@ficocelliguy)
- Add "Find Largest Rectangle in a Matrix" coding contract (#2519) (@Misha279-UA)
- Tweak Dnet based on player feedback (#2533, #2545, #2593) (@ficocelliguy)
- Allow parsing unknown options with data.flags in autocomplete (#2539) (@catloversg)
- Fix webstorm by using a mutationLock (#2542) (@d0sboots)
- Print error message when calling ns.ui.closeTail with nonexistent pid or pid of stopped scripts (#2557) (@catloversg)
- Add minimum width/height constraints to ns.ui.resizeTail (#2558) (@catloversg)
- Add API to minimize and expand tail windows (#2556) (@catloversg)
- Improve error messages for invalid sleeve numbers (#2567) (@catloversg)
- Improve help text of expr command (#2561) (@catloversg)
- Rework faction rumor (#2569) (@catloversg)
- Fix: hacknetNodeCost formula API throws when using documented optional parameter (#2577) (@catloversg)
- Rework intelligence override (#2575) (@catloversg)
- Electron: Allow opening dev tools via CLI arguments (#2589) (@catloversg)
- Support importing Steam Cloud save file manually (#2583) (@catloversg)
- Electron: Add UI menus and CLI flags to change log levels (#2596) (@catloversg)
- Import correct cloud file when multiple exist (#2599) (@catloversg)
- Dnet: Remove packet capture (#2594) (@ficocelliguy)
- Generate more frequent and lower-reward coding contracts (#2603) (@ficocelliguy)
- Electron: Fix issues in edge cases of using --export-save (#2590) (@catloversg)
- Fix recursive alias detection causing infinite recursion (#2610) (@lstutzman)
- Add "hidden" mkdir command (#2646) (@catloversg)
- Dnet: Remove bonus time effect on authentication and heartbleed speed; fix ram rounding (#2627) (@ficocelliguy)
- Fix tab completion for multi-word quoted autocomplete options (#2612) (@lstutzman)
- Add weakenEffect to formulas.hacking namespace (#2626) (@lstutzman)
- Update description of "cat" in "help" command (#2654) (@catloversg)
- Reduce achievements check interval (#2650) (@catloversg)
- Fix: calculateExp throws errors in edge cases (#2667) (@catloversg)
- Clear recent scripts when installing augmentations (#2670) (@Mathekatze)
- Better error message for port serialization failure (#2688) (@d0sboots)
- Adjust charisma augmentation power (#2698) (@ficocelliguy)
- Clarify what "backdoor" does in "help" command (#2694) (@abbyintheattic)
- Fix: Hacknet upgrade cost formulas ignore upgrade level when enforcing max level (#2696) (@lucebac)
- Improve error messages for invalid module parsing (#2707) (@catloversg)
- Cache reward fixes (#2731) (@ficocelliguy)
- Fix typo in darknet authentication response message (#2734) (@catloversg)
- Fix: Tutorial links to outdated faq url (#2733) (@catloversg)
- Fix: Player can switch tabs without losing focus on current work (#2724) (@catloversg)
- Add new command to upload a directory (#2659) (@hexagonrecursion)
- Add HJKL key mappings for infiltration arrows (#2742) (@mahlquistj)
- Prevent generating malformed darknet server hostname (#2744) (@catloversg)
- Support angle bracket type assertions in RAM calculation (#2751) (@catloversg)
- Fix typo in augmentation description (#2760) (@gmcew)
- Reduce the RAM cost of ns.rm() to match ns.scp() (#2761) (@NagaOuroboros)
- Temporarily remove darknet servers with unusual hostnames (#2757) (@catloversg)
- Fix: Duplicate .lit and .cache files can be generated in dnet (#2763) (@catloversg)
- Allow getFunctionRamCost to get base RAM cost for scripts (#2771) (@Mathekatze)
### DOCUMENTATION
- Fix wrong links in some docs pages (#2082) (@mizmantle)
- Add getContractTypes to Coding Contracts documentation page (#2089) (@gmcew)
- Clarify applicability of wiki entry in Hamming contracts (#2087) (@gmcew)
- Make minor improvements in "Getting Started" page (#2112) (@catloversg)
- Remove mention of Netscript 1.0/2.0/JS in NetscriptDefinitions.d.ts (#2150) (@catloversg)
- Clarify ns.go.getGameState (#2158) (@Arjan-akkermans)
- Remove unnecessary br tag in scripts.md (#2204) (@catloversg)
- Fix minor problem in old changelog (#2203) (@catloversg)
- Remove mention of NS2 in NetscriptDefinitions.d.ts (#2200) (@catloversg)
- Move CONTRIBUTING.md (#2191) (@catloversg)
- Specify parameter types of of ns.go.analysis.highlightPoint and ns.go.analysis.clearPointHighlight (#2175) (@kevinsandow)
- Fix warnings when generating NS API docs (#2189) (@kevinsandow)
- Support showing images in markdown docs (#2207) (@catloversg)
- Update links to CONTRIBUTING.md (#2213) (@catloversg)
- Update contribution guide (#2214) (@emmanuel-ferdman)
- Clarify condition of joining Daedalus faction (#2234) (@catloversg)
- Update infiltration docs (#2259) (@catloversg)
- Mention TypeScript support and update example in React docs (#2263) (@catloversg)
- Update Remote API docs (#2258) (@catloversg)
- Change ns.tail to ns.ui.openTail in example code (#2270) (@gmcew)
- Clarify description of ArrayJumpingGame contract (#2277) (@acidduk)
- Update 'Hacking Algorithms' page (#2288) (@gmcew)
- Reword HammingCode contracts and mention dummy contract API (#2296) (@gmcew)
- Clarify cross-host characteristic of PID and port (#2336) (@Thaccus)
- Fix wrong commands in getting_started.md (#2349) (@catloversg)
- Use alternative fix for newline issue in IPvGO docs (#2350) (@catloversg)
- Fix missing/wrong TSDoc of APIs having optional host parameter (#2371) (@catloversg)
- Fix typo in README.md (#2375) (@HolyNaet)
- Improve wording around host argument of getScriptRam (#2374) (@nickmshelley)
- Remove references to defunct wiki from Hack/Weaken/Grow (#2404) (@maglinvinn)
- Clarify behavior of NS.getScriptLogs() for running scripts (#2408) (@sg673)
- Add instructions to troubleshoot common issues for contributors to CONTRIBUTING.md (#2420) (@catloversg)
- Add FAQ and another JIT batcher illustration to documentation (#2400) (@HolyNaet)
- Change wording in Singularity.installAugmentation (#2439) (@HolyNaet)
- Update README.md to correct Frequently Asked Questions link. (#2444) (@jonathonchase)
- Add a question and a grammatical fix in faq.md (#2446) (@HolyNaet)
- Move current changelog to changelog-v2.md (#2461) (@catloversg)
- Fix some IPvGO docs that do not reflect winstreak rep converted to favor (#2463) (@ficocelliguy)
- Add glossary of darknet terms to the documentation page (#2469) (@ficocelliguy)
- Add a note to CONTRIBUTING.md about the npm peer dep issue (#2474) (@d0sboots)
- Update darknet documentation (#2483) (@ficocelliguy)
- Fix invalid links in ns.sleep and ns.asleep (#2496) (@catloversg)
- Use relative links instead of absolute links (#2521) (@catloversg)
- Document quirky behavior of ns.flags when default value is nullish (#2528) (@catloversg)
- Clarify how share power affects reputation gain rate of non-hacking work (#2544) (@catloversg)
- Update guides (#2550) (@catloversg)
- Add missing newline after RAM cost (#2570) (@catloversg)
- Update mention of outdated getStockForecast API (#2578) (@catloversg)
- Fix newline issues in IPvGO docs and add missing RAM cost (#2602) (@catloversg)
- Document coding contract's generation and rewards (#2624) (@catloversg)
- Clarify scp and exec darknet permissions in API docs (#2634) (@lstutzman)
- Update RAM cost of hacknet APIs and remove unnecessary RAM cost docs (#2639) (@catloversg)
- Update tutorial script for buying cloud servers (#2653) (@catloversg)
- Improve coding contract documentation (#2689) (@catloversg)
- Remove TS type annotation from doc example script (#2721) (@ficocelliguy)
- Update list of RFA community tools (#2722) (@CTNOriginals)
- Fix incorrect cloud API example (#2738) (@catloversg)
- Remove non-existent influence namespace in Darknet documentation (#2748) (@Berdes)
- Remove spoiler for Offline scripts and bonus time page and make it accessible early-game (#2749) (@Berdes)
- Clarify ns.scp and ns.isRunning (#2769) (@catloversg)
### SPOILER CHANGES - UI
- Fix: BitVerse does not show all BN multipliers in some cases (#2045) (@catloversg)
- Add UI hint about scripting tea/party and using Intern (#2179) (@catloversg)
- Fix: Bladeburner console prints main body's HP instead of sleeve's HP (#2390) (@catloversg)
- Reduce threshold of showing warning of low population (#2450) (@catloversg)
- Fix: Hacknet server UI shows NaN hash rate when 100% RAM is being used (#2500) (@catloversg)
- Prevent ending BNs through reuse of Bladeburner UI event handler (#2574) (@catloversg)
- Always show Black Operations list (#2592) (@catloversg)
- Show hints of Sleeves mechanic in pre-endgame (#2605) (@catloversg)
- Consistently calculate BitNode "level" (#2645) (@catloversg)
- Add tooltips explaining why Bladeburner skill upgrades are disabled (#2648) (@catloversg)
- Add button to open Faction page from Gang UI (#2655) (@catloversg)
- Ensure intelligence override is a positive integer (#2673) (@catloversg)
- Remove max width of corporation division list (#2686) (@catloversg)
- Show hints of Gang mechanic in pre-endgame (#2723) (@catloversg)
- Break out Darknet BN and player mults as separate entries (#2745) (@gmcew)
### SPOILER CHANGES - MISC
- Add achievement for acquiring SF13.1 (#2107) (@catloversg)
- Add achievement for completing all BNs (#2128) (@catloversg)
- Renamed Division.type to Division.industry (#2079, #2152) (@whiskeyfur, @catloversg)
- Make ns.hacknet.spendHashes handle invalid targets in same way as UI (#2102) (@catloversg)
- Add achievements for BN14 (#2140) (@catloversg)
- Print logs when ns.hacknet.spendHashes fails and update param type of APIs using hash upgrade (#2145) (@catloversg)
- Add ns.singularity.getUnlockedAchievements (#2156) (@UncleCeiling)
- Remove mention of unusable research "sudo.Assist" (#2187) (@catloversg)
- Change message of Singularity error and uncaught promise error (#2174) (@catloversg)
- Add ns.singularity.getHackingLevelRequirementOfProgram (#2271) (@catloversg)
- Expose gang's discount rate (#2272) (@catloversg)
- Prevent purchasing product-only research for material industries (#2283) (@catloversg)
- Fix: Stat levels are not recalculated after grafting augs or accepting Stanek's Gift (#2322) (@catloversg)
- Expose production limit of material and product (#2330) (@AnteIndustrial)
- Make some editorial changes in Black Operations' description (#2449) (@catloversg)
- Add warning when installing backdoor on backdoored server with Singularity API (#2458) (@catloversg)
- Fix: Sleeves can earn exp and purchase augmentations when enabling disableSleeveExpAndAugmentation (#2467) (@catloversg)
- Add improved challenge achievement for BN15 (#2479) (@ficocelliguy)
- Stop randomizing Bladeburner's action difficulty (#2491) (@catloversg)
- Adjusted Bladeburner's team bonus computation to make one member help (#2541) (@JoshuaCF)
- Rebalance charisma exp gain of Recruitment action (#2549) (@catloversg)
- Add APIs to get rank gain and rank loss of an action (#2572) (@catloversg)
- Reduce RAM cost of inGang and inBladeburner APIs (#2582) (@catloversg)
- Fix skillMaxUpgradeCount returning 1 at extreme skill levels (#2611) (@lstutzman)
- API: Expose charged effects of Stanek's Gift active fragments (#2638) (@catloversg)
- Apply SF override to charisma calculations (#2642) (@catloversg)
- Update description of "BN9: Challenge" achievement (#2647) (@catloversg)
- Fix: Intelligence data is incorrectly migrated when Intelligence is not unlocked (#2660, #2666) (@catloversg)
- Restrict team count of Ops/BlackOps to total team size (#2672) (@catloversg)
- Fix: DarkscapeNavigator program is not granted on BN prestige when having SF15 (#2690) (@catloversg)
- Prevent duplicate processing of boost materials (#2695) (@catloversg)
- Update error message of ns.singularity.joinFaction (#2700) (@catloversg)
- Update RAM cost of nextUpdate and similar APIs (#2702) (@catloversg)
- Update description of "You and what army?" achievement (#2703) (@catloversg)
- Rework material production limit (#2683) (@catloversg)
- Remove references to "sudo.Assist" research (#2709) (@catloversg)
### SPOILER CHANGES - DOCUMENTATION
- Update rewards of SF14 (#2142) (@catloversg)
- Fix missing and outdated info of optional parameter (#2176) (@catloversg)
- Specify param type of many Corporation APIs (#2190) (@catloversg)
- Fix typo in bitnodes.md (#2221) (@catloversg)
- Add short guide of BitNode recommendation (#2041) (@1337JiveTurkey)
- Add comprehensive guide of BitNode recommendation (#2044) (@catloversg)
- Fix outdated description of Bladeburner interface (#2226) (@catloversg)
- Clarify advice about Smart Supply in round 1 (#2233) (@catloversg)
- Fix wrong param/return type and clarify ns.sleep, ns.asleep, ns.singularity.exportGame (#2242) (@catloversg)
- Clarify ns.gang.getOtherGangInformation (#2289) (@acidduk)
- Update type of Player.factions, GangGenInfo.faction and CorpMaterialConstantData.name (#2347) (@catloversg)
- Clarification of Singularity costs inside BN4 (#2403) (@gmcew)
- Update math notations in corporation docs (#2452) (@catloversg)
- Update BitNode recommendation short guide (#2523, #2529) (@catloversg)
- Cancel faction work instead of finishing it when creating gang (#2726) (@catloversg)
- Lower darknet BN money mults on hard nodes (#2743) (@ficocelliguy)
- Change getDarkwebPrograms return type to ProgramName[] (#2754) (@catloversg)
- Fix: getAugmentationBasePrice ignores bitnode mult for SoA augs (#2756) (@SAY-5)
- Rebalance hash base cost of generating coding contract (#2759) (@gmcew)
- Ensure induceServerMigration moves servers randomly (#2767) (@catloversg)
- Do not decrease player reputation when failing bladeburner actions (#2768) (@catloversg)
### CODEBASE/REFACTOR/WORKFLOW/JEST/TOOL/DEPS
- Electron: Use steamworks.js to integrate with Steamworks SDK (#1563) (@catloversg)
- Electron: Replace deprecated protocol.interceptFileProtocol with protocol.handle (#2100) (@catloversg)
- Dev menu: Add tools to set stat level and queue augmentations of faction (#2118) (@catloversg)
- Remove wrong and irrelevant comments/code (#2111) (@catloversg)
- Refactor: Change repNeededToDonate to favorNeededToDonate (#2134) (@d0sboots)
- Workflow: Build artifacts and upload to release (#2120) (@catloversg)
- Configure .editorconfig to not trim trailing whitespace in NetscriptDefinitions.d.ts (#2137) (@G4mingJon4s)
- Fix typo of "CorruptableText" (#2144) (@catloversg)
- Dev menu: Fix bugs in WD tools (#2141) (@catloversg)
- Make prettier ignore src/Documentation/pages.ts (#2185) (@catloversg)
- Workflow: Allow enabling dev mode when deploying dev build (#2184) (@catloversg)
- Refactor: Refactor message handler of Remote API (#2211) (@catloversg)
- Dev menu: Auto expand last opened tools (#2182) (@catloversg)
- Update build script to avoid unnecessary newline in generated script (#2224) (@catloversg)
- Fix inconsistent generated pages.ts (#2236) (@catloversg)
- Dev menu: Reset hacknet server list properly when setting level of SF9 (#2177) (@catloversg)
- Update dev dependencies (#2246) (@catloversg)
- Move all docs into en/ subdirectory (#1505) (@d0sboots)
- Fix ctrl-clicking after the doc_en refactor (#2256) (@d0sboots)
- Electron: Specify mime type when loading wasm files (#2262) (@catloversg)
- Electron: Build universal macOS binary (#2306) (@Snarling)
- Add Jest test to test migration from v2 to v3 (#2305) (@catloversg)
- Workflow: Split build-artifacts.yml into 2 workflows (#2309) (@catloversg)
- Workflow: Update NodeJs version in workflows (#2319) (@catloversg)
- Update NodeJS to v22 (#2318) (@mctylr-gh)
- Update api-documentor and api-extractor (#2320) (@mctylr-gh)
- Improve dev menu for augmentations (#2315) (@d0sboots)
- Add more debug info for troubleshooting corporation issues (#2327) (@catloversg)
- Update doc.sh (#2331) (@catloversg)
- Enable restoreMocks option and fix lint errors (#2333) (@catloversg)
- Workflow: Add new job to check generated docs (#2329) (@catloversg)
- Quiet Jest tests output on expected failures (#2332) (@mctylr-gh)
- Standardize error handling in netscriptGoImplementation.ts (#2335) (@ficocelliguy)
- Enable linting in test folder (#2337) (@catloversg)
- Update minor version of material UI and Emotion packages (#2339) (@mctylr-gh)
- Refactor Stanek's Gift UI code and change internal FragmentType enum (#2346) (@catloversg)
- Minor React related packages update (#2353) (@mctylr-gh)
- Remove redundant check in getServer utility function and serverExists API (#2357) (@catloversg)
- Refactor tests that add home server manually (#2358) (@catloversg)
- Update Electron version (#2360) (@catloversg)
- Prepare for save data migration of next beta version (#2369) (@catloversg)
- Rewrite infiltration to pull state out of React (#2316, #2393) (@d0sboots)
- Use getCoreBonus function when calculating server growth (#2387) (@aaaa-imcute)
- Refactor implementation of ports (#2396) (@d0sboots)
- Avoid re-entrancy issues with EventEmitter (#2397) (@d0sboots)
- Update packages-lock.json to not use vulnerable versions (#2405) (@mctylr-gh)
- Allow specifying migrator when migrating player's scripts (#2418) (@catloversg)
- Refactor code related to in-game documentation link (#2422) (@catloversg)
- Clean up "doc" folder (#2427) (@catloversg)
- Update dependencies related to monaco (#2432) (@catloversg)
- Fix typos and duplicating ms per cycle constant (#2436) (@gmcew)
- Update dependencies to fix vulnerability warnings (#2445) (@catloversg)
- Move Result to the public API (#2398) (@d0sboots)
- Generate display data for math notation at built time and remove runtime mathjax dependency (#2447) (@catloversg)
- Update SaveData type to be compatible with TS 5.9 and upgrade TS (#2457) (@catloversg)
- Update NodeJS to v24 (#2456) (@catloversg)
- Update format created by "build artifacts" workflows (#2470) (@Snarling)
- Consolidate checks under getFailureResult() (#2476) (@d0sboots)
- Fix: Global states are not reset properly between each Jest test (#2487) (@catloversg)
- Change getFailureResult to checkDarknetServer (#2494) (@d0sboots)
- Speed up by-ip lookups by introducing a new map entry (#2488) (@d0sboots)
- Refactor/adjust getPixelPosition in darknet UI code (#2501) (@d0sboots)
- Add tests for checking getAnswer and solver of coding contracts (#2503) (@catloversg)
- Refactor ImportSave component (#2505) (@catloversg)
- Show coding contract names when their tests failed (#2520) (@catloversg)
- Workflow: Fix wrong instruction of generating docs (#2522) (@catloversg)
- Update comment of LoadingScreen of ComplexPage enum (#2527) (@catloversg)
- Make getPlayer 10x faster (#2548) (@d0sboots)
- Create monaco editor instance with null model (#2563) (@catloversg)
- Update dependencies (#2576) (@catloversg)
- Remove barrel imports in Bladeburner code (#2580) (@catloversg)
- Fix React warning in IPvGO scoring explanation popup (#2581) (@catloversg)
- Update Babel core, presets and module loader for webpack (#2585) (@catloversg)
- Add script to generate webpack bundle report (#2587) (@catloversg)
- Update Electron (#2591) (@catloversg)
- Mitigate issue of forcefullyCrashRenderer (#2597) (@catloversg)
- Split Settings.ts to reduce number of imports (#2600) (@catloversg)
- Remove duplicate random alphanumeric string functions (#2601) (@catloversg)
- Update comments to reflect changes in #2603 (#2606) (@catloversg)
- Replace ipExists() linear scan with O(1) Map.has() (#2621) (@lstutzman)
- Refactor and fix issues in db.ts (#2623) (@catloversg)
- Add dependency array to TerminalInput keydown useEffect (#2620) (@lstutzman)
- Add dependency array to GameRoot useEffect (#2617) (@lstutzman)
- Dev menu: Initialize dark net data when setting SF15 level (#2632) (@catloversg)
- Use type-only imports in ArrayHelpers.ts (#2630) (@catloversg)
- Remove redundant "$" from JS/TS regex in webpack config (#2649) (@catloversg)
- Allow specifying commit hash id when building artifacts (#2652) (@catloversg)
- Fix passive event listener warning (#2671) (@catloversg)
- Ignore .DS_Store files when generating pages.ts (#2685) (@catloversg)
- Consistently check when to show intelligence skill (#2692) (@catloversg)
- Fix api-extractor warnings (#2701) (@catloversg)
- Add comments explaining redundant check in product calculation (#2705) (@catloversg)
- Update action versions (#2718) (@Snarling)
- Remove duplicate getStockFromSymbol function (#2725) (@catloversg)
- Update game version (#2732) (@catloversg)
- Harden saving to avoid save data corruption (#2755) (@catloversg)
`,
} as const;
+20 -3
View File
@@ -1,4 +1,5 @@
import type { _ValueOf, DarknetServerData } from "@nsdefs";
import type { _ValueOf, DarknetServerDetails } from "@nsdefs";
import type { DarknetServerData } from "./utils/darknetServerUtils";
export const HORIZONTAL_CONNECTION_CHANCE = 0.5;
export const VERTICAL_CONNECTION_CHANCE = 0.3;
@@ -67,7 +68,7 @@ export const ResponseCodeEnum = {
ServiceUnavailable: 503,
} as const;
export const exampleDarknetServerData: DarknetServerData = {
export const exampleDarknetServerData = {
hostname: "",
ip: "",
hasAdminRights: false,
@@ -87,4 +88,20 @@ export const exampleDarknetServerData: DarknetServerData = {
logTrafficInterval: -1,
isStationary: false,
purchasedByPlayer: false,
} as const;
} as const satisfies DarknetServerData;
export const exampleDarknetServerDetails = {
isConnectedToCurrentServer: false,
hasSession: false,
modelId: exampleDarknetServerData.modelId,
passwordHint: exampleDarknetServerData.staticPasswordHint,
data: exampleDarknetServerData.passwordHintData,
logTrafficInterval: exampleDarknetServerData.logTrafficInterval,
passwordLength: -1,
passwordFormat: "numeric",
blockedRam: exampleDarknetServerData.blockedRam,
difficulty: exampleDarknetServerData.difficulty,
requiredCharismaSkill: exampleDarknetServerData.requiredCharismaSkill,
depth: exampleDarknetServerData.depth,
isStationary: exampleDarknetServerData.isStationary,
} as const satisfies DarknetServerDetails;
+18 -6
View File
@@ -12,6 +12,7 @@ import type { DarknetServer } from "../../Server/DarknetServer";
import { resolveCacheFilePath } from "../../Paths/CacheFilePath";
import type { CacheResult } from "@nsdefs";
import { addClue, cctCooldownReached } from "./effects";
import { getBitNodeMultipliers } from "../../BitNode/BitNode";
export const generateCacheFilename = (isPhishingCache: boolean, prefix?: string) => {
const filenamePrefix = prefix ?? cachePrefixes[Math.floor(Math.random() * cachePrefixes.length)];
@@ -24,6 +25,9 @@ export const addCacheToServer = (server: DarknetServer, isPhishingCache: boolean
if (!cacheFilename) {
return { success: false, message: `Cannot generate path. prefix: ${prefix}` };
}
if (server.caches.includes(cacheFilename)) {
return { success: false, message: `Duplicate cache file: ${cacheFilename}` };
}
server.caches.push(cacheFilename);
return { success: true, cacheFilename };
};
@@ -41,11 +45,15 @@ export const getRewardFromCache = (server: DarknetServer, cacheName: string, sup
};
}
const rewards = [getMoneyReward, getProgramAndStockMarketRelatedRewards, getStockReward, getDataFileReward];
const rewards = [getProgramAndStockMarketRelatedRewards, getStockReward, getDataFileReward];
if (cacheName.endsWith(".d.cache")) {
// only include ccts from caches generated from phishing attacks
rewards.push(getCCTReward);
}
if (getBitNodeMultipliers(Player.bitNodeN, 1).DarknetMoneyMultiplier) {
// only include money reward if it is not disabled by the bn mults
rewards.push(getMoneyReward);
}
const reward = rewards[Math.floor(Math.random() * rewards.length)];
const result = reward(difficulty, server);
@@ -80,7 +88,7 @@ export const getCCTReward = (difficulty: number, server: DarknetServer): string
};
export const getMoneyReward = (difficulty: number): string => {
const sf15_3Factor = Player.activeSourceFileLvl(15) > 3 ? 1.5 : 1;
const sf15_3Factor = Player.activeSourceFileLvl(15) >= 3 ? 1.5 : 1;
const reward =
1.2 ** difficulty *
1e7 *
@@ -98,10 +106,14 @@ export const getStockReward = (difficulty: number): string => {
initStockMarket();
}
const stockSymbols = Object.keys(StockSymbol);
const randomStock = stockSymbols[Math.floor(Math.random() * stockSymbols.length)];
const shares = Math.floor(1 + difficulty * 5 + Math.random() * 10);
StockMarket[randomStock].playerShares += shares;
return `You have discovered a stock option cache containing ${shares} shares of ${randomStock}!`;
const stock = StockMarket[stockSymbols[Math.floor(Math.random() * stockSymbols.length)]];
const maxNewShares = stock.maxShares - stock.playerShares - stock.playerShortShares;
if (maxNewShares <= 0) {
return getMoneyReward(difficulty);
}
const shares = Math.min(Math.floor(1 + difficulty * 5 + Math.random() * 10), maxNewShares);
stock.playerShares += shares;
return `You have discovered a stock option cache containing ${shares} shares of ${stock.symbol}!`;
};
export const getDataFileReward = (difficulty: number, server: DarknetServer): string => {
+9 -15
View File
@@ -1,5 +1,5 @@
import { Player } from "@player";
import type { DarknetServerData, Person as IPerson } from "@nsdefs";
import type { Person as IPerson, DarknetServerDetails } from "@nsdefs";
import { AugmentationName, CompletedProgramName, LiteratureName } from "@enums";
import {
commonPasswordDictionary,
@@ -16,17 +16,16 @@ import { DarknetServer } from "../../Server/DarknetServer";
import { GenericResponseMessage, ModelIds, NET_WIDTH, ResponseCodeEnum } from "../Enums";
import { addCacheToServer } from "./cacheFiles";
import { populateDarknet } from "../controllers/NetworkGenerator";
import { getDarknetServer } from "../utils/darknetServerUtils";
import { type DarknetServerData, getDarknetServer } from "../utils/darknetServerUtils";
import {
getAllMovableDarknetServers,
getBackdooredDarknetServers,
getNearbyNonEmptyPasswordServer,
getStasisLinkServers,
} from "../utils/darknetNetworkUtils";
import { getSharedChars, getTwoCharsInPassword } from "../utils/darknetAuthUtils";
import { getTwoCharsInPassword } from "../utils/darknetAuthUtils";
import { getTorRouter } from "../../Server/ServerHelpers";
import { DarknetConstants } from "../Constants";
import { GetServer } from "../../Server/AllServers";
import { isLabyrinthServer } from "./labyrinth";
import { NetscriptContext } from "../../Netscript/APIWrapper";
import { helpers } from "../../Netscript/NetscriptHelpers";
@@ -54,15 +53,15 @@ export const handleFailedAuth = (server: DarknetServer, threads: number) => {
* Returns the time it takes to authenticate on a server in milliseconds
* @param darknetServerData - the target server to attempt a password on
* @param person - the player's character
* @param attemptedPassword - the password being attempted
* @param correctCharsInPassword - the number of correct characters in the password. Only used for TimingAttack servers, where it adds some small auth time delay per char
* @param threads - the number of threads used for the password attempt (which speeds up the process)
* @param linear - if true, the time scaling is linear with the number of threads instead of having diminishing returns
*/
export const calculateAuthenticationTime = (
darknetServerData: DarknetServerData,
darknetServerData: DarknetServerData | DarknetServerDetails,
person: IPerson = Player,
threads = 1,
attemptedPassword = "",
correctCharsInPassword = 0,
linear = false,
) => {
const chaRequired = darknetServerData.requiredCharismaSkill;
@@ -83,13 +82,8 @@ export const calculateAuthenticationTime = (
const time =
baseTime * skillFactor * backdoorFactor * underleveledFactor * hasBootsFactor * hasSf15_2Factor * threadsFactor;
// We need to call GetServer and check if it's a dnet server later because this function can be called by formulas
// APIs (darknetServerData.hostname may be an invalid hostname).
const server = GetServer(darknetServerData.hostname);
const password = server instanceof DarknetServer ? server.password : "";
// Add extra time for timing attack server, per correct character
const sharedChars =
darknetServerData.modelId === ModelIds.TimingAttack ? getSharedChars(password, attemptedPassword) : 0;
const sharedChars = darknetServerData.modelId === ModelIds.TimingAttack ? correctCharsInPassword : 0;
const sharedCharsExtraTime = sharedChars * 50 * threadsFactor;
return time * calculateIntelligenceBonus(person.skills.intelligence, 0.25) + sharedCharsExtraTime;
@@ -131,7 +125,7 @@ export const addClue = (server: DarknetServer) => {
// Basic mechanics hints
if ((Math.random() < 0.7 && server.difficulty <= 3) || Math.random() < 0.1) {
const hint: LiteratureName = hintLiterature[Math.floor(Math.random() * hintLiterature.length)];
if (hint) {
if (hint && !server.messages.includes(hint)) {
server.messages.push(hint);
}
}
@@ -261,7 +255,7 @@ export const chargeServerMigration = (server: DarknetServer, threads = 1) => {
xpGained: xpGained,
};
if (newCharge >= 1) {
moveDarknetServer(server, -2, 4);
moveDarknetServer(server, 2, 4);
DarknetState.migrationInductionServers.set(server.hostname, 0);
}
return result;
+1 -1
View File
@@ -270,7 +270,7 @@ export const handleLabyrinthPassword = (
return {
passwordAttempted: attemptedPassword,
code: ResponseCodeEnum.Success,
message: "You have discovered the end the labyrinth.",
message: "You have discovered the end of the labyrinth.",
data: labServer.password,
};
}
+7 -2
View File
@@ -8,11 +8,12 @@ import { addCacheToServer } from "./cacheFiles";
import { DarknetState } from "../models/DarknetState";
import { getAllMovableDarknetServers } from "../utils/darknetNetworkUtils";
import { CompletedProgramName } from "@enums";
import type { DarknetServerData, Person as IPerson } from "@nsdefs";
import type { Person as IPerson, DarknetServerDetails } from "@nsdefs";
import { clampNumber } from "../../utils/helpers/clampNumber";
import { ResponseCodeEnum } from "../Enums";
import { isLabyrinthServer } from "./labyrinth";
import { roundToTwo } from "../../utils/helpers/roundToTwo";
import type { DarknetServerData } from "../utils/darknetServerUtils";
/*
* Handles the effects of removing some blocked RAM from a Darknet server.
@@ -67,7 +68,11 @@ export const handleRamBlockClearedRewards = (server: DarknetServer) => {
/*
* Calculates the amount of RAM block that is removed from a Darknet server, based on the number of threads and the player's charisma.
*/
export const getRamBlockRemoved = (darknetServerData: DarknetServerData, threads = 1, player: IPerson = Player) => {
export const getRamBlockRemoved = (
darknetServerData: DarknetServerData | DarknetServerDetails,
threads = 1,
player: IPerson = Player,
) => {
const difficulty = darknetServerData.difficulty;
const remainingRamBlock = darknetServerData.blockedRam;
const charismaFactor = 1 + player.skills.charisma / 100;
+13 -4
View File
@@ -18,6 +18,7 @@ import { hasFullDarknetAccess } from "../effects/effects";
import { getFriendlyType, TypeAssertionError } from "../../utils/TypeAssertion";
import { isIPAddress } from "../../Types/strings";
import { roundToTwo } from "../../utils/helpers/roundToTwo";
import { safelyReverseString } from "../../utils/StringHelperFunctions";
export type PasswordResponse = {
code: DarknetResponseCode;
@@ -158,11 +159,11 @@ const decorateName = (name: string): string => {
const connector = connectors[Math.floor(Math.random() * connectors.length)];
if (Math.random() < 0.3) {
updatedName = l33tifyName(name);
updatedName = l33tifyName(updatedName);
}
if (Math.random() < 0.05) {
updatedName = updatedName.split("").reverse().join("");
updatedName = safelyReverseString(updatedName);
}
if (Math.random() < 0.1) {
@@ -180,7 +181,11 @@ const decorateName = (name: string): string => {
}
} while (GetServer(updatedName) !== null);
return updatedName;
// Defensive coding. All operations above preserve well-formed UTF-16, so this is currently redundant. It's a
// safeguard to ensure the function never returns ill-formed UTF-16 if future changes introduce code unitlevel
// manipulation.
// This normalization is lossy (lone surrogates -> U+FFFD).
return updatedName.toWellFormed();
};
const l33tifyName = (name: string): string => {
@@ -191,7 +196,11 @@ const l33tifyName = (name: string): string => {
const replacement: string = l33t[char] ?? "";
updatedName = updatedName.replaceAll(char, replacement);
}
return updatedName;
// Defensive coding. All operations above preserve well-formed UTF-16, so this is currently redundant. It's a
// safeguard to ensure the function never returns ill-formed UTF-16 if future changes introduce code unitlevel
// manipulation.
// This normalization is lossy (lone surrogates -> U+FFFD).
return updatedName.toWellFormed();
};
const getMaxRam = (difficulty: number): number => {
-2
View File
@@ -209,8 +209,6 @@ export const presetNames = [
"Anor_Londo",
"The_Painted_World",
"The_Depths",
"__proto__",
"constructor",
] as const;
export const ServerNamePrefixes = [
+47
View File
@@ -19,3 +19,50 @@ export function getDarknetServerOrThrow(host: string): DarknetServer {
}
return server;
}
/**
* Darknet server data.
*/
export interface DarknetServerData {
/** Hostname. Must be unique */
hostname: string;
/** IP Address. Must be unique */
ip: string;
/** Flag indicating whether the player has admin/root access to this server */
hasAdminRights: boolean;
/** Flag indicating whether the player's terminal is currently connected to this server */
isConnectedTo: boolean;
/** Number of CPU cores */
cpuCores: number;
/** Used RAM (GB). i.e. unavailable RAM */
ramUsed: number;
/** Max RAM (GB) of this server */
maxRam: number;
/** Flag indicating whether this server has a backdoor installed by the player */
backdoorInstalled: boolean;
/** If the server has a stasis link applied */
hasStasisLink: boolean;
/** The amount of ram blocked by the server owner */
blockedRam: number;
/**
* The model of the server. Similar models have similar vulnerabilities. The model list is intentionally undocumented.
* You are supposed to experiment and discover the models.
*/
modelId: string;
/** The generic password prompt for the server */
staticPasswordHint: string;
/** Data associated with the password hint */
passwordHintData: string;
/** The difficulty rating of the server, associated with its original depth in the net */
difficulty: number;
/** The depth of the server in the net */
depth: number;
/** The charisma skill required to heartbleed the server */
requiredCharismaSkill: number;
/** The interval at which the server periodically adds to its logs, in seconds. */
logTrafficInterval: number;
/** If this darknet server cannot be moved. True for fixed/story servers. */
isStationary: boolean;
/** Whether this server was purchased by the player. Always false for darknet servers */
purchasedByPlayer: boolean;
}
+1 -1
View File
@@ -39,7 +39,7 @@ Once you have enough ports opened on a [server](servers.md) and have ran the NUK
### For specific details of how Hacking work "offline"
See [Offline And Bonus Time](../advanced/offlineandbonustime.md).
See [Offline And Bonus Time](../programming/offlineandbonustime.md).
## General Hacking Mechanics
+1 -1
View File
@@ -17,7 +17,7 @@ Scripts can be run on any [server](servers.md) you have root access to, but not
Being actual JavaScript, Bitburner also contains some quirks and limitations.
For this reason, it is not possible for Bitburner scripts to run the same way at all times.
However, you will continue to earn money and exp when Bitburner is not running, though at a slower rate.
See [How Scripts Work Offline](../advanced/offlineandbonustime.md) for more details.
See [How Scripts Work Offline](../programming/offlineandbonustime.md) for more details.
## Identifying a Script
+55
View File
@@ -1,5 +1,58 @@
# Changelog
## v3.0.1: 17 May 2026
### BREAKING CHANGES
- Change getServer return type; rename getServerAuthDetails and add missing dnet properties (#2746) (@ficocelliguy)
### MISC
- Cache reward fixes (#2731) (@ficocelliguy)
- Fix typo in darknet authentication response message (#2734) (@catloversg)
- Fix: Tutorial links to outdated faq url (#2733) (@catloversg)
- Fix: Player can switch tabs without losing focus on current work (#2724) (@catloversg)
- Add new command to upload a directory (#2659) (@hexagonrecursion)
- Add HJKL key mappings for infiltration arrows (#2742) (@mahlquistj)
- Prevent generating malformed darknet server hostname (#2744) (@catloversg)
- Support angle bracket type assertions in RAM calculation (#2751) (@catloversg)
- Fix typo in augmentation description (#2760) (@gmcew)
- Reduce the RAM cost of ns.rm() to match ns.scp() (#2761) (@NagaOuroboros)
- Temporarily remove darknet servers with unusual hostnames (#2757) (@catloversg)
- Fix: Duplicate .lit and .cache files can be generated in dnet (#2763) (@catloversg)
- Allow getFunctionRamCost to get base RAM cost for scripts (#2771) (@Mathekatze)
### DOCUMENTATION
- Remove TS type annotation from doc example script (#2721) (@ficocelliguy)
- Update list of RFA community tools (#2722) (@CTNOriginals)
- Fix incorrect cloud API example (#2738) (@catloversg)
- Remove non-existent influence namespace in Darknet documentation (#2748) (@Berdes)
- Remove spoiler for Offline scripts and bonus time page and make it accessible early-game (#2749) (@Berdes)
- Clarify ns.scp and ns.isRunning (#2769) (@catloversg)
### SPOILER CHANGES - UI
- Show hints of Gang mechanic in pre-endgame (#2723) (@catloversg)
- Break out Darknet BN and player mults as separate entries (#2745) (@gmcew)
### SPOILER CHANGES - MISC
- Cancel faction work instead of finishing it when creating gang (#2726) (@catloversg)
- Lower darknet BN money mults on hard nodes (#2743) (@ficocelliguy)
- Change getDarkwebPrograms return type to ProgramName[] (#2754) (@catloversg)
- Fix: getAugmentationBasePrice ignores bitnode mult for SoA augs (#2756) (@SAY-5)
- Rebalance hash base cost of generating coding contract (#2759) (@gmcew)
- Ensure induceServerMigration moves servers randomly (#2767) (@catloversg)
- Do not decrease player reputation when failing bladeburner actions (#2768) (@catloversg)
### CODEBASE/REFACTOR/WORKFLOW/JEST/TOOL/DEPS
- Update action versions (#2718) (@Snarling)
- Remove duplicate getStockFromSymbol function (#2725) (@catloversg)
- Update game version (#2732) (@catloversg)
- Harden saving to avoid save data corruption (#2755) (@catloversg)
## v3.0.0: 1 May 2026
### BREAKING CHANGES
@@ -462,3 +515,5 @@
- Consistently check when to show intelligence skill (#2692) (@catloversg)
- Fix api-extractor warnings (#2701) (@catloversg)
- Add comments explaining redundant check in product calculation (#2705) (@catloversg)
- Update tests related to calculateExp and clampNumber (#2713) (@catloversg)
- Update Electron (#2712) (@catloversg)
@@ -377,7 +377,7 @@ Paste the following code into the [Script](../basic/scripts.md) editor:
// amount of servers
while (i < ns.cloud.getServerLimit()) {
// Check if we have enough money to purchase access to a server
if (ns.getServerMoneyAvailable("home") > ns.cloud.getRamLimit(ram)) {
if (ns.getServerMoneyAvailable("home") > ns.cloud.getServerCost(ram)) {
// If we have enough money, then:
// 1. Purchase the server
// 2. Copy our hacking script onto the newly purchased cloud server
+1 -1
View File
@@ -28,8 +28,8 @@
## Advanced Mechanics
- [Hacking algorithms](programming/hackingalgorithms.md)
- [Offline scripts and bonus time](programming/offlineandbonustime.md)
- [List of factions and their requirements](advanced/faction_list.md)
- [Offline scripts and bonus time](advanced/offlineandbonustime.md)
- [BitNodes](advanced/bitnodes.md)
- [BitNode recommendation - Short guide](advanced/bitnode_recommendation_short_guide.md)
- [BitNode recommendation - Comprehensive guide](advanced/bitnode_recommendation_comprehensive_guide.md)
+13 -12
View File
@@ -20,12 +20,12 @@ In some cases, the only way to get to deeper parts of the net is to hitch a ride
**There is an example starter script at the bottom of this document, to see some of these API methods in action.**
- `dnet.getServerAuthDetails(hostname)` tells you a server's password hint and format, and if the server is offline or connected to the current server.
- `dnet.getServerDetails(hostname)` tells you a server's password hint and format, and if the server is offline or connected to the current server.
- `ns.dnet.probe()` lets you find darknet servers directly connected to your current server. Use this to find targets to crack and copy your script onto.
- `await ns.dnet.authenticate(hostname, password)` lets you guess and check passwords for servers directly connected to your script's server. If you guess right, you get admin access and can use `exec` and `scp` to move scripts onto that server.
- Some servers require interactive feedback to guess their password. Use `await ns.dnet.heartbleed(hostname)` to check that server's logs and get clues after you attempt a password.
- `ns.dnet.connectToSession(hostName, password)` lets you use a password you already know to log in to a darknet server at a distance. This is required to scp files there.
- Some servers will have part of their max ram blocked off. Use `ns.dnet.influence.memoryReallocation()` to free it.
- Some servers will have part of their max ram blocked off. Use `ns.dnet.memoryReallocation()` to free it.
- Some servers have valuable .cache files you can open with `ns.dnet.openCache(fileName)`
- Darknet servers allow you to run `ns.dnet.phishingAttack()` to get money or .cache files based off of your charisma and crime success stat.
- Using `ns.dnet.setStasisLink()` will stasis lock the current server. This prevents it from moving or going offline, and also allows getting a session on the server at a distance like backdooring does.
@@ -86,12 +86,12 @@ Darknet servers cannot simply be broken into with a few port openers you can buy
### Cracking servers with dnet.authenticate and dnet.heartbleed
Darknet servers require a password to interact with. To get started, use `dnet.getServerAuthDetails` to find out critical information about a server. It will give a hint to the password, and tell you if the server is still online.
Darknet servers require a password to interact with. To get started, use `dnet.getServerDetails` to find out critical information about a server. It will give a hint to the password, and tell you if the server is still online.
You can use `await ns.dnet.authenticate` to check if a guessed password is correct. (Remember to await it, network requests take time!) The higher your charisma, the faster you can smooth-talk your way through these vulnerable servers' security. Using more threads also speeds up this process. It may be faster to divide up the work across multiple scripts, if you can coordinate them. (Note that **`dnet.authenticate` can only target nearby connected servers**. You can verify if a server is connected to the current one using `dnet.probe` or `dnet.getServerAuthDetails`.)
You can use `await ns.dnet.authenticate` to check if a guessed password is correct. (Remember to await it, network requests take time!) The higher your charisma, the faster you can smooth-talk your way through these vulnerable servers' security. Using more threads also speeds up this process. It may be faster to divide up the work across multiple scripts, if you can coordinate them. (Note that **`dnet.authenticate` can only target nearby connected servers**. You can verify if a server is connected to the current one using `dnet.probe` or `dnet.getServerDetails`.)
```js
const details = ns.dnet.getServerAuthDetails(hostname);
const details = ns.dnet.getServerDetails(hostname);
if (!details.isConnectedToCurrentServer || !details.isOnline) {
/* If the server isn't connected or is offline, we can't authenticate */
return false;
@@ -123,12 +123,12 @@ Darknet servers are password-protected. This means that you will need to get a s
Once you have authenticated, other scripts can then connect to that same server using `dnet.connectToSession` and the password for the server. This is synchronous and can be done at any distance, meaning you don't have to wait for an authenticate call.
`scp` file transfers can be performed at any distance once you have established a session. However, `exec` also requires the script to either be run from a server adjacent to and connected to the target server, or a backdoor or stasis link on the target server. You can identify direct connections using `probe` or `getServerAuthDetails`.
`scp` file transfers can be performed at any distance once you have established a session. However, `exec` also requires the script to either be run from a server adjacent to and connected to the target server, or a backdoor or stasis link on the target server. You can identify direct connections using `probe` or `getServerDetails`.
```js
// the darknet server in "hostname" must be either backdoored, stasis linked, or directly connected to the server this script is running on
// to allow exec calls from the current server
if (ns.dnet.getServerAuthDetails(hostname).isConnectedToCurrentServer) {
if (ns.dnet.getServerDetails(hostname).isConnectedToCurrentServer) {
ns.dnet.connectToSession(hostname, previouslyDiscoveredPassword);
ns.scp("my_script.js", hostname);
ns.exec("my_script.js", hostname, {
@@ -214,7 +214,7 @@ export async function main(ns) {
*/
export const serverSolver = async (ns, hostname) => {
// Get key info about the server, so we know what kind it is and how to authenticate with it
const details = ns.dnet.getServerAuthDetails(hostname);
const details = ns.dnet.getServerDetails(hostname);
if (!details.isConnectedToCurrentServer || !details.isOnline) {
// If the server isn't connected or is offline, we can't authenticate
return false;
@@ -240,7 +240,7 @@ export const serverSolver = async (ns, hostname) => {
/** Authenticates on 'ZeroLogon' type servers, which always have an empty password.
* @param {NS} ns
* @param {string} hostname - the name of the server to attempt to authorize on
* @param {string} hostname - the name of the server to attempt to authorize on
*/
const authenticateWithNoPassword = async (ns, hostname) => {
const result = await ns.dnet.authenticate(hostname, "");
@@ -248,9 +248,10 @@ const authenticateWithNoPassword = async (ns, hostname) => {
return result.success;
};
// This lets you tab-complete putting "--tail" on the run command so you can see the script logs as it runs, if you want
// If you add support to the script to take other arguments, you can add them here as well for convenience
export function autocomplete(data: AutocompleteData) {
/** This lets you tab-complete putting "--tail" on the run command so you can see the script logs as it runs, if you want
* If you add support to the script to take other arguments, you can add them here as well for convenience
* @param {AutocompleteData} data */
export function autocomplete(data) {
return ["--tail"];
}
```
@@ -37,7 +37,7 @@ Common infinite loop when translating the server purchasing script in starting g
let i = ns.cloud.getServerNames().length;
while (i < ns.cloud.getServerLimit()) {
if (ns.getServerMoneyAvailable("home") > ns.cloud.getRamLimit(ram)) {
if (ns.getServerMoneyAvailable("home") > ns.cloud.getServerCost(ram)) {
const hostname = ns.cloud.purchaseServer("cloud-server-" + i, ram);
ns.scp("early-hack-template.js", hostname);
ns.exec("early-hack-template.js", hostname, 3);
@@ -24,4 +24,4 @@ Also, note that because of the way the JavaScript engine works, whenever you rel
Because of the above details, some activities in Bitburner accumulate "Bonus Time" while the game is closed or in an inactive browser tab. For mechanics that have a Bonus Time effect, the rate of the associated activity or task is significantly increased.
For example, if a certain [Bladeburner](bladeburners.md) contract requires 15 seconds to complete under normal conditions, the same task will be finished instead in 3 seconds if the Bonus Time effect is 5x. The specific details and effects of Bonus Time vary by mechanic.
For example, if your opponent in [IPvGO](../programming/go_algorithms.md) takes 1 second to play a move under normal conditions, it will only take 200ms if the Bonus Time effect is 5x. The specific details and effects of Bonus Time vary by mechanic.
@@ -13,11 +13,13 @@ All these tools support synchronizing scripts to Bitburner and transpiling TypeS
Links:
- https://github.com/bitburner-official/typescript-template
- https://github.com/Tanimodori/viteburner
- https://github.com/shyguy1412/bb-external-editor
- [typescript-template](https://github.com/bitburner-official/typescript-template): A template for synchronizing Typescript/Javascript from your computer to the game.
- [viteburner](https://github.com/Tanimodori/viteburner): Daemon tools of bitburner using vite for script transform, file syncing, RAM monitoring and more!
- [bb-external-editor](https://github.com/shyguy1412/bb-external-editor): This tool uses esbuild to transpile and bundle your scripts. It supports JS, TS and React as well as importing from any browser-compatible npm library out of the box.
- [BitburnerGoFilesync](https://github.com/CTNOriginals/BitburnerGoFilesync): A standalone binary cli tool that doesn't require any setup or third party libraries. It is designed to be very minimal and easy to use out of the box.
`typescript-template` has a small set of options and features. Its simplicity is by design. `viteburner` and `bb-external-editor` have more fancy features.
`typescript-template` and `BitburnerGoFilesync` both have a small set of options and features, their simplicity is by design.
`viteburner` and `bb-external-editor` have more fancy features and may offer more control for specific use cases.
## Troubleshooting tips
+106 -136
View File
@@ -26,44 +26,44 @@ import file23 from "./doc/en/advanced/gang.md?raw";
import file24 from "./doc/en/advanced/grafting.md?raw";
import file25 from "./doc/en/advanced/hacknetservers.md?raw";
import file26 from "./doc/en/advanced/intelligence.md?raw";
import file27 from "./doc/en/advanced/offlineandbonustime.md?raw";
import file28 from "./doc/en/advanced/sleeves.md?raw";
import file29 from "./doc/en/advanced/sourcefiles.md?raw";
import file30 from "./doc/en/advanced/stanek.md?raw";
import file31 from "./doc/en/basic/augmentations.md?raw";
import file32 from "./doc/en/basic/autocomplete.md?raw";
import file33 from "./doc/en/basic/codingcontracts.md?raw";
import file34 from "./doc/en/basic/companies.md?raw";
import file35 from "./doc/en/basic/crimes.md?raw";
import file36 from "./doc/en/basic/factions.md?raw";
import file37 from "./doc/en/basic/hacking.md?raw";
import file38 from "./doc/en/basic/hacknet_nodes.md?raw";
import file39 from "./doc/en/basic/infiltration.md?raw";
import file40 from "./doc/en/basic/programs.md?raw";
import file41 from "./doc/en/basic/ram.md?raw";
import file42 from "./doc/en/basic/reputation.md?raw";
import file43 from "./doc/en/basic/scripts.md?raw";
import file44 from "./doc/en/basic/servers.md?raw";
import file45 from "./doc/en/basic/stats.md?raw";
import file46 from "./doc/en/basic/stockmarket.md?raw";
import file47 from "./doc/en/basic/terminal.md?raw";
import file48 from "./doc/en/basic/world.md?raw";
import file49 from "./doc/en/changelog-v0.md?raw";
import file50 from "./doc/en/changelog-v1.md?raw";
import file51 from "./doc/en/changelog-v2.md?raw";
import file52 from "./doc/en/changelog.md?raw";
import file53 from "./doc/en/help/faq.md?raw";
import file54 from "./doc/en/help/getting_started.md?raw";
import file55 from "./doc/en/help/tools_and_resources.md?raw";
import file56 from "./doc/en/index.md?raw";
import file57 from "./doc/en/migrations/ns2.md?raw";
import file58 from "./doc/en/migrations/v1.md?raw";
import file59 from "./doc/en/migrations/v2.md?raw";
import file60 from "./doc/en/programming/darknet.md?raw";
import file61 from "./doc/en/programming/game_frozen.md?raw";
import file62 from "./doc/en/programming/go_algorithms.md?raw";
import file63 from "./doc/en/programming/hackingalgorithms.md?raw";
import file64 from "./doc/en/programming/learn.md?raw";
import file27 from "./doc/en/advanced/sleeves.md?raw";
import file28 from "./doc/en/advanced/sourcefiles.md?raw";
import file29 from "./doc/en/advanced/stanek.md?raw";
import file30 from "./doc/en/basic/augmentations.md?raw";
import file31 from "./doc/en/basic/autocomplete.md?raw";
import file32 from "./doc/en/basic/codingcontracts.md?raw";
import file33 from "./doc/en/basic/companies.md?raw";
import file34 from "./doc/en/basic/crimes.md?raw";
import file35 from "./doc/en/basic/factions.md?raw";
import file36 from "./doc/en/basic/hacking.md?raw";
import file37 from "./doc/en/basic/hacknet_nodes.md?raw";
import file38 from "./doc/en/basic/infiltration.md?raw";
import file39 from "./doc/en/basic/programs.md?raw";
import file40 from "./doc/en/basic/ram.md?raw";
import file41 from "./doc/en/basic/reputation.md?raw";
import file42 from "./doc/en/basic/scripts.md?raw";
import file43 from "./doc/en/basic/servers.md?raw";
import file44 from "./doc/en/basic/stats.md?raw";
import file45 from "./doc/en/basic/stockmarket.md?raw";
import file46 from "./doc/en/basic/terminal.md?raw";
import file47 from "./doc/en/basic/world.md?raw";
import file48 from "./doc/en/changelog-v0.md?raw";
import file49 from "./doc/en/changelog-v1.md?raw";
import file50 from "./doc/en/changelog-v2.md?raw";
import file51 from "./doc/en/changelog.md?raw";
import file52 from "./doc/en/help/faq.md?raw";
import file53 from "./doc/en/help/getting_started.md?raw";
import file54 from "./doc/en/help/tools_and_resources.md?raw";
import file55 from "./doc/en/index.md?raw";
import file56 from "./doc/en/migrations/ns2.md?raw";
import file57 from "./doc/en/migrations/v1.md?raw";
import file58 from "./doc/en/migrations/v2.md?raw";
import file59 from "./doc/en/programming/darknet.md?raw";
import file60 from "./doc/en/programming/game_frozen.md?raw";
import file61 from "./doc/en/programming/go_algorithms.md?raw";
import file62 from "./doc/en/programming/hackingalgorithms.md?raw";
import file63 from "./doc/en/programming/learn.md?raw";
import file64 from "./doc/en/programming/offlineandbonustime.md?raw";
import file65 from "./doc/en/programming/remote_api.md?raw";
import file66 from "./doc/en/programming/typescript_react.md?raw";
@@ -428,7 +428,7 @@ import nsDoc_bitburner_darknet_connecttosession_md from "../../markdown/bitburne
import nsDoc_bitburner_darknet_getblockedram_md from "../../markdown/bitburner.darknet.getblockedram.md?raw";
import nsDoc_bitburner_darknet_getdarknetinstability_md from "../../markdown/bitburner.darknet.getdarknetinstability.md?raw";
import nsDoc_bitburner_darknet_getdepth_md from "../../markdown/bitburner.darknet.getdepth.md?raw";
import nsDoc_bitburner_darknet_getserverauthdetails_md from "../../markdown/bitburner.darknet.getserverauthdetails.md?raw";
import nsDoc_bitburner_darknet_getserverdetails_md from "../../markdown/bitburner.darknet.getserverdetails.md?raw";
import nsDoc_bitburner_darknet_getserverrequiredcharismalevel_md from "../../markdown/bitburner.darknet.getserverrequiredcharismalevel.md?raw";
import nsDoc_bitburner_darknet_getstasislinkedservers_md from "../../markdown/bitburner.darknet.getstasislinkedservers.md?raw";
import nsDoc_bitburner_darknet_getstasislinklimit_md from "../../markdown/bitburner.darknet.getstasislinklimit.md?raw";
@@ -456,26 +456,20 @@ import nsDoc_bitburner_darknetinstability_md from "../../markdown/bitburner.dark
import nsDoc_bitburner_darknetresponsecode_md from "../../markdown/bitburner.darknetresponsecode.md?raw";
import nsDoc_bitburner_darknetresponsecodetype_md from "../../markdown/bitburner.darknetresponsecodetype.md?raw";
import nsDoc_bitburner_darknetresult_md from "../../markdown/bitburner.darknetresult.md?raw";
import nsDoc_bitburner_darknetserverdata_backdoorinstalled_md from "../../markdown/bitburner.darknetserverdata.backdoorinstalled.md?raw";
import nsDoc_bitburner_darknetserverdata_blockedram_md from "../../markdown/bitburner.darknetserverdata.blockedram.md?raw";
import nsDoc_bitburner_darknetserverdata_cpucores_md from "../../markdown/bitburner.darknetserverdata.cpucores.md?raw";
import nsDoc_bitburner_darknetserverdata_depth_md from "../../markdown/bitburner.darknetserverdata.depth.md?raw";
import nsDoc_bitburner_darknetserverdata_difficulty_md from "../../markdown/bitburner.darknetserverdata.difficulty.md?raw";
import nsDoc_bitburner_darknetserverdata_hasadminrights_md from "../../markdown/bitburner.darknetserverdata.hasadminrights.md?raw";
import nsDoc_bitburner_darknetserverdata_hasstasislink_md from "../../markdown/bitburner.darknetserverdata.hasstasislink.md?raw";
import nsDoc_bitburner_darknetserverdata_hostname_md from "../../markdown/bitburner.darknetserverdata.hostname.md?raw";
import nsDoc_bitburner_darknetserverdata_ip_md from "../../markdown/bitburner.darknetserverdata.ip.md?raw";
import nsDoc_bitburner_darknetserverdata_isconnectedto_md from "../../markdown/bitburner.darknetserverdata.isconnectedto.md?raw";
import nsDoc_bitburner_darknetserverdata_isstationary_md from "../../markdown/bitburner.darknetserverdata.isstationary.md?raw";
import nsDoc_bitburner_darknetserverdata_logtrafficinterval_md from "../../markdown/bitburner.darknetserverdata.logtrafficinterval.md?raw";
import nsDoc_bitburner_darknetserverdata_maxram_md from "../../markdown/bitburner.darknetserverdata.maxram.md?raw";
import nsDoc_bitburner_darknetserverdata_md from "../../markdown/bitburner.darknetserverdata.md?raw";
import nsDoc_bitburner_darknetserverdata_modelid_md from "../../markdown/bitburner.darknetserverdata.modelid.md?raw";
import nsDoc_bitburner_darknetserverdata_passwordhintdata_md from "../../markdown/bitburner.darknetserverdata.passwordhintdata.md?raw";
import nsDoc_bitburner_darknetserverdata_purchasedbyplayer_md from "../../markdown/bitburner.darknetserverdata.purchasedbyplayer.md?raw";
import nsDoc_bitburner_darknetserverdata_ramused_md from "../../markdown/bitburner.darknetserverdata.ramused.md?raw";
import nsDoc_bitburner_darknetserverdata_requiredcharismaskill_md from "../../markdown/bitburner.darknetserverdata.requiredcharismaskill.md?raw";
import nsDoc_bitburner_darknetserverdata_staticpasswordhint_md from "../../markdown/bitburner.darknetserverdata.staticpasswordhint.md?raw";
import nsDoc_bitburner_darknetserverdetails_blockedram_md from "../../markdown/bitburner.darknetserverdetails.blockedram.md?raw";
import nsDoc_bitburner_darknetserverdetails_data_md from "../../markdown/bitburner.darknetserverdetails.data.md?raw";
import nsDoc_bitburner_darknetserverdetails_depth_md from "../../markdown/bitburner.darknetserverdetails.depth.md?raw";
import nsDoc_bitburner_darknetserverdetails_difficulty_md from "../../markdown/bitburner.darknetserverdetails.difficulty.md?raw";
import nsDoc_bitburner_darknetserverdetails_hassession_md from "../../markdown/bitburner.darknetserverdetails.hassession.md?raw";
import nsDoc_bitburner_darknetserverdetails_isconnectedtocurrentserver_md from "../../markdown/bitburner.darknetserverdetails.isconnectedtocurrentserver.md?raw";
import nsDoc_bitburner_darknetserverdetails_isstationary_md from "../../markdown/bitburner.darknetserverdetails.isstationary.md?raw";
import nsDoc_bitburner_darknetserverdetails_logtrafficinterval_md from "../../markdown/bitburner.darknetserverdetails.logtrafficinterval.md?raw";
import nsDoc_bitburner_darknetserverdetails_md from "../../markdown/bitburner.darknetserverdetails.md?raw";
import nsDoc_bitburner_darknetserverdetails_modelid_md from "../../markdown/bitburner.darknetserverdetails.modelid.md?raw";
import nsDoc_bitburner_darknetserverdetails_passwordformat_md from "../../markdown/bitburner.darknetserverdetails.passwordformat.md?raw";
import nsDoc_bitburner_darknetserverdetails_passwordhint_md from "../../markdown/bitburner.darknetserverdetails.passwordhint.md?raw";
import nsDoc_bitburner_darknetserverdetails_passwordlength_md from "../../markdown/bitburner.darknetserverdetails.passwordlength.md?raw";
import nsDoc_bitburner_darknetserverdetails_requiredcharismaskill_md from "../../markdown/bitburner.darknetserverdetails.requiredcharismaskill.md?raw";
import nsDoc_bitburner_division_awareness_md from "../../markdown/bitburner.division.awareness.md?raw";
import nsDoc_bitburner_division_cities_md from "../../markdown/bitburner.division.cities.md?raw";
import nsDoc_bitburner_division_industry_md from "../../markdown/bitburner.division.industry.md?raw";
@@ -1273,15 +1267,6 @@ import nsDoc_bitburner_server_servergrowth_md from "../../markdown/bitburner.ser
import nsDoc_bitburner_server_smtpportopen_md from "../../markdown/bitburner.server.smtpportopen.md?raw";
import nsDoc_bitburner_server_sqlportopen_md from "../../markdown/bitburner.server.sqlportopen.md?raw";
import nsDoc_bitburner_server_sshportopen_md from "../../markdown/bitburner.server.sshportopen.md?raw";
import nsDoc_bitburner_serverauthdetails_data_md from "../../markdown/bitburner.serverauthdetails.data.md?raw";
import nsDoc_bitburner_serverauthdetails_hassession_md from "../../markdown/bitburner.serverauthdetails.hassession.md?raw";
import nsDoc_bitburner_serverauthdetails_isconnectedtocurrentserver_md from "../../markdown/bitburner.serverauthdetails.isconnectedtocurrentserver.md?raw";
import nsDoc_bitburner_serverauthdetails_logtrafficinterval_md from "../../markdown/bitburner.serverauthdetails.logtrafficinterval.md?raw";
import nsDoc_bitburner_serverauthdetails_md from "../../markdown/bitburner.serverauthdetails.md?raw";
import nsDoc_bitburner_serverauthdetails_modelid_md from "../../markdown/bitburner.serverauthdetails.modelid.md?raw";
import nsDoc_bitburner_serverauthdetails_passwordformat_md from "../../markdown/bitburner.serverauthdetails.passwordformat.md?raw";
import nsDoc_bitburner_serverauthdetails_passwordhint_md from "../../markdown/bitburner.serverauthdetails.passwordhint.md?raw";
import nsDoc_bitburner_serverauthdetails_passwordlength_md from "../../markdown/bitburner.serverauthdetails.passwordlength.md?raw";
import nsDoc_bitburner_simpleopponentstats_md from "../../markdown/bitburner.simpleopponentstats.md?raw";
import nsDoc_bitburner_singularity_applytocompany_md from "../../markdown/bitburner.singularity.applytocompany.md?raw";
import nsDoc_bitburner_singularity_b1tflum3_md from "../../markdown/bitburner.singularity.b1tflum3.md?raw";
@@ -1649,44 +1634,44 @@ AllPages["en/advanced/gang.md"] = file23;
AllPages["en/advanced/grafting.md"] = file24;
AllPages["en/advanced/hacknetservers.md"] = file25;
AllPages["en/advanced/intelligence.md"] = file26;
AllPages["en/advanced/offlineandbonustime.md"] = file27;
AllPages["en/advanced/sleeves.md"] = file28;
AllPages["en/advanced/sourcefiles.md"] = file29;
AllPages["en/advanced/stanek.md"] = file30;
AllPages["en/basic/augmentations.md"] = file31;
AllPages["en/basic/autocomplete.md"] = file32;
AllPages["en/basic/codingcontracts.md"] = file33;
AllPages["en/basic/companies.md"] = file34;
AllPages["en/basic/crimes.md"] = file35;
AllPages["en/basic/factions.md"] = file36;
AllPages["en/basic/hacking.md"] = file37;
AllPages["en/basic/hacknet_nodes.md"] = file38;
AllPages["en/basic/infiltration.md"] = file39;
AllPages["en/basic/programs.md"] = file40;
AllPages["en/basic/ram.md"] = file41;
AllPages["en/basic/reputation.md"] = file42;
AllPages["en/basic/scripts.md"] = file43;
AllPages["en/basic/servers.md"] = file44;
AllPages["en/basic/stats.md"] = file45;
AllPages["en/basic/stockmarket.md"] = file46;
AllPages["en/basic/terminal.md"] = file47;
AllPages["en/basic/world.md"] = file48;
AllPages["en/changelog-v0.md"] = file49;
AllPages["en/changelog-v1.md"] = file50;
AllPages["en/changelog-v2.md"] = file51;
AllPages["en/changelog.md"] = file52;
AllPages["en/help/faq.md"] = file53;
AllPages["en/help/getting_started.md"] = file54;
AllPages["en/help/tools_and_resources.md"] = file55;
AllPages["en/index.md"] = file56;
AllPages["en/migrations/ns2.md"] = file57;
AllPages["en/migrations/v1.md"] = file58;
AllPages["en/migrations/v2.md"] = file59;
AllPages["en/programming/darknet.md"] = file60;
AllPages["en/programming/game_frozen.md"] = file61;
AllPages["en/programming/go_algorithms.md"] = file62;
AllPages["en/programming/hackingalgorithms.md"] = file63;
AllPages["en/programming/learn.md"] = file64;
AllPages["en/advanced/sleeves.md"] = file27;
AllPages["en/advanced/sourcefiles.md"] = file28;
AllPages["en/advanced/stanek.md"] = file29;
AllPages["en/basic/augmentations.md"] = file30;
AllPages["en/basic/autocomplete.md"] = file31;
AllPages["en/basic/codingcontracts.md"] = file32;
AllPages["en/basic/companies.md"] = file33;
AllPages["en/basic/crimes.md"] = file34;
AllPages["en/basic/factions.md"] = file35;
AllPages["en/basic/hacking.md"] = file36;
AllPages["en/basic/hacknet_nodes.md"] = file37;
AllPages["en/basic/infiltration.md"] = file38;
AllPages["en/basic/programs.md"] = file39;
AllPages["en/basic/ram.md"] = file40;
AllPages["en/basic/reputation.md"] = file41;
AllPages["en/basic/scripts.md"] = file42;
AllPages["en/basic/servers.md"] = file43;
AllPages["en/basic/stats.md"] = file44;
AllPages["en/basic/stockmarket.md"] = file45;
AllPages["en/basic/terminal.md"] = file46;
AllPages["en/basic/world.md"] = file47;
AllPages["en/changelog-v0.md"] = file48;
AllPages["en/changelog-v1.md"] = file49;
AllPages["en/changelog-v2.md"] = file50;
AllPages["en/changelog.md"] = file51;
AllPages["en/help/faq.md"] = file52;
AllPages["en/help/getting_started.md"] = file53;
AllPages["en/help/tools_and_resources.md"] = file54;
AllPages["en/index.md"] = file55;
AllPages["en/migrations/ns2.md"] = file56;
AllPages["en/migrations/v1.md"] = file57;
AllPages["en/migrations/v2.md"] = file58;
AllPages["en/programming/darknet.md"] = file59;
AllPages["en/programming/game_frozen.md"] = file60;
AllPages["en/programming/go_algorithms.md"] = file61;
AllPages["en/programming/hackingalgorithms.md"] = file62;
AllPages["en/programming/learn.md"] = file63;
AllPages["en/programming/offlineandbonustime.md"] = file64;
AllPages["en/programming/remote_api.md"] = file65;
AllPages["en/programming/typescript_react.md"] = file66;
@@ -2051,7 +2036,7 @@ AllPages["nsDoc/bitburner.darknet.connecttosession.md"] = nsDoc_bitburner_darkne
AllPages["nsDoc/bitburner.darknet.getblockedram.md"] = nsDoc_bitburner_darknet_getblockedram_md;
AllPages["nsDoc/bitburner.darknet.getdarknetinstability.md"] = nsDoc_bitburner_darknet_getdarknetinstability_md;
AllPages["nsDoc/bitburner.darknet.getdepth.md"] = nsDoc_bitburner_darknet_getdepth_md;
AllPages["nsDoc/bitburner.darknet.getserverauthdetails.md"] = nsDoc_bitburner_darknet_getserverauthdetails_md;
AllPages["nsDoc/bitburner.darknet.getserverdetails.md"] = nsDoc_bitburner_darknet_getserverdetails_md;
AllPages["nsDoc/bitburner.darknet.getserverrequiredcharismalevel.md"] = nsDoc_bitburner_darknet_getserverrequiredcharismalevel_md;
AllPages["nsDoc/bitburner.darknet.getstasislinkedservers.md"] = nsDoc_bitburner_darknet_getstasislinkedservers_md;
AllPages["nsDoc/bitburner.darknet.getstasislinklimit.md"] = nsDoc_bitburner_darknet_getstasislinklimit_md;
@@ -2079,26 +2064,20 @@ AllPages["nsDoc/bitburner.darknetinstability.md"] = nsDoc_bitburner_darknetinsta
AllPages["nsDoc/bitburner.darknetresponsecode.md"] = nsDoc_bitburner_darknetresponsecode_md;
AllPages["nsDoc/bitburner.darknetresponsecodetype.md"] = nsDoc_bitburner_darknetresponsecodetype_md;
AllPages["nsDoc/bitburner.darknetresult.md"] = nsDoc_bitburner_darknetresult_md;
AllPages["nsDoc/bitburner.darknetserverdata.backdoorinstalled.md"] = nsDoc_bitburner_darknetserverdata_backdoorinstalled_md;
AllPages["nsDoc/bitburner.darknetserverdata.blockedram.md"] = nsDoc_bitburner_darknetserverdata_blockedram_md;
AllPages["nsDoc/bitburner.darknetserverdata.cpucores.md"] = nsDoc_bitburner_darknetserverdata_cpucores_md;
AllPages["nsDoc/bitburner.darknetserverdata.depth.md"] = nsDoc_bitburner_darknetserverdata_depth_md;
AllPages["nsDoc/bitburner.darknetserverdata.difficulty.md"] = nsDoc_bitburner_darknetserverdata_difficulty_md;
AllPages["nsDoc/bitburner.darknetserverdata.hasadminrights.md"] = nsDoc_bitburner_darknetserverdata_hasadminrights_md;
AllPages["nsDoc/bitburner.darknetserverdata.hasstasislink.md"] = nsDoc_bitburner_darknetserverdata_hasstasislink_md;
AllPages["nsDoc/bitburner.darknetserverdata.hostname.md"] = nsDoc_bitburner_darknetserverdata_hostname_md;
AllPages["nsDoc/bitburner.darknetserverdata.ip.md"] = nsDoc_bitburner_darknetserverdata_ip_md;
AllPages["nsDoc/bitburner.darknetserverdata.isconnectedto.md"] = nsDoc_bitburner_darknetserverdata_isconnectedto_md;
AllPages["nsDoc/bitburner.darknetserverdata.isstationary.md"] = nsDoc_bitburner_darknetserverdata_isstationary_md;
AllPages["nsDoc/bitburner.darknetserverdata.logtrafficinterval.md"] = nsDoc_bitburner_darknetserverdata_logtrafficinterval_md;
AllPages["nsDoc/bitburner.darknetserverdata.maxram.md"] = nsDoc_bitburner_darknetserverdata_maxram_md;
AllPages["nsDoc/bitburner.darknetserverdata.md"] = nsDoc_bitburner_darknetserverdata_md;
AllPages["nsDoc/bitburner.darknetserverdata.modelid.md"] = nsDoc_bitburner_darknetserverdata_modelid_md;
AllPages["nsDoc/bitburner.darknetserverdata.passwordhintdata.md"] = nsDoc_bitburner_darknetserverdata_passwordhintdata_md;
AllPages["nsDoc/bitburner.darknetserverdata.purchasedbyplayer.md"] = nsDoc_bitburner_darknetserverdata_purchasedbyplayer_md;
AllPages["nsDoc/bitburner.darknetserverdata.ramused.md"] = nsDoc_bitburner_darknetserverdata_ramused_md;
AllPages["nsDoc/bitburner.darknetserverdata.requiredcharismaskill.md"] = nsDoc_bitburner_darknetserverdata_requiredcharismaskill_md;
AllPages["nsDoc/bitburner.darknetserverdata.staticpasswordhint.md"] = nsDoc_bitburner_darknetserverdata_staticpasswordhint_md;
AllPages["nsDoc/bitburner.darknetserverdetails.blockedram.md"] = nsDoc_bitburner_darknetserverdetails_blockedram_md;
AllPages["nsDoc/bitburner.darknetserverdetails.data.md"] = nsDoc_bitburner_darknetserverdetails_data_md;
AllPages["nsDoc/bitburner.darknetserverdetails.depth.md"] = nsDoc_bitburner_darknetserverdetails_depth_md;
AllPages["nsDoc/bitburner.darknetserverdetails.difficulty.md"] = nsDoc_bitburner_darknetserverdetails_difficulty_md;
AllPages["nsDoc/bitburner.darknetserverdetails.hassession.md"] = nsDoc_bitburner_darknetserverdetails_hassession_md;
AllPages["nsDoc/bitburner.darknetserverdetails.isconnectedtocurrentserver.md"] = nsDoc_bitburner_darknetserverdetails_isconnectedtocurrentserver_md;
AllPages["nsDoc/bitburner.darknetserverdetails.isstationary.md"] = nsDoc_bitburner_darknetserverdetails_isstationary_md;
AllPages["nsDoc/bitburner.darknetserverdetails.logtrafficinterval.md"] = nsDoc_bitburner_darknetserverdetails_logtrafficinterval_md;
AllPages["nsDoc/bitburner.darknetserverdetails.md"] = nsDoc_bitburner_darknetserverdetails_md;
AllPages["nsDoc/bitburner.darknetserverdetails.modelid.md"] = nsDoc_bitburner_darknetserverdetails_modelid_md;
AllPages["nsDoc/bitburner.darknetserverdetails.passwordformat.md"] = nsDoc_bitburner_darknetserverdetails_passwordformat_md;
AllPages["nsDoc/bitburner.darknetserverdetails.passwordhint.md"] = nsDoc_bitburner_darknetserverdetails_passwordhint_md;
AllPages["nsDoc/bitburner.darknetserverdetails.passwordlength.md"] = nsDoc_bitburner_darknetserverdetails_passwordlength_md;
AllPages["nsDoc/bitburner.darknetserverdetails.requiredcharismaskill.md"] = nsDoc_bitburner_darknetserverdetails_requiredcharismaskill_md;
AllPages["nsDoc/bitburner.division.awareness.md"] = nsDoc_bitburner_division_awareness_md;
AllPages["nsDoc/bitburner.division.cities.md"] = nsDoc_bitburner_division_cities_md;
AllPages["nsDoc/bitburner.division.industry.md"] = nsDoc_bitburner_division_industry_md;
@@ -2896,15 +2875,6 @@ AllPages["nsDoc/bitburner.server.servergrowth.md"] = nsDoc_bitburner_server_serv
AllPages["nsDoc/bitburner.server.smtpportopen.md"] = nsDoc_bitburner_server_smtpportopen_md;
AllPages["nsDoc/bitburner.server.sqlportopen.md"] = nsDoc_bitburner_server_sqlportopen_md;
AllPages["nsDoc/bitburner.server.sshportopen.md"] = nsDoc_bitburner_server_sshportopen_md;
AllPages["nsDoc/bitburner.serverauthdetails.data.md"] = nsDoc_bitburner_serverauthdetails_data_md;
AllPages["nsDoc/bitburner.serverauthdetails.hassession.md"] = nsDoc_bitburner_serverauthdetails_hassession_md;
AllPages["nsDoc/bitburner.serverauthdetails.isconnectedtocurrentserver.md"] = nsDoc_bitburner_serverauthdetails_isconnectedtocurrentserver_md;
AllPages["nsDoc/bitburner.serverauthdetails.logtrafficinterval.md"] = nsDoc_bitburner_serverauthdetails_logtrafficinterval_md;
AllPages["nsDoc/bitburner.serverauthdetails.md"] = nsDoc_bitburner_serverauthdetails_md;
AllPages["nsDoc/bitburner.serverauthdetails.modelid.md"] = nsDoc_bitburner_serverauthdetails_modelid_md;
AllPages["nsDoc/bitburner.serverauthdetails.passwordformat.md"] = nsDoc_bitburner_serverauthdetails_passwordformat_md;
AllPages["nsDoc/bitburner.serverauthdetails.passwordhint.md"] = nsDoc_bitburner_serverauthdetails_passwordhint_md;
AllPages["nsDoc/bitburner.serverauthdetails.passwordlength.md"] = nsDoc_bitburner_serverauthdetails_passwordlength_md;
AllPages["nsDoc/bitburner.simpleopponentstats.md"] = nsDoc_bitburner_simpleopponentstats_md;
AllPages["nsDoc/bitburner.singularity.applytocompany.md"] = nsDoc_bitburner_singularity_applytocompany_md;
AllPages["nsDoc/bitburner.singularity.b1tflum3.md"] = nsDoc_bitburner_singularity_b1tflum3_md;
+6
View File
@@ -40,6 +40,8 @@ import { CONSTANTS } from "../Constants";
import { BladeburnerConstants } from "../Bladeburner/data/Constants";
import type { PlayerObject } from "../PersonObjects/Player/PlayerObject";
import { CovenantCampaign } from "./ui/CovenantCampaign";
import { GangCampaign } from "./ui/GangCampaign";
import { GangConstants } from "../Gang/data/Constants";
interface FactionInfoParams {
infoText?: JSX.Element;
@@ -812,3 +814,7 @@ export const FactionInfos: Record<FactionName, FactionInfo> = {
},
}),
};
for (const factionName of GangConstants.Names) {
FactionInfos[factionName].campaign = () => <GangCampaign factionName={factionName} />;
}
+7
View File
@@ -7,6 +7,8 @@ import Typography from "@mui/material/Typography";
import Button from "@mui/material/Button";
import { KEY } from "../../utils/KeyboardEventKey";
import { FactionName } from "@enums";
import { canCreateGang } from "../../Gang/helpers";
import { dialogBoxCreate } from "../../ui/React/DialogBox";
interface IProps {
open: boolean;
@@ -33,6 +35,11 @@ export function CreateGangModal(props: IProps): React.ReactElement {
}
function createGang(): void {
const checkResult = canCreateGang(props.facName);
if (!checkResult.success) {
dialogBoxCreate(checkResult.message);
return;
}
Player.startGang(props.facName, isHacking());
props.onClose();
Router.toPage(Page.Gang);
-2
View File
@@ -17,7 +17,6 @@ import { Player } from "@player";
import { Typography, Button } from "@mui/material";
import { FactionWorkType } from "@enums";
import { GangButton } from "./GangButton";
import { FactionWork } from "../../Work/FactionWork";
import { useCycleRerender } from "../../ui/React/hooks";
import { favorNeededToDonate } from "../formulas/donation";
@@ -111,7 +110,6 @@ function MainPage({ faction, rerender, onAugmentations }: IMainProps): React.Rea
{faction.name}
</Typography>
<Info faction={faction} factionInfo={factionInfo} />
<GangButton faction={faction} />
{!isPlayersGang && (
<>
{factionInfo.offersWork() && (
-80
View File
@@ -1,80 +0,0 @@
import { Button, Typography, Box, Paper, Tooltip } from "@mui/material";
import React, { useState } from "react";
import { GangConstants } from "../../Gang/data/Constants";
import { Router } from "../../ui/GameRoot";
import { Page } from "../../ui/Router";
import { Player } from "@player";
import { Faction } from "../Faction";
import { CreateGangModal } from "./CreateGangModal";
interface IProps {
faction: Faction;
}
export function GangButton({ faction }: IProps): React.ReactElement {
const [gangOpen, setGangOpen] = useState(false);
if (
!GangConstants.Names.includes(faction.name) || // not even a gang
!Player.isAwareOfGang() || // doesn't know about gang
(Player.gang && Player.getGangName() !== faction.name) // already in another gang
) {
return <></>;
}
let data = {
enabled: false,
title: "",
tooltip: "" as string | React.ReactElement,
description: "",
};
if (Player.gang) {
data = {
enabled: true,
title: "Manage Gang",
tooltip: "",
description: "Manage a gang for this Faction. Gangs will earn you money and faction reputation",
};
} else {
const checkResult = Player.canAccessGang();
data = {
enabled: checkResult.success,
title: "Create Gang",
tooltip: !checkResult.success ? (
<Typography>Unlocked when reaching {GangConstants.GangKarmaRequirement} karma</Typography>
) : (
""
),
description: "Create a gang for this Faction. Gangs will earn you money and faction reputation",
};
}
const manageGang = (): void => {
// If player already has a gang, just go to the gang UI
if (Player.inGang()) {
return Router.toPage(Page.Gang);
}
setGangOpen(true);
};
return (
<>
<Box>
<Paper sx={{ my: 1, p: 1 }}>
<Tooltip title={data.tooltip}>
<span>
<Button onClick={manageGang} disabled={!data.enabled}>
{data.title}
</Button>
</span>
</Tooltip>
<Typography>{data.description}</Typography>
</Paper>
</Box>
<CreateGangModal facName={faction.name} open={gangOpen} onClose={() => setGangOpen(false)} />
</>
);
}
+110
View File
@@ -0,0 +1,110 @@
import Box from "@mui/material/Box";
import Button from "@mui/material/Button";
import Paper from "@mui/material/Paper";
import Tooltip from "@mui/material/Tooltip";
import Typography from "@mui/material/Typography";
import { Player } from "@player";
import React, { useState } from "react";
import { knowAboutBitverse } from "../../BitNode/BitNodeUtils";
import { GangConstants } from "../../Gang/data/Constants";
import { Router } from "../../ui/GameRoot";
import { Modal } from "../../ui/React/Modal";
import { Page } from "../../ui/Router";
import { FactionName } from "../Enums";
import { CreateGangModal } from "./CreateGangModal";
import { Option } from "./Option";
function GangIncompleteCampaign() {
const [open, setOpen] = useState(false);
return (
<>
<Option
buttonText={"Execute the formation plan"}
infoText={
"The tension between our faction and its rivals has been rising. The leader plans to form a specialized " +
"group under your command to strengthen our position by improving our standing and expanding our resources."
}
onClick={() => setOpen(true)}
></Option>
<Modal open={open} onClose={() => setOpen(false)}>
<Typography component="div">
Each time you attempt to execute the plan, it is abruptly interrupted for reasons no one can explain. You
receive the same distorted message every time:
<br />
<br />
#@)($*&@__Y0U__^%$#@&*()__HAV3__(&@#*$%(@
<br />
()@#*$%(__N0T__@&$#)@*(__S33N__)(*@#&$)(
<br />
@&*($#@&__TH3__#@A&#@*)(@$#@)*
<br />
%$#@&()@__TRU1H__()*@#$&()@#$
</Typography>
</Modal>
</>
);
}
export function GangCampaign({ factionName }: { factionName: FactionName }) {
const [gangOpen, setGangOpen] = useState(false);
if (!GangConstants.Names.includes(factionName)) {
throw new Error(`Cannot create gang with ${factionName}`);
}
if (!knowAboutBitverse()) {
return <GangIncompleteCampaign />;
}
const data = {
enabled: false,
title: "",
tooltip: "" as string | React.ReactElement,
description: "",
};
if (Player.gang) {
if (Player.getGangName() !== factionName) {
data.enabled = false;
data.title = "Create Gang";
data.tooltip = "You already created a gang with another faction";
} else {
data.enabled = true;
data.title = "Manage Gang";
data.description = "Manage a gang for this Faction. Gangs will earn you money and faction reputation";
}
} else {
const checkResult = Player.canAccessGang();
data.enabled = checkResult.success;
data.title = "Create Gang";
data.tooltip = !checkResult.success ? checkResult.message : "";
data.description = "Create a gang for this Faction. Gangs will earn you money and faction reputation";
}
const manageGang = (): void => {
// If player already has a gang, just go to the gang UI
if (Player.inGang()) {
return Router.toPage(Page.Gang);
}
setGangOpen(true);
};
return (
<>
<Box>
<Paper sx={{ my: 1, p: 1 }}>
<Tooltip title={data.tooltip}>
<span>
<Button onClick={manageGang} disabled={!data.enabled}>
{data.title}
</Button>
</span>
</Tooltip>
<Typography>{data.description}</Typography>
</Paper>
</Box>
<CreateGangModal facName={factionName} open={gangOpen} onClose={() => setGangOpen(false)} />
</>
);
}
+1 -1
View File
@@ -23,7 +23,7 @@ export const GangConstants = {
FactionName.SpeakersForTheDead,
FactionName.NiteSec,
FactionName.TheBlackHand,
] as string[],
] as FactionName[],
GangKarmaRequirement: -54000,
/** Normal number of game cycles processed at once (2 seconds) */
minCyclesToProcess: 2000 / CONSTANTS.MilliPerCycle,
+26
View File
@@ -0,0 +1,26 @@
import { Result } from "@nsdefs";
import { Player } from "@player";
import { FactionName } from "../Enums";
import { GangConstants } from "./data/Constants";
export function canCreateGang(faction: FactionName): Result {
if (Player.gang) {
return { success: false, message: "You already have a gang." };
}
const checkResult = Player.canAccessGang();
if (!checkResult.success) {
return { success: false, message: checkResult.message };
}
if (!GangConstants.Names.includes(faction)) {
return {
success: false,
message: `${faction} does not allow creating a gang. You can only do that with ${GangConstants.Names.join(
", ",
)}.`,
};
}
if (!Player.factions.includes(faction)) {
return { success: false, message: `You are not a member of ${faction}.` };
}
return { success: true };
}
+1 -1
View File
@@ -106,7 +106,7 @@ export const HashUpgradesMetadata: HashUpgradeParams[] = [
value: 10,
},
{
costPerLevel: 200,
costPerLevel: 25,
desc: "Generate a random Coding Contract somewhere on the network",
name: HashUpgradeEnum.GenerateCodingContract,
effectText: (level: number): JSX.Element | null => <>Generated {level} contracts.</>,
+4
View File
@@ -14,15 +14,19 @@ export function getArrow(event: KeyboardLikeEvent): Arrow | undefined {
switch (event.key) {
case KEY.UP_ARROW:
case KEY.W:
case KEY.K:
return upArrowSymbol;
case KEY.LEFT_ARROW:
case KEY.A:
case KEY.H:
return leftArrowSymbol;
case KEY.DOWN_ARROW:
case KEY.S:
case KEY.J:
return downArrowSymbol;
case KEY.RIGHT_ARROW:
case KEY.D:
case KEY.L:
return rightArrowSymbol;
}
}
+2 -3
View File
@@ -42,7 +42,6 @@ export const RamCostConstants = {
GetStock: 2.0,
BuySellStock: 2.5,
Round: 0.05,
ReadWrite: 1.0,
ArbScript: 1.0,
GetScript: 0.1,
GetRunningScript: 0.3,
@@ -245,7 +244,7 @@ const dnet = {
getStasisLinkLimit: 0,
getStasisLinkedServers: 0,
getServer: 2,
getServerAuthDetails: RamCostConstants.GetServer,
getServerDetails: RamCostConstants.GetServer,
induceServerMigration: 4,
unleashStormSeed: 0.1,
isDarknetServer: RamCostConstants.GetServer,
@@ -631,7 +630,7 @@ export const RamCosts: RamCostTree<NSFull> = {
nextPortWrite: 0,
readPort: 0,
getPortHandle: 0,
rm: RamCostConstants.ReadWrite,
rm: RamCostConstants.Scp,
scriptRunning: RamCostConstants.ArbScript,
scriptKill: RamCostConstants.ArbScript,
getScriptName: 0,
+4 -4
View File
@@ -1,7 +1,7 @@
import { exampleDarknetServerData } from "../DarkNet/Enums";
import type { DarknetServerData } from "@nsdefs";
import { exampleDarknetServerDetails } from "../DarkNet/Enums";
import type { NetscriptContext } from "./APIWrapper";
import { errorMessage } from "./ErrorMessages";
import type { DarknetServerDetails } from "@nsdefs";
const clip = (s: string): string => {
if (s.length > 15) {
@@ -68,8 +68,8 @@ export function missingKey(expect: object, actual: unknown): string | false {
return false;
}
export function assertDarknetServerData(ctx: NetscriptContext, data: unknown): asserts data is DarknetServerData {
const error = missingKey(exampleDarknetServerData, data);
export function assertDarknetServerDetails(ctx: NetscriptContext, data: unknown): asserts data is DarknetServerDetails {
const error = missingKey(exampleDarknetServerDetails, data);
if (error) {
throw errorMessage(ctx, `Invalid darknet server data.\n${error}`, "TYPE");
}
+33 -35
View File
@@ -74,7 +74,7 @@ import { NetscriptCorporation } from "./NetscriptFunctions/Corporation";
import { NetscriptFormulas } from "./NetscriptFunctions/Formulas";
import { NetscriptStockMarket } from "./NetscriptFunctions/StockMarket";
import { NetscriptGrafting } from "./NetscriptFunctions/Grafting";
import type { NS, RecentScript, ProcessInfo, NSEnums, Server as NSInterfaceServer, DarknetServerData } from "@nsdefs";
import type { NS, RecentScript, ProcessInfo, NSEnums, Server as NSInterfaceServer } from "@nsdefs";
import { NetscriptSingularity } from "./NetscriptFunctions/Singularity";
import { NetscriptCloud } from "./NetscriptFunctions/Cloud";
@@ -96,13 +96,13 @@ import { hasScriptExtension } from "./Paths/ScriptFilePath";
import { hasTextExtension } from "./Paths/TextFilePath";
import { ContentFilePath } from "./Paths/ContentFile";
import { hasContractExtension } from "./Paths/ContractFilePath";
import { getRamCost } from "./Netscript/RamCostGenerator";
import { getRamCost, RamCostConstants } from "./Netscript/RamCostGenerator";
import { getEnumHelper } from "./utils/EnumHelper";
import { ServerConstants } from "./Server/data/Constants";
import { assertFunctionWithNSContext } from "./Netscript/TypeAssertion";
import { Router } from "./ui/GameRoot";
import { Page } from "./ui/Router";
import { NetscriptDarknet } from "./NetscriptFunctions/Darknet";
import { getDarknetPropertiesForDeprecationSupport, NetscriptDarknet } from "./NetscriptFunctions/Darknet";
import { canAccessBitNodeFeature } from "./BitNode/BitNodeUtils";
import { validBitNodes } from "./BitNode/Constants";
import { isIPAddress } from "./Types/strings";
@@ -116,6 +116,7 @@ import { exampleDarknetServerData, ResponseCodeEnum } from "./DarkNet/Enums";
import { renderToStaticMarkup } from "react-dom/server";
import { Literatures } from "./Literature/Literatures";
import { Messages } from "./Message/MessageHelpers";
import { setDeprecatedProperties } from "./utils/DeprecationHelper";
export const enums: NSEnums = {
CityName,
@@ -929,42 +930,22 @@ export const ns: InternalAPI<NSFull> = {
if (!server) {
// If the server is offline, return a dummy object with isOnline = false.
const isIp = isIPAddress(host);
return {
isOnline: false,
const result = {
sshPortOpen: false,
ftpPortOpen: false,
smtpPortOpen: false,
httpPortOpen: false,
sqlPortOpen: false,
organizationName: "",
...exampleDarknetServerData,
hostname: isIp ? "" : host,
ip: isIp ? host : "",
} satisfies DarknetServerData & { isOnline: boolean };
isOnline: false,
};
setDeprecatedProperties(result, getDarknetPropertiesForDeprecationSupport(result));
return result satisfies NSInterfaceServer & { isOnline: boolean };
}
if (server instanceof DarknetServer) {
return {
isOnline: true,
hostname: server.hostname,
ip: server.ip,
hasAdminRights: server.hasAdminRights,
isConnectedTo: server.isConnectedTo,
cpuCores: server.cpuCores,
ramUsed: server.ramUsed,
maxRam: server.maxRam,
backdoorInstalled: server.backdoorInstalled,
depth: server.depth,
modelId: server.modelId,
hasStasisLink: server.hasStasisLink,
blockedRam: server.blockedRam,
staticPasswordHint: server.staticPasswordHint,
passwordHintData: server.passwordHintData,
difficulty: server.difficulty,
requiredCharismaSkill: server.requiredCharismaSkill,
logTrafficInterval: server.logTrafficInterval,
isStationary: server.isStationary,
purchasedByPlayer: false,
} satisfies DarknetServerData & { isOnline: boolean };
}
// Throw if it's an isolated non-dnet server (e.g., pre-TOR darkweb, pre-TRP WD).
if (server.serversOnNetwork.length === 0) {
throw helpers.errorMessage(ctx, `Server ${host} does not exist.`);
}
return {
const result = {
hostname: server.hostname,
ip: server.ip,
sshPortOpen: server.sshPortOpen,
@@ -990,6 +971,20 @@ export const ns: InternalAPI<NSFull> = {
requiredHackingSkill: server.requiredHackingSkill,
serverGrowth: server.serverGrowth,
} satisfies NSInterfaceServer;
if (server instanceof DarknetServer) {
const resultWithAdditionalProps = {
...result,
isOnline: true,
};
setDeprecatedProperties(resultWithAdditionalProps, getDarknetPropertiesForDeprecationSupport(server));
return resultWithAdditionalProps satisfies NSInterfaceServer & { isOnline: boolean };
}
// Throw if it's an isolated non-dnet server (e.g., pre-TOR darkweb, pre-TRP WD).
if (server.serversOnNetwork.length === 0) {
throw helpers.errorMessage(ctx, `Server ${host} does not exist.`);
}
return result;
},
getServerMoneyAvailable: (ctx) => (_host?) => {
const server = helpers.getNormalServer(ctx, _host);
@@ -1505,6 +1500,9 @@ export const ns: InternalAPI<NSFull> = {
}),
getFunctionRamCost: (ctx) => (_name) => {
const name = helpers.string(ctx, "name", _name);
if (name === "baseCost") {
return RamCostConstants.Base;
}
return getRamCost(name.split("."), true);
},
tprintRaw: () => (value) => {
+67 -14
View File
@@ -38,7 +38,7 @@ import {
logger,
} from "../DarkNet/effects/offlineServerHandling";
import { DarknetServer } from "../Server/DarknetServer";
import { GenericResponseMessage, ResponseCodeEnum } from "../DarkNet/Enums";
import { exampleDarknetServerDetails, GenericResponseMessage, ResponseCodeEnum } from "../DarkNet/Enums";
import { getRewardFromCache } from "../DarkNet/effects/cacheFiles";
import { CONSTANTS } from "../Constants";
import { getStasisLinkServers } from "../DarkNet/utils/darknetNetworkUtils";
@@ -46,8 +46,9 @@ import { resolveCacheFilePath } from "../Paths/CacheFilePath";
import type { CacheResult } from "@nsdefs";
import { MAX_PASSWORD_LENGTH } from "../DarkNet/Constants";
import { isIPAddress } from "../Types/strings";
import { getDarknetServerOrThrow } from "../DarkNet/utils/darknetServerUtils";
import { type DarknetServerData, getDarknetServerOrThrow } from "../DarkNet/utils/darknetServerUtils";
import { shuffle } from "lodash";
import { getSharedChars } from "../DarkNet/utils/darknetAuthUtils";
type CompleteHeartbleedOptions = {
peek: boolean;
@@ -121,7 +122,8 @@ export function NetscriptDarknet(): InternalAPI<DarknetAPI> {
const server = serverCheck.server;
const threads = ctx.workerScript.scriptRef.threads;
const networkDelay = calculateAuthenticationTime(server, Player, threads, password) + additionalMsec;
const sharedChars = getSharedChars(server.password, password);
const networkDelay = calculateAuthenticationTime(server, Player, threads, sharedChars) + additionalMsec;
logger(ctx)(
`Connecting to ${server.hostname} with password '${password}'... (Est: ${formatNumber(
@@ -377,22 +379,15 @@ export function NetscriptDarknet(): InternalAPI<DarknetAPI> {
logger(ctx)(`Stasis linked servers: ${serverNames}`);
return serverNames;
},
getServerAuthDetails: (ctx) => (_host) => {
getServerDetails: (ctx) => (_host) => {
const targetHost = helpers.string(ctx, "host", _host ?? ctx.workerScript.hostname);
const serverCheck = checkDarknetServer(ctx, targetHost);
if (!serverCheck.success) {
logger(ctx)(serverCheck.message);
return {
...exampleDarknetServerDetails,
isOnline: false,
isConnectedToCurrentServer: false,
hasSession: false,
modelId: "",
passwordHint: "",
data: "",
logTrafficInterval: -1,
passwordLength: -1,
passwordFormat: "numeric",
} satisfies ReturnType<DarknetAPI["getServerAuthDetails"]>;
} satisfies ReturnType<DarknetAPI["getServerDetails"]>;
}
const targetServer = serverCheck.server;
const localServer = ctx.workerScript.getServer();
@@ -408,7 +403,12 @@ export function NetscriptDarknet(): InternalAPI<DarknetAPI> {
logTrafficInterval: targetServer.logTrafficInterval,
passwordLength: targetServer.password.length,
passwordFormat: getPasswordType(targetServer.password),
} satisfies ReturnType<DarknetAPI["getServerAuthDetails"]>;
blockedRam: targetServer.blockedRam,
difficulty: targetServer.difficulty,
requiredCharismaSkill: targetServer.requiredCharismaSkill,
depth: targetServer.depth,
isStationary: targetServer.isStationary,
} satisfies ReturnType<DarknetAPI["getServerDetails"]>;
},
induceServerMigration:
(ctx) =>
@@ -704,3 +704,56 @@ export function NetscriptDarknet(): InternalAPI<DarknetAPI> {
},
};
}
export const getDarknetPropertiesForDeprecationSupport = (dnetServer: DarknetServerData) => ({
depth: {
identifier: "ns.getServer().depth",
message: "Use ns.dnet.getServerDetails().depth instead.",
value: dnetServer.depth,
},
modelId: {
identifier: "ns.getServer().modelId",
message: "Use ns.dnet.getServerDetails().modelId instead.",
value: dnetServer.modelId,
},
hasStasisLink: {
identifier: "ns.getServer().hasStasisLink",
message: "Use ns.dnet.getServerDetails().hasStasisLink instead.",
value: dnetServer.hasStasisLink,
},
blockedRam: {
identifier: "ns.getServer().blockedRam",
message: "Use ns.dnet.getServerDetails().blockedRam instead.",
value: dnetServer.blockedRam,
},
staticPasswordHint: {
identifier: "ns.getServer().staticPasswordHint",
message: "Use ns.dnet.getServerDetails().staticPasswordHint instead.",
value: dnetServer.staticPasswordHint,
},
passwordHintData: {
identifier: "ns.getServer().passwordHintData",
message: "Use ns.dnet.getServerDetails().passwordHintData instead.",
value: dnetServer.passwordHintData,
},
difficulty: {
identifier: "ns.getServer().difficulty",
message: "Use ns.dnet.getServerDetails().difficulty instead.",
value: dnetServer.difficulty,
},
requiredCharismaSkill: {
identifier: "ns.getServer().requiredCharismaSkill",
message: "Use ns.dnet.getServerDetails().requiredCharismaSkill instead.",
value: dnetServer.requiredCharismaSkill,
},
logTrafficInterval: {
identifier: "ns.getServer().logTrafficInterval",
message: "Use ns.dnet.getServerDetails().logTrafficInterval instead.",
value: dnetServer.logTrafficInterval,
},
isStationary: {
identifier: "ns.getServer().isStationary",
message: "Use ns.dnet.getServerDetails().isStationary instead.",
value: dnetServer.isStationary,
},
});
+11 -10
View File
@@ -54,7 +54,7 @@ import type { PositiveNumber } from "../types";
import { Crimes } from "../Crime/Crimes";
import { calculateEffectiveSharedThreads, calculateShareBonus } from "../NetworkShare/Share";
import { calculateAuthenticationTime } from "../DarkNet/effects/effects";
import { assertDarknetServerData } from "../Netscript/TypeAssertion";
import { assertDarknetServerDetails } from "../Netscript/TypeAssertion";
import { getRamBlockRemoved } from "../DarkNet/effects/ramblock";
export function NetscriptFormulas(): InternalAPI<IFormulas> {
@@ -482,27 +482,28 @@ export function NetscriptFormulas(): InternalAPI<IFormulas> {
dnet: {
getAuthenticateTime:
(ctx) =>
(_darknetServerData, _threads, _player): number => {
assertDarknetServerData(ctx, _darknetServerData);
(_darknetServerDetails, _threads, _player, _correctCharactersInPassword): number => {
assertDarknetServerDetails(ctx, _darknetServerDetails);
const threads = helpers.number(ctx, "threads", _threads ?? 1);
const person = helpers.person(ctx, _player ?? Player);
return calculateAuthenticationTime(_darknetServerData, person, threads);
const correctChars = helpers.number(ctx, "correctCharactersInPassword", _correctCharactersInPassword ?? 0);
return calculateAuthenticationTime(_darknetServerDetails, person, threads, correctChars);
},
getHeartbleedTime:
(ctx) =>
(_darknetServerData, _threads, _player): number => {
assertDarknetServerData(ctx, _darknetServerData);
(_darknetServerDetails, _threads, _player): number => {
assertDarknetServerDetails(ctx, _darknetServerDetails);
const threads = helpers.number(ctx, "threads", _threads ?? 1);
const person = helpers.person(ctx, _player ?? Player);
return calculateAuthenticationTime(_darknetServerData, person, threads) * 1.5;
return calculateAuthenticationTime(_darknetServerDetails, person, threads) * 1.5;
},
getExpectedRamBlockRemoved:
(ctx) =>
(_darknetServerData, _threads, _person): number => {
assertDarknetServerData(ctx, _darknetServerData);
(_darknetServerDetails, _threads, _person): number => {
assertDarknetServerDetails(ctx, _darknetServerDetails);
const threads = helpers.number(ctx, "threads", _threads ?? 1);
const person = helpers.person(ctx, _person ?? Player);
return getRamBlockRemoved(_darknetServerData, threads, person);
return getRamBlockRemoved(_darknetServerDetails, threads, person);
},
},
};
+2 -17
View File
@@ -7,13 +7,13 @@ import { type InternalAPI, type NetscriptContext, setRemovedFunctions } from "..
import { GangPromise, RecruitmentResult } from "../Gang/Gang";
import { Player } from "@player";
import { FactionName } from "@enums";
import { GangConstants } from "../Gang/data/Constants";
import { AllGangs } from "../Gang/AllGangs";
import { GangMemberTasks } from "../Gang/GangMemberTasks";
import { GangMemberUpgrades } from "../Gang/GangMemberUpgrades";
import { helpers } from "../Netscript/NetscriptHelpers";
import { getEnumHelper } from "../utils/EnumHelper";
import { CONSTANTS } from "../Constants";
import { canCreateGang } from "../Gang/helpers";
export function NetscriptGang(): InternalAPI<IGang> {
/** Functions as an API check and also returns the gang object */
@@ -40,26 +40,11 @@ export function NetscriptGang(): InternalAPI<IGang> {
const gangFunctions: InternalAPI<IGang> = {
createGang: (ctx) => (_faction) => {
const faction = getEnumHelper("FactionName").nsGetMember(ctx, _faction);
if (Player.gang) {
return false;
}
const checkResult = Player.canAccessGang();
const checkResult = canCreateGang(faction);
if (!checkResult.success) {
helpers.log(ctx, () => checkResult.message);
return false;
}
if (!GangConstants.Names.includes(faction)) {
helpers.log(
ctx,
() =>
`${faction} does not allow creating a gang. You can only do that with ${GangConstants.Names.join(", ")}.`,
);
return false;
}
if (!Player.factions.includes(faction)) {
helpers.log(ctx, () => `You are not a member of ${faction}.`);
return false;
}
const isHacking = faction === FactionName.NiteSec || faction === FactionName.TheBlackHand;
Player.startGang(faction, isHacking);
-1
View File
@@ -89,7 +89,6 @@ export function NetscriptGrafting(): InternalAPI<IGrafting> {
Player.startFocusing();
Router.toPage(Page.Work);
} else if (wasFocusing) {
Player.stopFocusing();
Router.toPage(Page.Terminal);
}
+6 -10
View File
@@ -5,7 +5,7 @@ import { CityName, CompletedProgramName, FactionWorkType, LocationName } from "@
import { purchaseAugmentation, joinFaction, getFactionAugmentationsFiltered } from "../Faction/FactionHelpers";
import { startWorkerScript } from "../NetscriptWorker";
import { Augmentations } from "../Augmentation/Augmentations";
import { getAugCost, installAugmentations } from "../Augmentation/AugmentationHelpers";
import { getAugCost, installAugmentations, soaAugmentationNames } from "../Augmentation/AugmentationHelpers";
import { CONSTANTS } from "../Constants";
import { RunningScript } from "../Script/RunningScript";
import { calculateAchievements } from "../Achievements/Achievements";
@@ -141,6 +141,11 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
helpers.checkSingularityAccess(ctx);
const augName = getEnumHelper("AugmentationName").nsGetMember(ctx, _augName);
const aug = Augmentations[augName];
// SoA augmentations don't use the bitnode AugmentationMoneyCost multiplier;
// their cost only scales with the number of SoA augs already owned.
if (soaAugmentationNames.includes(augName)) {
return aug.baseCost;
}
return aug.baseCost * currentNodeMults.AugmentationMoneyCost;
},
getAugmentationPrice: (ctx) => (_augName) => {
@@ -283,7 +288,6 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
Player.startFocusing();
Router.toPage(Page.Work);
} else if (wasFocusing) {
Player.stopFocusing();
Router.toPage(Page.Terminal);
}
helpers.log(ctx, () => `Started ${classType} at ${universityName}`);
@@ -365,7 +369,6 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
Player.startFocusing();
Router.toPage(Page.Work);
} else if (wasFocusing) {
Player.stopFocusing();
Router.toPage(Page.Terminal);
}
helpers.log(ctx, () => `Started training ${classType} at ${gymName}`);
@@ -570,7 +573,6 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
Router.toPage(Page.Work);
return true;
} else if (Player.focus && !focus) {
Player.stopFocusing();
Router.toPage(Page.Terminal);
return true;
}
@@ -709,7 +711,6 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
Player.startFocusing();
Router.toPage(Page.Work);
} else if (wasFocused) {
Player.stopFocusing();
Router.toPage(Page.Terminal);
}
helpers.log(ctx, () => `Began working at '${companyName}' with position '${jobName}'`);
@@ -834,7 +835,6 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
Player.startFocusing();
Router.toPage(Page.Work);
} else if (wasFocusing) {
Player.stopFocusing();
Router.toPage(Page.Terminal);
}
helpers.log(ctx, () => `Started carrying out hacking contracts for '${faction.name}'`);
@@ -855,7 +855,6 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
Player.startFocusing();
Router.toPage(Page.Work);
} else if (wasFocusing) {
Player.stopFocusing();
Router.toPage(Page.Terminal);
}
helpers.log(ctx, () => `Started carrying out field missions for '${faction.name}'`);
@@ -876,7 +875,6 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
Player.startFocusing();
Router.toPage(Page.Work);
} else if (wasFocusing) {
Player.stopFocusing();
Router.toPage(Page.Terminal);
}
helpers.log(ctx, () => `Started carrying out security work for '${faction.name}'`);
@@ -1009,7 +1007,6 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
Player.startFocusing();
Router.toPage(Page.Work);
} else if (wasFocusing) {
Player.stopFocusing();
Router.toPage(Page.Terminal);
}
helpers.log(ctx, () => `Began creating program: '${programName}'`);
@@ -1059,7 +1056,6 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
Player.startFocusing();
Router.toPage(Page.Work);
} else if (wasFocusing) {
Player.stopFocusing();
Router.toPage(Page.Terminal);
}
return crimeTime;
+9 -18
View File
@@ -26,6 +26,15 @@ import { getEnumHelper } from "../utils/EnumHelper";
import { CONSTANTS } from "../Constants";
import { getDarknetVolatilityMult } from "../DarkNet/effects/effects";
export const getStockFromSymbol = function (ctx: NetscriptContext, symbol: string): Stock {
const stock = SymbolToStockMap[symbol];
if (stock == null) {
throw helpers.errorMessage(ctx, `Invalid stock symbol: '${symbol}'`);
}
return stock;
};
export function NetscriptStockMarket(): InternalAPI<StockAPI> {
/** Checks if the player has TIX API access. Throws an error if the player does not */
const checkTixApiAccess = function (ctx: NetscriptContext): void {
@@ -34,15 +43,6 @@ export function NetscriptStockMarket(): InternalAPI<StockAPI> {
}
};
const getStockFromSymbol = function (ctx: NetscriptContext, symbol: string): Stock {
const stock = SymbolToStockMap[symbol];
if (stock == null) {
throw helpers.errorMessage(ctx, `Invalid stock symbol: '${symbol}'`);
}
return stock;
};
const stockFunctions: InternalAPI<StockAPI> = {
getConstants: () => () => structuredClone(StockMarketConstants),
hasWseAccount: () => () => Player.hasWseAccount,
@@ -353,12 +353,3 @@ export function NetscriptStockMarket(): InternalAPI<StockAPI> {
return stockFunctions;
}
export const getStockFromSymbol = function (ctx: NetscriptContext, symbol: string): Stock {
const stock = SymbolToStockMap[symbol];
if (stock == null) {
throw helpers.errorMessage(ctx, `Invalid stock symbol: '${symbol}'`);
}
return stock;
};

Some files were not shown because too many files have changed in this diff Show More