Coder Social home page Coder Social logo

Comments (6)

alainbryden avatar alainbryden commented on August 26, 2024 3

Did a chunk of work on this today. Prioritized turning crashes into errors and intentional shutdowns where necessary, but haven't gotten rid of all alerts yet, so leaving this open until it's cleaner

from bitburner-scripts.

alainbryden avatar alainbryden commented on August 26, 2024 1

Thanks for the list. I didn't want to hard-code it in the script itself because my intent is for people to use it with their own repositories, and I didn't see an easy way to get a repository listing from github, so I have it as a "TODO" in there.

As for the other request, sadly letting errors happening, and catching them, is the "best" way to detect functionality missing due to the current BN or missing SF files, because the actual ns function to check the current BN or player owned SF files costs RAM, and I've been trying to keep daemon RAM quite low. I'll try to tweak it over time to be less noisy about the functions that it can't access - I know it's annoying.

from bitburner-scripts.

alainbryden avatar alainbryden commented on August 26, 2024 1

from bitburner-scripts.

alainbryden avatar alainbryden commented on August 26, 2024 1

Should be better now.

I imagine by now you've fixed all this yourself and no longer want to bother pulling / merging with your own changes, but it should help the next guy getting started

from bitburner-scripts.

archraziel avatar archraziel commented on August 26, 2024

I was thinking. Instead of checking if the player has SF files and making . Is it possible to use an arg to tell the code to run without SF functions? Or even args for each SF, so the player can say which one he already owns?

I was able to run the script without SF usign only those, maybe there are more that are possible to run without SF

 asynchronousHelpers = [
        { name: "stats.js", requiredServer: "home" }, // Adds stats not usually in the HUD
       // { name: "stockmaster.js", requiredServer: "home", args: ["--show-market-summary"], tail: true, shouldRun: () => playerStats.hasTixApiAccess }, // Start our stockmaster if we have the required stockmarket access
       // { name: "spend-hacknet-hashes.js", requiredServer: "home", tail: true, args: ["-v"] }, // Always have this running to make sure hashes aren't wasted
       // { name: "hacknet-upgrade-manager.js", requiredServer: "home", tail: true, args: ["-c", "--max-payoff-time", "1h"] }, // Kickstart hash income by buying everything with up to 1h payoff time immediately
       // { name: "gangs.js", requiredServer: "home", tail: true }, // Script to create manage our gang for us
       // { name: "sleeve.js", requiredServer: "home", tail: true }, // Script to create manage our sleeves for us
       // { name: "work-for-factions.js", requiredServer: "home", args: ['--fast-crimes-only'] }, // Script to manage how we use our "focus" work
    ];
    asynchronousHelpers.forEach(helper => helper.isLaunched = false);
    // These scripts are spawned periodically (at some interval) to do their checks, with an optional condition that limits when they should be spawned
    let shouldUpgradeHacknet = () => !shouldReserveMoney() && (whichServerIsRunning(ns, "hacknet-upgrade-manager.js", false) === null);
    periodicScripts = [
        // Buy tor as soon as we can if we haven't already, and all the port crackers
       // { interval: 29000, name: "/Tasks/tor-manager.js", shouldRun: () => !addedServerNames.includes("darkweb") },
        //{ interval: 30000, name: "/Tasks/program-manager.js", shouldRun: () => getNumPortCrackers() != 5 },
       // { interval: 31000, name: "/Tasks/ram-manager.js", shouldRun: () => !shouldReserveMoney() && (getTotalNetworkUtilization() > 0.85 || xpOnly) },
        // Buy every hacknet upgrade with up to 4h payoff if it is less than 10% of our current money or 8h if it is less than 1% of our current money
        //{ interval: 32000, name: "hacknet-upgrade-manager.js", shouldRun: shouldUpgradeHacknet, args: () => ["-c", "--max-payoff-time", "4h", "--max-spend", ns.getServerMoneyAvailable("home") * 0.1] },
        //{ interval: 33000, name: "hacknet-upgrade-manager.js", shouldRun: shouldUpgradeHacknet, args: () => ["-c", "--max-payoff-time", "8h", "--max-spend", ns.getServerMoneyAvailable("home") * 0.01] },
        // Don't start auto-joining factions until we're holding 1 billion (so coding contracts returning money is probably less critical) or we've joined one already
        //{ interval: 34000, name: "faction-manager.js", requiredServer: "home", args: ['--join-only'], shouldRun: () => playerStats.factions.length > 0 || ns.getServerMoneyAvailable("home") > 1e9 },
        { interval: 51000, name: "/Tasks/contractor.js", requiredServer: "home" },
        //{ interval: 110000, name: "/Tasks/backdoor-all-servers.js", requiredServer: "home" },
        { interval: 111000, name: "host-manager.js", requiredServer: "home", shouldRun: () => !shouldReserveMoney() },
    ];

from bitburner-scripts.

archraziel avatar archraziel commented on August 26, 2024

Nice, thank you very much!

from bitburner-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.