swisslizard Posted October 18, 2014 Share Posted October 18, 2014 HiAfter some initial trouble, I have managed to build a plugin for PBX which can call the DirectOutput framework (DOF). Now I need to start working on the details:First of all, I'm still not sure if I'm really working with the latest version of the plugin template. My code is based on the vb.net plugin template which is installed with PinballX 1.9. Is this the latests version?Is there a C# version of the plugin template? Where? In my install there is no such template.Is there a way, how a plugin can determine whats actually going on in PBX? I'm looking for a way to find out about events like Quit, Left, Right, Page Left, Page Right, Pause, Select, Exit Emulator, Instructions (Basically the Actions you define in the Input Settings). I'm aware of Event_Input, but this does only return the keys resp. buttons, but not the action which is associated with them.When does the Event_GameExit fire? After the emulator has been quit or before that? I need some kind of signal, after the exit of the emulator.I'm still not sure if there is a way how to get the rom name of a table in the Event_GameSelect and Event_GameRun methods? If it is possible, where can I find that rom name? The data structure I receive for these event there is no field for the rom name.Thanks for any hints and help.All the bestSwisslizard / Tom 1 Quote Link to comment Share on other sites More sharing options...
Draco1962 Posted October 18, 2014 Share Posted October 18, 2014 Hi Tom - Nice to see a new plugin dev amongst the ranks! Either Tom (the author) and Adultery will most likely chime in here to answer your questions. I would but I am not a programmer. Quote Link to comment Share on other sites More sharing options...
Adultery Posted October 18, 2014 Share Posted October 18, 2014 1. Yes.2. I'll have a look, if there isn't I'll put one together.3. The Event_Input can be set up to do certain things at certain key presses using a Select Case. Give me an example of what you want to do and I'll show you a quick and dirty block.4. Immediately after you exit the game and right before it falls back to PBX.5. The rom variable has been added but it was after I used the plugin template. I would have to look into when it fires, but the hiscore plugin uses it so I know it's there. Quote Link to comment Share on other sites More sharing options...
swisslizard Posted October 18, 2014 Author Share Posted October 18, 2014 @Adultery:You dont need to create a C# template. I've already created something along these lines and just wanted to compare the logic. Quote Link to comment Share on other sites More sharing options...
Adultery Posted October 18, 2014 Share Posted October 18, 2014 Well all the c# template would be is a converted version of the vb.net one which is how GameEx did it. PBX is developed in vb.net mainly anyway. Either way it should be in there if it's not.I also answered the rest of your questions. Quote Link to comment Share on other sites More sharing options...
swisslizard Posted October 18, 2014 Author Share Posted October 18, 2014 Thanks for your answers.3. DOF is built to trigger effects based on events in the software using it. Therefore it is helpfull if DOF can learn as much as possible about the things that are going on in the hosting app (in this case pbx). this means that I'm looking for a way to get information about things like the wheel shifting left or right, pageing left right and if thats possible also about other actions that occur in pbx (eg. context menu open/close).So if any examples exist how to get that info, I would be glad to have a look.5. I have also read about the highscore template, but it is not yet clear to me how to access that rom variable. Also here a code example or other info would be most helpfull. Quote Link to comment Share on other sites More sharing options...
Adultery Posted October 18, 2014 Share Posted October 18, 2014 Well all you're going to see is the input being passed, not the function that input is tied to. So the event passes, say, the right arrow key. The plugin doesn't see that this condition is tied to the wheel in any way.The way I got around that in GameEx is by using the menu change event and snatched what menu it was on from there.Is the problem that you can't see the table rom variable at all or you don't know when it gets passed? Quote Link to comment Share on other sites More sharing options...
Adultery Posted October 18, 2014 Share Posted October 18, 2014 PS: Here's the rom variable info. http://www.gameex.info/forums/index.php?/topic/14228-PLUGIN---also-possible-to-get-romname-? Quote Link to comment Share on other sites More sharing options...
swisslizard Posted October 18, 2014 Author Share Posted October 18, 2014 The struct with the game info which I found in the plugin template doesnt have a rom variable. The struct is also different from the one found in the thread you have mentioned in your previous post. My struct does have some highscore tags which are not found in the other struct. Thats why I am a bit lost here.Regarding the actions of pbx:You have mentioned a menu change event. This event does not exist in the template I have used. Does it exist in pbx to? Quote Link to comment Share on other sites More sharing options...
Adultery Posted October 18, 2014 Share Posted October 18, 2014 I'm not sure, I don't use PinballX so am unfamiliar with it. But I will do some investigating and get back to you. Quote Link to comment Share on other sites More sharing options...
noiseprisoner Posted May 30, 2015 Share Posted May 30, 2015 Just curious if any more work has been done to integrate DOF with PinballX? I just setup DOF with an LEDWiz and it would be awesome to be able to have feedback in the PinballX frontend. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.