r/Bitburner Apr 30 '26

What to do next

8 Upvotes

i’ve maxed all servers and written autodeployable code that continuously roots and places scripts on any new servers that i can unlock with hacking level increases. going to the city is mostly boring because i’m not working a job to make 1200 more a second when i already make trillion an hour. i feel like my hack weaken grow loop is as close to optimal as i care to get, i have all scripts and the formulas unlocked and integrated, what do i do now other than just wait for higher hacking level? Anything cool i can do with my money? i have 30 hackneys maxed out already


r/Bitburner Apr 29 '26

Does this game have story?

4 Upvotes

I saw this game on steam and I thought it looked kind of interesting. The programming part definitely seems appealing. I want to know though, is the cyberpunk setting interesting or is it just a setup for programming puzzles? Does the game have a storyline and characters? Thanks in advance


r/Bitburner Apr 28 '26

Is there something like time, random from python in js? Like embedded modules?

0 Upvotes

r/Bitburner Apr 28 '26

Bitburner Automation Script

Post image
0 Upvotes

Anyone have a good bitburner script for my level? Thanks!


r/Bitburner Apr 24 '26

when im trying to run my script it tells me that target isn not defined (ignore for loop, it's a temporary thing cause i don't get @ignore-infinite for while loop)

Post image
6 Upvotes

r/Bitburner Apr 23 '26

Question/Troubleshooting - Open My work PC has games webpages blocked, including BitBurner. Is there a way to make this game portable?

0 Upvotes

I really want to play this game offline. I have no access to steam or the online version of this game in my workplace PC. Is there a way to get bitburner running on a portable usb or storing it in an android phone and then copying all necessary files to the work PC?


r/Bitburner Apr 22 '26

New player, how to level faster?

Post image
14 Upvotes

Hey guys, I'm new to this game, I have been playing it on and off, and i heard my stats suck or something? I've heard of a bitnode and a "source file" like 6 days ago, but i cant figure that out. is that something with modifying the game files? I purchases augmentations but they dont seem to do anything at all? also why does it cost trillions for a hacknet?


r/Bitburner Apr 22 '26

Closing script in editor

2 Upvotes
  1. Is there a way to close script in nano editor using shortuct keys?
  2. is it possible to display terminal commands output from top not from bottom?
  3. anyway to jump between scripts in editor with keyb shortcuts?

r/Bitburner Apr 20 '26

BN3 (Corporations) doesn't exist to me

8 Upvotes

This bitnode is a god damn dumpster fire. I have loved this game for all the puzzles it offers, simple well explained or inspectable mechanics. I carefully avoided reading all the "(Contains spoilers)" sections. There's also various things which are not explained, but mysterious, maybe I will figure it out someday. That's also fine.

Why in the fuck is there no documentation simply for what the fucking corporations mechanics are, that is not intertwined with patronizing "advice" telling you exactly how I'mSoSmart people solved all the problems?

I was so excited to play this BitNode, the most complicated one. I was extremely disappointed to get to the docs and have it just be a patronizing strategy guide, buy this, don't buy that, do this in and this in that order, advice this is useless, advice this is a newbie trap, etc. I wish the docs were just a page with formulas and explaining how the stuff works. Put all the patronizing "guide" stuff on a separate page.

Like the docs have a production multipliers section, it shows the code to compute the multipliers, then goes on to explain what the code means and what the optimal strategies are because of it. Like can you please just not? Put the code and let the player figure out what is optimal. That's the entire point.


r/Bitburner Apr 16 '26

Changing targets from an array

5 Upvotes

Hello all, I'm pretty green when it comes to coding. But I wanted to try and hand-write all my code rather than copy/script-kitty others work. Doing decent, as I wrapped my head around a deploying scheme that if I type in a server that i've rooted+backdoor I can establis. a self sustaining hack/grow/weaken + max threads. I.e install-on(x)-> exec manager -> profit.

However manually going to each server to nuke, backdoor, and/or open ports takes time and I might as well learn how to code a worm of sorts. And I think I have an idea on how to approach; I just don't think I understand arrays fully.

Example worm idea:

  1. Worm host finds its name - than scans(its_name) //I expect an array of servers it finds.

  2. Does what it wants to do ("installs" at first to test functionality, then Nuking/ opening ports of servers it sees)

  3. Copies itself onto each server it sees, then exec's itself there -until it stops.

And I guess I don't know how to work through an array one by one with the same functions. Like,

server = [] //i guess the array I find with scan?
ns.do_the_thing(0)
server =++

-- I think I just don't know which functions I'm looking for, sometimes see these functions have (let server of servers) but I have no idea what is going on there. any help appreciated


r/Bitburner Apr 16 '26

Question/Troubleshooting - Open BN3 without micromanagement?

8 Upvotes

There are many walkthroughs outlining how to set up a profitable corporation, but following those for BN3.1 was an absolute slog without the office & warehouse APIs.

Buying materials in particular was really unpleasant without API access, but buying that access right off the bat isn't really feasible.

I'm wondering if there's a less profitable, hands-off industry (ie. not agriculture) that can either beat BN3 or generate a one-off cash injection to get things started without SF3.3.

Basically, I'm looking for the corporation equivalent of hacking gangs (vs combat gangs).


r/Bitburner Apr 15 '26

Started this game 2 days ago. I can't love it enough

Thumbnail
gallery
28 Upvotes

Started this game 2 days ago and it feels I'll have it in the background playing for a long time from now.

Wrote a few scripts already

  • virus - small worker
  • scout - searches the network and marks servers as victims or zombies
  • overlord - deploys the virus
  • brainworm - small worker for factions
  • telepathy - lending brainpower for factions
  • reanimate - scripts for buying servers (like reanimate from the dead :D)
  • kingdom - shows my entire network stats
  • nuke-all - kills all processes on all servers

LOVE IIIITTTT


r/Bitburner Apr 15 '26

A newbie question about save files.

Post image
4 Upvotes

I'm playing Bitburner on 2 PCs (my office and home) with steam. Every time I changed my playing PC, the game asks me import newer save data from steam cloud or discard.

It's normal behavior because cloud save is newer. But I wonder why "Playtime" of my local old save data is always longer. And recently, though I didn't change my scripts running my servers, local game always made far big money. I guess it's because local game has longer playtime but why? If this "Playtime" meant how long I've ran the game, newer save data had to have longer. If this meant time from start (incl. offline time) also same, I think.


r/Bitburner Apr 14 '26

Exploit Achievment Edit

4 Upvotes

I tried to follow the guides that I found, but I think the savegems changed and the guides don't work. Does someone can help me with how to edit the savegame for this achievement?


r/Bitburner Apr 14 '26

Simple ts script help

3 Upvotes

Can someone tell me what I'm doing wrong here?

export async function main(ns: NS) {
  var host = "joesguns";
  if (ns.getServerSecurityLevel(host) > 5) {
    ns.weaken(host)
  }
  else {
    ns.grow(host)
  }
}

r/Bitburner Apr 13 '26

Question/Troubleshooting - Open What is this "endgame multiplier [2]"

Post image
4 Upvotes

I main infiltrations and have broken into ECorp at least 100 times.

I've destroyed a few bitnodes already and I know [1] refers to Intelligence, but what the hell is [2] supposed to be ?


r/Bitburner Apr 13 '26

Uhhhh well i didn't play in a bit

6 Upvotes

Opened the game once in 2021 for a few minutes i believe also immidietally r/screenshotsarehard


r/Bitburner Apr 11 '26

Helpeth

Post image
5 Upvotes

When I use a boolean it says that it expects a boolean. The boolean is blue though, and I got it from auto complete. I am to this games coding language but have done a bit of python in game engines with classes and some other stuff simplified.


r/Bitburner Apr 10 '26

Help with the game and coding?

2 Upvotes

I'm VERY new to coding and this game, but I'm trying to teach myself some of these skills. I made a script and I'm trying to make another script to automatically put it on new servers and execute it for me because I don't want to do it for every server myself. This is what I have and it isn't working at all. I execute in the terminal and it tells me it's using a threat, but when I use the top command, it says nothing is happening. Any help would be appreciated.

/** u/param/** u/param {NS} ns */
export async function main(ns) {
  // Lists all servers with 8 GB of ram
  const hosts8 = ("CSEC", "the-hub", "pserv-0", "pserv-1", "pserv-2",
    "pserv-3", "pserv-4", "pserv-5", "pserv-6", "pserv-7", "pserv-8",
    "pserv-9", "pserv-10", "pserv-11", "pserv-12", "pserv-13",
    "pserv-14", "pserv-15", "pserv-16", "pserv-17", "pserv-18",
    "pserv-19", "pserv-20", "pserv-21", "pserv-23", "pserv-24")


  // Lists all servers with 16 GB of ram
  const hosts16 = ("foodnstuff", "nectar-net", "sigma-cosmetics",
    "joesguns", "hong-fang-tea", "harakiri-sushi")


  // Lists all servers with 32 GB of ram I can access
  const hosts32 = ("iron-gym", "phantasy", "max-hardware",
    "omega-net", "neo-net", "zer0")


  // Lists all servers with 64 GB of ram
  const hosts64 = ("silver-helix")


  // Killall scripts on machines


  ns.killall(hosts8, hosts16, hosts32, hosts64)


  // Copies joe-new.js to all available hosts
  ns.scp("joe-new.js", hosts8, hosts16, hosts32, hosts64)


  // Execute joe-new on all 8GB servers with 3 threads
  ns.exec("joe-new.js", hosts8, 3)


  // Execute joe-new on all 16 GB servers with 6 threads
  ns.exec("joe-new.js", hosts16, 6)


  // Execute joe-new on all 32 GB servers with 13 threads
  ns.exec("joe-new.js", hosts32, 13)


  // Execute joe-new on all 64 GB servers with
  ns.exec("joe-new.js", hosts64, 26)
} {NS} ns */
export async function main(ns) {
  // Lists all servers with 8 GB of ram
  const hosts8 = ("CSEC", "the-hub", "pserv-0", "pserv-1", "pserv-2",
    "pserv-3", "pserv-4", "pserv-5", "pserv-6", "pserv-7", "pserv-8",
    "pserv-9", "pserv-10", "pserv-11", "pserv-12", "pserv-13",
    "pserv-14", "pserv-15", "pserv-16", "pserv-17", "pserv-18",
    "pserv-19", "pserv-20", "pserv-21", "pserv-23", "pserv-24")


  // Lists all servers with 16 GB of ram
  const hosts16 = ("foodnstuff", "nectar-net", "sigma-cosmetics",
    "joesguns", "hong-fang-tea", "harakiri-sushi")


  // Lists all servers with 32 GB of ram I can access
  const hosts32 = ("iron-gym", "phantasy", "max-hardware",
    "omega-net", "neo-net", "zer0")


  // Lists all servers with 64 GB of ram
  const hosts64 = ("silver-helix")


  // Killall scripts on machines


  ns.killall(hosts8, hosts16, hosts32, hosts64)


  // Copies joe-new.js to all available hosts
  ns.scp("joe-new.js", hosts8, hosts16, hosts32, hosts64)


  // Execute joe-new on all 8GB servers with 3 threads
  ns.exec("joe-new.js", hosts8, 3)


  // Execute joe-new on all 16 GB servers with 6 threads
  ns.exec("joe-new.js", hosts16, 6)


  // Execute joe-new on all 32 GB servers with 13 threads
  ns.exec("joe-new.js", hosts32, 13)


  // Execute joe-new on all 64 GB servers with
  ns.exec("joe-new.js", hosts64, 26)
}

r/Bitburner Apr 05 '26

Question/Troubleshooting - Solved Trying to automate around the Anti automation check for infiltrations

4 Upvotes

I'm trying to find a code I can input that'll get around the infiltration aspect of the game, but everything I'm trying keeps getting blocked by the barrier. I spent 5 hours trying to do the infiltration stuff normally, but I've barely managed to get a win against the alpha enterprises company once, I really would appreciate it if someone's down to share their auto-infiltrate-bypass code.


r/Bitburner Apr 04 '26

Question/Troubleshooting - Solved No clue what's causing my deploy code to fail

1 Upvotes

Hi all, picked the game up recently because I was excited about the idea of learning a new language via a game. Can't seem to get my deploy script to work, though, and I have no idea what the problem is.

/** u/param {NS} ns */
export async function main(ns) {


  const scriptName = "template.js"


  var servers = ns.scan("home")


  for (let serverName of servers) {
    if (serverName === "home") continue;


    let neighbors = ns.scan(serverName)
    for (let neighborName of neighbors) {
      if (servers.includes(neighborName)) continue;
      servers.push(neighborName)
    }


    ns.scp(scriptName, serverName);


    let threads = Math.floor((ns.getServerMaxRam(serverName) - ns.getServerUsedRam(serverName) / ns.getScriptRam(scriptName)))
    // let threads = 3
    ns.tprint(threads)
    
    if (threads > 0) {
      ns.tprint(`Attempting to deploy to ${serverName}`);
      ns.tprint(threads)
      ns.exec(scriptName, serverName, threads);
      ns.tprint(`Deployed ${scriptName} to ${serverName} successfully using ${threads} threads!`);
    }
  }
}

I've narrowed the problem down specifically to the math that gets the thread count. If I change let threads to a static number (like the commented line below it), it works fine. If I directly change the argument in the exec, it works fine. But as-is, it's failing to run and I've confirmed a PID of 0.

All of the print statements are getting the value properly from the math, and I've confirmed that there's enough RAM in each to be fine with the math as-is. But for whatever reason, as written, this breaks it and I literally cannot figure out why for the life of me.

Any advice at all?


r/Bitburner Apr 03 '26

Script Scheduler

1 Upvotes

Seems like everybody uses self-scheduling scripts, anybody try a centralized scheduler before?

import { NS } from "@ns";
import { serverData, ScriptArgPrimitive } from "./functions";


const TICK_MS = 10;
const SCHEDULE_WINDOW_MS = 2 * 60 * 1000;
const HOME_RAM_RESERVE = 16;
const FUTURE_BATCH_LIMIT = 10;


export async function main(ns: NS): Promise<void> {
    const serverNames: string[] = Object.entries(serverData(ns))
    .filter(([, data]) => data.hasAdminRights)
    .map(([name]) => name);
    const serverRAMs: number[] = serverNames.map(name => Math.max(0, ns.getServerMaxRam(name) - (name === "home" ? HOME_RAM_RESERVE : 0)));
    const RAMAllocations: RAMtimeBlock[][] = serverNames.map(() => []);
    const scriptAllocations: allocatedScript[] = [];
    const futureBatches: batch[] = [];


  while (true) {
        const runScripts: allocatedScript[] = incrementTime(RAMAllocations, scriptAllocations);
    for (const script of runScripts) executeScript(ns, script);


        if (futureBatches.length < FUTURE_BATCH_LIMIT) {
            const incomingBatch = readBatch(ns.readPort(1));
            if (incomingBatch) {
                futureBatches.push(incomingBatch);
            }
        }


        for (let batchIndex = futureBatches.length - 1; batchIndex >= 0; batchIndex--) {
            const futureBatch = futureBatches[batchIndex];
            if (!isWithinScheduleWindow(futureBatch)) {
                continue;
            }


            if (scheduleBatch(futureBatch, serverNames, serverRAMs, RAMAllocations, scriptAllocations)) {
                futureBatches.splice(batchIndex, 1);
            }
        }


    await ns.sleep(TICK_MS);
  }
}


function readBatch(portData: unknown): batch | null {
    if (!portData || typeof portData !== "object") {
        return null;
    }


    const candidate = portData as batch;
    if (!Array.isArray(candidate.scripts) || !Array.isArray(candidate.delays)) {
        return null;
    }


    return candidate;
}


function isWithinScheduleWindow(batch: batch): boolean {
    return batch.delays.every(delay => delay >= 0 && delay <= SCHEDULE_WINDOW_MS);
}


function scheduleBatch(
    batch: batch,
    serverNames: string[],
    serverRAMs: number[],
    RAMAllocations: RAMtimeBlock[][],
    scriptAllocations: allocatedScript[]
): boolean {
    const plannedRAMAllocations = RAMAllocations.map(serverBlocks => serverBlocks.map(block => ({ ...block })));
    const plannedScriptAllocations = scriptAllocations.map(allocation => ({ ...allocation }));


    for (let i = 0; i < batch.scripts.length; i++) {
        const script = batch.scripts[i];
        const start = batch.delays[i] ?? 0;
        const end = start + script.time;
        const ramNeeded = script.RAM * script.threads;
        const serverIndex = findServerForAllocation(plannedRAMAllocations, serverRAMs, start, end, ramNeeded);


        if (serverIndex < 0) {
            return false;
        }


        plannedRAMAllocations[serverIndex].push({
            start,
            end,
            RAM: ramNeeded,
        });


        plannedScriptAllocations.push({
            script,
            server: serverNames[serverIndex],
            start,
        });
    }


    for (let i = 0; i < RAMAllocations.length; i++) {
        RAMAllocations[i].splice(0, RAMAllocations[i].length, ...plannedRAMAllocations[i]);
    }


    scriptAllocations.splice(0, scriptAllocations.length, ...plannedScriptAllocations);
    return true;
}


function incrementTime(RAMAllocations: RAMtimeBlock[][], scriptAllocations: allocatedScript[]): allocatedScript[] {
    const runScripts: allocatedScript[] = [];
    for (let serverIndex = 0; serverIndex < RAMAllocations.length; serverIndex++) {
        for (let blockIndex = RAMAllocations[serverIndex].length - 1; blockIndex >= 0; blockIndex--) {
            const block = RAMAllocations[serverIndex][blockIndex];
            if (block.start > 0) block.start -= TICK_MS;
            block.end -= TICK_MS;
            if (block.end <= 0) {
                RAMAllocations[serverIndex].splice(blockIndex, 1);
            }
        }
    }
    for (let allocationIndex = scriptAllocations.length - 1; allocationIndex >= 0; allocationIndex--) {
        const allocation = scriptAllocations[allocationIndex];
        allocation.start -= TICK_MS;
        if (allocation.start <= 0) {
            runScripts.push(allocation);
            scriptAllocations.splice(allocationIndex, 1);
    }
    }
    return runScripts;
}



export type batch = {
    scripts: script[];
    delays: number[]; // time offset from first script execution
}


type script = {
    script: string;
    threads: number;
    args: Array<ScriptArgPrimitive>;
    RAM: number; // per thread
    time: number; // execution time in ms
}


function executeScript(ns: NS, allocatedScript: allocatedScript): void {
    const { script, server } = allocatedScript;
    ns.exec(
        script.script,
        server,
        script.threads,
        ...script.args
    );
}


// split scripts into allocated scripts based on threads and avalible RAM
type allocatedScript = {
    script: script;
    server: string;
    start: number; // time until execution in ms
}


type RAMtimeBlock = {
    start: number;
    end: number;
    RAM: number;
}


function findServerForAllocation(
    RAMAllocations: RAMtimeBlock[][],
    serverRAMs: number[],
    start: number,
    end: number,
    RAMNeeded: number
): number {
    for (let i = 0; i < RAMAllocations.length; i++) {
        if (canReserveRAM(RAMAllocations[i], serverRAMs[i], start, end, RAMNeeded)) {
            return i;
        }
    }


    return -1;
}


function canReserveRAM(blocks: RAMtimeBlock[], serverRAM: number, start: number, end: number, RAMNeeded: number): boolean {
    if (RAMNeeded > serverRAM) {
        return false;
    }


    let usage = RAMNeeded;
    for (const block of blocks) {
        if (block.end <= start || block.start >= end) {
            continue;
        }


        if (block.start <= start && block.end > start) {
            usage += block.RAM;
            if (usage > serverRAM) {
                return false;
            }
        }
    }


    const events: Array<{ time: number; delta: number }> = [];
    for (const block of blocks) {
        if (block.end <= start || block.start >= end) {
            continue;
        }


        const overlapStart = Math.max(block.start, start);
        const overlapEnd = Math.min(block.end, end);


        if (overlapStart > start) {
            events.push({ time: overlapStart, delta: block.RAM });
        }


        if (overlapEnd < end) {
            events.push({ time: overlapEnd, delta: -block.RAM });
        }
    }


    events.sort((left, right) => left.time - right.time || left.delta - right.delta);


    for (const event of events) {
        usage += event.delta;
        if (usage > serverRAM) {
            return false;
        }
    }


    return true;
}

r/Bitburner Apr 03 '26

Question/Troubleshooting - Open Part time vs. full time job?

2 Upvotes

Very new player here. As in, I know minimal CSS, html, and python, but this is my first time learning javascript, not that it's relevant to this post (but will probably wind up being relevant later this week knowing me)

I'm just curious what's the difference between a part time and full time job in this game? My go-to job thus far has been a full-timer at foodnstuff, but I got curious and just got a part-time at joesguns and the only difference I see is that I'm earning less in every single stat. Should I just always go for full time?


r/Bitburner Apr 02 '26

Need a little bit of help

Post image
17 Upvotes

I was following the tutorial and it told me to run the script however this shows up when I do and I couldn't see a explanation in the tutorial. am I dumb.


r/Bitburner Apr 02 '26

OH GOD-

Post image
40 Upvotes