DOC: Add FAQ and another JIT batcher illustration to documentation (#2400)

This commit is contained in:
EntenBu
2025-12-18 04:30:58 +07:00
committed by GitHub
parent 968c0c2a8c
commit 6f9447e27e
5 changed files with 85 additions and 25 deletions

View File

@@ -0,0 +1,39 @@
# FAQs for beginners
This page is dedicated for questions often asked by beginners as they explore the game.
The following are advice, as this is a single-player game. However you are free to experiment to see what works best for you.
#### How do I create directories/folders?
These are just a part of the filename. There is no explicit command to create them, rather files with the same prepending "directory" string are bundled together.
#### Should I backdoor all servers?
Short answer:
Time-consuming for minimal benefits.
Long answer:
Backdooring a server takes a certain amount of time, and the duration is dependent on your hacking level and the given server's at the time of sending backdoor command.
Given the amount of servers in the network and how often you have to do so after installing augments, it is ill-advised to perform such potentially lengthy tasks unnecessarily.
#### How do I backdoor through scripts?
It is only possible with an endgame ability, or via exploits.
#### Should I target multiple servers or just one?
[EHTs (Early Hacking Templates)](../programming/hackingalgorithms.md) can somewhat benefit from this at very late stages of the game where the player's hacking level is so high a few threads of `ns.hack()` can take all money of even strongest servers within the network.
However, targetting multiple servers is not viable for batchers in particular due to the fact such algorithms do not suffer from over-hacking (a loose term that describes a targeted server being drained of all reserved money).
#### What are the differences between threads and processes?
When you run a script, you spawn a "process" that runs your code. With each process, you can specify a number of threads (default to 1).
"Thread" is simply a multiplier applied to the effect of some actions (e.g., hack, grow, weaken). Using more threads multiplies the effect, but it also multiplies the RAM cost of running the script.
#### Do in-game threads/processes have anything to do with the real life computer threads/processes?
No, in fact the game is run in JavaScript which is single-threaded.

View File

@@ -52,6 +52,7 @@
- [Game frozen or stuck?](programming/game_frozen.md)
- [TypeScript and React](programming/typescript_react.md)
- [Tools & Resources](help/tools_and_resources.md)
- [FAQs for beginners](help/beginner_faq.md)
- [Changelog](changelog.md)
- [Changelog - Legacy v1](changelog-v1.md)
- [Changelog - Legacy v0](changelog-v0.md)

View File

@@ -29,7 +29,7 @@ Cons:
- Limits income generation
- Extremely [RAM](../basic/ram.md) inefficient
- Utilizes script online time poorly
- Risk of over hacking
- Risk of over-hacking
- Slow to start producing money
This is the self-contained algorithm implemented in `early-hack-template.js`. Each script is tasked with choosing which function to execute based on the status of the target server.
@@ -186,6 +186,23 @@ Shotgun batchers are not very RAM efficient because the scripts take up RAM duri
|=Weaken=============|
|=Weaken=============|
Or:
|Hack=|
|=Weaken=============|
|=Grow===========|
|=Weaken=============|
|Hack=|
|=Weaken=============|
|=Grow===========|
|=Weaken=============|
|Hack=|
|=Weaken=============|
|=Grow===========|
|=Weaken=============|
\*For illustrative purposes only.
By weaving batches between each other, JIT batchers maximise the effectiveness of the RAM at the cost of very precise timing constraints.
Good communication between worker scripts and the controller is necessary to schedule the next batch at the right time.
The controller must have an effective method to predict which scripts need to be launched.

View File

@@ -51,18 +51,19 @@ import file48 from "./doc/en/basic/world.md?raw";
import file49 from "./doc/en/changelog-v0.md?raw";
import file50 from "./doc/en/changelog-v1.md?raw";
import file51 from "./doc/en/changelog.md?raw";
import file52 from "./doc/en/help/getting_started.md?raw";
import file53 from "./doc/en/help/tools_and_resources.md?raw";
import file54 from "./doc/en/index.md?raw";
import file55 from "./doc/en/migrations/ns2.md?raw";
import file56 from "./doc/en/migrations/v1.md?raw";
import file57 from "./doc/en/migrations/v2.md?raw";
import file58 from "./doc/en/programming/game_frozen.md?raw";
import file59 from "./doc/en/programming/go_algorithms.md?raw";
import file60 from "./doc/en/programming/hackingalgorithms.md?raw";
import file61 from "./doc/en/programming/learn.md?raw";
import file62 from "./doc/en/programming/remote_api.md?raw";
import file63 from "./doc/en/programming/typescript_react.md?raw";
import file52 from "./doc/en/help/beginner_faq.md?raw";
import file53 from "./doc/en/help/getting_started.md?raw";
import file54 from "./doc/en/help/tools_and_resources.md?raw";
import file55 from "./doc/en/index.md?raw";
import file56 from "./doc/en/migrations/ns2.md?raw";
import file57 from "./doc/en/migrations/v1.md?raw";
import file58 from "./doc/en/migrations/v2.md?raw";
import file59 from "./doc/en/programming/game_frozen.md?raw";
import file60 from "./doc/en/programming/go_algorithms.md?raw";
import file61 from "./doc/en/programming/hackingalgorithms.md?raw";
import file62 from "./doc/en/programming/learn.md?raw";
import file63 from "./doc/en/programming/remote_api.md?raw";
import file64 from "./doc/en/programming/typescript_react.md?raw";
import nsDoc_bitburner__valueof_md from "../../markdown/bitburner._valueof.md?raw";
import nsDoc_bitburner_activefragment_highestcharge_md from "../../markdown/bitburner.activefragment.highestcharge.md?raw";
@@ -1560,18 +1561,19 @@ AllPages["en/basic/world.md"] = file48;
AllPages["en/changelog-v0.md"] = file49;
AllPages["en/changelog-v1.md"] = file50;
AllPages["en/changelog.md"] = file51;
AllPages["en/help/getting_started.md"] = file52;
AllPages["en/help/tools_and_resources.md"] = file53;
AllPages["en/index.md"] = file54;
AllPages["en/migrations/ns2.md"] = file55;
AllPages["en/migrations/v1.md"] = file56;
AllPages["en/migrations/v2.md"] = file57;
AllPages["en/programming/game_frozen.md"] = file58;
AllPages["en/programming/go_algorithms.md"] = file59;
AllPages["en/programming/hackingalgorithms.md"] = file60;
AllPages["en/programming/learn.md"] = file61;
AllPages["en/programming/remote_api.md"] = file62;
AllPages["en/programming/typescript_react.md"] = file63;
AllPages["en/help/beginner_faq.md"] = file52;
AllPages["en/help/getting_started.md"] = file53;
AllPages["en/help/tools_and_resources.md"] = file54;
AllPages["en/index.md"] = file55;
AllPages["en/migrations/ns2.md"] = file56;
AllPages["en/migrations/v1.md"] = file57;
AllPages["en/migrations/v2.md"] = file58;
AllPages["en/programming/game_frozen.md"] = file59;
AllPages["en/programming/go_algorithms.md"] = file60;
AllPages["en/programming/hackingalgorithms.md"] = file61;
AllPages["en/programming/learn.md"] = file62;
AllPages["en/programming/remote_api.md"] = file63;
AllPages["en/programming/typescript_react.md"] = file64;
AllPages["nsDoc/bitburner._valueof.md"] = nsDoc_bitburner__valueof_md;
AllPages["nsDoc/bitburner.activefragment.highestcharge.md"] = nsDoc_bitburner_activefragment_highestcharge_md;

View File

@@ -559,6 +559,7 @@ export async function main(ns) {
The Beginner's guide contains the guide for new players, navigating you through most of the early game.
</li>
<li>The NS API documentation contains reference materials for all NS APIs.</li>
<li>The FAQ contains questions often asked by beginners of the game.</li>
</ul>
<Typography fontWeight="fontWeightBold">
This documentation page is the best place to get up-to-date information, especially when you get stuck. If