Bitburner Contracts for Dummies

The Beginning

       In Bitburner, you need to gain reputation with factions and corporations to gain access to their augments for purchase. Initially you are challenged by the factions to get their augments and then you need to work for the corporations for their augments. First there are the beginner faction augments you can get depending if you go with the western or eastern factions (About 40 for the western factions. Later you will have access to the corporation augments (after 400k reputation for each corporation) and other later factions or gangs, which are more expensive and powerful. For example, after purchasing 36 augments, the SmartJaw from Bachman & Associates will cost me $29.817Q (Q not q) and 375.000k reputation. Of course I am not going to buy it until after I install 40 augments, come back more twinked to go farther and will be much cheaper to buy (assuming the prices reset as well). I also have to work for the eastern factions and see what they have after I augment since working for the western city factions disqualifies you to work for the eastern city factions.

The Codez

     You can gain reputation for factions and corporations by either doing Hacking Contracts or Coding Contracts. Initially, you’ll need to do Hacking Contracts for factions to get access to your first augmentations. Hacking Contracts are found when you goto the factions left menu option under Character. Later when you need more reputation for corporation augments you’ll need to do the Coding Contracts as well to get the necessary reputation. There are also more factions and even gangs you will encounter and join after your first augmentation.

     Doing Coding Contracts can gain you around 4 per second in reputation and sharing your servers can increase that as much as 1-4 more per second.

Here is a sample sharing script:

/** @param {NS} ns **/ export async function main(ns) { // Logging ns.disableLog('ALL') ns.tail(); // Main while (true) { ns.print("Time: " + new Date().toLocaleTimeString()); await ns.share(); let sharePower = ns.getSharePower(); ns.print("Share Power is " + sharePower); ns.print("--------------------------------"); } }

Very simple, eh? You’ll need to modify your automation scripts to use the sharing script or incorporate it into your own scripts.

To check your share power, hack level and other information about yourself, you can run this script:

/** @param {NS} ns */ export async function main(ns) { let player = ns.getPlayer(); let totalSharePower = ns.getSharePower(); let hackingLevel = ns.getHackingLevel(); ns.tprint("Hacking Level = " + hackingLevel); ns.tprint("Share Power = " + totalSharePower); ns.tprint("Bitnodes = " + player.bitNodeN); ns.tprint("People Killed = " + player.numPeopleKilled); ns.tprint("Karma = " + ns.heart.break().toFixed(2)); }

     This script demonstrates using Netscript and your player object to get additional information. I’ve included a few bits of hidden information that is used later in the game that is not normally displayed in the overview or character stats.

     You may also have noticed on servers you encounter in Bitburner with *.cct files if you do a ls (list) command to list out the files on the servers, including your home computer. These are Coding Contracts from the various factions and corporations in Bitburner. They contain complex programming problems you would normally encounter taking a high-level computer science course at a really good university. You get a limited amount of guesses before it self-destructs and if you solve the problem, you can get money or reputation from the factions or companies who placed the contract.

     Here is a simple script to crawl the network, search all the servers and find all the contracts on them. The code is a bit long, so I've saved it to Google Drive as text files. Simply cut and paste it into nano on Bitburner and dont forget to save as a '.js' file. If you pass a faction or corporation as an argument, it will display the servers that have contracts for that faction/corporation. You can also pass 'other' to get the contracts that are for multiple factions/corporations.

findcontracts.js:

https://drive.google.com/file/d/12eIGuQc9jM-R5CP_BPmH9c8aJoCJmcI-]

     I’m at a bit of a disadvantage to solving the Coding Contracts since I attended some crappy Tech Schools during the 1980s that didn’t have any good math courses other than a useless calculus course for electronics engineering (I do have a BS Computer Science and Electronics Engineering), which I never used again. And in the 25+ years I’ve worked and retired as Senior Programmer, I’ve never encountered problems like these and even if I did, the math and formulas would probably be supplied to me after being approved by management.

     So, once again, I’ve scoured the internet for the solutions for the Coding Contracts. Most of the solution code came from this huge automation suite by someone named ‘alainbryden’, that I never got working because it was a bit out-dated, had some errors and I don’t have the time to debug and mess with it all. I have no idea who he is, if he’s even on Steam, Reddit or around anymore, but he did some good work on the solver code and had nearly all the solutions. The master script and the helper script is written by me, also I fixed a few errors in the transplanted solver code that the editor was complaining about.

     These are much larger scripts so I’m putting them in text files on Google to download. Simply cut and paste them into nano on Bitburner. There are two files: The master script (solveallcontracts.js) and the helper script(solvecontract.js):

solveallcontracts.js:

https://drive.google.com/file/d/12QoFxLmxT8ukD6aOTGrL6Jf0ZHoY91wP

solvecontract.js:

https://drive.google.com/file/d/12Ww3PoOD17DnSDECmc18w2_3HmsMGVbd

     Make sure you have the proper file name you used to save the scripts in the master script if you change anything.

The Bugz

     There may be Coding Contracts you may find that are unsolvable by the script, I’ll update the helper script as I find solutions. Or if you have a solution, please leave a comment and I’ll update the helper script for everyone else. Please comment if you find anything else and I'll fix it.

The End

     Well, hopefully I have helped you along in your Bitburner journey and have inspired you to continue playing Bitburner addictively and maybe leave a good review for it so that maybe someday it will be recognized by Steam as a regular game (then the Steam achievements will hopefully apply officially)!

     Go ahead and use my scripts as templates to learn from and build your own scripts. I’ve been programming for over 25 years since the dawn of personal computers in way too many different languages and platforms including mainframes even - really! So, I think I've learned some good programming habits and programming patterns over the years, if very old-school-ish.

Please rate and favorite my guide after you're done !!!

Source: https://steamcommunity.com/sharedfiles/filedetails/?id=2863116304					

More Bitburner guilds