Merge pull request #4222 from danielyxie/alias

MISC: Make the main player object an alias, makes it easier to import
This commit is contained in:
hydroflame 2022-10-09 18:46:20 -04:00 committed by GitHub
commit f8d977f7f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
297 changed files with 1029 additions and 1058 deletions

586
dist/bitburner.d.ts vendored

File diff suppressed because it is too large Load Diff

6
dist/main.bundle.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

46
dist/vendor.bundle.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [agility](./bitburner.augmentationstats.agility.md)
## AugmentationStats.agility property
Multiplier to agility skill
<b>Signature:</b>
```typescript
agility?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [agility\_exp](./bitburner.augmentationstats.agility_exp.md)
## AugmentationStats.agility\_exp property
Multiplier to agility experience gain rate
<b>Signature:</b>
```typescript
agility_exp?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [bladeburner\_analysis](./bitburner.augmentationstats.bladeburner_analysis.md)
## AugmentationStats.bladeburner\_analysis property
Multiplier to effectiveness in Bladeburner Field Analysis
<b>Signature:</b>
```typescript
bladeburner_analysis?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [bladeburner\_max\_stamina](./bitburner.augmentationstats.bladeburner_max_stamina.md)
## AugmentationStats.bladeburner\_max\_stamina property
Multiplier to Bladeburner max stamina
<b>Signature:</b>
```typescript
bladeburner_max_stamina?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [bladeburner\_stamina\_gain](./bitburner.augmentationstats.bladeburner_stamina_gain.md)
## AugmentationStats.bladeburner\_stamina\_gain property
Multiplier to Bladeburner stamina gain rate
<b>Signature:</b>
```typescript
bladeburner_stamina_gain?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [bladeburner\_success\_chance](./bitburner.augmentationstats.bladeburner_success_chance.md)
## AugmentationStats.bladeburner\_success\_chance property
Multiplier to success chance in Bladeburner contracts/operations
<b>Signature:</b>
```typescript
bladeburner_success_chance?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [charisma](./bitburner.augmentationstats.charisma.md)
## AugmentationStats.charisma property
Multiplier to charisma skill
<b>Signature:</b>
```typescript
charisma?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [charisma\_exp](./bitburner.augmentationstats.charisma_exp.md)
## AugmentationStats.charisma\_exp property
Multiplier to charisma experience gain rate
<b>Signature:</b>
```typescript
charisma_exp?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [company\_rep](./bitburner.augmentationstats.company_rep.md)
## AugmentationStats.company\_rep property
Multiplier to amount of reputation gained when working
<b>Signature:</b>
```typescript
company_rep?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [crime\_money](./bitburner.augmentationstats.crime_money.md)
## AugmentationStats.crime\_money property
Multiplier to amount of money gained from crimes
<b>Signature:</b>
```typescript
crime_money?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [crime\_success](./bitburner.augmentationstats.crime_success.md)
## AugmentationStats.crime\_success property
Multiplier to crime success rate
<b>Signature:</b>
```typescript
crime_success?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [defense](./bitburner.augmentationstats.defense.md)
## AugmentationStats.defense property
Multiplier to defense skill
<b>Signature:</b>
```typescript
defense?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [defense\_exp](./bitburner.augmentationstats.defense_exp.md)
## AugmentationStats.defense\_exp property
Multiplier to defense experience gain rate
<b>Signature:</b>
```typescript
defense_exp?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [dexterity](./bitburner.augmentationstats.dexterity.md)
## AugmentationStats.dexterity property
Multiplier to dexterity skill
<b>Signature:</b>
```typescript
dexterity?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [dexterity\_exp](./bitburner.augmentationstats.dexterity_exp.md)
## AugmentationStats.dexterity\_exp property
Multiplier to dexterity experience gain rate
<b>Signature:</b>
```typescript
dexterity_exp?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [faction\_rep](./bitburner.augmentationstats.faction_rep.md)
## AugmentationStats.faction\_rep property
Multiplier to amount of reputation gained when working
<b>Signature:</b>
```typescript
faction_rep?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [hacking](./bitburner.augmentationstats.hacking.md)
## AugmentationStats.hacking property
Multiplier to hacking skill
<b>Signature:</b>
```typescript
hacking?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [hacking\_chance](./bitburner.augmentationstats.hacking_chance.md)
## AugmentationStats.hacking\_chance property
Multiplier to chance of successfully performing a hack
<b>Signature:</b>
```typescript
hacking_chance?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [hacking\_exp](./bitburner.augmentationstats.hacking_exp.md)
## AugmentationStats.hacking\_exp property
Multiplier to hacking experience gain rate
<b>Signature:</b>
```typescript
hacking_exp?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [hacking\_grow](./bitburner.augmentationstats.hacking_grow.md)
## AugmentationStats.hacking\_grow property
Multiplier to amount of money injected into servers using grow
<b>Signature:</b>
```typescript
hacking_grow?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [hacking\_money](./bitburner.augmentationstats.hacking_money.md)
## AugmentationStats.hacking\_money property
Multiplier to amount of money the player gains from hacking
<b>Signature:</b>
```typescript
hacking_money?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [hacking\_speed](./bitburner.augmentationstats.hacking_speed.md)
## AugmentationStats.hacking\_speed property
Multiplier to hacking speed
<b>Signature:</b>
```typescript
hacking_speed?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [hacknet\_node\_core\_cost](./bitburner.augmentationstats.hacknet_node_core_cost.md)
## AugmentationStats.hacknet\_node\_core\_cost property
Multiplier to cost of core for a Hacknet Node
<b>Signature:</b>
```typescript
hacknet_node_core_cost?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [hacknet\_node\_level\_cost](./bitburner.augmentationstats.hacknet_node_level_cost.md)
## AugmentationStats.hacknet\_node\_level\_cost property
Multiplier to cost of leveling up a Hacknet Node
<b>Signature:</b>
```typescript
hacknet_node_level_cost?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [hacknet\_node\_money](./bitburner.augmentationstats.hacknet_node_money.md)
## AugmentationStats.hacknet\_node\_money property
Multiplier to amount of money produced by Hacknet Nodes
<b>Signature:</b>
```typescript
hacknet_node_money?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [hacknet\_node\_purchase\_cost](./bitburner.augmentationstats.hacknet_node_purchase_cost.md)
## AugmentationStats.hacknet\_node\_purchase\_cost property
Multiplier to cost of purchasing a Hacknet Node
<b>Signature:</b>
```typescript
hacknet_node_purchase_cost?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [hacknet\_node\_ram\_cost](./bitburner.augmentationstats.hacknet_node_ram_cost.md)
## AugmentationStats.hacknet\_node\_ram\_cost property
Multiplier to cost of ram for a Hacknet Node
<b>Signature:</b>
```typescript
hacknet_node_ram_cost?: number;
```

@ -1,49 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md)
## AugmentationStats interface
Data representing the internal values of an Augmentation.
<b>Signature:</b>
```typescript
export interface AugmentationStats
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [agility\_exp?](./bitburner.augmentationstats.agility_exp.md) | number | <i>(Optional)</i> Multiplier to agility experience gain rate |
| [agility?](./bitburner.augmentationstats.agility.md) | number | <i>(Optional)</i> Multiplier to agility skill |
| [bladeburner\_analysis?](./bitburner.augmentationstats.bladeburner_analysis.md) | number | <i>(Optional)</i> Multiplier to effectiveness in Bladeburner Field Analysis |
| [bladeburner\_max\_stamina?](./bitburner.augmentationstats.bladeburner_max_stamina.md) | number | <i>(Optional)</i> Multiplier to Bladeburner max stamina |
| [bladeburner\_stamina\_gain?](./bitburner.augmentationstats.bladeburner_stamina_gain.md) | number | <i>(Optional)</i> Multiplier to Bladeburner stamina gain rate |
| [bladeburner\_success\_chance?](./bitburner.augmentationstats.bladeburner_success_chance.md) | number | <i>(Optional)</i> Multiplier to success chance in Bladeburner contracts/operations |
| [charisma\_exp?](./bitburner.augmentationstats.charisma_exp.md) | number | <i>(Optional)</i> Multiplier to charisma experience gain rate |
| [charisma?](./bitburner.augmentationstats.charisma.md) | number | <i>(Optional)</i> Multiplier to charisma skill |
| [company\_rep?](./bitburner.augmentationstats.company_rep.md) | number | <i>(Optional)</i> Multiplier to amount of reputation gained when working |
| [crime\_money?](./bitburner.augmentationstats.crime_money.md) | number | <i>(Optional)</i> Multiplier to amount of money gained from crimes |
| [crime\_success?](./bitburner.augmentationstats.crime_success.md) | number | <i>(Optional)</i> Multiplier to crime success rate |
| [defense\_exp?](./bitburner.augmentationstats.defense_exp.md) | number | <i>(Optional)</i> Multiplier to defense experience gain rate |
| [defense?](./bitburner.augmentationstats.defense.md) | number | <i>(Optional)</i> Multiplier to defense skill |
| [dexterity\_exp?](./bitburner.augmentationstats.dexterity_exp.md) | number | <i>(Optional)</i> Multiplier to dexterity experience gain rate |
| [dexterity?](./bitburner.augmentationstats.dexterity.md) | number | <i>(Optional)</i> Multiplier to dexterity skill |
| [faction\_rep?](./bitburner.augmentationstats.faction_rep.md) | number | <i>(Optional)</i> Multiplier to amount of reputation gained when working |
| [hacking\_chance?](./bitburner.augmentationstats.hacking_chance.md) | number | <i>(Optional)</i> Multiplier to chance of successfully performing a hack |
| [hacking\_exp?](./bitburner.augmentationstats.hacking_exp.md) | number | <i>(Optional)</i> Multiplier to hacking experience gain rate |
| [hacking\_grow?](./bitburner.augmentationstats.hacking_grow.md) | number | <i>(Optional)</i> Multiplier to amount of money injected into servers using grow |
| [hacking\_money?](./bitburner.augmentationstats.hacking_money.md) | number | <i>(Optional)</i> Multiplier to amount of money the player gains from hacking |
| [hacking\_speed?](./bitburner.augmentationstats.hacking_speed.md) | number | <i>(Optional)</i> Multiplier to hacking speed |
| [hacking?](./bitburner.augmentationstats.hacking.md) | number | <i>(Optional)</i> Multiplier to hacking skill |
| [hacknet\_node\_core\_cost?](./bitburner.augmentationstats.hacknet_node_core_cost.md) | number | <i>(Optional)</i> Multiplier to cost of core for a Hacknet Node |
| [hacknet\_node\_level\_cost?](./bitburner.augmentationstats.hacknet_node_level_cost.md) | number | <i>(Optional)</i> Multiplier to cost of leveling up a Hacknet Node |
| [hacknet\_node\_money?](./bitburner.augmentationstats.hacknet_node_money.md) | number | <i>(Optional)</i> Multiplier to amount of money produced by Hacknet Nodes |
| [hacknet\_node\_purchase\_cost?](./bitburner.augmentationstats.hacknet_node_purchase_cost.md) | number | <i>(Optional)</i> Multiplier to cost of purchasing a Hacknet Node |
| [hacknet\_node\_ram\_cost?](./bitburner.augmentationstats.hacknet_node_ram_cost.md) | number | <i>(Optional)</i> Multiplier to cost of ram for a Hacknet Node |
| [strength\_exp?](./bitburner.augmentationstats.strength_exp.md) | number | <i>(Optional)</i> Multiplier to strength experience gain rate |
| [strength?](./bitburner.augmentationstats.strength.md) | number | <i>(Optional)</i> Multiplier to strength skill |
| [work\_money?](./bitburner.augmentationstats.work_money.md) | number | <i>(Optional)</i> Multiplier to amount of money gained from working |

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [strength](./bitburner.augmentationstats.strength.md)
## AugmentationStats.strength property
Multiplier to strength skill
<b>Signature:</b>
```typescript
strength?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [strength\_exp](./bitburner.augmentationstats.strength_exp.md)
## AugmentationStats.strength\_exp property
Multiplier to strength experience gain rate
<b>Signature:</b>
```typescript
strength_exp?: number;
```

@ -1,13 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [AugmentationStats](./bitburner.augmentationstats.md) &gt; [work\_money](./bitburner.augmentationstats.work_money.md)
## AugmentationStats.work\_money property
Multiplier to amount of money gained from working
<b>Signature:</b>
```typescript
work_money?: number;
```

@ -0,0 +1,30 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CodingContract](./bitburner.codingcontract.md) &gt; [createDummyContract](./bitburner.codingcontract.createdummycontract.md)
## CodingContract.createDummyContract() method
Generate a dummy contract.
<b>Signature:</b>
```typescript
createDummyContract(type: string): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | string | Type of contract to generate |
<b>Returns:</b>
void
## Remarks
RAM cost: 2 GB
Generate a dummy contract on the home computer with no reward. Used to test various algorithms.

@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CodingContract](./bitburner.codingcontract.md) &gt; [getContractTypes](./bitburner.codingcontract.getcontracttypes.md)
## CodingContract.getContractTypes() method
List all contract types.
<b>Signature:</b>
```typescript
getContractTypes(): string[];
```
<b>Returns:</b>
string\[\]
## Remarks
RAM cost: 2 GB

@ -17,7 +17,9 @@ export interface CodingContract
| Method | Description |
| --- | --- |
| [attempt(answer, filename, host, opts)](./bitburner.codingcontract.attempt.md) | Attempts a coding contract. |
| [createDummyContract(type)](./bitburner.codingcontract.createdummycontract.md) | Generate a dummy contract. |
| [getContractType(filename, host)](./bitburner.codingcontract.getcontracttype.md) | Get the type of a coding contract. |
| [getContractTypes()](./bitburner.codingcontract.getcontracttypes.md) | List all contract types. |
| [getData(filename, host)](./bitburner.codingcontract.getdata.md) | Get the input data. |
| [getDescription(filename, host)](./bitburner.codingcontract.getdescription.md) | Get the description. |
| [getNumTriesRemaining(filename, host)](./bitburner.codingcontract.getnumtriesremaining.md) | Get the number of attempts remaining. |

@ -4,7 +4,7 @@
## CorporationInfo.issuedShares property
Amount of aqcuirable shares.
Amount of acquirable shares.
<b>Signature:</b>

@ -22,7 +22,7 @@ interface CorporationInfo
| [divisions](./bitburner.corporationinfo.divisions.md) | [Division](./bitburner.division.md)<!-- -->\[\] | Array of all divisions |
| [expenses](./bitburner.corporationinfo.expenses.md) | number | Expenses per second this cycle |
| [funds](./bitburner.corporationinfo.funds.md) | number | Funds available |
| [issuedShares](./bitburner.corporationinfo.issuedshares.md) | number | Amount of aqcuirable shares. |
| [issuedShares](./bitburner.corporationinfo.issuedshares.md) | number | Amount of acquirable shares. |
| [name](./bitburner.corporationinfo.name.md) | string | Name of the corporation |
| [numShares](./bitburner.corporationinfo.numshares.md) | number | Amount of share owned |
| [public](./bitburner.corporationinfo.public.md) | boolean | Indicating if the company is public |

@ -18,7 +18,7 @@ spendHashes(upgName: string, upgTarget?: string, count?: number): boolean;
| --- | --- | --- |
| upgName | string | Name of the upgrade of Hacknet Node. |
| upgTarget | string | Object to which upgrade applies. Required for certain upgrades. |
| count | number | Number of upgrades to buy at once. Defaults to 1 if not specified. For compatability reasons, upgTarget must be specified, even if it is not used, in order to specify count. |
| count | number | Number of upgrades to buy at once. Defaults to 1 if not specified. For compatibility reasons, upgTarget must be specified, even if it is not used, in order to specify count. |
<b>Returns:</b>

@ -24,7 +24,7 @@ export interface HacknetNodeConstants
| [MaxRam](./bitburner.hacknetnodeconstants.maxram.md) | number | Max amount of RAM in GB |
| [MoneyGainPerLevel](./bitburner.hacknetnodeconstants.moneygainperlevel.md) | number | Amount of money gained per level |
| [PurchaseNextMult](./bitburner.hacknetnodeconstants.purchasenextmult.md) | number | Multiplier to purchase new node |
| [RamBaseCost](./bitburner.hacknetnodeconstants.rambasecost.md) | number | Base cost to incrase RAM |
| [RamBaseCost](./bitburner.hacknetnodeconstants.rambasecost.md) | number | Base cost to increase RAM |
| [UpgradeCoreMult](./bitburner.hacknetnodeconstants.upgradecoremult.md) | number | Multiplier to increase cores |
| [UpgradeLevelMult](./bitburner.hacknetnodeconstants.upgradelevelmult.md) | number | Multiplier to increase node level |
| [UpgradeRamMult](./bitburner.hacknetnodeconstants.upgraderammult.md) | number | Multiplier to increase RAM |

@ -4,7 +4,7 @@
## HacknetNodeConstants.RamBaseCost property
Base cost to incrase RAM
Base cost to increase RAM
<b>Signature:</b>

@ -10,14 +10,12 @@
| --- | --- |
| [OrderTypes](./bitburner.ordertypes.md) | |
| [PositionTypes](./bitburner.positiontypes.md) | |
| [ToastVariant](./bitburner.toastvariant.md) | |
## Interfaces
| Interface | Description |
| --- | --- |
| [ActiveFragment](./bitburner.activefragment.md) | |
| [AugmentationStats](./bitburner.augmentationstats.md) | Data representing the internal values of an Augmentation. |
| [AugmentPair](./bitburner.augmentpair.md) | Return value of [getSleevePurchasableAugs](./bitburner.sleeve.getsleevepurchasableaugs.md) |
| [AutocompleteData](./bitburner.autocompletedata.md) | Used for autocompletion |
| [BasicHGWOptions](./bitburner.basichgwoptions.md) | Options to affect the behavior of [hack](./bitburner.ns.hack.md)<!-- -->, [grow](./bitburner.ns.grow.md)<!-- -->, and [weaken](./bitburner.ns.weaken.md)<!-- -->. |
@ -66,7 +64,6 @@
| [NetscriptPort](./bitburner.netscriptport.md) | Object representing a port. A port is a serialized queue. |
| [NodeStats](./bitburner.nodestats.md) | Object representing all the values related to a hacknet node. |
| [NS](./bitburner.ns.md) | Collection of all functions passed to scripts |
| [NSEnums](./bitburner.nsenums.md) | |
| [Office](./bitburner.office.md) | Office for a division in a city. |
| [OfficeAPI](./bitburner.officeapi.md) | Corporation Office API |
| [Player](./bitburner.player.md) | |
@ -101,8 +98,9 @@
| --- | --- |
| [CodingContractData](./bitburner.codingcontractdata.md) | Coding contract data will differ depending on coding contract. |
| [FilenameOrPID](./bitburner.filenameorpid.md) | |
| [NSEnums](./bitburner.nsenums.md) | |
| [PortData](./bitburner.portdata.md) | |
| [ScriptArg](./bitburner.scriptarg.md) | |
| [SleeveTask](./bitburner.sleevetask.md) | Object representing a sleeve current task. |
| [ToastVariantValues](./bitburner.toastvariantvalues.md) | |
| [ToastVariant](./bitburner.toastvariant.md) | |

@ -4,8 +4,10 @@
## Multipliers.agility property
Multiplier to agility skill
<b>Signature:</b>
```typescript
agility: number;
agility?: number;
```

@ -4,8 +4,10 @@
## Multipliers.agility\_exp property
Multiplier to agility experience gain rate
<b>Signature:</b>
```typescript
agility_exp: number;
agility_exp?: number;
```

@ -4,8 +4,10 @@
## Multipliers.bladeburner\_analysis property
Multiplier to effectiveness in Bladeburner Field Analysis
<b>Signature:</b>
```typescript
bladeburner_analysis: number;
bladeburner_analysis?: number;
```

@ -4,8 +4,10 @@
## Multipliers.bladeburner\_max\_stamina property
Multiplier to Bladeburner max stamina
<b>Signature:</b>
```typescript
bladeburner_max_stamina: number;
bladeburner_max_stamina?: number;
```

@ -4,8 +4,10 @@
## Multipliers.bladeburner\_stamina\_gain property
Multiplier to Bladeburner stamina gain rate
<b>Signature:</b>
```typescript
bladeburner_stamina_gain: number;
bladeburner_stamina_gain?: number;
```

@ -4,8 +4,10 @@
## Multipliers.bladeburner\_success\_chance property
Multiplier to success chance in Bladeburner contracts/operations
<b>Signature:</b>
```typescript
bladeburner_success_chance: number;
bladeburner_success_chance?: number;
```

@ -4,8 +4,10 @@
## Multipliers.charisma property
Multiplier to charisma skill
<b>Signature:</b>
```typescript
charisma: number;
charisma?: number;
```

@ -4,8 +4,10 @@
## Multipliers.charisma\_exp property
Multiplier to charisma experience gain rate
<b>Signature:</b>
```typescript
charisma_exp: number;
charisma_exp?: number;
```

@ -4,8 +4,10 @@
## Multipliers.company\_rep property
Multiplier to amount of reputation gained when working
<b>Signature:</b>
```typescript
company_rep: number;
company_rep?: number;
```

@ -4,8 +4,10 @@
## Multipliers.crime\_money property
Multiplier to amount of money gained from crimes
<b>Signature:</b>
```typescript
crime_money: number;
crime_money?: number;
```

@ -4,8 +4,10 @@
## Multipliers.crime\_success property
Multiplier to crime success rate
<b>Signature:</b>
```typescript
crime_success: number;
crime_success?: number;
```

@ -4,8 +4,10 @@
## Multipliers.defense property
Multiplier to defense skill
<b>Signature:</b>
```typescript
defense: number;
defense?: number;
```

@ -4,8 +4,10 @@
## Multipliers.defense\_exp property
Multiplier to defense experience gain rate
<b>Signature:</b>
```typescript
defense_exp: number;
defense_exp?: number;
```

@ -4,8 +4,10 @@
## Multipliers.dexterity property
Multiplier to dexterity skill
<b>Signature:</b>
```typescript
dexterity: number;
dexterity?: number;
```

@ -4,8 +4,10 @@
## Multipliers.dexterity\_exp property
Multiplier to dexterity experience gain rate
<b>Signature:</b>
```typescript
dexterity_exp: number;
dexterity_exp?: number;
```

@ -4,8 +4,10 @@
## Multipliers.faction\_rep property
Multiplier to amount of reputation gained when working
<b>Signature:</b>
```typescript
faction_rep: number;
faction_rep?: number;
```

@ -4,8 +4,10 @@
## Multipliers.hacking property
Multiplier to hacking skill
<b>Signature:</b>
```typescript
hacking: number;
hacking?: number;
```

@ -4,8 +4,10 @@
## Multipliers.hacking\_chance property
Multiplier to chance of successfully performing a hack
<b>Signature:</b>
```typescript
hacking_chance: number;
hacking_chance?: number;
```

@ -4,8 +4,10 @@
## Multipliers.hacking\_exp property
Multiplier to hacking experience gain rate
<b>Signature:</b>
```typescript
hacking_exp: number;
hacking_exp?: number;
```

@ -4,8 +4,10 @@
## Multipliers.hacking\_grow property
Multiplier to amount of money injected into servers using grow
<b>Signature:</b>
```typescript
hacking_grow: number;
hacking_grow?: number;
```

@ -4,8 +4,10 @@
## Multipliers.hacking\_money property
Multiplier to amount of money the player gains from hacking
<b>Signature:</b>
```typescript
hacking_money: number;
hacking_money?: number;
```

@ -4,8 +4,10 @@
## Multipliers.hacking\_speed property
Multiplier to hacking speed
<b>Signature:</b>
```typescript
hacking_speed: number;
hacking_speed?: number;
```

@ -4,8 +4,10 @@
## Multipliers.hacknet\_node\_core\_cost property
Multiplier to cost of core for a Hacknet Node
<b>Signature:</b>
```typescript
hacknet_node_core_cost: number;
hacknet_node_core_cost?: number;
```

@ -4,8 +4,10 @@
## Multipliers.hacknet\_node\_level\_cost property
Multiplier to cost of leveling up a Hacknet Node
<b>Signature:</b>
```typescript
hacknet_node_level_cost: number;
hacknet_node_level_cost?: number;
```

@ -4,8 +4,10 @@
## Multipliers.hacknet\_node\_money property
Multiplier to amount of money produced by Hacknet Nodes
<b>Signature:</b>
```typescript
hacknet_node_money: number;
hacknet_node_money?: number;
```

@ -4,8 +4,10 @@
## Multipliers.hacknet\_node\_purchase\_cost property
Multiplier to cost of purchasing a Hacknet Node
<b>Signature:</b>
```typescript
hacknet_node_purchase_cost: number;
hacknet_node_purchase_cost?: number;
```

@ -4,8 +4,10 @@
## Multipliers.hacknet\_node\_ram\_cost property
Multiplier to cost of ram for a Hacknet Node
<b>Signature:</b>
```typescript
hacknet_node_ram_cost: number;
hacknet_node_ram_cost?: number;
```

@ -15,34 +15,34 @@ export interface Multipliers
| Property | Type | Description |
| --- | --- | --- |
| [agility\_exp](./bitburner.multipliers.agility_exp.md) | number | |
| [agility](./bitburner.multipliers.agility.md) | number | |
| [bladeburner\_analysis](./bitburner.multipliers.bladeburner_analysis.md) | number | |
| [bladeburner\_max\_stamina](./bitburner.multipliers.bladeburner_max_stamina.md) | number | |
| [bladeburner\_stamina\_gain](./bitburner.multipliers.bladeburner_stamina_gain.md) | number | |
| [bladeburner\_success\_chance](./bitburner.multipliers.bladeburner_success_chance.md) | number | |
| [charisma\_exp](./bitburner.multipliers.charisma_exp.md) | number | |
| [charisma](./bitburner.multipliers.charisma.md) | number | |
| [company\_rep](./bitburner.multipliers.company_rep.md) | number | |
| [crime\_money](./bitburner.multipliers.crime_money.md) | number | |
| [crime\_success](./bitburner.multipliers.crime_success.md) | number | |
| [defense\_exp](./bitburner.multipliers.defense_exp.md) | number | |
| [defense](./bitburner.multipliers.defense.md) | number | |
| [dexterity\_exp](./bitburner.multipliers.dexterity_exp.md) | number | |
| [dexterity](./bitburner.multipliers.dexterity.md) | number | |
| [faction\_rep](./bitburner.multipliers.faction_rep.md) | number | |
| [hacking\_chance](./bitburner.multipliers.hacking_chance.md) | number | |
| [hacking\_exp](./bitburner.multipliers.hacking_exp.md) | number | |
| [hacking\_grow](./bitburner.multipliers.hacking_grow.md) | number | |
| [hacking\_money](./bitburner.multipliers.hacking_money.md) | number | |
| [hacking\_speed](./bitburner.multipliers.hacking_speed.md) | number | |
| [hacking](./bitburner.multipliers.hacking.md) | number | |
| [hacknet\_node\_core\_cost](./bitburner.multipliers.hacknet_node_core_cost.md) | number | |
| [hacknet\_node\_level\_cost](./bitburner.multipliers.hacknet_node_level_cost.md) | number | |
| [hacknet\_node\_money](./bitburner.multipliers.hacknet_node_money.md) | number | |
| [hacknet\_node\_purchase\_cost](./bitburner.multipliers.hacknet_node_purchase_cost.md) | number | |
| [hacknet\_node\_ram\_cost](./bitburner.multipliers.hacknet_node_ram_cost.md) | number | |
| [strength\_exp](./bitburner.multipliers.strength_exp.md) | number | |
| [strength](./bitburner.multipliers.strength.md) | number | |
| [work\_money](./bitburner.multipliers.work_money.md) | number | |
| [agility\_exp?](./bitburner.multipliers.agility_exp.md) | number | <i>(Optional)</i> Multiplier to agility experience gain rate |
| [agility?](./bitburner.multipliers.agility.md) | number | <i>(Optional)</i> Multiplier to agility skill |
| [bladeburner\_analysis?](./bitburner.multipliers.bladeburner_analysis.md) | number | <i>(Optional)</i> Multiplier to effectiveness in Bladeburner Field Analysis |
| [bladeburner\_max\_stamina?](./bitburner.multipliers.bladeburner_max_stamina.md) | number | <i>(Optional)</i> Multiplier to Bladeburner max stamina |
| [bladeburner\_stamina\_gain?](./bitburner.multipliers.bladeburner_stamina_gain.md) | number | <i>(Optional)</i> Multiplier to Bladeburner stamina gain rate |
| [bladeburner\_success\_chance?](./bitburner.multipliers.bladeburner_success_chance.md) | number | <i>(Optional)</i> Multiplier to success chance in Bladeburner contracts/operations |
| [charisma\_exp?](./bitburner.multipliers.charisma_exp.md) | number | <i>(Optional)</i> Multiplier to charisma experience gain rate |
| [charisma?](./bitburner.multipliers.charisma.md) | number | <i>(Optional)</i> Multiplier to charisma skill |
| [company\_rep?](./bitburner.multipliers.company_rep.md) | number | <i>(Optional)</i> Multiplier to amount of reputation gained when working |
| [crime\_money?](./bitburner.multipliers.crime_money.md) | number | <i>(Optional)</i> Multiplier to amount of money gained from crimes |
| [crime\_success?](./bitburner.multipliers.crime_success.md) | number | <i>(Optional)</i> Multiplier to crime success rate |
| [defense\_exp?](./bitburner.multipliers.defense_exp.md) | number | <i>(Optional)</i> Multiplier to defense experience gain rate |
| [defense?](./bitburner.multipliers.defense.md) | number | <i>(Optional)</i> Multiplier to defense skill |
| [dexterity\_exp?](./bitburner.multipliers.dexterity_exp.md) | number | <i>(Optional)</i> Multiplier to dexterity experience gain rate |
| [dexterity?](./bitburner.multipliers.dexterity.md) | number | <i>(Optional)</i> Multiplier to dexterity skill |
| [faction\_rep?](./bitburner.multipliers.faction_rep.md) | number | <i>(Optional)</i> Multiplier to amount of reputation gained when working |
| [hacking\_chance?](./bitburner.multipliers.hacking_chance.md) | number | <i>(Optional)</i> Multiplier to chance of successfully performing a hack |
| [hacking\_exp?](./bitburner.multipliers.hacking_exp.md) | number | <i>(Optional)</i> Multiplier to hacking experience gain rate |
| [hacking\_grow?](./bitburner.multipliers.hacking_grow.md) | number | <i>(Optional)</i> Multiplier to amount of money injected into servers using grow |
| [hacking\_money?](./bitburner.multipliers.hacking_money.md) | number | <i>(Optional)</i> Multiplier to amount of money the player gains from hacking |
| [hacking\_speed?](./bitburner.multipliers.hacking_speed.md) | number | <i>(Optional)</i> Multiplier to hacking speed |
| [hacking?](./bitburner.multipliers.hacking.md) | number | <i>(Optional)</i> Multiplier to hacking skill |
| [hacknet\_node\_core\_cost?](./bitburner.multipliers.hacknet_node_core_cost.md) | number | <i>(Optional)</i> Multiplier to cost of core for a Hacknet Node |
| [hacknet\_node\_level\_cost?](./bitburner.multipliers.hacknet_node_level_cost.md) | number | <i>(Optional)</i> Multiplier to cost of leveling up a Hacknet Node |
| [hacknet\_node\_money?](./bitburner.multipliers.hacknet_node_money.md) | number | <i>(Optional)</i> Multiplier to amount of money produced by Hacknet Nodes |
| [hacknet\_node\_purchase\_cost?](./bitburner.multipliers.hacknet_node_purchase_cost.md) | number | <i>(Optional)</i> Multiplier to cost of purchasing a Hacknet Node |
| [hacknet\_node\_ram\_cost?](./bitburner.multipliers.hacknet_node_ram_cost.md) | number | <i>(Optional)</i> Multiplier to cost of ram for a Hacknet Node |
| [strength\_exp?](./bitburner.multipliers.strength_exp.md) | number | <i>(Optional)</i> Multiplier to strength experience gain rate |
| [strength?](./bitburner.multipliers.strength.md) | number | <i>(Optional)</i> Multiplier to strength skill |
| [work\_money?](./bitburner.multipliers.work_money.md) | number | <i>(Optional)</i> Multiplier to amount of money gained from working |

@ -4,8 +4,10 @@
## Multipliers.strength property
Multiplier to strength skill
<b>Signature:</b>
```typescript
strength: number;
strength?: number;
```

@ -4,8 +4,10 @@
## Multipliers.strength\_exp property
Multiplier to strength experience gain rate
<b>Signature:</b>
```typescript
strength_exp: number;
strength_exp?: number;
```

@ -4,8 +4,10 @@
## Multipliers.work\_money property
Multiplier to amount of money gained from working
<b>Signature:</b>
```typescript
work_money: number;
work_money?: number;
```

@ -26,5 +26,5 @@ void
RAM cost: 0 GB
Deleta all data from the underlying queue.
Delete all data from the underlying queue.

@ -18,7 +18,7 @@ exec(script: string, host: string, numThreads?: number, ...args: (string | numbe
| --- | --- | --- |
| script | string | Filename of script to execute. |
| host | string | Hostname of the <code>target server</code> on which to execute the script. |
| numThreads | number | Optional thread count for new script. Set to 1 by default. Will be rounded to nearest integer. |
| numThreads | number | Optional thread count for new script. Set to 1 by default. Will be rounded down to the nearest integer. |
| args | (string \| number \| boolean)\[\] | Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the third argument numThreads must be filled in with a value. |
<b>Returns:</b>
@ -31,9 +31,9 @@ Returns the PID of a successfully started script, and 0 otherwise.
RAM cost: 1.3 GB
Run a script as a separate process on a specified server. This is similar to the run function except that it can be used to run a script on any server, instead of just the current server.
Run a script as a separate process on a specified server. This is similar to the function [run](./bitburner.ns.run.md) except that it can be used to run a script on any server, instead of just the current server.
If the script was successfully started, then this functions returns the PID of that script. Otherwise, it returns 0.
If the script was successfully started, then this function returns the PID of that script. Otherwise, it returns 0.
PID stands for Process ID. The PID is a unique identifier for each script. The PID will always be a positive integer.
@ -44,29 +44,38 @@ Running this function with a numThreads argument of 0 or less will cause a runti
```ts
// NS1:
//The simplest way to use the exec command is to call it with just the script name and the target server. The following example will try to run generic-hack.script on the foodnstuff server:
// The simplest way to use the exec command is to call it with just the script name
// and the target server. The following example will try to run generic-hack.script
// on the foodnstuff server.
exec("generic-hack.script", "foodnstuff");
//The following example will try to run the script generic-hack.script on the joesguns server with 10 threads:
// The following example will try to run the script generic-hack.script on the
// joesguns server with 10 threads.
exec("generic-hack.script", "joesguns", 10);
//This last example will try to run the script foo.script on the foodnstuff server with 5 threads. It will also pass the number 1 and the string “test” in as arguments to the script:
// This last example will try to run the script foo.script on the foodnstuff server
// with 5 threads. It will also pass the number 1 and the string “test” in as
// arguments to the script.
exec("foo.script", "foodnstuff", 5, 1, "test");
```
\*
## Example 2
```ts
// NS2:
//The simplest way to use the exec command is to call it with just the script name and the target server. The following example will try to run generic-hack.script on the foodnstuff server:
// The simplest way to use the exec command is to call it with just the script name
// and the target server. The following example will try to run generic-hack.script
// on the foodnstuff server.
ns.exec("generic-hack.script", "foodnstuff");
//The following example will try to run the script generic-hack.script on the joesguns server with 10 threads:
// The following example will try to run the script generic-hack.script on the
// joesguns server with 10 threads.
ns.exec("generic-hack.script", "joesguns", 10);
//This last example will try to run the script foo.script on the foodnstuff server with 5 threads. It will also pass the number 1 and the string “test” in as arguments to the script:
// This last example will try to run the script foo.script on the foodnstuff server
// with 5 threads. It will also pass the number 1 and the string “test” in as
// arguments to the script.
ns.exec("foo.script", "foodnstuff", 5, 1, "test");
```

@ -0,0 +1,31 @@
<!-- 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; [getPurchasedServerUpgradeCost](./bitburner.ns.getpurchasedserverupgradecost.md)
## NS.getPurchasedServerUpgradeCost() method
Get cost of upgrading a purchased server to the given ram.
<b>Signature:</b>
```typescript
getPurchasedServerUpgradeCost(hostname: string, ram: number): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| hostname | string | Hostname of the server to upgrade. |
| ram | number | Amount of RAM of the purchased server, in GB. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20). |
<b>Returns:</b>
number
The price to upgrade.
## Remarks
RAM cost: 0.1 GB

@ -90,6 +90,7 @@ export async function main(ns) {
| [getPurchasedServerLimit()](./bitburner.ns.getpurchasedserverlimit.md) | Returns the maximum number of servers you can purchase. |
| [getPurchasedServerMaxRam()](./bitburner.ns.getpurchasedservermaxram.md) | Returns the maximum RAM that a purchased server can have. |
| [getPurchasedServers()](./bitburner.ns.getpurchasedservers.md) | Returns an array with the hostnames of all of the servers you have purchased. |
| [getPurchasedServerUpgradeCost(hostname, ram)](./bitburner.ns.getpurchasedserverupgradecost.md) | Get cost of upgrading a purchased server to the given ram. |
| [getRecentScripts()](./bitburner.ns.getrecentscripts.md) | Get an array of recently killed scripts across all servers. |
| [getRunningScript(filename, hostname, args)](./bitburner.ns.getrunningscript.md) | Get general info about a running script. |
| [getScriptExpGain(script, host, args)](./bitburner.ns.getscriptexpgain.md) | Get the exp gain of a script. |
@ -143,6 +144,7 @@ export async function main(ns) {
| [read(filename)](./bitburner.ns.read.md) | Read content of a file. |
| [readPort(port)](./bitburner.ns.readport.md) | Read data from a port. |
| [relaysmtp(host)](./bitburner.ns.relaysmtp.md) | Runs relaySMTP.exe on a server. |
| [renamePurchasedServer(hostname, newName)](./bitburner.ns.renamepurchasedserver.md) | Rename a purchased server. |
| [resizeTail(width, height, pid)](./bitburner.ns.resizetail.md) | Resize a tail window |
| [rm(name, host)](./bitburner.ns.rm.md) | Delete a file. |
| [run(script, numThreads, args)](./bitburner.ns.run.md) | Start another script on the current server. |
@ -162,6 +164,7 @@ export async function main(ns) {
| [tprint(args)](./bitburner.ns.tprint.md) | Prints one or more values or variables to the Terminal. |
| [tprintf(format, values)](./bitburner.ns.tprintf.md) | Prints a raw value or a variable to the Terminal. |
| [tryWritePort(port, data)](./bitburner.ns.trywriteport.md) | Attempt to write to a port. |
| [upgradePurchasedServer(hostname, ram)](./bitburner.ns.upgradepurchasedserver.md) | Upgrade a purchased servers ram. |
| [vsprintf(format, args)](./bitburner.ns.vsprintf.md) | Format a string with an array of arguments. |
| [weaken(host, opts)](./bitburner.ns.weaken.md) | Reduce a server security level. |
| [weakenAnalyze(threads, cores)](./bitburner.ns.weakenanalyze.md) | Predict the effect of weaken. |

@ -23,13 +23,13 @@ nFormat(n: number, format: string): string;
string
Formated number.
Formatted number.
## Remarks
RAM cost: 0 GB
Converts a number into a string with the specified formatter. This uses the numeraljs library, so the formatters must be compatible with that. This is the same function that the game itself uses to display numbers.
Converts a number into a string with the specified formatter. This uses the numeral.js library, so the formatters must be compatible with that. This is the same function that the game itself uses to display numbers.
see: http://numeraljs.com/

@ -26,3 +26,69 @@ void
RAM cost: 0 GB
If the argument is a string, you can color code your message by prefixing your string with one of these strings:
- `"ERROR"`<!-- -->: The whole string will be printed in red. Use this prefix to indicate that an error has occurred.
- `"SUCCESS"`<!-- -->: The whole string will be printed in green, similar to the default theme of the Terminal. Use this prefix to indicate that something is correct.
- `"WARN"`<!-- -->: The whole string will be printed in yellow. Use this prefix to indicate that you or a user of your script should be careful of something.
- `"INFO"`<!-- -->: The whole string will be printed in purplish blue. Use this prefix to remind yourself or a user of your script of something. Think of this prefix as indicating an FYI (for your information).
For custom coloring, use ANSI escape sequences. The examples below use the Unicode escape code `\u001b`<!-- -->. The color coding also works if `\u001b` is replaced with the hexadecimal escape code `\x1b`<!-- -->. The Bash escape code `\e` is not supported. The octal escape code `\033` is not allowed because the game runs JavaScript in strict mode.
## Example 1
```ts
// NS1
// Default color coding.
print("ERROR means something's wrong.");
print("SUCCESS means everything's OK.");
print("WARN Tread with caution!");
print("WARNING, warning, danger, danger!");
print("WARNing! Here be dragons.");
print("INFO for your I's only (FYI).");
print("INFOrmation overload!");
// Custom color coding.
var cyan = "\u001b[36m";
var green = "\u001b[32m";
var red = "\u001b[31m";
var reset = "\u001b[0m";
var msgError = red + "Ugh! What a mess." + reset;
var msgSuccess = green + "Well done!" + reset;
var msgMixed = cyan + "ERROR Should this be in red?" + reset;
print(msgError);
print(msgSuccess);
print(msgMixed);
tail();
```
## Example 2
```ts
// NS2
// Default color coding.
ns.print("ERROR means something's wrong.");
ns.print("SUCCESS means everything's OK.");
ns.print("WARN Tread with caution!");
ns.print("WARNING, warning, danger, danger!");
ns.print("WARNing! Here be dragons.");
ns.print("INFO for your I's only (FYI).");
ns.print("INFOrmation overload!");
// Custom color coding.
const cyan = "\u001b[36m";
const green = "\u001b[32m";
const red = "\u001b[31m";
const reset = "\u001b[0m";
const msgError = "Ugh! What a mess.";
const msgSuccess = "Well done!";
const msgMixed = "ERROR Should this be in red?";
ns.print(`${red + msgError + reset}`);
ns.print(`${green + msgSuccess + reset}`);
ns.print(`${cyan + msgMixed + reset}`);
ns.tail();
```

@ -16,7 +16,7 @@ printf(format: string, ...args: any[]): void;
| Parameter | Type | Description |
| --- | --- | --- |
| format | string | format of the message |
| format | string | Format of the message. |
| args | any\[\] | Value(s) to be printed. |
<b>Returns:</b>
@ -27,5 +27,39 @@ void
RAM cost: 0 GB
see: https://github.com/alexei/sprintf.js
- See [print](./bitburner.ns.print.md) for how to add color to your printed strings.
- For more detail, see: https://github.com/alexei/sprintf.js
## Example 1
```ts
// NS1
var name = "Bit";
var age = 4;
printf("My name is %s.", name);
printf("I'm %d seconds old.", age);
printf("My age in binary is %b.", age);
printf("My age in scientific notation is %e.", age);
printf("In %d seconds, I'll be %s.", 6, "Byte");
printf("Am I a nibble? %t", (4 == age));
tail();
```
## Example 2
```ts
// NS2
const name = "Bit";
const age = 4;
ns.printf("My name is %s.", name);
ns.printf("I'm %d seconds old.", age);
ns.printf("My age in binary is %b.", age);
ns.printf("My age in scientific notation is %e.", age);
ns.printf("In %d seconds, I'll be %s.", 6, "Byte");
ns.printf("Am I a nibble? %t", (4 == age));
ns.tail();
```

@ -0,0 +1,31 @@
<!-- 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; [renamePurchasedServer](./bitburner.ns.renamepurchasedserver.md)
## NS.renamePurchasedServer() method
Rename a purchased server.
<b>Signature:</b>
```typescript
renamePurchasedServer(hostname: string, newName: string): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| hostname | string | current server hostname |
| newName | string | new server hostname |
<b>Returns:</b>
boolean
True if the upgrade succeeded.
## Remarks
RAM cost: 2.00 GB

@ -17,13 +17,13 @@ sprintf(format: string, ...args: any[]): string;
| Parameter | Type | Description |
| --- | --- | --- |
| format | string | String to format. |
| args | any\[\] | Formating arguments. |
| args | any\[\] | Formatting arguments. |
<b>Returns:</b>
string
Formated text.
Formatted text.
## Remarks

@ -9,7 +9,7 @@ Queue a toast (bottom-right notification).
<b>Signature:</b>
```typescript
toast(msg: string, variant?: ToastVariantValues, duration?: number | null): void;
toast(msg: string, variant?: ToastVariant, duration?: number | null): void;
```
## Parameters
@ -17,7 +17,7 @@ toast(msg: string, variant?: ToastVariantValues, duration?: number | null): void
| Parameter | Type | Description |
| --- | --- | --- |
| msg | string | Message in the toast. |
| variant | [ToastVariantValues](./bitburner.toastvariantvalues.md) | Type of toast, must be one of success, info, warning, error. Defaults to success. |
| variant | [ToastVariant](./bitburner.toastvariant.md) | Type of toast, must be one of success, info, warning, error. Defaults to success. |
| duration | number \| null | Duration of toast in ms. Can also be <code>null</code> to create a persistent toast. Defaults to 2000 |
<b>Returns:</b>

@ -26,3 +26,5 @@ void
RAM cost: 0 GB
See [print](./bitburner.ns.print.md) for how to add color to your printed strings.

@ -16,8 +16,8 @@ tprintf(format: string, ...values: any[]): void;
| Parameter | Type | Description |
| --- | --- | --- |
| format | string | format of the message |
| values | any\[\] | |
| format | string | Format of the message. |
| values | any\[\] | Value(s) to be printed. |
<b>Returns:</b>
@ -27,5 +27,9 @@ void
RAM cost: 0 GB
see: https://github.com/alexei/sprintf.js
- See [print](./bitburner.ns.print.md) for how to add color to your printed strings.
- See [printf](./bitburner.ns.printf.md) for examples on formatted strings.
- For more detail, see: https://github.com/alexei/sprintf.js

@ -9,7 +9,7 @@ Attempt to write to a port.
<b>Signature:</b>
```typescript
tryWritePort(port: number, data: string | number): Promise<boolean>;
tryWritePort(port: number, data: string | number): boolean;
```
## Parameters
@ -21,7 +21,7 @@ tryWritePort(port: number, data: string | number): Promise<boolean>;
<b>Returns:</b>
Promise&lt;boolean&gt;
boolean
True if the data is successfully written to the port, and false otherwise.

@ -0,0 +1,31 @@
<!-- 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; [upgradePurchasedServer](./bitburner.ns.upgradepurchasedserver.md)
## NS.upgradePurchasedServer() method
Upgrade a purchased servers ram.
<b>Signature:</b>
```typescript
upgradePurchasedServer(hostname: string, ram: number): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| hostname | string | Hostname of the server to upgrade. |
| ram | number | Amount of RAM of the purchased server, in GB. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20). |
<b>Returns:</b>
boolean
True if the upgrade succeeded.
## Remarks
RAM cost: 0.25 GB

@ -17,13 +17,13 @@ vsprintf(format: string, args: any[]): string;
| Parameter | Type | Description |
| --- | --- | --- |
| format | string | String to format. |
| args | any\[\] | Formating arguments. |
| args | any\[\] | Formatting arguments. |
<b>Returns:</b>
string
Formated text.
Formatted text.
## Remarks

@ -2,18 +2,11 @@
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NSEnums](./bitburner.nsenums.md)
## NSEnums interface
## NSEnums type
<b>Signature:</b>
```typescript
export interface NSEnums
export type NSEnums = typeof enums;
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [toast](./bitburner.nsenums.toast.md) | typeof [ToastVariant](./bitburner.toastvariant.md) | |

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NSEnums](./bitburner.nsenums.md) &gt; [toast](./bitburner.nsenums.toast.md)
## NSEnums.toast property
<b>Signature:</b>
```typescript
toast: typeof ToastVariant;
```

@ -14,7 +14,7 @@ export interface OfficeAPI
## Remarks
Requires the Office API upgrade from your corporation.
requires the Office API upgrade from your corporation.
## Methods

@ -15,11 +15,11 @@ checkFactionInvitations(): string[];
string\[\]
Array with the name of all Factions you currently have oustanding invitations from.
Array with the name of all Factions you currently have outstanding invitations from.
## Remarks
RAM cost: 3 GB \* 16/4/1
Returns an array with the name of all Factions you currently have oustanding invitations from.
Returns an array with the name of all Factions you currently have outstanding invitations from.

@ -9,7 +9,7 @@ Get the stats of an augmentation.
<b>Signature:</b>
```typescript
getAugmentationStats(name: string): AugmentationStats;
getAugmentationStats(name: string): Multipliers;
```
## Parameters
@ -20,7 +20,7 @@ getAugmentationStats(name: string): AugmentationStats;
<b>Returns:</b>
[AugmentationStats](./bitburner.augmentationstats.md)
[Multipliers](./bitburner.multipliers.md)
Augmentation stats.

@ -22,11 +22,11 @@ getCrimeChance(crime: string): number;
number
Chance of success at commiting the specified crime.
Chance of success at committing the specified crime.
## Remarks
RAM cost: 5 GB \* 16/4/1
This function returns your chance of success at commiting the specified crime.
This function returns your chance of success at committing the specified crime.

@ -16,7 +16,7 @@ setToCommitCrime(sleeveNumber: number, name: string): boolean;
| Parameter | Type | Description |
| --- | --- | --- |
| sleeveNumber | number | Index of the sleeve to start commiting crime. |
| sleeveNumber | number | Index of the sleeve to start committing crime. |
| name | string | Name of the crime. Must be an exact match. |
<b>Returns:</b>

@ -28,7 +28,7 @@ void
## Remarks
RAM cost: 2.5 GB Cancels an oustanding Limit or Stop order on the stock market.
RAM cost: 2.5 GB Cancels an outstanding Limit or Stop order on the stock market.
The ability to use limit and stop orders is \*\*not\*\* immediately available to the player and must be unlocked later on in the game.

@ -4,7 +4,7 @@
## TIX.getPrice() method
Returns the price of a stock
Returns the price of a stock.
<b>Signature:</b>
@ -26,14 +26,26 @@ The price of a stock.
## Remarks
RAM cost: 2 GB The stocks price is the average of its bid and ask price.
RAM cost: 2 GB
The stocks price is the average of its bid and ask prices. This function requires that you have the following:
1. WSE Account
1. TIX API Access
## Example 1
```ts
// NS1
stock.getPrice("FISG");
stock.getPrice("FSIG");
// Choose the first stock symbol from the array of stock symbols. Get the price
// of the corresponding stock.
var sym = stock.getSymbols()[0];
tprint("Stock symbol: " + sym);
tprint("Stock price: " + stock.getPrice(sym));
```
## Example 2
@ -41,6 +53,12 @@ stock.getPrice("FISG");
```ts
// NS2
ns.stock.getPrice("FISG");
ns.stock.getPrice("FSIG");
// Choose the first stock symbol from the array of stock symbols. Get the price
// of the corresponding stock.
const sym = ns.stock.getSymbols()[0];
ns.tprint("Stock symbol: " + sym);
ns.tprint("Stock price: " + ns.stock.getPrice(sym));
```

Some files were not shown because too many files have changed in this diff Show More