2019-03-25 04:03:24 +01:00
/ * *
* Generic Game Constants
*
* Constants for specific mechanics or features will NOT be here .
* /
2019-04-11 10:37:40 +02:00
import { IMap } from "./types" ;
2018-11-16 02:28:23 +01:00
export let CONSTANTS : IMap < any > = {
2019-04-13 01:52:59 +02:00
Version : "0.46.1" ,
2017-07-25 04:51:03 +02:00
2019-04-13 03:22:46 +02:00
/ * * M a x l e v e l f o r a n y s k i l l , a s s u m i n g n o m u l t i p l i e r s . D e t e r m i n e d b y m a x n u m e r i c a l v a l u e i n j a v a s c r i p t f o r e x p e r i e n c e
* and the skill level formula in Player . js . Note that all this means it that when experience hits MAX_INT , then
* the player will have this level assuming no multipliers . Multipliers can cause skills to go above this .
* /
2017-03-31 23:47:06 +02:00
MaxSkillLevel : 975 ,
2017-07-25 04:51:03 +02:00
2019-04-13 03:22:46 +02:00
// Milliseconds per game cycle
2018-09-05 22:36:18 +02:00
MilliPerCycle : 200 ,
2019-04-13 03:22:46 +02:00
// How much reputation is needed to join a megacorporation's faction
2018-07-28 02:00:57 +02:00
CorpFactionRepRequirement : 200e3 ,
2017-07-25 04:51:03 +02:00
2019-04-13 03:22:46 +02:00
// Base RAM costs
2018-01-27 07:52:39 +01:00
BaseCostFor1GBOfRamHome : 32000 ,
BaseCostFor1GBOfRamServer : 55000 , //1 GB of RAM
2017-07-25 04:51:03 +02:00
2019-04-13 03:22:46 +02:00
// Cost to travel to another city
2019-01-22 05:39:52 +01:00
TravelCost : 200e3 ,
2018-06-04 03:09:12 +02:00
2019-04-13 03:22:46 +02:00
// Faction and Company favor-related things
BaseFavorToDonate : 150 ,
DonateMoneyToRepDivisor : 1e6 ,
2017-08-13 07:01:33 +02:00
FactionReputationToFavorBase : 500 ,
2017-08-03 06:21:15 +02:00
FactionReputationToFavorMult : 1.02 ,
2017-08-13 07:01:33 +02:00
CompanyReputationToFavorBase : 500 ,
2017-08-03 06:21:15 +02:00
CompanyReputationToFavorMult : 1.02 ,
2019-04-13 03:22:46 +02:00
// NeuroFlux Governor Augmentation cost multiplier
2017-07-13 18:54:29 +02:00
NeuroFluxGovernorLevelMult : 1.14 ,
2017-07-25 04:51:03 +02:00
2019-04-13 03:22:46 +02:00
// RAM Costs for Netscript functions
ScriptBaseRamCost : 1.6 ,
ScriptDomRamCost : 25 ,
ScriptWhileRamCost : 0 ,
ScriptForRamCost : 0 ,
ScriptIfRamCost : 0 ,
ScriptHackRamCost : 0.1 ,
ScriptHackAnalyzeRamCost : 1 ,
ScriptGrowRamCost : 0.15 ,
ScriptGrowthAnalyzeRamCost : 1 ,
ScriptWeakenRamCost : 0.15 ,
ScriptScanRamCost : 0.2 ,
ScriptPortProgramRamCost : 0.05 ,
ScriptRunRamCost : 1.0 ,
ScriptExecRamCost : 1.3 ,
ScriptSpawnRamCost : 2.0 ,
ScriptScpRamCost : 0.6 ,
ScriptKillRamCost : 0.5 ,
ScriptHasRootAccessRamCost : 0.05 ,
ScriptGetHostnameRamCost : 0.05 ,
ScriptGetHackingLevelRamCost : 0.05 ,
ScriptGetMultipliersRamCost : 4.0 ,
ScriptGetServerRamCost : 0.1 ,
ScriptFileExistsRamCost : 0.1 ,
ScriptIsRunningRamCost : 0.1 ,
ScriptHacknetNodesRamCost : 4.0 ,
ScriptHNUpgLevelRamCost : 0.4 ,
ScriptHNUpgRamRamCost : 0.6 ,
ScriptHNUpgCoreRamCost : 0.8 ,
ScriptGetStockRamCost : 2.0 ,
ScriptBuySellStockRamCost : 2.5 ,
2018-06-20 18:43:05 +02:00
ScriptGetPurchaseServerRamCost : 0.25 ,
2019-04-13 03:22:46 +02:00
ScriptPurchaseServerRamCost : 2.25 ,
ScriptGetPurchasedServerLimit : 0.05 ,
2018-07-20 04:21:11 +02:00
ScriptGetPurchasedServerMaxRam : 0.05 ,
2019-04-13 03:22:46 +02:00
ScriptRoundRamCost : 0.05 ,
ScriptReadWriteRamCost : 1.0 ,
ScriptArbScriptRamCost : 1.0 ,
ScriptGetScriptRamCost : 0.1 ,
ScriptGetHackTimeRamCost : 0.05 ,
ScriptGetFavorToDonate : 0.10 ,
ScriptCodingContractBaseRamCost : 10 ,
ScriptSleeveBaseRamCost : 4 ,
2017-08-30 19:44:29 +02:00
2019-04-13 03:22:46 +02:00
ScriptSingularityFn1RamCost : 1 ,
ScriptSingularityFn2RamCost : 2 ,
ScriptSingularityFn3RamCost : 3 ,
2017-07-25 04:51:03 +02:00
2019-04-13 03:22:46 +02:00
ScriptSingularityFnRamMult : 2 , // Multiplier for RAM cost outside of BN-4
2018-10-23 20:55:42 +02:00
2019-04-13 03:22:46 +02:00
ScriptGangApiBaseRamCost : 4 ,
2018-10-23 20:55:42 +02:00
2019-04-13 03:22:46 +02:00
ScriptBladeburnerApiBaseRamCost : 4 ,
2018-06-08 17:51:48 +02:00
2019-04-13 03:22:46 +02:00
NumNetscriptPorts : 20 ,
2018-03-03 22:05:33 +01:00
2019-04-13 03:22:46 +02:00
// Server-related constants
2019-01-09 11:43:59 +01:00
HomeComputerMaxRam : 1073741824 , // 2 ^ 30
ServerBaseGrowthRate : 1.03 , // Unadjusted Growth rate
ServerMaxGrowthRate : 1.0035 , // Maximum possible growth rate (max rate accounting for server security)
ServerFortifyAmount : 0.002 , // Amount by which server's security increases when its hacked/grown
ServerWeakenAmount : 0.05 , // Amount by which server's security decreases when weakened
2017-07-25 04:51:03 +02:00
2017-07-27 04:56:14 +02:00
PurchasedServerLimit : 25 ,
2019-04-13 03:22:46 +02:00
PurchasedServerMaxRam : 1048576 , // 2^20
2017-07-27 04:56:14 +02:00
2019-04-13 03:22:46 +02:00
// Augmentation Constants
AugmentationCostMultiplier : 5 , // Used for balancing costs without having to readjust every Augmentation cost
AugmentationRepMultiplier : 2.5 , // Used for balancing rep cost without having to readjust every value
MultipleAugMultiplier : 1.9 ,
2017-07-25 04:51:03 +02:00
2019-04-13 03:22:46 +02:00
// TOR Router
TorRouterCost : 200e3 ,
2017-07-25 04:51:03 +02:00
2019-04-13 03:22:46 +02:00
// Infiltration
2018-06-25 04:50:03 +02:00
InfiltrationBribeBaseAmount : 100e3 , //Amount per clearance level
2019-04-13 03:22:46 +02:00
InfiltrationMoneyValue : 5e3 , //Convert "secret" value to money
2017-10-12 04:00:22 +02:00
InfiltrationRepValue : 1.4 , //Convert "secret" value to faction reputation
2019-03-27 09:36:14 +01:00
InfiltrationExpPow : 0.8 ,
2017-07-25 04:51:03 +02:00
2019-04-13 03:22:46 +02:00
// Stock market
WSEAccountCost : 200e6 ,
TIXAPICost : 5e9 ,
MarketData4SCost : 1e9 ,
2019-01-22 05:39:52 +01:00
MarketDataTixApi4SCost : 25e9 ,
2019-04-13 03:22:46 +02:00
StockMarketCommission : 100e3 ,
2017-07-25 04:51:03 +02:00
2019-04-13 03:22:46 +02:00
// Hospital/Health
2017-11-09 02:55:21 +01:00
HospitalCostPerHp : 100e3 ,
2017-07-25 04:51:03 +02:00
2019-04-13 03:22:46 +02:00
// Intelligence-related constants
IntelligenceCrimeWeight : 0.05 , // Weight for how much int affects crime success rates
IntelligenceInfiltrationWeight : 0.1 , // Weight for how much int affects infiltration success rates
2017-10-02 04:35:22 +02:00
IntelligenceCrimeBaseExpGain : 0.001 ,
2019-04-13 03:22:46 +02:00
IntelligenceProgramBaseExpGain : 500 , // Program required hack level divided by this to determine int exp gain
IntelligenceTerminalHackBaseExpGain : 200 , // Hacking exp divided by this to determine int exp gain
2017-10-15 03:55:41 +02:00
IntelligenceSingFnBaseExpGain : 0.002 ,
2017-10-10 06:56:48 +02:00
IntelligenceClassBaseExpGain : 0.000001 ,
2019-04-13 03:22:46 +02:00
IntelligenceHackingMissionBaseExpGain : 0.03 , // Hacking Mission difficulty multiplied by this to get exp gain
// Hacking Missions
// TODO Move this into Hacking Mission implementation
HackingMissionRepToDiffConversion : 10000 , // Faction rep is divided by this to get mission difficulty
HackingMissionRepToRewardConversion : 7 , // Faction rep divided byt his to get mission rep reward
HackingMissionSpamTimeIncrease : 25000 , // How much time limit increase is gained when conquering a Spam Node (ms)
HackingMissionTransferAttackIncrease : 1.05 , // Multiplier by which the attack for all Core Nodes is increased when conquering a Transfer Node
HackingMissionMiscDefenseIncrease : 1.05 , // The amount by which every misc node's defense is multiplied when one is conquered
HackingMissionDifficultyToHacking : 135 , // Difficulty is multiplied by this to determine enemy's "hacking" level (to determine effects of scan/attack, etc)
2017-09-26 04:44:33 +02:00
HackingMissionHowToPlay : "Hacking missions are a minigame that, if won, will reward you with faction reputation.<br><br>" +
"In this game you control a set of Nodes and use them to try and defeat an enemy. Your Nodes " +
2017-09-27 17:13:42 +02:00
"are colored blue, while the enemy's are red. There are also other nodes on the map colored gray " +
2017-09-26 04:44:33 +02:00
"that initially belong to neither you nor the enemy. The goal of the game is " +
2017-12-07 04:45:47 +01:00
"to capture all of the enemy's Database nodes within the time limit. " +
"If you fail to do this, you will lose.<br><br>" +
2017-09-26 04:44:33 +02:00
"Each Node has three stats: Attack, Defense, and HP. There are five different actions that " +
"a Node can take:<br><br> " +
2017-09-27 17:13:42 +02:00
"Attack - Targets an enemy Node and lowers its HP. The effectiveness is determined by the owner's Attack, the Player's " +
2017-12-07 04:45:47 +01:00
"hacking level, and the enemy's defense.<br><br>" +
2017-09-27 17:13:42 +02:00
"Scan - Targets an enemy Node and lowers its Defense. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the " +
2017-12-07 04:45:47 +01:00
"enemy's defense.<br><br>" +
2017-09-27 17:13:42 +02:00
"Weaken - Targets an enemy Node and lowers its Attack. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's " +
2017-12-07 04:45:47 +01:00
"defense.<br><br>" +
"Fortify - Raises the Node's Defense. The effectiveness is determined by your hacking level.<br><br>" +
2017-09-27 17:13:42 +02:00
"Overflow - Raises the Node's Attack but lowers its Defense. The effectiveness is determined by your hacking level.<br><br>" +
"Note that when determining the effectiveness of the above actions, the TOTAL Attack or Defense of the team is used, not just the " +
2017-10-15 03:55:41 +02:00
"Attack/Defense of the individual Node that is performing the action.<br><br>" +
2017-09-27 17:13:42 +02:00
"To capture a Node, you must lower its HP down to 0.<br><br>" +
2017-09-26 04:44:33 +02:00
"There are six different types of Nodes:<br><br>" +
2017-12-07 04:45:47 +01:00
"CPU Core - These are your main Nodes that are used to perform actions. Capable of performing every action<br><br>" +
"Firewall - Nodes with high defense. These Nodes can 'Fortify'<br><br>" +
2017-09-26 04:44:33 +02:00
"Database - A special type of Node. The player's objective is to conquer all of the enemy's Database Nodes within " +
2017-12-07 04:45:47 +01:00
"the time limit. These Nodes cannot perform any actions<br><br>" +
2017-09-26 04:44:33 +02:00
"Spam - Conquering one of these Nodes will slow the enemy's trace, giving the player additional time to complete " +
2017-12-07 04:45:47 +01:00
"the mission. These Nodes cannot perform any actions<br><br>" +
2017-09-26 04:44:33 +02:00
"Transfer - Conquering one of these nodes will increase the Attack of all of your CPU Cores by a small fixed percentage. " +
2017-12-07 04:45:47 +01:00
"These Nodes are capable of performing every action except the 'Attack' action<br><br>" +
"Shield - Nodes with high defense. These Nodes can 'Fortify'<br><br>" +
"To assign an action to a Node, you must first select one of your Nodes. This can be done by simply clicking on it. Double-clicking " +
"a node will select all of your Nodes of the same type (e.g. select all CPU Core Nodes or all Transfer Nodes). Note that only Nodes " +
"that can perform actions (CPU Core, Transfer, Shield, Firewall) can be selected. Selected Nodes will be denoted with a white highlight. After selecting a Node or multiple Nodes, " +
2017-09-27 17:13:42 +02:00
"select its action using the Action Buttons near the top of the screen. Every action also has a corresponding keyboard " +
2017-10-15 03:55:41 +02:00
"shortcut.<br><br>" +
2017-09-26 04:44:33 +02:00
"For certain actions such as attacking, scanning, and weakening, the Node performing the action must have a target. To target " +
2017-10-02 04:35:22 +02:00
"another node, simply click-and-drag from the 'source' Node to a target. A Node can only have one target, and you can target " +
"any Node that is adjacent to one of your Nodes (immediately above, below, or to the side. NOT diagonal). Furthermore, only CPU Cores and Transfer Nodes " +
2017-12-07 04:45:47 +01:00
"can target, since they are the only ones that can perform the related actions. To remove a target, you can simply click on the line that represents " +
2017-09-27 17:13:42 +02:00
"the connection between one of your Nodes and its target. Alternatively, you can select the 'source' Node and click the 'Drop Connection' button, " +
2017-10-02 05:27:42 +02:00
"or press 'd'.<br><br>" +
"Other Notes:<br><br>" +
2017-10-10 06:56:48 +02:00
"-Whenever a miscellenaous Node (not owned by the player or enemy) is conquered, the defense of all remaining miscellaneous Nodes that " +
"are not actively being targeted will increase by a fixed percentage.<br><br>" +
"-Whenever a Node is conquered, its stats are significantly reduced<br><br>" +
"-Miscellaneous Nodes slowly raise their defense over time<br><br>" +
2017-10-15 03:55:41 +02:00
"-Nodes slowly regenerate health over time." ,
2017-09-26 04:44:33 +02:00
2019-04-13 03:22:46 +02:00
// Time-related constants
2017-04-18 06:32:17 +02:00
MillisecondsPer20Hours : 72000000 ,
GameCyclesPer20Hours : 72000000 / 200 ,
2017-07-25 04:51:03 +02:00
2017-04-19 07:02:40 +02:00
MillisecondsPer10Hours : 36000000 ,
GameCyclesPer10Hours : 36000000 / 200 ,
2017-07-25 04:51:03 +02:00
2017-04-18 06:32:17 +02:00
MillisecondsPer8Hours : 28800000 ,
GameCyclesPer8Hours : 28800000 / 200 ,
2017-07-25 04:51:03 +02:00
2017-04-19 23:39:25 +02:00
MillisecondsPer4Hours : 14400000 ,
GameCyclesPer4Hours : 14400000 / 200 ,
2017-07-25 04:51:03 +02:00
2017-05-04 07:27:22 +02:00
MillisecondsPer2Hours : 7200000 ,
GameCyclesPer2Hours : 7200000 / 200 ,
2017-07-25 04:51:03 +02:00
2017-04-18 06:32:17 +02:00
MillisecondsPerHour : 3600000 ,
GameCyclesPerHour : 3600000 / 200 ,
2017-07-25 04:51:03 +02:00
2017-04-24 03:43:41 +02:00
MillisecondsPerHalfHour : 1800000 ,
GameCyclesPerHalfHour : 1800000 / 200 ,
2017-07-25 04:51:03 +02:00
2017-05-04 07:27:22 +02:00
MillisecondsPerQuarterHour : 900000 ,
GameCyclesPerQuarterHour : 900000 / 200 ,
2017-07-25 04:51:03 +02:00
2017-05-24 17:32:45 +02:00
MillisecondsPerFiveMinutes : 300000 ,
GameCyclesPerFiveMinutes : 300000 / 200 ,
2017-07-25 04:51:03 +02:00
2019-04-13 03:22:46 +02:00
// Player Work & Action
2017-04-20 10:29:07 +02:00
FactionWorkHacking : "Faction Hacking Work" ,
FactionWorkField : "Faction Field Work" ,
FactionWorkSecurity : "Faction Security Work" ,
2017-07-25 04:51:03 +02:00
2017-04-24 21:10:35 +02:00
WorkTypeCompany : "Working for Company" ,
2017-05-10 19:42:46 +02:00
WorkTypeCompanyPartTime : "Working for Company part-time" ,
2017-04-24 21:10:35 +02:00
WorkTypeFaction : "Working for Faction" ,
WorkTypeCreateProgram : "Working on Create a Program" ,
WorkTypeStudyClass : "Studying or Taking a class at university" ,
2017-05-03 19:52:54 +02:00
WorkTypeCrime : "Committing a crime" ,
2017-07-25 04:51:03 +02:00
2017-04-24 21:10:35 +02:00
ClassStudyComputerScience : "studying Computer Science" ,
ClassDataStructures : "taking a Data Structures course" ,
ClassNetworks : "taking a Networks course" ,
ClassAlgorithms : "taking an Algorithms course" ,
2017-04-25 21:14:01 +02:00
ClassManagement : "taking a Management course" ,
ClassLeadership : "taking a Leadership course" ,
2017-05-10 19:42:46 +02:00
ClassGymStrength : "training your strength at a gym" ,
ClassGymDefense : "training your defense at a gym" ,
ClassGymDexterity : "training your dexterity at a gym" ,
ClassGymAgility : "training your agility at a gym" ,
2017-07-25 04:51:03 +02:00
2017-08-01 21:03:45 +02:00
ClassDataStructuresBaseCost : 40 ,
ClassNetworksBaseCost : 80 ,
ClassAlgorithmsBaseCost : 320 ,
ClassManagementBaseCost : 160 ,
ClassLeadershipBaseCost : 320 ,
2017-07-05 18:49:01 +02:00
ClassGymBaseCost : 120 ,
2017-07-25 04:51:03 +02:00
2017-05-03 19:52:54 +02:00
CrimeShoplift : "shoplift" ,
2017-08-01 21:03:45 +02:00
CrimeRobStore : "rob a store" ,
2017-05-03 19:52:54 +02:00
CrimeMug : "mug someone" ,
2017-08-01 21:03:45 +02:00
CrimeLarceny : "commit larceny" ,
2017-05-03 19:52:54 +02:00
CrimeDrugs : "deal drugs" ,
2017-10-12 04:00:22 +02:00
CrimeBondForgery : "forge corporate bonds" ,
2017-05-03 19:52:54 +02:00
CrimeTraffickArms : "traffick illegal arms" ,
CrimeHomicide : "commit homicide" ,
2017-05-08 18:00:34 +02:00
CrimeGrandTheftAuto : "commit grand theft auto" ,
2017-05-03 19:52:54 +02:00
CrimeKidnap : "kidnap someone for ransom" ,
2017-05-08 18:00:34 +02:00
CrimeAssassination : "assassinate a high-profile target" ,
CrimeHeist : "pull off the ultimate heist" ,
2017-07-25 04:51:03 +02:00
2019-04-13 03:22:46 +02:00
// Coding Contract
// TODO Move this into Coding contract impelmentation?
CodingContractBaseFactionRepGain : 2500 ,
CodingContractBaseCompanyRepGain : 4000 ,
CodingContractBaseMoneyGain : 75e6 ,
2018-09-14 23:03:31 +02:00
2019-01-17 20:10:35 +01:00
// BitNode/Source-File related stuff
TotalNumBitNodes : 24 ,
2017-07-25 04:51:03 +02:00
LatestUpdate :
2018-09-14 23:03:31 +02:00
`
2019-04-13 09:26:49 +02:00
v0 . 46.2
* Gang changes :
* * Bug Fix : Gangs can no longer clash with themselve
* * Bug Fix : Winning against another gang should properly reduce their power
2019-04-13 09:33:30 +02:00
* Bug Fix : Terminal 'wget' command now works properly
2019-01-09 11:43:59 +01:00
`
2017-06-12 17:32:50 +02:00
}