-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.js
More file actions
1025 lines (933 loc) · 40.1 KB
/
Copy pathindex.js
File metadata and controls
1025 lines (933 loc) · 40.1 KB
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
//ONLINE WEBSOCKET SERVER SETTINGS
const websocket_endpoint = "wss://relay.aricodes.net/ws";
//LOCAL JSON SERVER SETTINGS
var JSON_ADDRESS = "127.0.0.1";
const JSON_PORT = 7190;
const POLLING_RATE = 333;
var JSON_ENDPOINT = `http://${JSON_ADDRESS}:${JSON_PORT}/`;
// PARAM VARIABLES
var HideRoom = false;
var HideIGT = false;
var HidePosition = false;
var HideMoney = false;
var HideDA = false;
var HideStats = false;
var ShowBossOnly = false;
var ShowOnlyDamaged = false;
var HideEnemies = false;
var IsSeparated = false;
var IsPlayer2 = false;
var IsDebug = false;
window.onload = function () {
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
// HIDE DEBUG INFO
const debug = urlParams.get('debug');
if (debug != null) {
IsDebug = true;
}
// HIDE DEBUG INFO
const position = urlParams.get('hideposition');
if (position != null) {
HidePosition = true;
}
// HIDE IN-GAME TIMER
const igt = urlParams.get('hideigt');
if (igt != null) {
HideIGT = true;
}
const money = urlParams.get('hidemoney');
if (money != null) {
HideMoney = true;
}
// HIDE DA
const da = urlParams.get('hideda');
if (da != null) {
HideDA = true;
}
// HIDE MISC STATS
const stats = urlParams.get('hidestats');
if (stats != null) {
HideStats = true;
}
// SEPARATE PLAYER STATS
const separated = urlParams.get('separated');
if (separated != null) {
IsSeparated = true;
}
// IS PLAYER 2 CHECK
const isPlayer2 = urlParams.get('isplayer2');
if (isPlayer2 != null) {
IsPlayer2 = true;
}
// SHOW BOSS ONLY
const boss = urlParams.get('bossonly');
if (boss != null) {
ShowBossOnly = true;
}
// SHOW BOSS ONLY
const damaged = urlParams.get('damagedonly');
if (damaged != null) {
ShowOnlyDamaged = true;
}
// HIDE ALL ENEMIES
const enemies = urlParams.get('hideenemies');
if (enemies != null) {
HideEnemies = true;
}
//
// CHECK FOR AUTH TOKEN
const token = urlParams.get('token');
if (token != null) {
const socket = new WebSocket(websocket_endpoint);
socket.onopen = () => socket.send(`listen:${token}`);
socket.onmessage = (event) => appendData(JSON.parse(event.data));
}
else {
getData();
setInterval(getData, POLLING_RATE);
}
};
var Asc = function (a, b) {
if (a > b) return +1;
if (a < b) return -1;
return 0;
};
var Desc = function (a, b) {
if (a > b) return -1;
if (a < b) return +1;
return 0;
};
function getData() {
fetch(JSON_ENDPOINT)
.then(function (response) {
return response.json();
})
.then(function (data) {
appendData(data);
})
.catch(function (err) {
console.log("Error: " + err);
});
}
// <summary>
// PROGRESS BAR DRAW FUNCTION
// </summary>
//
// current = current value;
// max = max value;
// percent = current / max as float 0 - 1
// label = string label for progress bar (optional)
// colors = array of color class names as string
// Example
// DrawProgressBar(1000, 1000, 1, "Player: ", ["fine", "green"]);
function DrawProgressBar(current, max, percent, label, colors)
{
let mainContainer = document.getElementById("srtQueryData");
mainContainer.innerHTML += `<div class="bar"><div class="progressbar ${colors[0]}" style="width:${(percent * 100)}%">
<div id="currentprogress">${label}${current} / ${max}</div><div class="${colors[1]}" id="percentprogress">${(percent * 100).toFixed(1)}%</div></div></div>`;
}
// <summary>
// TEXTBLOCK DRAW FUNCTION
// </summary>
//
// label = string label
// val = current value
// colors = array of color class names as string
// hideParam = user choosen query parameter
// Example
// DrawTextBlock("IGT", "00:00:00", ["white", "green2"], HideIGT);
function DrawTextBlock(label, val, colors, hideParam)
{
if (hideParam) { return; }
let mainContainer = document.getElementById("srtQueryData");
mainContainer.innerHTML += `<div class="title ${colors[0]}">${label}: <span class="${colors[1]}">${val}</span></div>`;
}
// <summary>
// FLEXBOXED TEXTBLOCK DRAW FUNCTION
// </summary>
//
// labels = string labels array
// vals = current value array
// colors = array of color class names as string
// hideParam = user choosen query parameter
// Example
// DrawTextBlocks(["DARank", "DAScore"], [9, 9999], ["white", "green2"], HideDA);
function DrawTextBlocks(labels, vals, colors, hideParam)
{
if (hideParam) { return; }
let mainContainer = document.getElementById("srtQueryData");
let children = "";
for (var i = 0; i < labels.length; i++)
{
children += `<div class="title ${colors[0]}">${labels[i]}: <span class="${colors[1]}">${vals[i]}</span></div>`
}
mainContainer.innerHTML += `<div class="textblock">${children}</div>`;
}
// <summary>
// ALIGNED FLEXBOX TEXTBLOCK DRAW FUNCTION
// </summary>
//
// labels = string labels array
// vals = current value array
// colors = array of color class names as string
// alignment = text alignment as string (left, center, right)
// hideParam = user choosen query parameter
// Example
// DrawAlignedTextBlocks(["X", "Y", "Z"], [100.0000, 100.0000, 100.0000], ["white", "green2"], "center", HideDA);
function DrawAlignedTextBlocks(labels, vals, colors, alignment, hideParam)
{
if (hideParam) { return; }
let mainContainer = document.getElementById("srtQueryData");
let children = "";
for (var i = 0; i < labels.length; i++)
{
children += `<div class="title ${colors[0]}">${labels[i]}: <span class="${colors[1]}">${vals[i]}</span></div>`
}
mainContainer.innerHTML += `<div class="textblock-${alignment}">${children}</div>`;
}
// <summary>
// GET HP BAR AND TEXT COLOR ACCORDING TO PLAYER HEALTH STATE
// </summary>
function GetColor(player)
{
if (player.CurrentHealthState == "Gassed") return ["gassed", "pink"];
if (player.CurrentHealthState == "Poisoned") return ["poison", "purple"];
if (player.CurrentHealthState == "Fine") return ["fine", "green"];
else if (player.CurrentHealthState == "FineToo") return ["fineToo", "yellow"];
else if (player.CurrentHealthState == "Caution") return ["caution", "orange"];
else if (player.CurrentHealthState == "Danger") return ["danger", "red"];
return ["dead", "grey"];
}
function DinoCrisisCheatSheet(roomID, hide)
{
if (roomID == 271) DrawTextBlock("Battery Puzzle", "2, 3, 2", ["white", "green2"], hide);
else if (roomID == 1) DrawTextBlock("Password", "JP: 0375 / US: 0426", ["white", "green2"], hide);
else if (roomID == 2) DrawTextBlock("DDK H", "HEAD", ["white", "green2"], hide);
else if (roomID == 3) DrawTextBlock("Password", "705037", ["white", "green2"], hide);
else if (roomID == 4) DrawTextBlock("DDK N", "NEWCOMER", ["white", "green2"], hide);
else if (roomID == 5) DrawTextBlock("Battery Puzzle", "1, 2, 3, 1, 2, 1", ["white", "green2"], hide);
else if (roomID == 6) DrawTextBlock("Paul Baker ID", "JP: 46907 / US: 58104", ["white", "green2"], hide);
else if (roomID == 7) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 8) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 9) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 10) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 11) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 12) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 13) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 14) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 15) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 16) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 17) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 18) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 19) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 20) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 21) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 22) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 23) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 24) DrawTextBlock("", "", ["white", "green2"], hide);
else if (roomID == 25) DrawTextBlock("", "", ["white", "green2"], hide);
}
function appendData(data) {
//console.log(data);
var mainContainer = document.getElementById("srtQueryData");
mainContainer.innerHTML = "";
switch (data.GameName)
{
case "ED":
EldenRing(data);
return;
case "Dead Rising 1":
DeadRising1(data);
return;
case "Dino Crisis 1 Rebirth":
DinoCrisis1(data);
return;
case "DMC4SE":
DevilMayCry4(data);
return;
case "TEW":
TheEvilWithin(data);
return;
case "RECVX":
ResidentEvilCodeVeronicaX(data);
return;
case "RE0":
ResidentEvil0Remake(data);
return;
case "RE1":
ResidentEvil1Classic(data);
return;
case "RE1R":
ResidentEvil1Remake(data);
return;
case "RE2":
ResidentEvil2Classic(data);
return;
case "RE2R":
ResidentEvil2Remake(data);
return;
case "RE3":
ResidentEvil3Classic(data);
return;
case "RE3R":
ResidentEvil3Remake(data);
return;
case "RE4":
ResidentEvil4(data);
return;
case "RE4R":
ResidentEvil4Remake(data);
return;
case "RE5":
ResidentEvil5(data);
return;
case "RE6":
ResidentEvil6(data);
return;
case "RE7":
ResidentEvil7(data);
return;
case "RE8":
ResidentEvil8(data);
return;
case "RE9":
ResidentEvil9(data);
return;
case "REREV1":
ResidentEvilRevelations1(data);
return;
case "REREV2":
ResidentEvilRevelations2(data);
return;
case "SH1":
SilentHill1(data);
return;
case "SH2C":
SilentHill2Classic(data);
return;
case "SH2R":
SilentHill2Remake(data);
return;
case "SH3C":
SilentHill3Classic(data);
return;
default:
mainContainer.innerHTML += "No Plugin Detected";
return;
}
}
function DrawContainerBG()
{
var mainContainer = document.getElementById("srtQueryData");
mainContainer.innerHTML += `<div class="container-bg"></div>`;
}
// DEAD RISING 1
function DeadRising1(data)
{
let _colors = GetColor(data.CarInfo);
DrawContainerBG();
DrawAlignedTextBlocks(["X", "Y", "Z", "RX", "RY"], [data.Player.X, data.Player.Y, data.Player.Z, data.Player.RX, data.Player.RY], ["white", "green2"], "center", HidePosition);
if (data.CarInfo.IsAlive) DrawProgressBar(data.CarInfo.CurrentHealth, data.CarInfo.MaxHealth, data.CarInfo.Percentage, "Car: ", _colors);
DrawTextBlock("Stock", data.PlayerStats.ItemStock + 1, ["white", "green2"], HideStats);
//DrawTextBlock("Speed", data.PlayerStats.Speed, ["white", "green2"], HideStats);
if (data.CurrentWeapon.MaxDurability != 0) DrawProgressBar(data.CurrentWeapon.Durability, data.CurrentWeapon.MaxDurability, data.CurrentWeapon.Percentage, "Weapon Durability: ", ["caution", "yellow"]);
if (data.CurrentWeapon.MaxAmmo != 0) DrawTextBlock("Weapon Ammo", `${data.CurrentWeapon.Ammo} / ${data.CurrentWeapon.MaxAmmo}`, ["white", "green2"], HideStats);
DrawTextBlock("Campain Progress", data.Campaign.CampainProgress, ["white", "green2"], !IsDebug);
DrawTextBlock("Room ID", data.RoomData.RoomId, ["white", "green2"], !IsDebug);
if (data.Boss.IsAlive)
{
DrawProgressBar(data.Boss.CurrentHealth, data.Boss.MaxHealth, data.Boss.Percentage, "", ["danger", "red"]);
}
}
// DINO CRISIS 1
function DinoCrisis1(data)
{
let _colors = GetColor(data.Player);
DrawTextBlock("IGT", data.IGTFormattedString, ["white", "green2"], HideIGT);
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.Percentage, "Regina: ", _colors);
DrawTextBlock("RoomID", data.Stats.RoomID, ["white", "green2"], IsDebug);
DrawTextBlock("Room", data.Stats.RoomName, ["white", "green2"], IsDebug);
DrawTextBlock("Save Count", data.Stats.SaveCount, ["white", "green2"], IsDebug);
DrawTextBlock("Continues", data.Stats.Continues, ["white", "green2"], IsDebug);
if (data.EnemyHealth.IsAlive)
{
DrawProgressBar(data.EnemyHealth.CurrentHP, data.EnemyHealth.MaxHP, data.EnemyHealth.Percentage, "", ["danger", "red"]);
}
DinoCrisisCheatSheet(data.Stats.RoomID, IsDebug);
}
// DEVIL MAY CRY 4 SE
function DevilMayCry4(data)
{
let _colors = GetColor(data.Player);
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.PercentageHP, data.Player.Name, _colors);
DrawProgressBar(data.Player.CurrentDT, data.Player.MaxDT, data.Player.PercentageDT, "Devil Trigger: ", ["devil", "purple"]);
DrawTextBlock("IGT", data.IGTFormattedString, ["white", "green2"], HideIGT);
DrawTextBlock("Red Orbs", data.Stats.RedOrbs, ["white", "green2"], HideMoney);
DrawTextBlock("Room ID", data.Stats.RoomID, ["white", "green2"], HideRoom);
var filterdEnemies = data.EnemyHealth.filter(m => { return (m.IsAlive) });
filterdEnemies.sort(function (a, b) {
return Asc(a.Percentage, b.Percentage) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
DrawProgressBar(item.CurrentHP, item.MaximumHP, item.Percentage, "", ["danger", "red"]);
});
DrawTextBlock("TV", data.VersionInfo, ["white", "green2"], IsDebug);
DrawTextBlock("GV", data.GameInfo, ["white", "green2"], IsDebug);
}
// Elden Ring
function EldenRing(data)
{
const locations = [
//Main Game
{ name: "Limgrave", position: 1 },
{ name: "Weeping Weeping Peninsula", position: 23 },
{ name: "Liurnia of the Lakes", position: 33 },
{ name: "Caelid", position: 61 },
{ name: "Dragonbarrow", position: 76 },
{ name: "Altus Plateau", position: 87 },
{ name: "Capital Outskirts", position: 107 },
{ name: "Leyendell, Royal Capital", position: 114 },
{ name: "Mt. Gelmir", position: 118 },
{ name: "Mountaintops of the Giants", position: 128 },
{ name: "Crumbling Farum Azula", position: 137 },
{ name: "Forbidden Lands", position: 140 },
{ name: "Consecrated Snowfields", position: 143 },
{ name: "Miquella's Haligtree", position: 150 },
{ name: "Siofra River", position: 152 },
{ name: "Ainsel River", position: 155 },
{ name: "Nokron Eternal City", position: 156 },
{ name: "Deeproot Depths", position: 159 },
{ name: "Lake of Rot", position: 162 },
{ name: "Leyendell, Ashen Capital", position: 164 },
{ name: "Elden Throne", position: 166 },
//DLC
{ name: "Gravesite Plain", position: 167 },
{ name: "Abyssal Woods", position: 179 },
{ name: "Finger Ruins", position: 181 },
{ name: "Scadu Altus", position: 182 },
{ name: "Charo's Hidden Grave", position: 194 },
{ name: "Scaduview", position: 195 },
{ name: "Rauh Base", position: 197 },
{ name: "Jagged Peak", position: 199 },
{ name: "Enir Ilim", position: 203 }
];
let locationIndex = 0;
let counter = 0;
let killed = 0;
let DLCKilled = 0;
const aliveDLC = [0, 64, 16384, 2049];
// Assuming data.BossStatus is an object with keys and statuses
let entries = [];
for (let key in data.BossStatus) {
if (data.BossStatus.hasOwnProperty(key)) {
let value = data.BossStatus[key];
let status;
let statusColor;
counter = counter +1;
// Map the value to status and determine the color
if (value === 0 && counter <= 166|| value === 104 && counter <= 166) {
killed = killed + 1;
status = "Alive";
statusColor = "green2";
} else if(aliveDLC.includes(value) && counter >= 167) {
DLCKilled = DLCKilled + 1;
status = "Alive";
statusColor = "green2";
} else {
status = "Dead";
statusColor = "darkred";
}
// Store the entry
entries.push({ key, status, statusColor });
}
}
// Prepare a new list to include locations
let combinedEntries = [];
// Add "Limgrave" before the first entry
if (locations.length > 0) {
combinedEntries.push({
key: "",
status: locations[0].name,
statusColor: "black", // Adjust color as needed
fontSize: '25px', // Larger font size for location names
isLocation: true // Mark as a location
});
locationIndex = 1; // Start with the second location in the list
}
for (let i = 0; i < entries.length; i++) {
let currentEntry = entries[i];
// Add the current entry to the combined list
combinedEntries.push(currentEntry);
// Insert location names at specified positions
while (locationIndex < locations.length && i + 1 === locations[locationIndex].position) {
combinedEntries.push({
key: "",
status: locations[locationIndex].name,
statusColor: "black", // Adjust color as needed
fontSize: '25px', // Larger font size for location names
isLocation: true // Mark as a location
});
locationIndex++;
}
}
// Draw the combined entries with locations
for (let entry of combinedEntries) {
const { key, status, statusColor, fontSize, isLocation } = entry;
// Apply inline styles directly if fontSize is specified
const style = fontSize ? `style="font-size: ${fontSize};"` : "";
// Only include ":" for regular entries, not for locations
const colon = isLocation ? "" : ":";
// Add content to the main container directly
let mainContainer = document.getElementById("srtQueryData");
mainContainer.innerHTML += `<div class="title" ${style}>${key}${colon} <span class="${statusColor}">${status}</span></div>`;
}
DrawTextBlock("Killed",167 -killed + " / 167" , ["white", "green2"], HideIGT);
DrawTextBlock("DLC Killed",37 - DLCKilled + " / 37" , ["white", "green2"], HideIGT);
DrawTextBlock("Death Count", data.DeathCount, ["white", "green2"], HideIGT);
DrawTextBlock("TV", data.VersionInfo, ["white", "green2"], IsDebug);
DrawTextBlock("GV", data.GameInfo, ["white", "green2"], IsDebug);
}
// THE EVIL WITHIN
// Will be changed later
function formatGameTime(gameTimeSecs) {
const zeroPrefix = (str, digits=2) => str.length === digits ? str : `0${str}`;
const hours = Math.floor(gameTimeSecs / 3600);
gameTimeSecs = gameTimeSecs % 3600;
const minutes = Math.floor(gameTimeSecs / 60);
gameTimeSecs = gameTimeSecs % 60;
const hoursStr = zeroPrefix(hours.toString());
const minutesStr = zeroPrefix(minutes.toString());
const secondsStr = zeroPrefix(gameTimeSecs.toFixed(0).toString(), digits=2);
return `${hoursStr}:${minutesStr}:${secondsStr}`;
}
function TheEvilWithin(data)
{
let _colors = GetColor(data.Player);
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.PercentageHP, "Sebastian: ", _colors);
DrawTextBlock("IGT",formatGameTime(data.Stats.IGT), ["white", "green2"], HideIGT);
DrawTextBlock("Green Gel", `${data.GreenGel}`, ["white", "green2"], HideMoney);
var filterdEnemies = data.EnemyHealth.filter(m => { return (m.IsAlive) });
filterdEnemies.sort(function (a, b) {
return Asc(a.CurrentHP, b.CurrentHP) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
DrawProgressBar(item.CurrentHP, item.MaximumHP, item.Percentage, "", ["danger", "red"]);
});
}
// RESIDENT EVIL 0
// CLASSIC
// REMAKE
function ResidentEvil0Remake(data)
{
DrawTextBlock("IGT", data.IGTFormattedString, ["white", "green2"], HideIGT);
let _colors = GetColor(data.Player);
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.Percentage, data.PlayerName, _colors);
let _colors2 = GetColor(data.Player2);
DrawProgressBar(data.Player2.CurrentHP, data.Player2.MaxHP, data.Player2.Percentage, data.PlayerName2, _colors2);
DrawTextBlock("Saves", data.Stats.Saves, ["white", "green2"], HideStats);
DrawTextBlock("Kills", data.Stats.Kills, ["white", "green2"], HideStats);
DrawTextBlock("Shots", data.Stats.Shots, ["white", "green2"], HideStats);
DrawTextBlock("Recoveries", data.Stats.Recoveries, ["white", "green2"], HideStats);
var filterdEnemies = data.EnemyHealth.filter(m => { return (m.IsAlive && !m.IsPlayer) });
filterdEnemies.sort(function (a, b) {
return Asc(a.CurrentHP, b.CurrentHP) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
DrawTextBlock("Enemy", item.CurrentHP, ["white", "red"], false);
});
}
// RESIDENT EVIL 1
// CLASSIC
function ResidentEvil1Classic(data)
{
DrawTextBlock("IGT", data.IGTFormattedString, ["white", "green2"], HideIGT);
let _colors = GetColor(data.Player);
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.Percentage, data.PlayerName, _colors);
var filterdEnemies = data.EnemyHealth.filter(m => { return (m.IsAlive) });
filterdEnemies.sort(function (a, b) {
return Asc(a.CurrentHP, b.CurrentHP) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
DrawTextBlock("Enemy", item.CurrentHP, ["white", "red"], false);
});
}
// REMAKE
function ResidentEvil1Remake(data)
{
DrawTextBlock("IGT", data.IGTFormattedString, ["white", "green2"], HideIGT);
let _colors = GetColor(data.Player);
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.Percentage, data.PlayerName, _colors);
var filterdEnemies = data.EnemyHealth.filter(m => { return (m.IsAlive) });
filterdEnemies.sort(function (a, b) {
return Asc(a.CurrentHP, b.CurrentHP) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
DrawProgressBar(item.CurrentHP, item.MaximumHP, item.Percentage, "", ["danger", "red"]);
});
}
// RESIDENT EVIL 2
// CLASSIC
function ResidentEvil2Classic(data)
{
DrawTextBlock("IGT", data.IGTFormattedString, ["white", "green2"], HideIGT);
let _colors = GetColor(data.Player);
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.Percentage, data.PlayerName, _colors);
var filterdEnemies = data.EnemyHealth.filter(m => { return (m.IsAlive) });
filterdEnemies.sort(function (a, b) {
return Asc(a.CurrentHP, b.CurrentHP) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
if (item.MaximumHP != 0)
DrawProgressBar(item.CurrentHP, item.MaximumHP, item.Percentage, item.EnemyTypeString, ["danger", "red"]);
else
DrawTextBlock("Enemy", item.CurrentHP, ["white", "red"], false);
});
}
// REMAKE
function ResidentEvil2Remake(data)
{
DrawTextBlock("IGT", data.Timer.IGTFormattedString, ["white", "green2"], HideIGT);
let _colors = GetColor(data.PlayerManager);
DrawProgressBar(data.PlayerManager.Health.CurrentHP, data.PlayerManager.Health.MaxHP, data.PlayerManager.Health.Percentage, data.PlayerManager.CurrentSurvivorString, _colors);
DrawTextBlocks(["Rank", "RankScore"], [data.RankManager.GameRank, data.RankManager.RankPoint], ["white", "green2"], HideDA);
var filterdEnemies = data.Enemies.filter(m => { return (m.IsAlive) });
filterdEnemies.sort(function (a, b) {
return Asc(a.CurrentHP, b.CurrentHP) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
DrawProgressBar(item.CurrentHP, item.MaxHP, item.Percentage, "", ["danger", "red"]);
});
}
// RESIDENT EVIL 3
// CLASSIC
function ResidentEvil3Classic(data)
{
DrawTextBlock("IGT", data.IGTFormattedString, ["white", "green2"], HideIGT);
let _colors = GetColor(data.Player);
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.Percentage, data.PlayerName, _colors);
if (data.Nemesis.IsAlive)
{
DrawProgressBar(data.Nemesis.CurrentHP, data.Nemesis.MaximumHP, data.Nemesis.Percentage, data.Nemesis.BossName, ["danger", "red"]);
}
}
// REMAKE
function ResidentEvil3Remake(data)
{
DrawTextBlock("IGT", data.Timer.IGTFormattedString, ["white", "green2"], HideIGT);
let _colors = GetColor(data.PlayerManager);
DrawProgressBar(data.PlayerManager.Health.CurrentHP, data.PlayerManager.Health.MaxHP, data.PlayerManager.Health.Percentage, data.PlayerManager.CurrentSurvivorString, _colors);
DrawTextBlocks(["Rank", "RankScore"], [data.RankManager.GameRank, data.RankManager.RankPoint], ["white", "green2"], HideDA);
var filterdEnemies = data.Enemies.filter(m => { return (m.IsAlive) });
filterdEnemies.sort(function (a, b) {
return Asc(a.CurrentHP, b.CurrentHP) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
DrawProgressBar(item.CurrentHP, item.MaxHP, item.Percentage, "", ["danger", "red"]);
});
}
// RESIDENT EVIL 4
function ResidentEvil4(data)
{
let _colors = GetColor(data.Player);
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.Percentage, data.PlayerName, _colors);
let _colors2 = GetColor(data.Player2);
DrawProgressBar(data.Player2.CurrentHP, data.Player2.MaxHP, data.Player2.Percentage, data.PlayerName2, _colors2);
let rank = Math.floor(data.GameData.RankScore / 1000);
DrawTextBlock("IGT", data.IGTFormattedString, ["white", "green2"], HideIGT);
DrawTextBlocks(["RankScore", "Rank"], [data.GameData.RankScore, rank], ["white", "green2"], HideDA);
DrawTextBlock("PTAS", `₧ ${data.GameData.Money}`, ["white", "green2"], HideMoney);
DrawTextBlock("Last Item", data.GamePlayerItemID.Name, ["white", "green2"], HideStats);
DrawTextBlock("Chapter Kills", data.GamePlayerKills.ChapterKills, ["white", "green2"], HideStats);
DrawTextBlock("Kills", data.GamePlayerKills.Kills, ["white", "green2"], HideStats);
var filterdEnemies = data.EnemyHealth.filter(m => { return (m.IsAlive) });
filterdEnemies.sort(function (a, b) {
return Asc(a.CurrentHP, b.CurrentHP) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
DrawProgressBar(item.CurrentHP, item.MaximumHP, item.Percentage, "", ["danger", "red"]);
});
}
// REMAKE
function ResidentEvil4Remake(data)
{
DrawTextBlock("IGT", data.IGTFormattedString, ["white", "green2"], HideIGT);
let _colors = GetColor(data.PlayerHealth);
DrawProgressBar(data.PlayerHealth.CurrentHitPoint, data.PlayerHealth.DefaultHitPoint, data.PlayerHealth.Percentage, "Leon: ", _colors);
DrawTextBlocks(["Rank", "ActionPoint", "ItemPoint"], [data.Rank.Rank, data.Rank.ActionPoint, data.Rank.ItemPoint], ["white", "green2", "green2"], HideDA);
DrawTextBlock("Kills", data.GameStatsKillCountElement.Count, ["white", "green2"]);
var filterdEnemies = data.EnemyHealth.filter(m => { return (m.IsAlive) });
filterdEnemies.sort(function (a, b) {
return Asc(a.CurrentHitPoint, b.CurrentHitPoint) || Desc(a.CurrentHitPoint, b.CurrentHitPoint);
}).forEach(function (item, index, arr) {
DrawProgressBar(item.CurrentHitPoint, item.DefaultHitPoint, item.Percentage, "", ["danger", "red"]);
});
}
// RESIDENT EVIL 5
function ResidentEvil5(data)
{
var mainContainer = document.getElementById("srtQueryData");
mainContainer.innerHTML = "";
let _colors = GetColor(data.Player);
let _colors2 = GetColor(data.Player2);
//DrawTextBlock("IGT", data.IGTFormattedString, ["white", "green2"], HideIGT);
//Player HPs
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.Percentage, "Chris: ", _colors);
DrawProgressBar(data.Player2.CurrentHP, data.Player2.MaxHP, data.Player2.Percentage, "Sheva: ", _colors2);
//Player Stats
mainContainer.innerHTML += `
<div id="RE5Stats">
<div class="RE5title">Naira: </div><font color="#00FF00">${"₦ " + data.Money}</font><div></div>
</div>`;
mainContainer.innerHTML += `
<div id="RE5Stats">
<div class="RE5title">P1 Kills: </div><font color="#00FF00">${data.ChrisKills} | ${data.KillsRequired} | ${data.IsSRank ? "S" : "No S" + " " + " " + " "}</font>
<div class="RE5title">P2 Kills: </div><font color="#00FF00">${data.ShevaKills} | ${data.KillsRequired} | ${data.IsSRank ? "S" : "No S"}</font>
</div>`;
if(data.Gamestate == 6 || data.Gamestate == 7){
DrawTextBlocks(["P1 DA", "P1 Rank"], [data.ChrisDA, data.ChrisDARank], ["white", "green2"], HideDA);
DrawTextBlocks(["P2 DA", "P2 Rank"], [data.ShevaDA, data.ShevaDARank], ["white", "green2"], HideDA);
} else{
DrawTextBlocks(["P1 DA", "P1 Rank"], ["0", "0"], ["white", "green2"], HideDA);
DrawTextBlocks(["P2 DA", "P2 Rank"], ["0", "0"], ["white", "green2"], HideDA);
}
var filterdEnemies = data.EnemyHealth.filter(m => { return (m.IsAlive) });
filterdEnemies.sort(function (a, b) {
return Asc(a.CurrentHP, b.CurrentHP) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
DrawProgressBar(item.CurrentHP, item.MaximumHP, item.Percentage, "", ["danger", "red"]);
});
}
// RESIDENT EVIL6
var RE6Names = ['Leon', 'Helena', 'Chris', 'Piers', 'Jake', 'Sherry', 'Ada', 'Agent'];
function GetRE6PlayerDA(data, value) {
var playerDA;
if (data.PlayerID == 0 || data.PlayerID == 2 || data.PlayerID == 4 || data.PlayerID == 6) {
switch (data.PlayerID + value) {
case 0:
return playerDA = data.Stats.DALeon;
case 1:
return playerDA = data.Stats.DAHelena;
case 2:
return playerDA = data.Stats.DAChris;
case 3:
return playerDA = data.Stats.DAPiers;
case 4:
return playerDA = data.Stats.DAJake;
case 5:
return playerDA = data.Stats.DASherry;
case 6:
return playerDA = data.Stats.DAAda;
case 7:
return playerDA = data.Stats.DAHunk;
default:
}
} else {
switch (data.PlayerID - value) {
case 0:
return playerDA = data.Stats.DALeon;
case 1:
return playerDA = data.Stats.DAHelena;
case 2:
return playerDA = data.Stats.DAChris;
case 3:
return playerDA = data.Stats.DAPiers;
case 4:
return playerDA = data.Stats.DAJake;
case 5:
return playerDA = data.Stats.DASherry;
case 6:
return playerDA = data.Stats.DAAda;
case 7:
return playerDA = data.Stats.DAHunk;
default:
}
}
}
function ResidentEvil6(data) {
let _colors = GetColor(data.Player);
let _colors2 = GetColor(data.Player2);
// Check which character we are playing currently to prevent showing wrong data
if (data.PlayerID == 0 || data.PlayerID == 2 || data.PlayerID == 4 || data.PlayerID == 6) {
// Player HP
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.PercentageHP, RE6Names[data.PlayerID] + ": ", _colors);
DrawProgressBar(data.Player2.CurrentHP, data.Player2.MaxHP, data.Player2.PercentageHP, RE6Names[data.PlayerID + 1] + ": ", _colors2);
// Player DA
DrawTextBlock("DA " + RE6Names[data.PlayerID], GetRE6PlayerDA(data, 0), ["white", "green2"]);
DrawTextBlock("DA " + RE6Names[data.PlayerID + 1], GetRE6PlayerDA(data, 1), ["white", "green2"]);
} else {
// Player HP
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.PercentageHP, RE6Names[data.PlayerID - 1] + ": ", _colors);
DrawProgressBar(data.Player2.CurrentHP, data.Player2.MaxHP, data.Player2.PercentageHP, RE6Names[data.PlayerID] + ": ", _colors2);
// Player DA
DrawTextBlock("DA " + RE6Names[data.PlayerID - 1], GetRE6PlayerDA(data, 1), ["white", "green2"]);
DrawTextBlock("DA " + RE6Names[data.PlayerID], GetRE6PlayerDA(data, 0), ["white", "green2"]);
}
DrawTextBlock("Skill Points ", data.StatusPoints + data.StatusPointsCur, ["white", "green2"]);
// Enemy HP
if(data.Areas == 300 || data.Areas == 301 || data.Areas == 303 || data.Areas == 500 || data.Areas == 501 || data.Areas == 502
|| data.Areas == 503 || data.Areas == 504 || data.Areas == 506 || data.Areas == 507 || data.Areas == 770){
var filteredExceptions = data.EnemyHealth.filter(m => {return (m.MaximumHP != 1000 && m.IsAlive)});
filteredExceptions.sort(function (a, b) {
return Asc(a.Percentage, b.Percentage) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
DrawProgressBar(item.CurrentHP, item.MaximumHP, item.Percentage, "", ["danger", "red"]);
});
} else if(data.Areas == 300 || data.Areas == 301){
var filteredExceptions = data.EnemyHealth.filter(m => {return (m.MaximumHP != 10000 && m.IsAlive)});
filteredExceptions.sort(function (a, b) {
return Asc(a.Percentage, b.Percentage) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
DrawProgressBar(item.CurrentHP, item.MaximumHP, item.Percentage, "", ["danger", "red"]);
});
} else{
var filterdEnemies = data.EnemyHealth.filter(m => { return (m.IsAlive) });
filterdEnemies.sort(function (a, b) {
return Asc(a.Percentage, b.Percentage) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
DrawProgressBar(item.CurrentHP, item.MaximumHP, item.Percentage, "", ["danger", "red"]);
});
}
// Versions
DrawTextBlock("TV", data.VersionInfo, ["white", "green2"]);
DrawTextBlock("GV", data.GameInfo, ["white", "green2"]);
}
var JackHPs = [
{MaxJackHP: 1600},
{MaxJackHP: 1200},
{MaxJackHP: 1200},
{MaxJackHP: 1200},
{MaxJackHP: 500},
{MaxJackHP: 1000},
{MaxJackHP: 800},
{MaxJackHP: 500}
];
// RESIDENT EVIL 7
function ResidentEvil7(data)
{
let _colors = GetColor(data.Player);
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.Percentage, "Player: ", _colors);
DrawTextBlocks(["Rank", "RankScore"], [data.Rank, data.RankScore], ["white", "green2"], HideDA);
// Enemy HPs
var filterdEnemies = data.EnemyHealth.filter(m => { return (m.IsAlive) });
filterdEnemies.sort(function (a, b) {
return Asc(a.CurrentHP, b.CurrentHP) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
DrawProgressBar(item.CurrentHP, item.MaximumHP, item.Percentage, "", ["danger", "red"]);
});
// Jack Eyes new
var filteredJackNewEyes = data.JackHP.filter(m => {return (m.IsAlive)});
filteredJackNewEyes.forEach(function (item, index, arr){
DrawProgressBar(item.CurrentHP, JackHPs[index].MaxJackHP, item.CurrentHP / JackHPs[index].MaxJackHP, "", ["danger", "red"]);
});
}
// RESIDENT EVIL 8: VILLAGE
function ResidentEvil8(data)
{
let _colors = GetColor(data.Player);
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.Percentage, data.PlayerName, _colors);
DrawTextBlocks(["Rank", "RankScore"], [data.Rank, data.RankScore], ["white", "green2"], HideDA);
DrawTextBlock("LEI", `L ${data.Lei}`, ["white", "green2"], HideMoney);
var filterdEnemies = data.EnemyHealth.filter(m => { return (m.IsAlive) });
filterdEnemies.sort(function (a, b) {
return Asc(a.CurrentHP, b.CurrentHP) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
DrawProgressBar(item.CurrentHP, item.MaximumHP, item.Percentage, "", ["danger", "red"]);
});
}
// RESIDENT EVIL 9: REQUIEM
function ResidentEvil9(data) {
DrawTextBlocks(["HP", "Max HP"], [data.PlayerContext.HP.CurrentHP, data.PlayerContext.HP.CurrentMaxHP], ["white", "green2"], false);
DrawTextBlocks(["DA Rank", "DA Score"], [data.DARank, data.DAScore], ["white", "green2"], HideStats);
var aliveEnemies = data.EnemyContexts.filter(function(e) {
return e.HP.CurrentHP > 0 && e.HP.CurrentMaxHP > 1;
});
aliveEnemies.sort(function(a, b) {
return Asc(a.HP.CurrentHP, b.HP.CurrentHP);
}).forEach(function(enemy) {
DrawTextBlocks(["HP", "Max HP"], [enemy.HP.CurrentHP, enemy.HP.CurrentMaxHP], ["white", "red"], false);
});
}
// RESIDENT EVIL: CODE VERONICA X
function ResidentEvilCodeVeronicaX(data)
{
DrawTextBlock("IGT", data.IGT.FormattedString, ["white", "green2"], HideIGT);
let _colors = GetColor(data.Player);
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.Percentage, `${data.Player.CharacterFirstName}: `, _colors);
DrawTextBlock("Room Name", data.Room.Name, ["white", "green2"], HideStats);
DrawTextBlock("Difficulty", data.DifficultyName, ["white", "green2"], HideStats);
var filterdEnemies = data.Enemy.filter(m => { return (m.IsAlive) });
filterdEnemies.sort(function (a, b) {
return Asc(a.Percentage, b.Percentage) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
DrawProgressBar(item.CurrentHP, item.MaximumHP, item.Percentage, item.TypeName, ["danger", "red"]);
});
}
// RESIDENT EVIL: REVELATIONS
function ResidentEvilRevelations1(data)
{
DrawTextBlock("IGT", data.IGTFormattedString, ["white", "green2"], HideIGT);
let _colors = GetColor(data.Player);
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.Percentage, data.Player.Name, _colors);
DrawTextBlocks(["Rank", "RankScore"], [data.EndResults.Rank, data.EndResults.RankScore], ["white", "green2"], HideDA);
var filterdEnemies = data.EnemyHealth.filter(m => { return (m.IsAlive) });
filterdEnemies.sort(function (a, b) {
return Asc(a.Percentage, b.Percentage) || Desc(a.CurrentHP, b.CurrentHP);
}).forEach(function (item, index, arr) {
DrawProgressBar(item.CurrentHP, item.MaximumHP, item.Percentage, item.Name, ["danger", "red"]);
});
}
// RESIDENT EVIL: REVELATIONS 2
function ResidentEvilRevelations2(data)
{
DrawTextBlock("IGT", data.IGTFormattedString, ["white", "green2"], HideIGT);
let _colors = GetColor(data.Player);
DrawProgressBar(data.Player.CurrentHP, data.Player.MaxHP, data.Player.Percentage, data.PlayerName, _colors);
let _colors2 = GetColor(data.Player2);
DrawProgressBar(data.Player2.CurrentHP, data.Player2.MaxHP, data.Player2.Percentage, data.Player2Name, _colors2);
}
// SILENT HILL 1 CLASSIC
function SilentHill1(data) {
const harryState = { CurrentHealthState: data.HarryHealthStatusName };
let _colors = GetColor(harryState);
DrawTextBlock("IGT", data.IGTFormattedString, ["white", "green2"], HideIGT);
DrawProgressBar(data.HarryHP, 100, data.HarryHP / 100, "Harry: ", _colors);
DrawTextBlock("Status", data.HarryHealthStatusName, ["white", _colors[1]], false);
DrawTextBlock("Saves", data.SaveCount, ["white", "green2"], HideStats);
DrawTextBlock("TV", data.VersionInfo, ["white", "green2"], !IsDebug);
}
// SILENT HILL 2 CLASSIC
function SilentHill2Classic(data) {
let _colors = GetColor(data.Player);
let playerLabel = data.IsBfaW ? "Maria HP" : "James HP";
DrawTextBlocks(["IGT", "FPS"], [data.IGTFormattedString, Math.round(data.FPS)], ["white", "green2"], HideIGT);
DrawTextBlock(playerLabel, `${data.Player.CurrentHP} (${data.Player.CurrentHealthState})`, _colors, false);
DrawTextBlocks(["Action", "Riddle"], [data.ActionDifficultyString, data.RiddleDifficultyString], ["white", "green2"], HideStats);
DrawTextBlocks(["Damage", "Shooting", "Fighting"], [data.DamageReceived, data.ShootingCount, data.FightingCount], ["white", "green2"], HideStats);
DrawTextBlocks(["Saves", "Items"], [data.SaveCount, data.ItemCount], ["white", "green2"], HideStats);
if (data.IsBfaW) {
DrawTextBlock("Revolver", data.HandgunCount, ["white", "green2"], false);
} else {
DrawTextBlocks(["Handgun", "Bullets"], [data.HandgunCount, data.HandgunBullets], ["white", "green2"], false);
DrawTextBlocks(["Shotgun", "Bullets"], [data.ShotgunCount, data.ShotgunBullets], ["white", "green2"], false);
DrawTextBlocks(["Rifle", "Bullets"], [data.RifleCount, data.RifleBullets], ["white", "green2"], false);
}
}
// SILENT HILL 2 REMAKE
function SilentHill2Remake(data) {
DrawTextBlock("James HP", data.PlayerHP, ["white", "green2"], false);