Compare commits

...

130 Commits

Author SHA1 Message Date
Snarling
02c4f9c68d 2.8 Release Prep (#1993)
Update constants.ts
Update version in package.jsons
Move changelog to documented changelog
2025-03-05 03:18:53 -05:00
catloversg
23ad55554e UI: Add "Run" action to run current script in editor (#1987) 2025-03-04 02:43:31 -08:00
David Walker
8cdafdc7b9 CODEBASE: Refactor duplicate code in updateSkillLevels (#1988) 2025-03-04 01:45:06 -08:00
David Walker
f16b6b92b8 CODEBASE: Version 2.8 stuff (#1989)
Change dev version from 2.7.1 to 2.8.0

Also adjust the save data migration code for the latest check to use "<"
instead of "<=" to agree with the style of everything else.
(I noticed this due to investistigating bumping the version, but that
happens as part of the release commit so it shouldn't be done yet.)
2025-03-01 15:25:22 -08:00
muesli4brekkies
f881bd1d9a DOCS: Add docs for autocomplete (#1981) 2025-03-01 09:10:35 -08:00
catloversg
ff724f3f06 DOCUMENTATION: Clarify values returned in range 0-1 (#1986) 2025-03-01 09:08:42 -08:00
catloversg
4ef597bd37 BUGFIX: Some calculations return NaN due to Player.playtimeSinceLastAug being 0 in edge cases (#1985) 2025-03-01 09:06:58 -08:00
catloversg
c0e01f304d CODEBASE: Refactor KeyBindingPage (#1984) 2025-02-28 12:56:00 -08:00
catloversg
91b68db1fe BUGFIX: Multiple problems with Job tab (#1976) 2025-02-28 12:52:08 -08:00
catloversg
f54f7b932c DOCUMENTATION: Clarify value of gang territory (#1978)
* DOCUMENTATION: Clarify decimal form of gang territory

* Update based on feedback
2025-02-28 12:45:36 -08:00
catloversg
2a544bbc15 MISC: Update changelog (#1983) 2025-02-28 12:43:30 -08:00
catloversg
8ed83f3d37 MISC: Add key binding feature (#1830) 2025-02-27 22:59:12 -08:00
catloversg
3ba89eb388 CODEBASE: Update api-extractor (#1982) 2025-02-27 22:39:58 -08:00
catloversg
5f29c5b043 CODEBASE: Update webpack and katex (#1975) 2025-02-27 10:43:33 -08:00
Michael Ficocelli
1982e7195b UI: Add disambiguation to the confusing "1s / ls" tutorial step (#1972)
* UI: Add disambiguation to the confusing "1s / ls" tutorial step, and a general "did you mean" to the terminal

* UI: Add disambiguation to the confusing "1s / ls" tutorial step, and a general "did you mean" to the terminal

* Prevent duplicate suggestions

* Update src/Terminal/Terminal.ts

Co-authored-by: David Walker <d0sboots@gmail.com>

* Prevent duplicate suggestions

---------

Co-authored-by: David Walker <d0sboots@gmail.com>
2025-02-27 10:34:16 -08:00
catloversg
6461d5f247 UI: Improve performance of April Fools Easter egg (#1977) 2025-02-27 10:14:17 -08:00
catloversg
fed3cf1af2 DOCUMENTATION: Clarify ns.singularity.quitJob (#1979) 2025-02-27 10:03:46 -08:00
catloversg
05f0ba1ac6 DOCUMENTATION: Clarify ns.singularity.softReset (#1980) 2025-02-27 10:02:04 -08:00
Adam Andreatta
a25ab3dd39 API: Added external api which returns gainExperience (#1955) 2025-02-20 15:57:06 -08:00
catloversg
3eadb0d18c BUGFIX: JetBrains Mono font shows wrong glyphs (#1971) 2025-02-17 13:18:10 -08:00
catloversg
3bb56efb34 DOCUMENTATION: Clarify ns.scan (#1965) 2025-02-16 18:27:10 -08:00
catloversg
63d7061fd8 UI: Warn player if they are editing and saving files on non-home servers (#1968) 2025-02-16 18:26:45 -08:00
catloversg
13990fbe4c MISC: Do not round return value of getBonusTime APIs (#1961) 2025-02-16 01:42:11 -08:00
catloversg
23bc4e8804 MISC: Show user-friendly error message when there is syntax error in scripts (#1963) 2025-02-16 01:27:26 -08:00
catloversg
0a4598a9a0 UI: Show Save ID in Options tab (#1964) 2025-02-16 01:24:46 -08:00
LJ
42a7941db7 Fix invalid filenames upon loading save (#1147) 2025-02-16 01:07:40 -08:00
catloversg
adc39ad825 BUGFIX: ns.corporation.bribe can bribe faction that player is not member of (#1966) 2025-02-16 01:05:22 -08:00
catloversg
26c5bb40e3 MISC: Clarify advanced options (#1962) 2025-02-16 01:03:55 -08:00
catloversg
31591da024 UI: Show exact reasons why player cannot bribe factions (#1967) 2025-02-16 01:02:50 -08:00
catloversg
2dfaca3db4 DOCUMENTATION: Clarify ns.nuke (#1969) 2025-02-16 00:58:00 -08:00
LJ
905d37ef93 Add donationToFavor() to docs (#1960) 2025-02-13 21:35:55 -08:00
LJ
30075f3c07 API: Add donationForRep() to Formulas (#1141) 2025-02-11 22:05:32 -08:00
G4mingJon4s
b61e93b246 CODINGCONTRACT: Move internals to a separate folder (#1932) 2025-02-11 22:04:23 -08:00
Femboy Fireball
5bc9068745 ACHIEVEMENTS: Support achievements with no matching Steam achievement (#1953) 2025-02-08 19:19:36 -08:00
catloversg
c99fa448fa BUGFIX: Cursor position in editor is moved undesirably in edge cases (#1952) 2025-02-07 15:19:54 -08:00
catloversg
48bced3484 MISC: Update changelog (#1948) 2025-02-07 15:18:38 -08:00
Michael Ficocelli
c8d2c9f769 IPVGO: Support scripts playing against each other as each color on "No AI" boards (#1917)
This is a big change with a *lot* of moving parts.

The largest part of it is enabling scripts to `playAsWhite` as a parameter to many Go functions. In the implementation, this involved a significant rewrite of `opponentNextTurn` promise handling.

A number of other changes and bugfixes are included:
* Fixes the issue where handicap stones are added on game load.
* Better typing for error callbacks.
* Throw errors instead of deadlocking on bad cheat usage.
* Return always-resolved gameOver promise after game end
* Added a new `resetStats` api function.

---------

Co-authored-by: David Walker <d0sboots@gmail.com>
2025-02-02 20:47:16 -08:00
catloversg
de6b202341 CODEBASE: Refactor Player.applyForJob (#1947) 2025-02-02 09:29:18 -08:00
catloversg
72d2528e9a UI: Show all jobs instead of only one in Job tab (#1945) 2025-02-02 09:26:39 -08:00
catloversg
d6ee16cdb3 API: Move tail-related APIs to another namespace (#1935)
* API: Move tail-related APIs to another namespace

* Add missing RAM cost config

* Remove setTailFontSize from NS namespace
2025-02-01 21:43:56 -08:00
catloversg
67aff2a6a0 BUGFIX: Wrong plural form in modal of coding contract (#1939) 2025-02-01 21:42:56 -08:00
catloversg
1cc0288cd8 BUGFIX: Sleeve takes on contracts without checking availability (#1946) 2025-02-01 21:41:07 -08:00
Michael Ficocelli
381310946a IPVGO: ensure def is treated the same as the other stats boosted by playing against tetrads (#1927) 2025-01-31 16:10:30 -08:00
TheAimMan
16022d36f4 MISC: Decrease factionInviteCheckInterval and check for Invites on faction page load (#1943) 2025-01-31 11:49:15 -08:00
catloversg
4a452b8aca DOCUMENTATION: Fix typo in proof of boost material optimizer (#1938) 2025-01-31 11:21:28 -08:00
catloversg
a4217b448a MISC: Standardize behavior of connect CLI and Singularity API (#1933) 2025-01-31 11:20:17 -08:00
catloversg
686bfe5aef BLADEBURNER: Show operation description in tooltip of completed BlackOps (#1941) 2025-01-31 11:16:39 -08:00
catloversg
822c55574d MISC: Allow using wss for RFA (#1942) 2025-01-31 11:07:38 -08:00
catloversg
40c696feb1 UI: Clarify availability of "buy" CLI (#1940) 2025-01-31 10:52:27 -08:00
Hihahahalol
f337de47df UI: In Operation Wallace. Reword so "The Dark Army" works, for grammar (#1931) 2025-01-30 10:39:31 -08:00
catloversg
956e3875e9 API: Add getSaveData API (#1390) 2025-01-30 10:36:59 -08:00
catloversg
934687d4b5 UI: Clarify "Disable ASCII art" setting (#1937) 2025-01-30 10:28:17 -08:00
catloversg
7d95400108 MISC: Fix typo in API break notice of v2.6.1 (#1936) 2025-01-30 10:27:40 -08:00
catloversg
85cda00538 DOCUMENTATION: Replace outdated links for v2 migration guide and changelog (#1934) 2025-01-30 10:27:13 -08:00
catloversg
ada903f356 CODEBASE: Refactor ns.singularity.purchaseAugmentation (#1879) 2025-01-28 10:42:25 -08:00
catloversg
2965f51879 API: Add a way to get the list of all factions (#1457) 2025-01-28 10:40:11 -08:00
G4mingJon4s
ffae0045a4 CODINGCONTRACT: Add support for other answer formats (#1892) 2025-01-26 09:35:04 -08:00
catloversg
b161142796 API: Add ns.renderTail (#1815) 2025-01-25 09:14:45 -08:00
Sphyxis
97d248419d BB: Allow API Usage in BN 6 without 7 - Grants Augment for BN 7 completion (#1926) 2025-01-25 09:12:51 -08:00
catloversg
6c7972dc60 CORPORATION: Fix wrong warning of sellAmt being negative (#1819) 2025-01-25 09:11:57 -08:00
David Walker
213c57f2f8 DOCS: Document shorts in terms of actual finance terms (#1908) 2025-01-25 08:41:16 -08:00
catloversg
5301f0f378 UI: Add reward info to intro page of infiltration (#1835) 2025-01-24 11:16:32 -08:00
catloversg
9bf408221c CODEBASE: Merge TypeAssertion files (#1922) 2025-01-24 11:06:39 -08:00
catloversg
f0a0d3095e CORPORATION: Show product production multiplier in research popup (#1919) 2025-01-24 09:16:23 -08:00
PerpetuaLux
1fa2c55860 BUGFIX: Changed no such file run command error to include all executable types (#1918) 2025-01-24 09:13:54 -08:00
catloversg
faf34ad45d BUGFIX: Static RAM calculator cannot process abstract methods (#1921) 2025-01-24 09:09:06 -08:00
catloversg
1a54be184e DOCUMENTATION: Make nuke and port opening functions return boolean (#1923) 2025-01-24 08:48:50 -08:00
catloversg
9920b6ae4d MISC: Add source map to transformed scripts (#1812)
* MISC: Add source map to transformed scripts

* Print error to console
2025-01-19 13:50:50 -08:00
Mathekatze
7b009991e5 DOCUMENTATION: improve documentation for atExit() (#1916) 2025-01-19 12:49:25 -08:00
esainane
93a1d6da53 DOCUMENTATION: Fix incorrectly documented BusinessFactor (#1915)
The advanced documentation incorrectly claims that the multiplier is
0.001. The actual code divides by 10000 (10e3), effectively
multiplying by 0.0001:

https://github.com/bitburner-official/bitburner-src/blob/dev/src/Corporation/Division.ts#L1085
2025-01-19 12:43:54 -08:00
Yichi Zhang
e6a1c344d3 NETSCRIPT: Log script kill immediately and identify the killing script. (#1907) 2025-01-12 21:07:01 -08:00
catloversg
0e8dca85e1 UI: Improve UX of Remote API setting page (#1870)
Co-authored-by: David Walker <d0sboots@gmail.com>
2025-01-12 10:58:24 -08:00
catloversg
fdb325bf66 CODEBASE: Remove unused type of parameter of Favor component (#1874) 2025-01-12 10:50:57 -08:00
catloversg
1d31e066f0 CODEBASE: Fix React warning when using StatsTable (#1875) 2025-01-12 10:49:52 -08:00
catloversg
1525e51cbb UI: Add grafting to sidebar (#1809) 2025-01-12 10:45:03 -08:00
catloversg
c37cdc76a4 CODEBASE: Minor change in TaskSelector of Sleeve (follow-up of #1807) (#1906) 2025-01-09 00:23:17 -08:00
catloversg
0f9144a059 CODEBASE: Validate theme, editor theme, and styles (#1789) 2025-01-08 19:20:05 -08:00
catloversg
320c852386 BUGFIX: Sleeves UI shows and sets wrong task (#1807) 2025-01-08 19:06:00 -08:00
catloversg
8c19165323 BUGFIX: Grow log shows invalid values in edge cases (#1872) 2025-01-08 18:48:45 -08:00
catloversg
5b6380a5c3 MISC: Add more error info to error dialog and tail log (#1813) 2025-01-08 18:22:13 -08:00
catloversg
1cb2a83b4f UI: Share RAM to boost reputation gain (#1862) 2025-01-07 22:35:29 -08:00
catloversg
077d8e7080 CODEBASE: Change signature of interpolate function in Infiltration code (#1843) 2025-01-07 22:28:02 -08:00
catloversg
6dd9230cc5 BUGFIX: Dynamically load imported scripts for editor (#1893) 2025-01-07 22:24:41 -08:00
catloversg
4bae9938bf BUGFIX: Editor shows "+1 overload" with all NS APIs (#1883) 2025-01-07 22:17:30 -08:00
catloversg
564889d3f2 BUGFIX: "Import Save Comparison" popup is shown after reloading (#1895) 2025-01-07 21:28:52 -08:00
esainane
0e5e20c2f1 UI: Fix migration doc typo (#1896)
`spc` -> `scp`
2025-01-07 21:24:44 -08:00
catloversg
a145ee74bc UI: Remove RAM usage percentage in "free" CLI if it's NaN (#1897) 2025-01-07 21:20:35 -08:00
catloversg
012ebb2616 UI: Change how hacking level requirement is shown in "Create program" tab (#1900)
* UI: Change how hacking level requirement is shown in "Create program" tab

* Remove "s" from "Unlocks at hacking levels"

---------

Co-authored-by: David Walker <d0sboots@gmail.com>
2025-01-07 21:18:37 -08:00
catloversg
3123ac9447 UI: Hide spoiler content in Soft Reset popup (#1898) 2025-01-07 21:18:25 -08:00
catloversg
a8bde3e14f UI: Change "overclock" to another phrase in Sleeves tab (#1901) 2025-01-07 21:13:47 -08:00
catloversg
f49d21cd71 UI: Clarify messages related to "buy" command (#1902) 2025-01-07 21:12:44 -08:00
catloversg
0c1f3756a2 UI: Show warning message for deprecated API Server feature (#1903) 2025-01-07 21:04:41 -08:00
romaswe
7fa85a926a MISC: Dockerized Bitburner (#1891) 2025-01-04 23:28:08 -08:00
catloversg
0d555f9347 UI: Remove mention of passive reputation gain when player is in BN2 (#1859)
* UI: Remove mention of passive reputation gain when player is in BN2

* Update based on feedback
2025-01-04 16:53:43 -08:00
catloversg
423a6ce110 BUGFIX: Saved running scripts are started before SWC is initialized (#1857)
* BUGFIX: Saved running scripts are started before SWC is initialized

* Update based on feedback
2025-01-04 16:52:56 -08:00
G4mingJon4s
c622291eff NETSCRIPT: Added changing tail font size through scripts (#1852) 2025-01-04 16:51:13 -08:00
catloversg
3db190c9a0 MISC: Consistently use ManualHackMoney in terminal hack and script hack (#1868) 2025-01-04 16:44:55 -08:00
catloversg
68a436cb77 UI: Disable buttons when player cannot buy things in tech vendor (#1881)
* UI: Disable buttons when player cannot buy things in tech vendor

* Tweak reachMaxCore warning comment

---------

Co-authored-by: David Walker <d0sboots@gmail.com>
2025-01-04 16:34:48 -08:00
catloversg
f2e014ba37 UI: Increase number of displayed digits for StaneksGiftExtraSize (#1871) 2025-01-04 16:34:35 -08:00
catloversg
93c07ac107 DOCUMENTATION: Clarify returned value of ns.bladeburner.getActionCountRemaining (#1873) 2025-01-04 16:33:45 -08:00
catloversg
43bca702c0 MISC: Clarify description of BN2 about gang and The Red Pill (#1878) 2025-01-04 16:33:08 -08:00
catloversg
bcbaf3e224 DOCUMENTATION: Clarify type of returned value of ns.gang.getOtherGangInformation (#1882) 2025-01-04 16:21:17 -08:00
Naga
ef87174e3f DOCUMENTATION: Clarify the return descriptions of 'getPurchasedServerCost' and 'getPurchasedServerUpgradeCost' to include the returns for invalid inputs. (#1884) 2025-01-04 16:20:20 -08:00
Daniel Perez Alvarez
e3eb08470b DOCUMENTATION: Add starter react documentation (#1888) 2025-01-04 16:19:49 -08:00
nanogyth
85fa15c5a5 BUGFIX: update weaken results to correctly reflect change when close to minSecurity (#1887) 2024-12-29 18:08:55 -08:00
catloversg
a6d6aa7410 UI: Add filter tool to list of installed augmentations (#1833) 2024-12-23 05:12:53 -08:00
catloversg
bc0dc15536 DOCUMENTATION: Fix typo of CrimeStats (#1850) 2024-12-18 03:32:21 -08:00
catloversg
b49c04d142 UI: Infiltration remembers faction choice for reputation reward (#1860) 2024-12-18 03:29:10 -08:00
catloversg
c2fe6108e1 DOCUMENTATION: Clarify getGraftableAugmentations API (#1858) 2024-12-18 03:23:56 -08:00
catloversg
40f3d6ea7b UI: Clarify "Company Favor" hash upgrade (#1861) 2024-12-18 03:23:11 -08:00
catloversg
ab17adf97a MISC: Show user-friendly error message when script is empty (#1848) 2024-12-18 03:17:48 -08:00
catloversg
bb7a1fbb22 MISC: Add raw command string to autocomplete data (#1846) 2024-12-18 03:16:38 -08:00
catloversg
cffd6d75a6 CORPORATION: Remove non-empty-string condition in sell modals (#1847) 2024-12-18 03:15:13 -08:00
catloversg
8aea99e5cd API: Add "No AI" to GoOpponent type (#1845) 2024-12-18 03:14:35 -08:00
catloversg
d75b0af6b2 CODEBASE: Update webpack and its plugins (#1825) 2024-12-18 03:14:01 -08:00
catloversg
e6078ab1df UI: Change description and add tooltip for HackMoney-related multipliers (#1823)
* UI: Change description and add tooltip for HackMoney-related multipliers

* Update based on feedback
2024-12-18 02:51:25 -08:00
catloversg
9c4b0c004c UI: Make minor changes in buttons and error messages of tutorial (#1837)
* UI: Make minor changes in buttons and error messages of tutorial

* Update

* Change "Skip Tutorial" to "Exit Tutorial"
2024-12-18 02:46:37 -08:00
catloversg
28da81f3f1 BLADEBURNER: Add visual cues to warn player of dangerous actions and status of population, chaos (#1856) 2024-12-18 02:44:19 -08:00
Naga
c49a507031 MISC: Convert Literature entries and helper functions to TSX (#1854) 2024-12-18 02:39:30 -08:00
catloversg
d9dba2a442 MISC: Clarify input and output of Square Root coding contract (#1839) 2024-12-12 03:13:18 -08:00
catloversg
74ede7d947 BUGFIX: Game takes too long to process crime work with large number of cycles (#1821) 2024-12-12 03:11:58 -08:00
catloversg
1c7230a799 DOCUMENTATION: Improve Infiltration docs (#1842) 2024-12-12 03:10:51 -08:00
Nerdpie
ff85394e02 BUGFIX: Fix Text Effect Preventing Company Name Updates (#1828) 2024-12-12 03:07:53 -08:00
catloversg
37ddb43b82 API: Allow passing 0 SkillPoints to skillMaxUpgradeCount (#1844) 2024-12-12 03:07:31 -08:00
catloversg
7c732689dd DOCUMENTATION: Fix typo in "Getting Started" page (#1836) 2024-12-12 03:06:19 -08:00
catloversg
bab5412fb7 BUGFIX: Tail log does not render multiline logs properly in edge cases (#1838) 2024-12-12 03:00:10 -08:00
catloversg
b66eff0379 JEST: Fix flaky stock market test (#1834) 2024-12-12 02:58:35 -08:00
catloversg
4137a0e522 DOCUMENTATION: Clarify isBusy and stopAction Singularity APIs (#1822) 2024-12-12 02:57:19 -08:00
catloversg
f07c442a92 CODEBASE: Fix React warning of missing keys in CovenantPurchasesRoot.tsx (#1824) 2024-12-12 02:55:28 -08:00
Snarling
bf095ea9e3 VERSION: Start dev branch 2.7.1 (#1832) 2024-12-08 16:41:53 -05:00
382 changed files with 11294 additions and 5493 deletions

View File

@@ -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
View 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;"]

View File

@@ -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
View 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

View File

@@ -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)"],

View File

@@ -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",

View File

@@ -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.",

View File

@@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AutocompleteData](./bitburner.autocompletedata.md) &gt; [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;
```

View File

@@ -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 |

View File

@@ -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:**

View File

@@ -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. |

View File

@@ -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:**

View File

@@ -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:**

View File

@@ -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.

View File

@@ -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

View File

@@ -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:**

View File

@@ -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 {

View File

@@ -0,0 +1,44 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CodingContract](./bitburner.codingcontract.md) &gt; [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
}
```

View File

@@ -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.

View File

@@ -9,11 +9,11 @@ List all contract types.
**Signature:**
```typescript
getContractTypes(): string[];
getContractTypes(): `${CodingContractName}`[];
```
**Returns:**
string\[\]
\`${[CodingContractName](./bitburner.codingcontractname.md)<!-- -->}\`\[\]
## Remarks

View File

@@ -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 contracts data, data type depends on contract type.

View File

@@ -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. |

View File

@@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [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)

View File

@@ -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)

View File

@@ -0,0 +1,45 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CodingContractName](./bitburner.codingcontractname.md)
## CodingContractName enum
**Signature:**
```typescript
declare enum CodingContractName
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| AlgorithmicStockTraderI | <code>&quot;Algorithmic Stock Trader I&quot;</code> | |
| AlgorithmicStockTraderII | <code>&quot;Algorithmic Stock Trader II&quot;</code> | |
| AlgorithmicStockTraderIII | <code>&quot;Algorithmic Stock Trader III&quot;</code> | |
| AlgorithmicStockTraderIV | <code>&quot;Algorithmic Stock Trader IV&quot;</code> | |
| ArrayJumpingGame | <code>&quot;Array Jumping Game&quot;</code> | |
| ArrayJumpingGameII | <code>&quot;Array Jumping Game II&quot;</code> | |
| CompressionIIILZCompression | <code>&quot;Compression III: LZ Compression&quot;</code> | |
| CompressionIILZDecompression | <code>&quot;Compression II: LZ Decompression&quot;</code> | |
| CompressionIRLECompression | <code>&quot;Compression I: RLE Compression&quot;</code> | |
| EncryptionICaesarCipher | <code>&quot;Encryption I: Caesar Cipher&quot;</code> | |
| EncryptionIIVigenereCipher | <code>&quot;Encryption II: Vigenère Cipher&quot;</code> | |
| FindAllValidMathExpressions | <code>&quot;Find All Valid Math Expressions&quot;</code> | |
| FindLargestPrimeFactor | <code>&quot;Find Largest Prime Factor&quot;</code> | |
| GenerateIPAddresses | <code>&quot;Generate IP Addresses&quot;</code> | |
| HammingCodesEncodedBinaryToInteger | <code>&quot;HammingCodes: Encoded Binary to Integer&quot;</code> | |
| HammingCodesIntegerToEncodedBinary | <code>&quot;HammingCodes: Integer to Encoded Binary&quot;</code> | |
| MergeOverlappingIntervals | <code>&quot;Merge Overlapping Intervals&quot;</code> | |
| MinimumPathSumInATriangle | <code>&quot;Minimum Path Sum in a Triangle&quot;</code> | |
| Proper2ColoringOfAGraph | <code>&quot;Proper 2-Coloring of a Graph&quot;</code> | |
| SanitizeParenthesesInExpression | <code>&quot;Sanitize Parentheses in Expression&quot;</code> | |
| ShortestPathInAGrid | <code>&quot;Shortest Path in a Grid&quot;</code> | |
| SpiralizeMatrix | <code>&quot;Spiralize Matrix&quot;</code> | |
| SquareRoot | <code>&quot;Square Root&quot;</code> | |
| SubarrayWithMaximumSum | <code>&quot;Subarray with Maximum Sum&quot;</code> | |
| TotalWaysToSum | <code>&quot;Total Ways to Sum&quot;</code> | |
| TotalWaysToSumII | <code>&quot;Total Ways to Sum II&quot;</code> | |
| UniquePathsInAGridI | <code>&quot;Unique Paths in a Grid I&quot;</code> | |
| UniquePathsInAGridII | <code>&quot;Unique Paths in a Grid II&quot;</code> | |

View File

@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [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)

View File

@@ -0,0 +1,42 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [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)

View File

@@ -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:**

View File

@@ -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> |

View File

@@ -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:**

View File

@@ -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:**

View File

@@ -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:**

View File

@@ -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:**

View File

@@ -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:**

View File

@@ -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 |

View File

@@ -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:**

View File

@@ -0,0 +1,55 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [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>&quot;Aevum&quot;</code> | |
| BachmanAssociates | <code>&quot;Bachman &amp; Associates&quot;</code> | |
| BitRunners | <code>&quot;BitRunners&quot;</code> | |
| Bladeburners | <code>&quot;Bladeburners&quot;</code> | |
| BladeIndustries | <code>&quot;Blade Industries&quot;</code> | |
| Chongqing | <code>&quot;Chongqing&quot;</code> | |
| ChurchOfTheMachineGod | <code>&quot;Church of the Machine God&quot;</code> | |
| ClarkeIncorporated | <code>&quot;Clarke Incorporated&quot;</code> | |
| CyberSec | <code>&quot;CyberSec&quot;</code> | |
| Daedalus | <code>&quot;Daedalus&quot;</code> | |
| ECorp | <code>&quot;ECorp&quot;</code> | |
| FourSigma | <code>&quot;Four Sigma&quot;</code> | |
| FulcrumSecretTechnologies | <code>&quot;Fulcrum Secret Technologies&quot;</code> | |
| Illuminati | <code>&quot;Illuminati&quot;</code> | |
| Ishima | <code>&quot;Ishima&quot;</code> | |
| KuaiGongInternational | <code>&quot;KuaiGong International&quot;</code> | |
| MegaCorp | <code>&quot;MegaCorp&quot;</code> | |
| Netburners | <code>&quot;Netburners&quot;</code> | |
| NewTokyo | <code>&quot;New Tokyo&quot;</code> | |
| NiteSec | <code>&quot;NiteSec&quot;</code> | |
| NWO | <code>&quot;NWO&quot;</code> | |
| OmniTekIncorporated | <code>&quot;OmniTek Incorporated&quot;</code> | |
| Sector12 | <code>&quot;Sector-12&quot;</code> | |
| ShadowsOfAnarchy | <code>&quot;Shadows of Anarchy&quot;</code> | |
| Silhouette | <code>&quot;Silhouette&quot;</code> | |
| SlumSnakes | <code>&quot;Slum Snakes&quot;</code> | |
| SpeakersForTheDead | <code>&quot;Speakers for the Dead&quot;</code> | |
| Tetrads | <code>&quot;Tetrads&quot;</code> | |
| TheBlackHand | <code>&quot;The Black Hand&quot;</code> | |
| TheCovenant | <code>&quot;The Covenant&quot;</code> | |
| TheDarkArmy | <code>&quot;The Dark Army&quot;</code> | |
| TheSyndicate | <code>&quot;The Syndicate&quot;</code> | |
| TianDiHui | <code>&quot;Tian Di Hui&quot;</code> | |
| Volhaven | <code>&quot;Volhaven&quot;</code> | |

View File

@@ -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.

View File

@@ -9,11 +9,11 @@ Get information about the other gangs.
**Signature:**
```typescript
getOtherGangInformation(): GangOtherInfo;
getOtherGangInformation(): Record<string, GangOtherInfoObject>;
```
**Returns:**
[GangOtherInfo](./bitburner.gangotherinfo.md)
Record&lt;string, [GangOtherInfoObject](./bitburner.gangotherinfoobject.md)<!-- -->&gt;
Object containing territory and power information about all gangs.

View File

@@ -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 |

View File

@@ -4,7 +4,7 @@
## GangGenInfo.territory property
Amount of territory held
Amount of territory held, in the range 0-1
**Signature:**

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GangMemberExpGain](./bitburner.gangmemberexpgain.md) &gt; [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;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GangMemberExpGain](./bitburner.gangmemberexpgain.md) &gt; [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;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GangMemberExpGain](./bitburner.gangmemberexpgain.md) &gt; [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;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GangMemberExpGain](./bitburner.gangmemberexpgain.md) &gt; [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;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GangMemberExpGain](./bitburner.gangmemberexpgain.md) &gt; [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;
```

View File

@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [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 |

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GangMemberExpGain](./bitburner.gangmemberexpgain.md) &gt; [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;
```

View File

@@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GangMemberInfo](./bitburner.gangmemberinfo.md) &gt; [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;
```

View File

@@ -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 |

View File

@@ -1,12 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GangOtherInfo](./bitburner.gangotherinfo.md)
## GangOtherInfo interface
**Signature:**
```typescript
interface GangOtherInfo
```

View File

@@ -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 |

View File

@@ -4,7 +4,7 @@
## GangOtherInfoObject.territory property
Gang territory, in decimal form
Gang territory, in the range 0-1
**Signature:**

View File

@@ -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)

View File

@@ -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:**

View File

@@ -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> |

View File

@@ -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:**

View File

@@ -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&lt;{ type: "move" \| "pass" \| "gameOver"; x: number \| null; y: number \| null; }&gt;

View File

@@ -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:**

View File

@@ -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. |

View File

@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GoAnalysis](./bitburner.goanalysis.md) &gt; [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

View File

@@ -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:**

View File

@@ -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

View File

@@ -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:**

View File

@@ -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> |

View File

@@ -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:**

View File

@@ -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:**

View File

@@ -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:**

View File

@@ -9,6 +9,7 @@
```typescript
type GoOpponent =
| "No AI"
| "Netburners"
| "Slum Snakes"
| "The Black Hand"

View File

@@ -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").

View File

@@ -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. |

View File

@@ -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) | |

View File

@@ -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 | () =&gt; void | |
| id | string | _(Optional)_ |
| f | () =&gt; void | A function to execute when the script dies. |
| id | string | _(Optional)_ Callback ID. Optional, defaults to <code>&quot;default&quot;</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.

View File

@@ -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

View File

@@ -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:**

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)<!-- -->.

View File

@@ -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

View File

@@ -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 scripts 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. |

View File

@@ -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:**

View File

@@ -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

View File

@@ -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

View File

@@ -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:**

View File

@@ -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

View File

@@ -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:**

View File

@@ -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

View File

@@ -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:**

View File

@@ -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)

View File

@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [ReputationFormulas](./bitburner.reputationformulas.md) &gt; [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

View File

@@ -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. |

View File

@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Singularity](./bitburner.singularity.md) &gt; [getSaveData](./bitburner.singularity.getsavedata.md)
## Singularity.getSaveData() method
This function returns the save data.
**Signature:**
```typescript
getSaveData(): Promise<Uint8Array>;
```
**Returns:**
Promise&lt;Uint8Array&gt;
## Remarks
RAM cost: 1 GB \* 16/4/1

View File

@@ -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.

View File

@@ -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. |

View File

@@ -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.

View File

@@ -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:**

View File

@@ -15,17 +15,27 @@ stopAction(): boolean;
boolean
True if the players action was ended, false if the player was not performing an action.
True if the players 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 players 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.

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [TailProperties](./bitburner.tailproperties.md) &gt; [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;
```

View File

@@ -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