Ive posted elsewhere but..

faralos

Faralos
Joined
Nov 17, 2008
Messages
1,810
Solutions
6
Reaction score
211
Points
90
Favorite Pinball Machine
Flash
I'll try this here,
I tried the joy2mouse3 program, and it locked up my pointer into the top left of my display. I had to start my comp in safe mode since the program is an 'exe' and automatically locked itself into windows, just to uninstall it!
this other one 'xpadde' looked kewl, and I mapped out all the buttons, but VP doesn't recognize my controller.
I remember now, FP worked with my controller! 'Yep, Future Pinball has an option right in their drop-down menus that lets me configure my gravis pad to ANY pin.
VP does NOT have this! Any reason why not? Iam will be forced to play (with any chance of getting a decent score) only FP games due to this oversight.
So I can never play VP with a Gravis controller by the looks of it. sigh...
my keyboard is locking up and doesn't let me do double keystrokes in rapid succession. Because of this, I can't operate flippers correctly, resulting in many lost balls.
Any help at all, (except for more references to buggy programs
biggrin.gif
)
would be greatly appreciated.
Again, thanks
faralos
with that aside, I tried the joytokey prgram but can't understand it.
if anyone can help me, ALL I WANT IS TO BE ABLE TO USE MY GRAVIS GAMEPAD W/ VP That's all!
I don't want to have to learn programming to navigate thru joytokey, just a little help is all.
<!-- / message -->
<!-- controls -->
progress.gif
 
Did you read the thread that you posted elsewhere?
The answer is there.
VP has it built in. It does not require a menu selection, or any programming. It does not require another program like Joytokey or any other.

Just put the number that your gamepad gives as the keycode in the script where you want that gamepad button to do what the keycode is doing.

To find out what the number the game pad gives for the button you want to use do this.

-Load VP and don't load any table. Instead select New from the File menu.
-Select Script from the Edit menu.
-On line one just after the Sub Table1_KeyDown(ByVal keycode) line which is line 0, the first line in the script, put this.

ScoreText.Text=KeyCode

-Select Compile from the Script menu there in the script editor.
-Go back to the VP editor and select Play from the Table menu.
-Press a button on your game pad that you want to use for your left flipper. Write down that number.
-Press ESC on your keyboard to exit the table, then click on Quit To Editor.
-Select Script from the Edit menu.
-Go to the line in the script
If keycode = LeftFlipperKey Then (line 6) and replace LeftFlipperKey with that number.
-Go to line 37 (
If keycode = LeftFlipperKey Then ) and replace LeftFlipperKey with that same number.
-Select Compile from the Script menu and go back to the VP editor.
-Select Play from the Table menu and confirm that the gamepad does the function that you want.
-If it does, let us know if you can not figure out how to get the pad to work with the other things you would like it to do. If it does not, or you don't get any response from pressing a button on the pad from the previous step, then you have a problem with Windows reading your gamePad.

Use the first few steps and write down all buttons you want to use and the numbers they return. These numbers will replace any keycode that is doing what you want that button or axis on the pad to do. Note that the axis registers, and not the direction (up or down for example).
 
Last edited:
if you'd read everything then...

earlier I'd posted that I did just that. I put the line in, compiled, played and here is what I got:
Line 219
Variable is undefined: 'scoretext'

I'm guessing that it isn't even getting the chance to define a numerical value to the button on my pad because it doesn't recognize 'scoretext' as anything. I may be wrong but I get that mssge each time.
I am not trying to be snippy, but I've been at this for about 9 hrs. so far, what with the buggy programs and trying out different tables, thinking maybe that was it.
anything you can help with would be great...
 
Table1 has 68 lines numbered 0 to 67.

What table are you using that that line would be at line 219?
Did you add a textbox named scoretext? Table1 has one already.
This would still work with what ever table you are trying it on, but you will have to add a textbox named scoretext. It could be any name, but you would have to change the script example I gave you to reflect that.

After you figure this out, which can only be done following the directions through from start, then we can get every other table working for you.

The problem is that we don't even know if your gamepad is working, and trying the same thing on different tables is not going to help. You have got to try everything on one table first, and that table is the empty table that is built in to VP. The one that every table has started from.

If you can't get a number to show up by pushing a button on your game pad using the directions given, then you are not going to get it to work peroid.

I don't use a gamepad, and I don't know these line numbers by heart. And it took seconds to build up these directions for you using the VP editor for confirmation and reference all along the way.

Open a blank table, like you were going to build one. Forget for a moment trying any other table.

you don't even need to type anything. Just copy this

Scoretext.text=keycode

and go to the second line in the script and press return to make a blank second line and paste that there and run the table and push a button on your controller and let me know what happens.

We can get to the bottom of this.
 
well it works, but...

yeah, it works great with that empty table. now how do I use it on an existing one? can i just write all that script into a program, following those guidelines? It really sucked, though when it finally worked then when i opened a new table I lost all that scripting I had just written. all I am trying to do is just play VP pinball since my keyboard software is buggy, and it's been all day just to get this far and I STILL can't use it on existing tables!
 
No you don't want to use any of that scripting, and you will no longer need to make a textbox named scoretext. What happened is we just made a tool to give you the numbers to use.

Replace the keycodes that are doing what you want the pad button to do in the table you want to play with the numbers that the pad gave you. That's it. We just got keycodes for you pad, and all you have to do now is use them.
 
so I just write new script?

to get the pad to work, must I write new script into every pins program? Where else can I input the pads numbers, is that what you meant? before today, I'd never written a lick of script, y'see FP's objects (bumpers, slingshots, etc) all are prescripted and come with little programs allready built into them. Here, I must write everything it seems including how to configure a pad to work.
 
You do not have to write anything to configure your pad. If you knew the configuration (the values the pad returned as seen by VP) then the directions to get those would not have been needed. It is built in to VP.
If you like, I will create a VPMKeys.vbs file for you that will make it like the game was designed to work not only with your gamepad, but using the buttons you want for each action in all VPM tables. But not today.
For non VPM tables you will have to do a search and replace which will change the script even if you don't know what line the keycodes are on.

You are right that you have to do scripting if you plan to customize VP/VPM in this way. But assuming that you wrote down the number that is the keycode for your left gamepad button for example (I hope you wrote down all numbers (draw a picture of your controller and put those numbers on the buttons or a cross reference, button 1 = 1677264 for example) so all you have to do now is replace LeftFlipperKey in the script to 1677264 or what ever code you got for the button you got that you want to work the left button, usually in two places in the script each, and of course the same for the RightFlipperKey, and anyother keys you want to replace with the gamepad buttons.)

It's simple when you realize that all you are doing is changing the keys used to your gamepad. It is just as easy as changing from one key on the keyboard to another key on the keyboard.

Use the directions I gave to get the keycodes for the keyboard keys as well as the joysticks and gamepads.
 
Last edited:
Wow! That would be Great!

I couldn't thank you enough, I tried to redo the script for Flash, it looks ok, but it does not work the keyboard still works kind of, but nogo on my pad, the compilation went ok, all the coding is in, it just doesn't work. oh well, scripting just isn't for me, I used to have problems trying to script for a pc game, 'Neverwinter nights' but that one went kablooey when my computer crashed last year. I couldn't get 'scripting then either, and here it is all over again.
I'll not hold my breath, knowing these things take time. But I'll check in every few days for a looksee, maybe someone else could pitch in, too.
Thanks again...:cheers: have one on me...!
Faralos
 
Here is a complete VP table. Likely the smallest functioning VP table you will ever see.

There are no table elements, nothing in the sound or graphics librarys and only three short lines of script.

It is less than 1k and the function is to get keycodes for the keyboard, gamepad, and joysticks.
 

Attachments

  • keycode.zip
    983 bytes · Views: 270
Last edited:
There is no rescripting.

Do not use anything you have read or tried. Just replace the word LeftFlipperKey with the number you learned VP sees when you press the button you want to use for that in every place you find what another keycode is doing that in the script, and do the same for the RightFlipperKey. The whole things boils down to just changing the =LeftFlipperKey and RightflipperKey in both the KeyDown and KeyUp subs to =[the gamepad keycode for each]
 
Give me the numbers

The keycode you get for the button you want to use for the left flipper button,
The key code you get that you want to use for the right flipper button.
and any other keycodes you get that you would want to use for the plunger, or left and right tilt keys, etc, and I will whip you up a custom VPMKeys.vbs file that will use them for that and the rest of the tables automatically, with no changes to the scripts of any tables. It will be like VP was rewritten to use your gamepad and just the keys you wanted too as the default. I never did this, but I'm pretty sure it will work.
 
Forum activity
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
      Chat Bot Mibs Chat Bot Mibs: Wolfkell is our newest member. Welcome!
      Back
      Top