hacknet.js: convert from helper script to stand-alone script. main.js, README.md: update to accommodate "hacknet.js" changes. README.md: add "Troubleshooting" section and alter misleading information about required server for installation.

[?]
Sep 14, 2020, 12:36 PM
5DIUM5GJ2DL4NTIJVPO4PCZD3TGFSZAFYWN2DOTZRH3ZXL6XUVBQC

Dependencies

  • [2] XUZPBRE6 main.js: fix regression. lib_ls.js: refactor.
  • [3] QU6T4CIV README.md: place installation notes nearer to the top.
  • [4] CEZ56FCM hacknet.js: make this run based on whether the ratio of upgrades are still within threshold instead of until Netburners requirements are met, to make it more flexible. main.js, README.md: include changes to accomodate "hacknet.js" updates.
  • [5] HNZOVUVQ hacknet.js: fix typo, remove unecessary functions and lines.
  • [6] SXEJJKPI executables: add `--help` flag. hacker.js: change scheduling logic. refactor. kill.js: allow handling more than one server or script at a time. cyclic_weaken.js: add. README.md: update.
  • [7] JGNALSUQ add "cyclic_weaken.js" feature. hacker.js, main.js, libs: refactor. README.md: update.
  • [8] Y5OWMCQR all: remove unecessary uses of `exec`. refactor. main.js: add RAM reservation logic. lib_ram.js: renamed to lib_ram_server.js. README.js: update.
  • [9] AXGQ7FML split and refactor hacking logic to "hacker.js" and argument parsing and script execution logic to "main.js". update "README.md".
  • [10] V4DMWF25 remove redundant preparation steps in "hacker.js".
  • [11] 2BKHJI2S init
  • [12] NQ22FUSW add more options to `main.js`. update `README.md`.
  • [13] HLC2L3NJ add "tor.js" and "programs.js". use `minimist` for "main.js" argument parsing.
  • [14] JS52JD4Q weaken_manager.js: add. lib_server_used.js: move to lib_ram_script. lib_ps: delete. main.js, hacker.js, lib_ram_script.js: refactor. README.md: update.
  • [15] DJDWBCCQ add missing "nop.js". killall.js: rename to kill.js. add `--script` and `--server` options.
  • [16] ZRPOW4ER hacker.js, lib_time.js: supress error messages. hacker.js: use `getBitNodeMultipliers`. lib_time.js: use `getStats`. README.md: update.
  • [17] ZVQK2652 executables: fix help message.
  • [18] CTUEOIV2 hacknet.js: take into account the gain rate increases of upgrades.
  • [19] QAPXJ43A hacker.js, weaken_manager.js: use void_copy_script_to from lib_ram_script to copy worker scripts to servers. README.md: update.
  • [20] FBAPT2WW executables: dynamically load help messages. lshw.js, main.js: add options to change score correction method and score factor multipliers. README.md: update.
  • [21] IFVY3INI contracts.js: add --verbose and --check-delay options. README.md: update.
  • [22] SLSWBNYT added ram utilisation logic to `ram.js` and `servers.js`. split and refactored redundant code into separate library files.
  • [23] J7PIMHBD hacknet.js: add. main.js, README.md: update.
  • [24] BKG7YVUV main.js, hacker.js, servers.js, ram.js: refactor.
  • [25] 6MBUKAG6 remove unneeded functions and comments. update readme.
  • [26] 2WOLGB42 README.md: update. kill.js: fix argument parser. lshw.js: add `-p` option. increase information given. main.js: fix error message. set saner defaults. hacker.js: split some functions into "lib_time.js" and "lib_score.js". ram.js: fix.
  • [27] R7OI6M4U optimise for gain rate increase per cost to simplify computation by decreasing iterations done.
  • [28] RWMZ7DVL split and refactor various logics. update "README.md".
  • [29] CKC6UBEA README.md: update
  • [30] FCJA5EXS contracts.js: add. README.md: update.
  • [31] HSNSECD5 all: refactor. main.js: fix call to `void_kill_script_named_server_named`.

Change contents

  • file deletion: hacknet.js (----------)
    [6.984][6.14814:14848](),[6.14848][6.11985:11985]()
    export const main = async function (ns) {
    const
    float_period_check = 1e3 * ns.args[0],
    await ns.sleep(float_period_check);
    }
    for (
    ;
    ) {
    for (
    let integer_index_nodes = 0;
    integer_index_nodes < integer_nodes;
    ++integer_index_nodes
    ) {
    }
    }
    }
    await ns.sleep(float_period_check);
    }
    };
    if (object_upgrade.float_gain_rate_increase_cost_ratio >= float_minimum_ratio) {
    object_upgrade.void_upgrade();
    } else {
    break;
    }
    object_upgrade.float_gain_rate_increase_cost_ratio = float_ratio_cores;
    object_upgrade.void_upgrade = function () {
    ns.hacknet.upgradeCore(integer_index_nodes, 1);
    };
    if (float_ratio_cores > object_upgrade.float_gain_rate_increase_cost_ratio) {
    );
    object_upgrade.float_gain_rate_increase_cost_ratio = float_ratio_level;
    object_upgrade.void_upgrade = function () {
    ns.hacknet.upgradeLevel(integer_index_nodes, 1);
    };
    }
    object_upgrade.float_gain_rate_increase_cost_ratio = float_ratio_ram;
    object_upgrade.void_upgrade = function () {
    ns.hacknet.upgradeRam(integer_index_nodes, 1);
    };
    if (float_ratio_ram > object_upgrade.float_gain_rate_increase_cost_ratio) {
    if (float_ratio_level > object_upgrade.float_gain_rate_increase_cost_ratio) {
    const
    float_ratio_level = float_get_gain_rate_increase_cost_ratio(
    ns,
    integer_index_nodes,
    1,
    0,
    0
    ),
    float_ratio_ram = float_get_gain_rate_increase_cost_ratio(
    ns,
    integer_index_nodes,
    0,
    1,
    0
    ),
    float_ratio_cores = float_get_gain_rate_increase_cost_ratio(
    ns,
    integer_index_nodes,
    0,
    0,
    1
    const
    integer_nodes = ns.hacknet.numNodes(),
    }
    };
    object_upgrade = {
    float_gain_rate_increase_cost_ratio: float_get_gain_rate(
    1,
    1,
    1
    ) /
    ns.hacknet.getPurchaseNodeCost(),
    void_upgrade: function () {
    return ns.hacknet.purchaseNode();
    ;
    for (
    ;
    ns.hacknet.numNodes() <= 0;
    ) {
    ns.hacknet.purchaseNode();
    float_minimum_ratio = ns.args[1];
    // Adapted from updateMoneyGainRate function in the src/Hacknet/HacknetNode.ts file
    const float_get_gain_rate = function (
    level,
    ram,
    cores
    ) {
    return level * Math.pow(1.035, ram - 1) * (cores + 5);
    };
    ns,
    integer_node,
    level,
    ram,
    cores
    ) {
    const object_node_stats = ns.hacknet.getNodeStats(integer_node);
    );
    };
    return (
    float_get_gain_rate(
    object_node_stats.level + level,
    object_node_stats.ram + ram,
    object_node_stats.cores + cores
    ) -
    float_get_gain_rate(
    object_node_stats.level,
    object_node_stats.ram,
    object_node_stats.cores
    )
    ) /
    (
    ns.hacknet.getLevelUpgradeCost(
    integer_node,
    level
    ) +
    ns.hacknet.getRamUpgradeCost(
    integer_node,
    ram
    ) +
    ns.hacknet.getCoreUpgradeCost(
    integer_node,
    cores
    )
    const float_get_gain_rate_increase_cost_ratio = function (
    // hacknet.js - 5.6 GB - purchases nodes and upgrades them until the highest gain rate increase per cost ratio of the possible upgrades are below a given threshold.
  • replacement in sbin/servers.js at line 147
    [6.2683][6.2683:2690]()
    if (
    [6.2683]
    [6.2690]
    return (
  • replacement in sbin/servers.js at line 158
    [6.3052][6.3052:3071]()
    )
    return !0;
    [6.3052]
    [6.5101]
    );
  • replacement in sbin/servers.js at line 175
    [6.3673][6.5664:5673](),[6.5664][6.5664:5673]()
    if (
    [6.3673]
    [6.3674]
    return (
  • replacement in sbin/servers.js at line 180
    [6.3857][6.3857:3880]()
    )
    return !0;
    [6.3857]
    [6.5969]
    );
  • replacement in sbin/servers.js at line 188
    [6.4140][6.4140:4147]()
    if (
    [6.4140]
    [6.4147]
    return (
  • replacement in sbin/servers.js at line 198
    [6.4605][6.4605:4624]()
    )
    return !0;
    [6.4605]
    [6.6819]
    );
  • edit in bin/main.js at line 54
    [6.9034][4.2195:2325]()
    // minimum gain rate increase per cost ratio used by the hacknet manager
    float_gain_rate_increase_cost_ratio: 0.0005,
  • edit in bin/main.js at line 63
    [6.9232][6.1575:1612]()
    string_hack_net: "hacknet.js",
  • edit in bin/main.js at line 137
    [4.2335][4.2335:2409](),[4.2409][6.10771:10780](),[6.10771][6.10771:10780]()
    hacknet_ratio: {
    short: "x",
    long: "hacknet-ratio",
    },
  • edit in bin/main.js at line 157
    [6.1622][6.1622:1684](),[6.1684][6.11110:11119](),[6.11110][6.11110:11119]()
    hack_net: {
    short: "w",
    long: "hacknet"
    },
  • edit in bin/main.js at line 216
    [6.13127][4.2410:2505]()
    float_gain_rate_increase_cost_ratio = object_defaults.float_gain_rate_increase_cost_ratio,
  • edit in bin/main.js at line 299
    [6.16551][4.2506:2722]()
    break;
    case object_argument_names.hacknet_ratio.short:
    // fall-through
    case object_argument_names.hacknet_ratio.long:
    float_gain_rate_increase_cost_ratio = argument_value;
  • edit in bin/main.js at line 344
    [6.37400][6.37400:37409](),[6.37409][6.17792:17799](),[6.17792][6.17792:17799](),[6.17799][6.1685:1767](),[6.1767][4.2723:2817]()
    ],
    },
    {
    file: object_helpers.string_hack_net,
    threads_or_ram_botnet: 1,
    args: [
    float_period_check_seconds,
    float_gain_rate_increase_cost_ratio
  • edit in bin/main.js at line 390
    [6.1853][6.1853:2166](),[6.2166][6.19577:19613](),[6.19577][6.19577:19613]()
    ((object_argument_names.hack_net.short === string_argument && argument_value) ||
    (object_argument_names.hack_net.long === string_argument && !argument_value)) &&
    array_helpers.splice(
    integer_get_index_of_file(
    array_helpers,
    object_helpers.string_hack_net
    ),
    1
    ),
  • edit in bin/main.js at line 465
    [6.37947][6.22841:22842](),[6.22841][6.22841:22842](),[6.22842][6.2167:2474]()
    -${object_argument_names.hack_net.short}, --no-${object_argument_names.hack_net.long}
    Prevents the "${object_helpers.string_hack_net}" script from being started which is responsible for buying and upgrading Hacknet nodes until the Hacknet node requirements for joining the Netburners faction are met.
  • replacement in bin/main.js at line 504
    [6.27561][4.2827:3554]()
    FLOAT = The fraction of the botnet's current available RAM to be used by ${object_helpers.string_weaken_manager} to run threads of "${object_helpers.string_cyclic_weaken}". Should be a floating point number > 0. Defaults to ${object_defaults.float_ram_fraction_for_weaken_cyclic}.
    -${object_argument_names.hacknet_ratio.short}, --${object_argument_names.hacknet_ratio.long} <FLOAT>
    FLOAT = A value used in determining if "${object_helpers.string_hack_net}" should continue buying new Hacknet nodes/upgrades for these. Should be a floating point number >= 0. Higher values indicates a greater threshold so less upgrades/new nodes will be bought. Defaults to ${object_defaults.float_gain_rate_increase_cost_ratio}.`
    [6.27561]
    [6.27791]
    FLOAT = The fraction of the botnet's current available RAM to be used by ${object_helpers.string_weaken_manager} to run threads of "${object_helpers.string_cyclic_weaken}". Should be a floating point number > 0. Defaults to ${object_defaults.float_ram_fraction_for_weaken_cyclic}.`
  • edit in bin/lshw.js at line 2
    [6.3118][6.3118:3191]()
    * prevent parser from altering default values displayed in help message.
  • replacement in bin/lshw.js at line 63
    [6.4573][6.4573:4577]()
    }
    [6.4573]
    [6.4577]
    };
  • replacement in bin/kill.js at line 28
    [6.10287][6.10287:10291]()
    }
    [6.10287]
    [6.10291]
    };
  • file addition: hacknet.js (----------)
    [6.3788021]
    /* hacknet.js - 5.6 GB - purchases nodes and upgrades them until the highest gain rate increase per cost ratio of the possible upgrades are below a given threshold. TODO:
    * Link ratio to time to break-even
    */
    import {
    string_sanitise,
    object_parse_arguments
    } from "lib_no_ns.js";
    const object_get_constants = function () {
    return {
    // default values
    object_defaults: {
    // time period used for checking the time in seconds
    float_sleep_duration_seconds: 1,
    // minimum gain rate increase per cost ratio threshold before the script is killed
    float_minimum_ratio: 0.0005,
    },
    object_argument_names: {
    delay: {
    short: "d",
    long: "delay",
    },
    help: {
    short: "h",
    long: "help",
    },
    ratio: {
    short: "r",
    long: "ratio",
    },
    }
    };
    };
    const void_print_help = function (ns) {
    const
    object_defaults = object_get_constants().object_defaults,
    object_argument_names = object_get_constants().object_argument_names;
    ns.tprint(
    string_sanitise(`
    DESCRIPTION
    Buys Hacknet nodes and upgrades them until the highest gain rate increase per cost ratio of the possible upgrades are below a given threshold.
    USAGE
    run ${ns.getScriptName()} [FLAGS ...] [OPTIONS ...]
    FLAGS
    -${object_argument_names.help.short}, --${object_argument_names.help.long}
    Displays this message then exits.
    OPTIONS
    -${object_argument_names.delay.short}, --${object_argument_names.delay.long} <SECONDS>
    SECONDS = The duration of delay between each loop iteration, in seconds. Should be a floating-point number >= 0.001. Defaults to ${object_defaults.float_sleep_duration_seconds}.
    -${object_argument_names.ratio.short}, --${object_argument_names.ratio.long} <FLOAT>
    FLOAT = A value used in determining if the script should continue buying new Hacknet nodes/upgrades for these. Should be a floating point number >= 0. Higher values indicates a greater threshold so less upgrades/new nodes will be bought. Defaults to ${object_defaults.float_minimum_ratio}.`
    )
    );
    };
    // Adapted from updateMoneyGainRate function in the src/Hacknet/HacknetNode.ts file
    const float_get_gain_rate = function (
    level,
    ram,
    cores
    ) {
    return level * Math.pow(1.035, ram - 1) * (cores + 5);
    };
    const float_get_gain_rate_increase_cost_ratio = function (
    ns,
    integer_node,
    level,
    ram,
    cores
    ) {
    const object_node_stats = ns.hacknet.getNodeStats(integer_node);
    return (
    float_get_gain_rate(
    object_node_stats.level + level,
    object_node_stats.ram + ram,
    object_node_stats.cores + cores
    ) -
    float_get_gain_rate(
    object_node_stats.level,
    object_node_stats.ram,
    object_node_stats.cores
    )
    ) /
    (
    ns.hacknet.getLevelUpgradeCost(
    integer_node,
    level
    ) +
    ns.hacknet.getRamUpgradeCost(
    integer_node,
    ram
    ) +
    ns.hacknet.getCoreUpgradeCost(
    integer_node,
    cores
    )
    );
    };
    export const main = async function (ns) {
    // variables
    const
    // defaults
    object_defaults = object_get_constants().object_defaults,
    // argument names
    object_argument_names = object_get_constants().object_argument_names;
    let
    float_sleep_duration_seconds = object_defaults.float_sleep_duration_seconds,
    float_minimum_ratio = object_defaults.float_minimum_ratio,
    // whether to display help and exit
    boolean_print_help = !1;
    // argument parsing
    const object_arguments = object_parse_arguments(ns.args);
    for (const string_argument in object_arguments)
    if (object_arguments.hasOwnProperty(string_argument)) {
    const argument_value = object_arguments[string_argument];
    switch (string_argument) {
    case object_argument_names.delay.short:
    // fall-through
    case object_argument_names.delay.long:
    float_sleep_duration_seconds = argument_value;
    break;
    case object_argument_names.help.short:
    // fall-through
    case object_argument_names.help.long:
    boolean_print_help = argument_value;
    break;
    case object_argument_names.ratio.short:
    // fall-through
    case object_argument_names.ratio.long:
    float_minimum_ratio = argument_value;
    break;
    case "_":
    continue;
    default:
    const string_message_error = `Unknown argument passed: "${string_argument}".`;
    throw (ns.tprint(`ERROR: ${string_message_error}`), new Error(string_message_error));
    }
    }
    // main
    if (boolean_print_help)
    return void_print_help(ns);
    const float_period_check = 1e3 * float_sleep_duration_seconds;
    for (
    ;
    ns.hacknet.numNodes() <= 0;
    ) {
    if (ns.hacknet.purchaseNode() === -1) {
    await ns.sleep(float_period_check);
    }
    }
    for (
    ;
    ;
    ) {
    const
    integer_nodes = ns.hacknet.numNodes(),
    object_upgrade = {
    float_gain_rate_increase_cost_ratio: float_get_gain_rate(
    1,
    1,
    1
    ) /
    ns.hacknet.getPurchaseNodeCost(),
    void_upgrade: function () {
    return ns.hacknet.purchaseNode();
    }
    };
    for (
    let integer_index_nodes = 0;
    integer_index_nodes < integer_nodes;
    ++integer_index_nodes
    ) {
    const
    float_ratio_level = float_get_gain_rate_increase_cost_ratio(
    ns,
    integer_index_nodes,
    1,
    0,
    0
    ),
    float_ratio_ram = float_get_gain_rate_increase_cost_ratio(
    ns,
    integer_index_nodes,
    0,
    1,
    0
    ),
    float_ratio_cores = float_get_gain_rate_increase_cost_ratio(
    ns,
    integer_index_nodes,
    0,
    0,
    1
    );
    if (float_ratio_level > object_upgrade.float_gain_rate_increase_cost_ratio) {
    object_upgrade.float_gain_rate_increase_cost_ratio = float_ratio_level;
    object_upgrade.void_upgrade = function () {
    ns.hacknet.upgradeLevel(integer_index_nodes, 1);
    };
    }
    if (float_ratio_ram > object_upgrade.float_gain_rate_increase_cost_ratio) {
    object_upgrade.float_gain_rate_increase_cost_ratio = float_ratio_ram;
    object_upgrade.void_upgrade = function () {
    ns.hacknet.upgradeRam(integer_index_nodes, 1);
    };
    }
    if (float_ratio_cores > object_upgrade.float_gain_rate_increase_cost_ratio) {
    object_upgrade.float_gain_rate_increase_cost_ratio = float_ratio_cores;
    object_upgrade.void_upgrade = function () {
    ns.hacknet.upgradeCore(integer_index_nodes, 1);
    };
    }
    }
    if (object_upgrade.float_gain_rate_increase_cost_ratio >= float_minimum_ratio) {
    object_upgrade.void_upgrade();
    } else {
    break;
    }
    await ns.sleep(float_period_check);
    }
    };
  • edit in bin/cp.js at line 5
    [2.3079]
    [6.10005]
  • replacement in bin/contracts.js at line 30
    [6.3805975][6.3027:3081]()
    case object_argument_names.check_delay.short:
    [6.3805975]
    [6.3081]
    case object_argument_names.delay.short:
  • replacement in bin/contracts.js at line 32
    [6.3105][6.3105:3158]()
    case object_argument_names.check_delay.long:
    [6.3105]
    [6.3158]
    case object_argument_names.delay.long:
  • replacement in bin/contracts.js at line 69
    [6.3792][6.3792:3862]()
    check_delay: {
    short: "c",
    long: "check-delay",
    [6.3792]
    [6.3862]
    delay: {
    short: "d",
    long: "delay",
  • replacement in bin/contracts.js at line 425
    [6.4729][6.4729:4830]()
    -${object_argument_names.check_delay.short}, --${object_argument_names.check_delay.long} <SECONDS>
    [6.4729]
    [6.4830]
    -${object_argument_names.delay.short}, --${object_argument_names.delay.long} <SECONDS>
  • replacement in README.md at line 8
    [3.1603][3.1603:1760]()
    Save all the `.js` files in this repository to the root directory of the "home" server using the same filenames that they currently have in this repository.
    [3.1603]
    [6.3092]
    Save all the `.js` files in this repository to the root directory of a rooted server (one with at least enough RAM to run "hacker.js", e.g. "foodnstuff") using the same filenames (but not including the directory names) that they currently have in this repository. If in the start of a new game, run `run botnet.js 0.001` (to increase the RAM available for the scripts) then `run kill.js` (to kill any currently running scripts).
  • replacement in README.md at line 18
    [6.2772][6.2482:2716]()
    * Run the helper scripts "ram.js"\* (6.6 GB), "servers.js" (8.85 GB), "tor.js"\* (3.8 GB), "programs.js"\* (3.7 GB), "botnet.js" (2.2 GB), "hacknet.js" (5.6 GB) and "weaken_manager.js" (4 GB) which should, respectively, attempt to:
    [6.2772]
    [6.5832]
    * Run the helper scripts "ram.js"\* (6.6 GB), "servers.js" (8.85 GB), "tor.js"\* (3.8 GB), "programs.js"\* (3.7 GB), "botnet.js" (2.2 GB) and "weaken_manager.js" (4 GB) which should, respectively, attempt to:
  • edit in README.md at line 24
    [6.6016][6.2717:2754]()
    * Buy and upgrade Hacknet nodes.
  • edit in README.md at line 66
    [6.33749][6.12203:12204](),[6.38813][6.12203:12204](),[6.12203][6.12203:12204](),[6.12204][6.2755:2973]()
    `-w, --no-hacknet`
    * Prevents the "hacknet.js" script from being started which is responsible for buying and upgrading Hacknet nodes until the Hacknet node requirements for joining the Netburners faction are met.
  • edit in README.md at line 119
    [6.39005][4.3561:3863]()
    `-x, --hacknet-ratio <FLOAT>`
    * FLOAT = A value used in determining if "hacknet.js" should continue buying new Hacknet nodes/upgrades for these. Should be a floating point number >= 0. Higher values indicates a greater threshold so less upgrades/new nodes will be bought. Defaults to 0.0005.
  • replacement in README.md at line 125
    [6.13869][6.2213:2311]()
    `run main.js -ao --no-botnet --job-cap 4000 -i harakiri-sushi -r 0.7 --steal-cap=0.5 -q normal`
    [6.13869]
    [6.13969]
    `run main.js -ao --no-botnet --job-cap 4000 -i harakiri-sushi -r 0.7 --steal-cap 0.5 -q normal`
  • edit in README.md at line 170
    [6.15498]
    [6.2312]
    ---
    ### "hacknet.js" (5.6 GB)
    * Buys Hacknet nodes and upgrades them until the highest gain rate increase per cost ratio of the possible upgrades are below a given threshold.
    #### USAGE
    `run hacknet.js [FLAGS ...] [OPTIONS ...]`
    #### FLAGS
    `-h, --help`
    * Displays a help message then exits.
    #### OPTIONS
    `-d, --delay <SECONDS>`
    * SECONDS = The duration of delay between each loop iteration, in seconds. Should be a floating-point number >= 0.001. Defaults to 1.
    `-r, --ratio <FLOAT>`
    FLOAT = A value used in determining if the script should continue buying new Hacknet nodes/upgrades for these. Should be a floating point number >= 0. Higher values indicates a greater threshold so less upgrades/new nodes will be bought. Defaults to 0.0005.
  • replacement in README.md at line 210
    [6.5911][6.5911:5933]()
    `-c, --check-delay`
    [6.5911]
    [6.5933]
    `-d, --delay <SECONDS>`
  • replacement in README.md at line 212
    [6.5934][6.5934:6195]()
    * The duration of delay between each network-wide contract search and solve attempts, in seconds. Should be a floating-point number >= 0.001. By default, the script will only search for and attempt to solve contracts once, unless this option is manually set.
    [6.5934]
    [6.15498]
    * SECONDS = The duration of delay between each network-wide contract search and solve attempts, in seconds. Should be a floating-point number >= 0.001. By default, the script will only search for and attempt to solve contracts once, unless this option is manually set.
  • replacement in README.md at line 240
    [6.16258][6.16258:16309]()
    `run lshw.js -d 1 --precision=4 home foodnstuff`
    [6.16258]
    [6.16309]
    `run lshw.js -d 1 --precision 4 home foodnstuff`
  • edit in README.md at line 263
    [6.17038]
    [6.17038]
    ---
    ## Troubleshooting
    ### "hacker.js" does not seem to run!
    * Make sure there is enough RAM (see requirements in the "Overview" section above) on the server that you ran "main.js" from and that there are no scripts running on that server before "hacker.js" has a chance to get spawned into it. Sometimes, "weaken_manager.js" will run "cyclic_weaken.js" on that server so you might need to kill any instances of it on that server before "hacker.js" is spawned.
    ### I'm encountering "Invalid argument for thread count passed into exec()." or "Dynamic RAM usage calculated to be greater than initial RAM usage..." errors!
    * Sometimes the game doesn't calculate the RAM requirements of scripts properly which can occur if the scripts weren't saved properly through `nano` or were loaded into the game via other means. Try opening and resaving the scripts using `nano` to allow the game to properly calculate the scripts' RAM requirements.
    ### I've followed the exact instructions above but I'm still encountering some other issue!
    * [Post about it in the repository's discussion page](https://nest.pijul.com/nicoty/bitburner_scripts/discussions) or contact me through Matrix (@nicoty:matrix.org) or Reddit (u/VoidNoire). Make sure your message contains the following information:
    * How you installed the scripts.
    * The exact command that you ran prior to encountering the issue.
    * The server from which you ran the command.
    * The amount of free RAM that the server has.
    * The outcome you expected.
    * The actual outcome that occurred instead (including exact error messages).
    ### I want to ask some questions about how the scripts work/the game in general!
    * [See if this discussion about the hacking strategy used answers it](https://old.reddit.com/r/Bitburner/comments/g2ry1t/can_someone_explain_traditional_hacking_loop/). If not, feel free to contact me through one of the channels above.