-
Notifications
You must be signed in to change notification settings - Fork 30
/
Batman (Data East 1991) VPW.vbs
4742 lines (3961 loc) · 164 KB
/
Batman (Data East 1991) VPW.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
'##############################################################################
'##############################################################################
'####### ########
'####### Batman ########
'####### (Data East 1991) ########
'####### ########
'##############################################################################
'##############################################################################
'
'VPW Table Tuneup Mod v1.0
'Based on Javiers VPX version, some assets from Dark and the original playfield by 85vett.
'
' ** VPW Mod V1.0 - CHANGE LOG **
'**************************************
' VPin Workshop Revisions
'**************************************
' Started from Skitso mod
' 002 cyberpez - All table objects and playfield re-aligned, altered and resized to correct proportions.
' 003 skitso - visual pass
' 003 cyberpez - Added primitive playfield, Reworked Joker Ramp and trough (Primitives - got rid of fall through kickers) also reworked musuim kicker. Chanaged playfield image to one without transparent holes.
' 006 baldgeek - Added Fleep Sounds
' 007 fluffhead35 - nFozzy physics
' 008 skitso - repositioned and tweaked lower playfield GI lights, remade gangster inserts, batman face and logo inserts and moon insert with skitso style, removed primitive playfield that was of wrong size.
' 009 skitso - repositioned rest of the GI lights, made bat cave toy opaque, made flugelheim toy disable light from behind, fixed ton of depth bias issues around right plastic ramp. Cyberpez added mesh playfield back.
' 010 cyberpez - added nFozzy lighting script. Primitive inserts. Flupper Flasher Domes, sixtoe-tweaked plastic ramp. Probably other things.
' 011 skitso - redone joker ramp lighting and flashers, improved left side dome flashers, improved top flashers, added proper bumper lights, tweaked insert primitive material colors, slight tone tweak to PF, improved skitso style inserts (moon, batman face and bat logo), Added shadow to plunger lane and bat mobile.
' 013 skitso - improved backwall flashers (better color, a tad thicker font for better readability), improved left flashers, tweaked gangster inserts, small tweak to top bumper light
' 014 gtxjoe - add debug shot tester (Press 2 for outlane blocker, Press and hold key to test shots: w e r y u i p a s f g h. While holding a key, use flippers to adjust shot angle )
' 014b cyberpez - reworked museum again. I think its working.
' 015 skitso - remade bat cave flasher, tweaked blue insert_on material
' 017 iaakki - 3 prim insert rework
' 018 iaakki - 3 prim insert rework continued
' 019 iaakki - 3 prim insert rework continued...
' 020 skitso - tweaked Joker ramp decals to have more pink tone. (warm lighting subdues the change though), improved right hand gangster insert (skitso style) and flasher, tweaked bumper lights more more accuracy, moved Flugelheim walls to more correct position and added shadow.
' 021c tomate - collidable ramp fixed, alternative apron adedd
' 022 skitso - tweaked iaakki's middle PF square 3 prim flashers. Added 2 arrow 3 prim flashers (first try, please be gentle)
' 023 iaakki - apron scaled, rubberizer added, targetbouncer added to posts and sleeves, live catch fixed, rubbers hit treshold fixed, slings tuned, flipper angles and sizes fixed, batcave texture swap disabled
' 024 Sixtoe - Fixed left flasher flare positions, added VR cabinet, room and modes, added blocker wall for left middle plastic as ball can jump over and behind it, aligned a couple of handful of metals, aligned top middle left flasher decal, removed collidable from a handful of things, aligned batmobile in shooter lane, aligned and resized batcave a bit (it was very tall in VR), adjusted triggers (dropped and lengthened), adjusted apron wall and made visible for VR, adjusted apron guard prim, adjusted depth bias of shooter land plastic to -1000
' 025 skitso - added skitso style insert "see through" effect around center playfield square bat tv inserts, 'joker's mouth 4 million' insert, green multiplier inserts and 'shoot again' insert at the bottom of the table.
' 026 skitso - remade the two green lamps on top of the joker ramp, repositioned orange flasher domes.
' 027 cyberpez - started to change out nut bolts and things. Fixed plunger lane. Added ramp tweak to cave entrance . Started changing diverter.
' 028 skitso - set slope to 5.2, bumper force set to 9. Tweaked left dome flashers, moved multiplier insert prims to z-1, fixed million plus and batlogo flashers on top of the batcave, improved bat logo lamp on flugelheim front, improved plunger lane red bulb, resized all GI lights to new table measurements, fixed texture swap for bumpers and Flugelheim flashers, improved Flugelheim flashers, tweaked bumper off texture, made Flugelheim and dome flashers reflect from batcave, small tweaks, iaakki improved batcave fading and fixed flipper nudge values.
' 029 cyberpez - Changed plunger release speed to 90. Change slings to 4. Lowered back wall flashes. Added rails and primitive flasher bulbs under Joker.
' 030 iaakki - Flugelgugel flashers reworked to have own timer. Made it swap PF flash to different depending to port state. Levels to be adjusted
' 031 skitso - further tweaked Flugelheim flashers and added side blade reflection, tweaked Joker ramp flashers, improved Flugelheim rising wall texture, fixed sticky plungerlane
' 032 cyberpez - Adjusted clear plastics. More nuts / bolts / screws. Made top left gate/bracket custom primitive and animated. Maybe rotated left orage domes to line up with holes. Shifted Museum back and left a bit. Adjusted Museum trough, hope it fixed 3ball multiball. Adjusted rubber on the small random posts by bumpers. Adjusted top side of lane guides.
' 033 skitso - fixed museum flasher locations, fixed top right ramp/protector depth bias issue, removed ball reflection status from few GI bulbs, fixed jackpot insert below Flugelheim. Added a slideblade reflection to left dome flashers (code missing)
' 034 iaakki - flugelheim pTrough primitive adjusted to work better for 3-ball mb, bar hit sound added, left domereflection added to code
' 035 skitso - tweaked left dome reflection
' 036 skitso - fixed minor flasher clipping under Joker ramp, fixed clipping decal on top skill shot flasher dome, improved w/lit insert flasher
' 037 cyberpez - shrunk museum a bit. More nuts and bolts and things. adjusted switch 28 and 29 posistion, animated primitive gates. Animated switches for Joker Eye's and Mouth. Tweaks to diverter.
' 038 skitso - resized and moved museum flashers once more. Removed one stray peg inside museum, made Joker mouth flasher visible through the mouth hole.
' 039 iaakki - rtx ball shadow code included with ramp rolling etc. Some depth bias or z-order issues visible. Shadows are too dark on purpose. Should be reduced once it work
' 040 skitso - resized insert prims to correct size and shape. Removed playfield reflections from insert prims and a bunch of other crap that didn't need it for a hefty performance boost
' 041 iaakki - NormalMapped inserts only in VR mode, right ramp sleeves fixed, shadow depth bias debugged etc
' 042 cyberpez - orginization baby. Also tweaked bumper "ring drop offset. changed out "random" posts on either side of bumper area.
' 043 apophis - Fixed the Fleep installation. Fixed some ballshadow issues...shadows are still bugging on insert primitives. Cleaned up the script a bit.
' 044 Wylte - Fixed shadows, with update to latest primitive/image/materials. Updated RollingUpdate sub with latest shadow code. Thinned shadows slightly
' 045 fluffhead35 - Added BallPitchV Function and used for Plastic Ramp Sounds. Changed TargetBouncerFactor to 1.5. Added RubbersD point to make microbounces happen
' 046 fluffhead35 - Updated PlasticRamp Sound and amplified the volume of the sound.
' 047 fluffhead35 - Updated BallRoll Sound and amplified the volume of the sound. Fixed BallPitchV as it was on a BallRoll sound and put it on plastic ramp sound. Added in ligic by oqqsan to stop ball rolling sound at no balls in play.
' 048 fluffhead35 - Reverted TargetBouncer Logic to iaakki version. Changed BallRoll Sound to use version with lower amplification. Enabled sw14 for BIPL
' 049 oqqsan - Fix for poltergeist ball at plunger (forgot to save?)
' 050 Wylte - Implemented ". Commented out dynamic shadow z live updates, left ambient for ramps. Changed recommended TargetBouncerFactor maximum to 1.5
' 051 fluffhead35 - Implemented option BallRollAmpFactor to set amplification factor for BallRoll Sounds.
' 052 cyberpez - added a couple stragic walls to help stop stuck balls. Added wall under Flugelgugel to stop clipping of plastic. Stop ball collison bellow 0 Z. Started adding options.
' 053 Sixtoe - New playfield mesh, adjusted playfield hole primitives and added new playfield edge texture, fixed lots of VR depth bias issues, hooked up plunger, changed black nut material to black powdercoat to make it slightly mmore visible, adjusted primtives to line up better in 3D, adjusted collidable primtivies so they line up correctly, adjusted sideblade flashers to light orange-ish so it doesn't blow out with pure white anymore, added cut down museum flasher so it doesn't stick out of the cabinet. Split rubber collidables where they have a post in the middle, probably some other stuff I've forgotten...
' 054 cyberpez - copied LUT swapper from tftc, JokerRampFlasher mod. halfpost mod. rubber color mod. added a couple missing screws and adjusted floating rubbers.
' 055 tomate - New apron added, cab POV changed
' 056 Skitso - fixed default LUT (vpx original) to what it was earlier, tweaked apron texture and disable lighting. Added subtle shadow to the plunger lane, below bat mobile/apron. Set white rubbers as default. Made final visual pass with tiny tweaks here and there.
' 057/8 Sixtoe - Various tweaks and fixed, desktop pov fixed, script cleaned, rails fixed in desktop, playfield mesh error fixed, lights cut to shape
' 059 Wylte - Gave 4 dome flashers images for 10.7, set TestMode to 0 by default, placed blockerwalls within testmode, testing higher flasher intensity
' 060 Leojreimroc - Implemented VR Backglass Flashers and GI. Raised apron wall for VR. Fixed VR plunger.
' 061 Leojreimroc - Backglass Flashers are now a separate option. LUT Filename changed. Added LUT sounds.
' 062 Sixtoe - Added cabinet mode, other tweaks
Option Explicit
Randomize
'///////////////////////-----General Sound Options-----///////////////////////
'// VolumeDial:
'// VolumeDial is the actual global volume multiplier for the mechanical sounds.
'// Values smaller than 1 will decrease mechanical sounds volume.
'// Recommended values should be no greater than 1.
Const VolumeDial = 0.8
'///////////////////////-----Rubberizer-----////////////////////
Const RubberizerEnabled = 1 '0 = normal flip rubber, 1 = more lively rubber for flips
'///////////////////////-----Target Bouncer-----////////////////////
Const TargetBouncerEnabled = 1 '0 = normal standup targets, 1 = bouncy targets
Const TargetBouncerFactor = 1.5 'Level of bounces. 0.2 - 1.5 is probably usable value.
'/////////////////////-----Ball Shadows-----/////////////////////
Const DynamicBallShadowsOn = 1 '0 = no dynamic ball shadow, 1 = enable dynamic ball shadow
'/////////////////////-----BallRoll Sound Amplification -----/////////////////////
Const BallRollAmpFactor = 2 '0 = no amplification, 1 = 2.5db amplification, 2 = 5db amplification, 3 = 7.5db amplification, 4 = 9db amplification (aka: Tie Fighter)
'///////////////////////-----VR Room-----///////////////////////
Const VRRoom = 0 '0 - VR Room off, 1 - Minimal Room, 2 - Ultra Minimal
'///////////////////////-----Cabinet Mode-----///////////////////////
Const CabinetMode = 1 '0 - Rails On, 1 - Rails Off
'///////////////////////-----VR Flashing Backglass-----///////////////////////
Const BackglassFlash = 0 '0 - Static Backglass 1- Flashing Backglass
''''''''''''''''''''''''
' Other Visual Options '
''''''''''''''''''''''''
'Rubber Color
'0=white
'1-black
RubberColor = 0
'Flipper Color
'0=white/black
'1=yellow/black
FlipperColor = 1
'Half Posts
'0=no
'1=yes
HalfPosts = 0
'Joker Ramp Flasher Color
'0=Original
'1=Green
'2=GreenRed
JokerFlasherColor = 0
'*********** Set the default LUT set *********************************
'You can change LUT option within game with left and right CTRL keys
Dim LUTset, DisableLUTSelector, LutToggleSound
LoadLUT
'LUTset = 11 'override saved LUT for debug
SetLUT
DisableLUTSelector = 0 ' Disables the ability to change LUT option with magna saves in game when set to 1
LutToggleSound = 1 ' Enables sound when changing LUT lighting. Switch to 0 to disable.
'LUTset Types:
'0 = Fleep Natural Dark 1
'1 = Fleep Natural Dark 2
'2 = Fleep Warm Dark
'3 = Fleep Warm Bright
'4 = Fleep Warm Vivid Soft
'5 = Fleep Warm Vivid Hard
'6 = Skitso Natural and Balanced
'7 = Skitso Natural High Contrast
'8 = 3rdaxis Referenced THX Standard
'9 = CalleV Punchy Brightness and Contrast
'10 = TT & Ninuzzu Original
'11 = VPW Orig
'12 = VPW LUT1on1
'13 = VPW LUTbassgeige1
'14 = VPW LUTblacklight
'///////////////////////-----End Of Options-----///////////////////////
On Error Resume Next
ExecuteGlobal GetTextFile("controller.vbs")
If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package"
On Error Goto 0
Const Ballsize = 50
Const BallMass = 1
Dim DesktopMode:DesktopMode = Table1.ShowDT
Dim UseVPMDMD
If VRRoom <> 1 Then UseVPMDMD = True Else UseVPMDMD = DesktopMode
LoadVPM "01120100", "DE.VBS", 3.36
'********************
'Standard definitions
'********************
Const UseSolenoids = 2
Const UseLamps = 0
Const UseSync = 0
Const HandleMech = 0
Const cSingleLFlip = 0
Const cSingleRFlip = 0
' Standard Sounds
Const SSolenoidOn = ""
Const SSolenoidOff = ""
Const SCoin = ""
'Solenoids
SolCallback(1) = "bsTrough.SolIn" '6-ball lockout (1L)
SolCallback(2) = "bsTrough.SolOut" 'ball eject (2L)
SolCallback(3) = "ScoopKickL" 'Left Scoop (3L)
SolCallback(4) = "SolAutoPlungerIM" 'Autolaunch (4L)
'NOT USED (5L)
SolCallback(6) = "ScoopKickR" 'Right Scoop (6L)
'NOT USED (7L)
SolCallback(8) = "Solknocker" 'Knocker (8L)
SolCallback(9) = "Sol9" 'FlashLamp x4 (2 backbox + 2 pf) (09)
'SolCallback(10) = "" 'L/R Relay (10)
SolCallback(11) = "Sol11" 'GI Relay (11)
SolCallback(12) = "Sol12" 'FlashLamp x4 (1 pf + 3 backbox (12)
SolCallback(13) = "Sol13" 'FlashLamp x4 (2 pf + 2 backbox) (13)
SolCallBack(14) = "Sol14" 'FlashLamp x4 (1 pf + 3 backbox) (14)
'SolCallBack(15) = "" 'Ticket Dispenser (15)
'SolCallBack(16) = "" 'Bar Motor (16)
'SolCallBack(17) = "" 'Left Bumper (17)
'SolCallBack(18) = "" 'Center Bumper (18)
'SolCallBack(19) = "" 'Right Bumper (19)
'SolCallBack(20) = "" 'Left Slingshot (20)
'SolCallBack(21) = "" 'Right Slingshot (21)
SolCallback(22) = "SolDiv" 'Ramp Diverter (22)
'NOT USED (23)
'NOT USED (24)
SolCallback(25) = "Sol25" 'Flashlamp X4 (3 pf + backbox) (1R)
SolCallback(26) = "Sol26" 'Flashlamp X4 (1 pf + 2 ramp + 1 backbox) (2R)
SolCallback(27) = "Sol27" 'Flashlamp X4 (2 pf + 2 backbox) (3R)
SolCallback(28) = "Sol28" 'Flashlamp X4 (2 pf + 2 backbox) (4R)
SolCallback(29) = "SetLamp 129," 'Flashlamp X4 (4 pf) (5R)
SolCallback(30) = "Sol30" 'Flashlamp X4 (3 pf + 1 backbox) (6R)
SolCallback(31) = "Sol31" 'Flashlamp X4 (3 pf + 1 backbox) (7R)
SolCallBack(32) = "Flash132" '"SetLamp 132," 'Flashlamp X4 (2 bat + 2 backbox) (8R)
SolCallback(46) = "SolRFlipper" 'Right Flipper
SolCallback(48) = "SolLFlipper" 'Left Flipper
' *************************************
' ***** VR Backglass Flasher Objects **
' *************************************
'
'SolCallback(9) = "Sol9" 'Moon
'SolCallback(11) = "Sol11" 'GI
'SolCallback(12) = "Sol12" '"B","M",City right
'SolCallback(13) = "Sol13" '"A","A"
'SolCallback(14) = "Sol14" '"T","M", Batmobile
'SolCallback(25) = "Sol25" 'City Right
'SolCallback(26) = "Sol26" 'Moon
'SolCallback(27) = "Sol27" 'Vicki,Batman
'SolCallback(28) = "Sol28" 'Batman Chest logo
'SolCallback(30) = "Sol30" 'Joker
'SolCallback(31) = "Sol31" 'City left
'SolCallback(32) = "Sol32" 'Top Right Windows
'************
' Table init.
'************
Const cGameName = "btmn_106"
Dim bsTrough, plungerIM, bsLScoop, bsRScoop, mBar
Dim activeShadowBall
Sub Table1_Init
vpmInit Me
With Controller
.GameName = cGameName
.Games(cGameName).Settings.Value("sound") = 1
If Err Then MsgBox "Can't start Game " & cGameName & vbNewLine & Err.Description:Exit Sub
.SplashInfoLine = "Batman, Data East 1991" & vbNewLine & "VPW"
.Games(cGameName).Settings.Value("rol") = 0
.HandleKeyboard = 0
.ShowTitle = 0
.ShowDMDOnly = 1
.ShowFrame = 0
.HandleMechanics = 0
.Hidden = 0
On Error Resume Next
.Run GetPlayerHWnd
If Err Then MsgBox Err.Description
On Error Goto 0
End With
' Nudging
vpmNudge.TiltSwitch = 1
vpmNudge.Sensitivity = 2
vpmNudge.tiltobj = Array(LeftSlingShot,RightSlingShot,Bumper1B,Bumper2B,Bumper3B)
PinMAMETimer.Interval = PinMAMEInterval
PinMAMETimer.Enabled = 1
' Trough
Set bsTrough = new cvpmTrough
With bsTrough
.Size = 3
.InitSwitches Array (13,12,11)
.EntrySw = 10
.InitExit BallRelease, 90, 6
.InitEntrySounds "Drain_1", SoundFX(SSolenoidOn,DOFContactors), SoundFX(SSolenoidOn,DOFContactors)
'.InitExitSounds SoundFX(SSolenoidOn,DOFContactors), SoundFX("fx_ballrel",DOFContactors)
.Balls = 3
.CreateEvents "bsTrough", Drain
End With
' Scoop Left
' Set bsLScoop = New cvpmSaucer
' With bsLScoop
' .InitKicker Sw39b, 39,50, 30, 1.56
' .InitSounds "scoopenter", SoundFX(SSolenoidOn,DOFContactors), SoundFX("salidadebola",DOFContactors)
' .CreateEvents "bsLScoop", sw39b
' End With
' Scoop Right
' Set bsRScoop = New cvpmTrough
' With bsRScoop
' .Size = 2
' .InitSwitches Array (52,53)
' .InitExit Sw52, 192, 25
' .InitEntrySounds "fx_chapa", SoundFX(SSolenoidOn,DOFContactors), SoundFX(SSolenoidOn,DOFContactors)
' .InitExitSounds SoundFX(SSolenoidOn,DOFContactors), SoundFX("salidadebola",DOFContactors)
' .Balls = 0
' End With
' Impulse Plunger
Const IMPowerSetting = 55
Const IMTime = 0.6
Set plungerIM = New cvpmImpulseP
With plungerIM
.InitImpulseP swplunger, IMPowerSetting, IMTime
.Random 0.3
.switch 14
'.InitExitSnd SoundFX("bumper_retro",DOFContactors), SoundFX("fx_target",DOFContactors)
.CreateEvents "plungerIM"
End With
' Bar Motor
set mBar = new cvpmMech
with mBar
.MType = vpmMechOneSol + vpmMechReverse + vpmMechNonLinear
.Sol1 = 16
.Length = 130
.Steps = 50
.addsw 50,0,0
.addsw 51,47,49
.acc=0
.ret=0
.Callback = GetRef("UpdateBar")
.Start
End with
Set activeShadowBall = new cvpmDictionary
Controller.Switch(50) = 0
Controller.Switch(51) = 1
RampDiverter.Isdropped = 1
SetOptions
'If Table1.ShowDT = False then
'Ramp26.visible = 0
' Ramp32.visible = 0
'Ramp33.visible = 0
'Ramp34.visible = 0
'Ramp35.visible = 0
'Ramp36.visible = 0
'End If
End Sub
'******************
'Keys Up and Down
'*****************
Sub Table1_KeyDown(ByVal Keycode)
TestTableKeyDownCheck keycode
If keycode = PlungerKey Then Plunger.Pullback:SoundPlungerPull()
If keycode = LeftTiltKey Then Nudge 90, 5:SoundNudgeLeft()
If keycode = RightTiltKey Then Nudge 270, 5:SoundNudgeRight()
If keycode = CenterTiltKey Then Nudge 0, 6:SoundNudgeCenter()
' If keycode = LeftMagnaSave Then Flash129 true
' If keycode = RightMagnaSave Then Flash132 true
If keycode = RightMagnaSave Then 'AXS 'Fleep
' Flash132
if DisableLUTSelector = 0 then
If LutToggleSound Then
Playsound "Click"
' Playsound "LUT_Toggle_Up_Front", 0, LutToggleSoundLevel * VolumeDial, 0, 0.2, 0, 0, 0, 1
' Playsound "LUT_Toggle_Up_Rear", 0, LutToggleSoundLevel * VolumeDial, 0, 0.2, 0, 0, 0, -1
End If
LUTSet = LUTSet + 1
if LutSet > 14 then LUTSet = 0
SetLUT
ShowLUT
end if
end if
If keycode = LeftMagnaSave Then
' Flash129
if DisableLUTSelector = 0 then
If LutToggleSound Then
Playsound "Click"
' Playsound "LUT_Toggle_Down_Front", 0, LutToggleSoundLevel * VolumeDial, 0, 0.2, 0, 0, 0, 1
' Playsound "LUT_Toggle_Down_Rear", 0, LutToggleSoundLevel * VolumeDial, 0, 0.2, 0, 0, 0, -1
End If
LUTSet = LUTSet - 1
if LutSet < 0 then LUTSet = 14
SetLUT
ShowLUT
end if
end if
If keycode = PlungerKey Then
If VRRoom = 1 Then
TimerVRPlunger.Enabled = True
TimerVRPlunger2.Enabled = False
End If
End If
If keycode = keyInsertCoin1 or keycode = keyInsertCoin2 or keycode = keyInsertCoin3 or keycode = keyInsertCoin4 Then
Select Case Int(rnd*3)
Case 0: PlaySound ("Coin_In_1"), 0, CoinSoundLevel, 0, 0.25
Case 1: PlaySound ("Coin_In_2"), 0, CoinSoundLevel, 0, 0.25
Case 2: PlaySound ("Coin_In_3"), 0, CoinSoundLevel, 0, 0.25
End Select
End If
If keycode=StartGameKey then soundStartButton()
'** nFozzy - begin
If keycode = LeftFlipperKey Then FlipperActivate LeftFlipper, LFPress
If keycode = RightFlipperKey Then FlipperActivate RightFlipper, RFPress
'** nFozzy - end
If vpmKeyDown(keycode) Then Exit Sub
End Sub
Sub Table1_KeyUp(ByVal Keycode)
TestTableKeyUpCheck keycode
If KeyCode = PlungerKey Then
Plunger.Fire
If VRRoom = 1 Then
TimerVRPlunger.Enabled = False
TimerVRPlunger2.Enabled = True
End If
If BallInPlungerLane = 1 Then
SoundPlungerReleaseBall() 'Plunger release sound when there is a ball in shooter lane
Else
SoundPlungerReleaseNoBall() 'Plunger release sound when there is no ball in shooter lane
End If
End If
'** nFozzy - begin
If keycode = LeftFlipperKey Then FlipperDeActivate LeftFlipper, LFPress
If keycode = RightFlipperKey Then FlipperDeActivate RightFlipper, RFPress
'** nFozzy - end
If vpmKeyUp(keycode) Then Exit Sub
End Sub
Sub Table1_Paused : Controller.Pause = True : End Sub
Sub Table1_unPaused : Controller.Pause = False : End Sub
Sub Table1_Exit() : Controller.Pause = False : Controller.Stop() : End Sub
' #####################################
' ###### Flupper Domes #####
' #####################################
Sub Flash25(Enabled)
Objlevel(1) = 1 : FlasherFlash1_Timer
End Sub
Sub Flash26(Enabled)
Objlevel(2) = 1 : FlasherFlash2_Timer
End Sub
Sub Flash27(Enabled)
Objlevel(3) = 1 : FlasherFlash3_Timer
End Sub
Sub Flash28(Enabled)
Objlevel(4) = 1 : FlasherFlash4_Timer
End Sub
Sub Flash29(Enabled)
Objlevel(5) = 1 : FlasherFlash5_Timer
End Sub
Sub Flash129(Enabled)
Objlevel(6) = 1 : FlasherFlash6_Timer
Objlevel(7) = 1 : FlasherFlash7_Timer
Objlevel(8) = 1 : FlasherFlash8_Timer
Objlevel(9) = 1 : FlasherFlash9_Timer
End Sub
dim Flash132level
sub Flash132(flstate)
If Flstate Then
Flash132level = 1
museumflash_timer
If BackglassFlash = 1 Then
BGfl32.visible = 1
BGFlAreaTopRightL.amount = 250
BGFlAreaTopRightR.amount = 250
End If
else
Flash132level = Flash132level * 0.7 'minor tweak to force faster fade
If BackglassFlash = 1 Then
BGfl32.visible = 0
BGFlAreaTopRightL.amount = 100
BGFlAreaTopRightR.amount = 100
End If
End If
end sub
FlasherLight8a.IntensityScale = 0:FlasherLight8b.IntensityScale = 0
Flasher8.opacity = 0:Flasher8a.opacity = 0:museumflash.opacity = 0:museumflash1.opacity = 0:museumflash2.opacity = 0
Primitive_museum.blenddisablelighting = 1
primitive53.blenddisablelighting = 0.77
sub museumflash_timer
If not museumflash.TimerEnabled Then museumflash.TimerEnabled = True : End If
FlasherLight8a.IntensityScale = 5 * Flash132level^2
FlasherLight8b.IntensityScale = 5 * Flash132level^2
Flasher8.opacity = 100 * Flash132level^1.5
Flasher8a.opacity = 100 * Flash132level^1.5
museumflash.opacity = 100 * Flash132level^1.5
museumflash1.opacity = 100 * Flash132level^1.5
museumflash2.opacity = 100 * Flash132level^1.5
if Flash132level < 0.3 then
Primitive_museum.image="MuseumMap_off"
primitive53.image = "batcave_completemap"
elseif Flash132level > 0.3 And Flash132level < 0.55 then
Primitive_museum.image="MuseumMap_33"
primitive53.image = "batcaveright_33"
elseif Flash132level > 0.55 And Flash132level < 0.85 then
Primitive_museum.image="MuseumMap_66"
primitive53.image = "batcaveright_66"
else
Primitive_museum.image="MuseumMap_on"
primitive53.image = "batcaveright"
end if
Flash132level = Flash132level * 0.95 - 0.01
If Flash132level < 0 Then museumflash.TimerEnabled = False : End If
end sub
Dim TestFlashers, TableRef, FlasherLightIntensity, FlasherFlareIntensity, FlasherOffBrightness
' *********************************************************************
TestFlashers = 0 ' *** set this to 1 to check position of flasher object ***
Set TableRef = Table1 ' *** change this, if your table has another name ***
FlasherLightIntensity = .4 ' *** lower this, if the VPX lights are too bright (i.e. 0.1) ***
FlasherFlareIntensity = .4 ' *** lower this, if the flares are too bright (i.e. 0.1) ***
FlasherOffBrightness = 0.7 ' *** brightness of the flasher dome when switched off (range 0-2) ***
' *********************************************************************
Dim ObjLevel(20), objbase(20), objlit(20), objflasher(20), objlight(20)
Dim tablewidth, tableheight : tablewidth = TableRef.width : tableheight = TableRef.height
'initialise the flasher color, you can only choose from "green", "red", "purple", "blue", "white" and "yellow"
InitFlasher 1, "Orange" : InitFlasher 2, "Orange" : InitFlasher 3, "Orange"
InitFlasher 4, "White" : InitFlasher 5, "red" : InitFlasher 6, "Orange"
InitFlasher 7, "Orange" : InitFlasher 8, "Orange"
InitFlasher 9, "Orange" :' InitFlasher 10, "red" : InitFlasher 11, "white"
' rotate the flasher with the command below (first argument = flasher nr, second argument = angle in degrees)
'RotateFlasher 4,17 : RotateFlasher 5,0 :
RotateFlasher 6,-30:RotateFlasher 7,-30 : RotateFlasher 8,-30 :RotateFlasher 9,-30' : RotateFlasher 10,90 : RotateFlasher 11,90
Sub InitFlasher(nr, col)
' store all objects in an array for use in FlashFlasher subroutine
Set objbase(nr) = Eval("Flasherbase" & nr) : Set objlit(nr) = Eval("Flasherlit" & nr)
Set objflasher(nr) = Eval("Flasherflash" & nr) : Set objlight(nr) = Eval("Flasherlight" & nr)
' If the flasher is parallel to the playfield, rotate the VPX flasher object for POV and place it at the correct height
If objbase(nr).RotY = 0 Then
objbase(nr).ObjRotZ = atn( (tablewidth/2 - objbase(nr).x) / (objbase(nr).y - tableheight*1.1)) * 180 / 3.14159
objflasher(nr).RotZ = objbase(nr).ObjRotZ : objflasher(nr).height = objbase(nr).z + 60
Flasherflash6.height = 75
Flasherflash7.height = 75
Flasherflash8.height = 75
Flasherflash9.height = 75
End If
' set all effects to invisible and move the lit primitive at the same position and rotation as the base primitive
objlight(nr).IntensityScale = 0 : objlit(nr).visible = 0 : objlit(nr).material = "Flashermaterial" & nr
objlit(nr).RotX = objbase(nr).RotX : objlit(nr).RotY = objbase(nr).RotY : objlit(nr).RotZ = objbase(nr).RotZ
objlit(nr).ObjRotX = objbase(nr).ObjRotX : objlit(nr).ObjRotY = objbase(nr).ObjRotY : objlit(nr).ObjRotZ = objbase(nr).ObjRotZ
objlit(nr).x = objbase(nr).x : objlit(nr).y = objbase(nr).y : objlit(nr).z = objbase(nr).z
objbase(nr).BlendDisableLighting = FlasherOffBrightness
' set the texture and color of all objects
select case objbase(nr).image
Case "dome2basewhite" : objbase(nr).image = "dome2base" & col : objlit(nr).image = "dome2lit" & col :
Case "ronddomebasewhite" : objbase(nr).image = "ronddomebase" & col : objlit(nr).image = "ronddomelit" & col
Case "domeearbasewhite" : objbase(nr).image = "domeearbase" & col : objlit(nr).image = "domeearlit" & col
end select
If TestFlashers = 0 Then objflasher(nr).imageA = "domeflashwhite" : objflasher(nr).visible = 0 : End If
select case col
Case "blue" : objlight(nr).color = RGB(4,120,255) : objflasher(nr).color = RGB(200,255,255) : objlight(nr).intensity = 5000
Case "green" : objlight(nr).color = RGB(12,255,4) : objflasher(nr).color = RGB(12,255,4)
Case "red" : objlight(nr).color = RGB(255,32,4) : objflasher(nr).color = RGB(255,32,4)
Case "purple" : objlight(nr).color = RGB(230,49,255) : objflasher(nr).color = RGB(255,64,255)
Case "yellow" : objlight(nr).color = RGB(200,173,25) : objflasher(nr).color = RGB(255,200,50)
Case "white" : objlight(nr).color = RGB(255,240,150) : objflasher(nr).color = RGB(100,86,59)
Case "orange" : objlight(nr).color = RGB(255,128,0) : objflasher(nr).color = RGB(255,128,0)
end select
objlight(nr).colorfull = objlight(nr).color
If TableRef.ShowDT and ObjFlasher(nr).RotX = -45 Then
objflasher(nr).height = objflasher(nr).height - 20 * ObjFlasher(nr).y / tableheight
ObjFlasher(nr).y = ObjFlasher(nr).y + 10
End If
End Sub
Sub RotateFlasher(nr, angle) : angle = ((angle + 360 - objbase(nr).ObjRotZ) mod 180)/30 : objbase(nr).showframe(angle) : objlit(nr).showframe(angle) : End Sub
Sub FlashFlasher(nr)
If not objflasher(nr).TimerEnabled Then objflasher(nr).TimerEnabled = True : objflasher(nr).visible = 1 : objlit(nr).visible = 1 : End If
objflasher(nr).opacity = 1000 * FlasherFlareIntensity * ObjLevel(nr)^2.5
objlight(nr).IntensityScale = 0.5 * FlasherLightIntensity * ObjLevel(nr)^3
objbase(nr).BlendDisableLighting = FlasherOffBrightness + 10 * ObjLevel(nr)^3
objlit(nr).BlendDisableLighting = 10 * ObjLevel(nr)^2
UpdateMaterial "Flashermaterial" & nr,0,0,0,0,0,0,ObjLevel(nr),RGB(255,255,255),0,0,False,True,0,0,0,0
ObjLevel(nr) = ObjLevel(nr) * 0.9 - 0.01
If ObjLevel(nr) < 0 Then objflasher(nr).TimerEnabled = False : objflasher(nr).visible = 0 : objlit(nr).visible = 0 : End If
End Sub
Sub FlasherFlash1_Timer() : FlashFlasher(1) : End Sub
Sub FlasherFlash2_Timer() : FlashFlasher(2) : End Sub
Sub FlasherFlash3_Timer() : FlashFlasher(3) : End Sub
Sub FlasherFlash4_Timer() : FlashFlasher(4) : End Sub
Sub FlasherFlash5_Timer() : FlashFlasher(5) : End Sub
Sub FlasherFlash6_Timer()
FlashFlasher(6)
End Sub
Sub FlasherFlash7_Timer()
FlashFlasher(7)
End Sub
domereflection.opacity = 0
Sub FlasherFlash8_Timer()
FlashFlasher(8)
domereflection.opacity = 100 * ObjLevel(8)^1
flashBatCave
End Sub
Sub FlasherFlash9_Timer()
FlashFlasher(9)
End Sub
sub flashBatCave
if ObjLevel(8) < 0.4 then
Primitive53.image="BatCave_CompleteMap"
elseif ObjLevel(8) > 0.4 And ObjLevel(8) < 0.65 then
Primitive53.image="Batcaveleft33"
elseif ObjLevel(8) > 0.65 And ObjLevel(8) < 0.85 then
Primitive53.image="Batcaveleft66"
else
Primitive53.image="Batcaveleft"
end if
End Sub
Sub FlasherFlash10_Timer() : FlashFlasher(10) : End Sub
Sub FlasherFlash11_Timer() : FlashFlasher(11) : End Sub
' #####################################
' ###### End Flupper Domes #####
' #####################################
'' set options cp
Dim HalfPosts, FlipperColor, RubberColor, JokerFlasherColor
Dim xxRubberColor
Sub SetOptions ()
'Rubber Color
'0=white
'1-black
If RubberColor = 1 Then
for each xxRubberColor in RubbersVisible
xxRubberColor.material = "Rubber Black"
next
Else
for each xxRubberColor in RubbersVisible
xxRubberColor.material = "Rubber White"
next
End If
'Flipper Color
'0=white/black
'1=yellow/black
If FlipperColor = 1 Then
RFLogo.Image = "Yellow_black"
LFLogo.Image = "Yellow_black"
Else
RFLogo.Image = "white_black"
LFLogo.Image = "white_black"
End If
'Half Posts
'0=no
'1=yes
If HalfPosts = 1 Then
pHalfPost.Visible = true
pHalfPost001.Visible = true
pHalfPost002.Visible = true
pHalfPost003.Visible = true
Else
pHalfPost.Visible = false
pHalfPost001.Visible = false
pHalfPost002.Visible = false
pHalfPost003.Visible = false
End If
If JokerFlasherColor = 1 Then
'Left
L81P005.material = "Metal Green2"
l36.Color=RGB(0,128,0) 'Green
l36Fb2.Color=RGB(0,128,0) 'Green
l36b.Color=RGB(0,128,0) 'Green
l36b.ColorFull=RGB(0,255,0) 'Green
l36Fb.Color=RGB(0,128,0) 'Green
'Right
L81P001.material = "Metal Green2"
l37.Color=RGB(0,128,0) 'Green
l37Fb.Color=RGB(0,128,0) 'Green
l37b.Color=RGB(0,128,0) 'Green
l37b.ColorFull=RGB(0,255,0) 'Green
End If
If JokerFlasherColor = 2 Then
'Left
L81P005.material = "Metal Green2"
l36.Color=RGB(0,128,0) 'Green
l36Fb2.Color=RGB(0,128,0) 'Green
l36b.Color=RGB(0,128,0) 'Green
l36b.ColorFull=RGB(0,255,0) 'Green
l36Fb.Color=RGB(0,128,0) 'Green
'Right
L81P001.material = "Metal Red"
l37.color = rgb(255,0,0) ' Red
l37Fb.color = rgb(255,0,0) ' Red
l37b.color = rgb(255,0,0) ' Red
l37b.colorfull = rgb(128,0,0) 'Red
End If
End Sub
'*****************
'Solenoids
'*****************
'AutoPlunger
Sub SolAutoPlungerIM(Enabled)
If Enabled Then
PlungerIM.AutoFire
SoundPlungerReleaseBall()
End If
End Sub
'Knocker
Sub SolKnocker(enabled)
If enabled then
KnockerSolenoid 'Added KnockerPosition primitive to table
End If
End Sub
'CavTargets
Dim CPos
Sub UpdateBar(acurrpos, aspeed, alastpos)
CPos = acurrpos
'StopSound"motor": PlaySound"motor"
Sw49a.TransY = 50 - CPos
Sw49b.TransY = 50 - CPos
If CPos => 45 Then Sw49.isdropped = 1
If CPos =< 25 Then Sw49.isdropped = 0
If CPos => 35 Then 'open
FlasherLight8a.visible = 0
FlasherLight8b.visible = 1
else
FlasherLight8a.visible = 1
FlasherLight8b.visible = 0
end if
End Sub
'Ramp Diverter
Sub SolDiv(enabled)
If enabled Then
RampDiverter.Isdropped = 0
'PlaySound "fx_diverter"
RampDiverter2.Isdropped = 1
DivP.RotY = 220
Else
RampDiverter.Isdropped = 1
'StopSound "fx_Ramp"
'PlaySound "fx_diverter"
RampDiverter2.Isdropped = 1
DivP.RotY = 203
End If
End Sub
' Drain Sound
Sub Drain_Hit()
RandomSoundDrain Drain
End Sub
' BallRelease Sound
Sub Ballrelease_UnHit
RandomSoundBallRelease Ballrelease
End Sub
' Flippers
Const ReflipAngle = 20
Sub SolLFlipper(Enabled)
If Enabled Then
'** nFozzy - begin
LF.Fire
'LeftFlipper.rotatetoend
'** nFozzy - end
If LeftFlipper.currentangle < LeftFlipper.endangle + ReflipAngle Then
RandomSoundReflipUpLeft LeftFlipper
Else
SoundFlipperUpAttackLeft LeftFlipper
RandomSoundFlipperUpLeft LeftFlipper
End If
Else
LeftFlipper.RotateToStart
If LeftFlipper.currentangle < LeftFlipper.startAngle - 5 Then
RandomSoundFlipperDownLeft LeftFlipper
End If
FlipperLeftHitParm = FlipperUpSoundLevel
End If
End Sub
Sub SolRFlipper(Enabled)
If Enabled Then
'** nFozzy - begin
RF.Fire
'RightFlipper.RotateToEnd
'** nFozzy - end
If RightFlipper.currentangle > RightFlipper.endangle - ReflipAngle Then
RandomSoundReflipUpRight RightFlipper
Else
SoundFlipperUpAttackRight RightFlipper
RandomSoundFlipperUpRight RightFlipper
End If
Else
RightFlipper.RotateToStart
If RightFlipper.currentangle > RightFlipper.startAngle + 5 Then
RandomSoundFlipperDownRight RightFlipper
End If
FlipperRightHitParm = FlipperUpSoundLevel
End If
End Sub
Sub LeftFlipper_Collide(parm)
LeftFlipperCollide parm
End Sub
Sub RightFlipper_Collide(parm)
RightFlipperCollide parm
End Sub
'*****************
'VR BackGlass Solenoids
'*****************
Sub Sol9(Enabled)
If Enabled Then
SetLamp 109,1
If BackglassFlash = 1 Then
BGFlMoon.amount=400
BGFl9.visible = 1
BGFlBatman1.visible = 1
BGFlMoon.visible=1
End If
Else
SetLamp 109,0
If BackglassFlash = 1 Then
BGFlMoon.amount=205
BGFl9.visible = 0
BGFlBatman1.visible=0
BGFlMoon.visible=0
End If
End If
End Sub
Dim aOn
Sub Sol11(Enabled)
If Enabled Then
SetLamp 111, 0
If BackglassFlash = 1 Then
For each x in BGVRGI: x.visible = 0:Next
BGFlashers.Enabled = 0
End If
Else
SetLamp 111, 1
If BackglassFlash = 1 Then
For each x in BGVRGI: x.visible = 1:Next
BGFlashers.Enabled = 1
End If
End If
End Sub
Sub Sol12(Enabled)
If Enabled Then
SetLamp 112, 1
If BackglassFlash = 1 Then
BGFl12.visible = 1
BGFl121.visible = 1
BGFlAreaB.amount = 225
BGFlAreaM.amount = 225
BGFlBulb122.visible = 1
BGFlAreaCityRight1.amount = 135
BGAreaLowRight.amount = 45
End If
Else
SetLamp 112, 0
If BackglassFlash = 1 Then
BGFl12.visible = 0
BGFl121.visible = 0
BGFlAreaB.amount = 150
BGFlAreaM.amount = 150
BGFlBulb122.visible = 0
BGFlAreaCityRight1.amount = 60
BGAreaLowRight.amount = 20
End If
End If
End Sub
Sub Sol13(Enabled)
If Enabled Then
SetLamp 113, 1
If BackglassFlash = 1 Then
BGfl13.visible = 1
BGFl131.visible = 1
BGFlAreaA1.amount = 225
BGFlAreaA2.amount = 225
End If
Else
SetLamp 113, 0
If BackglassFlash = 1 Then
BGfl13.visible = 0
BGFl131.visible = 0
BGFlAreaA1.amount = 150
BGFlAreaA2.amount = 150
End If
End If
End Sub
Sub Sol14(Enabled)
If Enabled Then
SetLamp 114, 1