Bitburner threads Batches only function predictably when the target server is at minimum security and maximum money, so your script must also handle preparing a server for your batches. Thanks. Though maxing is good early, once you get really powerful, it can slam servers way too hard. - Consider adding a "percent of world mem" argument, so you can hard-cap a given batch, in the event that you want to run other scripts (such as other batches) simultaneously. // the above leaves16. How do I figure out how much security my activities will add? Also, how do I figure out the minimum threads needed to perform a full operation of "weaken," "grow," or "hack?" *update* "Weaken" lowers security by 0. 60GB of… A reply in this thread lays it out. I should fire last. I'm only early/mid game but it's been useful from lvl 1 hacking to lvl 500+ hacking. js: I have slept for ten seconds. A place to discuss and share your addressable LED pixel creations, ask for help, get updates, etc. And each of the four jobs gets different amount of threads, depending on how much impact the other threads have. And allocate and run a set of threads to a target from one of the groups. Reply reply Feb 19, 2022 · Does Math. Since the 'hacking contracts' rep gain depends on your hack level, you can also focus on just boosting your hacking level by running as many weaken threads on targets as possible rather than bothering to make money. But then I run grow on n00dles, and it only takes 4 calls to max the money. r/Bitburner. There is a popular script that gets passed around often, which calculates how many threads should be used to grow, hack, and weaken a specific target, then runs them as needed. 3 GB. The script I used is a lightly modified version of the beginner's guide script called early-hack-template. cpuCores); It gives me a prediction of 1. Read up on the Formulas API for finer control. A general example - running 5 weaken threads on a server at 10 security reduces the servers security by 2. hack take twice as much money from a server as it would normally. The basic usage is to be able to run a hacking script given how many threads you wanna use on a host machine (such as a large server or home) where you want to evenly split the resources between multiple different target This community is for users of the FastLED library. js which returns **true** or **false**, then access these return values in script B. hack() cannot use more than one thread. Script requires 33. It is awesome from start to finish from what I'm seeing. This generic script will run the script specified in the first argument with the amount of threads specified in the second element. All if the "if" statements are failing, leaving only the "else" to The only place you're dividing is when you calculate threads. js scripts. I haven't seen this program here on steam discussions so I want to share it. It is an optional parameter that can be used to limit the threads used. Different cities have different companies that offer servers of different size Running script with 1 thread(s), pid 3 and args: []. script" alias rmax_threads="tail max_threads. I can see that I can use the exec call to run a script with multiple threads, but the getScriptRam call doesn't seem to let me check with multiple threads. e. That is, the default if you don't specify a thread count is "the number this script was started with". This is the exact line that I use that will calculate how many threads of the script it can run: var threads = (Math. I've ran through some tutorials and have some very basic understanding of code, but I mostly have copy/pasted without much idea of how anything works. Hey there! I've started playing bitburner a few days ago, and I love it so far! I also started writing a complete automation script (in TS via VSCode), and my botnet works very well so far (automatic attacks, grow/weaken/hack, all organzied via the home server with ports). script. A There's not really an easy way to calculate it. Which would be great, except that when I actually run a 30 thread grow on joesguns, I end up with: grow: Executing on 'joesguns' in 8. Apr 29, 2022 · I have next to no idea what I'm doing with code, so apologies for the stupidity beforehand. With very simple weaken. I use purchased servers in the early game as well. It then runs the hack template You should have enough augments to reach at least one faction (the requirements are listed when you run fl1ght. hack, ns. growPercent() and ns. script 2. Alright so what I've gathered so far is that the optimisation consists of getting the server into a 'ready state' where it's at min security level and max money, and then making proportional scripts where the weaken() script perfectly counters the security increase from the grow() and hack() scripts after they finish, and its number of threads give the right amount of security to weaken by TYPE ERROR hack-manager. Formulas. . 4 twice (total 4. You can utilize batches to prepare a server by using no hack threads during preparation. I have them all running the same script which is attacking the crush-fitness server. But you need 1000 to get weak in one cycle so you can hack with 200 and weak with 1000 to balance things out You have good intuition. script" , 5 ); This next example will run foo. Hi there. 5. js, and targeted-grow. Maybe you start with 1000 but a hack with 1000 threads would set the money to zero. growPercent(server, 30,player,sourceServer. cores: number (Optional) Optional. Dec 23, 2022 · Are the thread count options for weaken/grow/hack ever actually worth using? My initial thought was they were so you could start one with just enough threads to weaken to a target value, then use other threads to do the same with grow, but then realized that you can't multi-thread like that in a single script. Anyways, on to my problem. Batching algorithms make sure to finish quickly after the other, so 1ms after a weaken you want a grow or a hack to finish and so on; to quickly get the server to full money and min security and then get the money. But if this isn’t the case I can just grow first, then weaken and I’ll end up with maximum money and minimum security if I run it with enough threads. 2 grows per hack (in parallel). grow() and ns. The scripts were run as run hack. ns -t 1 n00dles //exact copy of hack. js, hack. You have access to w threads in the server network. Don't go insane trying to have a huge amount of scripts running at the same time keep it to 50 or less per target. floor(16384 / 2. You've got enough hacking skill / hacking exp modifiers, you just have to do some hacking! I suggest scripts that loop weakens with lots of threads in order to generate hack exp. ns, sleep(), run the first weaken(). 4 = 400k). hack(). ; hostname (string) – Hostname of the target server on which to execute the script. It is a function-level declaration, however, which is still discouraged is most situations. If you don't use the parameter, it'll use the max by default. There are of course multiple ways. unnecessary extra threads don't cause it to go up more). If you start a hacking script with two threads, it will use twice as much memory, but also have roughly twice as much output from those three commands. I can do about 15million threads total of any grow/hack/weaken. I'm a beginner bitburner but just noticed that there should be a optimal thread numbers for each server to run a hack loop. Example: run max_threads. To see the result you need to view the script log. You can bring back up your hackanalyze returns the percentage that will be hacked with one thread at the current security level. 002 + 1 * 0. 4); But the result of it is Go to Bitburner r/Bitburner. You cannot hack with more threads than the script is running with. over some certain thread numbers are useless, or otherwise single process that has T threads can fully grow, weaken and hack the server. Got no idea what the purpose of running it with 6 threads are though. js with the following line: let return_value = ns. floor(freeRam / scriptRam); Where freeRam is just getting the max ram and minusing the used ram So it's basically saying: threads = Math. Thus it is more RAM efficient to hack for small percentages of money only; bigger attacks are less RAM efficient. js, grow. Must be less than or equal to the number of threads the script is running with. For example, let’s say the foodnstuff server has $10m and you run: The amount a server is weakened depends on the security it’s at when the weaken finishes. 4% with one thread. The reason is simple, each grow will increase the security when it comes to term, reducing the effect of any other grow that come before a weaken cancels that security hike. Am I just supposed to calculate this myself rather than using a call? I've always just used the mem function in the terminal with threads to check for where my cap is. I just calculated this chart: Karma loss per second by crime: 0. hackAnalyze since it'll give you the amount taken with one thread (meaning goal cash amount you want to steal divided by the returned value of ns. I have some code that deploys a grow, weaken, hack, and hack template script to every server. The basic solution of stopping once the final hack launch would be after the first hack end results in scripts ending every buffer_time for 1/5 of the overall time, with the whole set of batches taking 5*hack_time from first worker launch to last one finishing. https://github. 44 64 Will check how many scripts that cost 2. You say this runs fine on home, but nowhere else; have you made sure the scripts you're checking the cost of exist on the server you're checking? It seems like this could work, but this has just been such a mess to work through. I cannot see any real difference in output between them, but the 10 thread script uses 10x more memory. 002 "hackAnalyzeThreads" will return the number of threads needed to "hack" a given amount of money https Jan 15, 2022 · Theoretical example: if it takes 100 threads to double - grow x2 - a certain server with moneyMax of $200, then 100 threads is all that would be needed to grow it to max from $0, but this naïve solution is returning 200) Dec 22, 2021 · Zero knowledge on this stuff but checking out the tutorial and hitting "Getting Started' mentioned adding -t 6 to the running of the early hack template. floor rounds the value DOWN to the nearest whole number, so that it uses the max amount of ram without going over and erroring out. Each argument should be separated by a space. What am I missing? How do I figure out the minimal threads needed to grow a server from 0 to max? Dec 18, 2021 · Hello, I get what number of threads in running scripts does - I don't get what happens when I lower amount of threads used by any API call. I use threads that way but for my case i also need to start the same scripts with delays Hack raises the security level by 0. 0083 Robbery 0. js: I have slept for two seconds. The time it takes to execute the function depends on the player's hacking level and the target server's security level. Click here to jump to that post. Here are the definitive alternatives that only cost 0. The tutorial script is far from an ideal solution (though it's still served me alright so far). Feb 3, 2022 · Oh yeah, also helps to buy big RAM on your home pc or buy a bunch of servers, all running a simple weaken at max threads on foodnstuff as this generates a lot of hacking exp. This is a place to get help with AHK, programming logic, syntax, design, to get feedback, or just to rubber duck. So as for the template-hacking (I think it is good), those only called once GetServerMaxMoney() and GetServerMinSecurity() still take your valuable 200mb after it has done its job on each thread. "the "var" keyword is deprecated (and global, which is a problem in your script)" var is not global unless it is declared in the global scope (outside of a function). The reason why you use three different scripts for the WGH attacks is because you want the RAM of any scripts that you're launching with multiple threads to be as low as possible, that way you can launch more threads at once. ns The log for the 10 thread script also only appears to show output for thread 1, so I'm not even sure if the other threads are really running. Dec 15, 2021 · If the control script takes approximately twice the ram of a single thread of weaken. 000 for 'rothman-uni' weaken: Executing on 'rothman-uni' in 34 minutes 24. But, this takes around 1. 20 threads = 20 times as stron I thought in the same way grow has a negative effect on security, weaken has a negative effect on money. So no need to control the number of threads, just do it in the right order. For example "run exp-loop. One strategy you This function usually lowers the security level of the target server by 0. ns or hack. To balance your script. ns -t 10 n00dles run hack2. Dec 20, 2021 · growthAnalyze doesn't seem to give me the correct amount of threads when using moneyMax / moneyAvailable as the multiplier can someone tell me what I am doing wrong? Also what exactly am I supposed to do when there is 0 moneyAvailable after being drained. nuke, and so on will all cost 10 times more RAM despite not doing anything extra for you. Use that number from step 2 out how many threads to run in a single call to hack(). Once it's done it will launch the hacking script with the max threads it can use. So you can save yourself a lot of repetition both in those scripts, and where they're being called. 9 It's much faster to do an attack using multiple threads, than it is if you're only using one thread at a time. 22. using your numbers above, you would hack 0. Based on game code and a little exponent math, this is a WIP for "how many threads do I need to max a server's cash out". I saw someone say that the max ram was calculated by 2^10 etc. This updated one can skip over servers that can't run the worm script and infect computers downstream that can. Note that when simulating the effect of grow, what matters is the state of the server and player when the grow *finishes*, not when it is started threads (number) - Number of threads to use for this function. Everything else stays the same, including script execution time. my most recent script does count the threads I need for what I do. main L366: ns. hacking. There has recently been added a 'share' function that lets you use threads to boost your rep gain. I am currently running with 1TB servers and wanted to upgrade. I'm trying to write a script that runs through a list of servers, uses BruteSSH and FTPCrack to open 2 ports, NUKE's each server, copies a script to the server, then analyzes the server's ram, and depending on how much ram, executes the script with a certain amount of threads. You can have the same script executing more than once, ram permitting, in two ways: Pass it a threads argument to make it run more than once with the same arguments. Divide calculated money hacked by the total of the calculated times to get a $/sec metric. exec("lemons. formulas. activeFragments() without considering per-thread RAM cost a payload with the smallest possible per-thread RAM cost Dec 19, 2021 · Bitburner. There's not really an easy way to calculate it. If hackAmount is less than zero or greater than the amount of money available on the server, then this function returns -1. 040385=40,385). Rather than link it directly, I suggest you check out the git r a launcher that calculates the number of threads, and can use functions like ns. This is similar to the function run except that it can be used to The "threads" parameter on the weaken call itself must be less than or equal to the number of threads that the whole script is running with It's just for limiting the number of weakens from the max possible. growthAnalyze() to work as expected. Im so new to this game. Fix a bug with HGWOptions that caused the default value to be 1 thread even for scripts running multiple threads (@DJMatch3000) (Singularity) ns. threads: number of threads to use on weaken, calculated to decrease security by the amount of increase from targeted-hack. functionally speaking, bitburner threads do only one thing: They power up the game's attack commands (ns. Multiply the money stolen from that hack call by the hack success chance. 002 * threads if it succeeds (nothing happens if it fails), where threads is limited to the maximum possible needed threads (i. if one thread takes (1M*. Dec 23, 2022 · There are functions like ns. Members Online • bass-player-2048 So, I'm using the scripts that user HellsTicket put up in a thread for others to use I had a script that did basically this same thing but with the improvement of running multiple cycles at the same time. The script can be found at bitburner. At this point it’s worth having the API documentation [bitburner. no, 1000 grows per hack is wrong. ns, sleep(), and finally run hack(). The code would look like: Bitburner is a cyberpunk-themed incremental RPG. js", host, threads); The author of this topic has marked a post as the answer to their question. You will progress by raising your Stats, earning money, and with practice, advancing your real-world coding skills. using that method your script could decide on it's own: If you're already running on max threads to grow/hack/weaken your target server and you could do more because you have ram free your script could start to hack a second server, later a third etc. How much more money this earns you is dependent on the deeper nuances of how the hacking mechanics work. 084. js@home (PID - 9) exec: threads should be a positive integer, was 7320. Once the time to earn enough money get the next Home RAM upgrade is too long, and my home RAM is filled with hacking scripts, then I like to buy purchased servers. exe api will give you functions to check exactly how much percentage you gain per thread making things more efficient. so i divide and get my hackthreads 400k/40385=9. hackAnalyzeThreads() that allows you to figure out how many threads you need to steal a given amount of money. run() returns the pid of the launched script, rather than its return_value. There's two ways. 799 seconds (t=8,090) Ideally, you want as many threads running your scripts as possible since that makes hack, weaken, and grow more powerful, but each thread multiplies the cost of the whole script. ns, we get 2 additional threads on each of our rooted servers for free by using this technique. Floor not work with Bitburner? I was trying to get the total number of threads for a script that a server could run but the Math. All Discussions Screenshots Artwork Broadcasts Videos News Guides Reviews In the first script you calculate how many threads you need to fill all RAM Jan 5, 2022 · I wrote a program that I use for running on a server or home which will take a given number of threads you want to split between any number of servers you list afterwards. Then you only need 2 weaken threads to lower security to minimum. Netscript is the programming language used in the world of Bitburner. Both the arguments and thread specification are optional. readthedocs. script command, add a -t # to the end where # is the number of threads you want to use (usually but not always as many as possible so free ram divided by ram cost for that script). Jun 14, 2023 · I thought that I could write a script A. When you write scripts in Bitburner, they are written in the Netscript language. You need to call the script with the number of threads you want to run (using exec like in your second script does this), at which point the options object is not necessary. I believe getScriptRam returns zero if it can't find the script or can't figure out what you're talking about. ns. What SHOULD happen is that the script first weakens n00dles to or close to minimum security, then grows it to max or near max money, THEN hacks it. 03039797143375 . Then, you could actually write a script in-game to calculate the times. Calculate the decimal number of threads needed to hack a specified amount of money from a target host. 8 GB(12 GB from minus 12, and 2. Growing a servers from n% to 100% would take x threads (growing over 100% wastes threads); Hacking a server from 100% to n% would take y threads; Weakening a server from the security increases caused by the previous grow and hacks would take z threads. /utils/asleeptest. Mar 4, 2022 · About Press Copyright Contact us Creators Advertise Developers Terms Privacy Policy & Safety How YouTube works Test new features NFL Sunday Ticket Press Copyright Dec 16, 2021 · I'm testing with n00dles as my target. ns, grow. script string Filename of script to execute. ns, sleep(), then the second weaken(). More threads is (usually) better (to a point), but figuring out how to better make use of whatever threads you have is going to be more effective. Passing threads to hack()/etc. exec function as the thread amount parameter. 6 GB. Warning : The value returned by this function isn’t necessarily a whole number. 0003 Bond forgery 0. Help your fellow community artists, makers and engineers out where you can. floor(ramAvailable / scriptMemCost); Sep 26, 2024 · Useful for beginners, this guide provides: -The Tutorial Commands in order -Contents of the "help" command -Sample Hack Script -Multi-threading explanation and instructions -Batch Scri Threads are calculated based on the largest hack/grow/weaken script (which currently stand at 1. ns -t 100 joesguns" This initiates my "exp-loop. Others i maybe get 20 or so grows, but never 1000. 004 (40 hack threads required to steal 100% and 1 grow thread), or 0. If you start you script with 1000 Threads you can use any number of threads from 1 to 1000 for the weak and hack function. io] handy. If the flag is omitted, then the script will be run with a single thread by default. This function returns the decimal number of script threads you need when running the hack command to steal the specified amount of money from the target server. Add "-t n" to your function call to execute it on multiple threads. I pad my grow/weaken threads by a whopping 50%, but you could probably get away with less (especially as your level growth slows). The ‘-t’ flag is used to indicate that the script should be run with the specified number of threads. Run a script with n threads and the specified arguments. Dec 12, 2021 · Since only weaken() grow() and hack() benefit from using additional threads, having each one in a separate script will reduce the ram cost of using additional threads and thus increase our hacking gains a lot. I should fire second. Pass it different arguments for each concurrent run. Some improvements are an added server crawler, customizable constants that affect the overall use of the program, a delete mode, overwrite mode, and kill mode that all work hand-in-hand, proper server breaching for root access using the tools and functions at our disposal, back door installation, calculating maximum possible threads for a I pad my grow/weaken threads by a whopping 50%, but you could probably get away with less (especially as your level growth slows). Batching is a different thing. It seems impressive to me. Some improvements are an added server crawler, customizable constants that affect the overall use of the program, a delete mode, overwrite mode, and kill mode that all work hand-in-hand, proper server breaching for root access using the tools and functions at our disposal, back door installation, calculating maximum possible threads for a the speed at which a server grows is determined by your hack skill level and the number of threads you're using to run a script. ; numThreads (number) – Optional thread count for new script. Starting money is server. Instead, the script only hacks it. Arguments: script (string) – Filename of script to execute. js: I should fire first. js:L366@Module. So, I can do ~10 of these servers at once. When the function is completed, the amount of money on the target server will increase by a fixed percentage, which is determined by the target server's Go to Bitburner r/Bitburner. No point in running a hack() if you are going to get $0 anyway. weaken) plus a couple other functions. Right now I'm Okay some check in, You can run it with more threads just like other scripts, using -t in the terminal. js target : the server to target for the weaken utils. Use weakenAnalyze to determine the exact value. com/bitburner-official/bitburner-src/blob/dev/markdown/bitburner. run("A. When I try to growthAnalyze("n00dles",2) with $0 on the server, I get the return of 6. I did all the steps in the guide step by step. brutessh, ns. js, but your exec command uses hack1. weaken(target, {threads: 100}) Threads defaults to the number of threads the script is run with, and can not be greater. Oct 3, 2024 · N00dles are ready! Awesome, looks like we’re ready to hack n00dles! execute. This means that Netscript’s syntax is identical to that of JavaScript, but it does not implement some of the features that JavaScript has. grow, and ns. Threads, in the context of Bitburner, trade memory for multiplying the output of your hack, grow, and weaken script commands. After reaching certain criteria, you will receive invitations from in-game Factions. Running 5 weaken threads on the same server when the server is at 20 security might only reduce the servers security by 2. Jan 3, 2022 · Looks like hackAnalyze() can return 0 now, so should check for that and handle it. This file must already exist on the target server. 8)) available on the 'home' server while running the maximun number of threads of a script that uses 2. 0250 Trafficking arms 1. you want a grow count that can recover one hack amount plus a safety margin -- you can calculate this with growthAnalyze(server, 1+hackAnalyze(server, 1)*GROW_SAFETY) which will give you the ballpark proportion you need per hack. Like hack and grow , weaken can be called on any server, regardless of where the script is running. Calculate the time to weaken back to minimum security. js So I get a petabyte server. moneyAvailable. up to 2^20. 004 "Hack" increases security by 0. 0625 Grand theft auto 0. Floor gives me a result of Infinity. 0000 Homicide 0. to reiterate: you must start a script with extra threads first, either by using "-t #" after the script name from the command line, or using the threads arguments from 'run' or 'exec' script functions. script" Jul 30, 2024 · The {threads:2} option is not there to increase the threads used for ns. This function returns the number of script threads you need when running the hack() command to steal the specified amount of money from the target server. If this returns 100, then this means you need to call grow() 100 times in order to double the money (or once with 100 threads). Then, use following Terminal command to run our hacking script with 12 threads: A total Ammount of " + totalActiveThreadAmmount + " Threads across " + totalUsedServerAmmount + " Servers were initialized") It does this by dividing the target servers maximum RAM by the amount of RAM the target is script is gonna use and feeding this value into the ns. There's no fancy coding trick that will shorten the time it takes to grow a server. At some point after new development on bitburner started, the cushion time needed to make sure they arrive in order started being multiple seconds. There is zero tolerance for incivility toward others or for cheaters. 44GB RAM that can run on a 64GB server. r/Bitburner That said, the share mechanic is not that useful. floor(getServerMaxRam(hostname) / getScriptRam(file))); Math. script’ but with 5 threads instead of single-threaded: run ( "foo. So what I'm doing now is move these 2 to 3: I have no idea to be honest, make sure you are running the scripts with as many threads as possible and like above switch targets and see what works. The number of cores of the server that would run weaken. singularity. By now, you should know how to connect to servers. 9 + 1. Then, I go through each server and calculate how many threads I can run on it based on free memory. The trick is to balance (x + y + z) with w. It then listen on a port for thread request, when a script require a certain amount of thread it allocate them and send an answer stating how many thread are available on each host, once the threads are not used anymore, it also de-allocate I teach people how to hack for a living. 05 per thread, and only in unusual situations does it do less. js") Unfortunately, ns. It would be very useful to get this to work because it means I could have a main function doing calculations while it waits for the scripts to finish executing. 05 "Grow" increases security by 0. For all practical purposes, you do not need more than a batch per second (it gets wonky beyond that, as the thread-run-time-guarantee is weak and threads will end within 200 ms of the predicted time). So find and connect to each of the servers above using the scan-analyze 3 Terminal command. If you go into the city and go to a Tech company (marked by a T on the map, not to be confused with travel agency which is also a T), it will show you which servers are available for purchase. When grow can reset this back to 100% consider splitting the ram to another target. pastebin = SQgAKMX8 EDIT: since steam scrubs the links I'll paste the entire page here. hackAnalyze should give you the correct thread count or at least the closest number to it. script single-threaded, and will pass the string foodnstuff into the script as an argument: May 9, 2022 · In Bitburner, however, threads are just a multiplier added to your script’s results. Dec 22, 2021 @ 9:02am The HGW pattern has one variable for tuning: The percentage of money hacked. 0500 Kidnapping Jan 17, 2022 · See subject ^ I copy pasted the code straight from bitburner website into the script for the game. 0500 Shoplifting 0. Re-growth need does not scale linearly with hack: Twice the amount of hack threads requires more than twice the amount of grow threads. The following example will run ‘foo. script n00dles -t 4 Now all that’s left is to wait. sleep(10000); ns. getScriptRam() and ns. This, in addition to the tighter cycle-timing makes them more vulnerable to misfiring (completing out-of-order), but adding recovery thread padding (a multiple on the number of grow/weaken threads to use) can quickly recover from misfires. 0500 Drug dealing 0. Tips: the threads things confused the heck outta me for the first few sessions playing the game. 75 GiB). Dec 17, 2021 · I either deeply misunderstand this function or it's broken. I was trying to distribute the thread count so that -for example- weaken only runs lowest amount of thread necessary to drop the current sec level to min sec level; I was hoping remaining threads would be auto-used to run subsequent calls in parallel but Alternatively, instead of using ns. How many threads can you run for a script? It all depends on your RAM. Jan 30, 2023 · How to Optimize At this point, I have 25 servers each with 1024gb of RAM. hackAnalyzeThreads you could use ns. Sep 9, 2022 · A short & comprehensive guide including simple working scripts for beginning hacking in the Bitburner game. So is there even any way to access this return value? Or will I need to create a workaround with text files or ports Feb 21, 2022 · In this video, we expand our HWGW/Batching script to use threads from any server to hack and weaken, while centralizing our grows to home. 0625 Mugging 0. All Discussions Screenshots Artwork Broadcasts Videos News Guides Reviews Bitburner > General Discussions > Topic Details. Run a script as a separate process on a specified server. Run the `free` command to see how much I took the lazy way out and made my grow and hack threads less efficient by having them check the server security level once their sleep expires, and if its not at the minimum killing the corresponding hack/grow thread and leaving the weaken thread up to continue to bring the server down to is minimum level. Search the doc for the functions corresponding to ns. ) You just have to use 1 grow thread to put $1 on the server after it is emptied, then you can use 500,000 hack threads and get experience for all of them, but only raise security by 40 * 0. But Ports can definitly be used to communicate between servers. for n00dles, i use 0. stanek. If hackAmount is less than zero I don't believe it is possible to run continuous efficient batching without desync in an environment where hack level is not fixed. You might (should?) even let the script determine how many threads you can fire up, like const threads = Math. I'm only getting like 4k per second, but I only have my stuff installed on the first few directly accessible servers. Dec 28, 2021 · The amount of threads used in each script give diminishing returns however each script is calculated individually. stock (boolean) - If true, the function can affect the stock market. weaken(). You can find that in the Bitburner source code via these two links: 10 grow threads != 10x 1 grow threads in terms of effect. is redundant unless you want to use fewer threads than the script is running with. applyToCompany now returns the JobName if a job was obtained, or null otherwise - previously was boolean ( @jjclark1982 ) Jan 1, 2022 · It seems no matter how many threads i call for a script the time for weaken is the same as i call a script with 1000 threads or 1 thread? getServerSecurityLevel: returned 48. 958053450061 Stack: hack-manager. ns" script (weaken to minimum -> hack until empty -> weaken to minimum again -> hack forever) targeting joes guns. That's 72 threads, Once those start completing, I start one looping hack script with 616,735 threads. The ‘[-t]’, ‘[num threads]’, and ‘[args…]’ arguments are only valid when running a script. 0167 Larceny 0. The discord is full of discussions of "batching" style code and how best to optimize it, where you run four seperate scripts timed to complete in a weaken->grow->weaken->hack order all within a very short time frame (calculate how long it will take to do each step, run grow(). looks like you got it sorted with the comments here. The only real way right now is to look in the source code to get the formulas. Calculate how many threads it will take to grow server to targetMoney. When you use the run (script). 32 Followers. Second, you run your thread calculation based on a script called hacker1. exec Just for sharing ideas about optimizing the code and reduce its memory cost As we know the script will keep all the memory it called even it is no longer used. If i understood threads in bitburner right, then they can only work parallel at the same time to increase their instructions. This is the line: const threads = Math. -The best way to check effectiveness ive found is to tail the script and kill/run it while looking at the hacking contract screen and working for them: the faction rep per second will update to reflect the new rate. The first argument will be the name of another script, and the second argument will be a number. js so there's a chance you're using a bad calculation and if you use too many threads, the exec command will not happen (you can see when this happens in the script's log file if you open that). md This function returns the number of script threads you need when running the hack() command to steal the specified amount of money from the target server. If it takes 5min to run weaken() on a server it will be the same with 1 thread and 1000 threads, the main difference is if you had to weaken it 1000 times, then the process with 1000 threads will only need to run once. I prefer to buy Home RAM, but that price goes up fast. I try to install a backdoor on CSEC but it says " This machine does not have enough RAM to run this script with 1 threads. But, the numbers you're showing now are correct. Source: https://gi Aug 29, 2024 · await ns. Aug 19, 2021 · Bitburner. To me working with text files seems like a fine solution too, but if you don't feel like doing that, maybe Ports work better for you. io What do People do With Their Servers? I want to see how other people So the overall goal is to gain as much $/s as possible, given a list of rooted servers, available threads and player-level. You can have one line of code / ns function executing per script thread at a time. Many of us are struggling with getting ns. though that is assuming that you progressed your corp to going public and producing high enough that dividends pay you trillions (or much more) per second. Trying it with 30 threads on joesguns, if I do: var prediction = ns. There is a long waiting period between first running a script and making money as it takes a while for the script to weaken/grow the server to the right levels. exe). 4GB per thread. js hack n00dles n00dles; scripts/hack. It is a function to increase the amount of money on a server is available in a game. then Parameter Type Description; threads: number: Amount of threads that will be used. For me right now on sigma-cosmetics, I start 16 looping weaken scripts at 4 threads each spaced out over weakenTime, and 8 looping grow scripts at 1 thread each spaced out over growTime. Example: server is 1,000,000 you want to take 40% (1M * . grow() is a basic Netscript function. A million threads (4GB each) will only boost faction rep gain by 25%. Rather than link it directly, I suggest you check out the git r You have good intuition. so if you're running with 10 threads, then ns. Netscript is simply a subset of JavaScript. 5million threads. Members Online • bass-player-2048 So, I'm using the scripts that user HellsTicket put up in a thread for others to use Go to Bitburner r/Bitburner. hostname string Hostname of the target server on which to execute the script. I then record when these should be estimated to finish for each target and wont target that server again until then. RAM cost: 1. Edit: A couple of users who are substantially more knowledgeable about math have pointed out that the constant thread-boost you receive for your growth attempts isn't taken into account whatsoever in this. Nov 1, 2023 · await ns. I made two aliases: alias max_threads="run max_threads. 409 seconds (t Nov 29, 2023 · So I'm going through this API, and maybe I'm blind. bubbs. Since each of these servers has 32GB of RAM, we can run our hacking script with 12 threads on each server. See Player Actions Influencing Stocks; Returns: The number by which the money on the server was multiplied for the growth Write a script and use run() or exec(), both support (and even need) numberOfThreads as an argument. It also has instructions if you fail to enter arguments, improved toasting, and better memory usage in the hacking script. Running a script with 2 threads will make ns. Hello, I was curious as to how to determine the max amount of threads that can be ran on the purchased servers. The script is run as one thread, so ns. This then gives two errors two and five seconds later for not having an await call. vqrvu awrhcdar yofahj bxfhh ykayl nqk alk xlndjnq zugpyqr dfcu