mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
v0.51.0 (#826)
* Hash upgrades and Bladeburner skills can now be clicked to copy to clipboard * Aug purchase confirmation popup displays money in 0.000a format * Character now displays hacknet server info properly * Character,Info now displays hacknet server info correctly. * Formulas (#825) Formulas API v0.1 * Make all money the same color, same for reputation, format all numbers consistently. * rename a lot of the formulas function to no longer contain calculate * added hacking related formulas * removed unused variable * v0.51.0
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
cacheUpgradeCost() Netscript Function
|
||||
==============================================
|
||||
|
||||
.. js:function:: cacheUpgradeCost(startingCache[, extraCacheLevels[, costMult]])
|
||||
|
||||
:RAM cost: 0 GB
|
||||
:param number startingCache: Cache level at the start the calculation.
|
||||
:param number extraCacheLevels: Extra number of cache level you want to buy. Default to ``1``.
|
||||
:param number costMult: Aug multiplier that reduces cost. Defaults to ``1``.
|
||||
:returns: Money required to go from ``startingLevel`` to ``startingLevel+extraLevels``.
|
||||
|
||||
You must have Source-File 5-1 and Source-File 9-1 in order to use this function.
|
||||
|
||||
This function calculates the cost of upgrading cache from any level to any level.
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
formulas.hacknetServers.cacheUpgradeCost(1, 5); // returns: 243170000
|
||||
@@ -0,0 +1,29 @@
|
||||
constants() Netscript Function
|
||||
=============================================
|
||||
|
||||
.. js:function:: constants()
|
||||
|
||||
:RAM cost: 0 GB
|
||||
:returns: A structure with various constants related to hacknet servers.
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
{
|
||||
HashesPerLevel
|
||||
BaseCost
|
||||
RamBaseCost
|
||||
CoreBaseCost
|
||||
CacheBaseCost
|
||||
PurchaseMult
|
||||
UpgradeLevelMult
|
||||
UpgradeRamMult
|
||||
UpgradeCoreMult
|
||||
UpgradeCacheMult
|
||||
MaxServers
|
||||
MaxLevel
|
||||
MaxRam
|
||||
MaxCores
|
||||
MaxCache
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
coreUpgradeCost() Netscript Function
|
||||
=============================================
|
||||
|
||||
.. js:function:: coreUpgradeCost(startingCores[, extraCores[, costMult]])
|
||||
|
||||
:RAM cost: 0 GB
|
||||
:param number startingCores: Number of core at the start the calculation.
|
||||
:param number extraCores: Extra number of cores you want to buy. Default to ``1``.
|
||||
:param number costMult: Aug multiplier that reduces cost. Defaults to ``1``.
|
||||
:returns: Money required to go from ``startingCores`` to ``startingCores+extraCores``.
|
||||
|
||||
You must have Source-File 5-1 and Source-File 9-1 in order to use this function.
|
||||
|
||||
This function calculates the cost of upgrading cores from any level to any level.
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
formulas.hacknetServers.coreUpgradeCost(1, 5); // returns: 12015000
|
||||
@@ -0,0 +1,19 @@
|
||||
hacknetServerCost() Netscript Function
|
||||
===============================================
|
||||
|
||||
.. js:function:: hacknetServerCost(serverN[, costMult]])
|
||||
|
||||
:RAM cost: 0 GB
|
||||
:param number serverN: Number of the new node.
|
||||
:param number costMult: Aug multiplier that reduces cost. Defaults to ``1``.
|
||||
:returns: Money required to buy your ``serverN`` th node.
|
||||
|
||||
You must have Source-File 5-1 and Source-File 9-1 in order to use this function.
|
||||
|
||||
This function calculates the cost purchasing a hacknet node.
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
formulas.hacknetNodes.hacknetServerCost(2); // returns: 1800000
|
||||
@@ -0,0 +1,24 @@
|
||||
hashGainRate() Netscript Function
|
||||
==========================================
|
||||
|
||||
.. js:function:: hashGainRate(level, ram, core[, mult])
|
||||
|
||||
:RAM cost: 0 GB
|
||||
:param number level: level of the server.
|
||||
:param number ram: ram of the server.
|
||||
:param number core: cores of the server.
|
||||
:returns: Money per second that a server with those stats would gain per second.
|
||||
|
||||
You must have Source-File 5-1 and Source-File 9-1 in order to use this function.
|
||||
|
||||
This function calculates the hash rate of a server with the given stats.
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
server = hacknet.getNodeStats(1);
|
||||
currentRate = formulas.hacknetNodes.hashGainRate(server.level, server.ram, server.cores);
|
||||
levelRate = formulas.hacknetNodes.hashGainRate(server.level+1, server.ram, server.cores);
|
||||
ramRate = formulas.hacknetNodes.hashGainRate(server.level, server.ram*2, server.cores);
|
||||
coresRate = formulas.hacknetNodes.hashGainRate(server.level, server.ram, server.cores+1);
|
||||
@@ -0,0 +1,19 @@
|
||||
hashUpgradeCost() Netscript Function
|
||||
=============================================
|
||||
|
||||
.. js:function:: hashUpgradeCost(upgName, level)
|
||||
|
||||
:RAM cost: 0 GB
|
||||
:param string upgName: Name of the Hash upgrade.
|
||||
:param number level: Level of the upgrade.
|
||||
:returns: Amount of Hash.
|
||||
|
||||
You must have Source-File 5-1 and Source-File 9-1 in order to use this function.
|
||||
|
||||
This function calculates amount of Hash require to buy level ``level`` of upgrade ``upgName``.
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
formulas.hacknetServers.hashUpgradeCost("Increase Maximum Money", 5); // returns: 250
|
||||
@@ -0,0 +1,20 @@
|
||||
levelUpgradeCost() Netscript Function
|
||||
=============================================
|
||||
|
||||
.. js:function:: levelUpgradeCost(startingLevel[, extraLevels[, costMult]])
|
||||
|
||||
:RAM cost: 0 GB
|
||||
:param number startingLevel: Number of level at the start the calculation.
|
||||
:param number extraLevels: Extra number of levels you want to buy. Default to ``1``.
|
||||
:param number costMult: Aug multiplier that reduces cost. Defaults to ``1``.
|
||||
:returns: Money required to go from ``startingLevel`` to ``startingLevel+extraLevels``.
|
||||
|
||||
You must have Source-File 5-1 and Source-File 9-1 in order to use this function.
|
||||
|
||||
This function calculates the cost of upgrading levels from any level to any level.
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
formulas.hacknetServers.levelUpgradeCost(1, 5); // returns: 2792000
|
||||
@@ -0,0 +1,22 @@
|
||||
ramUpgradeCost() Netscript Function
|
||||
=============================================
|
||||
|
||||
.. js:function:: ramUpgradeCost(startingRam[, extraRamLevels[, costMult]])
|
||||
|
||||
:RAM cost: 0 GB
|
||||
:param number startingRam: Amount of RAM at the start the calculation.
|
||||
:param number extraRamLevels: Extra number of levels you want to buy. Default to ``1``.
|
||||
:param number costMult: Aug multiplier that reduces cost. Defaults to ``1``.
|
||||
:returns: Money required to go from ``startingRam`` to ``startingRam+extraRamLevels``.
|
||||
|
||||
..note:: ``startingRam`` is the actual amount of ram, not the amount of levels of ram.
|
||||
|
||||
You must have Source-File 5-1 and Source-File 9-1 in order to use this function.
|
||||
|
||||
This function calculates the cost of upgrading levels from any level to any level.
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
formulas.hacknetServers.ramUpgradeCost(1, 5); // returns: 15810000
|
||||
Reference in New Issue
Block a user