├── 24 (Stern 2009) v.2.2.vbs ├── 4 Queens (Bally 1970) VP10.vbs ├── A Real American Hero 1.71.vbs ├── AC-DC_Premium-1.4_SurroundSoundMOD-1.2.vbs ├── ARFM_1.2.0.vbs ├── Aces High (Bally 1965) v1.1.0 - 4K - Dakarx - English.vbs ├── Airborne (Capcom 1996) v1.0.vbs ├── Airborne Avenger (Atari 1977) 1.3.vbs ├── Airborne Avenger (Atari 1977) 1.4.vbs ├── Aladdin's Castle (Bally 1976) - DOZER - MJR_1.01.vbs ├── Algar (Williams 1980) 1.34.vbs ├── Ali-v1.0.1.vbs ├── Alien Poker 1.0.1.vbs ├── Alien Star (Gottlieb 1984) 2.0_Thal.vbs ├── Alien Star (Gottlieb 1984) v3.0.1.vbs ├── Alive! (Brunswick1978)0.0.3.vbs ├── Amazing Spider-Man (Gottlieb 1980) gtxjoe-xenonph MOD v1.0.vbs ├── Amazing Spider-man (Gottlieb 1980).vbs ├── Amazon Hunt VPX mod 1.0.vbs ├── Amazon Hunt VPX 1.4.vbs ├── Amazon Hunt VPX 1.5.vbs ├── America1492 2.0.vbs ├── Andromeda (Game Plan 1985).vbs ├── Antar (Playmatic 1979)_Bigus(MOD)1.1.vbs ├── Apollo 13 (Sega 1995) V1.53.vbs ├── Apollo 13 (Sega 1995) V1.62.vbs ├── Apollo 13 (Sega 1995) w VR Room v2.1.1.vbs ├── Aqualand (Juegos Populares 1986)2.0.vbs ├── Arena (Gottlieb 1987).02.vbs ├── Aspen (Brunswick 1979)V1.3.vbs ├── Atarians (Atari 1976).vbs ├── Attack From Mars (Bally 1995) WED21 PMD Mod.vbs ├── Attila The Hun (Game Plan 1984)_Thal.vbs ├── Austin Powers (Stern 2001) 1.01.vbs ├── Avatar (Stern 2012)_Bigus(MOD)1.3.vbs ├── Aztec (Williams 1976) 1.0 JPJ - Chucky - Arngrim - Team PP .vbs ├── Aztec (Williams 1976) 1.3 Mod Citedor JPJ-ARNGRIM-CED Team PP.vbs ├── Back To The Future (Data East 1990) 1.3.vbs ├── Back To The Future (Data East 1990) 1.4.vbs ├── Bad Cats VPX 1.2.1a.GRHR.vbs ├── Bad Cats VPX 1.2.1a.vbs ├── Bad Cats.VPX.v1.2.vbs ├── Bad Girls (Gottlieb 1988) Vifico.vbs ├── Bad Girls (Gottlieb 1988) v1.6.5 RESKIN Cheese3075.vbs ├── Bally Roller Derby 2.0.vbs ├── Barb Wire (Gottlieb 1996)1.4.vbs ├── Barracora (Williams 1981) mod v1.3.vbs ├── Batman (Data East 1990) VPX 1.3_SurroundSoundMOD.vbs ├── Batman Forever (Sega 1995)_Bigus(MOD)1.0.vbs ├── Battlestar Galactica (Williams 1980) Mod v1.02F.vbs ├── Battlestar Galactica (Williams 1980) Mod v1.3.vbs ├── Beach Bums.vbs ├── Beavis and Butt-head_Pinballed.vbs ├── Beisbol (Maresa 1971).vbs ├── Big Bang Bar (Capcom 1996 ).vbs ├── Big Bang Bar (Capcom 1996)_Bigus(MOD)1.1.vbs ├── Big Bang Bar 2.4.2.vbs ├── Big Flush (LTD do Brasil 1983).vbs ├── Big Game (Rock-Ola 1935) 0.23.vbs ├── Big Game (Stern 1980) w VR Room 1.5.1.vbs ├── Big Game v1.0.4.vbs ├── Big Hurt (Gottlieb 1995) LW.vbs ├── Black Fever (Playmatic 1980).vbs ├── Black Hole (Gottlieb 1981) vpx 1.1.vbs ├── Black Jack (Bally 1976) v1.1.vbs ├── Black Knight 2000 1.1.vbs ├── Black Pyramid VPX v1.0.3.vbs ├── Black Rose (Bally 1992)0.1.0.vbs ├── Black Sheep Squadron (Astro 1979)1.4.vbs ├── Black_Knight_1.3.1.vbs ├── Blackout (Williams 1980) Mod - S34 v1.1.vbs ├── Bone Busters Inc. (Gottlieb 1989) 1.0a.vbs ├── Bram Stoker's Dracula (Williams 1993)1.1.vbs ├── Bubba the Redneck Werewolf (2017).vbs ├── Bubba the Redneck Werewolf (2017)1.1.vbs ├── Buccaneer (Gottlieb 1976) v1.00.vbs ├── Buccanner (J. Esteban 1976).vbs ├── CARtoons RC (2017) v2.3.vbs ├── CSI (Stern 2008)_VPX_1.00.vbs ├── Cabaret (Williams 1968) DB HF 1.1.vbs ├── Cactus Canyon (Bally 1998) TTNZ v2.0.vbs ├── Capersville (Bally 1966) 3.2.7.vbs ├── Captain Fantastic_VPX_DOZER_1.2.vbs ├── Catacomb (Stern 1981) - redbone(MOD) v1.0.0.vbs ├── Cavalcade (Stoner 1935) VPX MW 1.1.vbs ├── Cavalcade_VPX_1_0.vbs ├── Cavaleiro Negro v1.0.3.vbs ├── Champion Pub_VPX_1_2.vbs ├── Champions League (Season 18) TT&NZ v1.0.vbs ├── Chance (playmatic 1978).vbs ├── Charlie's Angels 1.0.0.vbs ├── Check Mate (Taito - 1977) 1.0.0.vbs ├── Cheech & Chong - Road-Trippin.vbs ├── Cheetah 1.0.1.vbs ├── Cirqus Voltaire (Bally 1997, Dozer 2.1, SSF Mod).vbs ├── Class of 1812 - NZ&TT 1.0.vbs ├── Comet (Williams 1985) v1.1.vbs ├── Congo (Williams 1995) 1.2.vbs ├── Conquest 200 (Playmatic 1976) v55_VPX8.vbs ├── Contest (Gottlieb 1958) 52 Final 1.5.vbs ├── Corsario (Inder 1989) 1.0.vbs ├── Cosmic JP 1.0.0.vbs ├── Count-Down 1.0.0.vbs ├── Creature From The Black Lagoon (Bally 1992)_1.2.vbs ├── Cyclone (Williams 1988) v.2.2.vbs ├── Cyclone (Williams 1988) v1.5.vbs ├── Cyclone (Williams 1988).vbs ├── Dark Rider (Geiger 1984)_Bigus(MOD)1.0.vbs ├── Deadly Weapon (Gottlieb 1990) v1.0.1.vbs ├── Deadly Weapon (Gottlieb 1990) v1.0.2.vbs ├── Defender (Williams 1982) 1.0.vbs ├── Demolition Man (Knorr-Kiwi) 1.3.1.vbs ├── Demolition Man 1.2 (Williams1994).vbs ├── Diablo Pinball v1.0.3-DOF.vbs ├── Diamond Lady (Gottlieb 1988) v4.3.vbs ├── Diamond_Lady_VPX_1.0.2.vbs ├── Die Grillshow the Pinball Adventure.vbs ├── Diner VPX 1.2.vbs ├── Dipsy Doodle (Williams 1970)_Thal9.vbs ├── Dirty Harry 2.0 shiny mod.vbs ├── Dirty Harry(Williams1995) shiny mod.vbs ├── Disco (Stern 1977).vbs ├── Doctor Who (Bally 1992) ssfmod v1.2.2.vbs ├── Dolly Parton v1.0.1.vbs ├── Dolly Parton v1.0.2.vbs ├── Dr Dude (Bally 1990)2.0.vbs ├── Dragon Ball Super Saiyan Edition_1.05.vbs ├── Dragoon (Recreativos Franco 1977).vbs ├── Drakor v1.0.1.vbs ├── Dungeons&Dragons (Bally 1987) v1.1.2.vbs ├── Eclipse (Gottlieb 1982).vbs ├── Eight Ball 1.0.0.vbs ├── Eight Ball 1.0.1.vbs ├── El_Bueno_el_Feo_y_el_Malo_1.2.0.vbs ├── Elvira mash-up (original 2021).vbs ├── Elvira re-mix (original 2021).vbs ├── Elvis (Stern 2004) WED SSF Mod.vbs ├── Embryon(Bally 1980)VPXv1.4.vbs ├── Evel Knievel (Bally 1977) HF 32A v4.0.1.vbs ├── F-14 Tomcat (Williams 1987) 1.0.vbs ├── Family Guy (Stern 2007)1.1.Fart.vbs ├── Family Guy 1.0.vbs ├── Farfalla (Zaccaria 1983) 1.0.0.vbs ├── Farfalla (Zaccaria 1983) 1.0.1.vbs ├── Fathom (Bally 1981) Vintage Mod_v1.2.vbs ├── Fathom (Bally 1981)_LED_Mod.vbs ├── Fire Action de Luxe v1.0.1.vbs ├── Fire Action v1.0.0.vbs ├── Fire! (Williams 1987) 2.0.vbs ├── FirePower (Williams 1980) 1.1_Thal_Mod.vbs ├── FirePower(Vs A.I.)V3.7.vbs ├── Fireball II (Bally 1981)_1.2.vbs ├── Fireball II (Bally 1981)_1.3.vbs ├── Fireball VPX v1.1 - pinball58.vbs ├── Firepower (Drop Target Mod) - (Williams 1980) 1.2.vbs ├── Firepower2v1.1.vbs ├── Fish Tales VPX v1.1 - pinball58_SurroundSoundMOD.vbs ├── Flash Gordon (Bally 1981) 1.0.vbs ├── Flash_JPSalas_VPX10.4_SurroundSound_MOD.vbs ├── Flight 2000 (Stern 1980).vbs ├── Four Million BC (Bally 1971) v1.0.vbs ├── Freddy A Nightmare On Elm Street (Gottlieb 1994) 1.1b JPJ - Team PP - Hauntfreaks Mod.vbs ├── Freedom (Bally 1976) V1.0.vbs ├── Freefall_1.1.vbs ├── Frontier (Bally 1980).vbs ├── Funhouse (Williams 1990)_1.3.vbs ├── Future Spa VPX v1.0.1.vbs ├── GalaxyPlay_1_1.vbs ├── Gay 90's (Williams 1970) B2S MOD v2.vbs ├── Genesis (Gottlieb 1986) 1.0.vbs ├── Genesis(Gottlieb1986)SG1bsoNModV1.2.vbs ├── Getaway, The - High Speed II v1.04.vbs ├── Getaway, The - High Speed II v1.1.vbs ├── Getaway, The - High Speed II v1.2.vbs ├── Ghostbusters LE 1.2.vbs ├── Gladiators (Premier 1993) v1.0.1.vbs ├── GoinNuts_v1.2.vbs ├── Golden Cue (Sega 1998)-v1.4.vbs ├── Goldeneye (Sega 1996) VPW 1.0.vbs ├── Gorgar (Williams 1979)_1.3.1.vbs ├── Gorgar_1.1_gedankekojote97.vbs ├── Gork 1.0.3hf.vbs ├── Grand Lizard (Williams 1986) V1.8.5.vbs ├── Grand Prix (LTD do Brasil 1977).vbs ├── Grand Prix (Williams 1976) EM 1.0.vbs ├── Grand Slam (Bally 1983) 2.1.vbs ├── GrandLizardV1.5.vbs ├── GrandPrix mod (Williams 1977)_1.2.vbs ├── Granny and the Gators (Bally 1984) 1.1.vbs ├── Groni Pinball - Attack from Mars V1.0_VPX_PMDv3.vbs ├── Gulfstream (Williams 1973) 1.1.vbs ├── Guns and Roses (Data East 1994) Team PP 180 Final 1.08 MB.vbs ├── Harlem Globetrotters (Bally 1979)_VPX_DOZER_1.0a.vbs ├── Harlem_Globetrotters_1.2.0.vbs ├── Hawkman v1.0.1.vbs ├── Hayburners (WIlliams 1951).vbs ├── Heat Wave (Williams 1964) 1.1.vbs ├── Hercules_wip1_6.vbs ├── High Roller Casino (Stern 2001) 1.1.vbs ├── High_Speed_(Williams 1986)_mod_1.3.vbs ├── High_Speed_(Williams 1986)_mod_1.4.vbs ├── Hollywood Heat (Gottlieb 1986).vbs ├── Hook_VPX_1.01.vbs ├── Hot Rod (Gottlieb 1977).vbs ├── Hot Shot (Gottlieb 1973) 1.5.vbs ├── Hot Shots (Gottlieb 1989).vbs ├── House of Diamonds (Zaccaria 1978).vbs ├── Humpty Dumpty (Gottlieb 1947)v3_0.vbs ├── Hyperball.vbs ├── Ice Fever (Gottlieb 1985)Original GI.vbs ├── Impacto (Recreativos Franco 1975)v1.0.1.vbs ├── Independence Day (SEGA 1996) 1.1.vbs ├── Independence Day (SEGA 1996) 1.3.vbs ├── Indiana Jones - NZ&TT 1.2.vbs ├── Indianapolis_500_VPX_1.1_RTM.vbs ├── Iron Balls (Unidesa 1987) 1.1.vbs ├── Ironman (Stern 2010) V2.0.5.vbs ├── JP's Jokerz!_v1.0.2.vbs ├── JP's Lord of the Rings_v1.0.2_DOF.vbs ├── JP-Ghostbusters Slimer v1.2.1.vbs ├── Jacks Open (Gottlieb 1977) v1.2.vbs ├── Jalopy (Williams 1951).vbs ├── Johnny_Mnemonic_1.3.vbs ├── Jolly Roger (Williams 1967) Mod 1.1.vbs ├── Joust (Williams 1983)1.0.vbs ├── Judge Dredd (Bally 1993) 2.0.vbs ├── Jumping Jack (Gottlieb 1973) v2.02.vbs ├── Jungle Lord (Williams 1981)-VPX-v1.05.vbs ├── Junk Yard_VPX_1_3.vbs ├── Jurassic Park (Data East 1993)1.03.vbs ├── KISS (Stern 2015) v1.1 20161122.vbs ├── KISS Balutito MOD 1.3.vbs ├── Kick Off (Bally 1977) 7he S4ge v1.1.vbs ├── Kidnap_VPX_1_0.vbs ├── King Kong 1.03.vbs ├── Kingpin (Capcom 1996)1.2.vbs ├── Kingpin (Capcom 1996)_Bigus(MOD)fixedon.vbs ├── Kiss (Bally 1979)2.1.vbs ├── Klondike (Williams 1971).vbs ├── LTD Alien Warrior.vbs ├── Lady Dead (Geiger 1983)1.0.vbs ├── Lady Luck mod (Recel 1976) 1.4.vbs ├── Laser Ball mod (Williams 1979) 2.3.vbs ├── Last Action Hero 1.07.vbs ├── Lethal Weapon 3_VPX_1.0 mod.vbs ├── Liberty Bell (Williams 1977) V1.01.vbs ├── Liberty Bell (Williams 1977) V1.01mod.vbs ├── Lightning v1.0.0.vbs ├── Lost In Space 1.2.vbs ├── Lost World v1.0.1.vbs ├── Lost in Space (Sega 1998)_Bigus(MOD)1.0.vbs ├── Lucky Luke (Gottlieb 1975 - FastDrawMod) v0.91.vbs ├── Lucky Seven1.1.0.vbs ├── Lunelle 1.0.0.vbs ├── Mac Galaxy_VPX_1_3.vbs ├── Mad Scientist 1_0.vbs ├── Magic City (Williams 1967).vbs ├── Mariner (Bally 1971) v1.0.vbs ├── MarioAndretti(Gottlieb1995).vbs ├── Mars God Of War (Gottlieb 1981) cyberpez vpx 1.0.vbs ├── Medieval Madness Reloaded 1.0_PMDv3.1.vbs ├── Medieval Madness X VPX- TT&NZ TOYMOD 1.0.vbs ├── MedievalMadness_Upgrade(Real_Final).vbs ├── Medusa v1.0.4.vbs ├── Memory Lane (Stern 1978) .09A.vbs ├── Metal Slug_1.02.vbs ├── Metal Slug_1.03.vbs ├── Metal Slug_1.05.vbs ├── Metallica Premium Monsters (Stern 2013) - 4K 1.3.vbs ├── Metallica Premium Monsters (Stern 2013) mod 1.5.vbs ├── Metallica Premium Monsters (Stern 2013) mod 1.6.vbs ├── Meteor -Taito v1.1.0.vbs ├── Middle Earth (Atari 1978) V1.00.vbs ├── Mini Golf (Williams 1964) 1.3.vbs ├── MiniBaseball(Chicago Coin 1972)v1.7.vbs ├── Minions_VPX_1.0.vbs ├── Miss-O (Williams 1969) v1.01.vbs ├── Miss-O (Williams 1969) v2.0.vbs ├── Monday Night Football (Data East 1989) 1.1.vbs ├── Monopoly (Stern 2001)_Tanawts(MOD)1.2.vbs ├── Monster Bash X - NZ&TT 1.3.vbs ├── Monte Carlo (Premier 1987) (10.7) 1.6.vbs ├── Mopar Madness (Mopar 2015)v1_5.vbs ├── MortalKombat_VPX_1.04_DOF.vbs ├── Mr Black (Taito 1982)1.0.0.vbs ├── Mr_and_Mrs_PAC-MAN VPX_1.2.vbs ├── Mustang (Stern 2014)LE_Siggis Mod_1.1.vbs ├── Mustang (Stern 2014)_AUX_INVISI_D_RTM_1.1.vbs ├── NBA (Mac 1986) 1.3.vbs ├── NBA Fastbreak (Bally 1997)-DarthMarino Mod 1.2.vbs ├── NBA Fastbreak (Bally 1997)_VPWmod_v1.3.7.vbs ├── NBA Fastbreak Batch_MOD_DOF 1.0.vbs ├── NFL (Stern 2001) Eagles v4.4.vbs ├── NOTLD-68 (Original 2018) Grunge Mod v1.0.vbs ├── Nascar (Stern 2005) 1.01_PMDsurround 1.02.vbs ├── Night Moves (International Concepts 1989)1.1.1.vbs ├── Night Rider (Bally 1976) v1.0b.vbs ├── Night Rider (Bally 1977) 2.0a.vbs ├── Nip-It (Bally 1973) HF mod 1.1.vbs ├── Nitro Ground Shaker (Bally 1980) 1.0.0hf3.vbs ├── Nitro Ground Shaker (Bally 1980) 1.0.0hf5.vbs ├── No Good Gofers (Williams 1997) 1.0.vbs ├── Nobs (BorgDog 2016) 1.2.vbs ├── NorthStar(Gottlieb1964)NFozzyHybrid-VRBG.9.vbs ├── Nudge-It (Gottlieb 1990).vbs ├── Nugent 1.0.1.vbs ├── OXO (Williams 1973) 1.0.vbs ├── Oba Oba v1.0.0.vbs ├── Old Coney Island v1.2.0.vbs ├── Op-Pop-Pop (Bally 1969).vbs ├── Operation Thunder (Gottlieb 1992) (10.7) 1.4.vbs ├── PBA_BigHurt_004.vbs ├── Panthera VPX v1.0.1.vbs ├── Party Zone v1.0.4mod.vbs ├── Party Zone v1.0.5.vbs ├── PartyZone(1991)SG1bsoNMod.vbs ├── Petaco (Juegos Populares 1984) v5_VPX8.vbs ├── Petaco 2 (Juegos Populares 1985)2.0.vbs ├── Pinball Magic (Capcom 1995) 2.0.8.vbs ├── Pink Panther (Gottlieb 1981).vbs ├── Pirates of the Caribbean (Stern 2006) mod.vbs ├── Playboy (Stern 2002) v1.0.vbs ├── Playboy (Stern 2002) v1.1.vbs ├── Queen of Hearts (Gottlieb 1952) - arborelia mod.vbs ├── Quicksilver (Stern 1980) 1.0.vbs ├── Quicksilver (Stern 1980) VPW 1.0.vbs ├── Quijote (Juegos Populares 1987) 1.4.vbs ├── README.md ├── Rally - Taito v1.0.3.vbs ├── Rapid Fire.vbs ├── Rat Fink VPX v1.1.vbs ├── Road Runner (Atari 1979) - Remastered v3.0.vbs ├── Robocop Marcade Mod (1989).vbs ├── Robocop(Data East 1989)1.4.1.vbs ├── Robocop(Data East 1989)1.4.vbs ├── Rock_Encore_VPX_1.0.0.vbs ├── Rocky & Bullwinkle And Friends 1.0.vbs ├── Rocky (Gottlieb 1982)1.1a.vbs ├── Rocky (Gottlieb 1982)1.2.vbs ├── Roller Coaster (Gottlieb 1971) v2.0.vbs ├── RollerGames (Drop Target Mod) - (Williams 1990) 1.2.vbs ├── RollerGames (Williams 1990) VPX 1.01a.vbs ├── Rolling Stones-v1.0.2.vbs ├── SMB-TT-NZ_1.3.vbs ├── Safe Cracker (Bally 1996) v1.0.vbs ├── Scorpion mod (Williams 1980) 2.2.vbs ├── Sea Ray (Bally 1971) v 1.0.3.8.vbs ├── Seawitch (Stern 1980)2.0.0.vbs ├── Seawitch (Stern) 1_0.vbs ├── Serious Sam Pinball v1.0.1.vbs ├── Shark 1.0.0.vbs ├── Sharkey's Shootout (Stern 2000) 1.2.vbs ├── Sharpshooter (Game Plan) (1979) 1.01.vbs ├── Shock_v1.0.1.vbs ├── Shrek_VPX 1.0 NZ&TT.vbs ├── Silver Slugger (Gottlieb 1990) VT v3.vbs ├── Sinbad_1.0.0.vbs ├── Sir Lancelot (Peyper 1994) 1.1.vbs ├── Skateball (Bally 1980) 1.0.4.vbs ├── Skateball 1.0.3HF.vbs ├── Sky Kings (Bally 1974).vbs ├── Smart Set (Williams 1969) DB HF 1.2.vbs ├── Snake Machine 1.0.0.vbs ├── SonicStarWars_VPX_1_0.vbs ├── SonicStarWars_VPX_1_1.vbs ├── Sons Of Anarchy (Original 2019) 1.2.vbs ├── Sorcerer 1.0.0.vbs ├── South Park 1.2.vbs ├── Space Gambler (playmatic 1978)2.0.vbs ├── Space Gambler (playmatic 1978)2.1.vbs ├── Space Invaders (Bally 1979) v1.03.vbs ├── Space Shuttle VPX v1.1 - pinball58.vbs ├── Space Station (Williams 1987)1.11.vbs ├── Spark Plugs (WIlliams 1951).vbs ├── Speed Test 1.0.2.vbs ├── Spider-Man_2.1_VE.vbs ├── Spider-Man_3.0.vbs ├── Spider-Man_VE_2.2.vbs ├── Spiderman_1.2.2_JP.vbs ├── Spirit (Gottlieb 1982)_DOZER_1.4.vbs ├── Spring Break (Gottlieb 1987) v1.03.vbs ├── Star Gazer V1.00.vbs ├── Star Gazer(Stern 1980) v1.2.vbs ├── Star Gazer(Stern 1980)Siggis Mod 1.0.vbs ├── Star Trek (Bally 1979) v1.4.2.vbs ├── Star Trek (Gottlieb 1971) 1.1.vbs ├── Star Trek - The Next Generation (Williams 1993) 1.2_SurroundSound 1.1.vbs ├── Star Wars Empire Strikes Back (Hankin 1980) v2.2.1.vbs ├── Star Wars Trilogy Siggis MOD1.1.vbs ├── StarWars BountyHunter 3.02.vbs ├── Starship Troopers (SEGA 1997) VPN Edition 1.1.vbs ├── Starship Troopers (Sega 1997) V1.1.vbs ├── Stones_10_RTM_1.5_FINAL.vbs ├── Strange Science (Bally 1986) v1.0.1.vbs ├── Stranger Things (Original 2020) LW.vbs ├── StrangerThings v2.1-DOF.vbs ├── Strikes And Spares (Bally 1978) 2.0.vbs ├── Super Soccer (Gottlieb 1975).vbs ├── Super Straight (Sonic 1977)1.4.vbs ├── Super_Mario_Bros (Gottlieb 1992).vbs ├── Surf Champ (Gottlieb 1976) 1.2.0.vbs ├── Surf'n Safari v1.1.1.vbs ├── Surf'n Safari v1.2.0.vbs ├── Swords of Fury (Williams 1988) 1.5.vbs ├── TOTAN_1.2.0.vbs ├── TRON Classic (Original 2022) v2.1.vbs ├── Tag Team (Gottlieb 1985) 2.0.vbs ├── Taito Gemini 2000 mod.vbs ├── Target Alpha (Gottlieb) (1976) FS DOF.vbs ├── Taxi (Williams 1988)1.2.vbs ├── Tee'd Off (Gottlieb 1993) 1.2.6.vbs ├── Terminator 2 (Williams 1991) g5k v1.1a.vbs ├── The Addams Family (Bally 1992) v1.4.1.vbs ├── The Addams Family Gold (Williams 1994) v1.4.vbs ├── The Dude v2.0(Strikes And Spares) (Bally 1978).vbs ├── The Incredible Hulk (Gottlieb 1979) v1.1.1.vbs ├── The Machine - Bride Of Pinbot (Williams 1991)2.1.vbs ├── The Rolling Stones LE (Stern 2011) v1.0.6i.vbs ├── The Six Million Dollar Man (Bally 1978) v1.0.vbs ├── The Walking Dead LE Premium (Stern 2014) day 1.1.vbs ├── The Walking Dead LE Premium (Stern 2014) night 1.1.vbs ├── The Walking Dead_VP10_LEMOD_REDUX.vbs ├── The Web_VPX_1_0.vbs ├── The Web_VPX_1_2.vbs ├── Theatre of magic VPX HAT MOD NZ-TT 1.0.vbs ├── Theatre of magic VPX NZ-TT 1.0.vbs ├── Time Line (Gottlieb 1980).vbs ├── Time Machine (Data East 1988) 1.1 Team PP.vbs ├── Time Machine (Data East 1988) LW.vbs ├── Time Machine (Data East 1988) v.2.2.vbs ├── TimeFantasy (Williams 1983) 1.0_HF_Mod.vbs ├── Titan v1.0.3.vbs ├── TitleFightBeta1.vbs ├── Toledo (Williams 1975) VP10.vbs ├── Tom and Jerry (Original 2019) v1.3.vbs ├── Tommy_VP10_1.1.vbs ├── TopGun 1.0b.vbs ├── Torpedo Alley (Data East 1988) jpj 1,8 vpx3 PP.vbs ├── Trade Winds (Williams 1962)1.4a.vbs ├── Transformers Pro (Stern 2011) v.2.2.vbs ├── Treff (Walter Steiner 1949) 1_3.vbs ├── Tri Zone VPX v1.0.0.vbs ├── Triple Strike (Williams 1975) v5.0.1.vbs ├── Tron Legacy (Stern 2011) (G5K 2.2).vbs ├── Truck Stop (Bally 1988) v1.0.vbs ├── Twilight Zone_VPX_2.1.vbs ├── VP10-The Walking Dead Blood Mod 1.0.vbs ├── VP10-X-Files v1.6.vbs ├── VP10_Attack_From_Mars_Dozer_RTM.vbs ├── VP10_Indiana Jones (Stern 2008)-Hanibal-1.6.vbs ├── VP10_Indiana Jones (Stern 2008)-Hanibal-2.5.vbs ├── VP10_Judge_Dredd_Dozer_RTM.vbs ├── VP10_Rescue_911_Dozer_RTM_1.3.vbs ├── VP10_TX_SECTOR_Dozer_RTM.vbs ├── Vampire (Bally 1971).vbs ├── Vector (Bally 1982) v1.1.vbs ├── Vegas 1.0.1.vbs ├── Victory (Gottlieb 1987) 1.0.1.vbs ├── Victory (Gottlieb 1987) 2.0.1.vbs ├── Viper 1.1.1.vbs ├── Volcano (Gottlieb 1981)_Bigus(MOD)2.0.vbs ├── Voltan Escapes Cosmic Doom (Bally 1978) 1.0.vbs ├── Vortex v1.0.2.vbs ├── Vulcan (Gottlieb 1977).vbs ├── Vulcan IV (Rowamet 1982).vbs ├── WWF Royal Rumble (Data East 1994) v1.10.vbs ├── Wheel of Fortune (Stern 2007) v1.1.vbs ├── Whirlwind VPX 1.4.vbs ├── Whitewater 1.0.vbs ├── Whitewater 1.1.vbs ├── WhoDunnit_1.0.vbs ├── Whoa Nellie! Big Juicy Melons (Stern 2015) v2.1.4.vbs ├── Winner (Williams 1971) 0.98.vbs ├── Wipe Out (Premier 1993) 1.1.0.vbs ├── Wizard! (Bally 1975).vbs ├── Wizard! VPX v1.03 - pinball58.vbs ├── WoZ (Original 2018).vbs ├── Wonderland (Williams 1955) r1.1.vbs ├── World Cup - Williams 1978_1.0.0.vbs ├── World_Cup_Soccer_1.2.vbs ├── X-Men LE (Stern 2012) v1.0.3.vbs ├── X-Men(ICPjuggla)6-27c.vbs ├── Xenon (Bally 1980) 1.2.5.vbs ├── Yello Pinball Cha Cha (2021).vbs ├── Young Frankenstein (hauntfreaks 2021) 10.7 only.vbs ├── Yukon (Williams 1971).vbs ├── Yukon Special (Williams 1971).vbs ├── Zarza 1.0.0.vbs ├── Zira_VPX_1_1.vbs ├── Zodiac (Williams 1971).vbs ├── amh 091315a.vbs ├── bad cats_vpw_v2.03.vbs ├── cactuscanyoncontinued_PROC ├── cc_machine.yaml ├── game.py └── trough.py ├── harley quinn (HauntFreaks 2017).vbs ├── kingpin 080715a.vbs ├── meteor vpx rtm blue led mod 11.vbs ├── sharkeys 112615a.vbs ├── special_audiopan_and_audiofade_patched ├── A Charlie Brown Christmas feat. Vince Guaraldi (iDigStuff 2023) 1.1.vbs ├── Adventures of Rocky and Bullwinkle and Friends (Data East 1993) v1.06.vbs ├── Alien Star (Gottlieb 1984) v2.0.vbs ├── Bally Game Show, The (Bally 1990) v1.29.vbs ├── Banzai Run (Williams 1988) v1.01.vbs ├── Beat The Clock (Bally 1985) VPW v1.0.1.vbs ├── Big Bang Bar (Capcom 1996) VPW 2.1.vbs ├── Big Buck Hunter Pro (Stern 2010) v1.10.vbs ├── Big Game (Stern 1980) w VR Room 1.5.1.vbs ├── Black Pyramid (Bally 1984) v2.0.vbs ├── Bram Stokers Dracula (Williams 1993) VPW 1.0.vbs ├── Bram Stokers Dracula (Williams 1993) VPW 1.vbs ├── Breakshot (Capcom 1996) VPW v1.1.vbs ├── Catacomb (Stern 1981) v2.0.vbs ├── Circus (Gottlieb 1980) w VR Room v2.0.0.vbs ├── Class of 1812 (Gottlieb 1991) v3.0.21.vbs ├── Dragonfist (Stern 1981) v2.0.vbs ├── Earth Wind Fire (Zaccaria 1981).2.vbs ├── Earthshaker (Williams 1989) VPW 1.1.1.vbs ├── Evel Knievel (Bally 1977) 5.0.vbs ├── F-14 Tomcat (Williams 1987) VPW Mod 1.vbs ├── Fish Tales (Williams 1992) VPW 1.vbs ├── Gilligan's Island (Bally 1991) v1.46.vbs ├── Godzilla (Sega 1998) VPW 1.3.vbs ├── Goldeneye (Sega 1996) VPW 1.vbs ├── Gorgar (Williams 1979) v.2.0.vbs ├── Haunted House (Gottlieb 1982) VPW 2.1.1.vbs ├── Hollywood Heat (Gottlieb 1986) v1.vbs ├── Indiana Jones The Pinball Adventure (Williams 1993) VPWmod v1.vbs ├── Indianapolis 500 (Bally 1995) v1.36.vbs ├── Kings Of Steel (Bally 1984) v2.0.vbs ├── Lethal Weapon 3 (Data East 1992) VPW 2.0.vbs ├── Metallica Premium Monsters (Stern 2013) VPW 2.0.vbs ├── Mustang (Stern 2014) v1.27.vbs ├── Nascar (Stern 2005) v1.17.vbs ├── New Wave (Bell Games 1985) v2.0.vbs ├── Nightmare Before Christmas(2024) v1.vbs ├── Pennant Fever (Williams 1984) 1.0.vbs ├── Phantom Of The Opera (Data East 1990) v1.25.vbs ├── Police Force (Williams 1989) VPW v1.1.vbs ├── Popeye Saves the Earth (Bally 1994) v1.25.vbs ├── Safe Cracker (Bally 1996) v2.0.0.vbs ├── Spectrum (Bally 1981) VPW v1.0.vbs ├── Spider-Man Classic (Stern 2007) VPW Mod 2.1.vbs ├── Star God (Zaccaria 1980) 2.2.5.vbs ├── Star Race (Gottlieb 1980) w VR Room v0.06.vbs ├── Star Trek LE (Stern 2013) v1.10.vbs ├── Stargod.RC1.vbs ├── Street Fighter II (Gottlieb 1993) VPW 1.vbs ├── Strikes And Spares (Bally 1978) 2.0.vbs ├── Super Orbit (Gottlieb 1983) v2.0.1.vbs ├── The Addams Family (Bally1992) 2.4.12.vbs ├── The Games (Gottlieb 1984) v2.0.vbs ├── The Rolling Stones LE (Stern 2011) v1.0.6i.vbs ├── The Sopranos (Stern 2005) Siggis Mod 1.0.vbs ├── The Sopranos (Stern 2005) v1.22.vbs ├── Thunder Man (AppleTime 1987).0.8.vbs ├── Tornado Rally (original 2024).vbs ├── Transformers Pro (Stern 2011) v.2.vbs ├── Tri Zone (Williams 1979) v2.0.vbs ├── Twilight Zone (Bally 1993) VPW Edition v1.0.vbs ├── Warlok (Williams 1982) VPW 1.vbs ├── White Water (Williams 1993) v.1.2.1.vbs ├── X-Files (Sega 1997) v1.29.vbs ├── Xenon (Bally 1980) v2.5.2.vbs └── bord_probably │ ├── Eight Ball Deluxe (Bally 1981).vbs │ ├── Hoops (Gottlieb 1991) Wylte.vpx_VPUMod.vbs │ ├── Lost World (Bally 1979).vbs │ ├── Paragon (Bally 1979).vbs │ ├── Terminator 3 (Stern 2003 - Siggi)TW.vbs │ ├── Topaz (Inder 1979).vbs │ └── WARNING.txt ├── star wars - data east (1992) v1.5.1.vbs ├── tftc 072515a.vbs └── vernes world 082516a.vbs /Aztec (Williams 1976) 1.3 Mod Citedor JPJ-ARNGRIM-CED Team PP.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sverrewl/vpxtable_scripts/235e65e3e425020846ebca556edd82575716a6ed/Aztec (Williams 1976) 1.3 Mod Citedor JPJ-ARNGRIM-CED Team PP.vbs -------------------------------------------------------------------------------- /Barb Wire (Gottlieb 1996)1.4.vbs: -------------------------------------------------------------------------------- 1 | Option Explicit 2 | On Error Resume Next 3 | 4 | ' Thalamus 2019 March 5 | ' Made ready for improved directional sounds, but, there is very few samples in the table. 6 | ' Table lacks RollingTimer and BallRolling samples - needs to be added manually. 7 | ' 8 | ' !! NOTE : Table not verified yet !! 9 | 10 | ' Options 11 | ' Volume devided by - lower gets higher sound 12 | 13 | Const VolDiv = 200 ' Lower number, louder ballrolling/collition sound 14 | Const VolCol = 10 ' Ball collition divider ( voldiv/volcol ) 15 | 16 | Const VolGates = 1 ' Gates volume. 17 | Const VolMetal = 1 ' Metals volume. 18 | Const VolPi = 1 ' Rubber pins volume. 19 | Const VolTarg = 1 ' Targets volume. 20 | Const VolSpin = 1.5 ' Spinners volume. 21 | Const VolFlip = .15 ' Flipper volume. 22 | Const VolSling = 1 ' Slingshoit volume. 23 | Const VolWire = 1.8 ' Wireramp volume. 24 | 25 | 26 | ExecuteGlobal GetTextFile("controller.vbs") 27 | If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package" 28 | On Error Goto 0 29 | 30 | LoadVPM "01120100","gts3.vbs",3.10 31 | 32 | Dim VarRol 33 | If Table1.ShowDT = true then 34 | VarRol=0 35 | Wall8.IsDropped=False 36 | Wall9.IsDropped=False 37 | Else 38 | VarRol=1 39 | Wall8.IsDropped=True 40 | Wall9.IsDropped=True 41 | End If 42 | 43 | Const UseSolenoids=2,UseLamps=1,UseSync=1,UseGI=0,SSolenoidOn="SolOn",SSolenoidOff="SolOff",SFlipperOn="FlipperUp" 44 | Const SFlipperOff="FlipperDown",SCoin="coin3",cGameName="barbwire" 45 | 46 | Const swStartButton=4 47 | 48 | 'SolCallback(1)="vpmSolSound SoundFX(""Jet3"",DOFContactors)," 49 | 'SolCallback(2)="vpmSolSound SoundFX(""Sling"",DOFContactors)," 50 | 'SolCallback(3)="vpmSolSound SoundFX(""Sling"",DOFContactors)," 51 | SolCallback(6)="bsLK.SolOut" 52 | SolCallback(7)="bsRK.SolOut" 53 | SolCallback(8)="vpmSolAutoPlungeS Plunger1, SoundFX(SSolenoidOn,DOFContactors), 2," 54 | 'SolCallback(9)='Pull BallGate Diverter 55 | SolCallback(10)="vpmSolDiverter BallGate,True,"'Hold Ballgate Diverter 56 | 'SolCallback(11)="vpmFlasher F10,"'Lens Unit Coil 1 57 | SolCallback(11) = "setlampF10" 58 | 'SolCallback(12)="vpmFlasher F11,"'Lens Unit Coil 2 59 | SolCallback(12) = "setlampF11" 60 | 'SolCallback(13)="vpmFlasher F12,"'Lens Unit Coil 3 61 | SolCallback(13) = "setlampF12" 62 | 'SolCallback(14)="vpmFlasher F13," 63 | SolCallback(14) = "setlampF13" 64 | 'SolCallback(15)="vpmFlasher F14," 65 | SolCallback(15) = "setlampF14" 66 | SolCallback(16)="MoveFatso"'Big Fatso Motor 67 | 'SolCallback(17)="vpmFlasher F16,"'Bottom Left Dome Flasher 68 | SolCallback(17) = "setlampF16" 69 | 'SolCallback(18)="vpmFlasher F17,"'Captive Ball Flasher 70 | SolCallback(18) = "setlampF17" 71 | 'SolCallback(19)="vpmFlasher F18,"'Top Left Upkicker Flasher 72 | SolCallback(19) = "setlampF18" 73 | 'SolCallback(20)="vpmFlasher F19,"'Top Left Dome Flasher 74 | SolCallback(20) = "setlampF19" 75 | 'SolCallback(21)="vpmFlasher F20,"'Left Ramp Flasher 76 | SolCallback(21) = "setlampF20" 77 | 'SolCallback(22)="vpmFlasher F21,"'Big Fatso Flasher 78 | 'SolCallback(22) = "setlampF21" 79 | 'SolCallback(23)="vpmFlasher F22,"'Right Ramp Flasher 80 | SolCallback(23) = "setlampF22" 81 | 'SolCallback(24)="vpmFlasher Array(F23,Bumper1),"'Top Right Dome Flasher 82 | SolCallback(24) = "setlampF23" 83 | 'SolCallback(25)="vpmFlasher F24,"'Bottom Right Dome Flasher 84 | SolCallback(25) = "setlampF24" 85 | 'SolCallback(26)='Lightbox Relay (A) 86 | 'SolCallback(27)='Ticket/Coin Meter 87 | SolCallback(28)="bsTrough.SolOut" 88 | SolCallback(29)="bsTrough.SolIn" 89 | SolCallback(30)="vpmSolSound SoundFX(""Knocker"",DOFKnocker)," 90 | SolCallback(32)="vpmNudge.SolGameOn" 91 | 'SolCallback(sLLFlipper)="vpmSolFlipper LeftFlipper,Flipper1," 92 | 'SolCallback(sLRFlipper)="vpmSolFlipper RightFlipper,Nothing," 93 | 94 | SolCallback(sLRFlipper) = "SolRFlipper" 95 | SolCallback(sLLFlipper) = "SolLFlipper" 96 | 97 | Sub SolLFlipper(Enabled) 98 | If Enabled Then 99 | PlaySoundAtVol SoundFX("FlipperUp",DOFFlippers), LeftFlipper, VolFlip 100 | PlaySoundAtVol SoundFX("FlipperUp",DOFFlippers), Flipper1, VolFlip 101 | LeftFlipper.RotateToEnd 102 | Flipper1.RotateToEnd 103 | Else 104 | PlaySoundAtVol SoundFX("FlipperDown",DOFFlippers), LeftFlipper, VolFlip 105 | PlaySoundAtVol SoundFX("FlipperDown",DOFFlippers), Flipper1, VolFlip 106 | LeftFlipper.RotateToStart 107 | Flipper1.RotateToStart 108 | End If 109 | End Sub 110 | 111 | Sub SolRFlipper(Enabled) 112 | If Enabled Then 113 | PlaySoundAtVol SoundFX("FlipperUp",DOFFlippers), RightFlipper, VolFlip 114 | RightFlipper.RotateToEnd 115 | Else 116 | PlaySoundAtVol SoundFX("FlipperDown",DOFFlippers), RightFlipper, VolFlip 117 | RightFlipper.RotateToStart 118 | End If 119 | End Sub 120 | 121 | Dim bsTrough,bsLK,bsRK 122 | 123 | Sub setlampF10(Enabled) 124 | If Enabled then F10.State=1 Else F10.State=0 125 | End Sub 126 | 127 | Sub setlampF11(Enabled) 128 | If Enabled then F11.State=1 Else F11.State=0 129 | End Sub 130 | 131 | Sub setlampF12(Enabled) 132 | If Enabled then F12.State=1 Else F12.State=0 133 | End Sub 134 | 135 | Sub setlampF13(Enabled) 136 | If Enabled then F13.State=1 Else F13.State=0 137 | End Sub 138 | 139 | Sub setlampF14(Enabled) 140 | If Enabled then F14.State=1 Else F14.State=0 141 | End Sub 142 | 143 | Sub setlampF16(Enabled) 144 | If Enabled then F16.State=1:F16a.visible=1 Else F16.State=0:F16a.visible=0 145 | End Sub 146 | 147 | Sub setlampF17(Enabled) 148 | If Enabled then F17.State=1:F17a.visible=1 Else F17.State=0:F17a.visible=0 149 | End Sub 150 | 151 | Sub setlampF18(Enabled) 152 | If Enabled then F18.State=1:F18a.visible=1 Else F18.State=0:F18a.visible=0 153 | End Sub 154 | 155 | Sub setlampF19(Enabled) 156 | If Enabled then F19.State=1:F19b.State=1:F19c.visible=1 Else F19.State=0:F19b.State=0:F19c.visible=0 157 | End Sub 158 | 159 | Sub setlampF10(Enabled) 160 | If Enabled then F10.State=1 Else F10.State=0 161 | End Sub 162 | 163 | Sub setlampF20(Enabled) 164 | If Enabled then F20.State=1:F20b.State=1:F20c.visible=1 Else F20.State=0:F20b.State=0:F20c.visible=0 165 | End Sub 166 | 167 | 'Sub setlampF21(Enabled) 168 | 'If Enabled then F21.State=1 Else F21.State=0 169 | 'End Sub 170 | 171 | Sub setlampF22(Enabled) 172 | If Enabled then F22.State=1:F22b.State=1:F22c.visible=1 Else F22.State=0:F22b.State=0:F22c.visible=0 173 | End Sub 174 | 175 | Sub setlampF23(Enabled) 176 | If Enabled then F23.State=1:F23b.State=1:F23c.visible=1 Else F23.State=0:F23b.State=0:F23c.visible=0 177 | End Sub 178 | 179 | Sub setlampF24(Enabled) 180 | If Enabled then F24.State=1:F24c.visible=1 Else F24.State=0:F24c.visible=0 181 | End Sub 182 | 183 | Sub Table1_Init 184 | Wall111.IsDropped=1 185 | Kicker7.Enabled=0 186 | vpmInit Me 187 | Plunger1.PullBack 188 | On Error Resume Next 189 | With Controller 190 | .GameName=cGameName 191 | If Err Then MsgBox"Can't start Game"&cGameName&vbNewLine&Err.Description:Exit Sub 192 | .SplashInfoLine="Barb Wire - Gottlieb 1991" 193 | .HandleKeyboard=0 194 | .ShowTitle=0 195 | .ShowDMDOnly=1 196 | .HandleMechanics=0 197 | .ShowFrame=0 198 | .Games(cGameName).Settings.Value("rol") = VarRol 199 | .Run GetPlayerHwnd 200 | If Err Then MsgBox Err.Description 201 | End With 202 | On Error Goto 0 203 | PinMAMETimer.Interval=PinMAMEInterval 204 | PinMAMETimer.Enabled=1 205 | vpmNudge.TiltSwitch=151 206 | vpmNudge.Sensitivity=6 207 | vpmNudge.TiltObj=Array(Bumper1,Leftslingshot,Rightslingshot) 208 | 209 | vpmMapLights AllLights 210 | 211 | Set bsTrough=New cvpmBallStack 212 | bsTrough.InitSw 16,0,0,26,0,0,0,0 213 | bsTrough.InitKick BallRelease,120,2 214 | bsTrough.InitEntrySnd "SolOn","SolOn" 215 | bsTrough.InitExitSnd SoundFX("BallRel",DOFContactors),SoundFX("SolOn",DOFContactors) 216 | bsTrough.Balls=3 217 | 218 | Set bsLK=New cvpmBallStack 219 | bsLK.InitSw 0,50,0,0,0,0,0,0 220 | bsLK.InitKick LUK,150,7 221 | bsLK.InitExitSnd SoundFX("Popper",DOFContactors),SoundFX("SolOn",DOFContactors) 222 | 223 | Set bsRK=New cvpmBallStack 224 | bsRK.InitSw 0,25,0,0,0,0,0,0 225 | bsRK.InitKick RUK,233,7 226 | bsRK.InitExitSnd SoundFX("Popper",DOFContactors),SoundFX("SolOn",DOFContactors) 227 | 228 | vpmCreateEvents AllSwitches 229 | Kicker1.CreateBall 230 | Kicker1.Kick 150,2 231 | Kicker2.CreateBall 232 | Kicker2.Kick 180,1 233 | End Sub 234 | 235 | Sub Table1_KeyDown(ByVal KeyCode) 236 | If KeyCode=KeyFront Then Controller.Switch(1)=1'Buy-In 237 | If KeyCode=LeftFlipperKey Then Controller.Switch(42)=1 238 | If KeyCode=RightFlipperkey Then Controller.Switch(43)=1 239 | If vpmKeyDown(KeyCode) Then Exit Sub 240 | If KeyCode=PlungerKey Then Plunger.Pullback 241 | End Sub 242 | 243 | Sub Table1_KeyUp(ByVal KeyCode) 244 | If KeyCode=KeyFront Then Controller.Switch(1)=0 245 | If KeyCode=LeftFlipperKey Then Controller.Switch(42)=0 246 | If KeyCode=RightFlipperkey Then Controller.Switch(43)=0 247 | If vpmKeyUp(KeyCode) Then Exit Sub 248 | if KeyCode=PlungerKey Then Plunger.Fire:PlaySoundAtVol"Plunger", Plunger, 1 249 | End Sub 250 | 251 | Sub Bumper1_Hit:vpmTimer.PulseSw 10:PlaySoundAtBall SoundFX("Jet3",DOFContactors):End Sub 252 | Sub LeftSlingShot_SlingShot:vpmTimer.PulseSw 11:PlaySoundAtBallVol SoundFX("SlingshotLeft",DOFContactors), VolSling:End Sub 253 | Sub RightSlingShot_SlingShot:vpmTimer.PulseSw 12:PlaySoundAtBallVol SoundFX("SlingshotRight",DOFContactors), VolSling:End Sub 254 | Sub Drain_Hit:bsTrough.Addball Me:End Sub 255 | Sub RUK_Hit:bsRK.AddBall Me:End Sub 256 | Sub LUK_Hit:bsLK.AddBall Me:End Sub 257 | Sub Kicker4_Hit:Me.DestroyBall:vpmTimer.PulseSwitch(60),600,"ToRightUpkicker":End Sub 258 | Sub ToRightUpkicker(swNo):bsRK.AddBall 0:End Sub 259 | Sub Kicker3_Hit:Me.DestroyBall:vpmTimer.PulseSwitch(70),200,"ToLeftVuk":End Sub 260 | Sub ToLeftVuk(swNo):bsLK.AddBall 0:End Sub 261 | 262 | Dim FatsoPos,FatsoDir 263 | FatsoPos=0:FatsoDir=1 264 | 265 | Sub MoveFatso(Enabled) 266 | If Enabled Then 267 | If FatsoDir=-1 Then 268 | FatsoDir=1 269 | Else 270 | FatsoDir=-1 271 | End If 272 | FatsoTimer.Enabled=1 273 | Else 274 | FatsoTimer.Enabled=0 275 | End If 276 | End Sub 277 | 278 | Sub FatsoTimer_Timer 279 | Primitive2.TransZ=Primitive2.TransZ+FatsoDir 280 | If Primitive2.TransZ = -100 Then FatsoPos=1:FatsoTimer.Enabled=False 281 | If Primitive2.TransZ = 0 Then FatsoPos=0:FatsoTimer.Enabled=False 282 | Select Case FatsoPos 283 | Case 0:Controller.Switch(27)=1:Controller.Switch(17)=0:BigFatso.IsDropped=0 284 | Case 1:Controller.Switch(27)=0:Controller.Switch(17)=1:BigFatso.IsDropped=1 285 | End Select 286 | End Sub 287 | 288 | Sub BigFatso_Hit:vpmTimer.PulseSw 70:End Sub 289 | 290 | Sub Kicker7_Hit:Me.DestroyBall:Kicker8.CreateBall:Kicker8.Kick 0,15:End Sub 291 | 292 | Sub Trigger1_Hit : PlaySound "fx_metalrolling",-1, Vol(ActiveBall)*VolWire, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall) : End Sub 293 | Sub Trigger2_Hit : StopSound "fx_metalrolling" : End Sub 294 | Sub Trigger3_Hit : PlaySound "fx_metalrolling",-1, Vol(ActiveBall)*VolWire, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall) : End Sub 295 | Sub Trigger4_Hit : StopSound "fx_metalrolling": End Sub 296 | 297 | 298 | 'WALLS 299 | 'Dim L(74) 300 | 'Set L(5)=L5 301 | 'Set L(6)=L6 302 | 'Set L(7)=L7 303 | 'Set L(11)=L11 304 | 'Set L(12)=L12 305 | 'Set L(13)=L13 306 | 'Set L(14)=L14 307 | 'Set L(15)=L15 308 | 'Set L(16)=L16 309 | 'Set L(17)=L17 310 | 'Set L(21)=L21 311 | 'Set L(22)=L22 312 | 'Set L(23)=L23 313 | 'Set L(24)=L24 314 | 'Set L(25)=L25 315 | 'Set L(26)=L26 316 | 'Set L(27)=L27 317 | 'Set L(32)=L32 318 | 'Set L(33)=L33 319 | 'Set L(34)=L34 320 | 'Set L(35)=L35 321 | 'Set L(36)=L36 322 | 'Set L(37)=L37 323 | 'Set L(42)=L42 324 | 'Set L(43)=L43 325 | 'Set L(44)=L44 326 | 'Set L(45)=L45 327 | 'Set L(46)=L46 328 | 'Set L(47)=L47 329 | 'Set L(50)=L50 330 | 'Set L(51)=L51 331 | 'Set L(52)=L52 332 | 'Set L(53)=L53 333 | 'Set L(54)=L54 334 | 'Set L(55)=L55 335 | 'Set L(56)=L56 336 | 'Set L(60)=L60 337 | 'Set L(61)=L61 338 | 'Set L(62)=L62 339 | 'Set L(63)=L63 340 | 'Set L(64)=L64 341 | 'Set L(65)=L65 342 | 'Set L(66)=L66 343 | 'Set L(67)=L67 344 | 'Set L(70)=L70 345 | 'Set L(71)=L71 346 | 'Set L(72)=L72 347 | 'Set L(73)=L73 348 | 'Set L(74)=L74 349 | 350 | Set MotorCallback=GetRef("UpdateMultipleLamps") 351 | 352 | Dim X 353 | 354 | Sub UpdateMultipleLamps 355 | dim chg,count,ii 356 | chg=controller.changedlamps 357 | count=ubound(chg) 358 | On Error Resume Next 359 | if count>0 then 360 | For X=0 To count 361 | If chg(x,1) Then 362 | L(chg(x,0)).IsDropped=0 363 | else 364 | L(chg(x,0)).IsDropped=1 365 | end if 366 | Next 367 | Light0.State=ABS(Controller.Lamp(0)) 368 | L57.State=ABS(Controller.Lamp(57)) 369 | L75.State=ABS(Controller.Lamp(75)) 370 | L76.State=ABS(Controller.Lamp(76)) 371 | L77.State=ABS(Controller.Lamp(77)) 372 | End If 373 | End Sub 374 | 375 | Sub flippers_Timer() 376 | LeftFlipperP.objRotZ = LeftFlipper.CurrentAngle-90 377 | LeftFlipperP1.objRotZ = Flipper1.CurrentAngle-90 378 | RightFlipperP.objRotZ = RightFlipper.CurrentAngle-90 379 | End Sub 380 | 381 | ' ******************************************************************************************************* 382 | ' Positional Sound Playback Functions by DJRobX and Rothbauerw 383 | ' PlaySound sound, 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 1, AudioFade(ActiveBall) 384 | ' ******************************************************************************************************* 385 | 386 | ' Play a sound, depending on the X,Y position of the table element (especially cool for surround speaker setups, otherwise stereo panning only) 387 | ' parameters (defaults): loopcount (1), volume (1), randompitch (0), pitch (0), useexisting (0), restart (1)) 388 | ' Note that this will not work (currently) for walls/slingshots as these do not feature a simple, single X,Y position 389 | 390 | Sub PlayXYSound(soundname, tableobj, loopcount, volume, randompitch, pitch, useexisting, restart) 391 | PlaySound soundname, loopcount, volume, AudioPan(tableobj), randompitch, pitch, useexisting, restart, AudioFade(tableobj) 392 | End Sub 393 | 394 | ' Set position as table object (Use object or light but NOT wall) and Vol to 1 395 | 396 | Sub PlaySoundAt(soundname, tableobj) 397 | PlaySound soundname, 1, 1, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj) 398 | End Sub 399 | 400 | 'Set all as per ball position & speed. 401 | 402 | Sub PlaySoundAtBall(soundname) 403 | PlaySoundAt soundname, ActiveBall 404 | End Sub 405 | 406 | 'Set position as table object and Vol manually. 407 | 408 | Sub PlaySoundAtVol(sound, tableobj, Volume) 409 | PlaySound sound, 1, Volume, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj) 410 | End Sub 411 | 412 | 'Set all as per ball position & speed, but Vol Multiplier may be used eg; PlaySoundAtBallVol "sound",3 413 | 414 | Sub PlaySoundAtBallVol(sound, VolMult) 415 | PlaySound sound, 0, Vol(ActiveBall) * VolMult, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 1, AudioFade(ActiveBall) 416 | End Sub 417 | 418 | 'Set position as bumperX and Vol manually. 419 | 420 | Sub PlaySoundAtBumperVol(sound, tableobj, Vol) 421 | PlaySound sound, 1, Vol, AudioPan(tableobj), 0,0,1, 1, AudioFade(tableobj) 422 | End Sub 423 | 424 | Sub PlaySoundAtBOTBallZ(sound, BOT) 425 | PlaySound sound, 0, ABS(BOT.velz)/17, AudioPan(BOT), 0, Pitch(BOT), 1, 0, AudioFade(BOT) 426 | End Sub 427 | 428 | '********************************************************************* 429 | ' Supporting Ball & Sound Functions 430 | '********************************************************************* 431 | 432 | Function RndNum(min, max) 433 | RndNum = Int(Rnd() * (max-min + 1) ) + min ' Sets a random number between min and max 434 | End Function 435 | 436 | Function AudioFade(tableobj) ' Fades between front and back of the table (for surround systems or 2x2 speakers, etc), depending on the Y position on the table. "table1" is the name of the table 437 | Dim tmp 438 | On Error Resume Next 439 | tmp = tableobj.y * 2 / table1.height-1 440 | If tmp > 0 Then 441 | AudioFade = Csng(tmp ^10) 442 | Else 443 | AudioFade = Csng(-((- tmp) ^10) ) 444 | End If 445 | End Function 446 | 447 | Function AudioPan(tableobj) ' Calculates the pan for a tableobj based on the X position on the table. "table1" is the name of the table 448 | Dim tmp 449 | On Error Resume Next 450 | tmp = tableobj.x * 2 / table1.width-1 451 | If tmp > 0 Then 452 | AudioPan = Csng(tmp ^10) 453 | Else 454 | AudioPan = Csng(-((- tmp) ^10) ) 455 | End If 456 | End Function 457 | 458 | Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed 459 | Vol = Csng(BallVel(ball) ^2 / VolDiv) 460 | End Function 461 | 462 | Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed 463 | Pitch = BallVel(ball) * 20 464 | End Function 465 | 466 | Function BallVel(ball) 'Calculates the ball speed 467 | BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) ) 468 | End Function 469 | 470 | Function BallVelZ(ball) 'Calculates the ball speed in the -Z 471 | BallVelZ = INT((ball.VelZ) * -1 ) 472 | End Function 473 | 474 | Function VolZ(ball) ' Calculates the Volume of the sound based on the ball speed in the Z 475 | VolZ = Csng(BallVelZ(ball) ^2 / 200)*1.2 476 | End Function 477 | 478 | 479 | '***************************************** 480 | ' JP's VP10 Rolling Sounds 481 | '***************************************** 482 | 483 | Const tnob = 5 ' total number of balls 484 | ReDim rolling(tnob) 485 | InitRolling 486 | 487 | Sub InitRolling 488 | Dim i 489 | For i = 0 to tnob 490 | rolling(i) = False 491 | Next 492 | End Sub 493 | 494 | Sub RollingTimer_Timer() 495 | Dim BOT, b 496 | BOT = GetBalls 497 | 498 | ' stop the sound of deleted balls 499 | For b = UBound(BOT) + 1 to tnob 500 | rolling(b) = False 501 | StopSound("fx_ballrolling" & b) 502 | Next 503 | 504 | ' exit the sub if no balls on the table 505 | If UBound(BOT) = -1 Then Exit Sub 506 | 507 | ' play the rolling sound for each ball 508 | 509 | For b = 0 to UBound(BOT) 510 | If BallVel(BOT(b) ) > 1 Then 511 | rolling(b) = True 512 | if BOT(b).z < 30 Then ' Ball on playfield 513 | PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), AudioPan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0, AudioFade(BOT(b) ) 514 | Else ' Ball on raised ramp 515 | PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) )*.5, AudioPan(BOT(b) ), 0, Pitch(BOT(b) )+50000, 1, 0, AudioFade(BOT(b) ) 516 | End If 517 | Else 518 | If rolling(b) = True Then 519 | StopSound("fx_ballrolling" & b) 520 | rolling(b) = False 521 | End If 522 | End If 523 | If BOT(b).VelZ < -1 and BOT(b).z < 55 and BOT(b).z > 27 Then 'height adjust for ball drop sounds 524 | PlaySoundAtBOTBallZ "fx_ball_drop" & b, BOT(b) 525 | 'debug.print BOT(b).velz 526 | End If 527 | Next 528 | End Sub 529 | 530 | '********************** 531 | ' Ball Collision Sound 532 | '********************** 533 | 534 | Sub OnBallBallCollision(ball1, ball2, velocity) 535 | PlaySound("fx_collide"), 0, Csng(velocity) ^2 / (VolDiv/VolCol), AudioPan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1) 536 | End Sub 537 | 538 | ' ************ 539 | ' Collections 540 | ' ************ 541 | 542 | Sub Pins_Hit (idx) 543 | PlaySound "pinhit_low", 0, Vol(ActiveBall)*VolPi, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall) 544 | End Sub 545 | 546 | Sub Targets_Hit (idx) 547 | PlaySound "target", 0, Vol(ActiveBall)*VolTarg, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall) 548 | End Sub 549 | 550 | Sub Metals_Thin_Hit (idx) 551 | PlaySound "metalhit_thin", 0, Vol(ActiveBall)*VolMetal, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 552 | End Sub 553 | 554 | Sub Metals_Medium_Hit (idx) 555 | PlaySound "metalhit_medium", 0, Vol(ActiveBall)*VolMetal, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 556 | End Sub 557 | 558 | Sub Metals2_Hit (idx) 559 | PlaySound "metalhit2", 0, Vol(ActiveBall)*VolMetal, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 560 | End Sub 561 | 562 | Sub Gates_Hit (idx) 563 | PlaySound "gate4", 0, Vol(ActiveBall)*VolGates, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 564 | End Sub 565 | 566 | Sub Spinner_Spin 567 | PlaySoundAtVol "fx_spinner", Spinner, VolSpin 568 | End Sub 569 | 570 | ' Thalamus : Exit in a clean and proper way 571 | Sub Table1_exit() 572 | Controller.Pause = False 573 | Controller.Stop 574 | End Sub 575 | -------------------------------------------------------------------------------- /Barracora (Williams 1981) mod v1.3.vbs: -------------------------------------------------------------------------------- 1 | 'Barracora - Williams 1981 by Dids666 2 | ' 3 | 'Thanks to JP and gtxJoe for some of the code used and the lamp numbers(VP9 version and Titan VPX) (I would have no idea otherwise) 4 | ' 5 | 'Thanks to DJRobX for adding surround support and solving some errors 6 | ' 7 | 'Thanks to the testers:... 8 | ' 9 | 'Ver 1.1 10 | 11 | ' Thalamus 2018-07-19 12 | ' Added/Updated "Positional Sound Playback Functions" and "Supporting Ball & Sound Functions" 13 | ' Changed UseSolenoids=1 to 2 14 | ' No special SSF tweaks yet. 15 | 16 | Option Explicit 17 | Randomize 18 | 19 | ' =============================================================================================== 20 | ' Load game controller 21 | ' =============================================================================================== 22 | 23 | On Error Resume Next 24 | ExecuteGlobal GetTextFile("controller.vbs") 25 | If Err Then MsgBox "Can't open controller.vbs" 26 | On Error Goto 0 27 | 28 | LoadVPM "00990300", "S7.VBS", 3.36 29 | 30 | ' =============================================================================================== 31 | ' General constants and variables 32 | ' =============================================================================================== 33 | Const UseSolenoids = 2 34 | Const UseLamps = 1 35 | Const UseGI = 1 36 | Const UseSync = 0 'set it to 1 if the table runs too fast 37 | Const HandleMech = 0 38 | 39 | 40 | ' Standard Sounds 41 | Const SSolenoidOn = "fx_Solenoid" 42 | Const SSolenoidOff = "" 43 | Const SFlipperOn = "fx_Flipperup" 44 | Const SFlipperOff = "fx_Flipperdown" 45 | Const SCoin = "fx_Coin" 46 | 47 | Dim bsTrough, dtbank1, dtbank2, bsLeftSaucer, bsRightSaucer, x 48 | Const cGameName = "barra_l1" 49 | Dim bsLowerEject,bsUpperEject 50 | Dim gameRun 51 | 52 | 53 | ' Lights 54 | 55 | vpmMapLights AllLights 56 | 57 | 58 | 59 | ' =============================================================================================== 60 | ' Init routines 61 | ' =============================================================================================== 62 | 63 | Sub table1_Init 64 | vpmInit me 65 | With Controller 66 | .GameName = cGameName 67 | If Err Then MsgBox "Can't start Game" & cGameName & vbNewLine & Err.Description:Exit Sub 68 | .SplashInfoLine = "Barracora - Williams 1981" & vbNewLine & "VPX table by Dids666" 69 | .HandleKeyboard = 0 70 | .ShowTitle = 0 71 | .ShowDMDOnly = 1 72 | .ShowFrame = 0 73 | .HandleMechanics = 0 74 | .Games(cGameName).Settings.Value("rol") = 0 '1= rotated display, 0= normal 75 | '.SetDisplayPosition 0,0, GetPlayerHWnd 'restore dmd window position 76 | On Error Resume Next 77 | Controller.SolMask(0) = 1 78 | 'vpmTimer.AddTimer 2000, "Controller.SolMask(0)=&Hffffffff'" 'ignore all solenoids - then add the Timer to renable all the solenoids after 2 seconds 79 | Controller.Run GetPlayerHWnd 80 | On Error Goto 0 81 | End With 82 | 83 | 84 | 85 | 86 | ' Nudging 87 | vpmNudge.TiltSwitch = 1 88 | vpmNudge.Sensitivity = 3 89 | vpmNudge.TiltObj = Array(sw20, sw21, sw22, LeftSlingshot, RightSlingshot) 90 | 91 | ' Trough 92 | set bsTrough= new cvpmballstack 93 | bsTrough.initsw 0,15,14,13,0,0,0,0 94 | bsTrough.initkick ballrelease,90,1 95 | bsTrough.balls=3 96 | 97 | ' Saucers 98 | Set bsUpperEject = New cvpmBallStack 99 | bsUpperEject.InitSaucer sw10, 10,65,8 100 | bsUpperEject.kickanglevar=5 101 | bsUpperEject.InitExitSnd SoundFX("fx_kicker", DOFContactors), SoundFX("fx_Solenoid", DOFContactors) 102 | bsUpperEject.KickForceVar = 6 103 | 104 | Set bsLowerEject = New cvpmBallStack 105 | bsLowerEject.InitSaucer sw11, 11,169,5 106 | bsLowerEject.kickanglevar=5 107 | bsLowerEject.InitExitSnd SoundFX("fx_kicker", DOFContactors), SoundFX("fx_Solenoid", DOFContactors) 108 | bsLowerEject.KickForceVar = 6 109 | 110 | 111 | 112 | ' Drop targets 113 | set dtbank1 = new cvpmdroptarget 114 | dtbank1.InitDrop Array(sw41, sw42, sw43), Array(41, 42, 43) 115 | dtbank1.initsnd SoundFX("", DOFDropTargets), SoundFX("fx2_droptargetreset", DOFContactors) 116 | 117 | set dtbank2 = new cvpmdroptarget 118 | dtbank2.InitDrop Array(sw44, sw45, sw46, sw47, sw48), Array(44, 45, 46, 47, 48) 119 | dtbank2.initsnd SoundFX("", DOFDropTargets), SoundFX("fx2_droptargetreset", DOFContactors) 120 | 121 | 122 | 123 | vpmTimer.AddTimer 2000, "Controller.SolMask(0)=&Hffffffff'" 124 | 125 | 126 | End Sub 127 | 128 | Sub table1_Paused:Controller.Pause = 1:End Sub 129 | Sub table1_unPaused:Controller.Pause = 0:End Sub 130 | Sub table1_exit:Controller.stop:End Sub 131 | 132 | 133 | ' =============================================================================================== 134 | ' KeyDown routines 135 | ' =============================================================================================== 136 | 137 | Sub table1_KeyDown(ByVal Keycode) 138 | If keycode = LeftTiltKey Then Nudge 90, 5:PlaySound SoundFX("fx_nudge", 0), 0, 1, -0.1, 0.25 139 | If keycode = RightTiltKey Then Nudge 270, 5:PlaySound SoundFX("fx_nudge", 0), 0, 1, 0.1, 0.25 140 | If keycode = CenterTiltKey Then Nudge 0, 6:PlaySound SoundFX("fx_nudge", 0), 0, 1, 0, 0.25 141 | If keycode = PlungerKey Then PlaySoundAt "fx_PlungerPull", Plunger:Plunger.Pullback 142 | if keycode = rightflipperkey then controller.switch(35) = 1 'Mudas as lampadas de cima 143 | if keycode = leftflipperkey then controller.switch(34) = 1 144 | If vpmKeyDown(keycode)Then Exit Sub 145 | End Sub 146 | 147 | 148 | ' =============================================================================================== 149 | ' KeyUp routines 150 | ' =============================================================================================== 151 | 152 | Sub table1_KeyUp(ByVal Keycode) 153 | if keycode = rightflipperkey then controller.switch(35) = 0 154 | if keycode = leftflipperkey then controller.switch(34) = 0 155 | If vpmKeyUp(keycode)Then Exit Sub 156 | If keycode = PlungerKey Then PlaySoundAt "fx_plunger", Plunger:Plunger.Fire 157 | End Sub 158 | 159 | 160 | 161 | 162 | ' =============================================================================================== 163 | ' Solenoids constants and routines 164 | ' =============================================================================================== 165 | 166 | 167 | 168 | Const sBallRampThrow=12 169 | 170 | Const sBell=15 171 | 'Const sCoin=16 172 | Const sUpperGate=17 173 | Const sJetLeft=18 174 | Const sJetRight=19 175 | Const sJetCenter=20 176 | Const sSlingLeft=21 177 | Const sSlingRight=22 178 | Const sEnable=25 179 | Const sDTLeftB_S1=1 180 | Const sDTLeftA_S2=2 181 | Const sDTLeftRR_S3=3 182 | Const sDTRightA_S4=4 183 | Const sDTRightC_S5=5 184 | Const sDTRightO_S6=6 185 | Const sDTRightR_S7=7 186 | Const sDTRightA2_S8=8 187 | Const sDTLeftRel_S9=9 188 | Const sDTRightRel_S10=10 189 | Const sBallRel=11 190 | Const sEjectUpper=13 191 | Const sEjectLower=14 192 | 193 | 194 | 195 | 196 | 'SolCallbacks 197 | 198 | SolCallback(sDTLeftB_S1) = "dtbank1.SolUnhit 1," 199 | SolCallback(sDTLeftA_S2) = "dtbank1.SolUnhit 2," 200 | SolCallback(sDTLeftRR_S3) = "dtbank1.SolUnhit 3," 201 | SolCallback(sDTRightA_S4) = "dtbank2.SolUnhit 1," 202 | SolCallback(sDTRightC_S5) = "dtbank2.SolUnhit 2," 203 | SolCallback(sDTRightO_S6) = "dtbank2.SolUnhit 3," 204 | SolCallback(sDTRightR_S7) = "dtbank2.SolUnhit 4," 205 | SolCallback(sDTRightA2_S8) = "dtbank2.SolUnhit 5," 206 | SolCallback(sDTLeftRel_S9) = "dtbank1.SolDropDown" 207 | SolCallback(sDTRightRel_S10) = "dtbank2.SolDropDown" 208 | SolCallback(sBallRel)="sBallRelease" 209 | 'SolCallback(1) = "bsTrough.SolOut" 210 | SolCallback(sBallRampThrow)="sBallRampThrower" 211 | SolCallback(sEjectUpper)="bsUpperEject.solout" 212 | SolCallback(sEjectLower)="bsLowerEject.solout" 213 | SolCallback(sBell)="vpmsolsound""fx2_bell""," 214 | ''SolCallback(sCoin)= - Not Used 215 | SolCallback(sUpperGate)="UpperKickerGate" 216 | SolCallback(sJetLeft) = "vpmsolsound""fx2_Bumper_2""," 217 | SolCallback(sJetRight) = "vpmsolsound ""fx2_Bumper_2""," 218 | SolCallback(sJetCenter) = "vpmsolsound ""fx2_Bumper_2""," 219 | SolCallback(sSlingLeft) = "vpmsolsound ""fx_slingshot1""," 220 | SolCallback(sSlingRight) = "vpmsolsound ""fx_slingshot2""," 221 | 222 | SolCallback(sllflipper)="SolLFlipper" 223 | SolCallback(slrflipper)="SolRFlipper" 224 | 225 | '----- Solenoid Subroutines 226 | Sub sBallRelease(enabled) '11 227 | controller.switch (12)=False 228 | End Sub 229 | 230 | Dim SyncLampsFlag 231 | Sub sBallRampThrower(enabled) 232 | if enabled then 233 | controller.switch (12)=False 234 | bsTrough.exitsol_on 235 | playsoundat "fx_BallRel", Plunger 236 | 'SyncLamps 'ensure lights are synchronized at start of new ball 237 | SyncLampsFlag = 4 238 | end if 239 | 240 | End Sub 241 | 242 | Sub UpperKickerGate(enabled): gate1.open=True: End Sub 243 | 244 | ' =============================================================================================== 245 | ' Trigger/Switch routines 246 | ' =============================================================================================== 247 | 248 | '----- Kickers ----- 249 | Sub sw10_Hit() 'Switch10 250 | bsUpperEject.addball 0 251 | PlaySoundAt "kicker_enter_left", sw10 252 | End Sub 253 | 254 | Sub sw11_Hit() 'Switch11 255 | bsLowerEject.addball 0 256 | PlaySoundAt "kicker_enter_left", sw11 257 | End Sub 258 | 259 | Sub Drain_Hit() 'Switch12 260 | Drain.DestroyBall 261 | PlaySound "fx_drain" 262 | bsTrough.addball me 263 | controller.switch (12)=True 264 | End Sub 265 | 266 | '----- Flippers ----- 267 | Sub LaneChangeRight:vpmtimer.pulsesw 35:End Sub 268 | Sub LangeChangeLeft:vpmtimer.pulsesw 34:End Sub 269 | 270 | '******************** 271 | ' JP Flippers 272 | '******************** 273 | 274 | Sub SolLFlipper(Enabled) 275 | If Enabled Then 276 | PlaySound SoundFX("fx_flipperup",DOFContactors), 0, 1, -0.1, 0.25, 0, 0, 1, 1 277 | LeftFlipper.RotateToEnd 278 | Else 279 | PlaySound SoundFX("fx_flipperdown",DOFContactors), 0, 1, -0.1, 0.25, 0, 0, 1, 1 280 | LeftFlipper.RotateToStart 281 | End If 282 | End Sub 283 | 284 | Sub SolRFlipper(Enabled) 285 | If Enabled Then 286 | PlaySound SoundFX("fx_flipperup",DOFContactors), 0, 1, 0.1, 0.25, 0, 0, 1, 1 287 | RightFlipper.RotateToEnd 288 | Else 289 | PlaySound SoundFX("fx_flipperdown",DOFContactors), 0, 1, 0.1, 0.25, 0, 0, 1, 1 290 | RightFlipper.RotateToStart 291 | End If 292 | End Sub 293 | 294 | Sub LeftFlipper_Collide(parm) 295 | PlaySoundAtBall "fx_rubber_flipper" 296 | End Sub 297 | 298 | Sub RightFlipper_Collide(parm) 299 | PlaySoundAtBall "fx_rubber_flipper" 300 | End Sub 301 | 302 | 303 | '----Rollovers--- 304 | 305 | Sub sw23_Hit:Controller.Switch(23) = 1:PlaySoundAtBall "fx_sensor":End Sub 306 | Sub sw23_UnHit:Controller.Switch(23) = 0:End Sub 307 | 308 | Sub sw31_Hit:Controller.Switch(31) = 1:PlaySoundAtBall "fx_sensor":End Sub 309 | Sub sw31_UnHit:Controller.Switch(31) = 0:End Sub 310 | 311 | Sub sw32_Hit:Controller.Switch(32) = 1:PlaySoundAtBall "fx_sensor":End Sub 312 | Sub sw32_UnHit:Controller.Switch(32) = 0:End Sub 313 | 314 | Sub sw24_Hit:Controller.Switch(24) = 1:PlaySoundAtBall "fx_sensor":End Sub 315 | Sub sw24_UnHit:Controller.Switch(24) = 0:End Sub 316 | 317 | Sub sw26_Hit:Controller.Switch(26) = 1:PlaySoundAtBall "fx_sensor":End Sub 318 | Sub sw26_UnHit:Controller.Switch(26) = 0:End Sub 319 | 320 | Sub sw19_Hit:Controller.Switch(19) = 1:PlaySoundAtBall "fx_sensor":End Sub 321 | Sub sw19_UnHit:Controller.Switch(19) = 0:End Sub 322 | 323 | Sub sw18_Hit:Controller.Switch(18) = 1:PlaySoundAtBall "fx_sensor":End Sub 324 | Sub sw18_UnHit:Controller.Switch(18) = 0:End Sub 325 | 326 | Sub sw16_Hit:Controller.Switch(16) = 1:PlaySoundAtBall "fx_sensor":End Sub 327 | Sub sw16_UnHit:Controller.Switch(16) = 0:End Sub 328 | 329 | Sub sw17_Hit:Controller.Switch(17) = 1:PlaySoundAtBall "fx_sensor":End Sub 330 | Sub sw17_UnHit:Controller.Switch(17) = 0:End Sub 331 | 332 | Sub sw9_Hit:Controller.Switch(9) = 1:PlaySoundAtBall "fx_sensor":End Sub 333 | Sub sw9_UnHit:Controller.Switch(9) = 0:End Sub 334 | 335 | Sub sw18_Hit:Controller.Switch(18) = 1:PlaySoundAtBall "fx_sensor":End Sub 336 | Sub sw18_UnHit:Controller.Switch(18) = 0:End Sub 337 | 338 | Sub sw18_Hit:Controller.Switch(18) = 1:PlaySoundAtBall "fx_sensor":End Sub 339 | Sub sw18_UnHit:Controller.Switch(18) = 0:End Sub 340 | 341 | Sub sw12_Hit:Controller.Switch(12) = 1:PlaySoundAtBall "fx_sensor":End Sub 342 | Sub sw12_UnHit:Controller.Switch(12) = 0:End Sub 343 | 344 | Sub Launchball_Hit 345 | If Activeball.VelY < 0 Then 346 | PlaySoundAt "fx_launchball", Launchball 347 | End If 348 | End Sub 349 | 350 | '----- Spinner ----- 351 | Sub sw25_Spin():vpmtimer.pulsesw 25:PlaySoundAt "fx_spinner", sw25:End Sub 352 | 353 | 354 | '---- Gate ---- 355 | Sub sw16_Hit() 356 | gate1.open=False 357 | Controller.Switch(16)=True 358 | End Sub 359 | 360 | '----- Bumpers/Jets ----- 361 | Dim bumpl, bumpr, bumpc 362 | Sub sw20_Hit 363 | PlaySound "Bumper_1" 364 | bumpl = 1 365 | Me.TimerEnabled = 1 366 | vpmTimer.PulseSwitch 20, 0, 0 367 | Execute SolCallback(sJetLeft) & 1 368 | End Sub 369 | 370 | 371 | 372 | Sub sw21_Hit 373 | PlaySound "Bumper_2" 374 | bumpr = 1 375 | Me.TimerEnabled = 1 376 | vpmTimer.PulseSwitch 21, 0, 0 377 | Execute SolCallback(sJetRight) & 1 378 | End Sub 379 | 380 | 381 | Sub sw22_Hit 382 | PlaySound "Bumper_3" 383 | bumpc = 1 384 | Me.TimerEnabled = 1 385 | vpmTimer.PulseSwitch 22, 0, 0 386 | Execute SolCallback(sJetCenter) & 1 387 | End Sub 388 | 389 | 390 | 391 | '----Targets----- 392 | 393 | 394 | Sub sw33_Hit:vpmTimer.PulseSw 33:PlaySoundAtBall SoundFX("fx_target", DOFTargets):End Sub 395 | Sub sw27_Hit:vpmTimer.PulseSw 27:PlaySoundAtBall SoundFX("fx_target", DOFTargets):End Sub 396 | Sub sw28_Hit:vpmTimer.PulseSw 28:PlaySoundAtBall SoundFX("fx_target", DOFTargets):End Sub 397 | 398 | '---- Drop Targets ---- 399 | 400 | Sub sw41_Dropped:dtbank1.Hit 1:End Sub 401 | Sub sw42_Dropped:dtbank1.Hit 2:End Sub 402 | Sub sw43_Dropped:dtbank1.Hit 3:End Sub 403 | Sub sw44_Dropped:dtbank2.Hit 1:End Sub 404 | Sub sw45_Dropped:dtbank2.Hit 2:End Sub 405 | Sub sw46_Dropped:dtbank2.Hit 3:End Sub 406 | Sub sw47_Dropped:dtbank2.Hit 4:End Sub 407 | Sub sw48_Dropped:dtbank2.Hit 5:End Sub 408 | 409 | 410 | '----- Standup Targets ----- 411 | Sub sw37_Hit():vpmtimer.pulsesw 37:End Sub 412 | Sub sw38_Hit():vpmtimer.pulsesw 38:End Sub 413 | Sub sw39_Hit():vpmtimer.pulsesw 39:End Sub 414 | Sub sw40_Hit():vpmtimer.pulsesw 40:End Sub 415 | 416 | 417 | '---- Slings ---- 418 | 419 | 420 | Dim LStep, RStep 421 | 422 | Sub LeftSlingShot_Slingshot 423 | vpmTimer.PulseSwitch 29, 0, 0 424 | 425 | PlaySound SoundFX("fx_slingshot", DOFContactors), 0, 1, -0.05, 0.05, 0, 0, 1, .8 426 | DOF 101, DOFPulse 427 | LeftSling4.Visible = 1 428 | Lemk.RotX = 26 429 | LStep = 0 430 | vpmTimer.PulseSw 29 431 | LeftSlingShot.TimerEnabled = 1 432 | End Sub 433 | 434 | Sub LeftSlingShot_Timer 435 | Select Case LStep 436 | Case 1:LeftSLing4.Visible = 0:LeftSLing3.Visible = 1:Lemk.RotX = 14 437 | Case 2:LeftSLing3.Visible = 0:LeftSLing2.Visible = 1:Lemk.RotX = 2 438 | Case 3:LeftSLing2.Visible = 0:Lemk.RotX = -10:LeftSlingShot.TimerEnabled = 0 439 | End Select 440 | LStep = LStep + 1 441 | End Sub 442 | 443 | Sub RightSlingShot_Slingshot 444 | vpmTimer.PulseSwitch 30, 0, 0 445 | PlaySound SoundFX("fx_slingshot", DOFContactors), 0, 1, 0.05, 0.05, 0, 0, 1, .8 446 | DOF 102, DOFPulse 447 | RightSling4.Visible = 1 448 | Remk.RotX = 26 449 | RStep = 0 450 | vpmTimer.PulseSw 30 451 | RightSlingShot.TimerEnabled = 1 452 | End Sub 453 | 454 | Sub RightSlingShot_Timer 455 | Select Case RStep 456 | Case 1:RightSLing4.Visible = 0:RightSLing3.Visible = 1:Remk.RotX = 14 457 | Case 2:RightSLing3.Visible = 0:RightSLing2.Visible = 1:Remk.RotX = 2 458 | Case 3:RightSLing2.Visible = 0:Remk.RotX = -10:RightSlingShot.TimerEnabled = 0 459 | End Select 460 | RStep = RStep + 1 461 | End Sub 462 | 463 | 464 | '****************************** 465 | ' Diverse Collection Hit Sounds 466 | '****************************** 467 | 468 | Sub aMetals_Hit(idx):PlaySound "fx3_EM_metalhit_medium", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub 469 | Sub aRubber_Bands_Hit(idx):PlaySound "fx_rubber_band", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub 470 | Sub aRubber_Posts_Hit(idx):PlaySound "fx2_plastichit", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub 471 | Sub aRubber_Pins_Hit(idx):PlaySound "fx_rubber_pin", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub 472 | Sub aPlastics_Hit(idx):PlaySound "fx_PlasticHit", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub 473 | Sub aGates_Hit(idx):PlaySound "fx3_EM_gate", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub 474 | Sub aWoods_Hit(idx):PlaySound "fx_Woodhit", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub 475 | 476 | ' Williams Flippers 477 | 478 | Sub GraphicsTimer_Timer() 479 | batleft.objrotz = LeftFlipper.CurrentAngle + 1 480 | batright.objrotz = RightFlipper.CurrentAngle - 1 481 | End Sub 482 | 483 | ' ******************************************************************************************************* 484 | ' Positional Sound Playback Functions by DJRobX 485 | ' PlaySound sound, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 1, AudioFade(ActiveBall) 486 | ' ******************************************************************************************************* 487 | 488 | ' Play a sound, depending on the X,Y position of the table element (especially cool for surround speaker setups, otherwise stereo panning only) 489 | ' parameters (defaults): loopcount (1), volume (1), randompitch (0), pitch (0), useexisting (0), restart (1)) 490 | ' Note that this will not work (currently) for walls/slingshots as these do not feature a simple, single X,Y position 491 | 492 | Sub PlayXYSound(soundname, tableobj, loopcount, volume, randompitch, pitch, useexisting, restart) 493 | PlaySound soundname, loopcount, volume, AudioPan(tableobj), randompitch, pitch, useexisting, restart, AudioFade(tableobj) 494 | End Sub 495 | 496 | ' Set position as table object (Use object or light but NOT wall) and Vol to 1 497 | 498 | Sub PlaySoundAt(soundname, tableobj) 499 | PlaySound soundname, 1, 1, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj) 500 | End Sub 501 | 502 | 'Set all as per ball position & speed. 503 | 504 | Sub PlaySoundAtBall(soundname) 505 | PlaySoundAt soundname, ActiveBall 506 | End Sub 507 | 508 | 'Set position as table object and Vol manually. 509 | 510 | Sub PlaySoundAtVol(sound, tableobj, Vol) 511 | PlaySound sound, 1, Vol, Pan(tableobj), 0,0,0, 1, AudioFade(tableobj) 512 | End Sub 513 | 514 | 'Set all as per ball position & speed, but Vol Multiplier may be used eg; PlaySoundAtBallVol "sound",3 515 | 516 | Sub PlaySoundAtBallVol(sound, VolMult) 517 | PlaySound sound, 0, Vol(ActiveBall) * VolMult, Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 1, AudioFade(ActiveBall) 518 | End Sub 519 | 520 | 'Set position as bumperX and Vol manually. 521 | 522 | Sub PlaySoundAtBumperVol(sound, tableobj, Vol) 523 | PlaySound sound, 1, Vol, Pan(tableobj), 0,0,1, 1, AudioFade(tableobj) 524 | End Sub 525 | 526 | '********************************************************************* 527 | ' Supporting Ball & Sound Functions 528 | '********************************************************************* 529 | 530 | Function AudioFade(tableobj) ' Fades between front and back of the table (for surround systems or 2x2 speakers, etc), depending on the Y position on the table. "table1" is the name of the table 531 | Dim tmp 532 | tmp = tableobj.y * 2 / table1.height-1 533 | If tmp > 0 Then 534 | AudioFade = Csng(tmp ^10) 535 | Else 536 | AudioFade = Csng(-((- tmp) ^10) ) 537 | End If 538 | End Function 539 | 540 | Function AudioPan(tableobj) ' Calculates the pan for a tableobj based on the X position on the table. "table1" is the name of the table 541 | Dim tmp 542 | tmp = tableobj.x * 2 / table1.width-1 543 | If tmp > 0 Then 544 | AudioPan = Csng(tmp ^10) 545 | Else 546 | AudioPan = Csng(-((- tmp) ^10) ) 547 | End If 548 | End Function 549 | 550 | Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table 551 | Dim tmp 552 | tmp = ball.x * 2 / table1.width-1 553 | If tmp > 0 Then 554 | Pan = Csng(tmp ^10) 555 | Else 556 | Pan = Csng(-((- tmp) ^10) ) 557 | End If 558 | End Function 559 | 560 | Function AudioFade(ball) ' Can this be together with the above function ? 561 | Dim tmp 562 | tmp = ball.y * 2 / Table1.height-1 563 | If tmp > 0 Then 564 | AudioFade = Csng(tmp ^10) 565 | Else 566 | AudioFade = Csng(-((- tmp) ^10) ) 567 | End If 568 | End Function 569 | 570 | Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed 571 | Vol = Csng(BallVel(ball) ^2 / 2000) 572 | End Function 573 | 574 | Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed 575 | Pitch = BallVel(ball) * 20 576 | End Function 577 | 578 | Function BallVel(ball) 'Calculates the ball speed 579 | BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) ) 580 | End Function 581 | 582 | 583 | '***************************************** 584 | ' JP's VP10 Rolling Sounds 585 | '***************************************** 586 | 587 | Const tnob = 20 ' total number of balls 588 | Const lob = 0 'number of locked balls 589 | ReDim rolling(tnob) 590 | InitRolling 591 | 592 | Sub InitRolling 593 | Dim i 594 | For i = 0 to tnob 595 | rolling(i) = False 596 | Next 597 | End Sub 598 | 599 | Sub RollingTimer_Timer() 600 | Dim BOT, b, ballpitch 601 | BOT = GetBalls 602 | 603 | ' stop the sound of deleted balls 604 | For b = UBound(BOT) + 1 to tnob 605 | rolling(b) = False 606 | StopSound("fx_ballrolling" & b) 607 | Next 608 | 609 | ' exit the sub if no balls on the table 610 | If UBound(BOT) = lob - 1 Then Exit Sub 'there no extra balls on this table 611 | 612 | ' play the rolling sound for each ball 613 | 614 | For b = 0 to UBound(BOT) 615 | If BallVel(BOT(b) ) > 1 Then 616 | rolling(b) = True 617 | if BOT(b).z < 30 Then ' Ball on playfield 618 | PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0, AudioFade(BOT(b) ) 619 | Else ' Ball on raised ramp 620 | PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) )*.5, Pan(BOT(b) ), 0, Pitch(BOT(b) )+50000, 1, 0, AudioFade(BOT(b) ) 621 | End If 622 | Else 623 | If rolling(b) = True Then 624 | StopSound("fx_ballrolling" & b) 625 | rolling(b) = False 626 | End If 627 | End If 628 | Next 629 | End Sub 630 | 631 | '********************** 632 | ' Ball Collision Sound 633 | '********************** 634 | 635 | Sub OnBallBallCollision(ball1, ball2, velocity) 636 | If Table1.VersionMinor > 3 OR Table1.VersionMajor > 10 Then 637 | PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 200, Pan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1) 638 | Else 639 | PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 200, Pan(ball1), 0, Pitch(ball1), 0, 0 640 | End if 641 | End Sub 642 | -------------------------------------------------------------------------------- /Cactus Canyon (Bally 1998) TTNZ v2.0.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sverrewl/vpxtable_scripts/235e65e3e425020846ebca556edd82575716a6ed/Cactus Canyon (Bally 1998) TTNZ v2.0.vbs -------------------------------------------------------------------------------- /Check Mate (Taito - 1977) 1.0.0.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sverrewl/vpxtable_scripts/235e65e3e425020846ebca556edd82575716a6ed/Check Mate (Taito - 1977) 1.0.0.vbs -------------------------------------------------------------------------------- /Comet (Williams 1985) v1.1.vbs: -------------------------------------------------------------------------------- 1 | '****Conet Williams(1985) 2 | '****Original By Unclewilly w/Textures By Grizz 3 | 'VPX version by Sliderpoint w/main ramp textured by Flupper 4 | Option Explicit 5 | Randomize 6 | 7 | On Error Resume Next 8 | ExecuteGlobal GetTextFile("controller.vbs") 9 | If Err Then MsgBox "Can't open controller.vbs" 10 | On Error Goto 0 11 | 12 | 'Options 13 | Dim FlipperShadows, BallShadows 14 | 15 | FlipperShadows = 1 ' change to 0 to turn off flipper shadows 16 | BallShadows = 1 ' change to 0 to turn off ball shadow 17 | 18 | 'Variables 19 | Dim xx, cGameName 20 | Const UseSolenoids = 2 21 | Const UseLamps = 1 22 | Const UseGI = 0 23 | Const UseSync = 0 24 | Const HandleMech = 0 25 | Const SSolenoidOn = "Solenoid" 26 | Const SSolenoidOff = "" 27 | Const SCoin = "CoinIn" 28 | Dim DesktopMode: DesktopMode = Table1.ShowDT 29 | cGameName = "comet_l5" 30 | 31 | LoadVPM "01560000", "S11.VBS", 3.26 32 | 33 | 'Table Init 34 | Sub Table1_Init 35 | vpmInit Me 36 | With Controller 37 | .GameName = cGameName 38 | .SplashInfoLine = "Comet (Williams 1985)" & vbNewLine & "for VPX by Sliderpoint" 39 | .HandleMechanics = 0 40 | .HandleKeyboard = 0 41 | .ShowDMDOnly = 1 42 | .ShowFrame = 0 43 | .ShowTitle = 0 44 | End With 45 | Controller.Hidden = 0 46 | On Error Resume Next 47 | 48 | Controller.Run 49 | If Err Then MsgBox Err.Description 50 | On Error Goto 0 51 | 'Nudging 52 | vpmNudge.TiltSwitch=swTilt 53 | vpmNudge.Sensitivity=1 54 | vpmNudge.TiltObj=Array(Bumper1,Bumper2,Bumper3,LeftSlingshot,RightSlingshot) 55 | 56 | Outhole.CreateSizedBallWithMass 25, 1.65 57 | Outhole.kick 0,0 58 | 59 | vpmMapLights AllLamps 60 | Intensity 'sets GI brightness based on day/night slider 61 | If BallShadows = 0 Then 62 | BallShadowUpdate.Enabled = 0 63 | End If 64 | If DesktopMode = False Then 65 | RailLeft.visible = 0 66 | RailRight.visible = 0 67 | ' SideWalls.visible = 0 68 | End if 69 | End Sub 70 | 71 | Sub Table1_Paused:Controller.Pause = 1:End Sub 72 | Sub Table1_unPaused:Controller.Pause = 0:End Sub 73 | sub Table1_Exit:Controller.Stop:end sub 74 | 75 | Sub Table1_KeyDown(ByVal keycode) 76 | If keycode = PlungerKey Then Plunger.PullBack 77 | If keycode = LeftTiltKey Then playSound "nudge_left" 78 | If keycode = RightTiltKey Then playSound "nudge_right" 79 | If keycode = CenterTiltKey Then PlaySound "nudge_forward" 80 | If vpmKeyDown(keycode) Then Exit Sub 81 | End Sub 82 | 83 | Sub Table1_KeyUp(ByVal keycode) 84 | If keycode = PlungerKey Then Plunger.Fire:PlaySound "plunger" 85 | If vpmKeyUp(keycode) Then Exit Sub 86 | End Sub 87 | 88 | 'Solenoids 89 | SolCallback(1) = "Outholekick" 90 | SolCallback(2) = "DTReset" 91 | SolCallback(3) = "RabbitKick" 92 | SolCallback(4) = "CSFlash" 'Corkscrew Flash 93 | SolCallback(5) = "CycleFlash" 'Cycle Flash 94 | SolCallback(6) = "CycleJumpKick" 95 | ' SolCallback(7) = "" 'Player3 Flasher 96 | ' SolCallback(8) = "" 'Player1 Flasher 97 | ' SolCallback(9) = "" 'Player4 Flasher 98 | ' SolCallback(10) = ""'Player2 Flasher 99 | SolCallback(11) = "solGI" 100 | SolCallback(15) = "vpmSolSound ""Knocker""," 101 | 102 | Sub OutholeKick(enabled) 103 | If enabled Then 104 | Outhole.kick 65, 20 105 | Playsound SoundFX("BallRelease",DOFContactors), 0, 1, AudioPan(Outhole), 0,0,0, 1, AudioFade(Outhole) 106 | End If 107 | end Sub 108 | 109 | Sub Outhole_Hit:PlaySound "Scoopenter", 0, 1, AudioPan(Outhole), 0,0,0, 1, AudioFade(Outhole):controller.switch(45) = 1:End Sub 110 | Sub Outhole_unHit:Controller.Switch(45) = 0: End Sub 111 | 112 | Sub RabbitKick(enabled) 113 | If enabled Then 114 | Sw24.kick 175, 10 115 | Playsound SoundFX("Solenoid",DOFContactors), 0, 1, AudioPan(sw24), 0,0,0, 1, AudioFade(sw24) 116 | End If 117 | end Sub 118 | 119 | Sub sw24_Hit:PlaySound "kicker_enter", 0, 1, AudioPan(sw24), 0,0,0, 1, AudioFade(sw24):controller.switch(24) = 1:End Sub 120 | Sub sw24_unHit:Controller.Switch(24) = 0: End Sub 121 | 122 | Sub CSFlash(enabled) 123 | If Enabled Then 124 | CorkScrewFlasher.state = 1 125 | CorkScrewFlasher1.state = 1 126 | CorkScrewFlasher2.state = 1 127 | Else 128 | CorkScrewFlasher.State = 0 129 | CorkScrewFlasher1.state = 0 130 | CorkScrewFlasher2.state = 0 131 | End If 132 | End Sub 133 | 134 | Sub CycleFlash(enabled) 135 | If Enabled Then 136 | CycleFlasher1.state = 1 137 | CycleFlasher2.state = 1 138 | CycleFlasher3.state = 1 139 | CycleFlasher4.visible = 1 140 | Else 141 | CycleFlasher1.State = 0 142 | CycleFlasher2.State = 0 143 | CycleFlasher3.state = 0 144 | CycleFlasher4.visible = 0 145 | End If 146 | End Sub 147 | 148 | Sub CycleJumpKick(enabled) 149 | If enabled Then 150 | sw25.kick 260, 18 151 | Playsound SoundFX("Solenoid",DOFContactors), 0, 1, AudioPan(sw25), 0,0,0, 1, AudioFade(sw25) 152 | End If 153 | end Sub 154 | 155 | Sub sw25_Hit:PlaySound "kicker_enter", 0, 1, AudioPan(sw25), 0,0,0, 1, AudioFade(sw25):controller.switch(25) = 1:End Sub 156 | Sub sw25_unHit:Controller.Switch(25) = 0: End Sub 157 | 158 | Sub DTReset (enabled) 159 | sw29.isdropped = 0 160 | controller.switch(29) = 0 161 | Playsound SoundFX("Solenoid",DOFContactors), 0, 1, AudioPan(sw29), 0,0,0, 1, AudioFade(sw29) 162 | End Sub 163 | 164 | 'Flippers 165 | SolCallback(sLRFlipper) = "SolRFlipper" 166 | SolCallback(sLLFlipper) = "SolLFlipper" 167 | 168 | Sub SolLFlipper(Enabled) 169 | If Enabled Then 170 | PlaySound SoundFX("fx_FlipperUp",DOFFlippers), 0, 1, AudioPan(LeftFlipper), 0,0,0,1,AudioFade(LeftFlipper) 171 | LeftFlipper.RotateToEnd 172 | Else 173 | PlaySound SoundFX("fx_FlipperDown",DOFFlippers), 0, 1, AudioPan(LeftFlipper), 0,0,0,1,AudioFade(LeftFlipper) 174 | LeftFlipper.RotateToStart 175 | End If 176 | End Sub 177 | 178 | Sub SolRFlipper(Enabled) 179 | If Enabled Then 180 | PlaySound SoundFX("fx_FlipperUp",DOFFlippers), 0, 1, AudioPan(RightFlipper), 0,0,0,1,AudioFade(RightFlipper) 181 | RightFlipper.RotateToEnd 182 | Else 183 | PlaySound SoundFX("fx_FlipperDown",DOFFlippers), 0, 1, AudioPan(RightFlipper), 0,0,0,1,AudioFade(RightFlipper) 184 | RightFlipper.RotateToStart 185 | End If 186 | End Sub 187 | 188 | Sub LeftFlipper_Collide(parm):RandomFlipperSound:End Sub 189 | Sub RightFlipper_Collide(parm):RandomFlipperSound:End Sub 190 | 191 | 'Sling Shots 192 | Dim RStep, Lstep 193 | 194 | Sub RightSlingShot_Slingshot 195 | PlaySound SoundFX("rSling",DOFContactors), 0,1, 0.05,0.05 196 | RSling.Visible = 0 197 | RSling1.Visible = 1 198 | sling1.TransZ = -20 199 | RStep = 0 200 | RightSlingShot.TimerEnabled = 1 201 | vpmTimer.PulseSw 48 202 | End Sub 203 | 204 | Sub RightSlingShot_Timer 205 | Select Case RStep 206 | Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:sling1.TransZ = -10 207 | Case 4:RSLing2.Visible = 0:RSLing.Visible = 1:sling1.TransZ = 0:RightSlingShot.TimerEnabled = 0 208 | End Select 209 | RStep = RStep + 1 210 | End Sub 211 | 212 | Sub LeftSlingShot_Slingshot 213 | PlaySound SoundFX("Lsling",DOFContactors), 0,1, -0.05,0.05 214 | LSling.Visible = 0 215 | LSling1.Visible = 1 216 | sling2.TransZ = -20 217 | LStep = 0 218 | LeftSlingShot.TimerEnabled = 1 219 | vpmTimer.PulseSw 47 220 | End Sub 221 | 222 | Sub LeftSlingShot_Timer 223 | Select Case LStep 224 | Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:sling2.TransZ = -10 225 | Case 4:LSLing2.Visible = 0:LSLing.Visible = 1:sling2.TransZ = 0:LeftSlingShot.TimerEnabled = 0 226 | End Select 227 | LStep = LStep + 1 228 | End Sub 229 | 230 | 'GI 231 | Sub solGI(enabled) 232 | If enabled then 233 | For each xx in GIBulbs:xx.State=0:Next 234 | For each xx in GIBulbs2:xx.State=0:Next 235 | SideWalls.image = "SideWallsEarlySSMap" 236 | Playsound "Flasher_relay_off" 237 | else 238 | For each xx in GIBulbs:xx.State=1:Next 239 | For each xx in GIBulbs2:xx.State=1:Next 240 | SideWalls.image = "SideWallsEarlySSOn" 241 | Playsound "Flasher_relay_on" 242 | end if 243 | End Sub 244 | 245 | Dim GILevel, DayNight 246 | DayNight = Table1.NightDay 247 | Sub Intensity 248 | If DayNight > 10 Then 249 | GILevel = (Round((1/DayNight),2))*12 250 | Else 251 | GILevel = 1 252 | End If 253 | 254 | For each xx in GIbulbs: xx.IntensityScale = xx.IntensityScale * (GILevel): Next 255 | For each xx in GIbulbs2: xx.IntensityScale = xx.IntensityScale * (GILevel): Next 256 | End Sub 257 | 'End GI 258 | 259 | Sub sw33_Hit():RandomRubberSound:vpmTimer.PulseSw 33:End Sub 260 | Sub sw34_Hit():RandomRubberSound:vpmTimer.PulseSw 34:End Sub 261 | Sub sw35_Hit():RandomRubberSound:vpmTimer.PulseSw 35:End Sub 262 | Sub sw36_Hit():RandomRubberSound:vpmTimer.PulseSw 36:End Sub 263 | Sub sw37_Hit():RandomRubberSound:vpmTimer.PulseSw 37:End Sub 264 | Sub sw38_Hit():RandomRubberSound:vpmTimer.PulseSw 38:End Sub 265 | Sub sw39_Hit():RandomRubberSound:vpmTimer.PulseSw 39:End Sub 266 | 267 | 'Bumpers 268 | Sub Bumper1_Hit:vpmTimer.PulseSw 40:PlaySound SoundFX("BumperC",DOFContactors), 0,1,AudioPan(Bumper1),0,0,0,1,AudioFade(Bumper1):End Sub 269 | Sub Bumper2_Hit:vpmTimer.PulseSw 41:PlaySound SoundFX("BumperC",DOFContactors), 0,1,AudioPan(Bumper2),0,0,0,1,AudioFade(Bumper2):End Sub 270 | Sub Bumper3_Hit:vpmTimer.PulseSw 42:PlaySound SoundFX("BumperC",DOFContactors), 0,1,AudioPan(Bumper3),0,0,0,1,AudioFade(Bumper3):End Sub 271 | 272 | 'Rollover & Ramp Switches 273 | Sub sw9_Hit:Controller.Switch(9) = 1:PlaySound "rollover", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 274 | Sub sw9_UnHit:Controller.Switch(9) = 0:End Sub 275 | Sub sw19_Hit:vpmTimer.PulseSw 19:PlaySound "Gate", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 276 | Sub sw20_Hit:Controller.Switch(20) = 1:PlaySound "rollover", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 277 | Sub sw20_UnHit:Controller.Switch(20) = 0:End Sub 278 | Sub sw21_Hit:Controller.Switch(21) = 1:PlaySound "rollover", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 279 | Sub sw21_UnHit:Controller.Switch(21) = 0:End Sub 280 | Sub sw22_Hit:Controller.Switch(22) = 1:PlaySound "rollover", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 281 | Sub sw22_UnHit:Controller.Switch(22) = 0:End Sub 282 | Sub sw23_Hit:Controller.Switch(23) = 1:PlaySound "rollover", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 283 | Sub sw23_UnHit:Controller.Switch(23) = 0:End Sub 284 | Sub sw26_Hit:Controller.Switch(26) = 1:PlaySound "rollover", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 285 | Sub sw26_UnHit:Controller.Switch(26) = 0:End Sub 286 | Sub sw27_Hit:Controller.Switch(27) = 1:PlaySound "rollover", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 287 | Sub sw27_UnHit:Controller.Switch(27) = 0:End Sub 288 | Sub sw31_Hit:Controller.Switch(31) = 1:PlaySound "rollover", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 289 | Sub sw31_UnHit:Controller.Switch(31) = 0:End Sub 290 | Sub sw32_Hit:Controller.Switch(32) = 1:PlaySound "rollover", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 291 | Sub sw32_UnHit:Controller.Switch(32) = 0:End Sub 292 | Sub sw43_Hit:Controller.Switch(43) = 1:PlaySound "rollover", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 293 | Sub sw43_UnHit:Controller.Switch(43) = 0:End Sub 294 | Sub sw44_Hit:Controller.Switch(44) = 1:PlaySound "rollover", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 295 | Sub sw44_UnHit:Controller.Switch(44) = 0:End Sub 296 | Sub sw46_Hit:Controller.Switch(46) = 1:End Sub 297 | Sub sw46_UnHit:Controller.Switch(46) = 0:End Sub 298 | Sub sw50_Hit:Controller.Switch(50) = 1:sw50.TimerEnabled = 1:dim i:for i=1 to 4:StopSound "fx_rampbump" & i:next:NextOrbitHit = Timer + 1: End Sub 299 | Sub sw50_Timer:PlaySoundAt "DROP_RIGHT", sw50: sw50.TimerEnabled = 0: End Sub 300 | Sub sw28_Hit 301 | vpmTimer.PulseSw 28 302 | PlaySound"Gate", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 303 | PlaySound"RampEntrywGate", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 304 | End Sub 305 | 306 | Sub cycledrop_Hit(IDX):PlaySound"DROP_RIGHT":End Sub 307 | 308 | 'StandUp Targets 309 | Sub sw10_Hit:vpmTimer.PulseSw 10:PlaySound "target", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 310 | Sub sw11_Hit:vpmTimer.PulseSw 11:PlaySound "target", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 311 | Sub sw12_Hit:vpmTimer.PulseSw 12:PlaySound "target", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 312 | Sub sw13_Hit:vpmTimer.PulseSw 13:PlaySound "target", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 313 | Sub sw14_Hit:vpmTimer.PulseSw 14:PlaySound "target", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 314 | Sub sw15_Hit:vpmTimer.PulseSw 15:PlaySound "target", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 315 | Sub sw16_Hit:vpmTimer.PulseSw 16:PlaySound "target", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 316 | Sub sw17_Hit:vpmTimer.PulseSw 17:PlaySound "target", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 317 | Sub sw18_Hit:vpmTimer.PulseSw 18:PlaySound "target", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 318 | 319 | 'DropTargets 320 | Sub sw29_Hit:sw29.isdropped = 1:controller.Switch(29) = 1:Playsound SoundFX("droptarget",DOFContactors), 0, 1, AudioPan(sw29), 0,0,0, 1, AudioFade(sw29):End Sub 321 | 322 | 'Misc 323 | dim PI:PI=3.1415926 324 | Sub MiscTimer_Timer 325 | sw28p.RotX = sw28.currentAngle 326 | sw19p.RotX = sw19.currentAngle 327 | Gate5p.RotY = -Gate5.currentAngle 328 | Gate4p.Roty = gate4.currentAngle 329 | Gate2p.RotY = gate2.currentAngle 330 | FlipperR.RotZ = RightFlipper.currentAngle 331 | FlipperL.RotZ = LeftFlipper.CurrentAngle 332 | L57.visible = L57b.State 333 | If FlipperShadows = 1 Then 334 | FlipperShadowL.RotZ = LeftFlipper.currentAngle 335 | FlipperShadowR.RotZ = RightFlipper.currentAngle 336 | End If 337 | SpinnerRod.TransZ = 1.05*(sin( (sw28.CurrentAngle+180) * (2*PI/360)) * 8) 338 | SpinnerRod.TransY = 2.5*(sin( (sw28.CurrentAngle) * (2*PI/360)) * 8) 339 | SpinnerRod2.TransZ = -2.5*(sin( (sw50Gate.CurrentAngle+180) * (2*PI/360)) * 8) 340 | SpinnerRod2.TransY = 1.05*(sin( (sw50Gate.CurrentAngle) * (2*PI/360)) * 8) 341 | sw50Wire.RotX = -SW50Gate.currentAngle 342 | End Sub 343 | 344 | If FlipperShadows = 1 Then 345 | FlipperShadowL.visible = 1 346 | FlipperShadowR.visible = 1 347 | Else 348 | FlipperShadowL.visible = 0 349 | FlipperShadowR.visible = 0 350 | End If 351 | 352 | '***************************************** 353 | ' JP's VP10 Rolling Sounds 354 | '***************************************** 355 | Const tnob = 1 ' total number of balls 356 | ReDim rolling(tnob) 357 | InitRolling 358 | 359 | Sub InitRolling 360 | Dim i 361 | For i = 0 to tnob 362 | rolling(i) = False 363 | Next 364 | End Sub 365 | 366 | Sub RollingTimer_Timer() 367 | Dim BOT, b 368 | BOT = GetBalls 369 | ' stop the sound of deleted balls 370 | For b = UBound(BOT) + 1 to tnob 371 | rolling(b) = False 372 | StopSound("fx_ballrolling" & b) 373 | Next 374 | ' exit the sub if no balls on the table 375 | If UBound(BOT) = -1 Then Exit Sub 376 | ' play the rolling sound for each ball 377 | For b = 0 to UBound(BOT) 378 | If BallVel(BOT(b) ) > 1 Then 379 | rolling(b) = True 380 | If BallVel(BOT(b) ) > 1 AND BOT(b).z < 30 Then 381 | rolling(b) = True 382 | PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b)), AudioPan(BOT(b)), 0, Pitch(BOT(b)), 1, 0, AudioFade(BOT(b)) 383 | Else ' Ball on raised ramp 384 | PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) )*.35, AudioPan(BOT(b) ), 0, Pitch(BOT(b) )-10000, 1, 0, AudioFade(BOT(b) ) 385 | End If 386 | Else 387 | If rolling(b) = True Then 388 | StopSound("fx_ballrolling" & b) 389 | rolling(b) = False 390 | End If 391 | End If 392 | Next 393 | End Sub 394 | 395 | '********************************************************************* 396 | ' Positional Sound Playback Functions 397 | '********************************************************************* 398 | ' Play a sound, depending on the X,Y position of the table element (especially cool for surround speaker setups, otherwise stereo panning only) 399 | ' parameters (defaults): loopcount (1), volume (1), randompitch (0), pitch (0), useexisting (0), restart (1)) 400 | ' Note that this will not work (currently) for walls/slingshots as these do not feature a simple, single X,Y position 401 | Sub PlayXYSound(soundname, tableobj, loopcount, volume, randompitch, pitch, useexisting, restart) 402 | PlaySound soundname, loopcount, volume, AudioPan(tableobj), randompitch, pitch, useexisting, restart, AudioFade(tableobj) 403 | End Sub 404 | 405 | ' Similar subroutines that are less complicated to use (e.g. simply use standard parameters for the PlaySound call) 406 | Sub PlaySoundAt(soundname, tableobj) 407 | PlaySound soundname, 1, 1, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj) 408 | End Sub 409 | 410 | Sub PlaySoundAtBall(soundname) 411 | PlaySoundAt soundname, ActiveBall 412 | End Sub 413 | 414 | '********************************************************************* 415 | ' Supporting Ball & Sound Functions 416 | '********************************************************************* 417 | Function AudioFade(tableobj) ' Fades between front and back of the table (for surround systems or 2x2 speakers, etc), depending on the Y position on the table. "table1" is the name of the table 418 | Dim tmp 419 | tmp = tableobj.y * 2 / table1.height-1 420 | If tmp > 0 Then 421 | AudioFade = Csng(tmp ^10) 422 | Else 423 | AudioFade = Csng(-((- tmp) ^10) ) 424 | End If 425 | End Function 426 | 427 | Function AudioPan(tableobj) ' Calculates the pan for a tableobj based on the X position on the table. "table1" is the name of the table 428 | Dim tmp 429 | tmp = tableobj.x * 2 / table1.width-1 430 | If tmp > 0 Then 431 | AudioPan = Csng(tmp ^10) 432 | Else 433 | AudioPan = Csng(-((- tmp) ^10) ) 434 | End If 435 | End Function 436 | 437 | Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed 438 | Vol = (Round(BallVel(ball)/10,2)) 439 | End Function 440 | 441 | Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed 442 | Pitch = BallVel(ball) * 20 443 | End Function 444 | 445 | Function BallVel(ball) 'Calculates the ball speed 446 | BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) ) 447 | End Function 448 | 449 | '********************** 450 | ' Ball Collision Sound 451 | '********************** 452 | Sub OnBallBallCollision(ball1, ball2, velocity) 453 | PlaySound("collide5"), 0, Csng(velocity) ^2 / 2000, AudioPan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1) 454 | End Sub 455 | 456 | 'Extra Sounds 457 | Sub Rubbers_Hit(IDX):RandomRubberSound:End Sub 458 | Sub Gates_Hit(IDX):PlaySound "Gate", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 459 | Sub MetalWalls_Hit(IDX):RandomMetalSound:End Sub 460 | Sub WireGuides_Hit(IDX):RandomMetalSound:End Sub 461 | Sub RubberPosts_Hit(IDX):PlaySound "rubber", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 462 | Sub RampSound2_Hit:PlaySound"RampMidway", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall): End Sub 463 | Sub RampSound3_Hit:PlaySound"RampEnd", 0, Vol(ActiveBall)*10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 464 | Sub RampSound4_Hit:PlaySound"RampMetalHit", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall):End Sub 465 | 'RustyCardores/DJRobX bump sounds on ramps. 466 | Dim NextOrbitHit:NextOrbitHit = 0 467 | 468 | Sub PlasticRampBumps_Hit(idx) 469 | if BallVel(ActiveBall) > .3 and Timer > NextOrbitHit then 470 | RandomBump 2, Pitch(ActiveBall) 471 | NextOrbitHit = Timer + .1 + (Rnd * .2) 472 | end if 473 | End Sub 474 | 475 | Sub RandomBump(voladj, freq) 476 | dim BumpSnd:BumpSnd= "fx_rampbump" & CStr(Int(Rnd*7)+1) 477 | PlaySound BumpSnd, 0, Vol(ActiveBall)*voladj, AudioPan(ActiveBall), 0, freq, 0, 1, AudioFade(ActiveBall) 478 | End Sub 479 | '/ 480 | Sub RandomFlipperSound 481 | Select Case Int(Rnd*3)+1 482 | Case 1 : PlaySoundAtBall "flip_hit_1" 483 | Case 2 : PlaySoundAtBall "flip_hit_2" 484 | Case 3 : PlaySoundAtBall "flip_hit_3" 485 | End Select 486 | End Sub 487 | 488 | Sub RandomRubberSound 489 | Select Case Int(Rnd*3)+1 490 | Case 1 : PlaySoundAtBall "rubber_hit_1" 491 | Case 2 : PlaySoundAtBall "rubber_hit_2" 492 | Case 3 : PlaySoundAtBall "rubber_hit_3" 493 | End Select 494 | End Sub 495 | 496 | Sub RandomMetalSound 497 | Select Case Int(Rnd*3)+1 498 | Case 1 : PlaySoundAtBall "metalhit_heavy" 499 | Case 2 : PlaySoundAtBall "metalhit_medium" 500 | Case 3 : PlaySoundAtBall "metalhit_thin" 501 | End Select 502 | End Sub 503 | 504 | '***************************************** 505 | ' ninuzzu's BALL SHADOW 506 | '***************************************** 507 | Dim BallShadow 508 | BallShadow = Array (BallShadow1) 509 | 510 | Sub BallShadowUpdate_timer() 511 | Dim BOT, b 512 | BOT = GetBalls 513 | ' hide shadow of deleted balls 514 | If UBound(BOT)<(tnob-1) Then 515 | For b = (UBound(BOT) + 1) to (tnob-1) 516 | BallShadow(b).visible = 0 517 | Next 518 | End If 519 | ' exit the Sub if no balls on the table 520 | If UBound(BOT) = -1 Then Exit Sub 521 | ' render the shadow for each ball 522 | For b = 0 to UBound(BOT) 523 | If BOT(b).X < Table1.Width/2 Then 524 | BallShadow(b).X = ((BOT(b).X) - (Ballsize/6) + ((BOT(b).X - (Table1.Width/2))/21)) + 6 525 | Else 526 | BallShadow(b).X = ((BOT(b).X) + (Ballsize/6) + ((BOT(b).X - (Table1.Width/2))/21)) - 6 527 | End If 528 | ballShadow(b).Y = BOT(b).Y + 4 529 | If BOT(b).Z > 20 Then 530 | BallShadow(b).visible = 1 531 | Else 532 | BallShadow(b).visible = 0 533 | End If 534 | Next 535 | End Sub 536 | 537 | -------------------------------------------------------------------------------- /Dark Rider (Geiger 1984)_Bigus(MOD)1.0.vbs: -------------------------------------------------------------------------------- 1 | Option Explicit 2 | On Error Resume Next 3 | 4 | ExecuteGlobal GetTextFile("controller.vbs") 5 | If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package" 6 | On Error Goto 0 7 | 8 | LoadVPM "01500000", "Bally.VBS", 3.10 9 | 10 | Const cGameName="startrek",cCredits="Dark Rider",UseSolenoids=2,UseLamps=1,UseGI=0,UseSync=0 11 | Const SSolenoidOn="solon",SSolenoidOff="soloff",SFlipperOn="Flipper2",SFlipperOff="Flipper",sCoin="Coin3" 12 | 13 | 14 | 15 | Const sKnocker=6 16 | Const sBallRelease=7 17 | Const sSaucer=8 18 | Const sLeftJet=9 19 | Const sRightJet=10 20 | Const sBottomJet=11 21 | Const sRSling=13 22 | Const sLSling=12 23 | Const sTargetReset=14 24 | Const scoinlockout=18 25 | Const sEnable=19 26 | 27 | SolCallback(2) = "vpmSolSound ""Chime1""," 28 | SolCallback(3) = "vpmSolSound ""Chime2""," 29 | SolCallback(4) = "vpmSolSound ""Chime3""," 30 | SolCallback(5) = "vpmSolSound ""Chime4""," 31 | 32 | SolCallback(sBallRelease)="bsTrough.SolOut" 33 | SolCallback(sKnocker)="vpmSolSound""Knocker""," 34 | SolCallback(sLSling)="vpmSolSound""sling""," 35 | SolCallback(sRSling)="vpmSolSound""sling""," 36 | SolCallback(sLeftJet)="vpmSolSound""jet3""," 37 | SolCallback(sRightJet)="vpmSolSound""jet3""," 38 | SolCallback(sBottomJet)="vpmSolSound""jet3""," 39 | SolCallback(sSaucer)="bsSaucer.SolOut" 40 | SolCallback(sTargetReset) = "dtT.SolDropUp" 41 | SolCallback(sEnable)="vpmNudge.SolGameOn" 42 | SolCallback(sLLFlipper)="vpmSolFlipper LeftFlipper,nothing," 43 | SolCallback(sLRFlipper)="vpmSolFlipper RightFlipper,nothing," 44 | 45 | 46 | Dim bsTrough,Bump1,bump2,bump3,bsSaucer,dtT 47 | 48 | Sub Table1_Init() 49 | On Error Resume Next 50 | With Controller 51 | .GameName=cGameName 52 | If Err Then MsgBox "Can't start Game" & cGameName & vbNewLine & Err.Description:Exit Sub 53 | .SplashInfoLine=cCredits 54 | '.Games(cGameName).Settings.Value("rol")=0 55 | .Games(cGameName).Settings.Value("rol")=1 56 | .HandleMechanics=0 57 | .ShowDMDOnly=1 58 | .ShowFrame=0 59 | .ShowTitle=0 60 | .Run 61 | .Hidden=1 62 | .SetDisplayPosition 0,0 63 | If Err Then MsgBox Err.Description 64 | End With 65 | On Error Goto 0 66 | 67 | ' Thalamus : Was missing 'vpminit me' 68 | vpminit me 69 | ' PinMAMETimer.Interval=PinMAMEInterval 70 | ' PinMAMETimer.Enabled=1 71 | vpmNudge.TiltSwitch=7 72 | vpmNudge.Sensitivity=3 73 | vpmNudge.TiltObj=Array(Bumper1,Bumper2,Bumper3,LeftSlingshot,RightSlingshot) 74 | 75 | 76 | Set bsTrough=New cvpmBallStack 77 | bsTrough.InitSw 0,8,0,0,0,0,0,0 78 | bsTrough.InitKick BallRelease,90,10 79 | bsTrough.InitExitSnd "ballrel","solon" 80 | bsTrough.Balls=1 81 | 82 | ' Thalamus - more randomness to kickers pls 83 | Set bsSaucer = New cvpmBallStack 84 | bsSaucer.KickForceVar = 3 85 | bsSaucer.KickAngleVar = 3 86 | bsSaucer.InitSaucer Kicker1,32,215,5 87 | bsSaucer.InitExitSnd "Solon","Solon" 88 | 89 | Set dtT = New cvpmDropTarget 90 | dtT.InitDrop Array(DT1,DT2,DT3,DT4),Array(1,2,3,4) 91 | dtT.InitSnd " ","FlapOpen" 92 | 93 | vpmMapLights AllLights 94 | End Sub 95 | 96 | Sub Table1_KeyUp(ByVal KeyCode) 97 | If vpmKeyUp(KeyCode) Then Exit Sub 98 | If KeyCode=PlungerKey Then 99 | PlaySoundAtVol"EmptyPlunger", Plunger, 1 100 | Plunger.Fire 101 | End If 102 | End Sub 103 | 104 | Sub Table1_KeyDown(ByVal KeyCode) 105 | If vpmKeyDown(KeyCode) Then Exit Sub 106 | If KeyCode=PlungerKey Then 107 | Plunger.Pullback 108 | PlaySoundAtVol"PullbackPlunger", Plunger, 1 109 | End If 110 | End Sub 111 | 112 | Sub Drain_Hit:bsTrough.AddBall Me:End Sub 113 | Sub Kicker1_Hit : bsSaucer.AddBall 0 : End Sub 114 | Sub DT1_Hit:PlaySoundAtVol "FlapClose", ActiveBall, 1:vpmTimer.addtimer 300, "dtT.Hit 1'" : End Sub 115 | Sub DT2_Hit:PlaySoundAtVol "FlapClose", ActiveBall, 1:vpmTimer.addtimer 300, "dtT.Hit 2'" : End Sub 116 | Sub DT3_Hit:PlaySoundAtVol "FlapClose", ActiveBall, 1:vpmTimer.addtimer 300, "dtT.Hit 3'" : End Sub 117 | Sub DT4_Hit:PlaySoundAtVol "FlapClose", ActiveBall, 1:vpmTimer.addtimer 300, "dtT.Hit 4'" : End Sub 118 | 119 | Sub Bumper1_Hit:vpmTimer.PulseSw 40:BL1.duration 1, 150, 0:End Sub 120 | Sub Bumper2_Hit:vpmTimer.PulseSw 39:BL2.duration 1, 150, 0:End Sub 121 | Sub Bumper3_Hit:vpmTimer.PulseSw 38:BL3.duration 1, 150, 0:End Sub 122 | 123 | Sub LeftSlingshot_Slingshot:vpmTimer.PulseSw 37:End Sub 124 | Sub RightSlingshot_Slingshot:vpmTimer.PulseSw 36:End Sub 125 | Sub Spinner1_Spin:vpmTimer.PulseSw 23:End Sub 126 | Sub SW23a_Slingshot:PlaySoundAtVol "sling", ActiveBall, 1:vpmTimer.PulseSw 23:End Sub 127 | Sub SW23b_Slingshot:PlaySoundAtVol "sling", ActiveBall, 1:vpmTimer.PulseSw 23:End Sub 128 | Sub SW23c_Slingshot:PlaySoundAtVol "sling", ActiveBall, 1:vpmTimer.PulseSw 23:End Sub 129 | Sub SW5_Hit:Controller.Switch(5)=1:End Sub 130 | Sub SW5_unHit:Controller.Switch(5)=0:End Sub 131 | Sub SW18_Hit:Controller.Switch(18)=1:End Sub 132 | Sub SW18_unHit:Controller.Switch(18)=0:End Sub 133 | Sub SW19_Hit:Controller.Switch(19)=1:End Sub 134 | Sub SW19_unHit:Controller.Switch(19)=0:End Sub 135 | Sub SW20_Hit:Controller.Switch(20)=1:End Sub 136 | Sub SW20_unHit:Controller.Switch(20)=0:End Sub 137 | Sub SW22_Hit:Controller.Switch(22)=1:End Sub 138 | Sub SW22_unHit:Controller.Switch(22)=0:End Sub 139 | Sub SW25_Hit:Controller.Switch(25)=1:End Sub 140 | Sub SW25_unHit:Controller.Switch(25)=0:End Sub 141 | Sub SW26_Hit:Controller.Switch(26)=1:End Sub 142 | Sub SW26_unHit:Controller.Switch(26)=0:End Sub 143 | Sub SW30_Hit:Controller.Switch(30)=1:End Sub 144 | Sub SW30_unHit:Controller.Switch(30)=0:End Sub 145 | Sub SW31_Hit:Controller.Switch(31)=1:End Sub 146 | Sub SW31_unHit:Controller.Switch(31)=0:End Sub 147 | Sub SW34_Hit:Controller.Switch(34)=1:End Sub 148 | Sub SW34_unHit:Controller.Switch(34)=0:End Sub 149 | Sub SW35_Hit:Controller.Switch(35)=1:End Sub 150 | Sub SW35_unHit:Controller.Switch(35)=0:End Sub 151 | Sub T21_Hit:vpmTimer.PulseSw 21:End Sub 152 | Sub T24_Hit:vpmTimer.PulseSw 24:End Sub 153 | Sub T27_Hit:vpmTimer.PulseSw 27:End Sub 154 | Sub T28_Hit:vpmTimer.PulseSw 28:End Sub 155 | Sub T29_Hit:vpmTimer.PulseSw 29:End Sub 156 | Sub Gate1_Hit : PlaySoundAtVol "sgate", ActiveBall, 1: End Sub 157 | Sub Gate2_Hit : PlaySoundAtVol "sgate", ActiveBall, 1 : End Sub 158 | Sub Gate3_Hit : PlaySoundAtVol "sgate", ActiveBall, 1 : End Sub 159 | Sub Trigger1_Hit: PlaySoundAtVol "Plungere", ActiveBall, 1 : End Sub 160 | 161 | '========================================================= 162 | ' LED Handling 163 | '========================================================= 164 | 'Modified version of Scapino's LED code for Fathom 165 | ' 166 | Dim SevenDigitOutput(28) 167 | Dim DisplayPatterns(11) 168 | Dim DigStorage(28) 169 | 170 | dim ledstatus : ledstatus = 2 171 | 172 | 'Binary/Hex Pattern Recognition Array 173 | DisplayPatterns(0) = 0 '0000000 Blank 174 | DisplayPatterns(1) = 63 '0111111 zero 175 | DisplayPatterns(2) = 6 '0000110 one 176 | DisplayPatterns(3) = 91 '1011011 two 177 | DisplayPatterns(4) = 79 '1001111 three 178 | DisplayPatterns(5) = 102 '1100110 four 179 | DisplayPatterns(6) = 109 '1101101 five 180 | DisplayPatterns(7) = 125 '1111101 six 181 | DisplayPatterns(8) = 7 '0000111 seven 182 | DisplayPatterns(9) = 127 '1111111 eight 183 | DisplayPatterns(10)= 111 '1101111 nine 184 | 185 | 'Assign 7-digit output to reels 186 | Set SevenDigitOutput(12) = P3D1 187 | Set SevenDigitOutput(13) = P3D2 188 | Set SevenDigitOutput(14) = P3D3 189 | Set SevenDigitOutput(15) = P3D4 190 | Set SevenDigitOutput(16) = P3D5 191 | Set SevenDigitOutput(17) = P3D6 192 | 193 | 194 | Set SevenDigitOutput(18) = P4D1 195 | Set SevenDigitOutput(19) = P4D2 196 | Set SevenDigitOutput(20) = P4D3 197 | Set SevenDigitOutput(21) = P4D4 198 | Set SevenDigitOutput(22) = P4D5 199 | Set SevenDigitOutput(23) = P4D6 200 | 201 | 202 | Set SevenDigitOutput(0) = P1D1 203 | Set SevenDigitOutput(1) = P1D2 204 | Set SevenDigitOutput(2) = P1D3 205 | Set SevenDigitOutput(3) = P1D4 206 | Set SevenDigitOutput(4) = P1D5 207 | Set SevenDigitOutput(5) = P1D6 208 | 209 | 210 | Set SevenDigitOutput(6) = P2D1 211 | Set SevenDigitOutput(7) = P2D2 212 | Set SevenDigitOutput(8) = P2D3 213 | Set SevenDigitOutput(9) = P2D4 214 | Set SevenDigitOutput(10) = P2D5 215 | Set SevenDigitOutput(11) = P2D6 216 | 217 | 218 | Set SevenDigitOutput(24) = CrD1 219 | Set SevenDigitOutput(25) = CrD2 220 | Set SevenDigitOutput(26) = BaD1 221 | Set SevenDigitOutput(27) = BaD2 222 | 223 | 224 | Sub DisplayTimer_Timer 225 | On Error Resume Next 226 | Dim ChgLED,ii,chg,stat,obj,TempCount,temptext,adj 227 | 228 | ChgLED = Controller.ChangedLEDs(&HFF, &HFFFF) 'hex of binary (display 111111, or first 6 digits) 229 | 230 | If Not IsEmpty(ChgLED) Then 231 | For ii = 0 To UBound(ChgLED) 232 | chg = chgLED(ii, 1) : stat = chgLED(ii, 2) 233 | For TempCount = 0 to 10 234 | If stat = DisplayPatterns(TempCount) then 235 | If LedStatus = 2 Then SevenDigitOutput(chgLED(ii, 0)).SetValue(TempCount) 236 | DigStorage(chgLED(ii, 0)) = TempCount 237 | End If 238 | If stat = (DisplayPatterns(TempCount) + 128) then 239 | If LedStatus = 2 Then SevenDigitOutput(chgLED(ii, 0)).SetValue(TempCount) 240 | DigStorage(chgLED(ii, 0)) = TempCount 241 | End If 242 | Next 243 | Next 244 | End IF 245 | End Sub 246 | 247 | Sub editDips 248 | Dim vpmDips : Set vpmDips = New cvpmDips 249 | With vpmDips 250 | .AddForm 320,258,"Dark Rider - DIP switch settings" 251 | .AddChk 214,218,95,Array("Match feature",&H00100000) 252 | .AddChk 214,234,95,Array("Credits display",&H00080000) 253 | .AddFrame 2,5,88,"SECRET WAY lane",&H00200000,Array("start at 2K",0,"start at 4K",&H200000) 254 | .AddFrame 2,55,88,"RIDER value",&H10000000,Array("start at 10K",0,"start at 25K",&H10000000) 255 | .AddFrame 2,105,88,"RIDER Special",&H00400000,Array("each time",&H400000,"only once",0) 256 | .AddFrame 2,155,88,"Center target",&H00800000,Array("always lit",&H800000,"alternating",0) 257 | .AddFrame 2,205,88,"Outlanes",&H20000000,Array("both lit",&H20000000,"alternating",0) 258 | .AddFrame 105,5,88,"Balls per game",&H0F009F1F,Array("3 balls",&H01000A04,"5 balls",&H01008A04) 259 | .AddFrame 105,53,88,"Play mode",&H00006000,Array("replay",&H6000,"extra ball",&H4000,"novelty",0,"unknown",&H2000) 260 | .AddFrame 105,129,88,"Sound settings",&H80000080,Array("few",0,"more",&H80,"most",&H80000000,"full",&H80000080) 261 | .AddFrame 105,205,88,"Return lanes",&H40000000,Array("both lit",&H40000000,"alternating",0) 262 | .AddFrame 208,5,93,"High game to date",&H00000060,Array("no award",0,"1 credit",&H20,"2 credits",&H40,"3 credits",&H60) 263 | .AddFrame 208,83,93,"Max. credits",&H00070000,Array("5 credits",0,"10 credits",&H10000,"15 credits",&H20000,"20 credits",&H30000,"25 credits",&H40000,"30 credits",&H50000,"35 credits",&H60000,"40 credits",&H70000) 264 | .ViewDips 265 | End With 266 | End Sub 267 | Set vpmShowDips = GetRef("editDips") 268 | 269 | ' ******************************************************************************************************* 270 | ' Positional Sound Playback Functions by DJRobX, Rothbauerw, Thalamus and Herweh 271 | ' PlaySound sound, 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 1, AudioFade(ActiveBall) 272 | ' ******************************************************************************************************* 273 | 274 | ' Play a sound, depending on the X,Y position of the table element (especially cool for surround speaker setups, otherwise stereo panning only) 275 | ' parameters (defaults): loopcount (1), volume (1), randompitch (0), pitch (0), useexisting (0), restart (1)) 276 | ' Note that this will not work (currently) for walls/slingshots as these do not feature a simple, single X,Y position 277 | 278 | Sub PlayXYSound(soundname, tableobj, loopcount, volume, randompitch, pitch, useexisting, restart) 279 | PlaySound soundname, loopcount, volume, AudioPan(tableobj), randompitch, pitch, useexisting, restart, AudioFade(tableobj) 280 | End Sub 281 | 282 | ' Set position as table object (Use object or light but NOT wall) and Vol to 1 283 | 284 | Sub PlaySoundAt(soundname, tableobj) 285 | PlaySound soundname, 1, 1, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj) 286 | End Sub 287 | 288 | ' set position as table object and Vol + RndPitch manually 289 | 290 | Sub PlaySoundAtVolPitch(sound, tableobj, Vol, RndPitch) 291 | PlaySound sound, 1, Vol, AudioPan(tableobj), RndPitch, 0, 0, 1, AudioFade(tableobj) 292 | End Sub 293 | 294 | 'Set all as per ball position & speed. 295 | 296 | Sub PlaySoundAtBall(soundname) 297 | PlaySoundAt soundname, ActiveBall 298 | End Sub 299 | 300 | 'Set position as table object and Vol manually. 301 | 302 | Sub PlaySoundAtVol(sound, tableobj, Volume) 303 | PlaySound sound, 1, Volume, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj) 304 | End Sub 305 | 306 | 'Set all as per ball position & speed, but Vol Multiplier may be used eg; PlaySoundAtBallVol "sound",3 307 | 308 | Sub PlaySoundAtBallVol(sound, VolMult) 309 | PlaySound sound, 0, Vol(ActiveBall) * VolMult, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 1, AudioFade(ActiveBall) 310 | End Sub 311 | 312 | Sub PlaySoundAtBallAbsVol(sound, VolMult) 313 | PlaySound sound, 0, VolMult, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 1, AudioFade(ActiveBall) 314 | End Sub 315 | 316 | ' requires rampbump1 to 7 in Sound Manager 317 | 318 | Sub RandomBump(voladj, freq) 319 | Dim BumpSnd:BumpSnd= "rampbump" & CStr(Int(Rnd*7)+1) 320 | PlaySound BumpSnd, 0, Vol(ActiveBall)*voladj, AudioPan(ActiveBall), 0, freq, 0, 1, AudioFade(ActiveBall) 321 | End Sub 322 | 323 | ' set position as bumperX and Vol manually. Allows rapid repetition/overlaying sound 324 | 325 | Sub PlaySoundAtBumperVol(sound, tableobj, Vol) 326 | PlaySound sound, 1, Vol, AudioPan(tableobj), 0,0,1, 1, AudioFade(tableobj) 327 | End Sub 328 | 329 | Sub PlaySoundAtBOTBallZ(sound, BOT) 330 | PlaySound sound, 0, ABS(BOT.velz)/17, Pan(BOT), 0, Pitch(BOT), 1, 0, AudioFade(BOT) 331 | End Sub 332 | 333 | ' play a looping sound at a location with volume 334 | Sub PlayLoopSoundAtVol(sound, tableobj, Vol) 335 | PlaySound sound, -1, Vol, AudioPan(tableobj), 0, 0, 1, 0, AudioFade(tableobj) 336 | End Sub 337 | 338 | '********************************************************************* 339 | ' Supporting Ball, Sound Functions and Math 340 | '********************************************************************* 341 | 342 | Function RndNum(min, max) 343 | RndNum = Int(Rnd() * (max-min + 1) ) + min ' Sets a random number between min and max 344 | End Function 345 | 346 | Const Pi = 3.1415927 347 | 348 | Function dSin(degrees) 349 | dsin = sin(degrees * Pi/180) 350 | End Function 351 | 352 | Function dCos(degrees) 353 | dcos = cos(degrees * Pi/180) 354 | End Function 355 | 356 | Function AudioFade(tableobj) ' Fades between front and back of the table (for surround systems or 2x2 speakers, etc), depending on the Y position on the table. "table1" is the name of the table 357 | Dim tmp 358 | On Error Resume Next 359 | tmp = tableobj.y * 2 / table1.height-1 360 | If tmp > 0 Then 361 | AudioFade = Csng(tmp ^10) 362 | Else 363 | AudioFade = Csng(-((- tmp) ^10) ) 364 | End If 365 | End Function 366 | 367 | Function AudioPan(tableobj) ' Calculates the pan for a tableobj based on the X position on the table. "table1" is the name of the table 368 | Dim tmp 369 | On Error Resume Next 370 | tmp = tableobj.x * 2 / table1.width-1 371 | If tmp > 0 Then 372 | AudioPan = Csng(tmp ^10) 373 | Else 374 | AudioPan = Csng(-((- tmp) ^10) ) 375 | End If 376 | End Function 377 | 378 | Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table 379 | Dim tmp 380 | On Error Resume Next 381 | tmp = ball.x * 2 / table1.width-1 382 | If tmp > 0 Then 383 | Pan = Csng(tmp ^10) 384 | Else 385 | Pan = Csng(-((- tmp) ^10) ) 386 | End If 387 | End Function 388 | 389 | Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed 390 | Vol = Csng(BallVel(ball) ^2 / 2000) 391 | End Function 392 | 393 | Function VolMulti(ball,Multiplier) ' Calculates the Volume of the sound based on the ball speed 394 | VolMulti = Csng(BallVel(ball) ^2 / 150 ) * Multiplier 395 | End Function 396 | 397 | Function DVolMulti(ball,Multiplier) ' Calculates the Volume of the sound based on the ball speed 398 | DVolMulti = Csng(BallVel(ball) ^2 / 150 ) * Multiplier 399 | debug.print DVolMulti 400 | End Function 401 | 402 | Function BallRollVol(ball) ' Calculates the Volume of the sound based on the ball speed 403 | BallRollVol = Csng(BallVel(ball) ^2 / (80000 - (79900 * Log(RollVol) / Log(100)))) 404 | End Function 405 | 406 | Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed 407 | Pitch = BallVel(ball) * 20 408 | End Function 409 | 410 | Function BallVel(ball) 'Calculates the ball speed 411 | BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) ) 412 | End Function 413 | 414 | Function BallVelZ(ball) 'Calculates the ball speed in the -Z 415 | BallVelZ = INT((ball.VelZ) * -1 ) 416 | End Function 417 | 418 | Function VolZ(ball) ' Calculates the Volume of the sound based on the ball speed in the Z 419 | VolZ = Csng(BallVelZ(ball) ^2 / 200)*1.2 420 | End Function 421 | 422 | '*** Determines if a Points (px,py) is inside a 4 point polygon A-D in Clockwise/CCW order 423 | 424 | Function InRect(px,py,ax,ay,bx,by,cx,cy,dx,dy) 425 | Dim AB, BC, CD, DA 426 | AB = (bx*py) - (by*px) - (ax*py) + (ay*px) + (ax*by) - (ay*bx) 427 | BC = (cx*py) - (cy*px) - (bx*py) + (by*px) + (bx*cy) - (by*cx) 428 | CD = (dx*py) - (dy*px) - (cx*py) + (cy*px) + (cx*dy) - (cy*dx) 429 | DA = (ax*py) - (ay*px) - (dx*py) + (dy*px) + (dx*ay) - (dy*ax) 430 | 431 | If (AB <= 0 AND BC <=0 AND CD <= 0 AND DA <= 0) Or (AB >= 0 AND BC >=0 AND CD >= 0 AND DA >= 0) Then 432 | InRect = True 433 | Else 434 | InRect = False 435 | End If 436 | End Function 437 | 438 | '***************************************** 439 | ' JP's VP10 Rolling Sounds 440 | '***************************************** 441 | 442 | Const tnob = 2 ' total number of balls 443 | ReDim rolling(tnob) 444 | InitRolling 445 | 446 | Sub InitRolling 447 | Dim i 448 | For i = 0 to tnob 449 | rolling(i) = False 450 | Next 451 | End Sub 452 | 453 | Sub RollingTimer_Timer() 454 | Dim BOT, b 455 | BOT = GetBalls 456 | 457 | ' stop the sound of deleted balls 458 | For b = UBound(BOT) + 1 to tnob 459 | rolling(b) = False 460 | StopSound("fx_ballrolling" & b) 461 | Next 462 | 463 | ' exit the sub if no balls on the table 464 | If UBound(BOT) = -1 Then Exit Sub 465 | 466 | ' play the rolling sound for each ball 467 | 468 | For b = 0 to UBound(BOT) 469 | If BallVel(BOT(b) ) > 1 Then 470 | rolling(b) = True 471 | if BOT(b).z < 30 Then ' Ball on playfield 472 | PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), AudioPan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0, AudioFade(BOT(b) ) 473 | Else ' Ball on raised ramp 474 | PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) )*.5, AudioPan(BOT(b) ), 0, Pitch(BOT(b) )+50000, 1, 0, AudioFade(BOT(b) ) 475 | End If 476 | Else 477 | If rolling(b) = True Then 478 | StopSound("fx_ballrolling" & b) 479 | rolling(b) = False 480 | End If 481 | End If 482 | ' play ball drop sounds 483 | If BOT(b).VelZ < -1 and BOT(b).z < 55 and BOT(b).z > 27 Then 'height adjust for ball drop sounds 484 | PlaySound "fx_ball_drop" & b, 0, ABS(BOT(b).velz)/17, AudioPan(BOT(b)), 0, Pitch(BOT(b)), 1, 0, AudioFade(BOT(b)) 485 | End If 486 | Next 487 | End Sub 488 | 489 | ' Thalamus : Exit in a clean and proper way 490 | Sub Table1_exit 491 | Controller.Pause = False 492 | Controller.Stop 493 | End Sub 494 | 495 | -------------------------------------------------------------------------------- /Demolition Man (Knorr-Kiwi) 1.3.1.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sverrewl/vpxtable_scripts/235e65e3e425020846ebca556edd82575716a6ed/Demolition Man (Knorr-Kiwi) 1.3.1.vbs -------------------------------------------------------------------------------- /Freddy A Nightmare On Elm Street (Gottlieb 1994) 1.1b JPJ - Team PP - Hauntfreaks Mod.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sverrewl/vpxtable_scripts/235e65e3e425020846ebca556edd82575716a6ed/Freddy A Nightmare On Elm Street (Gottlieb 1994) 1.1b JPJ - Team PP - Hauntfreaks Mod.vbs -------------------------------------------------------------------------------- /GoinNuts_v1.2.vbs: -------------------------------------------------------------------------------- 1 | Option Explicit 2 | Randomize 3 | 4 | ' Thalamus 2018-07-23 5 | ' Added/Updated "Positional Sound Playback Functions" and "Supporting Ball & Sound Functions" 6 | ' Changed UseSolenoids=1 to 2 7 | ' No special SSF tweaks yet. 8 | 9 | ' Thalamus 2018-08-09 : Improved directional sounds 10 | 11 | ' !! NOTE : Table not verified yet !! 12 | 13 | ' Options 14 | ' Volume devided by - lower gets higher sound 15 | 16 | Const VolDiv = 2000 ' Lower number, louder ballrolling/collition sound 17 | Const VolCol = 10 ' Ball collition divider ( voldiv/volcol ) 18 | 19 | ' The rest of the values are multipliers 20 | ' 21 | ' .5 = lower volume 22 | ' 1.5 = higher volume 23 | 24 | Const VolBump = 2 ' Bumpers volume. 25 | Const VolBall = 1 ' Ball volume. 26 | Const VolRH = 1 ' Rubber hits volume. 27 | Const VolFlip = 1 ' Flipper volume. 28 | 29 | 30 | On Error Resume Next 31 | ExecuteGlobal GetTextFile("controller.vbs") 32 | If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package" 33 | On Error Goto 0 34 | 35 | Const cGameName="goinnuts",UseSolenoids=1,UseLamps=1,UseGI=0,SSolenoidOn="SolOn",SSolenoidOff="SolOff",SFlipperOn="FlipperUp",SFlipperOff="FlipperDown" 36 | Const SCoin="coin3",cCredits="" 37 | 38 | LoadVPM "01120100","sys80.vbs",3.02 39 | 40 | BMass=1.65 41 | 42 | Dim DesktopMode: DesktopMode = GN.ShowDT 43 | 44 | if DesktopMode=False Then 45 | leftrail.visible=0 46 | rightrail.visible=0 47 | end If 48 | 49 | Sub GN_KeyDown(ByVal keycode) 50 | ' if keycode=LeftFlipperKey then 51 | ' LeftFlipper.RotateToEnd 52 | ' LeftFlipper1.RotateToEnd 53 | ' end if 54 | ' if keycode=RightFlipperKey then 55 | ' RightFlipper.RotateToEnd 56 | ' RightFlipper1.RotateToEnd 57 | ' end if 58 | 59 | If vpmKeyDown(KeyCode) Then Exit Sub 60 | End Sub 61 | 62 | Sub GN_KeyUp(ByVal keycode) 63 | ' if keycode=LeftFlipperKey then 64 | ' LeftFlipper.RotateToStart 65 | ' LeftFlipper1.RotateToStart 66 | ' end if 67 | ' if keycode=RightFlipperKey then 68 | ' RightFlipper.RotateToStart 69 | ' RightFlipper1.RotateToStart 70 | ' end if 71 | If vpmKeyUp(KeyCode) Then Exit Sub 72 | End Sub 73 | 74 | Dim dtGreen,dtRed,dtYellow,dtBlue,dtWhite,bsTrough,cbCaptive 75 | 76 | Sub GN_Init 77 | On Error Resume Next 78 | With Controller 79 | .GameName=cGameName 80 | If Err Then MsgBox "Can't start Game" & cGameName & vbNewLine & Err.Description : Exit Sub 81 | .SplashInfoLine="Goin' Nuts - Gottlieb, 1983" & vbNewLine & "Table Design: fuzzel" 82 | .HandleMechanics=0 83 | .HandleKeyboard=0 84 | .ShowDMDOnly=1 85 | .ShowFrame=0 86 | .ShowTitle=0 87 | .SolMask(0)=0 88 | .Hidden=0 89 | If Err Then MsgBox Err.Description 90 | End With 91 | On Error Goto 0 92 | vpmTimer.AddTimer 1000,"Controller.SolMask(0)=&Hffffffff'" 93 | Controller.Run 94 | 95 | 'Dip switch settings, shown this way for clarity and ease of modification 96 | ' Controller.Dip(0) = (0*1 + 1*2 + 0*4 + 0*8 + 0*16 + 0*32 + 1*64 + 0*128) '01-08 97 | ' Controller.Dip(1) = (0*1 + 0*2 + 0*4 + 0*8 + 0*16 + 0*32 + 1*64 + 1*128) '09-16 98 | ' Controller.Dip(2) = (0*1 + 1*2 + 0*4 + 1*8 + 0*16 + 0*32 + 1*64 + 1*128) '17-24 99 | ' Controller.Dip(3) = (0*1 + 1*2 + 1*4 + 1*8 + 1*16 + 1*32 + 0*64 + 0*128) '25-32 100 | 101 | ' Main Timer init 102 | PinMAMETimer.Interval=PinMAMEInterval 103 | PinMAMETimer.Enabled=1 104 | 105 | ' Nudging 106 | vpmNudge.TiltSwitch=57 107 | vpmNudge.Sensitivity=5 108 | vpmNudge.TiltObj=Array(Bumper1,Bumper2,Bumper3,Bumper4,Bumper5,Bumper6,Bumper7,LeftSlingshot,RightSlingshot) 109 | 110 | 'drop targets 111 | Set dtGreen=New cvpmDropTarget 112 | dtGreen.InitDrop Array(SW00,SW10,SW20),Array(0,10,20) 113 | dtGreen.initsnd SoundFX("flapclos",DOFDropTargets),SoundFX("flapopen",DOFContactors) 114 | 115 | Set dtRed=New cvpmDropTarget 116 | dtRed.InitDrop Array(SW01,SW11,SW21),Array(1,11,21) 117 | dtRed.initsnd SoundFX("flapclos2",DOFDropTargets),SoundFX("flapopen2",DOFContactors) 118 | 119 | Set dtBlue=New cvpmDropTarget 120 | dtBlue.InitDrop Array(SW02,SW12,SW22),Array(2,12,22) 121 | dtBlue.initsnd SoundFX("flapclos3",DOFDropTargets),SoundFX("flapopen3",DOFContactors) 122 | 123 | Set dtYellow=New cvpmDropTarget 124 | dtYellow.InitDrop Array(SW03,SW13,SW23),Array(3,13,23) 125 | dtYellow.initsnd SoundFX("flapclos4",DOFDropTargets),SoundFX("flapopen4",DOFContactors) 126 | 127 | Set dtWhite=New cvpmDropTarget 128 | dtWhite.InitDrop Array(SW04,SW14,SW24),Array(4,14,24) 129 | dtWhite.initsnd SoundFX("flapclos5",DOFDropTargets),SoundFX("flapopen5",DOFContactors) 130 | 131 | ' Trough handler 132 | Set bsTrough=new cvpmBallStack 133 | bsTrough.InitSw 0,54,0,0,0,0,0,0 134 | bsTrough.InitKick sw54,50,6 135 | bsTrough.InitExitSnd SoundFX("ballrel",DOFContactors),SoundFX("solon",DOFContactors) 136 | bsTrough.Balls=3 137 | 138 | ' Set cbCaptive = New cvpmCaptiveBall 139 | ' With cbCaptive 140 | ' .InitCaptive CapTrigger, CapWall, Array(CapKicker1,CapKicker2), 320 141 | ' .NailedBalls = 1 142 | ' .ForceTrans = .9 143 | ' .MinForce = 3.5 144 | ' .CreateEvents "cbCaptive" 145 | ' .Start 146 | ' End With 147 | 148 | CapKicker.createball 149 | CapKicker.kick 120,6 150 | End Sub 151 | 152 | Sub GN_exit() 153 | Controller.Pause = False 154 | Controller.Stop 155 | End Sub 156 | 157 | Set LampCallback=GetRef("UpdateMultipleLamps") 158 | 159 | dim CZ,NewCZ,DTZ,NewDTZ,BZ,NewBZ 160 | CZ=0 161 | DTZ=0 162 | BZ=0 163 | 164 | Sub UpdateMultipleLamps 165 | NewCZ=L12.State 166 | If NewCZ<>CZ Then 167 | If L12.State=1 And bsTrough.Balls>0 Then bsTrough.ExitSol_On 168 | End If 169 | CZ=NewCZ 170 | NewDTZ=L13.State 171 | If NewDTZ<>DTZ Then 172 | If L13.State=1 Then dtWhite.DropSol_On 173 | End If 174 | DTZ=NewDTZ 175 | NewBZ=L14.State 176 | If NewBZ<>BZ Then 177 | Controller.Switch(53)=0 178 | Kicker2.Kick 0,35 179 | End If 180 | BZ=NewBZ 181 | End Sub 182 | 183 | 'constants 184 | Const sdtGreen=1'ok 185 | Const sdtRed=2'ok 186 | Const sdtBlue=5'ok 187 | Const sdtYellow=6'ok 188 | Const sCoin1=3'ok 189 | Const sCoin2=4'ok 190 | Const sCoin3=7'ok 191 | Const sknocker=8 192 | Const sOutHole=9 193 | Const swCaptiveBack=64 194 | 195 | SolCallback(sdtGreen)="dtGreen.SolDropUp" 196 | SolCallback(sdtRed)="dtRed.SolDropUp" 197 | SolCallback(sdtYellow)="dtYellow.SolDropUp" 198 | SolCallback(13)="dtWhite.SolDropUp" 199 | SolCallback(sdtBlue)="dtBlue.SolDropUp" 200 | SolCallback(sKnocker)="VpmSolSound SoundFX(""knocker"",DOFKnocker)," 201 | SolCallback(sOutHole)="HandleTrough" 202 | 203 | 'SolCallback(sLLFlipper)="VpmSolFlipper LeftFlipper,nothing," 204 | 'SolCallback(sLRFlipper)="SolRightF" 205 | 206 | 'Sub SolRightF(Enabled) 207 | ' If Enabled Then 208 | ' LeftFlipper1.RotateToEnd 209 | ' VpmSolFlipper RightFlipper,RightFlipper1,True 210 | ' Else 211 | ' LeftFlipper1.RotateToStart 212 | ' VpmSolFlipper RightFlipper,RightFlipper1,False 213 | ' End If 214 | 'End Sub 215 | 216 | ' Flipper Subs 217 | SolCallback(sLRFlipper) = "SolRFlipper" 218 | SolCallback(sLLFlipper) = "SolLFlipper" 219 | 220 | Sub SolLFlipper(Enabled) 221 | If Enabled Then 222 | PlaySoundAtVol SoundFx("FlipperDown",DOFFlippers),LeftFlipper, VolFLip:LeftFlipper.RotateToEnd 223 | Else 224 | PlaySoundAtVol SoundFx("FlipperUp",DOFFlippers),LeftFlipper, VolFlip:LeftFlipper.RotateToStart 225 | End If 226 | End Sub 227 | 228 | Sub SolRFlipper(Enabled) 229 | If Enabled Then 230 | PlaySoundAtVol SoundFx("FlipperDown",DOFFlippers),RightFlipper, VolFlip:RightFlipper.RotateToEnd:RightFlipper1.RotateToEnd:LeftFlipper1.RotateToEnd 231 | Else 232 | PlaySoundAtVol SoundFx("FlipperUp",DOFFlippers),RightFlipper,VolFlip:RightFlipper.RotateToStart:RightFlipper1.RotateToStart:LeftFlipper1.RotateToStart 233 | End If 234 | End Sub 235 | 236 | Sub LeftFlipper_Collide(parm) 237 | PlaySound "fx_rubber_flipper", 0, parm / 10, -0.1, 0.15 238 | End Sub 239 | 240 | Sub Rightflipper_Collide(parm) 241 | PlaySound "fx_rubber_flipper", 0, parm / 10, 0.1, 0.15 242 | End Sub 243 | 244 | Sub rubbersCol_Hit(idx):PlaySoundAtVol "fx_rubber", ActiveBall, VolRH:End Sub 245 | 246 | 'drop targets 247 | Sub sw00_Hit:dtGreen.Hit 1:End Sub 248 | Sub sw10_Hit:dtGreen.Hit 2:End Sub 249 | Sub sw20_Hit:dtGreen.Hit 3:End Sub 250 | 251 | Sub sw03_Hit:dtYellow.Hit 1:End Sub 252 | Sub sw13_Hit:dtYellow.Hit 2:End Sub 253 | Sub sw23_Hit:dtYellow.Hit 3:End Sub 254 | 255 | Sub sw02_Hit:dtBlue.Hit 1:End Sub 256 | Sub sw12_Hit:dtBlue.Hit 2:End Sub 257 | Sub sw22_Hit:dtBlue.Hit 3:End Sub 258 | 259 | Sub sw01_Hit:dtRed.Hit 1:End Sub 260 | Sub sw11_Hit:dtRed.Hit 2:End Sub 261 | Sub sw21_Hit:dtRed.Hit 3:End Sub 262 | 263 | Sub sw04_Hit:dtWhite.Hit 1:End Sub 264 | Sub sw14_Hit:dtWhite.Hit 2:End Sub 265 | Sub sw24_Hit:dtWhite.Hit 3:End Sub 266 | 267 | Sub Kicker2_Hit:Controller.Switch(53)=1:End Sub 268 | 269 | 'spot targets 270 | Sub sw25a_Hit:VpmTimer.PulseSw 25:DOF 113, DOFPulse:End Sub ' #1 spot target 271 | Sub sw25b_Hit:VpmTimer.PulseSw 25:DOF 113, DOFPulse:End Sub ' #3 spot target 272 | Sub sw15a_Hit:VpmTimer.PulseSw 15:DOF 114, DOFPulse:End Sub ' lower rightspot target 273 | Sub sw15b_Hit:VpmTimer.PulseSw 15:DOF 113, DOFPulse:End Sub ' #2 spot target 274 | Sub sw06_Hit:VpmTimer.PulseSw 6:End Sub ' captive ball spot target 275 | 276 | 'rollovers/rollunders 277 | Sub sw26_Hit:Controller.Switch(26)=1:End Sub 278 | Sub sw26_UnHit:Controller.Switch(26)=0:End Sub 279 | 'Sub sw50_Hit:Controller.Switch(50)=1:End Sub 280 | 'Sub sw50_UnHit:Controller.Switch(50)=0:End Sub 281 | Sub sw50_Hit:VpmTimer.PulseSw 50:End Sub 282 | 'Sub sw51_Hit:Controller.Switch(51)=1:End Sub 283 | 'Sub sw51_unHit:Controller.Switch(51)=0:End Sub 284 | Sub sw51_Hit:VpmTimer.PulseSw 51:End Sub 285 | 286 | 'Bumpers/Slingshots 287 | Sub Bumper1_Hit:VpmTimer.PulseSw 52:PlaySoundAtVol SoundFX("jet1",DOFContactors),Bumper1,VolBump:DOF 101, DOFPulse:End Sub 288 | Sub Bumper2_Hit:VpmTimer.PulseSw 52:PlaySoundAtVol SoundFX("jet1",DOFContactors),Bumper2,VolBump:DOF 102, DOFPulse:End Sub 289 | Sub Bumper3_Hit:VpmTimer.PulseSw 52:PlaySoundAtVol SoundFX("jet1",DOFContactors),Bumper3,VolBump:DOF 103, DOFPulse:End Sub 290 | Sub Bumper4_Hit:VpmTimer.PulseSw 52:PlaySoundAtVol SoundFX("jet1",DOFContactors),Bumper4,VolBump:DOF 104, DOFPulse:End Sub 291 | Sub Bumper5_Hit:VpmTimer.PulseSw 52:PlaySoundAtVol SoundFX("jet1",DOFContactors),Bumper5,VolBump:DOF 105, DOFPulse:End Sub 292 | Sub Bumper6_Hit:VpmTimer.PulseSw 52:PlaySoundAtVol SoundFX("jet1",DOFContactors),Bumper6,VolBump:DOF 106, DOFPulse:End Sub 293 | Sub Bumper7_Hit:VpmTimer.PulseSw 52:PlaySoundAtVol SoundFX("jet1",DOFContactors),Bumper7,VolBump:DOF 107, DOFPulse:End Sub 294 | 295 | dim rSlingStep:rSlingStep=0 296 | Sub RightSlingshot_Timer 297 | select case rSlingStep 298 | case 1: rsling1.visible=0:rsling2.visible=1 299 | case 2: rsling2.visible=0:rsling3.visible=1 300 | case 3: rsling3.visible=0:rsling0.visible=1:RightSlingshot.TimerEnabled=0 301 | end select 302 | rSlingStep = rSlingStep + 1 303 | end sub 304 | 305 | dim lSlingStep:lSlingStep=0 306 | Sub LeftSlingShot_Timer 307 | select case lSlingStep 308 | case 1: lsling1.visible=0:lsling2.visible=1 309 | case 2: lsling2.visible=0:lsling3.visible=1 310 | case 3: lsling3.visible=0:lsling0.visible=1:LeftSlingshot.TimerEnabled=0 311 | end select 312 | lSlingStep = lSlingStep + 1 313 | end sub 314 | 315 | 316 | Sub LeftSlingshot_Slingshot:PlaySound SoundFX("rsling",DOFContactors):VpmTimer.PulseSw 16:DOF 108, 2:lSlingStep=0:LeftSlingshot.TimerEnabled=1:End Sub 317 | Sub RightSlingshot_Slingshot:PlaySound SoundFX("rsling",DOFContactors):VpmTimer.PulseSw 16:DOF 109, 2:rSlingStep=0:RightSlingshot.TimerEnabled=1:End Sub 318 | Sub upsling_Slingshot:PlaySound SoundFX("rsling",DOFContactors):VpmTimer.PulseSw 16:DOF 110, 2:End Sub 319 | Sub msling_Slingshot:PlaySound SoundFX("rsling",DOFContactors):VpmTimer.PulseSw 16:DOF 111, 2:End Sub 320 | Sub mrslingshot_Slingshot:PlaySound SoundFX("rsling",DOFContactors):VpmTimer.PulseSw 16:DOF 112, 2:End Sub 321 | Sub mlslingshot_Slingshot:PlaySound SoundFX("rsling",DOFContactors):VpmTimer.PulseSw 16:DOF 112, 2:End Sub 322 | 323 | sub UpdateFlippers 324 | pRightFlipper.rotZ = RightFlipper.currentAngle 325 | pLeftFlipper.rotZ = LeftFlipper.currentAngle 326 | pRightFlipper1.rotZ = RightFlipper1.currentAngle 327 | pLeftFlipper1.rotZ = LeftFlipper1.currentAngle 328 | end Sub 329 | 330 | Set Lights(3)=L3 331 | Set Lights(12)=L12 332 | Set Lights(13)=L13 333 | Set Lights(14)=L14 334 | Set Lights(15)=L15 335 | Set Lights(16)=L16 336 | Set Lights(17)=L17 337 | Set Lights(18)=L18 338 | Set Lights(19)=L19 339 | Set Lights(20)=L20 340 | Set Lights(21)=L21 341 | Set Lights(22)=L22 342 | Set Lights(23)=L23 343 | Set Lights(24)=L24 344 | Set Lights(25)=L25 345 | Set Lights(26)=L26 346 | Set Lights(27)=L27 347 | Set Lights(28)=L28 348 | Set Lights(29)=L29 349 | Set Lights(30)=L30 350 | Set Lights(31)=L31 351 | Set Lights(32)=L32 352 | Set Lights(33)=L33 353 | Set Lights(34)=L34 354 | Set Lights(35)=L35 355 | Set Lights(36)=L36 356 | Set Lights(37)=L37 357 | Set Lights(38)=L38 358 | Set Lights(39)=L39 359 | Set Lights(40)=L40 360 | Set Lights(41)=L41 361 | Set Lights(42)=L42 362 | 363 | Sub LightTimer_Timer 364 | if L15.State=1 then L50.State=1 else L50.State=0 end if 365 | if L19.State=1 then L51.State=1:L53.State=1 else L51.State=0:L53.State=0 end if 366 | if L40.State=1 then L52.State=1 else L52.State=0 end if 367 | if L42.State=1 then L54.State=1 else L54.State=0 end if 368 | if L24.State=1 then L55.State=1 else L55.State=0 end if 369 | if L30.State=1 then L56.State=1 else L56.State=0 end if 370 | UpdateFlippers 371 | End Sub 372 | 373 | Sub sw67_Hit:Controller.Switch(55)=1:End Sub 374 | Sub HandleTrough(Enabled) 375 | If Enabled Then 376 | Controller.Switch(55)=0 377 | bsTrough.AddBall 0 378 | sw67.Destroyball 379 | End If 380 | End Sub 381 | 382 | ' ******************************************************************************************************* 383 | ' Positional Sound Playback Functions by DJRobX 384 | ' PlaySound sound, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 1, AudioFade(ActiveBall) 385 | ' ******************************************************************************************************* 386 | 387 | ' Play a sound, depending on the X,Y position of the table element (especially cool for surround speaker setups, otherwise stereo panning only) 388 | ' parameters (defaults): loopcount (1), volume (1), randompitch (0), pitch (0), useexisting (0), restart (1)) 389 | ' Note that this will not work (currently) for walls/slingshots as these do not feature a simple, single X,Y position 390 | 391 | Sub PlayXYSound(soundname, tableobj, loopcount, volume, randompitch, pitch, useexisting, restart) 392 | PlaySound soundname, loopcount, volume, AudioPan(tableobj), randompitch, pitch, useexisting, restart, AudioFade(tableobj) 393 | End Sub 394 | 395 | ' Set position as table object (Use object or light but NOT wall) and Vol to 1 396 | 397 | Sub PlaySoundAt(soundname, tableobj) 398 | PlaySound soundname, 1, 1, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj) 399 | End Sub 400 | 401 | 'Set all as per ball position & speed. 402 | 403 | Sub PlaySoundAtBall(soundname) 404 | PlaySoundAt soundname, ActiveBall 405 | End Sub 406 | 407 | 'Set position as table object and Vol manually. 408 | 409 | Sub PlaySoundAtVol(sound, tableobj, Vol) 410 | PlaySound sound, 1, Vol, Pan(tableobj), 0,0,0, 1, AudioFade(tableobj) 411 | End Sub 412 | 413 | 'Set all as per ball position & speed, but Vol Multiplier may be used eg; PlaySoundAtBallVol "sound",3 414 | 415 | Sub PlaySoundAtBallVol(sound, VolMult) 416 | PlaySound sound, 0, Vol(ActiveBall) * VolMult, Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 1, AudioFade(ActiveBall) 417 | End Sub 418 | 419 | 'Set position as bumperX and Vol manually. 420 | 421 | Sub PlaySoundAtBumperVol(sound, tableobj, Vol) 422 | PlaySound sound, 1, Vol, Pan(tableobj), 0,0,1, 1, AudioFade(tableobj) 423 | End Sub 424 | 425 | '********************************************************************* 426 | ' Supporting Ball & Sound Functions 427 | '********************************************************************* 428 | 429 | Function AudioFade(tableobj) ' Fades between front and back of the table (for surround systems or 2x2 speakers, etc), depending on the Y position on the table. "GN" is the name of the table 430 | Dim tmp 431 | tmp = tableobj.y * 2 / GN.height-1 432 | If tmp > 0 Then 433 | AudioFade = Csng(tmp ^10) 434 | Else 435 | AudioFade = Csng(-((- tmp) ^10) ) 436 | End If 437 | End Function 438 | 439 | Function AudioPan(tableobj) ' Calculates the pan for a tableobj based on the X position on the table. "GN" is the name of the table 440 | Dim tmp 441 | tmp = tableobj.x * 2 / GN.width-1 442 | If tmp > 0 Then 443 | AudioPan = Csng(tmp ^10) 444 | Else 445 | AudioPan = Csng(-((- tmp) ^10) ) 446 | End If 447 | End Function 448 | 449 | Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "GN" is the name of the table 450 | Dim tmp 451 | tmp = ball.x * 2 / GN.width-1 452 | If tmp > 0 Then 453 | Pan = Csng(tmp ^10) 454 | Else 455 | Pan = Csng(-((- tmp) ^10) ) 456 | End If 457 | End Function 458 | 459 | Function AudioFade(ball) ' Can this be together with the above function ? 460 | Dim tmp 461 | tmp = ball.y * 2 / GN.height-1 462 | If tmp > 0 Then 463 | AudioFade = Csng(tmp ^10) 464 | Else 465 | AudioFade = Csng(-((- tmp) ^10) ) 466 | End If 467 | End Function 468 | 469 | Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed 470 | Vol = Csng(BallVel(ball) ^2 / VolDiv) 471 | End Function 472 | 473 | Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed 474 | Pitch = BallVel(ball) * 20 475 | End Function 476 | 477 | Function BallVel(ball) 'Calculates the ball speed 478 | BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) ) 479 | End Function 480 | 481 | '***************************************** 482 | ' JP's VP10 Rolling Sounds 483 | '***************************************** 484 | 485 | Const tnob = 7 ' total number of balls in this table is 4, but always use a higher number here bacuse of the timing 486 | ReDim rolling(tnob) 487 | InitRolling 488 | 489 | Sub InitRolling 490 | Dim i 491 | For i = 0 to tnob 492 | rolling(i) = False 493 | Next 494 | End Sub 495 | 496 | Sub RollingTimer_Timer() 497 | Dim BOT, b 498 | BOT = GetBalls 499 | 500 | ' stop the sound of deleted balls 501 | For b = UBound(BOT) + 1 to tnob 502 | rolling(b) = False 503 | StopSound("fx_ballrolling" & b) 504 | Next 505 | 506 | ' exit the sub if no balls on the table 507 | If UBound(BOT) = -1 Then Exit Sub 508 | 509 | ' play the rolling sound for each ball 510 | 511 | For b = 0 to UBound(BOT) 512 | If BallVel(BOT(b) ) > 1 Then 513 | rolling(b) = True 514 | if BOT(b).z < 30 Then ' Ball on playfield 515 | PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) )*(VolBall), Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0, AudioFade(BOT(b) ) 516 | Else ' Ball on raised ramp 517 | PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) )*(VolBall*.5), Pan(BOT(b) ), 0, Pitch(BOT(b) )+50000, 1, 0, AudioFade(BOT(b) ) 518 | End If 519 | Else 520 | If rolling(b) = True Then 521 | StopSound("fx_ballrolling" & b) 522 | rolling(b) = False 523 | End If 524 | End If 525 | Next 526 | End Sub 527 | 528 | '********************** 529 | ' Ball Collision Sound 530 | '********************** 531 | 532 | Sub OnBallBallCollision(ball1, ball2, velocity) 533 | PlaySound("fx_collide"), 0, Csng(velocity) ^2 / (VolDiv/VolCol), Pan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1) 534 | End Sub 535 | -------------------------------------------------------------------------------- /Granny and the Gators (Bally 1984) 1.1.vbs: -------------------------------------------------------------------------------- 1 | Option Explicit 2 | LoadVPM "01530000","granny.vbs",3.1 3 | 4 | ' Thalamus 2019 May : Improved directional sounds 5 | ' !! NOTE : Table not verified yet !! 6 | 7 | ' Options 8 | ' Volume devided by - lower gets higher sound 9 | 10 | Const VolDiv = 2000 ' Lower number, louder ballrolling/collition sound 11 | Const VolCol = 10 ' Ball collition divider ( voldiv/volcol ) 12 | 13 | ' The rest of the values are multipliers 14 | ' 15 | ' .5 = lower volume 16 | ' 1.5 = higher volume 17 | 18 | Const VolBump = 2 ' Bumpers volume. 19 | Const VolRol = 1 ' Rollovers volume. 20 | Const VolGates = 1 ' Gates volume. 21 | Const VolMetal = 1 ' Metals volume. 22 | Const VolRB = 1 ' Rubber bands volume. 23 | Const VolRH = 1 ' Rubber hits volume. 24 | Const VolPo = 1 ' Rubber posts volume. 25 | Const VolPi = 1 ' Rubber pins volume. 26 | Const VolPlast = 1 ' Plastics volume. 27 | Const VolTarg = 1 ' Targets volume. 28 | Const VolWood = 1 ' Woods volume. 29 | Const VolKick = 1 ' Kicker volume. 30 | Const VolSpin = 1.5 ' Spinners volume. 31 | Const VolFlip = 1 ' Flipper volume. 32 | 33 | 34 | Sub LoadVPM(VPMver,VBSfile,VBSver) 35 | On Error Resume Next 36 | If ScriptEngineMajorVersion<5 Then MsgBox"VB Script Engine 5.0 or higher required" 37 | ExecuteGlobal GetTextFile(VBSfile) 38 | If Err Then MsgBox"Unable to open "&VBSfile&". Ensure that it is in the same folder as this table."&vbNewLine&Err.Description:Err.Clear 39 | 40 | '************************************************************************************************** 41 | '********************************ACTIVATE BACKGLASS************************************************ 42 | If ShowDT=true then 43 | Set Controller=CreateObject("VPinMAME.Controller") 44 | else 45 | Set Controller=CreateObject("B2S.server") 46 | End if 47 | '************************************************************************************************** 48 | 49 | If Err Then MsgBox"Can't Load VPinMAME."&vbNewLine&Err.Description 50 | If VPMver>"" Then If Controller.Version 0 Then 362 | AudioFade = Csng(tmp ^10) 363 | Else 364 | AudioFade = Csng(-((- tmp) ^10) ) 365 | End If 366 | End Function 367 | 368 | Function AudioPan(tableobj) ' Calculates the pan for a tableobj based on the X position on the table. "table1" is the name of the table 369 | Dim tmp 370 | On Error Resume Next 371 | tmp = tableobj.x * 2 / table1.width-1 372 | If tmp > 0 Then 373 | AudioPan = Csng(tmp ^10) 374 | Else 375 | AudioPan = Csng(-((- tmp) ^10) ) 376 | End If 377 | End Function 378 | 379 | Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table 380 | Dim tmp 381 | On Error Resume Next 382 | tmp = ball.x * 2 / table1.width-1 383 | If tmp > 0 Then 384 | Pan = Csng(tmp ^10) 385 | Else 386 | Pan = Csng(-((- tmp) ^10) ) 387 | End If 388 | End Function 389 | 390 | Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed 391 | Vol = Csng(BallVel(ball) ^2 / VolDiv) 392 | End Function 393 | 394 | Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed 395 | Pitch = BallVel(ball) * 20 396 | End Function 397 | 398 | Function BallVel(ball) 'Calculates the ball speed 399 | BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) ) 400 | End Function 401 | 402 | Function BallVelZ(ball) 'Calculates the ball speed in the -Z 403 | BallVelZ = INT((ball.VelZ) * -1 ) 404 | End Function 405 | 406 | Function VolZ(ball) ' Calculates the Volume of the sound based on the ball speed in the Z 407 | VolZ = Csng(BallVelZ(ball) ^2 / 200)*1.2 408 | End Function 409 | 410 | '*** Determines if a Points (px,py) is inside a 4 point polygon A-D in Clockwise/CCW order 411 | 412 | Function InRect(px,py,ax,ay,bx,by,cx,cy,dx,dy) 413 | Dim AB, BC, CD, DA 414 | AB = (bx*py) - (by*px) - (ax*py) + (ay*px) + (ax*by) - (ay*bx) 415 | BC = (cx*py) - (cy*px) - (bx*py) + (by*px) + (bx*cy) - (by*cx) 416 | CD = (dx*py) - (dy*px) - (cx*py) + (cy*px) + (cx*dy) - (cy*dx) 417 | DA = (ax*py) - (ay*px) - (dx*py) + (dy*px) + (dx*ay) - (dy*ax) 418 | 419 | If (AB <= 0 AND BC <=0 AND CD <= 0 AND DA <= 0) Or (AB >= 0 AND BC >=0 AND CD >= 0 AND DA >= 0) Then 420 | InRect = True 421 | Else 422 | InRect = False 423 | End If 424 | End Function 425 | 426 | '***************************************** 427 | ' JP's VP10 Rolling Sounds 428 | '***************************************** 429 | 430 | Const tnob = 1 ' total number of balls 431 | ReDim rolling(tnob) 432 | InitRolling 433 | 434 | Sub InitRolling 435 | Dim i 436 | For i = 0 to tnob 437 | rolling(i) = False 438 | Next 439 | End Sub 440 | 441 | Sub RollingTimer_Timer() 442 | Dim BOT, b 443 | BOT = GetBalls 444 | 445 | ' stop the sound of deleted balls 446 | For b = UBound(BOT) + 1 to tnob 447 | rolling(b) = False 448 | StopSound("fx_ballrolling" & b) 449 | Next 450 | 451 | ' exit the sub if no balls on the table 452 | If UBound(BOT) = -1 Then Exit Sub 453 | 454 | ' play the rolling sound for each ball 455 | For b = 0 to UBound(BOT) 456 | If BallVel(BOT(b) ) > 1 Then 457 | rolling(b) = True 458 | if BOT(b).z < 30 Then ' Ball on playfield 459 | PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), AudioPan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0, AudioFade(BOT(b) ) 460 | Else ' Ball on raised ramp 461 | PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) )*.5, AudioPan(BOT(b) ), 0, Pitch(BOT(b) )+50000, 1, 0, AudioFade(BOT(b) ) 462 | End If 463 | Else 464 | If rolling(b) = True Then 465 | StopSound("fx_ballrolling" & b) 466 | rolling(b) = False 467 | End If 468 | End If 469 | Next 470 | End Sub 471 | 472 | '********************** 473 | ' Ball Collision Sound 474 | '********************** 475 | 476 | Sub OnBallBallCollision(ball1, ball2, velocity) 477 | PlaySound("fx_collide"), 0, Csng(velocity) ^2 / (VolDiv/VolCol), AudioPan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1) 478 | End Sub 479 | 480 | Sub Pins_Hit (idx) 481 | PlaySound "pinhit_low", 0, Vol(ActiveBall)*VolPi, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall) 482 | End Sub 483 | 484 | Sub Targets_Hit (idx) 485 | PlaySound "droptarget2", 0, Vol(ActiveBall)*VolTarg, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall) 486 | End Sub 487 | 488 | Sub Metals_Thin_Hit (idx) 489 | PlaySound "metalhit_thin", 0, Vol(ActiveBall)*VolMetal, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 490 | End Sub 491 | 492 | Sub Metals_Medium_Hit (idx) 493 | PlaySound "metalhit_medium", 0, Vol(ActiveBall)*VolMetal, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 494 | End Sub 495 | 496 | Sub Metals2_Hit (idx) 497 | PlaySound "metalhit2", 0, Vol(ActiveBall)*VolMetal, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 498 | End Sub 499 | 500 | Sub Gates_Hit (idx) 501 | PlaySound "gate", 0, Vol(ActiveBall)*VolGates, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 502 | End Sub 503 | 504 | Sub Spinner_Spin 505 | PlaySoundAtVol "fx_spinner", Spinner, VolSpin 506 | End Sub 507 | 508 | Sub Plastics_Hit(idx) 509 | Playsound "flip_hit_2", Vol(ActiveBall)*VolPlast, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 510 | End Sub 511 | 512 | ' Thalamus : This sub is used twice - this means ... this one IS NOT USED 513 | ' Not a issue though, they are the same 514 | ' Sub Rubbers_Hit(idx) 515 | ' Select Case Int(Rnd*3)+1 516 | ' Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 517 | ' Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 518 | ' Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 519 | ' End Select 520 | ' End Sub 521 | 522 | ' Sub Metals_Hit(idx) 523 | ' Select Case Int(Rnd*3)+1 524 | ' Case 1 : PlaySound "metal_hit1", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 525 | ' Case 2 : PlaySound "metal_hit2", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 526 | ' Case 3 : PlaySound "metal_hit3", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 527 | ' End Select 528 | ' End Sub 529 | 530 | ' Sub LeftFlipper_Collide(parm) 531 | ' RandomSoundFlipper() 532 | ' End Sub 533 | ' 534 | ' Sub RightFlipper_Collide(parm) 535 | ' RandomSoundFlipper() 536 | ' End Sub 537 | 538 | 539 | ' Sub Gate_Collide(parm) 540 | ' Select Case Int(Rnd*3)+1 541 | ' Case 1 : PlaySound "metal_hit1", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 542 | ' Case 2 : PlaySound "metal_hit2", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 543 | ' Case 3 : PlaySound "metal_hit3", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 544 | ' End Select 545 | ' End Sub 546 | 547 | Sub RandomSoundFlipper() 548 | Select Case Int(Rnd*3)+1 549 | Case 1 : PlaySound "flip_hit_1", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 550 | Case 2 : PlaySound "flip_hit_2", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 551 | Case 3 : PlaySound "flip_hit_3", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 552 | End Select 553 | End Sub 554 | 555 | Sub Rubbers_Hit(idx) 556 | Select Case Int(Rnd*3)+1 557 | Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 558 | Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 559 | Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 560 | End Select 561 | End Sub 562 | 563 | Sub Metals_Hit(idx) 564 | Select Case Int(Rnd*3)+1 565 | Case 1 : PlaySound "metal_hit1", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 566 | Case 2 : PlaySound "metal_hit2", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 567 | Case 3 : PlaySound "metal_hit3", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 568 | End Select 569 | End Sub 570 | 571 | Sub LeftFlipper_Collide(parm) 572 | RandomSoundFlipper() 573 | End Sub 574 | 575 | Sub RightFlipper_Collide(parm) 576 | RandomSoundFlipper() 577 | End Sub 578 | 579 | Sub Gate_Collide(parm) 580 | Select Case Int(Rnd*3)+1 581 | Case 1 : PlaySound "metal_hit1", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 582 | Case 2 : PlaySound "metal_hit2", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 583 | Case 3 : PlaySound "metal_hit3", 0, Vol(ActiveBall)*100, Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 584 | End Select 585 | End Sub 586 | 587 | 588 | -------------------------------------------------------------------------------- /House of Diamonds (Zaccaria 1978).vbs: -------------------------------------------------------------------------------- 1 | Option Explicit 2 | Randomize 3 | 4 | On Error Resume Next 5 | ExecuteGlobal GetTextFile("controller.vbs") 6 | If Err Then MsgBox "You need the Controller.vbs file in order to run this table (installed with the VPX package in the scripts folder)" 7 | On Error Goto 0 8 | LoadVPM "01560000","ZAC2.VBS",3.2 9 | Const cGameName="hod",UseSolenoids=1,UseLamps=1,UseGI=0,SSolenoidOn="SolOn",SSolenoidOff="SolOff",SFlipperOn="FX_FlipperUp",SFlipperOff="FX_FlipperDown" 10 | Const SCoin="coin3",cCredits="House Of Diamonds" 11 | 12 | ' Thalamus 2019 October : Improved directional sounds 13 | ' !! NOTE : Table not verified yet !! 14 | 15 | ' Options 16 | ' Volume devided by - lower gets higher sound 17 | 18 | Const VolDiv = 2000 ' Lower number, louder ballrolling/collition sound 19 | Const VolCol = 10 ' Ball collition divider ( voldiv/volcol ) 20 | 21 | Dim obj 22 | Dim EnableBallControl 23 | EnableBallControl = false 'Change to true to enable manual ball control (or press C in-game) via the arrow keys and B (boost movement) keys 24 | 25 | Sub Table1_KeyDown(ByVal KeyCode) 26 | If keycode=startgamekey then 27 | controller.switch(3)=1 28 | TextBox8.text="" 29 | BIP.text="Balls to Play" 30 | Exit Sub 31 | End If 32 | 33 | ' Manual Ball Control 34 | If keycode = 46 Then ' C Key 35 | If EnableBallControl = 1 Then 36 | EnableBallControl = 0 37 | Else 38 | EnableBallControl = 1 39 | End If 40 | End If 41 | If EnableBallControl = 1 Then 42 | If keycode = 48 Then ' B Key 43 | If BCboost = 1 Then 44 | BCboost = BCboostmulti 45 | Else 46 | BCboost = 1 47 | End If 48 | End If 49 | If keycode = 203 Then BCleft = 1 ' Left Arrow 50 | If keycode = 200 Then BCup = 1 ' Up Arrow 51 | If keycode = 208 Then BCdown = 1 ' Down Arrow 52 | If keycode = 205 Then BCright = 1 ' Right Arrow 53 | End If 54 | 55 | If KeyCode=PlungerKey Then PlaySoundAtVol "Plungerpull", Plunger, 1:Plunger.Pullback 56 | If vpmKeyDown(KeyCode) Then Exit Sub 57 | End Sub 58 | 59 | Sub Table1_KeyUp(ByVal KeyCode) 60 | 'Manual Ball Control 61 | If EnableBallControl = 1 Then 62 | If keycode = 203 Then BCleft = 0 ' Left Arrow 63 | If keycode = 200 Then BCup = 0 ' Up Arrow 64 | If keycode = 208 Then BCdown = 0 ' Down Arrow 65 | If keycode = 205 Then BCright = 0 ' Right Arrow 66 | End If 67 | If keycode=startgamekey then 68 | controller.switch(3)=0 69 | Exit Sub 70 | End If 71 | 72 | If KeyCode=PlungerKey Then PlaySoundAtVol "Plunger", Plunger, 1:Plunger.Fire 73 | If vpmKeyUp(KeyCode) Then Exit Sub 74 | End Sub 75 | 76 | SolCallback(1)="vpmSolSound ""lsling""," 77 | SolCallback(6)="vpmSolSound ""rsling""," 78 | 'SolCallback(8)="vpmSolSound ""bumper""," 79 | 'SolCallback(9)="vpmSolSound ""bumper""," 80 | SolCallback(10)="bsSaucer.SolOut" 81 | SolCallback(11)="bsTrough.SolOut" 82 | SolCallback(12)="vpmSolSound ""knocker""," 83 | SolCallback(17)="vpmSolSound ""lsling""," 84 | SolCallback(18)="vpmSolSound ""rsling""," 85 | SolCallback(20)="vpmNudge.SolGameOn" 86 | SolCallback(sLLFlipper)="vpmSolFlipper LeftFlipper,Flipper2," 87 | SolCallback(sLRFlipper)="vpmSolFlipper RightFlipper,Flipper1," 88 | 89 | Dim bsTrough,bsSaucer,dtR 90 | 91 | Sub Table1_Init 92 | 93 | ' Thalamus : Was missing 'vpminit me' 94 | vpminit me 95 | 96 | If Table1.ShowDT = False then 97 | For each obj in Backdropstuff 98 | obj.visible=False 99 | next 100 | End If 101 | With Controller 102 | .GameName=cGameName 103 | If Err Then MsgBox "Can't start Game" & cGameName & vbNewLine & Err.Description : Exit Sub 104 | .SplashInfoLine=cCredits 105 | .HandleMechanics=0 106 | .HandleKeyboard=0 107 | .ShowDMDOnly=1 108 | .ShowFrame=0 109 | .ShowTitle=0 110 | .Hidden=1 111 | .Run 112 | If Err Then MsgBox Err.Description 113 | End With 114 | PinMAMETimer.Interval=PinMAMEInterval:PinMAMETimer.Enabled=1 115 | vpmNudge.TiltSwitch=1:vpmNudge.Sensitivity=5:vpmNudge.TiltObj=Array(Bumper1,Bumper2,LeftSlingshot,RightSlingshot) 116 | 117 | Set bsTrough=New cvpmBallStack 118 | bsTrough.InitSw 0,16,0,0,0,0,0,0 119 | bsTrough.InitKick BallRelease,90,5 120 | bsTrough.InitExitSnd "popper","ballsave" 121 | bsTrough.Balls=1 122 | 123 | Set dtR=New cvpmDropTarget 124 | dtR.InitSnd "flapclos","flapopen" 125 | 126 | Set bsSaucer=New cvpmBallStack 127 | bsSaucer.InitSaucer Kicker1,41,160,22 128 | bsSaucer.InitExitSnd "popper_ball","solon" 129 | 130 | vpmMapLights AllLights 131 | 132 | End Sub 133 | 134 | Sub Drain_Hit 135 | Timer1.Interval = 1500:Timer1.Enabled = true 136 | PlaySoundAtVol "Drain", Drain, 1 137 | bsTrough.AddBall Me 'switch33 138 | End Sub 139 | 140 | Sub Timer1_Timer() 141 | Timer1.Enabled = false 142 | End Sub 143 | 144 | '**********Sling Shot Animations 145 | ' Rstep and Lstep are the variables that increment the animation 146 | '**************** 147 | Dim RStep, Lstep 148 | 149 | Sub RightSlingShot_Slingshot 150 | PlaySoundAtVol SoundFX("right_slingshot",DOFContactors), sling1, 1 151 | vpmTimer.PulseSw(18) 152 | GiEffect 153 | RSling.Visible = 0 154 | RSling1.Visible = 1 155 | sling1.rotx = 20 156 | RStep = 0 157 | RightSlingShot.TimerEnabled = 1 158 | End Sub 159 | 160 | Sub RightSlingShot_Timer 161 | Select Case RStep 162 | Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:sling1.rotx = 10 163 | Case 4:RSLing2.Visible = 0:RSLing.Visible = 1:sling1.rotx = 0:RightSlingShot.TimerEnabled = 0 164 | End Select 165 | RStep = RStep + 1 166 | End Sub 167 | 168 | Sub LeftSlingShot_Slingshot 169 | PlaySoundAtVol SoundFX("left_slingshot",DOFContactors), sling2, 1 170 | vpmTimer.PulseSw(17) 171 | GiEffect 172 | LSling.Visible = 0 173 | LSling1.Visible = 1 174 | sling2.rotx = 20 175 | LStep = 0 176 | LeftSlingShot.TimerEnabled = 1 177 | End Sub 178 | 179 | Sub LeftSlingShot_Timer 180 | Select Case LStep 181 | Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:sling2.rotx = 10 182 | Case 4:LSLing2.Visible = 0:LSLing.Visible = 1:sling2.rotx = 0:LeftSlingShot.TimerEnabled = 0 183 | End Select 184 | LStep = LStep + 1 185 | End Sub 186 | 187 | Sub Kicker1_Hit:PlaysoundAtVol "kicker_enter_center", ActiveBall, 1:bsSaucer.AddBall 0:End Sub 188 | Sub Bumper1_Hit:vpmTimer.PulseSw(29):RandomSoundBumber:GiEffect:End Sub 189 | Sub Bumper2_Hit:vpmTimer.PulseSw(37):RandomSoundBumber:GiEffect:End Sub 190 | 191 | Sub LeftOutlane_Hit():vpmTimer.PulseSw(22):End Sub 192 | Sub RightOutlane_Hit():vpmTimer.PulseSw(20):End Sub 193 | 194 | Sub LeftInlane_Hit():vpmTimer.PulseSw(21):End Sub 195 | Sub RightInlane_Hit():vpmTimer.PulseSw(19):End Sub 196 | Sub Spinner1_Spin():vpmTimer.PulseSw(23):PlaySoundAtVol "fx_spinner", Spinner1, 1 :End Sub 197 | 198 | Sub Side1_Hit():vpmTimer.PulseSw(31):End Sub 'top left rollover 199 | Sub Trigger1_Hit():vpmTimer.PulseSw(39):End Sub 'mid right lane 200 | Sub Spot1A_Hit():VpmTimer.PulseSw(30):End Sub 201 | Sub Spot2A_Hit():VpmTimer.PulseSw(38):End Sub 202 | 203 | Sub Drop1a_Hit:vpmTimer.PulseSw(28):End Sub 204 | Sub Drop2a_Hit:vpmTimer.PulseSw(27):End Sub '? 205 | Sub Drop3a_Hit:vpmTimer.PulseSw(26):End Sub 206 | Sub Drop4a_Hit:vpmTimer.PulseSw(25):End Sub 207 | Sub Drop5a_Hit:vpmTimer.PulseSw(24):End Sub 208 | 209 | Sub Drop6a_Hit:vpmTimer.PulseSw(36):End Sub '? 210 | Sub Drop7a_Hit:vpmTimer.PulseSw(35):End Sub 211 | Sub Drop8a_Hit:vpmTimer.PulseSw(34):End Sub 212 | Sub Drop9a_Hit:vpmTimer.PulseSw(33):End Sub 213 | Sub Drop10a_Hit:vpmTimer.PulseSw(32):End Sub 214 | 215 | Sub Wall4_Hit:vpmTimer.PulseSw(23):End Sub 216 | Sub Wall5_Hit:vpmTimer.PulseSw(23):End Sub 217 | 218 | ' ******************************************************************************************************* 219 | ' Positional Sound Playback Functions by DJRobX and Rothbauerw 220 | ' PlaySound sound, 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 1, AudioFade(ActiveBall) 221 | ' ******************************************************************************************************* 222 | 223 | ' Play a sound, depending on the X,Y position of the table element (especially cool for surround speaker setups, otherwise stereo panning only) 224 | ' parameters (defaults): loopcount (1), volume (1), randompitch (0), pitch (0), useexisting (0), restart (1)) 225 | ' Note that this will not work (currently) for walls/slingshots as these do not feature a simple, single X,Y position 226 | 227 | Sub PlayXYSound(soundname, tableobj, loopcount, volume, randompitch, pitch, useexisting, restart) 228 | PlaySound soundname, loopcount, volume, AudioPan(tableobj), randompitch, pitch, useexisting, restart, AudioFade(tableobj) 229 | End Sub 230 | 231 | ' Set position as table object (Use object or light but NOT wall) and Vol to 1 232 | 233 | Sub PlaySoundAt(soundname, tableobj) 234 | PlaySound soundname, 1, 1, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj) 235 | End Sub 236 | 237 | 'Set all as per ball position & speed. 238 | 239 | Sub PlaySoundAtBall(soundname) 240 | PlaySoundAt soundname, ActiveBall 241 | End Sub 242 | 243 | 'Set position as table object and Vol manually. 244 | 245 | Sub PlaySoundAtVol(sound, tableobj, Volume) 246 | PlaySound sound, 1, Volume, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj) 247 | End Sub 248 | 249 | 'Set all as per ball position & speed, but Vol Multiplier may be used eg; PlaySoundAtBallVol "sound",3 250 | 251 | Sub PlaySoundAtBallVol(sound, VolMult) 252 | PlaySound sound, 0, Vol(ActiveBall) * VolMult, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 1, AudioFade(ActiveBall) 253 | End Sub 254 | 255 | 'Set position as bumperX and Vol manually. 256 | 257 | Sub PlaySoundAtBumperVol(sound, tableobj, Vol) 258 | PlaySound sound, 1, Vol, AudioPan(tableobj), 0,0,1, 1, AudioFade(tableobj) 259 | End Sub 260 | 261 | Sub PlaySoundAtBOTBallZ(sound, BOT) 262 | PlaySound sound, 0, ABS(BOT.velz)/17, Pan(BOT), 0, Pitch(BOT), 1, 0, AudioFade(BOT) 263 | End Sub 264 | 265 | ' play a looping sound at a location with volume 266 | Sub PlayLoopSoundAtVol(sound, tableobj, Vol) 267 | PlaySound sound, -1, Vol, AudioPan(tableobj), 0, 0, 1, 0, AudioFade(tableobj) 268 | End Sub 269 | 270 | '********************************************************************* 271 | ' Supporting Ball & Sound Functions 272 | '********************************************************************* 273 | 274 | Function RndNum(min, max) 275 | RndNum = Int(Rnd() * (max-min + 1) ) + min ' Sets a random number between min and max 276 | End Function 277 | 278 | Function AudioFade(tableobj) ' Fades between front and back of the table (for surround systems or 2x2 speakers, etc), depending on the Y position on the table. "table1" is the name of the table 279 | Dim tmp 280 | On Error Resume Next 281 | tmp = tableobj.y * 2 / table1.height-1 282 | If tmp > 0 Then 283 | AudioFade = Csng(tmp ^10) 284 | Else 285 | AudioFade = Csng(-((- tmp) ^10) ) 286 | End If 287 | End Function 288 | 289 | Function AudioPan(tableobj) ' Calculates the pan for a tableobj based on the X position on the table. "table1" is the name of the table 290 | Dim tmp 291 | On Error Resume Next 292 | tmp = tableobj.x * 2 / table1.width-1 293 | If tmp > 0 Then 294 | AudioPan = Csng(tmp ^10) 295 | Else 296 | AudioPan = Csng(-((- tmp) ^10) ) 297 | End If 298 | End Function 299 | 300 | Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table 301 | Dim tmp 302 | On Error Resume Next 303 | tmp = ball.x * 2 / table1.width-1 304 | If tmp > 0 Then 305 | Pan = Csng(tmp ^10) 306 | Else 307 | Pan = Csng(-((- tmp) ^10) ) 308 | End If 309 | End Function 310 | 311 | Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed 312 | Vol = Csng(BallVel(ball) ^2 / VolDiv) 313 | End Function 314 | 315 | Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed 316 | Pitch = BallVel(ball) * 20 317 | End Function 318 | 319 | Function BallVel(ball) 'Calculates the ball speed 320 | BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) ) 321 | End Function 322 | 323 | Function BallVelZ(ball) 'Calculates the ball speed in the -Z 324 | BallVelZ = INT((ball.VelZ) * -1 ) 325 | End Function 326 | 327 | Function VolZ(ball) ' Calculates the Volume of the sound based on the ball speed in the Z 328 | VolZ = Csng(BallVelZ(ball) ^2 / 200)*1.2 329 | End Function 330 | 331 | '*** Determines if a Points (px,py) is inside a 4 point polygon A-D in Clockwise/CCW order 332 | 333 | Function InRect(px,py,ax,ay,bx,by,cx,cy,dx,dy) 334 | Dim AB, BC, CD, DA 335 | AB = (bx*py) - (by*px) - (ax*py) + (ay*px) + (ax*by) - (ay*bx) 336 | BC = (cx*py) - (cy*px) - (bx*py) + (by*px) + (bx*cy) - (by*cx) 337 | CD = (dx*py) - (dy*px) - (cx*py) + (cy*px) + (cx*dy) - (cy*dx) 338 | DA = (ax*py) - (ay*px) - (dx*py) + (dy*px) + (dx*ay) - (dy*ax) 339 | 340 | If (AB <= 0 AND BC <=0 AND CD <= 0 AND DA <= 0) Or (AB >= 0 AND BC >=0 AND CD >= 0 AND DA >= 0) Then 341 | InRect = True 342 | Else 343 | InRect = False 344 | End If 345 | End Function 346 | 347 | 348 | '******************************************************************** 349 | ' JP's VP10 Rolling Sounds (+rothbauerw's Dropping Sounds) 350 | '******************************************************************** 351 | 352 | Const tnob = 5 ' total number of balls 353 | ReDim rolling(tnob) 354 | InitRolling 355 | 356 | Sub InitRolling 357 | Dim i 358 | For i = 0 to tnob 359 | rolling(i) = False 360 | Next 361 | End Sub 362 | 363 | Sub RollingTimer_Timer() 364 | Dim BOT, b 365 | BOT = GetBalls 366 | 367 | ' stop the sound of deleted balls 368 | For b = UBound(BOT) + 1 to tnob 369 | rolling(b) = False 370 | StopSound("fx_ballrolling" & b) 371 | Next 372 | 373 | ' exit the sub if no balls on the table 374 | For b = 0 to UBound(BOT) 375 | If BallVel(BOT(b) ) > 1 Then 376 | rolling(b) = True 377 | if BOT(b).z < 30 Then ' Ball on playfield 378 | PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), AudioPan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0, AudioFade(BOT(b) ) 379 | Else ' Ball on raised ramp 380 | PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) )*.5, AudioPan(BOT(b) ), 0, Pitch(BOT(b) )+50000, 1, 0, AudioFade(BOT(b) ) 381 | End If 382 | Else 383 | If rolling(b) = True Then 384 | StopSound("fx_ballrolling" & b) 385 | rolling(b) = False 386 | End If 387 | End If 388 | Next 389 | End Sub 390 | 391 | '********************** 392 | ' Ball Collision Sound 393 | '********************** 394 | 395 | Sub OnBallBallCollision(ball1, ball2, velocity) 396 | PlaySound("fx_collide"), 0, Csng(velocity) ^2 / (VolDiv/VolCol), AudioPan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1) 397 | End Sub 398 | 399 | '***************************************** 400 | ' ninuzzu's FLIPPER SHADOWS 401 | '***************************************** 402 | 403 | sub FlipperTimer_Timer() 404 | FlipperLSh.RotZ = LeftFlipper.currentangle 405 | FlipperRSh.RotZ = RightFlipper.currentangle 406 | 407 | End Sub 408 | 409 | '***************************************** 410 | ' ninuzzu's BALL SHADOW 411 | '***************************************** 412 | Dim BallShadow 413 | BallShadow = Array (BallShadow1,BallShadow2,BallShadow3,BallShadow4,BallShadow5) 414 | 415 | Sub BallShadowUpdate_timer() 416 | Dim BOT, b 417 | BOT = GetBalls 418 | ' hide shadow of deleted balls 419 | If UBound(BOT)<(tnob-1) Then 420 | For b = (UBound(BOT) + 1) to (tnob-1) 421 | BallShadow(b).visible = 0 422 | Next 423 | End If 424 | ' exit the Sub if no balls on the table 425 | If UBound(BOT) = -1 Then Exit Sub 426 | ' render the shadow for each ball 427 | For b = 0 to UBound(BOT) 428 | If BOT(b).X < Table1.Width/2 Then 429 | BallShadow(b).X = ((BOT(b).X) - (Ballsize/6) + ((BOT(b).X - (Table1.Width/2))/21)) + 6 430 | Else 431 | BallShadow(b).X = ((BOT(b).X) + (Ballsize/6) + ((BOT(b).X - (Table1.Width/2))/21)) - 6 432 | End If 433 | ballShadow(b).Y = BOT(b).Y + 4 434 | If BOT(b).Z > 20 Then 435 | BallShadow(b).visible = 1 436 | Else 437 | BallShadow(b).visible = 0 438 | End If 439 | Next 440 | End Sub 441 | 442 | 443 | Sub Pins_Hit (idx) 444 | PlaySound "pinhit_low", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall) 445 | End Sub 446 | 447 | Sub Targets_Hit (idx) 448 | PlaySound "target", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall) 449 | End Sub 450 | 451 | Sub Metals_Thin_Hit (idx) 452 | PlaySound "metalhit_thin", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 453 | End Sub 454 | 455 | Sub Metals_Medium_Hit (idx) 456 | PlaySound "metalhit_medium", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 457 | End Sub 458 | 459 | Sub Metals2_Hit (idx) 460 | PlaySound "metalhit2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 461 | End Sub 462 | 463 | Sub Gates_Hit (idx) 464 | PlaySound "gate4", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 465 | End Sub 466 | 467 | Sub aRubbers_Hit(idx) 468 | dim finalspeed 469 | finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely) 470 | If finalspeed > 20 then 471 | PlaySound "fx_rubber2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 472 | End if 473 | If finalspeed >= 6 AND finalspeed <= 20 then 474 | RandomSoundRubber() 475 | End If 476 | End Sub 477 | 478 | Sub Posts_Hit(idx) 479 | dim finalspeed 480 | finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely) 481 | If finalspeed > 16 then 482 | PlaySound "fx_rubber2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 483 | End if 484 | If finalspeed >= 6 AND finalspeed <= 16 then 485 | RandomSoundRubber() 486 | End If 487 | End Sub 488 | 489 | Sub RandomSoundRubber() 490 | Select Case Int(Rnd*3)+1 491 | Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 492 | Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 493 | Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 494 | End Select 495 | End Sub 496 | 497 | Sub RandomSoundBumber 498 | Select Case Int(Rnd*4)+1 499 | Case 1 : PlaySoundAtVol "fx_bumper1", ActiveBall, 1 500 | Case 2 : PlaySoundAtVol "fx_bumper2", ActiveBall, 1 501 | Case 3 : PlaySoundAtVol "fx_bumper3", ActiveBall, 1 502 | Case 4 : PlaySoundAtVol "fx_bumper4", ActiveBall, 1 503 | End Select 504 | End Sub 505 | 506 | 507 | Sub LeftFlipper_Collide(parm) 508 | RandomSoundFlipper() 509 | End Sub 510 | 511 | Sub RightFlipper_Collide(parm) 512 | RandomSoundFlipper() 513 | End Sub 514 | 515 | Sub RandomSoundFlipper() 516 | Select Case Int(Rnd*3)+1 517 | Case 1 : PlaySound "flip_hit_1", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 518 | Case 2 : PlaySound "flip_hit_2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 519 | Case 3 : PlaySound "flip_hit_3", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) 520 | End Select 521 | End Sub 522 | 523 | Sub GiEffect 524 | LightSeqGi.UpdateInterval = 10 525 | LightSeqGi.Play SeqBlinking, , 4, 1 526 | End Sub 527 | 528 | '************************************ 529 | ' LEDs Display DT (From Kiwi's Farfalla) 530 | '************************************ 531 | 532 | Sub LampTimer_Timer() 533 | UpdateLeds 534 | End Sub 535 | 536 | 537 | 538 | Dim Digits(33) 539 | 540 | Set Digits(0) = da1 541 | Set Digits(1) = da2 542 | Set Digits(2) = da3 543 | Set Digits(3) = da4 544 | Set Digits(4) = da5 545 | Set Digits(5) = da6 546 | 547 | Set Digits(6) = db1 548 | Set Digits(7) = db2 549 | Set Digits(8) = db3 550 | Set Digits(9) = db4 551 | Set Digits(10) = db5 552 | Set Digits(11) = db6 553 | 554 | Set Digits(12) = dc1 555 | Set Digits(13) = dc2 556 | Set Digits(14) = dc3 557 | Set Digits(15) = dc4 558 | Set Digits(16) = dc5 559 | Set Digits(17) = dc6 560 | 561 | Set Digits(18) = dd1 562 | Set Digits(19) = dd2 563 | Set Digits(20) = dd3 564 | Set Digits(21) = dd4 565 | Set Digits(22) = dd5 566 | Set Digits(23) = dd6 567 | 568 | Set Digits(24) = de1 569 | Set Digits(25) = de2 570 | Set Digits(26) = de3 571 | Set Digits(27) = de4 572 | Set Digits(28) = de5 573 | Set Digits(29) = de6 574 | 575 | Set Digits(30) = df1 576 | Set Digits(31) = df2 577 | Set Digits(32) = df3 578 | Set Digits(33) = df4 579 | 580 | 581 | 582 | Sub UPdateLEDs 583 | On Error Resume Next 584 | Dim ChgLED, ii, jj, chg, stat 585 | ChgLED = Controller.ChangedLEDs(&H0000003f, &Hffffffff) 586 | If Not IsEmpty(ChgLED) Then 587 | For ii = 0 To UBound(ChgLED) 588 | chg = chgLED(ii, 1):stat = chgLED(ii, 2) 589 | 590 | Select Case stat 591 | Case 0:Digits(chgLED(ii, 0) ).SetValue 0 'empty 592 | Case 63:Digits(chgLED(ii, 0) ).SetValue 1 '0 593 | Case 6:Digits(chgLED(ii, 0) ).SetValue 2 '1 594 | Case 91:Digits(chgLED(ii, 0) ).SetValue 3 '2 595 | Case 79:Digits(chgLED(ii, 0) ).SetValue 4 '3 596 | Case 102:Digits(chgLED(ii, 0) ).SetValue 5 '4 597 | Case 109:Digits(chgLED(ii, 0) ).SetValue 6 '5 598 | Case 124:Digits(chgLED(ii, 0) ).SetValue 7 '6 599 | 'Case 125:Digits(chgLED(ii, 0) ).SetValue 7 '6 600 | Case 252:Digits(chgLED(ii, 0) ).SetValue 18 '6, 601 | Case 7:Digits(chgLED(ii, 0) ).SetValue 8 '7 602 | Case 127:Digits(chgLED(ii, 0) ).SetValue 9 '8 603 | Case 103:Digits(chgLED(ii, 0) ).SetValue 10 '9 604 | 'Case 111:Digits(chgLED(ii, 0) ).SetValue 10 '9 605 | Case 231:Digits(chgLED(ii, 0) ).SetValue 21 '9, 606 | Case 128:Digits(chgLED(ii, 0) ).SetValue 11 'Comma 607 | Case 191:Digits(chgLED(ii, 0) ).SetValue 12 '0, 608 | 'Case 832:Digits(chgLED(ii, 0) ).SetValue 2 '1 609 | 'Case 896:Digits(chgLED(ii, 0) ).SetValue 2 '1 610 | 'Case 768:Digits(chgLED(ii, 0) ).SetValue 2 '1 611 | Case 134:Digits(chgLED(ii, 0) ).SetValue 13 '1, 612 | Case 219:Digits(chgLED(ii, 0) ).SetValue 14 '2, 613 | Case 207:Digits(chgLED(ii, 0) ).SetValue 15 '3, 614 | Case 230:Digits(chgLED(ii, 0) ).SetValue 16 '4, 615 | Case 237:Digits(chgLED(ii, 0) ).SetValue 17 '5, 616 | 'Case 253:Digits(chgLED(ii, 0) ).SetValue 18 '6, 617 | Case 135:Digits(chgLED(ii, 0) ).SetValue 19 '7, 618 | Case 255:Digits(chgLED(ii, 0) ).SetValue 20 '8, 619 | 'Case 239:Digits(chgLED(ii, 0) ).SetValue 21 '9, 620 | End Select 621 | Next 622 | End IF 623 | End Sub 624 | 625 | ' Thalamus - 2021-04-30 : added proper exit 626 | 627 | ' Thalamus : Exit in a clean and proper way 628 | Sub Table1_exit() 629 | Controller.Pause = False 630 | Controller.Stop 631 | End Sub 632 | 633 | -------------------------------------------------------------------------------- /Lucky Luke (Gottlieb 1975 - FastDrawMod) v0.91.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sverrewl/vpxtable_scripts/235e65e3e425020846ebca556edd82575716a6ed/Lucky Luke (Gottlieb 1975 - FastDrawMod) v0.91.vbs -------------------------------------------------------------------------------- /Old Coney Island v1.2.0.vbs: -------------------------------------------------------------------------------- 1 | '***************************** 2 | ' Old Coney Isand 3 | ' para JOLO 4 | ' (vale también para Leo :) ) 5 | '***************************** 6 | ' Updated DOF commands by arngrim 7 | Option Explicit 8 | Randomize 9 | 10 | 11 | ' Thalamus 2018-07-24 12 | ' Added/Updated "Positional Sound Playback Functions" and "Supporting Ball & Sound Functions" 13 | ' Thalamus 2018-11-01 : Improved directional sounds 14 | ' !! NOTE : Table not verified yet !! 15 | 16 | ' Options 17 | ' Volume devided by - lower gets higher sound 18 | 19 | Const VolDiv = 2000 ' Lower number, louder ballrolling/collition sound 20 | Const VolCol = 10 ' Ball collition divider ( voldiv/volcol ) 21 | 22 | ' The rest of the values are multipliers 23 | ' 24 | ' .5 = lower volume 25 | ' 1.5 = higher volume 26 | 27 | Const VolBump = 2 ' Bumpers volume. 28 | Const VolRol = 1 ' Rollovers volume. 29 | Const VolGates = 1 ' Gates volume. 30 | Const VolMetal = 1 ' Metals volume. 31 | Const VolRB = 1 ' Rubber bands volume. 32 | Const VolRH = 1 ' Rubber hits volume. 33 | Const VolPo = 1 ' Rubber posts volume. 34 | Const VolPi = 1 ' Rubber pins volume. 35 | Const VolPlast = 1 ' Plastics volume. 36 | Const VolTarg = 1 ' Targets volume. 37 | Const VolWood = 1 ' Woods volume. 38 | Const VolKick = 1 ' Kicker volume. 39 | Const VolSpin = 1.5 ' Spinners volume. 40 | Const VolFlip = 1 ' Flipper volume. 41 | 42 | 43 | On Error Resume Next 44 | ExecuteGlobal GetTextFile("controller.vbs") 45 | If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package" 46 | On Error Goto 0 47 | 48 | LoadVPM "00990300", "GamePlan.vbs", 3.1 49 | 50 | Dim cCredits 51 | cCredits = "Coney Island, GamePlan, 1979" 52 | Const cGameName = "coneyis" 53 | 54 | Const UseSolenoids = 1 55 | Const UseLamps = 1 56 | Const UseGI = 0 57 | Const UseSync = 1 58 | 59 | ' Standard vpinmame Sounds 60 | Const SCoin = "fx_coin" 61 | 62 | ' Solenoids 63 | 64 | SolCallback(8) = "bsTrough.SolOut" 65 | SolCallback(11) = "dtDrop.SolDropUp" 66 | SolCallback(15) = "bsSaucer.SolOut" 67 | SolCallback(16) = "vpmNudge.SolGameOn" 68 | 69 | ' If you want chimes uncomment these lines: 70 | 'SolCallback(18) = "vpmSolSound ""fx_Chime4""," 71 | 'SolCallback(19) = "vpmSolSound ""fx_Chime3""," 72 | 'SolCallback(20) = "vpmSolSound ""fx_Chime2""," 73 | 'SolCallback(21) = "vpmSolSound ""fx_Chime1""," 74 | 75 | ' not used in the script 76 | 'SolCallback(12) bumper 2 77 | 'SolCallback(13) bumper 3 78 | 'SolCallback(14) bumper 1 79 | 'SolCallback(9) left slingshot 80 | 'SolCallback(10) right slingshot 81 | 82 | '************** 83 | ' Flipper Subs 84 | '************** 85 | 86 | SolCallback(sLRFlipper) = "SolRFlipper" 87 | SolCallback(sLLFlipper) = "SolLFlipper" 88 | 89 | Sub SolLFlipper(Enabled) 90 | If Enabled Then 91 | PlaySoundAtVol SoundFX("fx_flipperup", DOFContactors), LeftFlipper, VolFlip 92 | LeftFlipper.RotateToEnd 93 | Else 94 | PlaySoundAtVol SoundFX("fx_flipperdown", DOFContactors), LeftFlipper, VolFlip 95 | LeftFlipper.RotateToStart 96 | End If 97 | End Sub 98 | 99 | Sub SolRFlipper(Enabled) 100 | If Enabled Then 101 | PlaySoundAtVol SoundFX("fx_flipperup", DOFContactors), RightFlipper, VolFlip 102 | RightFlipper.RotateToEnd 103 | Else 104 | PlaySoundAtVol SoundFX("fx_flipperdown", DOFContactors), RightFlipper, VolFlip 105 | RightFlipper.RotateToStart 106 | End If 107 | End Sub 108 | 109 | Sub LeftFlipper_Collide(parm) 110 | PlaySound "fx_rubber_flipper", 0, parm / 10, -0.1, 0.15 111 | End Sub 112 | 113 | Sub Rightflipper_Collide(parm) 114 | PlaySound "fx_rubber_flipper", 0, parm / 10, 0.1, 0.15 115 | End Sub 116 | 117 | '************** 118 | ' Table Init 119 | '************** 120 | 121 | Dim bsTrough, dtDrop, bsSaucer 122 | 123 | Sub Table1_Init 124 | 125 | ' Thalamus : Was missing 'vpminit me' 126 | vpminit me 127 | 128 | On Error Resume Next 129 | With Controller 130 | .GameName = cGameName 131 | If Err Then MsgBox "Can't start Game" & cGameName & vbNewLine & Err.Description:Exit Sub 132 | .SplashInfoLine = cCredits 133 | .Games(cGameName).Settings.Value("rol") = 0 '1= rotated display, 0= normal 134 | .HandleMechanics = 0 135 | .ShowDMDOnly = 1 136 | .ShowFrame = 0 137 | .ShowTitle = 0 138 | End With 139 | On Error Goto 0 140 | Controller.SolMask(0) = 0 141 | vpmTimer.AddTimer 2000, "Controller.SolMask(0)=&Hffffffff'" 'ignore all solenoids - then add the timer to renable all the solenoids after 2 seconds 142 | Controller.Run 143 | 144 | ' Press F6 during the game to change the dip switches 145 | ' destruk dip switches - awards extra ball 146 | 'Controller.Dip(0) = (0 * 1 + 1 * 2 + 0 * 4 + 0 * 8 + 0 * 16 + 0 * 32 + 0 * 64 + 0 * 128) '01-08 147 | 'Controller.Dip(1) = (0 * 1 + 0 * 2 + 0 * 4 + 0 * 8 + 0 * 16 + 0 * 32 + 0 * 64 + 1 * 128) '09-16 148 | 'Controller.Dip(2) = (0 * 1 + 1 * 2 + 0 * 4 + 0 * 8 + 0 * 16 + 0 * 32 + 0 * 64 + 0 * 128) '17-24 149 | 'Controller.Dip(3) = (1 * 1 + 1 * 2 + 1 * 4 + 0 * 8 + 0 * 16 + 1 * 32 + 1 * 64 + 0 * 128) '25-32 150 | 151 | ' Jolo dip switches - awards extra game 152 | 'Controller.Dip(0) = (0 * 1 + 0 * 2 + 0 * 4 + 0 * 8 + 0 * 16 + 0 * 32 + 0 * 64 + 0 * 128) '01-08 153 | 'Controller.Dip(1) = (0 * 1 + 0 * 2 + 0 * 4 + 0 * 8 + 1 * 16 + 0 * 32 + 0 * 64 + 1 * 128) '09-16 154 | 'Controller.Dip(2) = (0 * 1 + 1 * 2 + 0 * 4 + 0 * 8 + 0 * 16 + 0 * 32 + 0 * 64 + 0 * 128) '17-24 155 | 'Controller.Dip(3) = (1 * 1 + 1 * 2 + 1 * 4 + 0 * 8 + 1 * 16 + 1 * 32 + 1 * 64 + 1 * 128) '25-32 156 | 157 | ' Nudging 158 | vpmNudge.TiltSwitch = swTilt 159 | vpmNudge.Sensitivity = 5 160 | vpmNudge.TiltObj = Array(Bumper1, Bumper2, Bumper3, LeftSlingshot, RightSlingshot) 161 | 162 | ' Trough 163 | Set bsTrough = New cvpmBallStack 164 | With bsTrough 165 | .InitSw 0, 11, 0, 0, 0, 0, 0, 0 166 | .InitKick BallRelease, 80, 6 167 | .InitEntrySnd "fx_Solenoid", "fx_Solenoid" 168 | .InitExitSnd SoundFX("fx_ballrel", DOFContactors), SoundFX("fx_Solenoid", DOFContactors) 169 | .Balls = 1 170 | End With 171 | 172 | ' Left Eject Hole 173 | Set bsSaucer = New cvpmBallStack 174 | With bsSaucer 175 | .InitSaucer sw24, 24, 136, 28 176 | .InitExitSnd SoundFX("fx_kicker", DOFContactors), SoundFX("fx_kicker", DOFContactors) 177 | .KickForceVar = 3 178 | .KickAngleVar = 1 179 | End With 180 | 181 | ' Drop targets 182 | set dtDrop = new cvpmdroptarget 183 | With dtDrop 184 | .InitDrop Array(sw31, sw32, sw35, sw36, sw4, sw10, sw17), Array(31, 32, 35, 36, 4, 10, 17) 185 | .initsnd "", SoundFX("fx_resetdrop", DOFContactors) 186 | '.CreateEvents "dtDrop" 'done manually in the script because of the 3d mesh droptargets animation. 187 | End With 188 | 189 | ' Main Timer init 190 | PinMAMETimer.Interval = PinMAMEInterval 191 | PinMAMETimer.Enabled = 1 192 | 193 | ' Map lights into array 194 | vpmMapLights aLights 195 | 196 | ' Remove the cabinet rails if in FS mode 197 | If Table1.ShowDT = False then 198 | lrail.Visible = False 199 | rrail.Visible = False 200 | End If 201 | End Sub 202 | 203 | Sub table1_KeyDown(ByVal Keycode) 204 | If keycode = LeftTiltKey Then Nudge 90, 5:PlaySound SoundFX("fx_nudge", 0), 0, 1, -0.1, 0.25 205 | If keycode = RightTiltKey Then Nudge 270, 5:PlaySound SoundFX("fx_nudge", 0), 0, 1, 0.1, 0.25 206 | If keycode = CenterTiltKey Then Nudge 0, 6:PlaySound SoundFX("fx_nudge", 0), 0, 1, 0, 0.25 207 | If keycode = PlungerKey Then PlaySoundAtVol "fx_PlungerPull",Plunger,1:Plunger.Pullback 208 | If vpmKeyDown(keycode) Then Exit Sub 209 | End Sub 210 | 211 | Sub table1_KeyUp(ByVal Keycode) 212 | If keycode = PlungerKey Then PlaySoundAtVol "fx_plunger",Plunger,1:Plunger.Fire 213 | If vpmKeyUp(keycode) Then Exit Sub 214 | End Sub 215 | 216 | ' Slings 217 | Dim LStep, RStep 218 | 219 | Sub LeftSlingShot_Slingshot 220 | PlaySoundAtVol SoundFX("fx_slingshot", DOFContactors), Lemk, 1 221 | LeftSling4.Visible = 1 222 | Lemk.RotX = 26 223 | LStep = 0 224 | vpmTimer.PulseSw 15 225 | LeftSlingShot.TimerEnabled = 1 226 | End Sub 227 | 228 | Sub LeftSlingShot_Timer 229 | Select Case LStep 230 | Case 1:LeftSLing4.Visible = 0:LeftSLing3.Visible = 1:Lemk.RotX = 14 231 | Case 2:LeftSLing3.Visible = 0:LeftSLing2.Visible = 1:Lemk.RotX = 2 232 | Case 3:LeftSLing2.Visible = 0:Lemk.RotX = -10:LeftSlingShot.TimerEnabled = 0 233 | End Select 234 | 235 | LStep = LStep + 1 236 | End Sub 237 | 238 | Sub RightSlingShot_Slingshot 239 | PlaySoundAtVol SoundFX("fx_slingshot", DOFContactors), Remk, 1 240 | RightSling4.Visible = 1 241 | Remk.RotX = 26 242 | RStep = 0 243 | vpmTimer.PulseSw 34 244 | RightSlingShot.TimerEnabled = 1 245 | End Sub 246 | 247 | Sub RightSlingShot_Timer 248 | Select Case RStep 249 | Case 1:RightSLing4.Visible = 0:RightSLing3.Visible = 1:Remk.RotX = 14 250 | Case 2:RightSLing3.Visible = 0:RightSLing2.Visible = 1:Remk.RotX = 2 251 | Case 3:RightSLing2.Visible = 0:Remk.RotX = -10:RightSlingShot.TimerEnabled = 0 252 | End Select 253 | 254 | RStep = RStep + 1 255 | End Sub 256 | 257 | 'Switches, targets, triggers 258 | 259 | Sub Drain_Hit:PlaysoundAtVol "fx_drain", drain, 1:bsTrough.AddBall Me:End Sub 260 | Sub RubberBand5_Hit:vpmTimer.PulseSw 9:End Sub 261 | Sub RubberBand6_Hit:vpmTimer.PulseSw 9:End Sub 262 | Sub RubberBand7_Hit:vpmTimer.PulseSw 9:End Sub 263 | Sub RubberBand8_Hit:vpmTimer.PulseSw 9:End Sub 264 | Sub RubberBand9_Hit:vpmTimer.PulseSw 9:End Sub 265 | Sub RubberBand10_Hit:vpmTimer.PulseSw 9:End Sub 266 | Sub RubberBand14_Hit:vpmTimer.PulseSw 9:End Sub 267 | Sub sw12_Hit:Controller.Switch(12) = 1:End Sub 268 | Sub sw12_unHit:Controller.Switch(12) = 0:End Sub 269 | Sub sw13_Hit:Controller.Switch(13) = 1:End Sub 270 | Sub sw13_unHit:Controller.Switch(13) = 0:End Sub 271 | Sub sw14_Hit:Controller.Switch(14) = 1:End Sub 272 | Sub sw14_unHit:Controller.Switch(14) = 0:End Sub 273 | Sub sw16_Hit:Controller.Switch(16) = 1:DOF 102, DOFOn:End Sub 274 | Sub sw16_unHit:Controller.Switch(16) = 0:DOF 102, DOFOff:End Sub 275 | Sub sw16a_Hit:Controller.Switch(16) = 1:DOF 101, DOFOn:End Sub 276 | Sub sw16a_unHit:Controller.Switch(16) = 0:DOF 101, DOFOff:End Sub 277 | Sub sw18_Hit:Controller.Switch(18) = 1:End Sub 278 | Sub sw18_unHit:Controller.Switch(18) = 0:End Sub 279 | Sub Target1_Hit:vpmTimer.PulseSw(19):PlaySoundAtVol SoundFX("fx_target", DOFContactors),ActiveBall,VolTarg:End Sub 280 | Sub Target2_Hit:vpmTimer.PulseSw(20):PlaySoundAtVol SoundFX("fx_target", DOFContactors),ActiveBall,VolTarg:End Sub 281 | Sub Bumper1_Hit:vpmTimer.PulseSw(21):PlaySoundAtVol SoundFX("fx_bumper", DOFContactors),Bumper1,VolBump:End Sub 282 | Sub Bumper2_Hit:vpmTimer.PulseSw(22):PlaySoundAtVol SoundFX("fx_bumper", DOFContactors),Bumper2,VolBump:End Sub 283 | Sub Spinner1_Spin:vpmTimer.PulseSw(23):End Sub 284 | Sub sw24_Hit:PlaySoundAtVol "fx_kicker_enter",sw24,VolKick:bsSaucer.AddBall 0:End Sub 285 | Sub sw25_Hit:Controller.Switch(25) = 1:End Sub 286 | Sub sw25_unHit:Controller.Switch(25) = 0:End Sub 287 | Sub sw27_Hit:Controller.Switch(27) = 1:End Sub 288 | Sub sw27_unHit:Controller.Switch(27) = 0:End Sub 289 | Sub sw28_Hit:Controller.Switch(28) = 1:End Sub 290 | Sub sw28_unHit:Controller.Switch(28) = 0:End Sub 291 | Sub sw29_Hit:Controller.Switch(29) = 1:End Sub 292 | Sub sw29_unHit:Controller.Switch(29) = 0:End Sub 293 | Sub sw30_Hit:Controller.Switch(30) = 1:End Sub 294 | Sub sw30_unHit:Controller.Switch(30) = 0:End Sub 295 | Sub Bumper3_Hit:vpmTimer.PulseSw(33):PlaySoundAtVol SoundFX("fx_bumper", DOFContactors),Bumper3,VolBump:End Sub 296 | Sub sw37_Hit:Controller.Switch(37) = 1:End Sub 297 | Sub sw37_unHit:Controller.Switch(37) = 0:End Sub 298 | Sub sw38_Hit:Controller.Switch(38) = 1:End Sub 299 | Sub sw38_unHit:Controller.Switch(38) = 0:End Sub 300 | Sub sw39_Hit:Controller.Switch(39) = 1:End Sub 301 | Sub sw39_unHit:Controller.Switch(39) = 0:End Sub 302 | Sub sw40_Hit:Controller.Switch(40) = 1:End Sub 303 | Sub sw40_unHit:Controller.Switch(40) = 0:End Sub 304 | 305 | 'droptargets 306 | Sub sw31_Dropped():dtDrop.Hit 1:End Sub 307 | Sub sw32_Dropped():dtDrop.Hit 2:End Sub 308 | Sub sw35_Dropped():dtDrop.Hit 3:End Sub 309 | Sub sw36_Dropped():dtDrop.Hit 4:End Sub 310 | Sub sw4_Dropped():dtDrop.Hit 5:End Sub 311 | Sub sw10_Dropped():dtDrop.Hit 6:End Sub 312 | Sub sw17_Dropped():dtDrop.Hit 7:End Sub 313 | 314 | Sub Table1_Paused:Controller.Pause = True:End Sub 315 | Sub Table1_UnPaused:Controller.Pause = False:End Sub 316 | Sub Table1_Exit:Controller.Stop:End Sub 317 | 318 | '****************** 319 | ' RealTime Updates 320 | '****************** 321 | 322 | Set MotorCallback = GetRef("RealTimeUpdates") 323 | 324 | Sub RealTimeUpdates 325 | RollingUpdate 326 | 'GIUpdate 327 | End Sub 328 | 329 | 'General Illumination 330 | 331 | Set LampCallback = GetRef("GIUpdate") 332 | 333 | Sub GiON 334 | Dim x 335 | For each x in aGiLights 336 | x.State = 1 337 | Next 338 | l53b.State = 2 339 | End Sub 340 | 341 | Sub GiOFF 342 | Dim x 343 | For each x in aGiLights 344 | x.State = 0 345 | Next 346 | l53b.State = 0 347 | End Sub 348 | 349 | Dim OldGiState 350 | OldGiState = 0 'start witht he Gi off 351 | 352 | Sub GIUpdate 353 | If Controller.Lamp(53) <> OldGiState Then 354 | OldGiState = Controller.Lamp(53) 355 | If Controller.Lamp(53) = 0 Then 356 | GiOff 357 | Else 358 | GiOn 359 | End If 360 | End If 361 | End Sub 362 | 363 | '****************************** 364 | ' Diverse Collection Hit Sounds 365 | '****************************** 366 | 367 | Sub aMetals_Hit(idx):PlaySound "fx_metalhit", 0, Vol(ActiveBall)*VolMetal, pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub 368 | Sub aRubber_Bands_Hit(idx):PlaySound "fx_rubber_band", 0, Vol(ActiveBall)*VolRB, pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub 369 | Sub aRubber_Posts_Hit(idx):PlaySound "fx_rubber", 0, Vol(ActiveBall)*VolPo, pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub 370 | Sub aRubber_Pins_Hit(idx):PlaySound "fx_postrubber", 0, Vol(ActiveBall)*VolPi, pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub 371 | Sub aPlastics_Hit(idx):PlaySound "fx_PlasticHit", 0, Vol(ActiveBall)*VolPlast, pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub 372 | Sub aGates_Hit(idx):PlaySound "fx_Gate", 0, Vol(ActiveBall)*VolGates, pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub 373 | Sub aWoods_Hit(idx):PlaySound "fx_Woodhit", 0, Vol(ActiveBall)*VolWood, pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub 374 | Sub adroptargets_Hit(idx):PlaySound SoundFX("fx_droptarget", DOFContactors), 0, VolTarg, pan(ActiveBall), 0.15, AudioFade(ActiveBall):End Sub 375 | Sub alanes_Hit(idx):PlaySound SoundFX("fx_sensor", DOFContactors), 0, 1, pan(ActiveBall), 0.15, AudioFade(ActiveBall):End Sub 376 | 377 | 'Gameplan 378 | 'added by Inkochnito 379 | Sub editDips 380 | Dim vpmDips:Set vpmDips=New cvpmDips 381 | With vpmDips 382 | .AddForm 700,400,"Gameplan - DIP switches" 383 | .AddFrame 2,5,190,"Maximum credits",&H07000000,Array("5 credits",0,"10 credits",&H01000000,"15 credits",&H02000000,"20 credits",&H03000000,"25 credits",&H04000000,"30 credits",&H05000000,"35 credits",&H06000000,"40 credits",&H07000000)'dip 25&26&27 384 | .AddFrame 210,97,190,"High game to date award",&HC0000000,Array("no award",0,"1 credit",&H40000000,"2 credits",&H80000000,"3 credits",&HC0000000)'dip 31&32 385 | .AddFrame 210,5,190,"Special award",&H10000000,Array("extra ball",0,"replay",&H10000000)'dip 29 386 | .AddFrame 210,51,190,"Balls per game",&H08000000,Array("3 balls",0,"5 balls",&H08000000)'dip 28 387 | .AddChk 2,140,150,Array("Play tunes",32768)'dip 16 388 | .AddChk 2,155,150,Array("Match feature",&H20000000)'dip 30 389 | .AddChk 2,170,150,Array("Free play",&H00000080)'dip 8 390 | .AddLabel 30,200,300,20,"After hitting OK, press F3 to reset game with new settings." 391 | .ViewDips 392 | End With 393 | End Sub 394 | Set vpmShowDips=GetRef("editDips") 395 | 396 | ' ******************************************************************************************************* 397 | ' Positional Sound Playback Functions by DJRobX 398 | ' PlaySound sound, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 1, AudioFade(ActiveBall) 399 | ' ******************************************************************************************************* 400 | 401 | ' Play a sound, depending on the X,Y position of the table element (especially cool for surround speaker setups, otherwise stereo panning only) 402 | ' parameters (defaults): loopcount (1), volume (1), randompitch (0), pitch (0), useexisting (0), restart (1)) 403 | ' Note that this will not work (currently) for walls/slingshots as these do not feature a simple, single X,Y position 404 | 405 | Sub PlayXYSound(soundname, tableobj, loopcount, volume, randompitch, pitch, useexisting, restart) 406 | PlaySound soundname, loopcount, volume, AudioPan(tableobj), randompitch, pitch, useexisting, restart, AudioFade(tableobj) 407 | End Sub 408 | 409 | ' Set position as table object (Use object or light but NOT wall) and Vol to 1 410 | 411 | Sub PlaySoundAt(soundname, tableobj) 412 | PlaySound soundname, 1, 1, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj) 413 | End Sub 414 | 415 | 'Set all as per ball position & speed. 416 | 417 | Sub PlaySoundAtBall(soundname) 418 | PlaySoundAt soundname, ActiveBall 419 | End Sub 420 | 421 | 'Set position as table object and Vol manually. 422 | 423 | Sub PlaySoundAtVol(sound, tableobj, Volum) 424 | PlaySound sound, 1, Volum, Pan(tableobj), 0,0,0, 1, AudioFade(tableobj) 425 | End Sub 426 | 427 | 'Set all as per ball position & speed, but Vol Multiplier may be used eg; PlaySoundAtBallVol "sound",3 428 | 429 | Sub PlaySoundAtBallVol(sound, VolMult) 430 | PlaySound sound, 0, Vol(ActiveBall) * VolMult, Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 1, AudioFade(ActiveBall) 431 | End Sub 432 | 433 | 'Set position as bumperX and Vol manually. 434 | 435 | Sub PlaySoundAtBumperVol(sound, tableobj, Vol) 436 | PlaySound sound, 1, Vol, Pan(tableobj), 0,0,1, 1, AudioFade(tableobj) 437 | End Sub 438 | 439 | '********************************************************************* 440 | ' Supporting Ball & Sound Functions 441 | '********************************************************************* 442 | 443 | Function AudioFade(tableobj) ' Fades between front and back of the table (for surround systems or 2x2 speakers, etc), depending on the Y position on the table. "table1" is the name of the table 444 | Dim tmp 445 | tmp = tableobj.y * 2 / table1.height-1 446 | If tmp > 0 Then 447 | AudioFade = Csng(tmp ^10) 448 | Else 449 | AudioFade = Csng(-((- tmp) ^10) ) 450 | End If 451 | End Function 452 | 453 | Function AudioPan(tableobj) ' Calculates the pan for a tableobj based on the X position on the table. "table1" is the name of the table 454 | Dim tmp 455 | tmp = tableobj.x * 2 / table1.width-1 456 | If tmp > 0 Then 457 | AudioPan = Csng(tmp ^10) 458 | Else 459 | AudioPan = Csng(-((- tmp) ^10) ) 460 | End If 461 | End Function 462 | 463 | Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table 464 | Dim tmp 465 | tmp = ball.x * 2 / table1.width-1 466 | If tmp > 0 Then 467 | Pan = Csng(tmp ^10) 468 | Else 469 | Pan = Csng(-((- tmp) ^10) ) 470 | End If 471 | End Function 472 | 473 | Function AudioFade(ball) ' Can this be together with the above function ? 474 | Dim tmp 475 | tmp = ball.y * 2 / Table1.height-1 476 | If tmp > 0 Then 477 | AudioFade = Csng(tmp ^10) 478 | Else 479 | AudioFade = Csng(-((- tmp) ^10) ) 480 | End If 481 | End Function 482 | 483 | Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed 484 | Vol = Csng(BallVel(ball) ^2 / VolDiv) 485 | End Function 486 | 487 | Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed 488 | Pitch = BallVel(ball) * 20 489 | End Function 490 | 491 | Function BallVel(ball) 'Calculates the ball speed 492 | BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) ) 493 | End Function 494 | 495 | '***************************************** 496 | ' JP's VP10 Rolling Sounds 497 | '***************************************** 498 | 499 | Const tnob = 1 ' total number of balls in this table is 4, but always use a higher number here because of the timing 500 | ReDim rolling(tnob) 501 | InitRolling 502 | 503 | Sub InitRolling 504 | Dim i 505 | For i = 0 to tnob 506 | rolling(i) = False 507 | Next 508 | End Sub 509 | 510 | Sub RollingUpdate() 511 | Dim BOT, b 512 | BOT = GetBalls 513 | 514 | ' stop the sound of deleted balls 515 | For b = UBound(BOT) + 1 to tnob 516 | rolling(b) = False 517 | StopSound("fx_ballrolling" & b) 518 | Next 519 | 520 | ' exit the sub if no balls on the table 521 | If UBound(BOT) = -1 Then Exit Sub 522 | 523 | ' play the rolling sound for each ball 524 | 525 | For b = 0 to UBound(BOT) 526 | If BallVel(BOT(b) ) > 1 Then 527 | rolling(b) = True 528 | if BOT(b).z < 30 Then ' Ball on playfield 529 | PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0, AudioFade(BOT(b) ) 530 | Else ' Ball on raised ramp 531 | PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) )*.5, Pan(BOT(b) ), 0, Pitch(BOT(b) )+50000, 1, 0, AudioFade(BOT(b) ) 532 | End If 533 | Else 534 | If rolling(b) = True Then 535 | StopSound("fx_ballrolling" & b) 536 | rolling(b) = False 537 | End If 538 | End If 539 | Next 540 | End Sub 541 | 542 | '********************** 543 | ' Ball Collision Sound 544 | '********************** 545 | 546 | Sub OnBallBallCollision(ball1, ball2, velocity) 547 | PlaySound("fx_collide"), 0, Csng(velocity) ^2 / (VolDiv/VolCol), Pan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1) 548 | End Sub 549 | 550 | ' Thalamus : Exit in a clean and proper way 551 | Sub Table1_exit() 552 | Controller.Pause = False 553 | Controller.Stop 554 | End Sub 555 | 556 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

This repo contains script files of visual pinball tables.

2 | 3 | I love SSF tables so much that I could not stand playing older tables 4 | that didn't have updated 7.1 code in them. What I've done is to find 5 | what I consider the most essential code that is common for most tables 6 | and updated it so that the table itself is ready for improvements. 7 | 8 | While I was on this task - forum user 'WOB' made a spreasheet of what 9 | tables is expected to work with the so called FastFlips. With his 10 | help I hope that all the tables listed here will work. You could, if 11 | you for some odd reason DON'T want to update the whole script just 12 | copy part of the code to add FastFlips. 13 | 14 | Without the awesome work of DjRobX, nFozzy, Toxie and Fuzzel we would 15 | still have flippers that varies between 0-20ms response time. 16 | The community can't thank you enough guys ! 17 | 18 | **NOTE**: 19 | 20 | Not including most of Loserman's tables. I saw that he planned changes 21 | to them. I hope they include updated routines. So, for the moment 22 | those are kept _out_ of this repository. 23 | 24 | _So. On to it - how do I use it ?_ 25 | 26 | If you have a table with the exact name as the script. I'm hopeful 27 | that you will be able to open up the script inside the table and delete 28 | everything, replacing it by the code provided. To be on the safe side 29 | you might want to save it right away with a different name or you can 30 | also just press play and only save __IF__ you find that the code is 31 | working for you. 32 | 33 | I've tried to use the latest available version of each table, but, 34 | there is no guarantee. 35 | 36 | Adding script from here will in some cases not only give you a upgrade, 37 | it should actually fix some issues as well. There are a few tables that 38 | hasn't been updated with the fixes provided by the community and I hope 39 | that they are included here. If not, why don't we fix them ? 40 | 41 | If you want to contribute, then this article might help you if you 42 | haven't used git before 43 | 44 | [The beginners guide to contributing to a GitHub project](https://akrabat.com/the-beginners-guide-to-contributing-to-a-github-project/) 45 | 46 | Trust me, it looks harder than it is. 47 | 48 | If you contribute. Thank you very much. But, please test your changes 49 | as best you can. We all makes mistakes, and no one is perfect. 50 | 51 | _Comments_ 52 | 53 | You will in many cases find comments like where it says that the table 54 | is made by JPSalas and that you need to be careful. Some of these tables 55 | __are__ made by him. This might not always be true though. I started with 56 | a template and kept that to remind myself that I should take extra care 57 | when sounds are a walls in combination with PlaySoundAt. 58 | 59 | Don't be scared to update the tekst if it makes sense and a short info 60 | to what you changed if it makes sense. 61 | 62 | _Future feature ?_ 63 | 64 | There has been talks about supporting "side-car" table support. 65 | If VP gets this feature you should be able to just download the whole 66 | archive as a zip and extract it into your tables folder as long as 67 | the table script has the exact same name. Just like db2s backglasses. 68 | 69 | __But for now that is not an option unfortunately.__ 70 | 71 | __UPDATE__ 72 | 73 | Thanks to DjRobX, this feature is available from 10.6 onward. 74 | -------------------------------------------------------------------------------- /Star Gazer(Stern 1980) v1.2.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sverrewl/vpxtable_scripts/235e65e3e425020846ebca556edd82575716a6ed/Star Gazer(Stern 1980) v1.2.vbs -------------------------------------------------------------------------------- /Star Gazer(Stern 1980)Siggis Mod 1.0.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sverrewl/vpxtable_scripts/235e65e3e425020846ebca556edd82575716a6ed/Star Gazer(Stern 1980)Siggis Mod 1.0.vbs -------------------------------------------------------------------------------- /The Six Million Dollar Man (Bally 1978) v1.0.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sverrewl/vpxtable_scripts/235e65e3e425020846ebca556edd82575716a6ed/The Six Million Dollar Man (Bally 1978) v1.0.vbs -------------------------------------------------------------------------------- /Theatre of magic VPX NZ-TT 1.0.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sverrewl/vpxtable_scripts/235e65e3e425020846ebca556edd82575716a6ed/Theatre of magic VPX NZ-TT 1.0.vbs -------------------------------------------------------------------------------- /cactuscanyoncontinued_PROC/cc_machine.yaml: -------------------------------------------------------------------------------- 1 | ## ____ _ ____ 2 | ## / ___|__ _ ___| |_ _ _ ___ / ___|__ _ _ __ _ _ ___ _ __ 3 | ## | | / _` |/ __| __| | | / __| | | / _` | '_ \| | | |/ _ \| '_ \ 4 | ## | |__| (_| | (__| |_| |_| \__ \ | |__| (_| | | | | |_| | (_) | | | | 5 | ## \____\__,_|\___|\__|\__,_|___/ \____\__,_|_| |_|\__, |\___/|_| |_| 6 | ## |___/ 7 | ## ___ ___ _ _ _____ ___ _ _ _ _ ___ ___ 8 | ## / __/ _ \| \| |_ _|_ _| \| | | | | __| \ 9 | ## | (_| (_) | .` | | | | || .` | |_| | _|| |) | 10 | ## \___\___/|_|\_| |_| |___|_|\_|\___/|___|___/ 11 | ## 12 | ## A P-ROC Project by Eric Priepke, Copyright 2012 13 | ## Built on the PyProcGame Framework from Adam Preble and Gerry Stellenberg 14 | ## Original Cactus Canyon software by Matt Coriale 15 | ## 16 | 17 | # P-ROC Game Description file for Bally Cactus Canyon 18 | PRGame: 19 | machineType: wpc95 20 | numBalls: 4 21 | PRFlippers: 22 | - flipperLwR 23 | - flipperLwL 24 | PRBumpers: 25 | - leftSlingshot 26 | - rightSlingshot 27 | - leftJetBumper 28 | - rightJetBumper 29 | - bottomJetBumper 30 | PRSwitches: 31 | # **** Format **** 32 | # name: 33 | # number: 34 | # type: 35 | # 36 | # can be: SFx (Flipper switch, labeled Fx in WPC manual 37 | # SDx (Dedicated switch, labeled SDx in WPC manual 38 | # Sx (Matrix switch, labeled x in WPC manual 39 | # can be: 'NO' (normally open. This is the default; so no need to use this) 40 | # 'NC' (normally closed. Common for optos) 41 | 42 | #Flipper Grounded Swithes 43 | ## EOS switches? 44 | flipperLwR: 45 | number: SF2 46 | label: Right Flipper 47 | tags: Grounded,0,2 48 | flipperLwL: 49 | number: SF4 50 | label: Left Flipper 51 | tags: Grounded,0,4 52 | 53 | #Dedicated Grounded Swtches 54 | leftCoin: 55 | number: SD1 56 | label: Left Coin Chute 57 | tags: Dedicated,0,1 58 | centerCoin: 59 | number: SD2 60 | label: Center Coin Chute 61 | tags: Dedicated,0,2 62 | rightCoin: 63 | number: SD3 64 | label: Right Coin Chute 65 | tags: Dedicated,0,3 66 | fourthCoin: 67 | number: SD4 68 | label: 4th Coin Chute 69 | tags: Dedicated,0,4 70 | exit: 71 | number: SD5 72 | label: Exit 73 | tags: Dedicated,0,5 74 | down: 75 | number: SD6 76 | label: Down 77 | tags: Dedicated,0,6 78 | up: 79 | number: SD7 80 | label: Up 81 | tags: Dedicated,0,7 82 | enter: 83 | number: SD8 84 | label: Enter 85 | tags: Dedicated,0,8 86 | 87 | #Regular Switches 88 | phantomSwitch2: 89 | number: S11 90 | label: False Switch 2 91 | tags: Standard,1,1 92 | phantomSwitch3: 93 | number: S12 94 | label: False Switch 3 95 | tags: Standard,1,2 96 | startButton: 97 | number: S13 98 | label: Start Button 99 | tags: Standard,1,3 100 | plumbBobTilt: 101 | number: S14 102 | label: Tilt Plumb Bob 103 | tags: Standard,1,4 104 | mineEntrance: 105 | number: S15 106 | label: Mine Entrance 107 | tags: Standard,1,5 108 | leftOutlane: 109 | number: S16 110 | label: Left Outlane 111 | tags: Standard,1,6 112 | rightReturnLane: 113 | number: S17 114 | label: Right Return Lane 115 | tags: Standard,1,7 116 | shooterLane: 117 | number: S18 118 | label: Shooter Lane 119 | tags: Standard,1,8 120 | tilt: 121 | number: S21 122 | label: Tilt Plumb 123 | tags: Standard,2,1 124 | coinDoorClosed: 125 | number: S22 126 | label: Coin Door Closed 127 | tags: Standard,2,2 128 | alwaysClosed: 129 | number: S24 130 | label: Always Closed 131 | tags: Standard,2,4 132 | leftReturnLane: 133 | number: S26 134 | label: Left Return Lane 135 | tags: Standard,2,6 136 | rightOutlane: 137 | number: S27 138 | label: Right Outlane 139 | tags: Standard,2,7 140 | bottomRightStandUp: 141 | number: S28 142 | label: Bot. Right QD Target 143 | tags: Standard,2,8 144 | troughEject: 145 | number: S31 146 | label: Trough Eject Sensor 147 | tags: Standard,3,1 148 | type: 'NC' 149 | troughBallOne: 150 | number: S32 151 | label: Trough Ball 1 152 | tags: Standard,3,2 153 | type: 'NC' 154 | troughBallTwo: 155 | number: S33 156 | label: Trough Ball 2 157 | tags: Standard,3,3 158 | type: 'NC' 159 | troughBallThree: 160 | number: S34 161 | label: Trough Ball 3 162 | tags: Standard,3,4 163 | type: 'NC' 164 | troughBallFour: 165 | number: S35 166 | label: Trough Ball 4 167 | tags: Standard,3,5 168 | type: 'NC' 169 | leftLoopBottom: 170 | number: S36 171 | label: Left Loop Bottom 172 | tags: Standard,3,6 173 | type: 'NC' 174 | rightLoopBottom: 175 | number: S37 176 | label: Right Loop Bottom 177 | tags: Standard,3,7 178 | type: 'NC' 179 | minePopper: 180 | number: S41 181 | label: Mine Popper 182 | tags: Standard,4,1 183 | type: 'NC' 184 | saloonPopper: 185 | number: S42 186 | label: Saloon Popper 187 | tags: Standard,4,2 188 | type: 'NC' 189 | phantomSwitch: 190 | number: S43 191 | label: False Switch 1 192 | tags: Standard,4,3 193 | topRightStandUp: 194 | number: S44 195 | label: Top Right QD Target 196 | tags: Standard,4,4 197 | phantomSwitch4: 198 | number: S45 199 | label: False Switch 4 200 | tags: Standard,4,5 201 | beerMug: 202 | number: S46 203 | label: Beer Mug 204 | tags: Standard,4,6 205 | leftBonusLane: 206 | number: S47 207 | label: Left Bonus Lane 208 | tags: Standard,4,7 209 | jetBumpersExit: 210 | number: S48 211 | label: Jet Bumpers Exit 212 | tags: Standard,4,8 213 | leftSlingshot: 214 | number: S51 215 | label: Left Slingshot 216 | tags: Standard,5,1 217 | rightSlingshot: 218 | number: S52 219 | label: Right Slingshot 220 | tags: Standard,5,2 221 | leftJetBumper: 222 | number: S53 223 | label: Left Jet Bumper 224 | tags: Standard,5,3 225 | rightJetBumper: 226 | number: S54 227 | label: Right Jet Bumper 228 | tags: Standard,5,4 229 | bottomJetBumper: 230 | number: S55 231 | label: Bottom Jet Bumper 232 | tags: Standard,5,5 233 | rightLoopTop: 234 | number: S56 235 | label: Right Loop Top 236 | tags: Standard,5,6 237 | rightBonusLane: 238 | number: S57 239 | label: Right Bonus Lane 240 | tags: Standard,5,7 241 | leftLoopTop: 242 | number: S58 243 | label: Left Loop Top 244 | tags: Standard,5,8 245 | badGuySW0: 246 | number: S61 247 | label: Left Drop Target 248 | tags: Standard,6,1 249 | badGuySW1: 250 | number: S62 251 | label: Left CTR Drop Target 252 | tags: Standard,6,2 253 | badGuySW2: 254 | number: S63 255 | label: Right CTR Drop Target 256 | tags: Standard,6,3 257 | badGuySW3: 258 | number: S64 259 | label: Right Drop Target 260 | tags: Standard,6,4 261 | rightRampMake: 262 | number: S65 263 | label: Right Ramp Make 264 | tags: Standard,6,5 265 | rightRampEnter: 266 | number: S66 267 | label: Right Ramp Enter 268 | tags: Standard,6,6 269 | skillBowl: 270 | number: S67 271 | label: Skill Bowl 272 | tags: Standard,6,7 273 | rightRampBottom: 274 | number: S68 275 | label: Right Ramp Bottom 276 | tags: Standard,6,8 277 | trainEncoder: 278 | number: S71 279 | label: Train Encoder 280 | tags: Standard,7,1 281 | trainHome: 282 | number: S72 283 | label: Train Home 284 | tags: Standard,7,2 285 | saloonGate: 286 | number: S73 287 | label: Saloon Gate 288 | tags: Standard,7,3 289 | saloonBart: 290 | number: S75 291 | label: Bart Brother Toy 292 | tags: Standard,7,5 293 | mineHome: 294 | number: S77 295 | label: Mine Home 296 | tags: Standard,7,7 297 | type: 'NC' 298 | mineEncoder: 299 | number: S78 300 | label: Mine Encoder 301 | tags: Standard,7,8 302 | type: 'NC' 303 | centerRampEnter: 304 | number: S82 305 | label: Center Ramp Enter 306 | tags: Standard,8,2 307 | leftRampMake: 308 | number: S83 309 | label: Left Ramp Make 310 | tags: Standard,8,3 311 | centerRampMake: 312 | number: S84 313 | label: Center Ramp Make 314 | tags: Standard,8,4 315 | leftRampEnter: 316 | number: S85 317 | label: Left Ramp Enter 318 | tags: Standard,8,5 319 | topLeftStandUp: 320 | number: S86 321 | label: Top Left QD Target 322 | tags: Standard,8,6 323 | bottomLeftStandUp: 324 | number: S87 325 | label: Bot. Left QD Target 326 | tags: Standard,8,7 327 | 328 | PRCoils: 329 | flipperLwRMain: 330 | number: FLRM 331 | flipperLwRHold: 332 | number: FLRH 333 | flipperLwLMain: 334 | number: FLLM 335 | flipperLwLHold: 336 | number: FLLH 337 | moveBart: 338 | number: FURM 339 | label: Bart Toy - Move 340 | tags: Solenoid 341 | moveBartHat: 342 | number: FULH 343 | label: Bart Toy - Hat 344 | tags: Solenoid 345 | shakerMotor: 346 | number: FURH 347 | lable: Shaker Motor 348 | tags: Mech 349 | autoPlunger: 350 | number: C01 351 | label: Auto-Plunger 352 | tags: Solenoid 353 | badGuyC0: 354 | number: C02 355 | label: Left Drop Target 356 | tags: Mech 357 | badGuyC1: 358 | number: C03 359 | label: Left CTR Drop Target 360 | tags: Mech 361 | badGuyC2: 362 | number: C04 363 | label: Right CTR Drop Target 364 | tags: Mech 365 | badGuyC3: 366 | number: C05 367 | label: Right Drop Target 368 | tags: Mech 369 | minePopper: 370 | number: C06 371 | label: Mine Popper 372 | tags: Solenoid 373 | knocker: 374 | number: C07 375 | label: Backbox Knocker 376 | tags: Solenoid 377 | saloonPopper: 378 | number: C08 379 | label: Saloon Popper 380 | tags: Solenoid 381 | troughEject: 382 | number: C09 383 | label: Trough Eject 384 | tags: Solenoid 385 | leftSlingshot: 386 | number: C10 387 | label: Left Slingshot 388 | tags: Solenoid 389 | rightSlingshot: 390 | number: C11 391 | label: Right Slingshot 392 | tags: Solenoid 393 | leftJetBumper: 394 | number: C12 395 | label: Left Jet Bumper 396 | tags: Solenoid 397 | rightJetBumper: 398 | number: C13 399 | label: Right Jet Bumper 400 | tags: Solenoid 401 | leftGunFightPost: 402 | number: C14 403 | label: Left Gunfight Post 404 | tags: Solenoid 405 | rightGunFightPost: 406 | number: C15 407 | label: Right GUnfight Post 408 | tags: Solenoid 409 | bottomJetBumper: 410 | number: C16 411 | label: Bottom Jet Bumper 412 | tags: Solenoid 413 | mineMotor: 414 | number: C17 415 | label: Mine Motor 416 | tags: Mech 417 | mineFlasher: 418 | number: C18 419 | label: Mine 420 | tags: Flasher 421 | leftGunFlasher: 422 | number: C19 423 | label: Left Pistol 424 | tags: Flasher 425 | rightGunFlasher: 426 | number: C20 427 | label: Right Pistol 428 | tags: Flasher 429 | leftLoopGate: 430 | number: C21 431 | label: Left Loop Gate 432 | tags: Solenoid 433 | rightLoopGate: 434 | number: C22 435 | label: Right Loop Gate 436 | tags: Solenoid 437 | beaconFlasher: 438 | number: C24 439 | label: Awards Beacon 440 | tags: Flasher 441 | middleRightFlasher: 442 | number: C25 443 | label: Right Middle - Red 444 | tags: Flasher 445 | saloonFlasher: 446 | number: C26 447 | label: Saloon 448 | tags: Flasher 449 | backRightFlasher: 450 | number: C27 451 | label: Back Right - Red 452 | tags: Flasher 453 | backLeftFlasher: 454 | number: C28 455 | label: Back Left - Red 456 | tags: Flasher 457 | solGameOn: 458 | number: C39 459 | label: GameOn 460 | tags: Solenoid 461 | trainReverse: 462 | number: C37 463 | label: Train Motor - Reverse 464 | tags: Mech 465 | trainForward: 466 | number: C38 467 | label: Train Motor - Forward 468 | tags: Mech 469 | 470 | PRLamps: 471 | rankStranger: 472 | number: L11 473 | label: Rank Lamp - Stranger 474 | tags: Playfield,Main 475 | rankPartner: 476 | number: L12 477 | label: Rank Lamp - Partner 478 | tags: Playfield,Main 479 | rankDeputy: 480 | number: L13 481 | label: Rank Lamp - Deputy 482 | tags: Playfield,Main 483 | rankSheriff: 484 | number: L14 485 | label: Rank Lamp - Sheriff 486 | tags: Playfield,Main 487 | rankMarshall: 488 | number: L15 489 | label: Rank Lamp - Marshall 490 | tags: Playfield,Main 491 | starMotherlode: 492 | number: L16 493 | label: Badge Point - Motherlode 494 | tags: Playfield,Badge 495 | leftBonusLane: 496 | number: L17 497 | label: Left Bonus Lane 498 | tags: Playfield 499 | rightBonusLane: 500 | number: L18 501 | label: Right Bonus Lane 502 | tags: Playfield 503 | bountyBeacon: 504 | number: L21 505 | label: Beacon - Bounty 506 | tags: Playfield,Main 507 | jackpotBeacon: 508 | number: L22 509 | label: Beacon - Jackpot 510 | tags: Playfield,Main 511 | shootToCollect: 512 | number: L23 513 | label: Beacon - Shoot to Collect 514 | tags: Playfield,Main 515 | extraBallLitBeacon: 516 | number: L24 517 | label: Beacon - Extra Ball 518 | tags: Playfield,Main 519 | bountySaloon: 520 | number: L25 521 | label: Saloon - Bounty 522 | tags: Playfield,Main 523 | saloonArrow: 524 | number: L26 525 | label: Saloon - Yellow Triangle 526 | tags: Playfield,Main 527 | extraBall: 528 | number: L27 529 | label: Mine - Extra Ball 530 | tags: Playfield,Main 531 | mineLock: 532 | number: L28 533 | label: Mine - Lock 534 | tags: Playfield,Main 535 | badGuyL2: 536 | number: L31 537 | label: Right Center Drop Target 538 | tags: Playfield 539 | badGuyL0: 540 | number: L32 541 | label: Left Drop Target 542 | tags: Playfield 543 | leftQuickdraw: 544 | number: L33 545 | label: Left Quickdraw 546 | tags: Playfield,Main 547 | rightRampSoundAlarm: 548 | number: L34 549 | label: Right Ramp - Sound Alarm 550 | tags: Playfield,Main,rightRamp 551 | rightRampShootOut: 552 | number: L35 553 | label: Right Ramp - Shoot-out 554 | tags: Playfield,Main,rightRamp 555 | rightRampSavePolly: 556 | number: L36 557 | label: Right Ramp - Save Polly 558 | tags: Playfield,Main,rightRamp 559 | rightRampJackpot: 560 | number: L37 561 | label: Right Ramp - Jackpot 562 | tags: Playfield,Main,rightRamp 563 | rightRampCombo: 564 | number: L38 565 | label: Right Ramp - Combo 566 | tags: Playfield,rightRamp 567 | rightLoopCombo: 568 | number: L41 569 | label: Right Loop - Combo 570 | tags: Playfield,rightLoop 571 | rightLoopJackpot: 572 | number: L42 573 | label: Right Loop - Jackpot 574 | tags: Playfield,Main,rightLoop 575 | rightLoopMarksman: 576 | number: L43 577 | label: Right Loop - Marksman 578 | tags: Playfield,Main,rightLoop 579 | rightLoopGunslinger: 580 | number: L44 581 | label: Right Loop - Gunslinger 582 | tags: Playfield,Main,rightLoop 583 | rightLoopGoodShot: 584 | number: L45 585 | label: Right Loop - Good Shot 586 | tags: Playfield,Main,rightLoop 587 | leftReturnQuickdraw: 588 | number: L46 589 | label: Left Return Lane QD 590 | tags: Playfield,Main 591 | leftGunfightPin: 592 | number: L47 593 | label: Left Gunfight 594 | tags: Playfield,Main 595 | leftOutGunfight: 596 | number: L48 597 | label: Left Outlane - Special 598 | tags: Playfield,Main 599 | badGuyL3: 600 | number: L51 601 | label: Right Drop Target 602 | tags: Playfield 603 | bottomRightQuickdraw: 604 | number: L52 605 | label: Bottom Right Quickdraw 606 | tags: Playfield,Main 607 | topRightQuickdraw: 608 | number: L53 609 | label: Top Right Quickdraw 610 | tags: Playfield,Main 611 | centerRampCatchTrain: 612 | number: L54 613 | label: Center Ramp - Catch Train 614 | tags: Playfield,Main,centerRamp 615 | centerRampStopTrain: 616 | number: L55 617 | label: Center Ramp - Stop Train 618 | tags: Playfield,Main,centerRamp 619 | centerRampSavePolly: 620 | number: L56 621 | label: Center Ramp - Save Polly 622 | tags: Playfield,Main,centerRamp 623 | centerRampJackpot: 624 | number: L57 625 | label: Center Ramp - Jackpot 626 | tags: Playfield,Main,centerRamp 627 | centerRampCombo: 628 | number: L58 629 | label: Center Ramp - Combo 630 | tags: Playfield,centerRamp 631 | leftRampWhiteWater: 632 | number: L61 633 | label: Left Ramp - Whitewater 634 | tags: Playfield,Main,leftRamp 635 | leftRampWaterfall: 636 | number: L62 637 | label: Left Ramp - Waterfall 638 | tags: Playfield,Main,leftRamp 639 | leftRampSavePolly: 640 | number: L63 641 | label: Left Ramp - Save Polly 642 | tags: Playfield,Main,leftRamp 643 | leftRampJackpot: 644 | number: L64 645 | label: Left Ramp - Jackpot 646 | tags: Playfield,Main,leftRamp 647 | leftRampCombo: 648 | number: L65 649 | label: Left Ramp - Combo 650 | tags: Playfield,leftRamp 651 | rightReturnQuickdraw: 652 | number: L66 653 | label: Right Return Lane QD 654 | tags: Playfield,Main 655 | rightOutSpecial: 656 | number: L67 657 | label: Right Outlane Special 658 | tags: Playfield,Main 659 | rightGunfightPin: 660 | number: L68 661 | label: Right Gunfight 662 | tags: Playfield,Main 663 | starStampede: 664 | number: L71 665 | label: Badge Point - Stampede 666 | tags: Playfield,Badge 667 | starCombo: 668 | number: L72 669 | label: Badge Point - Combo 670 | tags: Playfield,Badge 671 | starHighNoon: 672 | number: L73 673 | label: Badge - High Noon 674 | tags: Playfield,Badge 675 | leftLoopCombo: 676 | number: L74 677 | label: Left Loop - Combo 678 | tags: Playfield,leftLoop 679 | leftLoopJackpot: 680 | number: L75 681 | label: Left Loop - Jackpot 682 | tags: Playfield,Main,leftLoop 683 | leftLoopRideEm: 684 | number: L76 685 | label: Left Loop - Ride em 686 | tags: Playfield,Main,leftLoop 687 | leftLoopWildRide: 688 | number: L77 689 | label: Left Loop - Wild Ride 690 | tags: Playfield,Main,leftLoop 691 | leftLoopBuckNBronco: 692 | number: L78 693 | label: Left Loop - Buck N Bronco 694 | tags: Playfield,Main,leftLoop 695 | starBartBrothers: 696 | number: L81 697 | label: Badge Point - Bart Bros 698 | tags: Playfield,Badge 699 | shootAgain: 700 | number: L82 701 | label: Shoot Again 702 | tags: Playfield,Main 703 | starShowdown: 704 | number: L83 705 | label: Badge Point - Showdown 706 | tags: Playfield,Badge 707 | badGuyL1: 708 | number: L84 709 | label: Left Center Drop Target 710 | tags: Playfield 711 | beerMug: 712 | number: L85 713 | label: Beer Mug Mod 714 | tags: Playfield 715 | beerMugGI: 716 | number: L86 717 | label: Beer Mug GI 718 | jetBumpers: 719 | number: L87 720 | label: Jet Bumpers 721 | tags: Playfield 722 | startButton: 723 | number: L88 724 | label: Start Button 725 | gi01: 726 | number: G01 727 | gi02: 728 | number: G02 729 | gi03: 730 | number: G03 731 | gi04: 732 | number: G04 733 | gi05: 734 | number: G05 735 | 736 | PRBallSave: 737 | pulseCoils: [minePopper, saloonPopper, leftJetBumper, rightJetBumper, bottomJetBumper,moveBart, moveBartHat,moveBart] 738 | resetSwitches: 739 | rightOutlane: open 740 | leftOutlane: open 741 | rightReturnLane: open 742 | leftReturnLane: open 743 | rightRampEnter: open 744 | leftRampEnter: open 745 | centerRampEnter: open 746 | leftLoopBottom: open 747 | rightLoopBottom: open 748 | mineEntrance: open 749 | saloonGate: open 750 | beerMug: open 751 | leftJetBumper: open 752 | stopSwitches: 753 | shooterLane: closed 754 | minePopper: active 755 | saloonPopper: active 756 | # don't ball search if a flipper button is pressed 757 | flipperLwL: closed 758 | flipperLwR: closed 759 | 760 | -------------------------------------------------------------------------------- /cactuscanyoncontinued_PROC/trough.py: -------------------------------------------------------------------------------- 1 | ## ____ _ ____ 2 | ## / ___|__ _ ___| |_ _ _ ___ / ___|__ _ _ __ _ _ ___ _ __ 3 | ## | | / _` |/ __| __| | | / __| | | / _` | '_ \| | | |/ _ \| '_ \ 4 | ## | |__| (_| | (__| |_| |_| \__ \ | |__| (_| | | | | |_| | (_) | | | | 5 | ## \____\__,_|\___|\__|\__,_|___/ \____\__,_|_| |_|\__, |\___/|_| |_| 6 | ## |___/ 7 | ## ___ ___ _ _ _____ ___ _ _ _ _ ___ ___ 8 | ## / __/ _ \| \| |_ _|_ _| \| | | | | __| \ 9 | ## | (_| (_) | .` | | | | || .` | |_| | _|| |) | 10 | ## \___\___/|_|\_| |_| |___|_|\_|\___/|___|___/ 11 | ## 12 | ## A P-ROC Project by Eric Priepke, Copyright 2012-2013 13 | ## Built on the PyProcGame Framework from Adam Preble and Gerry Stellenberg 14 | ## Original Cactus Canyon software by Matt Coriale 15 | ## 16 | ## This is a heavily modified copy of the trough code from pyprocgame - I added a bunch of "print"s to 17 | ## Help me understand what it was doing, and re-worked a bunch of it to make it make more sense 18 | ## to me - mostly in the 'checking swtiches' section. And made changes to deal with balls 19 | ## bouncing back in to the trough after launch 20 | 21 | #from procgame.game import Mode 22 | import ep 23 | 24 | class Trough(ep.EP_Mode): 25 | """Manages trough by providing the following functionality: 26 | 27 | - Keeps track of the number of balls in play 28 | - Keeps track of the number of balls in the trough 29 | - Launches one or more balls on request and calls a launch_callback when complete, if one exists. 30 | - Auto-launches balls while ball save is active (if linked to a ball save object 31 | - Identifies when balls drain and calls a registered drain_callback, if one exists. 32 | - Maintains a count of balls locked in playfield lock features (if externally incremented) and adjusts the count of number of balls in play appropriately. This will help the drain_callback distinguish between a ball ending or simply a multiball ball draining. 33 | 34 | Parameters: 35 | 36 | 'game': Parent game object. 37 | 'position_switchnames': List of switchnames for each ball position in the trough. 38 | 'eject_switchname': Name of switch in the ball position the feeds the shooter lane. 39 | 'eject_coilname': Name of coil used to put a ball into the shooter lane. 40 | 'early_save_switchnames': List of switches that will initiate a ball save before the draining ball reaches the trough (ie. Outlanes). 41 | 'shooter_lane_switchname': Name of the switch in the shooter lane. This is checked before a new ball is ejected. 42 | 'drain_callback': Optional - Name of method to be called when a ball drains (and isn't saved). 43 | """ 44 | def __init__(self, game, position_switchnames, eject_switchname, eject_coilname, 45 | early_save_switchnames, shooter_lane_switchname, drain_callback=None): 46 | super(Trough, self).__init__(game, 90) 47 | self.myID = "Trough" 48 | self.position_switchnames = position_switchnames 49 | self.eject_switchname = eject_switchname 50 | self.eject_coilname = eject_coilname 51 | self.shooter_lane_switchname = shooter_lane_switchname 52 | self.drain_callback = drain_callback 53 | self.eject_sw_count = 0 54 | self.troughStrength = self.game.user_settings['Machine (Standard)']['Trough Eject Strength'] 55 | 56 | # Install early ball_save switch handlers. 57 | for switch in early_save_switchnames: 58 | self.add_switch_handler(name=switch, event_type='active', delay=None, handler=self.early_save_switch_handler) 59 | 60 | # Reset variables 61 | self.num_balls_in_play = 0 62 | self.num_balls_locked = 0 63 | self.num_balls_to_launch = 0 64 | self.num_balls_to_stealth_launch = 0 65 | self.launch_in_progress = False 66 | 67 | # set externally if used 68 | self.launch_callback = None 69 | self.balls_to_autoplunge = 0 70 | 71 | self.ignore_next_drain = False 72 | self.num_balls_to_save = 1 73 | self.ball_save_callback = None 74 | self.ball_save_active = False 75 | self.ball_save_lamp = self.game.lamps.shootAgain 76 | self.ball_save_begin = 0 77 | self.ball_save_multiple_saves = False 78 | self.ball_save_timer = 0 79 | self.ball_save_hold = 0 80 | self.default_time = self.game.user_settings['Gameplay (Feature)']['Default Ball Save Time'] 81 | self.lane_busy = False 82 | 83 | def tilted(self): 84 | pass 85 | 86 | # specific to CC - deliniating the shooter lane as delayed start switch 87 | def sw_shooterLane_inactive(self,sw): 88 | if self.ball_save_begin > 0: 89 | self.delay(delay=1,handler=self.ball_save_delayed_start_handler) 90 | 91 | #self.debug() 92 | 93 | ## New Method - Only calling a switch count if the 4th spot activates for some reason. 94 | def sw_troughBallFour_active(self,sw): 95 | if self.ignore_next_drain: 96 | self.ignore_next_drain = False 97 | #print "Ignoring this drain - Early Save Switch Activated" 98 | pass 99 | else: 100 | self.position_switch_handler(sw) 101 | 102 | def debug(self): 103 | self.game.set_status(str(self.num_balls_in_play) + "," + str(self.num_balls_locked)) 104 | self.delay(name='launch', event_type=None, delay=1.0,handler=self.debug) 105 | 106 | def early_save_switch_handler(self, sw): 107 | if self.ball_save_active: 108 | # Only do an early ball save if a ball is ready to be launched. 109 | # Otherwise, let the trough switches take care of it. 110 | if self.game.switches[self.eject_switchname].is_active(): 111 | self.save_ball() 112 | # and set a flag to ignore the next ball in the trough 113 | self.ignore_next_drain = True 114 | 115 | def mode_stopped(self): 116 | self.cancel_delayed('check_switches') 117 | self.disable_ball_save() 118 | 119 | # Switches will change states a lot as balls roll down the trough. 120 | # So don't go through all of the logic every time. Keep resetting a 121 | # delay function when switches change state. When they're all settled, 122 | # the delay will call the real handler (check_switches). 123 | def position_switch_handler(self, sw): 124 | self.cancel_delayed('check_switches') 125 | self.delay(name='check_switches', event_type=None, delay=1, handler=self.check_switches) 126 | 127 | def check_switches(self): 128 | #print "CHECKING SWITCHES - Balls in play: " + str(self.num_balls_in_play) 129 | if self.eject_sw_count > 1: 130 | #print "Passing check switches - eject count more than 1" 131 | pass 132 | # If we're currently launching balls - skip the check - we'll check at the end of the launch cycle 133 | elif self.launch_in_progress: 134 | #print "Passing check - Launch in progress" 135 | pass 136 | # If there's a ball currently in play 137 | elif self.num_balls_in_play > 0: 138 | # how many balls should the machine have 139 | num_current_machine_balls = self.game.num_balls_total 140 | # how many balls in in the trough now 141 | counted_balls_in_trough = self.num_balls() 142 | #print "Check Switches - launch status: " + str(self.launch_in_progress) 143 | # Ball saver on situations 144 | if self.ball_save_active: 145 | #print "BALL SAVE IS ACTIVE" 146 | #print "TROUGH SHOULD SAVE " + str(self.num_balls_to_save) + " BALLS" 147 | # if the balls in play + the balls in the trough is higher than the total, we should save one 148 | if counted_balls_in_trough + self.num_balls_in_play > num_current_machine_balls: 149 | #print "Check Switches wants to save a ball" 150 | self.save_ball() 151 | else: 152 | #print "Ball save is on, but balls in play + balls in trough line up" 153 | return 'ignore' 154 | # if the ball save is NOT active, then we process it as a drain 155 | else: 156 | #print "BALL SAVE IS NOT ACTIVE" 157 | # The ball should end if all of the balls are in the trough. 158 | if counted_balls_in_trough == num_current_machine_balls: 159 | self.num_balls_in_play = 0 160 | if self.drain_callback: 161 | #print "THE TROUGH IS FULL, BALL SAVE INACTIVE, ENDING BALL" 162 | self.drain_callback() 163 | # otherwise there's thinking to do 164 | else: 165 | #print "BALL DRAINED" 166 | if self.drain_callback: 167 | # Write off the drained balls 168 | self.num_balls_in_play = num_current_machine_balls - counted_balls_in_trough 169 | # call a drain - unless showdown or ambush is starting 170 | if not self.game.showdown.startup and not self.game.ambush.startup: 171 | self.drain_callback() 172 | #print "BALLS NOW IN PLAY: " + str(self.num_balls_in_play) 173 | # if there aren't any balls in play 174 | else: 175 | if self.launch_in_progress: 176 | #print "WHAT THE - NO BALLS IN PLAY, and we're launching - try again?" 177 | # experiental condition for lanny's case where I don't think the balls settled 178 | if self.num_balls() == 4 or self.game.switches.troughEject.is_active(): 179 | #print "It fell back in, try again" 180 | self.cancel_delayed("Bounce_Delay") 181 | self.common_launch_code() 182 | 183 | # Count the number of balls in the trough by counting active trough switches. 184 | def num_balls(self): 185 | """Returns the number of balls in the trough.""" 186 | ball_count = 0 187 | for switch in self.position_switchnames: 188 | if self.game.switches[switch].is_active(): 189 | ball_count += 1 190 | #print "Active trough switch: " + str(switch) 191 | if self.game.switches.troughEject.is_active() and not self.game.fakePinProc: 192 | #print "There's a ball stacked up in the way of the eject opto" 193 | ball_count += 1 194 | #print "balls counted: " + str(ball_count) 195 | return ball_count 196 | 197 | def is_full(self): 198 | #print "Checking if trough is full" 199 | return self.num_balls() == self.game.num_balls_total 200 | 201 | # Either initiate a new launch or add another ball to the count of balls 202 | # being launched. Make sure to keep a separate count for stealth launches 203 | # that should not increase num_balls_in_play. 204 | def launch_balls(self, num, callback=None, stealth=False): 205 | """Launches balls into play. 206 | 207 | 'num': Number of balls to be launched. 208 | If ball launches are still pending from a previous request, 209 | this number will be added to the previously requested number. 210 | 211 | 'callback': If specified, the callback will be called once 212 | all of the requested balls have been launched. 213 | 214 | 'stealth': Set to true if the balls being launched should NOT 215 | be added to the number of balls in play. For instance, if 216 | a ball is being locked on the playfield, and a new ball is 217 | being launched to keep only 1 active ball in play, 218 | stealth should be used. 219 | """ 220 | #print "I SHOULD LAUNCH A BALL NOW" 221 | self.num_balls_to_launch += num 222 | if stealth: 223 | self.num_balls_to_stealth_launch += num 224 | if not self.launch_in_progress: 225 | self.launch_in_progress = True 226 | #print "Launch status: " + str(self.launch_in_progress) 227 | self.common_launch_code() 228 | 229 | # This is the part of the ball launch code that repeats for multiple launches. 230 | def common_launch_code(self): 231 | # Only kick out another ball if the last ball is gone from the 232 | # shooter lane. 233 | #print "Launch action loop" 234 | # set the trough eject switch count to zero 235 | # This is the switch a ball passes going in/out of the trough 236 | # Counting hits on it allows for detecting a ball bouncing back in 237 | self.eject_sw_count = 0 238 | 239 | # If the shooter lane is clear, huck a ball 240 | if self.game.switches[self.shooter_lane_switchname].is_inactive(): 241 | self.game.coils[self.eject_coilname].pulse(self.troughStrength) 242 | # go to a hold pattern to wait for the shooter lane 243 | # if after 2 seconds the shooter lane hasn't been hit 244 | # and the eject switch hasn't triggered, we'll assume the launch worked 245 | #if not self.game.fakePinProc: 246 | #print "Trough - scheduling the Bounce_Delay" 247 | self.delay("Bounce_Delay",delay=3,handler=self.finish_launch) 248 | # if we are under fakepinproc, proceed immediately to ball in play 249 | #else: 250 | #print "Fakepinproc - Finishing Launch" 251 | #self.finish_launch() 252 | 253 | # Otherwise, wait 1 second before trying again. 254 | else: 255 | #print "Shooter lane busy - reschedule" 256 | self.delay(name='launch', event_type=None, delay=1.0, 257 | handler=self.common_launch_code) 258 | 259 | def finish_launch(self): 260 | #print "Finishing Launch" 261 | # set the eject hits to zero 262 | self.eject_sw_count = 0 263 | # tick down the balls to launch 264 | self.num_balls_to_launch -= 1 265 | # Set the lane as busy to hold additional launches 266 | self.lane_busy = True 267 | # Start a safety net delay to clear the lane busy in case nothing else works 268 | self.cancel_delayed("SafetyNet") 269 | self.delay(name = "SafetyNet",delay=15,handler=self.clear_lane_busy) 270 | 271 | #print "BALL LAUNCHED - left to launch: " +str(self.num_balls_to_launch) 272 | # Only increment num_balls_in_play if there are no more 273 | # stealth launches to complete. 274 | if self.num_balls_to_stealth_launch > 0: 275 | self.num_balls_to_stealth_launch -= 1 276 | else: 277 | self.num_balls_in_play += 1 278 | #print "IN PLAY: " + str(self.num_balls_in_play) 279 | # If more balls need to be launched, run the wait for clear loop 280 | if self.num_balls_to_launch > 0: 281 | #print "More balls to launch: " + str(self.num_balls_to_launch) + " - Waiting for clear" 282 | self.wait_for_clear() 283 | # If all the requested balls are launched, go to the cleanup check 284 | else: 285 | self.launch_in_progress = False 286 | if not self.game.fakePinProc: 287 | self.delay(delay=.5,handler=self.post_launch_check) 288 | else: 289 | #print "Fakepinproc - post launch check skipped" 290 | pass 291 | 292 | ## New routine to have more control over when to launch sucessive balls 293 | def wait_for_clear(self): 294 | if self.game.fakePinProc: 295 | self.common_launch_code() 296 | else: 297 | # a looping cycle to wait for the shooter lane to clear 298 | if self.lane_busy: 299 | self.delay(name="waiting",delay=1,handler=self.wait_for_clear) 300 | else: 301 | # delay the call back to common launch code to allow the bowl to clear 302 | self.delay(name="waiting",delay=2,handler=self.common_launch_code) 303 | 304 | def sw_shooterLane_inactive_for_4s(self,sw): 305 | # if the shooter lane opens for 5 seconds, and the busy flag is on, shut if off 306 | if self.lane_busy: 307 | #print "Shooter lane inactive is clearing the busy flag" 308 | self.lane_busy = False 309 | self.cancel_delayed("SafetyNet") 310 | 311 | def sw_skillBowl_active(self,sw): 312 | # if the skill bowl switch is hit, and the busy flag is on, turn it off. 313 | if self.lane_busy: 314 | #print "Skill bowl is clearing the busy flag" 315 | self.lane_busy = False 316 | self.cancel_delayed("SafetyNet") 317 | 318 | def clear_lane_busy(self): 319 | #print "Safety net is clearing the lane busy" 320 | self.lane_busy = False 321 | 322 | def post_launch_check(self): 323 | #print "Running Post Launch Check" 324 | # count the balls in the trough, and math out how many should be there 325 | actuallyInTrough = self.num_balls() 326 | shouldBeInTrough = self.game.num_balls_total - self.num_balls_in_play 327 | # if they line up - awesome 328 | if shouldBeInTrough == actuallyInTrough: 329 | #print "Everything Adds up at the end of the launch." 330 | pass 331 | # If we're short, there's extra balls on the playfield. Sucks, but such is life. 332 | elif shouldBeInTrough > actuallyInTrough: 333 | #print "There aren't as many balls in the trough as there should be" 334 | pass 335 | #print "Ball in play: " + str(self.num_balls_in_play) + " Counted: " + str(actuallyInTrough) 336 | # the other option is we have too many balls in the trough 337 | # in that case, fix things up by stealth launching the difference 338 | else: 339 | #print "There are more balls in the trough than there should be" 340 | #print "Balls in play: " + str(self.num_balls_in_play) + " Counted: " + str(actuallyInTrough) 341 | #print "Stealth launch to fix that" 342 | num = actuallyInTrough - shouldBeInTrough 343 | #print "Launching: " + str(num) 344 | self.balls_to_autoplunge = num 345 | self.launch_balls(num,stealth=True) 346 | 347 | def sw_shooterLane_active_for_300ms(self,sw): 348 | #print "SOLID LAUNCH, GOOD TO GO" 349 | # if we're ejecting - process the launch 350 | if self.launch_in_progress: 351 | # kill the fallback loop 352 | self.cancel_delayed("Bounce_Delay") 353 | self.finish_launch() 354 | 355 | def sw_troughEject_active(self,sw): 356 | # tick up the count with each switch hit 357 | self.eject_sw_count += 1 358 | #print "Trough Eject switch count: " + str(self.eject_sw_count) 359 | # if we go to more than 1, the ball came back 360 | if self.eject_sw_count > 1: 361 | #print "We're over on eject count - ball fell back in" 362 | self.cancel_delayed('Bounce_Delay') 363 | # retry the ball launch 364 | self.delay("Retry",delay=1,handler=self.common_launch_code) 365 | else: 366 | #print "That's one" 367 | pass 368 | 369 | ## BALL SAVE BITS 370 | 371 | def start_ball_save_lamp(self): 372 | """Starts blinking the ball save lamp. Oftentimes called externally to start blinking the lamp before a ball is plunged.""" 373 | self.ball_save_lamp.schedule(schedule=0xFF00FF00, cycle_seconds=0, now=True) 374 | 375 | def update_lamps(self): 376 | if self.ball_save_timer > 5: 377 | self.ball_save_lamp.schedule(schedule=0xFF00FF00, cycle_seconds=0, now=True) 378 | elif self.ball_save_timer > 2: 379 | self.ball_save_lamp.schedule(schedule=0x55555555, cycle_seconds=0, now=True) 380 | else: 381 | self.ball_save_lamp.disable() 382 | 383 | def disable_ball_save(self): 384 | """Disables the ball save logic.""" 385 | # kill the active flag 386 | if self.ball_save_active: 387 | self.ball_save_active = False 388 | # set the timer to 0 389 | self.ball_save_timer = 0 390 | # turn off the light 391 | self.ball_save_lamp.disable() 392 | 393 | def start_ball_save(self, num_balls_to_save=1, time=0, now=True, allow_multiple_saves=False): 394 | """Activates the ball save logic.""" 395 | 396 | # If limited flip party mode is on - and player is at/over limit, don't turn on the ball save 397 | if self.game.user_settings['Gameplay (Feature)']['Party Mode'] == 'Flip Ct' \ 398 | and self.game.show_tracking('Total Flips') >= self.game.user_settings['Gameplay (Feature)']['Party - Flip Count']: 399 | pass 400 | else: 401 | if time == 0: 402 | time = self.default_time 403 | #print "Starting Ball Save for " + str(time) + " seconds" 404 | self.allow_multiple_saves = allow_multiple_saves 405 | self.num_balls_to_save = num_balls_to_save 406 | if time > self.ball_save_timer: self.ball_save_timer = time 407 | self.update_lamps() 408 | # if starting right away, do that 409 | if now: 410 | self.cancel_delayed('ball_save_timer') 411 | self.delay(name='ball_save_timer', event_type=None, delay=1, handler=self.ball_save_countdown) 412 | self.ball_save_active = True 413 | # if not starting right away - stash the timer value and set the flag for delayed start 414 | else: 415 | self.ball_save_begin = 1 416 | self.timer_hold = time 417 | 418 | def ball_save_countdown(self): 419 | self.ball_save_timer -= 1 420 | self.update_lamps() 421 | if self.ball_save_timer >= 1: 422 | self.delay(name='ball_save_timer', event_type=None, delay=1, handler=self.ball_save_countdown) 423 | else: 424 | if self.game.current_player().extra_balls > 0: 425 | self.game.lamps.shootAgain.enable() 426 | self.disable_ball_save() 427 | 428 | def ball_save_is_active(self): 429 | #print "Ball Save active check" 430 | return self.ball_save_timer > 0 431 | 432 | def ball_save_delayed_start_handler(self, sw): 433 | if self.ball_save_begin: 434 | self.ball_save_timer = self.timer_hold 435 | self.ball_save_begin = 0 436 | self.update_lamps() 437 | self.cancel_delayed('ball_save_timer') 438 | self.delay(name='ball_save_timer', event_type=None, delay=1, handler=self.ball_save_countdown) 439 | self.ball_save_active = True 440 | 441 | def save_ball(self): 442 | #print "Saving Ball" 443 | # log in audits 444 | self.game.game_data['Feature']['Ball Saves'] += 1 445 | 446 | self.num_balls_to_save -= 1 447 | #print "Left to save: " + str(self.num_balls_to_save) 448 | self.ball_save_callback() 449 | self.balls_to_autoplunge += 1 450 | self.launch_balls(1,stealth=True) 451 | if self.num_balls_to_save == 0: 452 | #print "Last saved ball - Turning off ball save" 453 | self.disable_ball_save() 454 | -------------------------------------------------------------------------------- /special_audiopan_and_audiofade_patched/bord_probably/WARNING.txt: -------------------------------------------------------------------------------- 1 | Table releases has the same god damn filename every time an update is released !!! 2 | So, I can't be sure if YOU have the same actual table that will work with these changes. 3 | 4 | If you are an author, please, don't re-use tablenames ! 5 | 6 | /Thalamus 7 | --------------------------------------------------------------------------------