bitburner-src/markdown/bitburner.ns.grow.md
omuretsu 4ab29e9c60 Fix minimum corp employee stat
* minEmployeeDecay is now part of CorpConstants and has a value of 10. This replaces Office.minEne/minMor/minHap
* Also removed some unnecessary files in dist/ext for MathJax
* Rebuilt documentation to remove minHap/minMor/minEne from getOffice, and add minEmployeeDecay to corporation.getConstants
2023-01-03 11:55:50 -05:00

54 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [grow](./bitburner.ns.grow.md)
## NS.grow() method
Spoof money in a server's bank account, increasing the amount available.
<b>Signature:</b>
```typescript
grow(host: string, opts?: BasicHGWOptions): Promise<number>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| host | string | Hostname of the target server to grow. |
| opts | [BasicHGWOptions](./bitburner.basichgwoptions.md) | Optional parameters for configuring function behavior. |
<b>Returns:</b>
Promise&lt;number&gt;
The number by which the money on the server was multiplied for the growth.
## Remarks
RAM cost: 0.15 GB
Use your hacking skills to increase the amount of money available on a server. The runtime for this command depends on your hacking level and the target servers security level. When `grow` completes, the money available on a target server will be increased by amount equal to the number of threads used and a certain, fixed percentage of current money on the server. This percentage is determined by the target servers growth rate (which varies between servers) and security level. Generally, higher-level servers have higher growth rates. The [getServerGrowth](./bitburner.ns.getservergrowth.md) function can be used to obtain a servers growth rate.
Like [hack](./bitburner.ns.hack.md)<!-- -->, `grow` can be called on any server, regardless of where the script is running. The grow() command requires root access to the target server, but there is no required hacking level to run the command. It also raises the security level of the target server by 0.004.
## Example 1
```ts
// NS1:
var currentMoney = getServerMoneyAvailable("foodnstuff");
currentMoney = currentMoney * grow("foodnstuff");
```
## Example 2
```ts
// NS2:
let currentMoney = ns.getServerMoneyAvailable("foodnstuff");
currentMoney *= await ns.grow("foodnstuff");
```