Jump to content
SpesoftPinballXConvert-It
scutters

[PLUGIN] PinballX Loading Image Changer (de-randomiser)

Recommended Posts

Here's a pretty simple plugin for pinballx to control the loading image used, so that you can have custom loading images by table or by system name. 

What does it do? 
As pinballx selects a random .png image to use as the loading image from Pinballx\Media\Loading Images folder, the plugin on pinballx startup will rename all .png file extensions in loading images to .pbu (i used pbu to indicate PngBackUp). When you select a game it will rename one file back to a .png for pinballx to use based on matching criteria. If a file is found matching the table name then that is renamed to .png, if a file is found matching the system name then that is renamed to .png, otherwise it'll just rename the default Loading image to .png (so it does assume you have this file in place even if no others). Pinballx will then use the one renamed .png file as the loading image as no other .pngs are in the folder. 

Example
I have 3 images in the Loading Images folder, Loading.png, Star Wars.png & Visual Pinball.png. On pinballx startup all files are changed to .pbu. If i then launch Star Wars the Star Wars.pbu is renamed back to Star Wars.png for use as the loading image. If i launch any other table under the system name Visual Pinball then the Visual Pinball image is renamed & used, and if I launch anything else the default Loading image is renamed and used as a catch all.

Install

Extract the contents of the zip file into your pinballx\plugins folder, unblock the dll file if required (https://www.limilabs.com/blog/unblock-dll-file) and then enable the Loading Image Changer plugin in plugin manager and you should be good to start adding png files to your loading images folder, named to match a table or system name (don't forget to leave a Loading.png file in place), table images,instruction cards, whatever..

Thanks to @chergaand @simbamame for help testing the plugin on their systems. Also thanks to @Tom Speirs and @Adultery for pinballx and the plugin template i used.

Notes

  • By default the plugin has logging enabled (log file in the plugins folder) once you're confident things are working you can disable it if you want. Please post the log file along with pinballx ini and log files if you do have issues.
  • In the plugin config screen there is an Undo Changes button, this renames all the .pbu files in Loading Images back to .png. I could have done this on each pinballx exit, but this seemed cleaner. This can be used at anytime but most likely uses would be if you've created multiple new loading images and are about to copy them across, or are installing a new version of pinballx to prevent duplicates (the plugin will not work correctly if you have a Star Wars.png and a Star Wars.pbu in the same folder as the rename operation will fail) or if a future version of pinballx supports loading images by table/system name natively, or any other time you may want to disable the plugin and go back to random loading images.
  • Plugin will also match files on table description to loading image file name. Order / hierarchy of matching is Table Name, Table Desc then System Name.
  • Theoretically the plugin will work in a similar way for GIF loading images (if you're still running a version of pinballx that supports them) - but it's not tested, because i'm not (pinballx v3.29)! ;)

 

28/02/19 V1.0.1 Update

Default now is to change all file extensions back (from pbu to png) on pinballx exit rather than via the button on config screen. As file extensions are being changed and no file copying taking place this shouldn't carry much overhead and reduces the chance of copying duplicate files into loading images. This can be disabled in config which will re-enable the manual undo button. Replace/Copy both files in the zip to your plugins folder and install as above.

 

PBXLoadingImage.zip

  • Like 2

Share this post


Link to post
Share on other sites

A great little Plugin that works :D

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×