-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathBig Bang Bar (Capcom 1996 ).vbs
2805 lines (2360 loc) · 102 KB
/
Big Bang Bar (Capcom 1996 ).vbs
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
''************ Big Bamg Bar
''************ Capcom, 1996
''************ vp9 version by unclewilly and jimmyfingers, artwork by grizz
''************ original 3dmodels by rom extracted from his Future Pinball release
''************ vpx conversion by ninuzzu
Option Explicit
Randomize
' Thalamus 2019 February : Improved directional sounds
' !! NOTE : Table not verified yet !!
' Options
' Volume devided by - lower gets higher sound
Const VolDiv = 2000 ' Lower number, louder ballrolling/collition sound
Const VolCol = 10 ' Ball collition divider ( voldiv/volcol )
' The rest of the values are multipliers
'
' .5 = lower volume
' 1.5 = higher volume
Const VolBump = 2 ' Bumpers volume.
Const VolRol = 1 ' Rollovers volume.
Const VolGates = 1 ' Gates volume.
Const VolMetal = 1 ' Metals volume.
Const VolRB = 1 ' Rubber bands volume.
Const VolRH = 1 ' Rubber hits volume.
Const VolPo = 1 ' Rubber posts volume.
Const VolPi = 1 ' Rubber pins volume.
Const VolPlast = 1 ' Plastics volume.
Const VolTarg = 1 ' Targets volume.
Const VolWood = 1 ' Woods volume.
Const VolKick = 1 ' Kicker volume.
Const VolSpin = 1.5 ' Spinners volume.
Const VolFlip = 1 ' Flipper volume.
'Const path ="HKEY_CURRENT_USER\SOFTWARE\Visual Pinball\Controller\"
'Dim sString : sString = "Const dir = """ & path & """" & vbCrLf & "Dim oShell: Set oShell = CreateObject(""WScript.Shell"")" & vbCrLf &"If Err.number <> 0 Then" & vbCrLf & "oShell.RegWrite dir & ""ForceDisableB2S"",1, ""REG_DWORD"""& vbCrLf & "end if" & vbCrLf& "Set oShell = nothing"& vbCrLf
'Dim objFSO : Set objFSO=CreateObject("Scripting.FileSystemObject")
'Dim objFile: Set objFile = objFSO.CreateTextFile("NoB2S.vbs",True)
'objFile.Write sString & vbCrLf
'objFile.Close
'ExecuteGlobal GetTextFile("NoB2S.vbs")
'If Err Then MsgBox "Unable to run NoB2S"
'******************* Options *********************
' DMD/Backglass Controller Setting
Dim cController:cController = 3 '0=Use value defined in cController.txt, 1=VPinMAME, 2=UVP server, 3=B2S server, 4=B2S with DOF (disable VP mech sounds)
'*************************************************
Const dir = "HKEY_CURRENT_USER\SOFTWARE\Visual Pinball\Controller\"
Dim oShell: Set oShell = CreateObject("WScript.Shell")
Const UseVPMColoredDMD = 1
if Table.ShowFSS = true or Table.ShowDT = true then
oShell.RegWrite dir & "ForceDisableB2S",1, "REG_DWORD"
cController = 0
if Table.ShowFSS = true then
ScoreText.text = " "
ScoreText.visible = 0
Else
ScoreText.text = "DMD"
ScoreText.visible = 1
end if
else
oShell.RegWrite dir & "ForceDisableB2S",0, "REG_DWORD"
ScoreText.text = " "
ScoreText.visible = 0
cController = 3
end if
Set oShell = nothing
Dim DesktopMode:DesktopMode = Table.ShowDT
Dim UseVPMDMD
if Table.ShowFSS = true then
UseVPMDMD = 0
Else
UseVPMDMD = DesktopMode
end if
const SingleScreenFS = 0
Const IntegratedDMDType = 0
' ***************************************************************************
' DAY & NIGHT FUNCTIONS AND DATASETS
' ****************************************************************************
' PGI (Persistent General illumination)
'-1= 0.5x emmissive de-block increase
' 0= (default)full emmisive blocking
' 1= Half of full
' 2= Quarter of full
' 3= 8'th of full
' 4= 16'th of full
' 5= 32'nd of full
' 6 = full emmision
Const GILevel = 1
Const FLLevel = 1
Const BTLevel = 1
Const cUSESHADOW = 1
Const cUSECOLORGRADE = 1
Const cUSECCUPBOOST = 1
Const cUSELITEBOOST = 1
Const cUSEBACKGLASS = 1
Const cDYNPINBALL = 1
Const cDYNGAMEBLADES =1
Const cSHADOWBLADES =1
Const cUSEBGLASSHIGH =0
Const cUSETOPPER =1
Const cUSEBACKLIGHT =1
Const cUSEBGLASSCCX =0
Const cUSEBGLASSREFL =1
Const cUSEDUALRAMPS =0
Dim nxx, DNS
DNS = Table.NightDay
Dim DivLevel: DivLevel = 35
Dim DNSVal: DNSVal = Round(DNS/10)
Dim DNShift: DNShift = 2
'Dim OPSValues: OPSValues=Array (100,50,20,10 ,5,4 ,3 ,2 ,1, 0,0)
'Dim DNSValues: DNSValues=Array (1.0,0.5,0.1,0.05,0.01,0.005,0.001,0.0005,0.0001, 0.00005,0.00000)
Dim OPSValues: OPSValues=Array (100,50,20,10 ,9,8 ,7 ,6 ,5, 4,3,2,1,0)
Dim OPS2: OPS2 =Array (1.0,0.95,0.90,0.85,0.80,0.75,0.70,0.65,0.60,0.55,0.50,0.50)
Dim OPSValues2: OPSValues2=Array (100*OPS2(DNSVal),50*OPS2(DNSVal),20*OPS2(DNSVal),10*OPS2(DNSVal),9*OPS2(DNSVal),8*OPS2(DNSVal),7*OPS2(DNSVal),6*OPS2(DNSVal),5*OPS2(DNSVal), 4*OPS2(DNSVal),3*OPS2(DNSVal),2*OPS2(DNSVal),1*OPS2(DNSVal),0*OPS2(DNSVal))
Dim OPS3: OPS3 =Array (1.0,0.93,0.85,0.78,0.70,0.65,0.55,0.48,0.40,0.33,0.25,0.25)
Dim OPSValues3: OPSValues3=Array (100*OPS3(DNSVal),50*OPS3(DNSVal),20*OPS3(DNSVal),10*OPS3(DNSVal),9*OPS3(DNSVal),8*OPS3(DNSVal),7*OPS3(DNSVal),6*OPS3(DNSVal),5*OPS3(DNSVal),4*OPS3(DNSVal),3*OPS3(DNSVal),2*OPS3(DNSVal),1*OPS3(DNSVal),0*OPS3(DNSVal))
Dim OPS4: OPS4 =Array (1.0,0.91,0.82,0.74,0.65,0.56,0.47,0.38,0.30,0.21,0.12,0.12)
Dim OPSValues4: OPSValues4=Array (100*OPS4(DNSVal),50*OPS4(DNSVal),20*OPS4(DNSVal),10*OPS4(DNSVal),9*OPS4(DNSVal),8*OPS4(DNSVal),7*OPS4(DNSVal),6*OPS4(DNSVal),5*OPS4(DNSVal),4*OPS4(DNSVal),3*OPS4(DNSVal),2*OPS4(DNSVal),1*OPS4(DNSVal),0*OPS4(DNSVal))
Dim OPS5: OPS5 =Array (1.0,0.91,0.83,0.72,0.63,0.55,0.44,0.35,0.25,0.16,0.07,0.07)
Dim OPSValues5: OPSValues5=Array (100*OPS5(DNSVal),50*OPS5(DNSVal),20*OPS5(DNSVal),10*OPS5(DNSVal),9*OPS5(DNSVal),8*OPS5(DNSVal),7*OPS5(DNSVal),6*OPS5(DNSVal),5*OPS5(DNSVal),4*OPS5(DNSVal),3*OPS5(DNSVal),2*OPS5(DNSVal),1*OPS5(DNSVal),0*OPS5(DNSVal))
Dim OPS6: OPS6 =Array (1.0,0.90,0.81,0.71,0.62,0.52,0.42,0.33,0.23,0.14,0.04,0.04)
Dim OPSValues6: OPSValues6=Array (100*OPS6(DNSVal),50*OPS6(DNSVal),20*OPS6(DNSVal),10*OPS5(DNSVal),9*OPS6(DNSVal),8*OPS6(DNSVal),7*OPS6(DNSVal),6*OPS6(DNSVal),5*OPS6(DNSVal),4*OPS6(DNSVal),3*OPS6(DNSVal),2*OPS6(DNSVal),1*OPS6(DNSVal),0*OPS6(DNSVal))
Dim OPS1: OPS1 = 0.01 '0.25
Dim OPSValues1: OPSValues1=Array (100*OPS1,50*OPS1,20*OPS1,10*OPS1,9*OPS1,8*OPS1,7*OPS1,6*OPS1,5*OPS1,4*OPS1,3*OPS1,2*OPS1,1*OPS1,0*OPS1)
Dim DNSValues: DNSValues=Array (1.0,0.5,0.1,0.05,0.01,0.005,0.001,0.0005,0.0001, 0.00005,0.00001, 0.000005, 0.000001)
Dim SysDNSVal: SysDNSVal=Array (1.0,0.9,0.8,0.7,0.6,0.5,0.5,0.5,0.5, 0.5,0.5)
Dim DivValues: DivValues =Array (1,2,4,8,16,32,32,32,32, 32,32)
Dim DivValues2: DivValues2 =Array (1,1.5,2,2.5,3,3.5,4,4.5,5, 5.5,6)
Dim DivValues3: DivValues3 =Array (1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0,2.1)
Dim DIV4: DIV4 =Array (1.0,0.95,0.90,0.85,0.80,0.75,0.70,0.65,0.60,0.55,0.50,0.50)
Dim DivValues4: DivValues4 =Array (1*DIV4(DNSVal),1.1*DIV4(DNSVal),1.2*DIV4(DNSVal),1.3*DIV4(DNSVal),1.4*DIV4(DNSVal),1.5*DIV4(DNSVal),1.6*DIV4(DNSVal),1.7*DIV4(DNSVal),1.8*DIV4(DNSVal),1.9*DIV4(DNSVal),2.0*DIV4(DNSVal),2.1*DIV4(DNSVal))
Dim DIV5: DIV5 =Array (1.0,0.93,0.85,0.78,0.70,0.65,0.55,0.48,0.40,0.33,0.25,0.25)
Dim DivValues5: DivValues5 =Array (1*DIV5(DNSVal),1.1*DIV5(DNSVal),1.2*DIV5(DNSVal),1.3*DIV5(DNSVal),1.4*DIV5(DNSVal),1.5*DIV5(DNSVal),1.6*DIV5(DNSVal),1.7*DIV5(DNSVal),1.8*DIV5(DNSVal),1.9*DIV5(DNSVal),2.0*DIV5(DNSVal),2.1*DIV5(DNSVal))
Dim DIV6: DIV6 =Array (1.0,0.91,0.82,0.74,0.65,0.56,0.47,0.38,0.30,0.21,0.12,0.12)
Dim DivValues6: DivValues6 =Array (1*DIV6(DNSVal),1.1*DIV6(DNSVal),1.2*DIV6(DNSVal),1.3*DIV6(DNSVal),1.4*DIV6(DNSVal),1.5*DIV6(DNSVal),1.6*DIV6(DNSVal),1.7*DIV6(DNSVal),1.8*DIV6(DNSVal),1.9*DIV6(DNSVal),2.0*DIV6(DNSVal),2.1*DIV6(DNSVal))
Dim DIV7: DIV7 =Array (1.0,0.91,0.83,0.72,0.63,0.55,0.44,0.35,0.25,0.16,0.07,0.07)
Dim DivValues7: DivValues7 =Array (1*DIV7(DNSVal),1.1*DIV7(DNSVal),1.2*DIV7(DNSVal),1.3*DIV7(DNSVal),1.4*DIV7(DNSVal),1.5*DIV7(DNSVal),1.6*DIV7(DNSVal),1.7*DIV7(DNSVal),1.8*DIV7(DNSVal),1.9*DIV7(DNSVal),2.0*DIV7(DNSVal),2.1*DIV7(DNSVal))
Dim DIV8: DIV8 =Array (1.0,0.90,0.81,0.71,0.62,0.52,0.42,0.33,0.23,0.14,0.04,0.04)
Dim DivValues8: DivValues8 =Array (1*DIV8(DNSVal),1.1*DIV8(DNSVal),1.2*DIV8(DNSVal),1.3*DIV8(DNSVal),1.4*DIV8(DNSVal),1.5*DIV8(DNSVal),1.6*DIV8(DNSVal),1.7*DIV8(DNSVal),1.8*DIV8(DNSVal),1.9*DIV8(DNSVal),2.0*DIV8(DNSVal),2.1*DIV8(DNSVal))
Dim MUL1: MUL1 =Array (1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0)' 1.1
Dim MulValues1: MulValues1 =Array (1*MUL1(DNSVal),1.1*MUL1(DNSVal),1.2*MUL1(DNSVal),1.3*MUL1(DNSVal),1.4*MUL1(DNSVal),1.5*MUL1(DNSVal),1.6*MUL1(DNSVal),1.7*MUL1(DNSVal),1.8*MUL1(DNSVal),1.9*MUL1(DNSVal),2.0*MUL1(DNSVal),2.1*MUL1(DNSVal))
Dim RValUP: RValUP=Array (30,60,90,120,150,180,210,240,255,255,255,255)
Dim GValUP: GValUP=Array (30,60,90,120,150,180,210,240,255,255,255,255)
Dim BValUP: BValUP=Array (30,60,90,120,150,180,210,240,255,255,255,255,255,255,255,255)
Dim RValDN: RValDN=Array (255,210,180,150,120,90,60,30,10,10,10)
Dim GValDN: GValDN=Array (255,210,180,150,120,90,60,30,10,10,10)
Dim BValDN: BValDN=Array (255,210,180,150,120,90,60,30,10,10,10)
Dim FValUP: FValUP=Array (35,40,45,50,55,60,65,70,75,80,85,90,95,100,105)
Dim FValDN: FValDN=Array (100,85,80,75,70,65,60,55,50,45,40,35,30)
Dim MVSAdd: MVSAdd=Array (0.9,0.9,0.8,0.8,0.7,0.7,0.6,0.6,0.5,0.5,0.4,0.3,0.2,0.1)
Dim ReflDN: ReflDN=Array (60,55,50,45,40,35,30,28,26,24,22,20,19,18,16,15,14,13,12,11,10)
' PLAYFIELD GENERAL OPERATIONAL and LOCALALIZED GI ILLUMINATION
Dim aAllFlashers: aAllFlashers=Array(TopHigh,TopHigh1,TopHigh2, BBBLeftgirl,BBBRightgirl,FlBbBTitle,Flasher4,Flasher5,Flasher6,Flasher7,Flasher8,Flasher9,Flasher10,Flasher11,Flasher12,_
Flasher1,Flasher2,Flasher13,Flasher14,Flasher15,F21a,F24a,F25a,l62,l62a,l62b)
Dim aGiLights: aGiLights=array(l9,l10,l11,l12,l14,l17,l18,l21,l22,l23,l23a,l24,l25,l26,l27,l28,l29,l38,l39,l40,l128, f26)
Dim BloomLights: BloomLights=array(plungerbulb,l104,l119,l120,l122a,l123a,l124a,_
f21,F22,F23,F24,F25)
Dim TargetDropGi: TargetDropGi = array()
' PLAYFIELD GLOBAL INTENSITY ILLUMINATION FLASHERS
Flasher16.opacity = OPSValues(DNSVal + DNShift) / DivValues(DNSVal)
Flasher16.intensityscale = DNSValues(DNSVal + DNShift) /DivValues(DNSVal)
Flasher17.opacity = OPSValues(DNSVal + DNShift) /DivValues(DNSVal)
Flasher17.intensityscale = DNSValues(DNSVal + DNShift) /DivValues(DNSVal)
Flasher19.opacity = OPSValues(DNSVal + DNShift) /DivValues(DNSVal)
Flasher19.intensityscale = DNSValues(DNSVal + DNShift) /DivValues(DNSVal)
'Flasher18.opacity = OPSValues(DNSVal + DNShift) /DivValues(DNSVal)
'Flasher18.intensityscale = DNSValues(DNSVal + DNShift) /DivValues(DNSVal)
if cUSELITEBOOST then
Dim LiteUP: LiteUP=Array (10,6,5,4,4,4,4,3,3,3,2,2,1,0.5,0.4,0.3,0.2,0.1)
Flasher20.Color = RGB(RValUP(DNSVal)/LiteUP(DNSVal),GValUP(DNSVal)/LiteUP(DNSVal),BValUP(DNSVal+4)/LiteUP(DNSVal))
end if
'BACKBOX & BACKGLASS ILLUMINATION
if cUSEBACKGLASS then
BBBbgDark.ModulateVsAdd = MVSAdd(DNSVal+2)
BBBbgDark.Color = RGB(RValUP(DNSVal),GValUP(DNSVal),BValUP(DNSVal))
BBBbgDark.Amount = FValUP(DNSVal) / DivValues(DNSVal)
BBBbgHigh.Color = RGB(RValDN(DNSVal),GValDN(DNSVal),BValDN(DNSVal))
BBBbgHigh.Amount = FValDN(DNSVal) / DivValues(DNSVal)
if cUSETOPPER > 0 then ' add (TopHigh,TopHigh1,TopHigh2,) to aAllFlashers array, or enable code for to adjust brightness
TopDark.ModulateVsAdd = MVSAdd(DNSVal)
TopDark.Color = RGB(RValUP(DNSVal)-25,GValUP(DNSVal)-25,BValUP(DNSVal)-25)
'TopHigh.Color = RGB(RValDN(DNSVal),GValDN(DNSVal),BValDN(DNSVal))
if cUSETOPPER > 1 then
TopHigh.amount = TopHigh.amount / DivValues3(DNSVal)
TopHigh.opacity = TopHigh.opacity * OPSValues(DNSVal) / DivLevel
if cUSETOPPER > 2 then
TopHigh1.amount = TopHigh1.amount / DivValues3(DNSVal)
TopHigh1.opacity = TopHigh1.opacity * OPSValues(DNSVal) / DivLevel
if cUSETOPPER > 3 then
TopHigh2.amount = TopHigh2.amount / DivValues3(DNSVal)
TopHigh2.opacity = TopHigh2.opacity * OPSValues(DNSVal) / DivLevel
end if 'cUSETOPPER 3
end if 'cUSETOPPER 2
end if 'cUSETOPPER 1
end if 'cUSETOPPER 0
if cUSEBACKLIGHT then
Const nBACKBoost = 5
FloodLightLeft.Color = RGB(RValDN(DNSVal),GValDN(DNSVal),BValDN(DNSVal))
FloodLightLeft.Amount = FValDN(DNSVal) * nBACKBoost
'FloodLightLeft.opacity = OPSValues(DNSVal+ DNShift) /DivValues(DNSVal)
FloodLightRight.Color = RGB(RValDN(DNSVal),GValDN(DNSVal),BValDN(DNSVal))
FloodLightRight.Amount = FValDN(DNSVal) * nBACKBoost
'FloodLightRight.opacity = OPSValues(DNSVal+ DNShift) /DivValues(DNSVal)
end if 'cUSEBACKLIGHT
'FlBgNeonLamp.Color = RGB(RValDN(DNSVal),GValDN(DNSVal),BValDN(DNSVal))
FlBgNeonLamp.Amount = (FValDN(DNSVal) * 10.0) / DivValues2(DNSVal)
'FlBgNeonLamp1.Color = RGB(RValDN(DNSVal),GValDN(DNSVal),BValDN(DNSVal))
FlBgNeonLamp1.Amount = (FValDN(DNSVal) * 10.0) / DivValues2(DNSVal)
BBBbgFrame.ModulateVsAdd = MVSAdd(DNSVal) * 0.2
BBBbgFrame.Color = RGB(RValUP(DNSVal),GValUP(DNSVal),BValUP(DNSVal))
BBBbgFrame.Amount = FValUP(DNSVal) * DivValues(DNSVal)
BBBbgHigh.intensityscale = 0.7
FlBgNeonLamp.intensityscale = 0.6
FlBgNeonLamp1.intensityscale = 0.6
BBBbgDark.intensityscale = 0.3
BBBbgFrame.intensityscale = 0.3
BBBbgHigh1.intensityscale = 1.0
if cUSEBGLASSHIGH then ' GBGHigh3 is _defhorz flasher, Additive, AMT:100, OP:2, DB:8000, MOD:1
BGHigh3.intensityscale = 0.2
Dim ReflUP: ReflUP=Array (0.3,0.4,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9)
BGDark.intensityscale = ReflUP(DNSVal)
end if 'cUSEBGLASSHIGH
Dim tMaskFill: tMaskFill = Array(Empty,BGFrameMaskFill2,BGFrameMaskFill3,Empty,Empty,Empty)
' Fill with: BGFrameMaskFill1,BGFrameMaskFill2,BGFrameMaskFill3,BGFrameMaskFill4,BGFrameMaskFill5,PFRearBoxFill1
if cUSEBGLASSREFL then
Dim ReflFill: ReflFill=Array (10,10,20,20,30,30,30,30,40,40,40)
Dim ReflImg: ReflImg=Array (160,200,300,400,500,600,700,800,900,1000,1000)
Dim FillMag: FillMag=Array (0.8,0.8,0.7,0.7,0.6,0.6,0.55,0.55,0.54,0.54,0.53)
'playfield glass reflections
if NOT IsEmpty(tMaskFill(1)) then: tMaskFill(1).opacity= ReflFill(DNSVal)*2: end if' IMG:full table, def glass trans, FLTR:screen,AMT:900,OP:50, AB=off, RGB=0,0,32, DB=-10000,MOD=1
if NOT IsEmpty(tMaskFill(2)) then: tMaskFill(2).opacity= ReflFill(DNSVal)*3: end if' IMG:top half, def glass trans, FLTR:screen,AMT:900,OP:50, AB=off, RGB=0,0,32, DB=-10000,MOD=1
if NOT IsEmpty(tMaskFill(3)) then: tMaskFill(3).opacity= ReflImg(DNSVal): end if' IMG:backglass, FLTR:screen,AMT:300,OP:1000,AB=on, RBG=16,16,32, DB=-1000,MOD=0.3
if NOT IsEmpty(tMaskFill(1)) then: tMaskFill(1).intensityscale= 0.5: end if
if NOT IsEmpty(tMaskFill(2)) then: tMaskFill(2).intensityscale= 0.5: end if
'backbox glass reflections
if NOT IsEmpty(tMaskFill(0)) then: tMaskFill(0).opacity= ReflFill(DNSVal) +40: end if ' IMG:black mask fill, FLTR:screen,AMT:500,OP:90, AB=off, RGB=0,0,32, DB=-10000,MOD=1
'background reflective image usually __default_screen_space_reflection.png
if NOT IsEmpty(tMaskFill(4)) then: tMaskFill(4).opacity= ReflImg(DNSVal) / 3 : end if' IMG:Def SS Refl, FLTR:screen,AMT:100,OP:1000,AB=on, RBG=10,10,10, DB=-10000,MOD=0.5
' playfield rear EM/SS vertical rececessed shadow
if NOT IsEmpty(tMaskFill(5)) then: tMaskFill(5).opacity= ReflFill(DNSVal)*4: end if' IMG:full table, def glass trans, FLTR:screen,AMT:900,OP:50, AB=off, RGB=0,0,32, DB=-10000,MOD=1
if NOT IsEmpty(tMaskFill(5)) then: tMaskFill(5).intensityscale= 0.5: end if
Else
if NOT IsEmpty(tMaskFill(0)) then: tMaskFill(0).visible =0: end if
if NOT IsEmpty(tMaskFill(1)) then: tMaskFill(1).visible =0: end if
if NOT IsEmpty(tMaskFill(2)) then: tMaskFill(2).visible =0: end if
if NOT IsEmpty(tMaskFill(3)) then: tMaskFill(3).visible =0: end if
if NOT IsEmpty(tMaskFill(4)) then: tMaskFill(4).visible =0: end if
end if 'cUSEBGLASSREFL
end If ' cUSEBACKGLASS
' shadow code.
'PF=flasher(Screen,AMT:1,OP:50,DB:0,MOD:1,RGB=255)
'PS=flasher(Screen,AMT:1700,OP:30,DB:-10000,MOD:1,RGB=7,7,7)
'DS =flasher (Screen ,AMT:1,OP:80,DB:0,MOD:1,RGB=255)
Dim tShadows: tShadows = Array(OCPFShadow,OCPFShadow1,OCPFShadow2,OCPFShadow3, OCPFDarkShadow)
'Dim tShadows: tShadows = Array(OCPFShadow,OCPFShadow1,OCPFShadow2,OCPFShadow3,OCPFDarkShadow )
if cUSESHADOW then
'LOWER PF Shadows
Const cPFShDiv = 1.2 ' higher = less opaque, smaller= more opaque
Dim PFShDiv: PFShDiv= Array (1.39*cPFShDiv,1.36*cPFShDiv,1.33*cPFShDiv,1.29*cPFShDiv,1.26*cPFShDiv,1.23*cPFShDiv,1.19*cPFShDiv,1.16*cPFShDiv,1.13*cPFShDiv,1.1*cPFShDiv,1.0*cPFShDiv)
Dim PFShValues: PFShValues=Array (50,80,90,91,92,93,94,95,96,97,98,99,100,101,101,101,101,101)
Dim PFDrkShValues: PFDrkShValues=Array (100,99,90,80,70,60,50,40,30,20,10,5,0)
if NOT IsEmpty(tShadows(0)) then
tShadows(0).visible =1
tShadows(0).opacity = PFShValues(DNSVal) / PFShDiv(DNSVal) ' set height to ~0.5 just above PF
end if
if NOT IsEmpty(tShadows(1)) then
tShadows(1).visible =1
tShadows(1).opacity = PFShValues(DNSVal) / 1.6 ' set height to ~60 just above plastics
end if
' REVERSE Shadow
if NOT IsEmpty(tShadows(4)) then
tShadows(4).visible =1
tShadows(4).opacity = Round(PFDrkShValues(DNSVal) /1.2)' set height to ~60 just above plastics
end if
' UPPER PF Shadows
Const cPFShDiv2 = 1.4 ' higher = less opaque, smaller= more opaque
Dim PFShDiv2: PFShDiv2= Array (1.39*cPFShDiv2,1.36*cPFShDiv2,1.33*cPFShDiv2,1.29*cPFShDiv2,1.26*cPFShDiv2,1.23*cPFShDiv2,1.19*cPFShDiv2,1.16*cPFShDiv2,1.13*cPFShDiv2,1.1*cPFShDiv2,1.0*cPFShDiv2)
Dim PFShValues2: PFShValues2=Array (50,80,90,91,92,93,94,95,96,97,98,99,100,101,101,101,101,101)
if NOT IsEmpty(tShadows(2)) then
tShadows(2).visible =1
tShadows(2).opacity = PFShValues2(DNSVal) / PFShDiv2(DNSVal) ' height ~60
end if
if NOT IsEmpty(tShadows(3)) then
tShadows(3).visible =1
tShadows(3).opacity = PFShValues2(DNSVal) / 1.7 ' height ~110
end if
else
if NOT IsEmpty(tShadows(0)) then: tShadows(0).visible =0: end if
if NOT IsEmpty(tShadows(1)) then: tShadows(1).visible =0: end if
if NOT IsEmpty(tShadows(2)) then: tShadows(2).visible =0: end if
if NOT IsEmpty(tShadows(3)) then: tShadows(3).visible =0: end if
if NOT IsEmpty(tShadows(4)) then: tShadows(4).visible =0: end if
end If 'cUSESHADOW
if cSHADOWBLADES then
' import shadowblade materials.mat to work, duplicate or import _default_gameblades and scale apropriately
Dim ShadeBladeVals: ShadeBladeVals=Array ("Shadow with an image0","Shadow with an image1",_
"Shadow with an image2","Shadow with an image3", "Shadow with an image3",_
"Shadow with an image4","Shadow with an image4",_
"Shadow with an image5","Shadow with an image5","Shadow with an image5","Shadow with an image5","Shadow with an image5")
ShadowBlades.material = ShadeBladeVals(DNSVal)
end if
' color grade transition
if cUSECOLORGRADE then
Const nCGDiv = 1.0 ' increase when gets to understaturated at higher light settings
Const rSHIFT = 0 ' increase too saturated at lower light settings
Dim ColValues: ColValues=Array ("_ColorGrade_9_Lite","_ColorGrade_8_Lite","_ColorGrade_7_Lite","_ColorGrade_6_Lite", _
"_ColorGrade_5_Lite","_ColorGrade_4_Lite","_ColorGrade_3_Lite","_ColorGrade_2_Lite","_ColorGrade_1_Lite","_ColorGrade_0_Lite","_ColorGrade_0_Lite","_ColorGrade_0_Lite",_
"_ColorGrade_0_Lite","_ColorGrade_0_Lite","_ColorGrade_0_Lite","_ColorGrade_0_Lite","_ColorGrade_0_Lite","_ColorGrade_0_Lite")
table.ColorGradeImage = ColValues((int)((DNSVal+rSHIFT)/nCGDiv))
end if 'cUSECOLORGRADE
Dim TubeVal: TubeVal=Array ("Ramps-PlasticO","Ramps-Plastic1","Ramps-Plastic2","Ramps-Plastic3", _
"Ramps-Plastic4","Ramps-Plastic5","Ramps-Plastic6","Ramps-Plastic7","Ramps-Plastic8","Ramps-Plastic9", _
"Ramps-Plastic9","Ramps-Plastic9")
Primitive2.material = TubeVal(DNSVal)
Table.PlayfieldReflectionStrength = ReflDN(DNSVal + 4)
'For each nxx in aGiLights:nxx.intensity = nxx.intensity * SysDNSVal(DNSVal) /DivValues3(DNSVal) :Next
'For each nxx in aAllFlashers:nxx.amount = nxx.amount / DivValues3(DNSVal):Next
'For each nxx in aAllFlashers:nxx.opacity = nxx.opacity * OPSValues(DNSVal) / DivLevel:Next
'For each nxx in BloomLights:nxx.intensity = nxx.intensity *SysDNSVal(DNSVal)/DivValues3(DNSVal):Next
'For each nxx in TargetDropGi:nxx.intensity = nxx.intensity *SysDNSVal(DNSVal)/DivValues3(DNSVal):Next
If GILevel = 0 then ' default = Real
For each nxx in aGiLights:nxx.intensity = nxx.intensity * SysDNSVal(DNSVal) /DivValues3(DNSVal) :Next
elseif GILevel = 1 then ' half of real reduced
For each nxx in aGiLights:nxx.intensity = nxx.intensity * SysDNSVal(DNSVal) /DivValues4(DNSVal) :Next
elseif GILevel = 2 then' 1/4 of real reduced
For each nxx in aGiLights:nxx.intensity = nxx.intensity * SysDNSVal(DNSVal) /DivValues5(DNSVal) :Next
elseif GILevel = 3 then' 1/8'th of real reduced
For each nxx in aGiLights:nxx.intensity = nxx.intensity * SysDNSVal(DNSVal) /DivValues6(DNSVal) :Next
elseif GILevel = 4 then' 1/16'th of real reduced
For each nxx in aGiLights:nxx.intensity = nxx.intensity * SysDNSVal(DNSVal) /DivValues7(DNSVal) :Next
elseif GILevel = 5 then' 1/32'th of real reduced
For each nxx in aGiLights:nxx.intensity = nxx.intensity * SysDNSVal(DNSVal) /DivValues8(DNSVal) :Next
end if
If FLLevel = 0 then ' default = Real
For each nxx in aAllFlashers:nxx.amount = nxx.amount / DivValues3(DNSVal):Next
For each nxx in aAllFlashers:nxx.opacity = nxx.opacity * OPSValues(DNSVal) / DivLevel:Next
elseif FLLevel = 1 then ' half of real reduced
For each nxx in aAllFlashers:nxx.amount = nxx.amount / DivValues4(DNSVal):Next
For each nxx in aAllFlashers:nxx.opacity = nxx.opacity * OPSValues2(DNSVal) / DivLevel:Next
elseif FLLevel = 2 then ' 1/4 of real reduced
For each nxx in aAllFlashers:nxx.amount = nxx.amount / DivValues5(DNSVal):Next
For each nxx in aAllFlashers:nxx.opacity = nxx.opacity * OPSValues3(DNSVal) / DivLevel:Next
elseif FLLevel = 3 then ' 1/8'th of real reduced
For each nxx in aAllFlashers:nxx.amount = nxx.amount / DivValues6(DNSVal):Next
For each nxx in aAllFlashers:nxx.opacity = nxx.opacity * OPSValues4(DNSVal) / DivLevel:Next
elseif FLLevel = 4 then ' 1/16'th of real reduced
For each nxx in aAllFlashers:nxx.amount = nxx.amount / DivValues7(DNSVal):Next
For each nxx in aAllFlashers:nxx.opacity = nxx.opacity * OPSValues5(DNSVal) / DivLevel:Next
elseif FLLevel = 5 then ' 1/32'th of real reduced
For each nxx in aAllFlashers:nxx.amount = nxx.amount / DivValues8(DNSVal):Next
For each nxx in aAllFlashers:nxx.opacity = nxx.opacity * OPSValues6(DNSVal) / DivLevel:Next
end If
If BTLevel = 0 then ' default = Real
For each nxx in BloomLights:nxx.intensity = nxx.intensity *SysDNSVal(DNSVal)/DivValues3(DNSVal):Next
For each nxx in TargetDropGi:nxx.intensity = nxx.intensity *SysDNSVal(DNSVal)/DivValues3(DNSVal):Next
elseif BTLevel = 1 then ' half of real reduced
For each nxx in BloomLights:nxx.intensity = nxx.intensity *SysDNSVal(DNSVal)/DivValues4(DNSVal):Next
For each nxx in TargetDropGi:nxx.intensity = nxx.intensity *SysDNSVal(DNSVal)/DivValues4(DNSVal):Next
elseif BTLevel = 2 then' 1/4 of real reduced
For each nxx in BloomLights:nxx.intensity = nxx.intensity *SysDNSVal(DNSVal)/DivValues5(DNSVal):Next
For each nxx in TargetDropGi:nxx.intensity = nxx.intensity *SysDNSVal(DNSVal)/DivValues5(DNSVal):Next
elseif BTLevel = 3 then' 1/8'th of real reduced
For each nxx in BloomLights:nxx.intensity = nxx.intensity *SysDNSVal(DNSVal)/DivValues6(DNSVal):Next
For each nxx in TargetDropGi:nxx.intensity = nxx.intensity *SysDNSVal(DNSVal)/DivValues6(DNSVal):Next
elseif BTLevel = 4 then' 1/16'th of real reduced
For each nxx in BloomLights:nxx.intensity = nxx.intensity *SysDNSVal(DNSVal)/DivValues7(DNSVal):Next
For each nxx in TargetDropGi:nxx.intensity = nxx.intensity *SysDNSVal(DNSVal)/DivValues7(DNSVal):Next
elseif BTLevel = 5 then' 1/32'th of real reduced
For each nxx in BloomLights:nxx.intensity = nxx.intensity *SysDNSVal(DNSVal)/DivValues8(DNSVal):Next
For each nxx in TargetDropGi:nxx.intensity = nxx.intensity *SysDNSVal(DNSVal)/DivValues8(DNSVal):Next
end if
if cDYNPINBALL then
Dim DynPinVals: DynPinVals=Array ("_defballHDR0","_defballHDR0", _
"_defballHDR1","_defballHDR1", "_defballHDR1", _
"_defballHDR2","_defballHDR2", _
"_defballHDR3","_defballHDR3","_defballHDR3","_defballHDR3","_defballHDR3")
Table.ballImage = DynPinVals(DNSVal)
end if
if cDYNGAMEBLADES then
Dim DynBladeVals: DynBladeVals=Array ("_defgbladeswoodblack0","_defgbladeswoodblack0",_
"_defgbladeswoodblack1","_defgbladeswoodblack1", "_defgbladeswoodblack1",_
"_defgbladeswoodblack2","_defgbladeswoodblack2",_
"_defgbladeswoodblack3","_defgbladeswoodblack3","_defgbladeswoodblack3","_defgbladeswoodblack3","_defgbladeswoodblack3")
Primitive5.image = DynBladeVals(DNSVal)
Primitive6.image = DynBladeVals(DNSVal)
end if
'**************************************************************************************
' [CC Color Correction] Textures must be CC corrected to work
'**************************************************************************************
Const UseMixGtoB = 1
Dim FlGlobals : FlGlobals=Array (1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.0,5.0)
Dim DivGlobal: DivGlobal = FlGlobals(DNSVal) * 1.0 ' multiply between 1.0 to 0.75, 1.0 = default
Dim DivClrCor: DivClrCor = 1.1
Dim BlueDiv:BlueDiv = 1.0* DivGlobal
Dim RedDiv:RedDiv = 0.9* DivGlobal
Dim RedGreenDiv:RedGreenDiv = 1.0* DivGlobal
Dim FullSpecDiv:FullSpecDiv = 0.1* DivGlobal
Dim CCFull: CCFull = 1.4 * DivClrCor
Dim CCBlue: CCBlue = 1.2 * DivClrCor
Dim CCRedGreen: CCRedGreen = 0.9 * DivClrCor
Dim CCRed: CCRed = 0.9 * DivClrCor
' original values depricated
'Dim FlValues : FlValues=Array (1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0)
'Dim AMTValues: AMTValues=Array (500,3000,4000,8000,16000,32000,64000,128000,128000,128000,128000,128000)
'Dim BiasValues: BiasValues=Array (-100,-90,-80,-70,-60,-50,-40,-30,-20,-10,-9,-8)
'Dim MixBlueChan: MixBlueChan=Array (8.0*BlueDiv, 16.0*BlueDiv, 34.0*BlueDiv, 64.0*BlueDiv, 72.0*BlueDiv, 80.0*BlueDiv, 84.0*BlueDiv, 82.0*BlueDiv, 80.0*BlueDiv, 78.0*BlueDiv, 76.0*BlueDiv)
'Dim MixRedChan: MixRedChan=Array (16.0 * RedDiv, 16.0* RedDiv, 34.0* RedDiv, 64.0* RedDiv, 72.0* RedDiv, 80.0* RedDiv, 84.0* RedDiv, 82.0* RedDiv, 80.0* RedDiv, 78.0* RedDiv, 76.0* RedDiv)
'Dim MixRedGreenChan: MixRedGreenChan=Array (8.0*RedGreenDiv, 16.0*RedGreenDiv, 34.0*RedGreenDiv, 64.0*RedGreenDiv, 72.0*RedGreenDiv, 80.0*RedGreenDiv, 84.0*RedGreenDiv, 82.0*RedGreenDiv, 80.0*RedGreenDiv, 78.0*RedGreenDiv, 76.0*RedGreenDiv)
'Dim MixFullSpectrum: MixFullSpectrum=Array (8.0*FullSpecDiv, 16.0*FullSpecDiv, 34.0*FullSpecDiv, 64.0*FullSpecDiv, 72.0*FullSpecDiv, 73.0*FullSpecDiv, 74.0*FullSpecDiv, 74.0*FullSpecDiv, 74.0*FullSpecDiv, 74.0*FullSpecDiv, 74.0*FullSpecDiv)
'Dim CCFSValues: CCFSValues=Array (100.0*CCFull, 1.0*CCFull, 0.1*CCFull, 0.01*CCFull, 0.001*CCFull, 0.0001*CCFull, 0.0001*CCFull, 0.0001*CCFull, 0.0001*CCFull,0.0001*CCFull,0.0001*CCFull)
'Dim CCBlueValues: CCBlueValues=Array (0.9*CCBlue, 1.0*CCBlue, 1.2*CCBlue, 1.4*CCBlue, 1.5*CCBlue, 1.55*CCBlue, 1.56*CCBlue, 1.565*CCBlue, 1.568*CCBlue, 1.569*CCBlue, 1.569*CCBlue)
'Dim MixGtoB : MixGtoB=Array (1,1,2,2,3,4,5,6,7,8,9,10)
'new values
Dim FlValues : FlValues =Array (1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0)
Dim AMTValues: AMTValues =Array (500,3000,4000,8000,16000,32000,64000,80000,90000,100000,128000,128000)
Dim BiasValues: BiasValues =Array (-100,-90,-80,-70,-60,-50,-40,-30,-20,-10,-9,-8)
Dim MixBlueChan: MixBlueChan =Array (8.0*BlueDiv , 16.0*BlueDiv , 19.0*BlueDiv , 20.0*BlueDiv , 30.0*BlueDiv , 60.0*BlueDiv , 21.0*BlueDiv , 52.0*BlueDiv , 70.5*BlueDiv , 100.0*BlueDiv , 100.0*BlueDiv)
Dim MixRedChan: MixRedChan =Array (8.0*RedDiv , 16.0* RedDiv , 19.0* RedDiv , 20.0* RedDiv , 30.0* RedDiv , 60.0* RedDiv , 21.0* RedDiv , 52.0* RedDiv , 70.5* RedDiv , 100.0* RedDiv , 100.0* RedDiv)
' | | |
Dim MixRedGreenChan: MixRedGreenChan=Array (8.0*RedGreenDiv, 16.0*RedGreenDiv, 19.0*RedGreenDiv, 20.0*RedGreenDiv, 30.0*RedGreenDiv, 60.0*RedGreenDiv, 21.0*RedGreenDiv, 52.0*RedGreenDiv, 70.5*RedGreenDiv, 100.0*RedGreenDiv, 100.0*RedGreenDiv)
Dim MixFullSpectrum: MixFullSpectrum=Array (8.0*FullSpecDiv, 16.0*FullSpecDiv, 19.0*FullSpecDiv, 20.0*FullSpecDiv, 30.0*FullSpecDiv, 60.0*FullSpecDiv, 20.0*FullSpecDiv, 52.0*FullSpecDiv, 70.5*FullSpecDiv, 100.0*FullSpecDiv, 100.0*FullSpecDiv)
Dim CCFSValues: CCFSValues =Array (100.0*CCFull , 1.0*CCFull , 0.1*CCFull , 0.01*CCFull , 0.001*CCFull , 0.0001*CCFull , 0.0001*CCFull , 0.0001*CCFull , 0.0001*CCFull , 0.0001*CCFull , 0.0001*CCFull)
Dim CCBlueValues: CCBlueValues =Array (0.9*CCBlue , 1.0*CCBlue , 1.2*CCBlue , 1.4*CCBlue , 1.5*CCBlue , 1.55*CCBlue , 1.56*CCBlue , 1.565*CCBlue , 1.568*CCBlue , 1.569*CCBlue , 1.569*CCBlue)
Dim MixGtoB : MixGtoB=Array (1,1,2,2,3,4,5,6,7,8,9,10)
Dim FlData : FlData=Array (Flasher17,Flasher16,Flasher19,Flasher18,Flasher20,Empty,Empty,Empty)
'half blue channel
FlData(0).amount = AMTValues(DNSVal ) * DivValues3(DNSVal)
FlData(0).DepthBias = BiasValues(DNSVal) * 100.0
FlData(0).intensityscale = FlData(0).intensityscale * MixBlueChan(DNSVal) '0.0008'
FlData(0).opacity = CCBlueValues(DNSVal) '* CCFSValues(DNSVal)'
'Full blue channel
if UseMixGtoB then
FlData(0).Color = RGB(0, MixGtoB(DNSVal), 10)
end if
'full red channel
FlData(1).amount = AMTValues(DNSVal ) * DivValues3(DNSVal)
FlData(1).DepthBias = BiasValues(DNSVal) * 100.0
FlData(1).intensityscale = FlData(1).intensityscale * (MixRedChan(DNSVal) * SysDNSVal(DNSVal)) '0.0008'
FlData(1).opacity = CCRed
'Full red/green channel
FlData(2).amount = AMTValues(DNSVal ) * DivValues3(DNSVal)
FlData(2).DepthBias = BiasValues(DNSVal) * 100.0
FlData(2).intensityscale = FlData(2).intensityscale * MixRedGreenChan(DNSVal) '0.0008'
FlData(2).opacity = CCRedGreen
'Full Spectrum
FlData(3).amount = AMTValues(DNSVal ) * (DivValues3(DNSVal) * 0.1)
FlData(3).DepthBias = BiasValues(DNSVal) * 100.0
'FlData(3).intensityscale = FlData(3).intensityscale * MixFullSpectrum(DNSVal) '0.0008'
'FlData(3).opacity = FlData(3).opacity * CCFSValues(DNSVal)
'Full Spectrum
FlData(4).amount = AMTValues(DNSVal ) * (DivValues3(DNSVal) * 0.1)
FlData(4).DepthBias = BiasValues(DNSVal) * 100.0
'FlData(4).intensityscale = FlData(4).intensityscale * MixFullSpectrum(DNSVal) '0.0008'
'FlData(4).opacity = FlData(4).opacity * CCFSValues(DNSVal)
Const USEBGBLUE = 0
Const USEBGREDGREEN = 0
Const nDAMPNBLUE = 0
Const nDAMPNREDGREEN = 0
Dim nbChan: nbChan = 1.0
Dim bCCXDN : bCCXDN=Array (0.1*nbChan,0.2*nbChan,0.3*nbChan,0.4*nbChan,0.5*nbChan,0.6*nbChan,0.7*nbChan,0.8*nbChan,0.9*nbChan,1.0*nbChan,1.0*nbChan,1.0*nbChan,1.0*nbChan,1.0*nbChan)
Dim nrgChan: nrgChan = 1.0
Dim rgCCXDN : rgCCXDN=Array (0.1*nrgChan,0.2*nrgChan,0.3*nrgChan,0.4*nrgChan,0.5*nrgChan,0.6*nrgChan,0.7*nrgChan,0.8*nrgChan,0.9*nrgChan,1.0*nrgChan,1.0*nrgChan,1.0*nrgChan,1.0*nrgChan,1.0*nrgChan)
Dim nnn
if cUSEBGLASSCCX then
' when too much blue influence dampen blue chan
if nDAMPNBLUE then
nnn=0
For each nxx in MixBlueChan
MixBlueChan(nnn) = MixBlueChan(nnn) * bCCXDN(nnn)
nnn = nnn +1
Next
end If 'nDAMPNBLUE
' when too much red/green influence dampen blue chan
if nDAMPNREDGREEN then
nnn=0
For each nxx in MixRedGreenChan
MixRedGreenChan(nnn) = MixRedGreenChan(nnn) * rgCCXDN(nnn)
nnn = nnn +1
Next
end if 'nDAMPNREDGREEN
' add (FlBGBlueSpec,FlBGRedGreenSpec) to FlData Array and set indexes correctly
Dim BGCCXVals : BGCCXVals=Array (1.6,1.5,1.4,1.3,1.1,1.03,1.01,1.008,1.005,1.003 , 1.001, 1.0005)
Dim nOff: nOff = 0
if USEBGBLUE then
FlData(4+nOff).visible = 1
end if
if USEBGREDGREEN then
FlData(5+nOff).visible = 1
end if
FlData(4+nOff).opacity = OPSValues(DNSVal + DNShift) / DivValues(DNSVal)
FlData(4+nOff).intensityscale = DNSValues(DNSVal + DNShift) /DivValues(DNSVal)
FlData(5+nOff).opacity = OPSValues(DNSVal + DNShift) /DivValues(DNSVal)
FlData(5+nOff).intensityscale = DNSValues(DNSVal + DNShift) /DivValues(DNSVal)
' blue chan
FlData(4+nOff).amount = AMTValues(DNSVal ) * (DivValues3(DNSVal) * BGCCXVals(DNSVal) )' 0.001)
FlData(4+nOff).DepthBias = BiasValues(DNSVal) * 100.0
FlData(4+nOff).intensityscale = FlData(4+nOff).intensityscale * MixBlueChan(DNSVal) '0.0008'
FlData(4+nOff).opacity = CCBlueValues(DNSVal) '* CCFSValues(DNSVal)'
' red green chan
FlData(5+nOff).amount = AMTValues(DNSVal ) * (DivValues3(DNSVal) * BGCCXVals(DNSVal) ) '0.001)
FlData(5+nOff).DepthBias = BiasValues(DNSVal) * 100.0
FlData(5+nOff).intensityscale = FlData(5+nOff).intensityscale * MixRedGreenChan(DNSVal) '0.0008'
FlData(5+nOff).opacity = CCRedGreen
end if 'cUSEBGLASSCCX
if cUSECCUPBOOST then
Dim DivCCUP: DivCCUP = 0.8
'original values depricated
'Dim CCUPValues : CCUPValues=Array (1.0*DivCCUP,1.0*DivCCUP,1.0*DivCCUP,1.5*DivCCUP,2.5*DivCCUP,5.0*DivCCUP,10.0*DivCCUP,20.0*DivCCUP,30.0*DivCCUP,40.0*DivCCUP,40.0*DivCCUP)
'new values
Dim CCUPValues : CCUPValues=Array (1.0*DivCCUP,1.0*DivCCUP,1.0*DivCCUP,1.5*DivCCUP,2.5*DivCCUP,5.0*DivCCUP,10.0*DivCCUP,12.0*DivCCUP,20.0*DivCCUP,40.0*DivCCUP,40.0*DivCCUP)
FlData(3).intensityscale = FlData(3).intensityscale * MixFullSpectrum(DNSVal) * CCUPValues(DNSVal)'0.0008'
FlData(3).opacity = FlData(3).opacity * CCFSValues(DNSVal) * CCUPValues(DNSVal)
FlData(4).intensityscale = FlData(4).intensityscale * MixFullSpectrum(DNSVal) * CCUPValues(DNSVal)'0.0008'
FlData(4).opacity = FlData(4).opacity * CCFSValues(DNSVal) * CCUPValues(DNSVal)
'FlData(4).intensityscale = FlData(4).intensityscale * MixFullSpectrum(DNSVal) '0.0008'
'FlData(4).opacity = FlData(4).opacity * CCFSValues(DNSVal)
Else
FlData(3).intensityscale = FlData(3).intensityscale * MixFullSpectrum(DNSVal) '0.0008'
FlData(3).opacity = FlData(3).opacity * CCFSValues(DNSVal)
FlData(4).intensityscale = FlData(4).intensityscale * MixFullSpectrum(DNSVal) '0.0008'
FlData(4).opacity = FlData(4).opacity * CCFSValues(DNSVal)
end if
FlValues(0) = FlData(0).intensityscale
FlValues(1) = FlData(1).intensityscale
FlValues(2) = FlData(2).intensityscale
FlValues(3) = FlData(3).intensityscale
Sub SetSMLiDNS(object, enabled)
If enabled > 0 then
object.intensity = enabled * SysDNSVal(DNSVal) /DivValues2(DNSVal)
Else
object.intensity =0
end if
End Sub
Sub SetSMFlDNS(object, enabled)
If enabled > 0 then
object.opacity = enabled / DivValues2(DNSVal)
else
object.opacity = 0
end if
End Sub
Sub SetSLiDNS(object, enabled)
If enabled then
object.intensity = 1 * SysDNSVal(DNSVal) /DivValues2(DNSVal)
Else
object.intensity =0
end if
End Sub
Sub SetSFlDNS(object, enabled)
If enabled then
object.opacity = 1 * OPSValues(DNSVal) / DivLevel
else
object.opacity = 0
end if
End Sub
Sub SetDNSFlash(nr, object)
Select Case LightState(nr)
Case 0 'off
FlashLevel(nr) = FlashLevel(nr) - FlashSpeedDown(nr)
If FlashLevel(nr) < FlashMin(nr) Then
FlashLevel(nr) = FlashMin(nr)
LightState(nr) = -1 'completely off, so stop the fading loop
End if
Object.IntensityScale = FlashLevel(nr) * SysDNSVal(DNSVal) /DivValues2(DNSVal)
Case 1 ' on
FlashLevel(nr) = FlashLevel(nr) + FlashSpeedUp(nr)
If FlashLevel(nr) > FlashMax(nr) Then
FlashLevel(nr) = FlashMax(nr)
LightState(nr) = -1 'completely on, so stop the fading loop
End if
Object.IntensityScale = FlashLevel(nr) * SysDNSVal(DNSVal) /DivValues2(DNSVal)
End Select
End Sub
Sub SetDNSFlashm(nr, object) 'multiple flashers, it just sets the intensity
Object.IntensityScale = FlashLevel(nr) * SysDNSVal(DNSVal) /DivValues2(DNSVal)
End Sub
Sub SetDNSFlashex(object, value) 'it just sets the intensityscale for non system lights
Object.IntensityScale = value * SysDNSVal(DNSVal) /DivValues2(DNSVal)
End Sub
' ***************************************************************************
'
' ****************************************************************************
LoadVPM "01560000", "Capcom.VBS", 3.10
Dim cNewController
Sub LoadVPM(VPMver, VBSfile, VBSver)
Dim FileObj, ControllerFile, TextStr
On Error Resume Next
If ScriptEngineMajorVersion < 5 Then MsgBox "VB Script Engine 5.0 or higher required"
ExecuteGlobal GetTextFile(VBSfile)
If Err Then MsgBox "Unable to open " & VBSfile & ". Ensure that it is in the same folder as this table. " & vbNewLine & Err.Description
cNewController = 1
If cController = 0 then
Set FileObj=CreateObject("Scripting.FileSystemObject")
If Not FileObj.FolderExists(UserDirectory) then
Msgbox "Visual Pinball\User directory does not exist. Defaulting to vPinMame"
ElseIf Not FileObj.FileExists(UserDirectory & "cController.txt") then
Set ControllerFile=FileObj.CreateTextFile(UserDirectory & "cController.txt",True)
ControllerFile.WriteLine 1: ControllerFile.Close
Else
Set ControllerFile=FileObj.GetFile(UserDirectory & "cController.txt")
Set TextStr=ControllerFile.OpenAsTextStream(1,0)
If (TextStr.AtEndOfStream=True) then
Set ControllerFile=FileObj.CreateTextFile(UserDirectory & "cController.txt",True)
ControllerFile.WriteLine 1: ControllerFile.Close
Else
cNewController=Textstr.ReadLine: TextStr.Close
End If
End If
Else
cNewController = cController
End If
Select Case cNewController
Case 1
Set Controller = CreateObject("VPinMAME.Controller")
If Err Then MsgBox "Can't Load VPinMAME." & vbNewLine & Err.Description
If VPMver>"" Then If Controller.Version < VPMver Or Err Then MsgBox "VPinMAME ver " & VPMver & " required."
If VPinMAMEDriverVer < VBSver Or Err Then MsgBox VBSFile & " ver " & VBSver & " or higher required."
Case 2
Set Controller = CreateObject("UltraVP.BackglassServ")
Case 3,4
Set Controller = CreateObject("B2S.Server")
End Select
On Error Goto 0
End Sub
'*************************************************************
'Toggle DOF sounds on/off based on cController value
'*************************************************************
Dim ToggleMechSounds
Function SoundFX (sound)
If cNewController= 4 and ToggleMechSounds = 0 Then
SoundFX = ""
Else
SoundFX = sound
End If
End Function
Sub DOF(dofevent, dofstate)
If cNewController>2 Then
If dofstate = 2 Then
Controller.B2SSetData dofevent, 1:Controller.B2SSetData dofevent, 0
Else
Controller.B2SSetData dofevent, dofstate
End If
End If
End Sub
Const cGameName = "bbb109"
Const UseSolenoids = 1
Const UseLamps = 0
Const UseSync = 1
Const HandleMech = 0
'Standard Sounds
Const SSolenoidOn = "Solenoid"
Const SSolenoidOff = ""
Const SCoin = "Coin"
'******Variables***************
Dim xx
Dim bsTrough, DTBank4, DTBank3, DTBank1, bsRHole
Dim captb1, captb2, captb3, captb4
Dim bsTHelp, bsSw46, bsSw47, bsSw48
Dim bsALL, bsALR
Dim xoff, yoff, zoff, xrot, zscale, xcen, ycen
'********Table Init************
Sub Table_Init
' Thalamus : Was missing 'vpminit me'
vpminit me
With Controller
.GameName = cGameName
.SplashInfoLine = "Big Bang Bar, Capcom 1996"
.HandleMechanics = 0
.HandleKeyboard = 0
.ShowDMDOnly = 1
.ShowFrame = 0
.ShowTitle = 0
.Hidden = DesktopMode
End With
On Error Resume Next
Controller.Run
If Err Then MsgBox Err.Description
On Error Goto 0
'Nudging
vpmNudge.TiltSwitch=10
vpmNudge.Sensitivity=5
vpmNudge.TiltObj=Array(Bumper1,Bumper2,Bumper3,LeftSlingshot,RightSlingshot)
'********Trough***************
Set bsTrough = New cvpmBallStack
With bsTrough
.InitSw 35,36,37,38,39,0,0,0
.InitKick BallRelease, 90, 8
.InitExitSnd SoundFX("ballrelease"), SoundFX("Solenoid")
.Balls = 4
End With
'********Right Hole***********
Set bsRHole = New cvpmBallStack
With bsRHole
.InitSaucer sw67, 67, 220, 18
.KickZ = 0.4
.InitExitSnd SoundFX("scoop_exit"), SoundFX("Solenoid")
.KickForceVar = 2
End With
'Ball lock stacks
Set bsSw46 = New cvpmBallStack
With bsSw46
.InitSw 0, 0, 0, 0, 0, 0, 0, 0
End With
Set bsSw47 = New cvpmBallStack
With bsSw47
.InitSw 0, 0, 0, 0, 0, 0, 0, 0
End With
Set bsSw48 = New cvpmBallStack
With bsSw48
.InitSw 0, 0, 0, 0, 0, 0, 0, 0
End With
Set bsTHelp = New cvpmBallStack 'To help if all 4 balls get caught in lower lock
With bsTHelp
.InitSw 0, 0, 0, 0, 0, 0, 0, 0
End With
'********Alien Locks ***********
Set bsALL = New cvpmBallStack
With bsALL
.InitSw 0, 0, 0, 0, 0, 0, 0, 0
.InitKick sw61Out, 160, 1
End With
Set bsALR = New cvpmBallStack
With bsALR
.InitSw 0, 0, 0, 0, 0, 0, 0, 0
.InitKick sw62Out, 190, 1
End With
'********DropTargets
Set DTBank4 = New cvpmDropTarget
With DTBank4
.InitDrop Array(sw17,sw18,sw19,sw20), Array(17,18,19,20)
.Initsnd "", SoundFX("resetdrop")
End With
Set DTBank3 = New cvpmDropTarget
With DTBank3
.InitDrop Array(sw49,sw50,sw51), Array(49,50,51)
.Initsnd "", SoundFX("resetdrop")
End With
Set DTBank1 = New cvpmDropTarget
With DTBank1
.InitDrop sw58, 58
.Initsnd "", SoundFX("resetdrop")
End With
'*******Captive balls
' Initialize Captive Ball System
Controller.Switch(77) = True : Controller.Switch(78) = False : Controller.Switch(79) = True : Controller.Switch(80) = False
BP1 = True : BP2 = True : BP3 = True : BP4 = True : BP1R = False : BP2R = False : BP3L = False : BP4L = False
capmove1.enabled = true : capmove3.enabled = true : capmove3L.enabled = false: capmove1R.enabled = false
capmove2.enabled = true : capmove4.enabled = true : capmove4L.enabled = true : capmove2R.enabled = true
CreateBalls
'********Main Timer init
PinMAMETimer.Interval = PinMAMEInterval
PinMAMETimer.Enabled = 1
'********KickBack Init
kickback.PullBack
'********Diverters Init
DivLR.IsDropped=1
setup_backglass()
End Sub
Dim topoff
Sub setup_backglass()
xoff = 460
yoff =0
zoff = 740
xrot = -90
if Table.ShowFSS = true then
'Table.ColorGradeImage = "_ColorGrade_8"
BBBbgDark.x = xoff
BBBbgDark.y = yoff
BBBbgDark.height = zoff
BBBbgDark.rotx = xrot
BBBbgHigh.x = xoff
BBBbgHigh.y = yoff
BBBbgHigh.height = zoff
BBBbgHigh.rotx = xrot
BBBbgHigh1.x = xoff
BBBbgHigh1.y = yoff
BBBbgHigh1.height = zoff
BBBbgHigh1.rotx = xrot
BBBbgFrame.x = xoff
BBBbgFrame.y = yoff
BBBbgFrame.height = zoff
BBBbgFrame.rotx = xrot
BBBbgFrameMask.x = xoff
BBBbgFrameMask.y = yoff
BBBbgFrameMask.height = zoff
BBBbgFrameMask.rotx = xrot
' the topper
topoff = 520
If Table.inclination >= 65.0 then
TopDark.x = xoff
TopDark.y = yoff
TopDark.height = zoff +topoff
TopDark.rotx = xrot
TopHigh.x = xoff
TopHigh.y = yoff
TopHigh.height = zoff +topoff
TopHigh.rotx = xrot
TopHigh1.x = xoff
TopHigh1.y = yoff
TopHigh1.height = zoff +topoff
TopHigh1.rotx = xrot
TopHigh2.x = xoff
TopHigh2.y = yoff
TopHigh2.height = zoff +(topoff-100)
TopHigh2.rotx = xrot
else
end if
DMD.x = xoff +20
DMD.y = yoff
DMD.height = zoff -280
DMD.rotx = xrot
DMD1.x = xoff +20
DMD1.y = yoff +400
DMD1.height = zoff -450
DMD1.rotx = xrot +(-180)
center_graphics()
Else