mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 14:28:36 +02:00
Compare commits
130 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02c4f9c68d | ||
|
|
23ad55554e | ||
|
|
8cdafdc7b9 | ||
|
|
f16b6b92b8 | ||
|
|
f881bd1d9a | ||
|
|
ff724f3f06 | ||
|
|
4ef597bd37 | ||
|
|
c0e01f304d | ||
|
|
91b68db1fe | ||
|
|
f54f7b932c | ||
|
|
2a544bbc15 | ||
|
|
8ed83f3d37 | ||
|
|
3ba89eb388 | ||
|
|
5f29c5b043 | ||
|
|
1982e7195b | ||
|
|
6461d5f247 | ||
|
|
fed3cf1af2 | ||
|
|
05f0ba1ac6 | ||
|
|
a25ab3dd39 | ||
|
|
3eadb0d18c | ||
|
|
3bb56efb34 | ||
|
|
63d7061fd8 | ||
|
|
13990fbe4c | ||
|
|
23bc4e8804 | ||
|
|
0a4598a9a0 | ||
|
|
42a7941db7 | ||
|
|
adc39ad825 | ||
|
|
26c5bb40e3 | ||
|
|
31591da024 | ||
|
|
2dfaca3db4 | ||
|
|
905d37ef93 | ||
|
|
30075f3c07 | ||
|
|
b61e93b246 | ||
|
|
5bc9068745 | ||
|
|
c99fa448fa | ||
|
|
48bced3484 | ||
|
|
c8d2c9f769 | ||
|
|
de6b202341 | ||
|
|
72d2528e9a | ||
|
|
d6ee16cdb3 | ||
|
|
67aff2a6a0 | ||
|
|
1cc0288cd8 | ||
|
|
381310946a | ||
|
|
16022d36f4 | ||
|
|
4a452b8aca | ||
|
|
a4217b448a | ||
|
|
686bfe5aef | ||
|
|
822c55574d | ||
|
|
40c696feb1 | ||
|
|
f337de47df | ||
|
|
956e3875e9 | ||
|
|
934687d4b5 | ||
|
|
7d95400108 | ||
|
|
85cda00538 | ||
|
|
ada903f356 | ||
|
|
2965f51879 | ||
|
|
ffae0045a4 | ||
|
|
b161142796 | ||
|
|
97d248419d | ||
|
|
6c7972dc60 | ||
|
|
213c57f2f8 | ||
|
|
5301f0f378 | ||
|
|
9bf408221c | ||
|
|
f0a0d3095e | ||
|
|
1fa2c55860 | ||
|
|
faf34ad45d | ||
|
|
1a54be184e | ||
|
|
9920b6ae4d | ||
|
|
7b009991e5 | ||
|
|
93a1d6da53 | ||
|
|
e6a1c344d3 | ||
|
|
0e8dca85e1 | ||
|
|
fdb325bf66 | ||
|
|
1d31e066f0 | ||
|
|
1525e51cbb | ||
|
|
c37cdc76a4 | ||
|
|
0f9144a059 | ||
|
|
320c852386 | ||
|
|
8c19165323 | ||
|
|
5b6380a5c3 | ||
|
|
1cb2a83b4f | ||
|
|
077d8e7080 | ||
|
|
6dd9230cc5 | ||
|
|
4bae9938bf | ||
|
|
564889d3f2 | ||
|
|
0e5e20c2f1 | ||
|
|
a145ee74bc | ||
|
|
012ebb2616 | ||
|
|
3123ac9447 | ||
|
|
a8bde3e14f | ||
|
|
f49d21cd71 | ||
|
|
0c1f3756a2 | ||
|
|
7fa85a926a | ||
|
|
0d555f9347 | ||
|
|
423a6ce110 | ||
|
|
c622291eff | ||
|
|
3db190c9a0 | ||
|
|
68a436cb77 | ||
|
|
f2e014ba37 | ||
|
|
93c07ac107 | ||
|
|
43bca702c0 | ||
|
|
bcbaf3e224 | ||
|
|
ef87174e3f | ||
|
|
e3eb08470b | ||
|
|
85fa15c5a5 | ||
|
|
a6d6aa7410 | ||
|
|
bc0dc15536 | ||
|
|
b49c04d142 | ||
|
|
c2fe6108e1 | ||
|
|
40f3d6ea7b | ||
|
|
ab17adf97a | ||
|
|
bb7a1fbb22 | ||
|
|
cffd6d75a6 | ||
|
|
8aea99e5cd | ||
|
|
d75b0af6b2 | ||
|
|
e6078ab1df | ||
|
|
9c4b0c004c | ||
|
|
28da81f3f1 | ||
|
|
c49a507031 | ||
|
|
d9dba2a442 | ||
|
|
74ede7d947 | ||
|
|
1c7230a799 | ||
|
|
ff85394e02 | ||
|
|
37ddb43b82 | ||
|
|
7c732689dd | ||
|
|
bab5412fb7 | ||
|
|
b66eff0379 | ||
|
|
4137a0e522 | ||
|
|
f07c442a92 | ||
|
|
bf095ea9e3 |
@@ -1,14 +1,12 @@
|
||||
node_modules/
|
||||
|
||||
.git
|
||||
.gitattributes
|
||||
.gitignore
|
||||
test/
|
||||
dist/
|
||||
.app/
|
||||
|
||||
.github
|
||||
.editorconfig
|
||||
|
||||
.dockerignore
|
||||
Dockerfile
|
||||
docker-compose.yml
|
||||
|
||||
*.md
|
||||
Quotes.txt
|
||||
netscript_tests/
|
||||
|
||||
50
Dockerfile
Normal file
50
Dockerfile
Normal file
@@ -0,0 +1,50 @@
|
||||
# Stage 1: Build the application
|
||||
FROM node:lts-alpine AS builder
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install necessary tools, including git
|
||||
RUN apk update && \
|
||||
apk add --no-cache git && \
|
||||
apk add bash
|
||||
|
||||
# Copy dependencies
|
||||
COPY package.json package-lock.json ./
|
||||
COPY tools/ ./tools
|
||||
|
||||
# Install dependencies
|
||||
RUN npm ci
|
||||
|
||||
# Copy source code
|
||||
COPY . .
|
||||
|
||||
# Build the application
|
||||
# Pass the build mode as a build argument
|
||||
ARG BUILD_MODE
|
||||
# Use shell logic to determine which version to install
|
||||
RUN if [ "$BUILD_MODE" = "dev" ]; then \
|
||||
echo "Installing development version"; \
|
||||
npm run build:dev; \
|
||||
else \
|
||||
echo "Installing production version"; \
|
||||
npm run build; \
|
||||
fi
|
||||
|
||||
# Stage 2: Serve the application using Nginx
|
||||
FROM nginx:stable-alpine AS runtime
|
||||
|
||||
# Security optimizations
|
||||
RUN chmod -R 644 /etc/nginx/nginx.conf
|
||||
|
||||
# Copy the built application from the builder stage
|
||||
COPY --from=builder /app/.app /usr/share/nginx/html
|
||||
|
||||
# Set permissions for security
|
||||
RUN chmod -R 755 /usr/share/nginx/html
|
||||
|
||||
# Expose port
|
||||
EXPOSE 80
|
||||
|
||||
# Start Nginx
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
@@ -10,6 +10,6 @@ for i in $ROOTDIR/dist/icons/achievements/*.svg; do
|
||||
echo $i
|
||||
# Make background transparent and replace green with black
|
||||
# The icons will be recolored by css filters matching the player's theme
|
||||
sed -i "s/fill:#000000;/fill-opacity: 0%;/g" "$i"
|
||||
sed -i "s/fill:#00ff00;/fill:#000000;/g" "$i"
|
||||
sed -i"" "s/fill:#000000;/fill-opacity: 0%;/g" "$i"
|
||||
sed -i"" "s/fill:#00ff00;/fill:#000000;/g" "$i"
|
||||
done
|
||||
|
||||
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
bitburner-app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
BUILD_MODE: production # Pass the build mode to the Dockerfile
|
||||
ports:
|
||||
- "8080:80" # Map port 8080 on the host to port 80 in the container
|
||||
restart: unless-stopped
|
||||
@@ -286,11 +286,14 @@ function getMenu(window) {
|
||||
click: () => {
|
||||
dialog
|
||||
.showMessageBox({
|
||||
type: "info",
|
||||
type: "warning",
|
||||
title: "Bitburner > API Server Information",
|
||||
message: "The API Server is used to write script files to your in-game home.",
|
||||
detail:
|
||||
"There is an official Visual Studio Code extension that makes use of that feature.\n\n" +
|
||||
`WARNING: This feature is deprecated. It may be removed in future versions.\n\n` +
|
||||
`You should use external tools that support our Remote API feature. For details, please check the "Remote API" page in the in-game documentation. You can also check the "external-editors" channel in our Discord server for more information and support.\n\n` +
|
||||
"--------------------------------------------------------------------------------\n\n" +
|
||||
"There is an official Visual Studio Code extension that makes use of the API Server feature.\n\n" +
|
||||
"It allows you to write your script file in an external IDE and have them pushed over to the game automatically.\n" +
|
||||
"If you want more information, head over to: https://github.com/bitburner-official/bitburner-vscode.",
|
||||
buttons: ["Dismiss", "Open Extension Link (GitHub)"],
|
||||
|
||||
4
electron/package-lock.json
generated
4
electron/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "bitburner",
|
||||
"version": "2.7.0",
|
||||
"version": "2.8.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bitburner",
|
||||
"version": "2.7.0",
|
||||
"version": "2.8.0",
|
||||
"dependencies": {
|
||||
"electron-log": "^4.4.8",
|
||||
"electron-store": "^8.1.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bitburner",
|
||||
"version": "2.7.0",
|
||||
"version": "2.8.0",
|
||||
"description": "A cyberpunk-themed programming incremental game",
|
||||
"main": "main.js",
|
||||
"author": "Daniel Xie, hydroflame, et al.",
|
||||
|
||||
15
markdown/bitburner.autocompletedata.command.md
Normal file
15
markdown/bitburner.autocompletedata.command.md
Normal file
@@ -0,0 +1,15 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [AutocompleteData](./bitburner.autocompletedata.md) > [command](./bitburner.autocompletedata.command.md)
|
||||
|
||||
## AutocompleteData.command property
|
||||
|
||||
The raw command string that you have typed until you press \[Tab\] to use the autocomplete feature.
|
||||
|
||||
For example, if you type `[Space]run test.js[Space][Space][Space][Press tab to use autocomplete]`<!-- -->, "command" will contain all space characters (1 space character before "run" and 3 space characters after ".js").
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
command: string;
|
||||
```
|
||||
@@ -16,6 +16,7 @@ interface AutocompleteData
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [command](./bitburner.autocompletedata.command.md) | | string | <p>The raw command string that you have typed until you press \[Tab\] to use the autocomplete feature.</p><p>For example, if you type <code>[Space]run test.js[Space][Space][Space][Press tab to use autocomplete]</code>, "command" will contain all space characters (1 space character before "run" and 3 space characters after ".js").</p> |
|
||||
| [enums](./bitburner.autocompletedata.enums.md) | | [NSEnums](./bitburner.nsenums.md) | Netscript Enums |
|
||||
| [filename](./bitburner.autocompletedata.filename.md) | | string | The filename of the script about to be run |
|
||||
| [hostname](./bitburner.autocompletedata.hostname.md) | | string | The hostname of the server the script would be running on |
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## BitNodeMultipliers.ManualHackMoney property
|
||||
|
||||
Influences how much money can be stolen from a server when the player performs a hack against it through the Terminal.
|
||||
Influences how much money the player actually gains when they hack a server via the terminal. This is different from ScriptHackMoney. When the player hack a server via the terminal, the amount of money in that server is reduced, but they do not gain that same amount.
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -51,14 +51,14 @@ interface BitNodeMultipliers
|
||||
| [HomeComputerRamCost](./bitburner.bitnodemultipliers.homecomputerramcost.md) | | number | Influences how much money it costs to upgrade your home computer's RAM |
|
||||
| [InfiltrationMoney](./bitburner.bitnodemultipliers.infiltrationmoney.md) | | number | Influences how much money is gained when the player infiltrates a company. |
|
||||
| [InfiltrationRep](./bitburner.bitnodemultipliers.infiltrationrep.md) | | number | Influences how much rep the player can gain from factions when selling stolen documents and secrets |
|
||||
| [ManualHackMoney](./bitburner.bitnodemultipliers.manualhackmoney.md) | | number | Influences how much money can be stolen from a server when the player performs a hack against it through the Terminal. |
|
||||
| [ManualHackMoney](./bitburner.bitnodemultipliers.manualhackmoney.md) | | number | Influences how much money the player actually gains when they hack a server via the terminal. This is different from ScriptHackMoney. When the player hack a server via the terminal, the amount of money in that server is reduced, but they do not gain that same amount. |
|
||||
| [PurchasedServerCost](./bitburner.bitnodemultipliers.purchasedservercost.md) | | number | Influence how much it costs to purchase a server |
|
||||
| [PurchasedServerLimit](./bitburner.bitnodemultipliers.purchasedserverlimit.md) | | number | Influences the maximum number of purchased servers you can have |
|
||||
| [PurchasedServerMaxRam](./bitburner.bitnodemultipliers.purchasedservermaxram.md) | | number | Influences the maximum allowed RAM for a purchased server |
|
||||
| [PurchasedServerSoftcap](./bitburner.bitnodemultipliers.purchasedserversoftcap.md) | | number | Influence how much it costs to purchase a server |
|
||||
| [RepToDonateToFaction](./bitburner.bitnodemultipliers.reptodonatetofaction.md) | | number | Influences the minimum favor the player must have with a faction before they can donate to gain rep. |
|
||||
| [ScriptHackMoney](./bitburner.bitnodemultipliers.scripthackmoney.md) | | number | Influences how much money can be stolen from a server when a script performs a hack against it. |
|
||||
| [ScriptHackMoneyGain](./bitburner.bitnodemultipliers.scripthackmoneygain.md) | | number | The amount of money actually gained when a script hacks a server. This is different than the above because you can reduce the amount of money but not gain that same amount. |
|
||||
| [ScriptHackMoney](./bitburner.bitnodemultipliers.scripthackmoney.md) | | number | Influences how much money is stolen from a server when the player performs a hack against it. |
|
||||
| [ScriptHackMoneyGain](./bitburner.bitnodemultipliers.scripthackmoneygain.md) | | number | Influences how much money the player actually gains when a script hacks a server. This is different from ScriptHackMoney. When a script hacks a server, the amount of money in that server is reduced, but the player does not gain that same amount. |
|
||||
| [ServerGrowthRate](./bitburner.bitnodemultipliers.servergrowthrate.md) | | number | Influences the growth percentage per cycle against a server. |
|
||||
| [ServerMaxMoney](./bitburner.bitnodemultipliers.servermaxmoney.md) | | number | Influences the maximum money that a server can grow to. |
|
||||
| [ServerStartingMoney](./bitburner.bitnodemultipliers.serverstartingmoney.md) | | number | Influences the initial money that a server starts with. |
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## BitNodeMultipliers.ScriptHackMoney property
|
||||
|
||||
Influences how much money can be stolen from a server when a script performs a hack against it.
|
||||
Influences how much money is stolen from a server when the player performs a hack against it.
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## BitNodeMultipliers.ScriptHackMoneyGain property
|
||||
|
||||
The amount of money actually gained when a script hacks a server. This is different than the above because you can reduce the amount of money but not gain that same amount.
|
||||
Influences how much money the player actually gains when a script hacks a server. This is different from ScriptHackMoney. When a script hacks a server, the amount of money in that server is reduced, but the player does not gain that same amount.
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -34,5 +34,9 @@ RAM cost: 4 GB
|
||||
|
||||
Returns the remaining count of the specified action.
|
||||
|
||||
Note that this is meant to be used for Contracts and Operations. This function will return ‘Infinity’ for actions such as Training and Field Analysis. This function will return 1 for BlackOps not yet completed regardless of whether the player has the required rank to attempt the mission or not.
|
||||
Note:
|
||||
|
||||
- This function is meant to be used for Contracts and Operations. It returns Infinity for General actions (Training, Field Analysis, etc.). It returns 1 for BlackOps not yet completed, regardless of whether the player has the required rank to attempt the mission.
|
||||
|
||||
- With Contracts and Operations, the returned value is a floating-point number. The UI shows the rounded-down value.
|
||||
|
||||
|
||||
@@ -34,5 +34,5 @@ Estimated success chance for the specified action.
|
||||
|
||||
RAM cost: 4 GB
|
||||
|
||||
Returns the estimated success chance for the specified action. This chance is returned as a decimal value, NOT a percentage (e.g. if you have an estimated success chance of 80%, then this function will return 0.80, NOT 80). Returns 2 values, value\[0\] - MIN Chance, value\[1\] - MAX Chance
|
||||
Returns the estimated success chance for the specified action. This chance is returned in the range 0-1. (e.g. if you have an estimated success chance of 80%, then this function will return 0.8, NOT 80). Returns 2 values, value\[0\] - MIN Chance, value\[1\] - MAX Chance
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ skillMaxUpgradeCount(
|
||||
| --- | --- | --- |
|
||||
| name | [BladeburnerSkillName](./bitburner.bladeburnerskillname.md) \| \`${[BladeburnerSkillName](./bitburner.bladeburnerskillname.md)<!-- -->}\` | Skill name. It's case-sensitive and must be an exact match. |
|
||||
| level | number | Skill level. It must be a non-negative number. |
|
||||
| skillPoints | number | Number of skill points to upgrade the skill. It must be a positive number. |
|
||||
| skillPoints | number | Number of skill points to upgrade the skill. It must be a non-negative number. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@ Attempts a coding contract, returning a reward string on success or empty string
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
attempt(answer: string | number | any[], filename: string, host?: string): string;
|
||||
attempt(answer: any, filename: string, host?: string): string;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| answer | string \| number \| any\[\] | Attempted solution for the contract. |
|
||||
| answer | any | Attempted solution for the contract. This can be a string formatted like submitting manually, or the answer in the format of the specific contract type. |
|
||||
| filename | string | Filename of the contract. |
|
||||
| host | string | _(Optional)_ Hostname of the server containing the contract. Optional. Defaults to current server if not provided. |
|
||||
|
||||
@@ -36,7 +36,9 @@ Attempts to solve the Coding Contract with the provided solution.
|
||||
|
||||
|
||||
```js
|
||||
const reward = ns.codingcontract.attempt(yourSolution, filename, hostname);
|
||||
const reward = ns.codingcontract.attempt("[solution, as, a, string]", filename, hostname);
|
||||
// or
|
||||
const reward = ns.codingcontract.attempt(["answer", "as", "an", "array"], filename, hostname);
|
||||
if (reward) {
|
||||
ns.tprint(`Contract solved successfully! Reward: ${reward}`);
|
||||
} else {
|
||||
|
||||
44
markdown/bitburner.codingcontract.getcontract.md
Normal file
44
markdown/bitburner.codingcontract.getcontract.md
Normal file
@@ -0,0 +1,44 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CodingContract](./bitburner.codingcontract.md) > [getContract](./bitburner.codingcontract.getcontract.md)
|
||||
|
||||
## CodingContract.getContract() method
|
||||
|
||||
Get various data about a specific contract.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getContract(filename: string, host?: string): CodingContractObject;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| filename | string | Filename of the contract. |
|
||||
| host | string | _(Optional)_ Host of the server containing the contract. Optional. Default to the current server if not provided. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
[CodingContractObject](./bitburner.codingcontractobject.md)
|
||||
|
||||
An object containing various data about the contract specified.
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 15 GB
|
||||
|
||||
The returned object includes the type, data, description as well as methods for getting the number of tries remaining and submitting your answer. Depending on the type of the contract, the data is typed differently. Using type-narrowing, you can get the correct type of the data:
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
```js
|
||||
const contract = ns.codingcontract.getContract(fileName, hostName);
|
||||
if (contract.type === ns.enums.CodingContractName.FindLargestPrimeFactor) {
|
||||
const data = contract.data;
|
||||
// ^? data: number
|
||||
}
|
||||
```
|
||||
|
||||
@@ -9,7 +9,7 @@ Get the type of a coding contract.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getContractType(filename: string, host?: string): string;
|
||||
getContractType(filename: string, host?: string): `${CodingContractName}`;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -21,7 +21,7 @@ getContractType(filename: string, host?: string): string;
|
||||
|
||||
**Returns:**
|
||||
|
||||
string
|
||||
\`${[CodingContractName](./bitburner.codingcontractname.md)<!-- -->}\`
|
||||
|
||||
Name describing the type of problem posed by the Coding Contract.
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@ List all contract types.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getContractTypes(): string[];
|
||||
getContractTypes(): `${CodingContractName}`[];
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
string\[\]
|
||||
\`${[CodingContractName](./bitburner.codingcontractname.md)<!-- -->}\`\[\]
|
||||
|
||||
## Remarks
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Get the input data.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getData(filename: string, host?: string): CodingContractData;
|
||||
getData(filename: string, host?: string): any;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -21,7 +21,7 @@ getData(filename: string, host?: string): CodingContractData;
|
||||
|
||||
**Returns:**
|
||||
|
||||
[CodingContractData](./bitburner.codingcontractdata.md)
|
||||
any
|
||||
|
||||
The specified contract’s data, data type depends on contract type.
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ export interface CodingContract
|
||||
| --- | --- |
|
||||
| [attempt(answer, filename, host)](./bitburner.codingcontract.attempt.md) | Attempts a coding contract, returning a reward string on success or empty string on failure. |
|
||||
| [createDummyContract(type)](./bitburner.codingcontract.createdummycontract.md) | Generate a dummy contract. |
|
||||
| [getContract(filename, host)](./bitburner.codingcontract.getcontract.md) | Get various data about a specific contract. |
|
||||
| [getContractType(filename, host)](./bitburner.codingcontract.getcontracttype.md) | Get the type of a coding contract. |
|
||||
| [getContractTypes()](./bitburner.codingcontract.getcontracttypes.md) | List all contract types. |
|
||||
| [getData(filename, host)](./bitburner.codingcontract.getdata.md) | Get the input data. |
|
||||
|
||||
15
markdown/bitburner.codingcontractanswer.md
Normal file
15
markdown/bitburner.codingcontractanswer.md
Normal file
@@ -0,0 +1,15 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CodingContractAnswer](./bitburner.codingcontractanswer.md)
|
||||
|
||||
## CodingContractAnswer type
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
export type CodingContractAnswer<T extends string> = T extends `${keyof CodingContractSignatures}`
|
||||
? CodingContractSignatures[T][1]
|
||||
: any;
|
||||
```
|
||||
**References:** [CodingContractSignatures](./bitburner.codingcontractsignatures.md)
|
||||
|
||||
@@ -4,10 +4,12 @@
|
||||
|
||||
## CodingContractData type
|
||||
|
||||
Coding contract data will differ depending on coding contract.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
type CodingContractData = any;
|
||||
export type CodingContractData<T extends string> = T extends `${keyof CodingContractSignatures}`
|
||||
? CodingContractSignatures[T][0]
|
||||
: any;
|
||||
```
|
||||
**References:** [CodingContractSignatures](./bitburner.codingcontractsignatures.md)
|
||||
|
||||
|
||||
45
markdown/bitburner.codingcontractname.md
Normal file
45
markdown/bitburner.codingcontractname.md
Normal file
@@ -0,0 +1,45 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CodingContractName](./bitburner.codingcontractname.md)
|
||||
|
||||
## CodingContractName enum
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
declare enum CodingContractName
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
| Member | Value | Description |
|
||||
| --- | --- | --- |
|
||||
| AlgorithmicStockTraderI | <code>"Algorithmic Stock Trader I"</code> | |
|
||||
| AlgorithmicStockTraderII | <code>"Algorithmic Stock Trader II"</code> | |
|
||||
| AlgorithmicStockTraderIII | <code>"Algorithmic Stock Trader III"</code> | |
|
||||
| AlgorithmicStockTraderIV | <code>"Algorithmic Stock Trader IV"</code> | |
|
||||
| ArrayJumpingGame | <code>"Array Jumping Game"</code> | |
|
||||
| ArrayJumpingGameII | <code>"Array Jumping Game II"</code> | |
|
||||
| CompressionIIILZCompression | <code>"Compression III: LZ Compression"</code> | |
|
||||
| CompressionIILZDecompression | <code>"Compression II: LZ Decompression"</code> | |
|
||||
| CompressionIRLECompression | <code>"Compression I: RLE Compression"</code> | |
|
||||
| EncryptionICaesarCipher | <code>"Encryption I: Caesar Cipher"</code> | |
|
||||
| EncryptionIIVigenereCipher | <code>"Encryption II: Vigenère Cipher"</code> | |
|
||||
| FindAllValidMathExpressions | <code>"Find All Valid Math Expressions"</code> | |
|
||||
| FindLargestPrimeFactor | <code>"Find Largest Prime Factor"</code> | |
|
||||
| GenerateIPAddresses | <code>"Generate IP Addresses"</code> | |
|
||||
| HammingCodesEncodedBinaryToInteger | <code>"HammingCodes: Encoded Binary to Integer"</code> | |
|
||||
| HammingCodesIntegerToEncodedBinary | <code>"HammingCodes: Integer to Encoded Binary"</code> | |
|
||||
| MergeOverlappingIntervals | <code>"Merge Overlapping Intervals"</code> | |
|
||||
| MinimumPathSumInATriangle | <code>"Minimum Path Sum in a Triangle"</code> | |
|
||||
| Proper2ColoringOfAGraph | <code>"Proper 2-Coloring of a Graph"</code> | |
|
||||
| SanitizeParenthesesInExpression | <code>"Sanitize Parentheses in Expression"</code> | |
|
||||
| ShortestPathInAGrid | <code>"Shortest Path in a Grid"</code> | |
|
||||
| SpiralizeMatrix | <code>"Spiralize Matrix"</code> | |
|
||||
| SquareRoot | <code>"Square Root"</code> | |
|
||||
| SubarrayWithMaximumSum | <code>"Subarray with Maximum Sum"</code> | |
|
||||
| TotalWaysToSum | <code>"Total Ways to Sum"</code> | |
|
||||
| TotalWaysToSumII | <code>"Total Ways to Sum II"</code> | |
|
||||
| UniquePathsInAGridI | <code>"Unique Paths in a Grid I"</code> | |
|
||||
| UniquePathsInAGridII | <code>"Unique Paths in a Grid II"</code> | |
|
||||
|
||||
21
markdown/bitburner.codingcontractobject.md
Normal file
21
markdown/bitburner.codingcontractobject.md
Normal file
@@ -0,0 +1,21 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CodingContractObject](./bitburner.codingcontractobject.md)
|
||||
|
||||
## CodingContractObject type
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
export type CodingContractObject = {
|
||||
[T in keyof CodingContractSignatures]: {
|
||||
type: T;
|
||||
data: CodingContractSignatures[T][0];
|
||||
submit: (answer: CodingContractSignatures[T][1] | string) => string;
|
||||
description: string;
|
||||
numTriesRemaining: () => number;
|
||||
};
|
||||
}[keyof CodingContractSignatures];
|
||||
```
|
||||
**References:** [CodingContractSignatures](./bitburner.codingcontractsignatures.md)
|
||||
|
||||
42
markdown/bitburner.codingcontractsignatures.md
Normal file
42
markdown/bitburner.codingcontractsignatures.md
Normal file
@@ -0,0 +1,42 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CodingContractSignatures](./bitburner.codingcontractsignatures.md)
|
||||
|
||||
## CodingContractSignatures type
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
export type CodingContractSignatures = {
|
||||
[CodingContractName.FindLargestPrimeFactor]: [number, number];
|
||||
[CodingContractName.SubarrayWithMaximumSum]: [number[], number];
|
||||
[CodingContractName.TotalWaysToSum]: [number, number];
|
||||
[CodingContractName.TotalWaysToSumII]: [[number, number[]], number];
|
||||
[CodingContractName.SpiralizeMatrix]: [number[][], number[]];
|
||||
[CodingContractName.ArrayJumpingGame]: [number[], 1 | 0];
|
||||
[CodingContractName.ArrayJumpingGameII]: [number[], number];
|
||||
[CodingContractName.MergeOverlappingIntervals]: [[number, number][], [number, number][]];
|
||||
[CodingContractName.GenerateIPAddresses]: [string, string[]];
|
||||
[CodingContractName.AlgorithmicStockTraderI]: [number[], number];
|
||||
[CodingContractName.AlgorithmicStockTraderII]: [number[], number];
|
||||
[CodingContractName.AlgorithmicStockTraderIII]: [number[], number];
|
||||
[CodingContractName.AlgorithmicStockTraderIV]: [[number, number[]], number];
|
||||
[CodingContractName.MinimumPathSumInATriangle]: [number[][], number];
|
||||
[CodingContractName.UniquePathsInAGridI]: [[number, number], number];
|
||||
[CodingContractName.UniquePathsInAGridII]: [(1 | 0)[][], number];
|
||||
[CodingContractName.ShortestPathInAGrid]: [(1 | 0)[][], string];
|
||||
[CodingContractName.SanitizeParenthesesInExpression]: [string, string[]];
|
||||
[CodingContractName.FindAllValidMathExpressions]: [[string, number], string[]];
|
||||
[CodingContractName.HammingCodesIntegerToEncodedBinary]: [number, string];
|
||||
[CodingContractName.HammingCodesEncodedBinaryToInteger]: [string, number];
|
||||
[CodingContractName.Proper2ColoringOfAGraph]: [[number, [number, number][]], (1 | 0)[]];
|
||||
[CodingContractName.CompressionIRLECompression]: [string, string];
|
||||
[CodingContractName.CompressionIILZDecompression]: [string, string];
|
||||
[CodingContractName.CompressionIIILZCompression]: [string, string];
|
||||
[CodingContractName.EncryptionICaesarCipher]: [[string, number], string];
|
||||
[CodingContractName.EncryptionIIVigenereCipher]: [[string, string], string];
|
||||
[CodingContractName.SquareRoot]: [bigint, bigint, [string, string]];
|
||||
};
|
||||
```
|
||||
**References:** [CodingContractName.FindLargestPrimeFactor](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.SubarrayWithMaximumSum](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.TotalWaysToSum](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.TotalWaysToSumII](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.SpiralizeMatrix](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.ArrayJumpingGame](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.ArrayJumpingGameII](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.MergeOverlappingIntervals](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.GenerateIPAddresses](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.AlgorithmicStockTraderI](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.AlgorithmicStockTraderII](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.AlgorithmicStockTraderIII](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.AlgorithmicStockTraderIV](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.MinimumPathSumInATriangle](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.UniquePathsInAGridI](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.UniquePathsInAGridII](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.ShortestPathInAGrid](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.SanitizeParenthesesInExpression](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.FindAllValidMathExpressions](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.HammingCodesIntegerToEncodedBinary](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.HammingCodesEncodedBinaryToInteger](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.Proper2ColoringOfAGraph](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.CompressionIRLECompression](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.CompressionIILZDecompression](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.CompressionIIILZCompression](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.EncryptionICaesarCipher](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.EncryptionIIVigenereCipher](./bitburner.codingcontractname.md)<!-- -->, [CodingContractName.SquareRoot](./bitburner.codingcontractname.md)
|
||||
|
||||
@@ -8,6 +8,8 @@ Bribe a faction. You must satisfy these conditions:
|
||||
|
||||
- The corporation valuation must be greater than or equal to a threshold. You can use [getCorporation](./bitburner.corporation.getcorporation.md) and [getConstants](./bitburner.corporation.getconstants.md) to get this information.
|
||||
|
||||
- You must be a member of the specified faction.
|
||||
|
||||
- The specified faction must offer at least 1 type of work. You can use [getFactionWorkTypes](./bitburner.singularity.getfactionworktypes.md) to get the list of work types of a faction.
|
||||
|
||||
**Signature:**
|
||||
|
||||
@@ -18,7 +18,7 @@ export interface Corporation extends WarehouseAPI, OfficeAPI
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [acceptInvestmentOffer()](./bitburner.corporation.acceptinvestmentoffer.md) | Accept the investment offer. The value of offer is based on current corporation valuation. |
|
||||
| [bribe(factionName, amountCash)](./bitburner.corporation.bribe.md) | <p>Bribe a faction. You must satisfy these conditions:</p><p>- The corporation valuation must be greater than or equal to a threshold. You can use [getCorporation](./bitburner.corporation.getcorporation.md) and [getConstants](./bitburner.corporation.getconstants.md) to get this information.</p><p>- The specified faction must offer at least 1 type of work. You can use [getFactionWorkTypes](./bitburner.singularity.getfactionworktypes.md) to get the list of work types of a faction.</p> |
|
||||
| [bribe(factionName, amountCash)](./bitburner.corporation.bribe.md) | <p>Bribe a faction. You must satisfy these conditions:</p><p>- The corporation valuation must be greater than or equal to a threshold. You can use [getCorporation](./bitburner.corporation.getcorporation.md) and [getConstants](./bitburner.corporation.getconstants.md) to get this information.</p><p>- You must be a member of the specified faction.</p><p>- The specified faction must offer at least 1 type of work. You can use [getFactionWorkTypes](./bitburner.singularity.getfactionworktypes.md) to get the list of work types of a faction.</p> |
|
||||
| [buyBackShares(amount)](./bitburner.corporation.buybackshares.md) | Buyback shares. Spend money from the player's wallet to transfer shares from public traders to the CEO. |
|
||||
| [canCreateCorporation(selfFund)](./bitburner.corporation.cancreatecorporation.md) | Return whether the player can create a corporation. Does not require API access. |
|
||||
| [createCorporation(corporationName, selfFund)](./bitburner.corporation.createcorporation.md) | <p>Create a Corporation. You should use [canCreateCorporation](./bitburner.corporation.cancreatecorporation.md) to check if you are unsure you can do it, because it throws an error in these cases:</p><p>- Use seed money outside BitNode 3.</p><p>- Be in a BitNode that has CorporationSoftcap (a BitNode modifier) less than 0.15.</p> |
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## CrimeStats.agility\_success\_weight property
|
||||
|
||||
agility level impact on success change of the crime
|
||||
Impact of agility level on success chance of the crime
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## CrimeStats.charisma\_success\_weight property
|
||||
|
||||
charisma level impact on success change of the crime
|
||||
Impact of charisma level on success chance of the crime
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## CrimeStats.defense\_success\_weight property
|
||||
|
||||
defense level impact on success change of the crime
|
||||
Impact of defense level on success chance of the crime
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## CrimeStats.dexterity\_success\_weight property
|
||||
|
||||
dexterity level impact on success change of the crime
|
||||
Impact of dexterity level on success chance of the crime
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## CrimeStats.hacking\_success\_weight property
|
||||
|
||||
hacking level impact on success change of the crime
|
||||
Impact of hacking level on success chance of the crime
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -17,22 +17,22 @@ interface CrimeStats
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [agility\_exp](./bitburner.crimestats.agility_exp.md) | | number | agility exp gained from crime |
|
||||
| [agility\_success\_weight](./bitburner.crimestats.agility_success_weight.md) | | number | agility level impact on success change of the crime |
|
||||
| [agility\_success\_weight](./bitburner.crimestats.agility_success_weight.md) | | number | Impact of agility level on success chance of the crime |
|
||||
| [charisma\_exp](./bitburner.crimestats.charisma_exp.md) | | number | charisma exp gained from crime |
|
||||
| [charisma\_success\_weight](./bitburner.crimestats.charisma_success_weight.md) | | number | charisma level impact on success change of the crime |
|
||||
| [charisma\_success\_weight](./bitburner.crimestats.charisma_success_weight.md) | | number | Impact of charisma level on success chance of the crime |
|
||||
| [defense\_exp](./bitburner.crimestats.defense_exp.md) | | number | defense exp gained from crime |
|
||||
| [defense\_success\_weight](./bitburner.crimestats.defense_success_weight.md) | | number | defense level impact on success change of the crime |
|
||||
| [defense\_success\_weight](./bitburner.crimestats.defense_success_weight.md) | | number | Impact of defense level on success chance of the crime |
|
||||
| [dexterity\_exp](./bitburner.crimestats.dexterity_exp.md) | | number | dexterity exp gained from crime |
|
||||
| [dexterity\_success\_weight](./bitburner.crimestats.dexterity_success_weight.md) | | number | dexterity level impact on success change of the crime |
|
||||
| [dexterity\_success\_weight](./bitburner.crimestats.dexterity_success_weight.md) | | number | Impact of dexterity level on success chance of the crime |
|
||||
| [difficulty](./bitburner.crimestats.difficulty.md) | | number | Number representing the difficulty of the crime. Used for success chance calculations |
|
||||
| [hacking\_exp](./bitburner.crimestats.hacking_exp.md) | | number | hacking exp gained from crime |
|
||||
| [hacking\_success\_weight](./bitburner.crimestats.hacking_success_weight.md) | | number | hacking level impact on success change of the crime |
|
||||
| [hacking\_success\_weight](./bitburner.crimestats.hacking_success_weight.md) | | number | Impact of hacking level on success chance of the crime |
|
||||
| [intelligence\_exp](./bitburner.crimestats.intelligence_exp.md) | | number | intelligence exp gained from crime |
|
||||
| [karma](./bitburner.crimestats.karma.md) | | number | Amount of karma lost for successfully committing this crime |
|
||||
| [kills](./bitburner.crimestats.kills.md) | | number | How many people die as a result of this crime |
|
||||
| [money](./bitburner.crimestats.money.md) | | number | How much money is given |
|
||||
| [strength\_exp](./bitburner.crimestats.strength_exp.md) | | number | strength exp gained from crime |
|
||||
| [strength\_success\_weight](./bitburner.crimestats.strength_success_weight.md) | | number | strength level impact on success change of the crime |
|
||||
| [strength\_success\_weight](./bitburner.crimestats.strength_success_weight.md) | | number | Impact of strength level on success chance of the crime |
|
||||
| [time](./bitburner.crimestats.time.md) | | number | Milliseconds it takes to attempt the crime |
|
||||
| [type](./bitburner.crimestats.type.md) | | string | Description of the crime activity |
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## CrimeStats.strength\_success\_weight property
|
||||
|
||||
strength level impact on success change of the crime
|
||||
Impact of strength level on success chance of the crime
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
55
markdown/bitburner.factionname.md
Normal file
55
markdown/bitburner.factionname.md
Normal file
@@ -0,0 +1,55 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [FactionName](./bitburner.factionname.md)
|
||||
|
||||
## FactionName enum
|
||||
|
||||
Names of all factions.
|
||||
|
||||
Warning: Spoiler ahead. This enum contains names of \*\*all\*\* factions. If you do not want to know what all the factions are, you should not check this enum. Some factions are only accessible in the endgame.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
declare enum FactionName
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
| Member | Value | Description |
|
||||
| --- | --- | --- |
|
||||
| Aevum | <code>"Aevum"</code> | |
|
||||
| BachmanAssociates | <code>"Bachman & Associates"</code> | |
|
||||
| BitRunners | <code>"BitRunners"</code> | |
|
||||
| Bladeburners | <code>"Bladeburners"</code> | |
|
||||
| BladeIndustries | <code>"Blade Industries"</code> | |
|
||||
| Chongqing | <code>"Chongqing"</code> | |
|
||||
| ChurchOfTheMachineGod | <code>"Church of the Machine God"</code> | |
|
||||
| ClarkeIncorporated | <code>"Clarke Incorporated"</code> | |
|
||||
| CyberSec | <code>"CyberSec"</code> | |
|
||||
| Daedalus | <code>"Daedalus"</code> | |
|
||||
| ECorp | <code>"ECorp"</code> | |
|
||||
| FourSigma | <code>"Four Sigma"</code> | |
|
||||
| FulcrumSecretTechnologies | <code>"Fulcrum Secret Technologies"</code> | |
|
||||
| Illuminati | <code>"Illuminati"</code> | |
|
||||
| Ishima | <code>"Ishima"</code> | |
|
||||
| KuaiGongInternational | <code>"KuaiGong International"</code> | |
|
||||
| MegaCorp | <code>"MegaCorp"</code> | |
|
||||
| Netburners | <code>"Netburners"</code> | |
|
||||
| NewTokyo | <code>"New Tokyo"</code> | |
|
||||
| NiteSec | <code>"NiteSec"</code> | |
|
||||
| NWO | <code>"NWO"</code> | |
|
||||
| OmniTekIncorporated | <code>"OmniTek Incorporated"</code> | |
|
||||
| Sector12 | <code>"Sector-12"</code> | |
|
||||
| ShadowsOfAnarchy | <code>"Shadows of Anarchy"</code> | |
|
||||
| Silhouette | <code>"Silhouette"</code> | |
|
||||
| SlumSnakes | <code>"Slum Snakes"</code> | |
|
||||
| SpeakersForTheDead | <code>"Speakers for the Dead"</code> | |
|
||||
| Tetrads | <code>"Tetrads"</code> | |
|
||||
| TheBlackHand | <code>"The Black Hand"</code> | |
|
||||
| TheCovenant | <code>"The Covenant"</code> | |
|
||||
| TheDarkArmy | <code>"The Dark Army"</code> | |
|
||||
| TheSyndicate | <code>"The Syndicate"</code> | |
|
||||
| TianDiHui | <code>"Tian Di Hui"</code> | |
|
||||
| Volhaven | <code>"Volhaven"</code> | |
|
||||
|
||||
@@ -28,5 +28,5 @@ Chance you have to win a clash with the specified gang.
|
||||
|
||||
RAM cost: 4 GB
|
||||
|
||||
Returns the chance you have to win a clash with the specified gang. The chance is returned in decimal form, not percentage
|
||||
Returns the chance you have to win a clash with the specified gang. The chance is returned in the range 0-1.
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@ Get information about the other gangs.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getOtherGangInformation(): GangOtherInfo;
|
||||
getOtherGangInformation(): Record<string, GangOtherInfoObject>;
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
[GangOtherInfo](./bitburner.gangotherinfo.md)
|
||||
Record<string, [GangOtherInfoObject](./bitburner.gangotherinfoobject.md)<!-- -->>
|
||||
|
||||
Object containing territory and power information about all gangs.
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ interface GangGenInfo
|
||||
| [respect](./bitburner.ganggeninfo.respect.md) | | number | Gang's respect |
|
||||
| [respectForNextRecruit](./bitburner.ganggeninfo.respectfornextrecruit.md) | | number | Amount of Respect needed for next gang recruit, if possible |
|
||||
| [respectGainRate](./bitburner.ganggeninfo.respectgainrate.md) | | number | Respect earned per game cycle |
|
||||
| [territory](./bitburner.ganggeninfo.territory.md) | | number | Amount of territory held |
|
||||
| [territory](./bitburner.ganggeninfo.territory.md) | | number | Amount of territory held, in the range 0-1 |
|
||||
| [territoryClashChance](./bitburner.ganggeninfo.territoryclashchance.md) | | number | Clash chance |
|
||||
| [territoryWarfareEngaged](./bitburner.ganggeninfo.territorywarfareengaged.md) | | boolean | Indicating if territory clashes are enabled |
|
||||
| [wantedLevel](./bitburner.ganggeninfo.wantedlevel.md) | | number | Gang's wanted level |
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## GangGenInfo.territory property
|
||||
|
||||
Amount of territory held
|
||||
Amount of territory held, in the range 0-1
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
13
markdown/bitburner.gangmemberexpgain.agi_exp.md
Normal file
13
markdown/bitburner.gangmemberexpgain.agi_exp.md
Normal file
@@ -0,0 +1,13 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GangMemberExpGain](./bitburner.gangmemberexpgain.md) > [agi\_exp](./bitburner.gangmemberexpgain.agi_exp.md)
|
||||
|
||||
## GangMemberExpGain.agi\_exp property
|
||||
|
||||
Agi EXP gain for a member after a given task
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
agi_exp: number;
|
||||
```
|
||||
13
markdown/bitburner.gangmemberexpgain.cha_exp.md
Normal file
13
markdown/bitburner.gangmemberexpgain.cha_exp.md
Normal file
@@ -0,0 +1,13 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GangMemberExpGain](./bitburner.gangmemberexpgain.md) > [cha\_exp](./bitburner.gangmemberexpgain.cha_exp.md)
|
||||
|
||||
## GangMemberExpGain.cha\_exp property
|
||||
|
||||
Cha EXP gain for a member after a given task
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
cha_exp: number;
|
||||
```
|
||||
13
markdown/bitburner.gangmemberexpgain.def_exp.md
Normal file
13
markdown/bitburner.gangmemberexpgain.def_exp.md
Normal file
@@ -0,0 +1,13 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GangMemberExpGain](./bitburner.gangmemberexpgain.md) > [def\_exp](./bitburner.gangmemberexpgain.def_exp.md)
|
||||
|
||||
## GangMemberExpGain.def\_exp property
|
||||
|
||||
Def EXP gain for a member after a given task
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
def_exp: number;
|
||||
```
|
||||
13
markdown/bitburner.gangmemberexpgain.dex_exp.md
Normal file
13
markdown/bitburner.gangmemberexpgain.dex_exp.md
Normal file
@@ -0,0 +1,13 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GangMemberExpGain](./bitburner.gangmemberexpgain.md) > [dex\_exp](./bitburner.gangmemberexpgain.dex_exp.md)
|
||||
|
||||
## GangMemberExpGain.dex\_exp property
|
||||
|
||||
Dex EXP gain for a member after a given task
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
dex_exp: number;
|
||||
```
|
||||
13
markdown/bitburner.gangmemberexpgain.hack_exp.md
Normal file
13
markdown/bitburner.gangmemberexpgain.hack_exp.md
Normal file
@@ -0,0 +1,13 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GangMemberExpGain](./bitburner.gangmemberexpgain.md) > [hack\_exp](./bitburner.gangmemberexpgain.hack_exp.md)
|
||||
|
||||
## GangMemberExpGain.hack\_exp property
|
||||
|
||||
Hack EXP gain for a member after a given task
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
hack_exp: number;
|
||||
```
|
||||
24
markdown/bitburner.gangmemberexpgain.md
Normal file
24
markdown/bitburner.gangmemberexpgain.md
Normal file
@@ -0,0 +1,24 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GangMemberExpGain](./bitburner.gangmemberexpgain.md)
|
||||
|
||||
## GangMemberExpGain interface
|
||||
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
interface GangMemberExpGain
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [agi\_exp](./bitburner.gangmemberexpgain.agi_exp.md) | | number | Agi EXP gain for a member after a given task |
|
||||
| [cha\_exp](./bitburner.gangmemberexpgain.cha_exp.md) | | number | Cha EXP gain for a member after a given task |
|
||||
| [def\_exp](./bitburner.gangmemberexpgain.def_exp.md) | | number | Def EXP gain for a member after a given task |
|
||||
| [dex\_exp](./bitburner.gangmemberexpgain.dex_exp.md) | | number | Dex EXP gain for a member after a given task |
|
||||
| [hack\_exp](./bitburner.gangmemberexpgain.hack_exp.md) | | number | Hack EXP gain for a member after a given task |
|
||||
| [str\_exp](./bitburner.gangmemberexpgain.str_exp.md) | | number | Str EXP gain for a member after a given task |
|
||||
|
||||
13
markdown/bitburner.gangmemberexpgain.str_exp.md
Normal file
13
markdown/bitburner.gangmemberexpgain.str_exp.md
Normal file
@@ -0,0 +1,13 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GangMemberExpGain](./bitburner.gangmemberexpgain.md) > [str\_exp](./bitburner.gangmemberexpgain.str_exp.md)
|
||||
|
||||
## GangMemberExpGain.str\_exp property
|
||||
|
||||
Str EXP gain for a member after a given task
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
str_exp: number;
|
||||
```
|
||||
15
markdown/bitburner.gangmemberinfo.expgain.md
Normal file
15
markdown/bitburner.gangmemberinfo.expgain.md
Normal file
@@ -0,0 +1,15 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GangMemberInfo](./bitburner.gangmemberinfo.md) > [expGain](./bitburner.gangmemberinfo.expgain.md)
|
||||
|
||||
## GangMemberInfo.expGain property
|
||||
|
||||
Per Cycle Exp object for each stat for this gang member.
|
||||
|
||||
null in the event that the member does not have a given task.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
expGain: GangMemberExpGain | null;
|
||||
```
|
||||
@@ -37,6 +37,7 @@ interface GangMemberInfo
|
||||
| [dex\_mult](./bitburner.gangmemberinfo.dex_mult.md) | | number | Dexterity multiplier from equipment |
|
||||
| [dex](./bitburner.gangmemberinfo.dex.md) | | number | Dexterity skill level |
|
||||
| [earnedRespect](./bitburner.gangmemberinfo.earnedrespect.md) | | number | Amount of Respect earned by member since they last Ascended |
|
||||
| [expGain](./bitburner.gangmemberinfo.expgain.md) | | [GangMemberExpGain](./bitburner.gangmemberexpgain.md) \| null | <p>Per Cycle Exp object for each stat for this gang member.</p><p>null in the event that the member does not have a given task.</p> |
|
||||
| [hack\_asc\_mult](./bitburner.gangmemberinfo.hack_asc_mult.md) | | number | Hack multiplier from ascensions |
|
||||
| [hack\_asc\_points](./bitburner.gangmemberinfo.hack_asc_points.md) | | number | Total Hack Ascension points accumulated |
|
||||
| [hack\_exp](./bitburner.gangmemberinfo.hack_exp.md) | | number | Current hack experience |
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GangOtherInfo](./bitburner.gangotherinfo.md)
|
||||
|
||||
## GangOtherInfo interface
|
||||
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
interface GangOtherInfo
|
||||
```
|
||||
@@ -16,5 +16,5 @@ interface GangOtherInfoObject
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [power](./bitburner.gangotherinfoobject.power.md) | | number | Gang power |
|
||||
| [territory](./bitburner.gangotherinfoobject.territory.md) | | number | Gang territory, in decimal form |
|
||||
| [territory](./bitburner.gangotherinfoobject.territory.md) | | number | Gang territory, in the range 0-1 |
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## GangOtherInfoObject.territory property
|
||||
|
||||
Gang territory, in decimal form
|
||||
Gang territory, in the range 0-1
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ Returns the name of the opponent faction in the current subnet.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getOpponent(): GoOpponent | "No AI";
|
||||
getOpponent(): GoOpponent;
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
[GoOpponent](./bitburner.goopponent.md) \| "No AI"
|
||||
[GoOpponent](./bitburner.goopponent.md)
|
||||
|
||||
|
||||
@@ -6,12 +6,15 @@
|
||||
|
||||
Make a move on the IPvGO subnet game board, and await the opponent's response. x:0 y:0 represents the bottom-left corner of the board in the UI.
|
||||
|
||||
playAsWhite is optional, and attempts to make a move as the white player. Only can be used when playing against "No AI".
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
makeMove(
|
||||
x: number,
|
||||
y: number,
|
||||
playAsWhite = false,
|
||||
): Promise<{
|
||||
type: "move" | "pass" | "gameOver";
|
||||
x: number | null;
|
||||
@@ -25,6 +28,7 @@ makeMove(
|
||||
| --- | --- | --- |
|
||||
| x | number | |
|
||||
| y | number | |
|
||||
| playAsWhite | (not declared) | _(Optional)_ |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ export interface Go
|
||||
| [getGameState()](./bitburner.go.getgamestate.md) | Gets the status of the current game. Shows the current player, current score, and the previous move coordinates. Previous move coordinates will be \[-1, -1\] for a pass, or if there are no prior moves. |
|
||||
| [getMoveHistory()](./bitburner.go.getmovehistory.md) | <p>Returns all the prior moves in the current game, as an array of simple board states.</p><p>For example, a single 5x5 prior move board might look like this:</p><p>\[<br/> "XX.O.",<br/> "X..OO",<br/> ".XO..",<br/> "XXO.\#",<br/> ".XO.\#",<br/> \]</p> |
|
||||
| [getOpponent()](./bitburner.go.getopponent.md) | Returns the name of the opponent faction in the current subnet. |
|
||||
| [makeMove(x, y)](./bitburner.go.makemove.md) | Make a move on the IPvGO subnet game board, and await the opponent's response. x:0 y:0 represents the bottom-left corner of the board in the UI. |
|
||||
| [opponentNextTurn(logOpponentMove)](./bitburner.go.opponentnextturn.md) | Returns a promise that resolves with the success or failure state of your last move, and the AI's response, if applicable. x:0 y:0 represents the bottom-left corner of the board in the UI. |
|
||||
| [passTurn()](./bitburner.go.passturn.md) | <p>Pass the player's turn rather than making a move, and await the opponent's response. This ends the game if the opponent passed on the previous turn, or if the opponent passes on their following turn.</p><p>This can also be used if you pick up the game in a state where the opponent needs to play next. For example: if BitBurner was closed while waiting for the opponent to make a move, you may need to call passTurn() to get them to play their move on game start.</p> |
|
||||
| [makeMove(x, y, playAsWhite)](./bitburner.go.makemove.md) | <p>Make a move on the IPvGO subnet game board, and await the opponent's response. x:0 y:0 represents the bottom-left corner of the board in the UI.</p><p>playAsWhite is optional, and attempts to make a move as the white player. Only can be used when playing against "No AI".</p> |
|
||||
| [opponentNextTurn(logOpponentMove, playAsWhite)](./bitburner.go.opponentnextturn.md) | Returns a promise that resolves with the success or failure state of your last move, and the AI's response, if applicable. x:0 y:0 represents the bottom-left corner of the board in the UI. |
|
||||
| [passTurn(passAsWhite)](./bitburner.go.passturn.md) | <p>Pass the player's turn rather than making a move, and await the opponent's response. This ends the game if the opponent passed on the previous turn, or if the opponent passes on their following turn.</p><p>This can also be used if you pick up the game in a state where the opponent needs to play next. For example: if BitBurner was closed while waiting for the opponent to make a move, you may need to call passTurn() to get them to play their move on game start.</p><p>passAsWhite is optional, and attempts to pass while playing as the white player. Only can be used when playing against "No AI".</p> |
|
||||
| [resetBoardState(opponent, boardSize)](./bitburner.go.resetboardstate.md) | <p>Gets new IPvGO subnet with the specified size owned by the listed faction, ready for the player to make a move. This will reset your win streak if the current game is not complete and you have already made moves.</p><p>Note that some factions will have a few routers already on the subnet after a reset.</p><p>opponent is "Netburners" or "Slum Snakes" or "The Black Hand" or "Tetrads" or "Daedalus" or "Illuminati" or "????????????" or "No AI",</p> |
|
||||
|
||||
|
||||
@@ -9,7 +9,10 @@ Returns a promise that resolves with the success or failure state of your last m
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
opponentNextTurn(logOpponentMove?: boolean): Promise<{
|
||||
opponentNextTurn(
|
||||
logOpponentMove?: boolean,
|
||||
playAsWhite = false,
|
||||
): Promise<{
|
||||
type: "move" | "pass" | "gameOver";
|
||||
x: number | null;
|
||||
y: number | null;
|
||||
@@ -21,6 +24,7 @@ opponentNextTurn(logOpponentMove?: boolean): Promise<{
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| logOpponentMove | boolean | _(Optional)_ optional, defaults to true. if false prevents logging opponent move |
|
||||
| playAsWhite | (not declared) | _(Optional)_ optional. If true, waits to get the next move the black player makes. Intended to be used when playing as white when the opponent is set to "No AI" |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -8,15 +8,24 @@ Pass the player's turn rather than making a move, and await the opponent's respo
|
||||
|
||||
This can also be used if you pick up the game in a state where the opponent needs to play next. For example: if BitBurner was closed while waiting for the opponent to make a move, you may need to call passTurn() to get them to play their move on game start.
|
||||
|
||||
passAsWhite is optional, and attempts to pass while playing as the white player. Only can be used when playing against "No AI".
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
passTurn(): Promise<{
|
||||
passTurn(passAsWhite = false): Promise<{
|
||||
type: "move" | "pass" | "gameOver";
|
||||
x: number | null;
|
||||
y: number | null;
|
||||
}>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| passAsWhite | (not declared) | _(Optional)_ |
|
||||
|
||||
**Returns:**
|
||||
|
||||
Promise<{ type: "move" \| "pass" \| "gameOver"; x: number \| null; y: number \| null; }>
|
||||
|
||||
@@ -14,10 +14,12 @@ Note that the \[0\]\[0\] point is shown on the bottom-left on the visual board (
|
||||
|
||||
Also note that, when given a custom board state, only one prior move can be analyzed. This means that the superko rules (no duplicate board states in the full game history) is not supported; you will have to implement your own analysis for that.
|
||||
|
||||
playAsWhite is optional, and gets the current valid moves for the white player. Intended to be used when playing as white when the opponent is set to "No AI"
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getValidMoves(boardState?: string[], priorBoardState?: string[]): boolean[][];
|
||||
getValidMoves(boardState?: string[], priorBoardState?: string[], playAsWhite = false): boolean[][];
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -26,6 +28,7 @@ getValidMoves(boardState?: string[], priorBoardState?: string[]): boolean[][];
|
||||
| --- | --- | --- |
|
||||
| boardState | string\[\] | _(Optional)_ |
|
||||
| priorBoardState | string\[\] | _(Optional)_ |
|
||||
| playAsWhite | (not declared) | _(Optional)_ |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -20,5 +20,6 @@ export interface GoAnalysis
|
||||
| [getControlledEmptyNodes(boardState)](./bitburner.goanalysis.getcontrolledemptynodes.md) | <p>Returns 'X' for black, 'O' for white, or '?' for each empty point to indicate which player controls that empty point. If no single player fully encircles the empty space, it is shown as contested with '?'. "\#" are dead nodes that are not part of the subnet.</p><p>Takes an optional boardState argument; by default uses the current board state.</p><p>Filled points of any color are indicated with '.'</p><p>In this example, white encircles some space in the top-left, black encircles some in the top-right, and between their routers is contested space in the center: <pre lang="javascript"> \[ "OO..?", "OO.?.", "O.?.X", ".?.XX", "?..X\#", \] </pre></p> |
|
||||
| [getLiberties(boardState)](./bitburner.goanalysis.getliberties.md) | <p>Returns a number for each point, representing how many open nodes its network/chain is connected to. Empty nodes and dead nodes are shown as -1 liberties.</p><p>Takes an optional boardState argument; by default uses the current board state.</p><p>For example, a 5x5 board might look like this. The chain in the top-left touches 5 total empty nodes, and the one in the center touches four. The group in the bottom-right only has one liberty; it is in danger of being captured! <pre lang="javascript"> \[ \[-1, 5,-1,-1, 2\], \[ 5, 5,-1,-1,-1\], \[-1,-1, 4,-1,-1\], \[ 3,-1,-1, 3, 1\], \[ 3,-1,-1, 3, 1\], \] </pre></p> |
|
||||
| [getStats()](./bitburner.goanalysis.getstats.md) | <p>Displays the game history, captured nodes, and gained bonuses for each opponent you have played against.</p><p>The details are keyed by opponent name, in this structure:</p><p><pre lang="javascript"> { <OpponentName>: { wins: number, losses: number, winStreak: number, highestWinStreak: number, favor: number, bonusPercent: number, bonusDescription: string, } } </pre></p> |
|
||||
| [getValidMoves(boardState, priorBoardState)](./bitburner.goanalysis.getvalidmoves.md) | <p>Shows if each point on the board is a valid move for the player. By default, analyzes the current board state. Takes an optional boardState (and an optional prior-move boardState, if desired) to analyze a custom board.</p><p>The true/false validity of each move can be retrieved via the X and Y coordinates of the move. <code>const validMoves = ns.go.analysis.getValidMoves();</code></p><p><code>const moveIsValid = validMoves[x][y];</code></p><p>Note that the \[0\]\[0\] point is shown on the bottom-left on the visual board (as is traditional), and each string represents a vertical column on the board. In other words, the printed example above can be understood to be rotated 90 degrees clockwise compared to the board UI as shown in the IPvGO subnet tab.</p><p>Also note that, when given a custom board state, only one prior move can be analyzed. This means that the superko rules (no duplicate board states in the full game history) is not supported; you will have to implement your own analysis for that.</p> |
|
||||
| [getValidMoves(boardState, priorBoardState, playAsWhite)](./bitburner.goanalysis.getvalidmoves.md) | <p>Shows if each point on the board is a valid move for the player. By default, analyzes the current board state. Takes an optional boardState (and an optional prior-move boardState, if desired) to analyze a custom board.</p><p>The true/false validity of each move can be retrieved via the X and Y coordinates of the move. <code>const validMoves = ns.go.analysis.getValidMoves();</code></p><p><code>const moveIsValid = validMoves[x][y];</code></p><p>Note that the \[0\]\[0\] point is shown on the bottom-left on the visual board (as is traditional), and each string represents a vertical column on the board. In other words, the printed example above can be understood to be rotated 90 degrees clockwise compared to the board UI as shown in the IPvGO subnet tab.</p><p>Also note that, when given a custom board state, only one prior move can be analyzed. This means that the superko rules (no duplicate board states in the full game history) is not supported; you will have to implement your own analysis for that.</p><p>playAsWhite is optional, and gets the current valid moves for the white player. Intended to be used when playing as white when the opponent is set to "No AI"</p> |
|
||||
| [resetStats(resetAll)](./bitburner.goanalysis.resetstats.md) | Reset all win/loss and winstreak records for the No AI opponent. |
|
||||
|
||||
|
||||
24
markdown/bitburner.goanalysis.resetstats.md
Normal file
24
markdown/bitburner.goanalysis.resetstats.md
Normal file
@@ -0,0 +1,24 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GoAnalysis](./bitburner.goanalysis.md) > [resetStats](./bitburner.goanalysis.resetstats.md)
|
||||
|
||||
## GoAnalysis.resetStats() method
|
||||
|
||||
Reset all win/loss and winstreak records for the No AI opponent.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
resetStats(resetAll = false): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| resetAll | (not declared) | _(Optional)_ if true, reset win/loss records for all opponents. Leaves node power and bonuses unchanged. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
void
|
||||
|
||||
@@ -16,6 +16,7 @@ Warning: if you fail to play a cheat move, your turn will be skipped. After your
|
||||
destroyNode(
|
||||
x: number,
|
||||
y: number,
|
||||
playAsWhite = false,
|
||||
): Promise<{
|
||||
type: "move" | "pass" | "gameOver";
|
||||
x: number | null;
|
||||
@@ -27,8 +28,9 @@ destroyNode(
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| x | number | |
|
||||
| y | number | |
|
||||
| x | number | x coordinate of empty node to destroy |
|
||||
| y | number | y coordinate of empty node to destroy |
|
||||
| playAsWhite | (not declared) | _(Optional)_ Optional override for playing as white. Can only be used when playing on a 'No AI' board. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -9,8 +9,15 @@ Returns the number of times you've attempted to cheat in the current game.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getCheatCount(): number;
|
||||
getCheatCount(playAsWhite = false): number;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| playAsWhite | (not declared) | _(Optional)_ Optional override for playing as white. Can only be used when playing on a 'No AI' board. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
number
|
||||
|
||||
@@ -11,7 +11,7 @@ Warning: if you fail to play a cheat move, your turn will be skipped. After your
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getCheatSuccessChance(cheatCount?: number): number;
|
||||
getCheatSuccessChance(cheatCount?: number, playAsWhite = false): number;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -19,6 +19,7 @@ getCheatSuccessChance(cheatCount?: number): number;
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| cheatCount | number | _(Optional)_ Optional override for the number of cheats already attempted. Defaults to the number of cheats attempted in the current game. |
|
||||
| playAsWhite | (not declared) | _(Optional)_ Optional override for playing as white. Can only be used when playing on a 'No AI' board. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@ export interface GoCheat
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [destroyNode(x, y)](./bitburner.gocheat.destroynode.md) | <p>Attempts to destroy an empty node, leaving an offline dead space that does not count as territory or provide open node access to adjacent routers.</p><p>Success chance can be seen via ns.go.getCheatSuccessChance()</p><p>Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.</p> |
|
||||
| [getCheatCount()](./bitburner.gocheat.getcheatcount.md) | Returns the number of times you've attempted to cheat in the current game. |
|
||||
| [getCheatSuccessChance(cheatCount)](./bitburner.gocheat.getcheatsuccesschance.md) | <p>Returns your chance of successfully playing one of the special moves in the ns.go.cheat API. Scales up with your crime success rate stat. Scales down with the number of times you've attempted to cheat in the current game.</p><p>Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.</p> |
|
||||
| [playTwoMoves(x1, y1, x2, y2)](./bitburner.gocheat.playtwomoves.md) | <p>Attempts to place two routers at once on empty nodes. Note that this ignores other move restrictions, so you can suicide your own routers if they have no access to empty ports and do not capture any enemy routers.</p><p>Success chance can be seen via ns.go.getCheatSuccessChance()</p><p>Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.</p> |
|
||||
| [removeRouter(x, y)](./bitburner.gocheat.removerouter.md) | <p>Attempts to remove an existing router, leaving an empty node behind.</p><p>Success chance can be seen via ns.go.getCheatSuccessChance()</p><p>Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.</p> |
|
||||
| [repairOfflineNode(x, y)](./bitburner.gocheat.repairofflinenode.md) | <p>Attempts to repair an offline node, leaving an empty playable node behind.</p><p>Success chance can be seen via ns.go.getCheatSuccessChance()</p><p>Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.</p> |
|
||||
| [destroyNode(x, y, playAsWhite)](./bitburner.gocheat.destroynode.md) | <p>Attempts to destroy an empty node, leaving an offline dead space that does not count as territory or provide open node access to adjacent routers.</p><p>Success chance can be seen via ns.go.getCheatSuccessChance()</p><p>Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.</p> |
|
||||
| [getCheatCount(playAsWhite)](./bitburner.gocheat.getcheatcount.md) | Returns the number of times you've attempted to cheat in the current game. |
|
||||
| [getCheatSuccessChance(cheatCount, playAsWhite)](./bitburner.gocheat.getcheatsuccesschance.md) | <p>Returns your chance of successfully playing one of the special moves in the ns.go.cheat API. Scales up with your crime success rate stat. Scales down with the number of times you've attempted to cheat in the current game.</p><p>Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.</p> |
|
||||
| [playTwoMoves(x1, y1, x2, y2, playAsWhite)](./bitburner.gocheat.playtwomoves.md) | <p>Attempts to place two routers at once on empty nodes. Note that this ignores other move restrictions, so you can suicide your own routers if they have no access to empty ports and do not capture any enemy routers.</p><p>Success chance can be seen via ns.go.getCheatSuccessChance()</p><p>Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.</p> |
|
||||
| [removeRouter(x, y, playAsWhite)](./bitburner.gocheat.removerouter.md) | <p>Attempts to remove an existing router, leaving an empty node behind.</p><p>Success chance can be seen via ns.go.getCheatSuccessChance()</p><p>Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.</p> |
|
||||
| [repairOfflineNode(x, y, playAsWhite)](./bitburner.gocheat.repairofflinenode.md) | <p>Attempts to repair an offline node, leaving an empty playable node behind.</p><p>Success chance can be seen via ns.go.getCheatSuccessChance()</p><p>Warning: if you fail to play a cheat move, your turn will be skipped. After your first cheat attempt, if you fail, there is a small (\~10%) chance you will instantly be ejected from the subnet.</p> |
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ playTwoMoves(
|
||||
y1: number,
|
||||
x2: number,
|
||||
y2: number,
|
||||
playAsWhite = false,
|
||||
): Promise<{
|
||||
type: "move" | "pass" | "gameOver";
|
||||
x: number | null;
|
||||
@@ -29,10 +30,11 @@ playTwoMoves(
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| x1 | number | |
|
||||
| y1 | number | |
|
||||
| x2 | number | |
|
||||
| y2 | number | |
|
||||
| x1 | number | x coordinate of first move to make |
|
||||
| y1 | number | y coordinate of first move to make |
|
||||
| x2 | number | x coordinate of second move to make |
|
||||
| y2 | number | y coordinate of second move to make |
|
||||
| playAsWhite | (not declared) | _(Optional)_ Optional override for playing as white. Can only be used when playing on a 'No AI' board. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ Warning: if you fail to play a cheat move, your turn will be skipped. After your
|
||||
removeRouter(
|
||||
x: number,
|
||||
y: number,
|
||||
playAsWhite = false,
|
||||
): Promise<{
|
||||
type: "move" | "pass" | "gameOver";
|
||||
x: number | null;
|
||||
@@ -27,8 +28,9 @@ removeRouter(
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| x | number | |
|
||||
| y | number | |
|
||||
| x | number | x coordinate of router to remove |
|
||||
| y | number | y coordinate of router to remove |
|
||||
| playAsWhite | (not declared) | _(Optional)_ Optional override for playing as white. Can only be used when playing on a 'No AI' board. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ Warning: if you fail to play a cheat move, your turn will be skipped. After your
|
||||
repairOfflineNode(
|
||||
x: number,
|
||||
y: number,
|
||||
playAsWhite = false,
|
||||
): Promise<{
|
||||
type: "move" | "pass" | "gameOver";
|
||||
x: number | null;
|
||||
@@ -27,8 +28,9 @@ repairOfflineNode(
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| x | number | |
|
||||
| y | number | |
|
||||
| x | number | x coordinate of offline node to repair |
|
||||
| y | number | y coordinate of offline node to repair |
|
||||
| playAsWhite | (not declared) | _(Optional)_ Optional override for playing as white. Can only be used when playing on a 'No AI' board. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
```typescript
|
||||
type GoOpponent =
|
||||
| "No AI"
|
||||
| "Netburners"
|
||||
| "Slum Snakes"
|
||||
| "The Black Hand"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## Grafting.getGraftableAugmentations() method
|
||||
|
||||
Retrieves a list of Augmentations that can be grafted.
|
||||
Retrieves a list of augmentations that can be grafted.
|
||||
|
||||
**Signature:**
|
||||
|
||||
@@ -15,11 +15,15 @@ getGraftableAugmentations(): string[];
|
||||
|
||||
string\[\]
|
||||
|
||||
An array of graftable Augmentations.
|
||||
An array of graftable augmentations.
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 5 GB
|
||||
|
||||
Note that this function returns a list of currently graftable Augmentations, based off of the Augmentations that you already own.
|
||||
Note:
|
||||
|
||||
- This function returns a list of currently graftable augmentations, based on the augmentations that you already own.
|
||||
|
||||
- This function does not check your current money and prerequisite augmentations. For example, it returns "Augmented Targeting II" even when you don't have enough money to graft that augmentation or don't have the prerequisite augmentation ("Augmented Targeting I").
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ This API requires Source-File 10 to use.
|
||||
| --- | --- |
|
||||
| [getAugmentationGraftPrice(augName)](./bitburner.grafting.getaugmentationgraftprice.md) | Retrieve the grafting cost of an aug. |
|
||||
| [getAugmentationGraftTime(augName)](./bitburner.grafting.getaugmentationgrafttime.md) | Retrieves the time required to graft an aug. Do not use this value to determine when the ongoing grafting finishes. The ongoing grafting is affected by current intelligence level and focus bonus. You should use [waitForOngoingGrafting](./bitburner.grafting.waitforongoinggrafting.md) for that purpose. |
|
||||
| [getGraftableAugmentations()](./bitburner.grafting.getgraftableaugmentations.md) | Retrieves a list of Augmentations that can be grafted. |
|
||||
| [getGraftableAugmentations()](./bitburner.grafting.getgraftableaugmentations.md) | Retrieves a list of augmentations that can be grafted. |
|
||||
| [graftAugmentation(augName, focus)](./bitburner.grafting.graftaugmentation.md) | Begins grafting the named aug. You must be in New Tokyo to use this. When you call this API, the current work (grafting or other actions) will be canceled. |
|
||||
| [waitForOngoingGrafting()](./bitburner.grafting.waitforongoinggrafting.md) | Wait until the ongoing grafting finishes or is canceled. |
|
||||
|
||||
|
||||
@@ -15,9 +15,11 @@
|
||||
| [BladeburnerOperationName](./bitburner.bladeburneroperationname.md) | Operation names of Bladeburner |
|
||||
| [BladeburnerSkillName](./bitburner.bladeburnerskillname.md) | Skill names type of Bladeburner |
|
||||
| [CityName](./bitburner.cityname.md) | Names of all cities |
|
||||
| [CodingContractName](./bitburner.codingcontractname.md) | |
|
||||
| [CompanyName](./bitburner.companyname.md) | Names of all companies |
|
||||
| [CreatingCorporationCheckResult](./bitburner.creatingcorporationcheckresult.md) | |
|
||||
| [CrimeType](./bitburner.crimetype.md) | |
|
||||
| [FactionName](./bitburner.factionname.md) | <p>Names of all factions.</p><p>Warning: Spoiler ahead. This enum contains names of \*\*all\*\* factions. If you do not want to know what all the factions are, you should not check this enum. Some factions are only accessible in the endgame.</p> |
|
||||
| [FactionWorkType](./bitburner.factionworktype.md) | |
|
||||
| [GymLocationName](./bitburner.gymlocationname.md) | Locations of gym |
|
||||
| [GymType](./bitburner.gymtype.md) | |
|
||||
@@ -77,9 +79,9 @@
|
||||
| [GangFormulas](./bitburner.gangformulas.md) | Gang formulas |
|
||||
| [GangGenInfo](./bitburner.ganggeninfo.md) | Gang general info. |
|
||||
| [GangMemberAscension](./bitburner.gangmemberascension.md) | |
|
||||
| [GangMemberExpGain](./bitburner.gangmemberexpgain.md) | |
|
||||
| [GangMemberInfo](./bitburner.gangmemberinfo.md) | |
|
||||
| [GangMemberInstall](./bitburner.gangmemberinstall.md) | |
|
||||
| [GangOtherInfo](./bitburner.gangotherinfo.md) | |
|
||||
| [GangOtherInfoObject](./bitburner.gangotherinfoobject.md) | |
|
||||
| [GangTaskStats](./bitburner.gangtaskstats.md) | Object representing data representing a gang member task. |
|
||||
| [GangTerritory](./bitburner.gangterritory.md) | |
|
||||
@@ -165,7 +167,10 @@
|
||||
| --- | --- |
|
||||
| [BladeburnerActionName](./bitburner.bladeburneractionname.md) | |
|
||||
| [BladeburnerActionTypeForSleeve](./bitburner.bladeburneractiontypeforsleeve.md) | |
|
||||
| [CodingContractData](./bitburner.codingcontractdata.md) | Coding contract data will differ depending on coding contract. |
|
||||
| [CodingContractAnswer](./bitburner.codingcontractanswer.md) | |
|
||||
| [CodingContractData](./bitburner.codingcontractdata.md) | |
|
||||
| [CodingContractObject](./bitburner.codingcontractobject.md) | |
|
||||
| [CodingContractSignatures](./bitburner.codingcontractsignatures.md) | |
|
||||
| [CorpEmployeePosition](./bitburner.corpemployeeposition.md) | |
|
||||
| [CorpIndustryName](./bitburner.corpindustryname.md) | |
|
||||
| [CorpMaterialName](./bitburner.corpmaterialname.md) | |
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## NS.atExit() method
|
||||
|
||||
Add callback function when the script dies
|
||||
Add a callback to be executed when the script dies.
|
||||
|
||||
**Signature:**
|
||||
|
||||
@@ -16,8 +16,8 @@ atExit(f: () => void, id?: string): void;
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| f | () => void | |
|
||||
| id | string | _(Optional)_ |
|
||||
| f | () => void | A function to execute when the script dies. |
|
||||
| id | string | _(Optional)_ Callback ID. Optional, defaults to <code>"default"</code>. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
@@ -29,5 +29,5 @@ RAM cost: 0 GB
|
||||
|
||||
NS2 exclusive
|
||||
|
||||
Add callback to be executed when the script dies.
|
||||
Each script can only register one callback per callback ID. If another callback is registered with the same callback ID the previous callback with that ID is forgotten and will not be executed when the script dies.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Runs BruteSSH.exe on a server.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
brutessh(host: string): void;
|
||||
brutessh(host: string): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -20,7 +20,9 @@ brutessh(host: string): void;
|
||||
|
||||
**Returns:**
|
||||
|
||||
void
|
||||
boolean
|
||||
|
||||
True if the player runs the program successfully, and false otherwise.
|
||||
|
||||
## Remarks
|
||||
|
||||
|
||||
@@ -4,7 +4,12 @@
|
||||
|
||||
## NS.closeTail() method
|
||||
|
||||
Close the tail window of a script.
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> Use [ns.ui.closeTail](./bitburner.userinterface.closetail.md) instead.
|
||||
>
|
||||
|
||||
Close the tail window of a script. This function is deprecated and will be removed in a later version.
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Runs FTPCrack.exe on a server.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
ftpcrack(host: string): void;
|
||||
ftpcrack(host: string): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -20,7 +20,9 @@ ftpcrack(host: string): void;
|
||||
|
||||
**Returns:**
|
||||
|
||||
void
|
||||
boolean
|
||||
|
||||
True if the player runs the program successfully, and false otherwise.
|
||||
|
||||
## Remarks
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ getPurchasedServerCost(ram: number): number;
|
||||
|
||||
number
|
||||
|
||||
The cost to purchase a server with the specified amount of ram.
|
||||
The cost to purchase a server with the specified amount of ram, or returns Infinity if ram is not a valid amount.
|
||||
|
||||
## Remarks
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ getPurchasedServerUpgradeCost(hostname: string, ram: number): number;
|
||||
|
||||
number
|
||||
|
||||
The price to upgrade.
|
||||
The price to upgrade or -1 if either input is not valid, i.e. hostname is not the name of a purchased server or ram is not a valid amount.
|
||||
|
||||
## Remarks
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ RAM cost: 1 GB
|
||||
|
||||
Returns the chance you have of successfully hacking the specified server.
|
||||
|
||||
This returned value is in decimal form, not percentage.
|
||||
This returned value is in the range 0-1.
|
||||
|
||||
Like other basic hacking analysis functions, this calculation uses the current status of the player and server. To calculate using hypothetical server or player status, obtain access to the Formulas API and use [formulas.hacking.hackChance](./bitburner.hackingformulas.hackchance.md)<!-- -->.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Runs HTTPWorm.exe on a server.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
httpworm(host: string): void;
|
||||
httpworm(host: string): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -20,7 +20,9 @@ httpworm(host: string): void;
|
||||
|
||||
**Returns:**
|
||||
|
||||
void
|
||||
boolean
|
||||
|
||||
True if the player runs the program successfully, and false otherwise.
|
||||
|
||||
## Remarks
|
||||
|
||||
|
||||
@@ -56,12 +56,12 @@ export async function main(ns) {
|
||||
| --- | --- |
|
||||
| [alert(msg)](./bitburner.ns.alert.md) | Open up a message box. |
|
||||
| [asleep(millis)](./bitburner.ns.asleep.md) | Suspends the script for n milliseconds. Doesn't block with concurrent calls. |
|
||||
| [atExit(f, id)](./bitburner.ns.atexit.md) | Add callback function when the script dies |
|
||||
| [atExit(f, id)](./bitburner.ns.atexit.md) | Add a callback to be executed when the script dies. |
|
||||
| [brutessh(host)](./bitburner.ns.brutessh.md) | Runs BruteSSH.exe on a server. |
|
||||
| [clear(handle)](./bitburner.ns.clear.md) | Clear data from a file. |
|
||||
| [clearLog()](./bitburner.ns.clearlog.md) | Clears the script’s logs. |
|
||||
| [clearPort(portNumber)](./bitburner.ns.clearport.md) | Clear data from a port. |
|
||||
| [closeTail(pid)](./bitburner.ns.closetail.md) | Close the tail window of a script. |
|
||||
| [closeTail(pid)](./bitburner.ns.closetail.md) | Close the tail window of a script. This function is deprecated and will be removed in a later version. |
|
||||
| [deleteServer(host)](./bitburner.ns.deleteserver.md) | Delete a purchased server. |
|
||||
| [disableLog(fn)](./bitburner.ns.disablelog.md) | Disables logging for the given NS function. |
|
||||
| [enableLog(fn)](./bitburner.ns.enablelog.md) | Enables logging for the given NS function. |
|
||||
@@ -131,7 +131,7 @@ export async function main(ns) {
|
||||
| [kill(filename, hostname, args)](./bitburner.ns.kill_1.md) | Terminate the script(s) with the provided filename, hostname, and script arguments. |
|
||||
| [killall(host, safetyGuard)](./bitburner.ns.killall.md) | Terminate all scripts on a server. |
|
||||
| [ls(host, substring)](./bitburner.ns.ls.md) | List files on a server. |
|
||||
| [moveTail(x, y, pid)](./bitburner.ns.movetail.md) | Move a tail window. |
|
||||
| [moveTail(x, y, pid)](./bitburner.ns.movetail.md) | Move a tail window. This function is deprecated and will be removed in a later version. |
|
||||
| [mv(host, source, destination)](./bitburner.ns.mv.md) | Move a file on the target server. |
|
||||
| [nextPortWrite(port)](./bitburner.ns.nextportwrite.md) | Listen for a port write. |
|
||||
| [nFormat(n, format)](./bitburner.ns.nformat.md) | Format a number using the numeral library. This function is deprecated and will be removed in a later version. |
|
||||
@@ -148,7 +148,7 @@ export async function main(ns) {
|
||||
| [readPort(portNumber)](./bitburner.ns.readport.md) | Read data from a port. |
|
||||
| [relaysmtp(host)](./bitburner.ns.relaysmtp.md) | Runs relaySMTP.exe on a server. |
|
||||
| [renamePurchasedServer(hostname, newName)](./bitburner.ns.renamepurchasedserver.md) | Rename a purchased server. |
|
||||
| [resizeTail(width, height, pid)](./bitburner.ns.resizetail.md) | Resize a tail window. |
|
||||
| [resizeTail(width, height, pid)](./bitburner.ns.resizetail.md) | Resize a tail window. This function is deprecated and will be removed in a later version. |
|
||||
| [rm(name, host)](./bitburner.ns.rm.md) | Delete a file. |
|
||||
| [run(script, threadOrOptions, args)](./bitburner.ns.run.md) | Start another script on the current server. |
|
||||
| [scan(host)](./bitburner.ns.scan.md) | Get the list of servers connected to a server. |
|
||||
@@ -157,13 +157,13 @@ export async function main(ns) {
|
||||
| [scriptRunning(script, host)](./bitburner.ns.scriptrunning.md) | Check if any script with a filename is running. |
|
||||
| [self()](./bitburner.ns.self.md) | Returns the currently running script. |
|
||||
| [serverExists(host)](./bitburner.ns.serverexists.md) | Returns a boolean denoting whether or not the specified server exists. |
|
||||
| [setTitle(title, pid)](./bitburner.ns.settitle.md) | Set the title of the tail window of a script. |
|
||||
| [setTitle(title, pid)](./bitburner.ns.settitle.md) | Set the title of the tail window of a script. This function is deprecated and will be removed in a later version. |
|
||||
| [share()](./bitburner.ns.share.md) | Share the server's ram with your factions. |
|
||||
| [sleep(millis)](./bitburner.ns.sleep.md) | Suspends the script for n milliseconds. |
|
||||
| [spawn(script, threadOrOptions, args)](./bitburner.ns.spawn.md) | Terminate current script and start another in a defined number of milliseconds. |
|
||||
| [sprintf(format, args)](./bitburner.ns.sprintf.md) | Format a string. |
|
||||
| [sqlinject(host)](./bitburner.ns.sqlinject.md) | Runs SQLInject.exe on a server. |
|
||||
| [tail(fn, host, args)](./bitburner.ns.tail.md) | Open the tail window of a script. |
|
||||
| [tail(fn, host, args)](./bitburner.ns.tail.md) | Open the tail window of a script. This function is deprecated and will be removed in a later version. |
|
||||
| [tFormat(milliseconds, milliPrecision)](./bitburner.ns.tformat.md) | Format time to a readable string. |
|
||||
| [toast(msg, variant, duration)](./bitburner.ns.toast.md) | Queue a toast (bottom-right notification). |
|
||||
| [tprint(args)](./bitburner.ns.tprint.md) | Prints one or more values or variables to the Terminal. |
|
||||
|
||||
@@ -4,7 +4,12 @@
|
||||
|
||||
## NS.moveTail() method
|
||||
|
||||
Move a tail window.
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> Use [ns.ui.moveTail](./bitburner.userinterface.movetail.md) instead.
|
||||
>
|
||||
|
||||
Move a tail window. This function is deprecated and will be removed in a later version.
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Runs NUKE.exe on a server.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
nuke(host: string): void;
|
||||
nuke(host: string): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -20,7 +20,9 @@ nuke(host: string): void;
|
||||
|
||||
**Returns:**
|
||||
|
||||
void
|
||||
boolean
|
||||
|
||||
True if the player runs the program successfully, and false otherwise.
|
||||
|
||||
## Remarks
|
||||
|
||||
@@ -28,6 +30,10 @@ RAM cost: 0.05 GB
|
||||
|
||||
Running NUKE.exe on a target server gives you root access which means you can execute scripts on said server. NUKE.exe must exist on your home computer.
|
||||
|
||||
Each server has a different number of required open ports. If that number is greater than 0, you have to open its ports before nuking it. You can check the requirement with [getServerNumPortsRequired](./bitburner.ns.getservernumportsrequired.md) or [getServer().numOpenPortsRequired](./bitburner.server.numopenportsrequired.md)<!-- -->.
|
||||
|
||||
Note that the server's required hacking level is not a requirement of nuking. You can nuke a server as long as you open enough ports, regardless of your hacking level.
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Runs relaySMTP.exe on a server.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
relaysmtp(host: string): void;
|
||||
relaysmtp(host: string): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -20,7 +20,9 @@ relaysmtp(host: string): void;
|
||||
|
||||
**Returns:**
|
||||
|
||||
void
|
||||
boolean
|
||||
|
||||
True if the player runs the program successfully, and false otherwise.
|
||||
|
||||
## Remarks
|
||||
|
||||
|
||||
@@ -4,7 +4,12 @@
|
||||
|
||||
## NS.resizeTail() method
|
||||
|
||||
Resize a tail window.
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> Use [ns.ui.resizeTail](./bitburner.userinterface.resizetail.md) instead.
|
||||
>
|
||||
|
||||
Resize a tail window. This function is deprecated and will be removed in a later version.
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -30,6 +30,29 @@ RAM cost: 0.2 GB
|
||||
|
||||
Returns an array containing the hostnames of all servers that are one node way from the specified target server. The hostnames in the returned array are strings.
|
||||
|
||||
The server network is a tree graph with the home server at the root. The parent node is always the first item of the returned array.
|
||||
|
||||
For example, let's say the network looks like this:
|
||||
|
||||
```
|
||||
home
|
||||
--n00dles
|
||||
--joesguns
|
||||
----CSEC
|
||||
------omega-net
|
||||
```
|
||||
ns.scan("home"): \["n00dles", "joesguns"\]: "home" is the root, so it does not have a parent node.
|
||||
|
||||
ns.scan("n00dles"): \["home"\]: "home" is the parent node of "n00dles".
|
||||
|
||||
ns.scan("joesguns"): \["home", "CSEC"\]: "home" is the parent node of "joesguns".
|
||||
|
||||
ns.scan("CSEC"): \["joesguns", "omega-net"\]: "joesguns" is the parent node of "CSEC".
|
||||
|
||||
ns.scan("omega-net"): \["CSEC"\]: "CSEC" is the parent node of "omega-net".
|
||||
|
||||
If you run the "scan-analyze" command at home, it won't show all servers due to its limited maximum depth. You can use this function with BFS (Breadth-first search) or DFS (Depth-first search) to traverse the network and discover all servers.
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,12 @@
|
||||
|
||||
## NS.setTitle() method
|
||||
|
||||
Set the title of the tail window of a script.
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> Use [ns.ui.setTailTitle](./bitburner.userinterface.settailtitle.md) instead.
|
||||
>
|
||||
|
||||
Set the title of the tail window of a script. This function is deprecated and will be removed in a later version.
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Runs SQLInject.exe on a server.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
sqlinject(host: string): void;
|
||||
sqlinject(host: string): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -20,7 +20,9 @@ sqlinject(host: string): void;
|
||||
|
||||
**Returns:**
|
||||
|
||||
void
|
||||
boolean
|
||||
|
||||
True if the player runs the program successfully, and false otherwise.
|
||||
|
||||
## Remarks
|
||||
|
||||
|
||||
@@ -4,7 +4,12 @@
|
||||
|
||||
## NS.tail() method
|
||||
|
||||
Open the tail window of a script.
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> Use [ns.ui.openTail](./bitburner.userinterface.opentail.md) instead.
|
||||
>
|
||||
|
||||
Open the tail window of a script. This function is deprecated and will be removed in a later version.
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -19,7 +19,9 @@ export type NSEnums = {
|
||||
ToastVariant: typeof ToastVariant;
|
||||
UniversityClassType: typeof UniversityClassType;
|
||||
CompanyName: typeof CompanyName;
|
||||
FactionName: typeof FactionName;
|
||||
CodingContractName: typeof CodingContractName;
|
||||
};
|
||||
```
|
||||
**References:** [CityName](./bitburner.cityname.md)<!-- -->, [CrimeType](./bitburner.crimetype.md)<!-- -->, [FactionWorkType](./bitburner.factionworktype.md)<!-- -->, [GymType](./bitburner.gymtype.md)<!-- -->, [JobName](./bitburner.jobname.md)<!-- -->, [JobField](./bitburner.jobfield.md)<!-- -->, [LocationName](./bitburner.locationname.md)<!-- -->, [ToastVariant](./bitburner.toastvariant.md)<!-- -->, [UniversityClassType](./bitburner.universityclasstype.md)<!-- -->, [CompanyName](./bitburner.companyname.md)
|
||||
**References:** [CityName](./bitburner.cityname.md)<!-- -->, [CrimeType](./bitburner.crimetype.md)<!-- -->, [FactionWorkType](./bitburner.factionworktype.md)<!-- -->, [GymType](./bitburner.gymtype.md)<!-- -->, [JobName](./bitburner.jobname.md)<!-- -->, [JobField](./bitburner.jobfield.md)<!-- -->, [LocationName](./bitburner.locationname.md)<!-- -->, [ToastVariant](./bitburner.toastvariant.md)<!-- -->, [UniversityClassType](./bitburner.universityclasstype.md)<!-- -->, [CompanyName](./bitburner.companyname.md)<!-- -->, [FactionName](./bitburner.factionname.md)<!-- -->, [CodingContractName](./bitburner.codingcontractname.md)
|
||||
|
||||
|
||||
25
markdown/bitburner.reputationformulas.donationforrep.md
Normal file
25
markdown/bitburner.reputationformulas.donationforrep.md
Normal file
@@ -0,0 +1,25 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [ReputationFormulas](./bitburner.reputationformulas.md) > [donationForRep](./bitburner.reputationformulas.donationforrep.md)
|
||||
|
||||
## ReputationFormulas.donationForRep() method
|
||||
|
||||
Calculate the donation needed to gain an amount of reputation.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
donationForRep(reputation: number, player: Person): number;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| reputation | number | Amount of reputation |
|
||||
| player | [Person](./bitburner.person.md) | Player info, typically from [getPlayer](./bitburner.ns.getplayer.md) |
|
||||
|
||||
**Returns:**
|
||||
|
||||
number
|
||||
|
||||
@@ -18,5 +18,6 @@ interface ReputationFormulas
|
||||
| --- | --- |
|
||||
| [calculateFavorToRep(favor)](./bitburner.reputationformulas.calculatefavortorep.md) | Calculate the total required amount of faction reputation to reach a target favor. |
|
||||
| [calculateRepToFavor(rep)](./bitburner.reputationformulas.calculatereptofavor.md) | Calculate the resulting faction favor of a total amount of reputation. (Faction favor is gained whenever you install an Augmentation.) |
|
||||
| [donationForRep(reputation, player)](./bitburner.reputationformulas.donationforrep.md) | Calculate the donation needed to gain an amount of reputation. |
|
||||
| [repFromDonation(amount, player)](./bitburner.reputationformulas.repfromdonation.md) | Calculate how much rep would be gained. |
|
||||
|
||||
|
||||
21
markdown/bitburner.singularity.getsavedata.md
Normal file
21
markdown/bitburner.singularity.getsavedata.md
Normal file
@@ -0,0 +1,21 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Singularity](./bitburner.singularity.md) > [getSaveData](./bitburner.singularity.getsavedata.md)
|
||||
|
||||
## Singularity.getSaveData() method
|
||||
|
||||
This function returns the save data.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getSaveData(): Promise<Uint8Array>;
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
Promise<Uint8Array>
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 1 GB \* 16/4/1
|
||||
|
||||
@@ -15,11 +15,29 @@ isBusy(): boolean;
|
||||
|
||||
boolean
|
||||
|
||||
True if the player is currently performing an ‘action’, false otherwise.
|
||||
True if the player is currently performing an action, false otherwise.
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 0.5 GB \* 16/4/1
|
||||
|
||||
Returns a boolean indicating whether or not the player is currently performing an ‘action’. These actions include working for a company/faction, studying at a university, working out at a gym, creating a program, committing a crime, etc.
|
||||
Returns a boolean indicating if the player is currently performing an action. These actions include:
|
||||
|
||||
- Studying at a university
|
||||
|
||||
- Working out at a gym
|
||||
|
||||
- Working for a company/faction
|
||||
|
||||
- Creating a program
|
||||
|
||||
- Committing a crime
|
||||
|
||||
- Grafting an augmentation
|
||||
|
||||
Note:
|
||||
|
||||
- This function returns true when the UI is showing the infiltration UI or the BitVerse.
|
||||
|
||||
- This function does not take Bladeburner actions into account. You can use [getCurrentAction](./bitburner.bladeburner.getcurrentaction.md) to check if you are performing a Bladeburner action.
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ This API requires Source-File 4 to use. The RAM cost of all these functions is m
|
||||
| [getFactionWorkTypes(faction)](./bitburner.singularity.getfactionworktypes.md) | Get the work types of a faction. |
|
||||
| [getOwnedAugmentations(purchased)](./bitburner.singularity.getownedaugmentations.md) | Get a list of owned augmentation. |
|
||||
| [getOwnedSourceFiles()](./bitburner.singularity.getownedsourcefiles.md) | Get a list of acquired Source-Files. |
|
||||
| [getSaveData()](./bitburner.singularity.getsavedata.md) | This function returns the save data. |
|
||||
| [getUpgradeHomeCoresCost()](./bitburner.singularity.getupgradehomecorescost.md) | Get the price of upgrading home cores. |
|
||||
| [getUpgradeHomeRamCost()](./bitburner.singularity.getupgradehomeramcost.md) | Get the price of upgrading home RAM. |
|
||||
| [goToLocation(locationName)](./bitburner.singularity.gotolocation.md) | Go to a location. |
|
||||
|
||||
@@ -9,14 +9,14 @@ Quit jobs by company.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
quitJob(companyName?: CompanyName | `${CompanyName}`): void;
|
||||
quitJob(companyName: CompanyName | `${CompanyName}`): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | _(Optional)_ Name of the company. |
|
||||
| companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of the company. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
@@ -26,5 +26,7 @@ void
|
||||
|
||||
RAM cost: 3 GB \* 16/4/1
|
||||
|
||||
This function will finish work with the company provided and quit any jobs.
|
||||
This function quits the current work if it's from the provided company.
|
||||
|
||||
This function affects you and all sleeves. If a sleeve is working for this company, it will stop working and be idle.
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@ Soft reset the game.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
softReset(cbScript: string): void;
|
||||
softReset(cbScript?: string): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| cbScript | string | This is a script that will automatically be run after Augmentations are installed (after the reset). This script will be run with no arguments and 1 thread. It must be located on your home computer. |
|
||||
| cbScript | string | _(Optional)_ This is a script that will automatically be run after Augmentations are installed (after the reset). This script will be run with no arguments and 1 thread. It must be located on your home computer. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
||||
@@ -15,17 +15,27 @@ stopAction(): boolean;
|
||||
|
||||
boolean
|
||||
|
||||
True if the player’s action was ended, false if the player was not performing an action.
|
||||
True if the player’s action is stopped, false if the player is not performing an action.
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 1 GB \* 16/4/1
|
||||
|
||||
This function is used to end whatever ‘action’ the player is currently performing. The player will receive whatever money/experience/etc. he has earned from that action.
|
||||
This function stops the action the player is currently performing. The player will receive rewards (money, experience, etc.) they have earned from that action.
|
||||
|
||||
The actions that can be stopped with this function are:
|
||||
|
||||
\* Studying at a university \* Working out at a gym \* Working for a company/faction \* Creating a program \* Committing a crime
|
||||
- Studying at a university
|
||||
|
||||
This function will return true if the player’s action was ended. It will return false if the player was not performing an action when this function was called.
|
||||
- Working out at a gym
|
||||
|
||||
- Working for a company/faction
|
||||
|
||||
- Creating a program
|
||||
|
||||
- Committing a crime
|
||||
|
||||
- Grafting an augmentation
|
||||
|
||||
This function will return true if the player's action is stopped. It will return false if the player is not performing an action when this function is called.
|
||||
|
||||
|
||||
13
markdown/bitburner.tailproperties.fontsize.md
Normal file
13
markdown/bitburner.tailproperties.fontsize.md
Normal file
@@ -0,0 +1,13 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [TailProperties](./bitburner.tailproperties.md) > [fontSize](./bitburner.tailproperties.fontsize.md)
|
||||
|
||||
## TailProperties.fontSize property
|
||||
|
||||
The font size of the tail window. Defaults to the font size set in the style editor.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
fontSize: number;
|
||||
```
|
||||
@@ -15,6 +15,7 @@ interface TailProperties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [fontSize](./bitburner.tailproperties.fontsize.md) | | number | The font size of the tail window. Defaults to the font size set in the style editor. |
|
||||
| [height](./bitburner.tailproperties.height.md) | | number | Height of the log window content area |
|
||||
| [width](./bitburner.tailproperties.width.md) | | number | Width of the log window content area |
|
||||
| [x](./bitburner.tailproperties.x.md) | | number | X-coordinate of the log window |
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user