forked from bitburner-official/bitburner-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NetscriptDefinitions.d.ts
9079 lines (8515 loc) · 294 KB
/
NetscriptDefinitions.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/** All netscript definitions */
/** @public */
interface HP {
current: number;
max: number;
}
/** @public */
interface Skills {
hacking: number;
strength: number;
defense: number;
dexterity: number;
agility: number;
charisma: number;
intelligence: number;
}
// TODO: provide same treatment to CodingContractData as for SleeveTask (actual types)
/**
* Coding contract data will differ depending on coding contract.
* @public
*/
type CodingContractData = any;
/** @public */
type ScriptArg = string | number | boolean;
/** @public */
type FilenameOrPID = number | string;
/** @public */
interface Person {
hp: HP;
skills: Skills;
exp: Skills;
mults: Multipliers;
city: CityName;
}
/** @public */
interface Player extends Person {
money: number;
numPeopleKilled: number;
entropy: number;
jobs: Partial<Record<CompanyName, JobName>>;
factions: string[];
totalPlaytime: number;
location: LocationName;
karma: number;
}
/** @public */
interface SleevePerson extends Person {
/** Number 0-100 Experience earned and shared is multiplied with shock% before sync% */
shock: number;
/** Number 1-100 Experience earned by this sleeve and shared with the player is multiplied with sync% after shock% */
sync: number;
/** Number 1-100 initial Value of sync on BN start */
memory: number;
/** Number of 200ms cycles which are stored as bonus time */
storedCycles: number;
}
/** Various info about resets
* @public */
interface ResetInfo {
/** Numeric timestamp (from Date.now()) of last augmentation reset */
lastAugReset: number;
/** Numeric timestamp (from Date.now()) of last bitnode reset */
lastNodeReset: number;
/** The current bitnode */
currentNode: number;
/** A map of owned augmentations to their levels. Keyed by the augmentation name. Map values are the augmentation level (e.g. for NeuroFlux governor). */
ownedAugs: Map<string, number>;
/** A map of owned SF to their levels. Keyed by the SF number. Map values are the SF level. */
ownedSF: Map<number, number>;
}
/** @public */
interface MoneySource {
bladeburner: number;
casino: number;
class: number;
codingcontract: number;
corporation: number;
crime: number;
gang: number;
gang_expenses: number;
hacking: number;
hacknet: number;
hacknet_expenses: number;
hospitalization: number;
infiltration: number;
sleeves: number;
stock: number;
total: number;
work: number;
servers: number;
other: number;
augmentations: number;
}
/** @public */
interface MoneySources {
sinceInstall: MoneySource;
sinceStart: MoneySource;
}
/** @public */
interface Multipliers {
/** Multiplier to hacking skill */
hacking: number;
/** Multiplier to strength skill */
strength: number;
/** Multiplier to defense skill */
defense: number;
/** Multiplier to dexterity skill */
dexterity: number;
/** Multiplier to agility skill */
agility: number;
/** Multiplier to charisma skill */
charisma: number;
/** Multiplier to hacking experience gain rate */
hacking_exp: number;
/** Multiplier to strength experience gain rate */
strength_exp: number;
/** Multiplier to defense experience gain rate */
defense_exp: number;
/** Multiplier to dexterity experience gain rate */
dexterity_exp: number;
/** Multiplier to agility experience gain rate */
agility_exp: number;
/** Multiplier to charisma experience gain rate */
charisma_exp: number;
/** Multiplier to chance of successfully performing a hack */
hacking_chance: number;
/** Multiplier to hacking speed */
hacking_speed: number;
/** Multiplier to amount of money the player gains from hacking */
hacking_money: number;
/** Multiplier to amount of money injected into servers using grow */
hacking_grow: number;
/** Multiplier to amount of reputation gained when working */
company_rep: number;
/** Multiplier to amount of reputation gained when working */
faction_rep: number;
/** Multiplier to amount of money gained from crimes */
crime_money: number;
/** Multiplier to crime success rate */
crime_success: number;
/** Multiplier to amount of money gained from working */
work_money: number;
/** Multiplier to amount of money produced by Hacknet Nodes */
hacknet_node_money: number;
/** Multiplier to cost of purchasing a Hacknet Node */
hacknet_node_purchase_cost: number;
/** Multiplier to cost of ram for a Hacknet Node */
hacknet_node_ram_cost: number;
/** Multiplier to cost of core for a Hacknet Node */
hacknet_node_core_cost: number;
/** Multiplier to cost of leveling up a Hacknet Node */
hacknet_node_level_cost: number;
/** Multiplier to Bladeburner max stamina */
bladeburner_max_stamina: number;
/** Multiplier to Bladeburner stamina gain rate */
bladeburner_stamina_gain: number;
/** Multiplier to effectiveness in Bladeburner Field Analysis */
bladeburner_analysis: number;
/** Multiplier to success chance in Bladeburner contracts/operations */
bladeburner_success_chance: number;
}
/** @public */
interface TailProperties {
/** X-coordinate of the log window */
x: number;
/** Y-coordinate of the log window */
y: number;
/** Width of the log window content area */
width: number;
/** Height of the log window content area */
height: number;
}
/**
* @public
* A stand-in for the real React.ReactNode.
* A {@link ReactElement} is rendered dynamically with React.
* number and string are displayed directly.
* boolean, null, and undefined are ignored and not rendered.
* An array of ReactNodes will display all members of that array sequentially.
*
* Use React.createElement to make the ReactElement type, see {@link https://react.dev/reference/react/createElement#creating-an-element-without-jsx | creating an element without jsx} from the official React documentation.
*/
type ReactNode = ReactElement | string | number | null | undefined | boolean | ReactNode[];
/**
* @public
* A stand-in for the real React.ReactElement.
* Use React.createElement to make these.
* See {@link https://react.dev/reference/react/createElement#creating-an-element-without-jsx | creating an element without jsx} from the official React documentation.
*/
interface ReactElement {
type: string | ((props: any) => ReactElement | null) | (new (props: any) => object);
props: any;
key: string | number | null;
}
/** @public */
interface RunningScript {
/** Arguments the script was called with */
args: ScriptArg[];
/**
* The dynamic RAM usage of (one thread of) this script instance.
* Does not affect overall RAM consumption (ramUsage is for that), but
* rather shows how much of the reserved RAM is currently in use via all the
* ns functions the script has called. Initially 1.6GB, this increases as
* new functions are called.
*
* Only set for scripts that are still running.
*/
dynamicRamUsage: number | undefined;
/** Filename of the script */
filename: string;
/**
* Script logs as an array. The newest log entries are at the bottom.
* Timestamps, if enabled, are placed inside `[brackets]` at the start of each line.
**/
logs: string[];
/** Total amount of hacking experience earned from this script when offline */
offlineExpGained: number;
/** Total amount of money made by this script when offline */
offlineMoneyMade: number;
/** Number of seconds that the script has been running offline */
offlineRunningTime: number;
/** Total amount of hacking experience earned from this script when online */
onlineExpGained: number;
/** Total amount of money made by this script when online */
onlineMoneyMade: number;
/** Number of seconds that this script has been running online */
onlineRunningTime: number;
/** Process ID. Must be an integer */
pid: number;
/**
* How much RAM this script uses for ONE thread.
* Also known as "static RAM usage," this value does not change once the
* script is started, unless you call ns.ramOverride().
*/
ramUsage: number;
/** Hostname of the server on which this script runs */
server: string;
/** Properties of the tail window, or null if it is not shown */
tailProperties: TailProperties | null;
/**
* The title, as shown in the script's log box. Defaults to the name + args,
* but can be changed by the user. If it is set to a React element (only by
* the user), that will not be persisted, and will be restored to default on
* load.
*/
title: string | ReactElement;
/** Number of threads that this script runs with */
threads: number;
/** Whether this RunningScript is excluded from saves */
temporary: boolean;
}
/** @public */
interface RunOptions {
/** Number of threads that the script will run with, defaults to 1 */
threads?: number;
/** Whether this script is excluded from saves, defaults to false */
temporary?: boolean;
/**
* The RAM allocation to launch each thread of the script with.
*
* Lowering this will <i>not</i> automatically let you get away with using less RAM:
* the dynamic RAM check enforces that all {@link NS} functions actually called incur their cost.
* However, if you know that certain functions that are statically present (and thus included
* in the static RAM cost) will never be called in a particular circumstance, you can use
* this to avoid paying for them.
*
* You can also use this to <i>increase</i> the RAM if the static RAM checker has missed functions
* that you need to call.
*
* Must be greater-or-equal to the base RAM cost. Will be rounded to the nearest hundredth-of-a-GB,
* which is the granularity of all RAM calculations. Defaults to the statically calculated cost.
*/
ramOverride?: number;
/**
* Should we fail to run if another instance is running with the exact same arguments?
* This used to be the default behavior, now defaults to false.
*/
preventDuplicates?: boolean;
}
/** @public */
interface SpawnOptions extends RunOptions {
/**
* Number of milliseconds to delay before spawning script, defaults to 10000 (10s).
* Must be a non-negative integer. If 0, the script will be spawned synchronously.
*/
spawnDelay?: number;
}
/** @public */
interface RecentScript extends RunningScript {
/** Timestamp of when the script was killed */
timeOfDeath: Date;
}
/**
* Data representing the internal values of a crime.
* @public
*/
interface CrimeStats {
/** Number representing the difficulty of the crime. Used for success chance calculations */
difficulty: number;
/** Amount of karma lost for successfully committing this crime */
karma: number;
/** How many people die as a result of this crime */
kills: number;
/** How much money is given */
money: number;
/** Milliseconds it takes to attempt the crime */
time: number;
/** Description of the crime activity */
type: string;
/** hacking level impact on success change of the crime */
hacking_success_weight: number;
/** strength level impact on success change of the crime */
strength_success_weight: number;
/** defense level impact on success change of the crime */
defense_success_weight: number;
/** dexterity level impact on success change of the crime */
dexterity_success_weight: number;
/** agility level impact on success change of the crime */
agility_success_weight: number;
/** charisma level impact on success change of the crime */
charisma_success_weight: number;
/** hacking exp gained from crime */
hacking_exp: number;
/** strength exp gained from crime */
strength_exp: number;
/** defense exp gained from crime */
defense_exp: number;
/** dexterity exp gained from crime */
dexterity_exp: number;
/** agility exp gained from crime */
agility_exp: number;
/** charisma exp gained from crime */
charisma_exp: number;
/** intelligence exp gained from crime */
intelligence_exp: number;
}
/**
* Options to affect the behavior of {@link NS.hack | hack}, {@link NS.grow | grow}, and {@link NS.weaken | weaken}.
* @public
*/
interface BasicHGWOptions {
/** Number of threads to use for this function.
* Must be less than or equal to the number of threads the script is running with.
* Accepts positive non integer values.
*/
threads?: number;
/** Set to true this action will affect the stock market. */
stock?: boolean;
/** Number of additional milliseconds that will be spent waiting between the start of the function and when it
* completes. */
additionalMsec?: number;
}
/**
* Return value of {@link Sleeve.getSleevePurchasableAugs | getSleevePurchasableAugs}
* @public
*/
interface AugmentPair {
/** augmentation name */
name: string;
/** augmentation cost */
cost: number;
}
/** @public */
declare enum PositionType {
Long = "L",
Short = "S",
}
/** @public */
declare enum OrderType {
LimitBuy = "Limit Buy Order",
LimitSell = "Limit Sell Order",
StopBuy = "Stop Buy Order",
StopSell = "Stop Sell Order",
}
/**
* Value in map of {@link StockOrder}
* @public
*/
interface StockOrderObject {
/** Number of shares */
shares: number;
/** Price per share */
price: number;
/** Order type */
type: OrderType;
/** Order position */
position: PositionType;
}
/**
* Return value of {@link TIX.getOrders | getOrders}
*
* Keys are stock symbols, properties are arrays of {@link StockOrderObject}
* @public
*/
interface StockOrder {
[key: string]: StockOrderObject[];
}
/** Constants used for the stockmarket game mechanic.
* @public */
interface StockMarketConstants {
/** Normal time in ms between stock market updates */
msPerStockUpdate: number;
/** Minimum time in ms between stock market updates if there is stored offline/bonus time */
msPerStockUpdateMin: number;
/** An internal constant used while determining when to flip a stock's forecast */
TicksPerCycle: number;
/** Cost of the WSE account */
WSEAccountCost: number;
/** Cost of the TIX API */
TIXAPICost: number;
/** Cost of the 4S Market Data */
MarketData4SCost: number;
/** Cost of the 4S Market Data TIX API integration */
MarketDataTixApi4SCost: number;
/** Commission fee for transactions */
StockMarketCommission: number;
}
/**
* A single process on a server.
* @public
*/
interface ProcessInfo {
/** Script name. */
filename: string;
/** Number of threads script is running with */
threads: number;
/** Script's arguments */
args: ScriptArg[];
/** Process ID */
pid: number;
/** Whether this process is excluded from saves */
temporary: boolean;
}
/**
* Hack related multipliers.
* @public
*/
interface HackingMultipliers {
/** Player's hacking chance multiplier. */
chance: number;
/** Player's hacking speed multiplier. */
speed: number;
/** Player's hacking money stolen multiplier. */
money: number;
/** Player's hacking growth multiplier */
growth: number;
}
/**
* Hacknet related multipliers.
* @public
*/
interface HacknetMultipliers {
/** Player's hacknet production multiplier */
production: number;
/** Player's hacknet purchase cost multiplier */
purchaseCost: number;
/** Player's hacknet ram cost multiplier */
ramCost: number;
/** Player's hacknet core cost multiplier */
coreCost: number;
/** Player's hacknet level cost multiplier */
levelCost: number;
}
/**
* Hacknet node related constants
* @public
*/
interface HacknetNodeConstants {
/** Amount of money gained per level */
MoneyGainPerLevel: number;
/** Base cost for a new node */
BaseCost: number;
/** Base cost per level */
LevelBaseCost: number;
/** Base cost to increase RAM */
RamBaseCost: number;
/** Base cost to increase cores */
CoreBaseCost: number;
/** Multiplier to purchase new node */
PurchaseNextMult: number;
/** Multiplier to increase node level */
UpgradeLevelMult: number;
/** Multiplier to increase RAM */
UpgradeRamMult: number;
/** Multiplier to increase cores */
UpgradeCoreMult: number;
/** Max node level */
MaxLevel: number;
/** Max amount of RAM in GB */
MaxRam: number;
/** Max number of cores */
MaxCores: number;
}
/**
* Hacknet server related constants
* @public
*/
interface HacknetServerConstants {
/** Number of hashes calculated per level */
HashesPerLevel: number;
/** Base cost for a new server */
BaseCost: number;
/** Base cost to increase RAM */
RamBaseCost: number;
/** Base cost to increase cores */
CoreBaseCost: number;
/** Base cost to upgrade cache */
CacheBaseCost: number;
/** Multiplier to purchase a new server */
PurchaseMult: number;
/** Multiplier to increase server level */
UpgradeLevelMult: number;
/** Multiplier to increase RAM */
UpgradeRamMult: number;
/** Multiplier to increase cores */
UpgradeCoreMult: number;
/** Multiplier to upgrade cache */
UpgradeCacheMult: number;
/** Max number of servers */
MaxServers: number;
/** Max level for a server */
MaxLevel: number;
/** Max amount of RAM in GB */
MaxRam: number;
/** Max number of cores */
MaxCores: number;
/** Max cache size */
MaxCache: number;
}
/**
* A server. Not all servers have all of these properties - optional properties are missing on certain servers.
* @public
*/
export interface Server {
/** Hostname. Must be unique */
hostname: string;
/** IP Address. Must be unique */
ip: string;
/** Whether or not the SSH Port is open */
sshPortOpen: boolean;
/** Whether or not the FTP port is open */
ftpPortOpen: boolean;
/** Whether or not the SMTP Port is open */
smtpPortOpen: boolean;
/** Whether or not the HTTP Port is open */
httpPortOpen: boolean;
/** Whether or not the SQL Port is open */
sqlPortOpen: boolean;
/** Flag indicating whether player has admin/root access to this server */
hasAdminRights: boolean;
/** How many CPU cores this server has. Affects magnitude of grow and weaken ran from this server. */
cpuCores: number;
/** Flag indicating whether player is currently connected to this server */
isConnectedTo: boolean;
/** RAM (GB) used. i.e. unavailable RAM */
ramUsed: number;
/** RAM (GB) available on this server */
maxRam: number;
/** Name of company/faction/etc. that this server belongs to, not applicable to all Servers */
organizationName: string;
/** Flag indicating whether this is a purchased server */
purchasedByPlayer: boolean;
/** Flag indicating whether this server has a backdoor installed by a player */
backdoorInstalled?: boolean;
/** Server's initial server security level at creation. */
baseDifficulty?: number;
/** Server Security Level */
hackDifficulty?: number;
/** Minimum server security level that this server can be weakened to */
minDifficulty?: number;
/** How much money currently resides on the server and can be hacked */
moneyAvailable?: number;
/** Maximum amount of money that this server can hold */
moneyMax?: number;
/** Number of open ports required in order to gain admin/root access */
numOpenPortsRequired?: number;
/** How many ports are currently opened on the server */
openPortCount?: number;
/** Hacking level required to hack this server */
requiredHackingSkill?: number;
/** Growth effectiveness statistic. Higher values produce more growth with ns.grow() */
serverGrowth?: number;
}
/**
* All multipliers affecting the difficulty of the current challenge.
* @public
*/
interface BitNodeMultipliers {
/** Influences how quickly the player's agility level (not exp) scales */
AgilityLevelMultiplier: number;
/** Influences the base cost to purchase an augmentation. */
AugmentationMoneyCost: number;
/** Influences the base rep the player must have with a faction to purchase an augmentation. */
AugmentationRepCost: number;
/** Influences how quickly the player can gain rank within Bladeburner. */
BladeburnerRank: number;
/** Influences the cost of skill levels from Bladeburner. */
BladeburnerSkillCost: number;
/** Influences how quickly the player's charisma level (not exp) scales */
CharismaLevelMultiplier: number;
/** Influences the experience gained for each ability when a player completes a class. */
ClassGymExpGain: number;
/** Influences the amount of money gained from completing Coding Contracts */
CodingContractMoney: number;
/** Influences the experience gained for each ability when the player completes working their job. */
CompanyWorkExpGain: number;
/** Influences how much money the player earns when completing working their job. */
CompanyWorkMoney: number;
/** Influences the amount of divisions a corporation can have at the same time*/
CorporationDivisions: number;
/** Influences the money gain from dividends of corporations created by the player. */
CorporationSoftcap: number;
/** Influences the valuation of corporations created by the player. */
CorporationValuation: number;
/** Influences the base experience gained for each ability when the player commits a crime. */
CrimeExpGain: number;
/** Influences the base money gained when the player commits a crime. */
CrimeMoney: number;
/** Influences how many Augmentations you need in order to get invited to the Daedalus faction */
DaedalusAugsRequirement: number;
/** Influences how quickly the player's defense level (not exp) scales */
DefenseLevelMultiplier: number;
/** Influences how quickly the player's dexterity level (not exp) scales */
DexterityLevelMultiplier: number;
/** Influences how much rep the player gains in each faction simply by being a member. */
FactionPassiveRepGain: number;
/** Influences the experience gained for each ability when the player completes work for a Faction. */
FactionWorkExpGain: number;
/** Influences how much rep the player gains when performing work for a faction. */
FactionWorkRepGain: number;
/** Influences how much it costs to unlock the stock market's 4S Market Data API */
FourSigmaMarketDataApiCost: number;
/** Influences how much it costs to unlock the stock market's 4S Market Data (NOT API) */
FourSigmaMarketDataCost: number;
/** Influences the respect gain and money gain of your gang. */
GangSoftcap: number;
/** Influences the experienced gained when hacking a server. */
HackExpGain: number;
/** Influences how quickly the player's hacking level (not experience) scales */
HackingLevelMultiplier: number;
/** Influences how much money is produced by Hacknet Nodes
* and the hash rate of Hacknet Servers (unlocked in BitNode-9) */
HacknetNodeMoney: number;
/** Influences how much money it costs to upgrade your home computer's RAM */
HomeComputerRamCost: number;
/** Influences how much money is gained when the player infiltrates a company. */
InfiltrationMoney: number;
/** Influences how much rep the player can gain from factions when selling stolen documents and secrets */
InfiltrationRep: number;
/** Influences how much money can be stolen from a server when the player
* performs a hack against it through the Terminal. */
ManualHackMoney: number;
/** Influence how much it costs to purchase a server */
PurchasedServerCost: number;
/** Influences the maximum number of purchased servers you can have */
PurchasedServerLimit: number;
/** Influences the maximum allowed RAM for a purchased server */
PurchasedServerMaxRam: number;
/** Influences cost of any purchased server at or above 128GB */
PurchasedServerSoftcap: number;
/** Influences the minimum favor the player must have with a faction before they can donate to gain rep. */
RepToDonateToFaction: number;
/** Influences how much the money on a server can be reduced when a script performs a hack against it. */
ScriptHackMoney: number;
/** Influences how much of the money stolen by a scripted hack will be added to the player's money. */
ScriptHackMoneyGain: number;
/** Influences the growth percentage per cycle against a server. */
ServerGrowthRate: number;
/** Influences the maximum money that a server can grow to. */
ServerMaxMoney: number;
/** Influences the initial money that a server starts with. */
ServerStartingMoney: number;
/** Influences the initial security level (hackDifficulty) of a server. */
ServerStartingSecurity: number;
/** Influences the weaken amount per invocation against a server. */
ServerWeakenRate: number;
/** Influences how quickly the player's strength level (not exp) scales */
StrengthLevelMultiplier: number;
/** Influences the power of the gift */
StaneksGiftPowerMultiplier: number;
/** Influences the size of the gift */
StaneksGiftExtraSize: number;
/** Influences the hacking skill required to backdoor the world daemon. */
WorldDaemonDifficulty: number;
}
/**
* Object representing all the values related to a hacknet node.
* @public
*/
interface NodeStats {
/** Node's name */
name: string;
/** Node's level */
level: number;
/** Node's RAM (GB) */
ram: number;
/** Node's used RAM (GB) */
ramUsed?: number;
/** Node's number of cores */
cores: number;
/** Cache level. Only applicable for Hacknet Servers */
cache?: number;
/** Hash Capacity provided by this Node. Only applicable for Hacknet Servers */
hashCapacity?: number;
/** Node's production per second */
production: number;
/** Number of seconds since Node has been purchased */
timeOnline: number;
/** Total number of money Node has produced */
totalProduction: number;
}
/** @public */
interface SourceFileLvl {
/** The number of the source file */
n: number;
/** The level of the source file */
lvl: number;
}
/**
* Bladeburner current action.
* @public
*/
interface BladeburnerCurAction {
/** Type of Action */
type: string;
/** Name of Action */
name: string;
}
/**
* Gang general info.
* @public
*/
interface GangGenInfo {
/** Name of faction that the gang belongs to ("Slum Snakes", etc.) */
faction: string;
/** Indicating whether or not it's a hacking gang */
isHacking: boolean;
/** Money earned per game cycle */
moneyGainRate: number;
/** Gang's power for territory warfare */
power: number;
/** Gang's respect */
respect: number;
/** Respect earned per game cycle */
respectGainRate: number;
/** Amount of Respect needed for next gang recruit, if possible */
respectForNextRecruit: number;
/** Amount of territory held */
territory: number;
/** Clash chance */
territoryClashChance: number;
/** Gang's wanted level */
wantedLevel: number;
/** Wanted level gained/lost per game cycle (negative for losses) */
wantedLevelGainRate: number;
/** Indicating if territory clashes are enabled */
territoryWarfareEngaged: boolean;
/** Number indicating the current wanted penalty */
wantedPenalty: number;
}
/** @public */
interface GangOtherInfoObject {
/** Gang power */
power: number;
/** Gang territory, in decimal form */
territory: number;
}
/** @public */
interface GangOtherInfo {
[key: string]: GangOtherInfoObject;
}
/**
* Object representing data representing a gang member task.
* @public
*/
interface GangTaskStats {
/** Task name */
name: string;
/** Task Description */
desc: string;
/** Is a task of a hacking gang */
isHacking: boolean;
/** Is a task of a combat gang */
isCombat: boolean;
/** Base respect earned */
baseRespect: number;
/** Base wanted earned */
baseWanted: number;
/** Base money earned */
baseMoney: number;
/** Hacking skill impact on task scaling */
hackWeight: number;
/** Strength skill impact on task scaling */
strWeight: number;
/** Defense skill impact on task scaling */
defWeight: number;
/** Dexterity skill impact on task scaling */
dexWeight: number;
/** Agility skill impact on task scaling */
agiWeight: number;
/** Charisma skill impact on task scaling */
chaWeight: number;
/** Number representing the difficulty of the task */
difficulty: number;
/** Territory impact on task scaling */
territory: GangTerritory;
}
/**
* Object representing data representing a gang member equipment.
* @public
*/
interface EquipmentStats {
/** Strength multiplier */
str?: number;
/** Defense multiplier */
def?: number;
/** Dexterity multiplier */
dex?: number;
/** Agility multiplier */
agi?: number;
/** Charisma multiplier */
cha?: number;
/** Hacking multiplier */
hack?: number;
}
/** @public */
interface GangTerritory {
/** Money gain impact on task scaling */
money: number;
/** Respect gain impact on task scaling */
respect: number;
/** Wanted gain impact on task scaling */
wanted: number;
}
/** @public */
interface GangMemberInfo {
/** Name of the gang member */
name: string;
/** Currently assigned task */
task: string;
/** Amount of Respect earned by member since they last Ascended */
earnedRespect: number;
/** Hack skill level */
hack: number;
/** Strength skill level */
str: number;
/** Defense skill level */
def: number;
/** Dexterity skill level */
dex: number;
/** Agility skill level */
agi: number;
/** Charisma skill level */
cha: number;
/** Current hack experience */
hack_exp: number;
/** Current strength experience */
str_exp: number;
/** Current defense experience */
def_exp: number;
/** Current dexterity experience */
dex_exp: number;
/** Current agility experience */
agi_exp: number;
/** Current charisma experience */
cha_exp: number;
/** Hack multiplier from equipment */
hack_mult: number;
/** Strength multiplier from equipment */
str_mult: number;
/** Defense multiplier from equipment */
def_mult: number;
/** Dexterity multiplier from equipment */
dex_mult: number;
/** Agility multiplier from equipment */
agi_mult: number;
/** Charisma multiplier from equipment */
cha_mult: number;
/** Hack multiplier from ascensions */
hack_asc_mult: number;
/** Strength multiplier from ascensions */
str_asc_mult: number;
/** Defense multiplier from ascensions */
def_asc_mult: number;
/** Dexterity multiplier from ascensions */
dex_asc_mult: number;
/** Agility multiplier from ascensions */
agi_asc_mult: number;
/** Charisma multiplier from ascensions */
cha_asc_mult: number;
/** Total Hack Ascension points accumulated */
hack_asc_points: number;
/** Total Strength Ascension points accumulated */
str_asc_points: number;
/** Total Defense Ascension points accumulated */
def_asc_points: number;
/** Total Dexterity Ascension points accumulated */
dex_asc_points: number;
/** Total Agility Ascension points accumulated */
agi_asc_points: number;
/** Total Charisma Ascension points accumulated */
cha_asc_points: number;
/** List of all non-Augmentation Equipment owned by gang member */
upgrades: string[];
/** List of all Augmentations currently installed on gang member */
augmentations: string[];
/** Per Cycle Rate this member is currently gaining Respect */
respectGain: number;
/** Per Cycle Rate by which this member is affecting your gang's Wanted Level */
wantedLevelGain: number;
/** Per Cycle Income for this gang member */
moneyGain: number;
}
/** @public */
interface GangMemberInstall {
/** Factor by which the hacking ascension multiplier was decreased (newMult / oldMult) */
hack: number;
/** Factor by which the strength ascension multiplier was decreased (newMult / oldMult) */
str: number;
/** Factor by which the defense ascension multiplier was decreased (newMult / oldMult) */
def: number;
/** Factor by which the dexterity ascension multiplier was decreased (newMult / oldMult) */
dex: number;
/** Factor by which the agility ascension multiplier was decreased (newMult / oldMult) */
agi: number;
/** Factor by which the charisma ascension multiplier was decreased (newMult / oldMult) */
cha: number;
}
/** @public */
interface GangMemberAscension {