Jump to content
SpesoftPinballXConvert-It
Adultery

[PLUGIN DEVELOPMENT] VB.NET PinballX Snap-In Plugin Template

Recommended Posts

I put this together as I was in the planning phase of a new Xpadder plugin for PinballX. If you want to get into making a plugin for Tom's interface, here's the only start-up tool you'll ever need! All you need to do is drop the zip file in the Visual Studio Templates>Visual Basic directory. Included in the package are:

  • Updated PinballX Plugin class
    Includes the new keypress function!
  • Logger Utility
    Based on a modified version by our very own Headkaze!
    Built in support for debug logging
  • INI Utility
    A comprehensive INI reading and writing utility
  • A sample configuration form

The template was created in VS 2012 Ultimate. If you have questions or need advice, don't hesitate to ask!

Download the template from here.

  • Like 4

Share this post


Link to post
Share on other sites

@Tom Speirs

Hi Tom,

I'm trying to add basic navigation to the media player plugin (skip etc). This would be for when PinballX is in Attract Mode only. What i want to do is capture a key/joy button press in the Event_Input function, do the stuff in the plugin and then set the the key/joy button value to False and pass that back to PinballX.

Unfortunately it appears that PinballX exits attract mode regardless of the key/button press being cancelled by the plugin. I want PinballX to stay in Attract Mode in these circumstances (it would exit attract mode for other button presses where they are not cancelled by the plugin), is there a way to achieve that?

Hope i'm making sense!... let me know if you need more info.

Thanks

Edit - do i need to use the PinballXStatus integer flag somehow? - not sure what the values for that in the Event_Input function for the plugin mean.

Share this post


Link to post
Share on other sites

Also tried returning False from the Event_Screensaver function in the plugin for Type 2 (exit screensaver) - doesn't seem to cancel the exit, i guess this would be the correct way of doing what i want if i can get it to work

Share this post


Link to post
Share on other sites

Just wanted to say that I did see this and am not ignoring you, just wrapped up.

 

Cheers.

Tom.

  • Thanks 1

Share this post


Link to post
Share on other sites

Just to confirm, returning False from the Event_Screensaver in the plugin code to prevent exit from pinballx attract mode was resolved in PinballX V3.47

Thanks Tom!

Share this post


Link to post
Share on other sites

Hi Tom,

Quick question on PinballX v3.49 and later that include the System menu..

While in the system menu it seems that Info.GameDescription is set to the same value as Info.SystemName (Info.GameName is inaccessible, "Object reference not set to an instance of an object.") in Event_GameSelect

Is the best way for a plugin to check if PinballX is in the System menu to see if Info.SystemName = Info.GameDescription in Event_GameSelect, and is it safe to assume that behaviour going forward?

Thanks

Share this post


Link to post
Share on other sites

Ill look into the error. I don't see why it wouldn't be like that going forward but its kind of not official way  of checking. Sure we can figure it out though if you have issues in the future.

  • Thanks 1

Share this post


Link to post
Share on other sites

What would be the 'official' way in a plugin?

Also, noticed in system menu in Event_GameSelect that system and systemname are set to the same value. Can system be set as the alternate name ( e.g. system_n format for other systems) in a future release?

  • Like 1

Share this post


Link to post
Share on other sites

My point is there is no official way implemented. We would need a load list or menu change event. You are kind of ahead of me.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...