I stumbled across the YouTube series and BitBurner late, and I am running BitBurner v2.3.1
I have tested this script (commit 874e690)
Running the auto-starter.js script using run auto-starter.js the targets get selected, the virus script gets distributed as expected, the grow and weaken commands get run and the servers get purchased.
However, I have not seen any hack commands run and no online production rate is reported. The targets change too quickly for hack to be called.
If I use run auto-deploy.js n00dles instead hack is called quickly and online production is increased
The workaround I have implemented to change this was to take on board a tip from the Getting Started Guide for Beginner Programmers — Bitburner 2.2.2 documentation that said - "As a rule of thumb, your hacking target should be the server with highest max money that’s required hacking level is under 1/2 of your hacking level."
Based on that tip I suggest changing the utils.js function canHack() to
/** @param {NS} ns **/ export function canHack(ns, server) { var pHackLvl = ns.getHackingLevel(); // player var sHackLvl = ns.getServerRequiredHackingLevel(server); return pHackLvl >= 2*sHackLvl; }
This should only select servers that have half the required hacking level.
I stumbled across the YouTube series and BitBurner late, and I am running BitBurner v2.3.1 I have tested this script (commit 874e690)
Running the auto-starter.js script using
run auto-starter.js
the targets get selected, the virus script gets distributed as expected, thegrow
andweaken
commands get run and the servers get purchased.However, I have not seen any
hack
commands run and no online production rate is reported. The targets change too quickly forhack
to be called.If I use
run auto-deploy.js n00dles
instead hack is called quickly and online production is increasedThe workaround I have implemented to change this was to take on board a tip from the Getting Started Guide for Beginner Programmers — Bitburner 2.2.2 documentation that said - "As a rule of thumb, your hacking target should be the server with highest max money that’s required hacking level is under 1/2 of your hacking level."
Based on that tip I suggest changing the utils.js function
canHack()
to/** @param {NS} ns **/ export function canHack(ns, server) { var pHackLvl = ns.getHackingLevel(); // player var sHackLvl = ns.getServerRequiredHackingLevel(server); return pHackLvl >= 2*sHackLvl; }
This should only select servers that have half the required hacking level.