bitburner-src/markdown/bitburner.singularity.md
Olivier Gagnon feb0430aff work on doc
2021-10-30 15:46:34 -04:00

16 KiB
Raw Blame History

Home > bitburner > Singularity

Singularity interface

Singularity API

Signature:

interface Singularity 

Methods

Method Description
applyToCompany(companyName, field) If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function and the RAM cost is doubled.This function will automatically try to apply to the specified company for a position in the specified field. This function can also be used to apply for promotions by specifying the company and field you are already employed at.This function will return true if you successfully get a job/promotion, and false otherwise. Note that if you are trying to use this function to apply for a promotion and you dont get one, it will return false.
checkFactionInvitations() If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function and the RAM cost is doubled.Returns an array with the name of all Factions you currently have oustanding invitations from.
commitCrime(crime) If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function and the RAM cost is doubled.This function is used to automatically attempt to commit crimes. If you are already in the middle of some working action (such as working for a company or training at a gym), then running this function will automatically cancel that action and give you your earnings.This function returns the number of seconds it takes to attempt the specified crime (e.g It takes 60 seconds to attempt the Rob Store crime, so running commitCrime('rob store') will return 60).Warning: I do not recommend using the time returned from this function to try and schedule your crime attempts. Instead, I would use the isBusy Singularity function to check whether you have finished attempting a crime. This is because although the game sets a certain crime to be X amount of seconds, there is no guarantee that your browser will follow that time limit.
createProgram(program) If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function and the RAM cost is doubled.This function will automatically set you to start working on creating the specified program. If you are already in the middle of some “working” action (such as working for a company, training at a gym, or taking a course), then running this function will automatically cancel that action and give you your earnings.This function returns true if you successfully start working on the specified program, and false otherwise.Note that creating a program using this function has the same hacking level requirements as it normally would. These level requirements are: * BruteSSH.exe: 50 * FTPCrack.exe: 100 * relaySMTP.exe: 250 * HTTPWorm.exe: 500 * SQLInject.exe: 750 * DeepscanV1.exe: 75 * DeepscanV2.exe: 400 * ServerProfiler.exe: 75 * AutoLink.exe: 25
donateToFaction(faction, amount) If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function and the RAM cost is doubled.Attempts to donate money to the specified faction in exchange for reputation. Returns true if you successfully donate the money, and false otherwise.
getAugmentationCost(augName) If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function and the RAM cost is doubled.This function returns an array with two elements that gives the cost for the specified Augmentation. The first element in the returned array is the reputation requirement of the Augmentation, and the second element is the money cost.If an invalid Augmentation name is passed in for the augName argument, this function will return the array [-1, -1].
getAugmentationPrereq(augName) If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function and the RAM cost is doubled.This function returns an array with the names of the prerequisite Augmentation(s) for the specified Augmentation. If there are no prerequisites, a blank array is returned.
getAugmentationsFromFaction(faction) If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function and the RAM cost is doubled.Returns an array containing the names (as strings) of all Augmentations that are available from the specified faction.
getAugmentationStats(name) If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function and the RAM cost is doubled.This function returns augmentation stats.
getCharacterInformation() If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function and the RAM cost is doubled.Returns an object with various information about your character.
getCompanyFavor(companyName) If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function and the RAM cost is doubled.This function will return the amount of favor you have at the specified company. If the company passed in as an argument is invalid, -1 will be returned.
getCompanyFavorGain(companyName) If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function and the RAM cost is doubled.This function will return the amount of favor you will gain for the specified company when you reset by installing Augmentations.
getCompanyRep(companyName) If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function and the RAM cost is doubled.This function will return the amount of reputation you have at the specified company. If the company passed in as an argument is invalid, -1 will be returned.
getCrimeChance(crime) If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function and the RAM cost is doubled.This function returns your chance of success at commiting the specified crime. The chance is returned as a decimal (i.e. 60% would be returned as 0.6).
getCrimeStats(crime) If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function and the RAM cost is doubled.Returns the stats of the crime.
getFactionFavor(faction) If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function and the RAM cost is doubled.This function returns the amount of favor you have for the specified faction.
getFactionFavorGain(faction) If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function and the RAM cost is doubled.This function returns the amount of favor you will gain for the specified faction when you reset by installing Augmentations.
getFactionRep(faction) If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function and the RAM cost is doubled.This function returns the amount of reputation you have for the specified faction.
getOwnedAugmentations(purchased) If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function and the RAM cost is doubled.This function returns an array containing the names (as strings) of all Augmentations you have.
getOwnedSourceFiles() If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function and the RAM cost is doubled.Returns an array of source files
getStats() If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function and the RAM cost is doubled.Returns an object with the Players stats.
getUpgradeHomeRamCost() If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function and the RAM cost is doubled.Returns the cost of upgrading the players home computer RAM.
gymWorkout(gymName, stat) If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function and the RAM cost is doubled.This function will automatically set you to start working out at a gym to train a particular stat. If you are already in the middle of some “working” action (such as working at a company, for a faction, or on a program), then running this function will automatically cancel that action and give you your earnings.The cost and experience gains for all of these gyms are the same as if you were to manually visit these gyms and train
installAugmentations(cbScript) If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function and the RAM cost is doubled.This function will automatically install your Augmentations, resetting the game as usual.
isBusy() If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function and the RAM cost is doubled.Returns a boolean indicating whether or not the player is currently performing an action. These actions include working for a company/faction, studying at a univeristy, working out at a gym, creating a program, committing a crime, or carrying out a Hacking Mission.
joinFaction(faction) If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function and the RAM cost is doubled.This function will automatically accept an invitation from a faction and join it.
purchaseAugmentation(faction, augmnet) If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function and the RAM cost is doubled.This function will try to purchase the specified Augmentation through the given Faction.This function will return true if the Augmentation is successfully purchased, and false otherwise.
purchaseProgram(programName) If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function and the RAM cost is doubled.This function allows you to automatically purchase programs. You MUST have a TOR router in order to use this function. The cost of purchasing programs using this function is the same as if you were purchasing them through the Dark Web using the Terminal buy command.
purchaseTor() If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function and the RAM cost is doubled.This function allows you to automatically purchase a TOR router. The cost for purchasing a TOR router using this function is the same as if you were to manually purchase one.
softReset() If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function and the RAM cost is doubled.This function will perform a reset even if you dont have any augmentation installed.
stopAction() If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function and the RAM cost is doubled.This function is used to end whatever action the player is currently performing. The player will receive whatever money/experience/etc. he has earned from that action.The actions that can be stopped with this function are:* Studying at a university * Working for a company/faction * Creating a program * Committing a CrimeThis function will return true if the players action was ended. It will return false if the player was not performing an action when this function was called.
travelToCity(city) If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function and the RAM cost is doubled.This function allows the player to travel to any city. The cost for using this function is the same as the cost for traveling through the Travel Agency.
universityCourse(universityName, courseName) If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function and the RAM cost is doubled.This function will automatically set you to start taking a course at a university. If you are already in the middle of some “working” action (such as working at a company, for a faction, or on a program), then running this function will automatically cancel that action and give you your earnings.The cost and experience gains for all of these universities and classes are the same as if you were to manually visit and take these classes.
upgradeHomeRam() If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function and the RAM cost is doubled.This function will upgrade amount of RAM on the players home computer. The cost is the same as if you were to do it manually.This function will return true if the players home computer RAM is successfully upgraded, and false otherwise.
workForCompany(companyName) If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function and the RAM cost is doubled.This function will automatically set you to start working at the company at which you are employed. If you are already in the middle of some “working” action (such as working for a faction, training at a gym, or creating a program), then running this function will automatically cancel that action and give you your earnings.This function will return true if the player starts working, and false otherwise.Note that when you are working for a company, you will not actually receive your earnings (reputation, money, experience) until you FINISH the action.
workForFaction(faction, workType) If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function and the RAM cost is doubled.This function will automatically set you to start working for the specified faction. Obviously, you must be a member of the faction or else this function will fail. If you are already in the middle of some “working” action (such as working for a company, training at a gym, or creating a program), then running this function will automatically cancel that action and give you your earnings.This function will return true if you successfully start working for the specified faction, and false otherwise.Note that when you are working for a faction, you will not actually receive your earnings (reputation, experience) until you FINISH the action.