Nice job on the game
Using 10.7 r338
For whatever reason I use default keys in VP to start the game and for coins but the 5 key will not give me any credits
Because in VPMKeys.vbs by default key 5 is coin slot 3
Const keyInsertCoin1 = 4 '(3) Insert coin in slot 1
Const keyInsertCoin2 = 5 '(4) Insert coin in slot 2
Const keyInsertCoin3 = 6 '(5) Insert coin in slot 3
Const keyInsertCoin4 = 7 '(6) Insert coin in slot 4
The controller LTD made for this table and Pecmen has no coin 2 slot left (Some other tables too but not LTD ones)
because they literally used up every input the controller had for other things
and so there was no coin 2 input or a coin slot 3
both coin slots were tied to the same input, coin switch 1
If your Cab is wired as such that you only have the coin slot (or button) that equates to the 5 key
then edit VPMKeys.vbs and set coin slot 1 to be the 5 key
ALL pinmame tables will work still if you do it.
I have all 3 coin slots set, just to different keys, on some ROM's i can set then to different denominations with coin 3 usually being a bill changer it seems on later era controllers
if it is anything
You could add a coin slot 3 to the LTD4a,vbs if you dont wish to change VPMKeys
I did not give it one because the machine didnt have one, and did not even have coin 2, but i know some peoples coin doors have both slots wired independently
so i gave it 2 coin slots, as well as staged flippers in case a person is using them (Though they will be TERRIBLE on this table)
'Last Updated in VBS v3.58
' Written by Wiesshund to run Haunted Hotel ROM, feel free to improve this
Option Explicit
LoadCore
Private Sub LoadCore
On Error Resume Next
If VPBuildVersion < 0 Or Err Then
Dim fso : Set fso = CreateObject("Scripting.FileSystemObject") : Err.Clear
ExecuteGlobal fso.OpenTextFile("core.vbs", 1).ReadAll : If Err Then MsgBox "Can't open ""core.vbs""" : Exit Sub
ExecuteGlobal fso.OpenTextFile("VPMKeys.vbs", 1).ReadAll : If Err Then MsgBox "Can't open ""vpmkeys.vbs""" : Exit Sub
Else
ExecuteGlobal GetTextFile("core.vbs") : If Err Then MsgBox "Can't open ""core.vbs""" : Exit Sub
ExecuteGlobal GetTextFile("VPMKeys.vbs") : If Err Then MsgBox "Can't open ""vpmkeys.vbs""" : Exit Sub
End If
End Sub
'-------------------------
' LTD System 4 Data
'-------------------------
' Cabinet switches
Const swSelfTest = 9
Const swTilt = -6
Const swCoin1 = 13
Const swCoin2 = 13
Const swCoin3 = 13
Const swStartButton = 14
Const swEnter = 10
Const swDown = 11
Const swURFlip = 3
Const swULFlip = 4
Const swLRFlip = 84
Const swLLFlip = 82
' Help Window
vpmSystemHelp = "LTD System 4 keys:" & vbNewLine &_
vpmKeyName(keyInsertCoin2) & vbTab & "Insert Coin #1" & vbNewLine &_
vpmKeyName(keyInsertCoin3) & vbTab & "Insert Coin #2" & vbNewLine &_
vpmKeyName(keyEnter) & vbTab & "Enter (Coin Door)" & vbNewLine &_
vpmKeyName(keySelfTest) & vbTab & "Self Test"
' Dip Switch / Options Menu
Private Sub LTDShowDips
If Not IsObject(vpmDips) Then ' First time
Set vpmDips = New cvpmDips
With vpmDips
.AddForm 150, 245, "DIP Switches"
.AddFrame 0,0, 60, "", 0,_
Array("DIP 1",&H00000001,"DIP 2",&H00000002,"DIP 3",&H00000004,"DIP 4",&H00000008,_
"DIP 5",&H00000010,"DIP 6",&H00000020,"DIP 7",&H00000040,"DIP 8",&H00000080,_
"DIP 9",&H00000100,"DIP 10",&H00000200,"DIP 11",&H00000400,"DIP 12",&H00000800,_
"DIP 13",&H00001000,"DIP 14",&H00002000,"DIP 15",&H00004000,"DIP 16",32768)
.AddFrame 80,0, 60, "", 0,_
Array("DIP 17",&H00010000,"DIP 18",&H00020000,"DIP 19",&H00040000,"DIP 20",&H00080000,_
"DIP 21",&H00100000,"DIP 22",&H00200000,"DIP 23",&H00400000,"DIP 24",&H00800000,_
"DIP 25",&H01000000,"DIP 26",&H02000000,"DIP 27",&H04000000,"DIP 28",&H08000000,_
"DIP 29",&H10000000,"DIP 30",&H20000000,"DIP 31",&H40000000,"DIP 32",&H80000000)
End With
End If
vpmDips.ViewDips
End Sub
Set vpmShowDips = GetRef("LTDShowDips")
Private vpmDips
' Keyboard handlers
Function vpmKeyDown(ByVal keycode)
On Error Resume Next
vpmKeyDown = True ' Assume we handle the key
With Controller
Select Case keycode
Case RightFlipperKey .Switch(swLRFlip) = True : vpmKeyDown = False
If keycode = RightMagnaSave then
.Switch(swURFlip) = True
vpmKeyDown = False
End If
Case LeftFlipperKey .Switch(swLLFlip) = True : vpmKeyDown = False
If keycode = LeftMagnaSave Then
.Switch(swULFlip) = True
vpmKeyDown = False
End If
Case RightMagnaSave .Switch(swURFlip) = True : vpmKeyDown = False
Case LeftMagnaSave .Switch(swULFlip) = True : vpmKeyDown = False
Case keyStagedFlipperL .Switch(swULFlip) = True : vpmKeyDown = False
Case keyStagedFlipperR .Switch(swURFlip) = True : vpmKeyDown = False
Case keyInsertCoin1 vpmTimer.AddTimer 750,"vpmTimer.PulseSw swCoin1'" : Playsound SCoin
Case keyInsertCoin2 vpmTimer.AddTimer 750,"vpmTimer.PulseSw swCoin2'" : Playsound SCoin
Case keyInsertCoin3 vpmTimer.AddTimer 750,"vpmTimer.PulseSw swCoin3'" : Playsound SCoin
Case StartGameKey .Switch(swStartButton) = True
Case keySelfTest .Switch(swSelfTest) = True
Case keyEnter .Switch(swEnter) = True
Case keyBangBack vpmNudge.DoNudge 0, 6
Case LeftTiltKey vpmNudge.DoNudge 75, 2
Case RightTiltKey vpmNudge.DoNudge 285, 2
Case CenterTiltKey vpmNudge.DoNudge 0, 2
Case keyVPMVolume vpmVol
Case Else vpmKeyDown = False
End Select
End With
On Error Goto 0
End Function
Function vpmKeyUp(ByVal keycode)
On Error Resume Next
vpmKeyUp = True ' Assume we handle the key
With Controller
Select Case keycode
Case RightFlipperKey .Switch(swLRFlip) = False : vpmKeyUp = False
If keycode = RightMagnaSave then
.Switch(swURFlip) = False
vpmKeyUp = False
End If
Case LeftFlipperKey .Switch(swLLFlip) = False : vpmKeyUp = False
If keycode = LeftMagnaSave Then
.Switch(swULFlip) = False
vpmKeyUp = False
End If
Case RightMagnaSave .Switch(swURFlip) = False : vpmKeyUp = False
Case LeftMagnaSave .Switch(swULFlip) = False : vpmKeyUp = False
Case keyStagedFlipperL .Switch(swULFlip) = False : vpmKeyUp = False
Case keyStagedFlipperR .Switch(swURFlip) = False : vpmKeyUp = False
Case StartGameKey .Switch(swStartButton) = False
Case keySelfTest .Switch(swSelfTest) = False
Case keyEnter .Switch(swEnter) = False
Case keyShowOpts .Pause = True : .ShowOptsDialog GetPlayerHWnd : .Pause = False
Case keyShowKeys .Pause = True : vpmShowHelp : .Pause = False
Case keyAddBall .Pause = True : vpmAddBall : .Pause = False
Case keyShowDips If IsObject(vpmShowDips) Then .Pause = True : vpmShowDips : .Pause = False
Case keyReset .Stop : BeginModal : .Run : vpmTimer.Reset : EndModal
Case keyFrame .LockDisplay = Not .LockDisplay
Case keyDoubleSize .DoubleSize = Not .DoubleSize
Case Else vpmKeyUp = False
End Select
End With
On Error Goto 0
End Function