Set material to bulk buy
Name of the division
Name of the city
Name of the material
Amount of material to buy
Set material buy data
Name of the division
Name of the city
Name of the material
Amount of material to buy
Buy tea for your employees
Name of the division
Name of the city
true if buying tea was successful, false otherwise
Cancel material export
Source division
Source city
Target division
Target city
Name of the material
Expand to a new city
Name of the division
Name of the city
Expand to a new industry
Name of the industry
Name of the division
Set material export data
Source division
Source city
Target division
Target city
Name of the material
Amount of material to export.
Get corporation related constants
corporation related constants
Get corporation data
Corporation data
Get constant industry definition data for a specific industry
Get an offer for investment based on you companies current valuation
An offer of investment
Get material data
Name of the division
Name of the city
Name of the material
material data
Get constant data for a specific material
Cost to Upgrade office size.
Name of the division
Name of the city
Amount of positions to open
Cost of upgrading the office
Get product data
Name of the division
Name of the city
Name of the product
product data
Gets the cost to upgrade a warehouse to the next level
Name of the division
Name of the city
Optional amt: numberamount of upgrades. Optional, defaults to 1
cost to upgrade
Check if you have a warehouse in city
true if warehouse is present, false if not
Hire an employee.
Name of the division
Name of the city
Optional employeePosition: CorpEmployeePositionPosition to place into. Defaults to "Unassigned".
True if an employee was hired, false otherwise
Limit Material Production.
Name of the division.
Name of the city.
Name of the material.
Amount to limit to. Pass a negative value to remove the limit instead.
Limit Product Production.
Name of the division.
Name of the city.
Name of the product.
Amount to limit to. Pass a negative value to remove the limit instead.
Create a new product
Name of the division
Name of the city
Name of the product
Amount to invest for the design of the product.
Amount to invest for the marketing of the product.
Sleep until the next Corporation update has happened.
Promise that resolves to the name of the state that was just processed.
I.e. when the state is PURCHASE, it means purchasing has just happened.
Note that this is the state just before getCorporation().state.
Possible states are START, PURCHASE, PRODUCTION, EXPORT, SALE.
RAM cost: 1 GB
The amount of real time spent asleep between updates can vary due to "bonus time" (usually 200 milliseconds - 2 seconds).
while (true) {
const prevState = await ns.corporation.nextUpdate();
const nextState = ns.corporation.getCorporation().state;
ns.print(`Corporation finished with ${prevState}, next will be ${nextState}.`);
// Manage the Corporation
}
Purchase warehouse for a new city
Name of the division
Name of the city
Set material sell data.
Name of the division
Name of the city
Name of the material
Amount to sell, can be "MAX"
Price to sell, can be "MP"
Set product sell data.
Name of the division
Name of the city
Name of the product
Amount to sell, can be "MAX"
Price to sell, can be "MP"
Set sell amount and price in all cities
Set the auto job assignment for a job
Name of the division
Name of the city
Name of the job
Number of employees to assign to that job
true if the employee count reached the target amount, false if not
Set market TA 1 for a material.
Name of the division
Name of the city
Name of the material
market ta enabled
Set market TA 2 for a material.
Name of the division
Name of the city
Name of the material
market ta enabled
Set smart supply
Name of the division
Name of the city
smart supply enabled
Set whether smart supply uses leftovers before buying
Name of the division
Name of the city
Name of the material
smart supply option, "leftovers" to use leftovers, "imports" to use only imported materials, "none" to not use materials from store
Throw a party for your employees
Name of the division
Name of the city
Amount to spend per employee.
Multiplier for morale, or zero on failure
Upgrade office size.
Name of the division
Name of the city
Amount of positions to open
Upgrade warehouse
Name of the division
Name of the city
Optional amt: numberamount of upgrades defaults to 1
Corporation API