Jump to content



Photo
- - - - -

analog999's Hyperpin Table Manager


  • Please log in to reply
39 replies to this topic

#1 analog999

analog999

    Enthusiast

  • Platinum Supporter
  • 149 posts
  • Location:Washington

  • Flag: United States of America

  • Favorite Pinball: Tron LE

Posted 04 March 2012 - 09:28 AM

analog999's Hyperpin Table Manager

I wrote a table manager that abstracts the XML database so that you can manage tables quickly and efficiently. It will import your entire table directory automatically for you if you are just starting out. If you have an existing XML database, it will import it. You can enable and disable tables, update and manage images and videos with this tool.



Documentation:

Microsoft .NET 4 Required

Installation:
Copy the executable somewhere on your hard drive. Be sure .Net 4 framework is installed on your computer. Know your file locations from the hyperpin settings.ini file.

How to use:
1) Run the program. Change the directories to match your directories (button upper left corner). Make sure you put a \ at the end as in the example.

2) If you have an existing Visual Pinball.XML file that you are currently happy with, click the button "Import XML". This will load your file into the program. Then, click "Save DB" to save the database - it is saved in an alternate textual format. At this time, a backup of your original Visual Pinball.XML file will have been created if you ever need it again. Once you've imported the XML once, don't do it again (or if you do, don't save!)

3) Click the "Refresh Tables" button. If starting from scratch, this will load all the table names into the left list. If you have imported an XML, or loaded a previously created database, this will add any new tables to the database since you've last run the software. If you're loading a previously created database, and no new tables have been copied into the directory, you can skip this step.

4) Click the "Load Images" button. This will load all the filenames and paths for the Backglass Images, Table Images, Wheel Images and Table Videos on the right. You must do this every time you are going to be adding or changing image files.

5) Now, click the "Save DB" to save the database.

6) To edit a table, click on it's name on the left hand column. It will load the game name, and any previously saved settings into the text fields in the middle area.

7) To make a change, just change the values of the fields and they will automatically update. However, you still need to save your database whenever you're finished working on it. It's not a bad idea to just save periodically as you're working, especially if you're doing a lot of tables.

8) To associate an image with the table, click on the filename in the lists on the right hand side. You'll see what the image looks like in the preview below the image text fields. If you want to pick a different file, just click on them.

You can always see the image again by clicking on the text field that shows the full path of the image.

Realize that the Description must match the name of the images you're going to use!

You'll notice that if there is information missing in the fields above, clicking on image filenames that have parenthesis "( )" in them will automatically attempt to fill out some of the information. If it is successful in loading this data, it will also select that any game made prior to 1976 is a EM. There is at least one SS made in 1975, and I wasn't sure so I just picked 1976 as a random date.

In addition to filling out information for you, it will also attempt to find the matching table, wheel and video files, if they're named the same as the image you just clicked on. If you've already set an image to be something, it won't automatically do this conversion for you.

If you want to reset the Description (and data if it can figure it out) based on the image you're interested in, click the SD button next to that text field once the text field has been set.

Now, let's say that you have an image file that doesn't match the rest of the files. You can press the Copy button next to that file, and it will automatically copy the image you've selected to the appropriate location with the filename that matches the description. This WILL overwrite the file if it exists, so use with caution. The original file will remain intact. This feature is nice because, say for example, if you have multiple backglass images for one table, you can easily change back and forth by just clicking the backglass image list, and then clicking the Copy button.

Also, you can filter the results of the image list by typing in the Search Filter text field above Backglass Images. This will help you quickly locate the appropriate image you're looking for. Just type in, say "Attack" and you will see all results with the word "Attack" in it.

9) When you're ready to move on to the next game, just click another game on the left.

10) When you're done editing, click "Save DB" to save your work.

11) Once you've saved the DB, you should save the XML file by clicking "Save XML".. this generates the Visual Pinball.xml file based on the information in the database.

12) FYI, You must click the Visible checkbox in order to see the table! By default, they're invisible. That's because I personally only want to have a handful of games running on my system. If you want to quickly change them all to visible, open the DB file: hyperpin\databases\hyperpin-gamedbvp.txt and search and replace |False with |True

------------------------------------------

That's about it. If you have any questions, feature requests or comments, I'm all ears.


VERSION HISTORY

v0.9 - Initial release. No version information in form title.

v1.0 - Added ability to set all necessary directories. No version information in form title.

v1.1 - Implemented file backup option with image copy buttons. Fixed bug where import xml did not work if xml tag was missing from visual pinball.xml. Added version number to form title.

v1.1 FP - Future Pinball Version Created

v1.2 VP & FP

- Decided not to put both programs into one for ease of development. Made changes to source to simply build process.

- Now loads images once directories are set. Note, if you have run a prior version, click the set directories button and press ok. Exit and restart and it will now load on program start.

- Load DB once directories are set (see just above)

- Table list filter. Click X to clear, added X to image filter as well. Also, changing table filter immediately changes image filter to the same as the table filter. You can change image filter independently, but this helps save time.

- If database has description, or if importing XML from a new install, auto loads image file names if entry blank and if file exists. Does not auto load videos

- Fixed bug where software was saving XML with & as literal ampersand, rather than & Note, if you are importing an xml file generated with a prior version, you must first search and replace all &'s with & in the XML, otherwise the XML will not load.

- Search forums for game description button

- Search IPDB for game description button

- Search VPForums.org downloads section for description button

- One click save saves DB and XML


v1.3 VP & FP

- Support for tables in nested subdirectories of tables folder

- Check box to ignore visibility option and save all in database to XML

- If on a copy the destination file doesn't exist, delete old file to help keep image/video folders cleaner.


FEATURE REQUESTS

UVP Support

Search/Filter game list based on image

Identify missing files

Link roms so that registry edits can be made

DOWNLOAD CURRENT VERSION:

Attached Files


Edited by analog999, 13 March 2012 - 08:06 PM.


#2 maceman

maceman

    Home Pinball Machine Collector/ Restorer

  • VIP
  • 2,271 posts
  • Location:Canada, Eh!

  • Flag: Canada

  • Favorite Pinball: ....**Haunted House**....



Posted 05 March 2012 - 02:32 AM

Hey man, this looks very interesting. You scared with the "backup first" notice smile.gif ....

I know, i know, just covering your butt.... argh...i am going to try it now. i hope it works smile.gif

Maceman


EDIT: argh.. Okay, i guess this won't work for me because my directory structure is different. I don't want to move my structure. Is there a way to change the structure to match our own, and have the program remember those settings?? Thanx for your work here regardless if it works out for me or not!!

Edited by maceman, 05 March 2012 - 02:36 AM.

________________________________________________________________________________
Canada Eh!
hm_avatar.pngss_avatar.jpg MODS ys_avatar5.jpggenie_avatar.pngj2o_avatar.png

#3 analog999

analog999

    Enthusiast

  • Platinum Supporter
  • 149 posts
  • Location:Washington

  • Flag: United States of America

  • Favorite Pinball: Tron LE

Posted 05 March 2012 - 05:48 AM

QUOTE (maceman @ Mar 5 2012, 02:32 AM) <{POST_SNAPBACK}>
EDIT: argh.. Okay, i guess this won't work for me because my directory structure is different. I don't want to move my structure. Is there a way to change the structure to match our own, and have the program remember those settings?? Thanx for your work here regardless if it works out for me or not!!


If your directories are different, then I'm sure there are others. I was just trying to save myself some time by cutting a corner I thought would work for most people. I guess I was wrong. Fixed it, so now you can set all the directories. Please try it again and let me know if you have any other comments.

As far as scaring people, that wasn't my intention, but I don't want people to be pissed off at me if my software wrecked their setup. It should be no problem though, as the first thing it does when you import your current visual pinball.xml is to create a backup.

Thanks

The one thing I would like to improve is to add a filter on the left listbox, but the way I wrote the code to start doesn't allow me to easily do that. It will take a bit of rework to make that happen, and I don't really want to bother unless a good number of people think this tool is actually of value to them.


Edited by analog999, 05 March 2012 - 05:53 AM.


#4 xio

xio

    Pinball Fan

  • Platinum Supporter
  • 583 posts

  • Flag: France

  • Favorite Pinball: Recent ones rather than old ones, unlike wine

Posted 05 March 2012 - 08:57 AM

I spent all my free time during the last month setting up my 350 tables in HP, why didn't you come earlier ? biggrin.gif

Though, it's not only xml editing that takes time, but also finding the right images, adding UVP (maybe you could add UVP support ?) in directory & in script, resizing FP tables, turning & positioning DMD (thx SetDMD for helping on this), etc...

Anyway I'll give a try to your program, thx for your work.

About Directories : for FP tables I sometimes have a subfolder for the table (so the xml is subfolder\table.fpt), will it be supported also ?

#5 analog999

analog999

    Enthusiast

  • Platinum Supporter
  • 149 posts
  • Location:Washington

  • Flag: United States of America

  • Favorite Pinball: Tron LE

Posted 05 March 2012 - 03:47 PM

QUOTE (xio @ Mar 5 2012, 08:57 AM) <{POST_SNAPBACK}>
I spent all my free time during the last month setting up my 350 tables in HP, why didn't you come earlier ? biggrin.gif

Though, it's not only xml editing that takes time, but also finding the right images, adding UVP (maybe you could add UVP support ?) in directory & in script, resizing FP tables, turning & positioning DMD (thx SetDMD for helping on this), etc...

Anyway I'll give a try to your program, thx for your work.

About Directories : for FP tables I sometimes have a subfolder for the table (so the xml is subfolder\table.fpt), will it be supported also ?


I think it should work for importing your existing XML file, and you could go in and edit the txt file afterward to manually "import" them into the DB afterwards, but it won't just pick them up using the Refresh Tables button. I could probably scan subdirectories, it's just more work. Is there a reason why your games are in their own folders?

I agree it's the image management that takes time, hence why I tried to make it as easy as possible. I was doing some editing of my own last night and the one thing I would like to handle differently in the next version of the software is to backup the existing image before it's overwritten if you use the copy button.

I'm not running UVP on my setup, so I'm not sure how the UVP setup works, or what files needs to be edited.

I agree, the resizing of the FP tables sucks bigtime. I don't know why he doesn't just attempt to stretch the table to the dimensions of your screen and then let you fine tune. Unless the file format was known, editing this would be impossible without the FP code, and we all know that isn't going to happen any time soon.

As for the DMD positioning, I agree as well, and that's one of the reasons I want to buy Russ' board, I think that the only thing that you'll have to do once you have his board is maybe turn the DMD off in the script. Again, though, I don't know why VP (or actually, it's probably pinmame) wasn't designed so that you could have a default position and window size, and then adjust for specific games if necessary. Editing this would require writing an editor based on the pinmame code.

Edited by analog999, 05 March 2012 - 04:09 PM.


#6 xio

xio

    Pinball Fan

  • Platinum Supporter
  • 583 posts

  • Flag: France

  • Favorite Pinball: Recent ones rather than old ones, unlike wine

Posted 05 March 2012 - 04:27 PM

QUOTE (analog999 @ Mar 5 2012, 04:47 PM) <{POST_SNAPBACK}>
I think it should work for importing your existing XML file, and you could go in and edit the txt file afterward to manually "import" them into the DB afterwards, but it won't just pick them up using the Refresh Tables button. I could probably scan subdirectories, it's just more work. Is there a reason why your games are in their own folders?


I had to make subfolders for some FP tables beacause they use the same filenames for resources files (.fpl if I remeber well). When I discovered that HP can work with subfolders I had already made up 90% of the tables, so I did not change everything, but it's mcuh easier to manage with subfolders than having all in one folder.

QUOTE (analog999 @ Mar 5 2012, 04:47 PM) <{POST_SNAPBACK}>
I agree it's the image management that takes time, hence why I tried to make it as easy as possible. I was doing some editing of my own last night and the one thing I would like to handle differently in the next version of the software is to backup the existing image before it's overwritten if you use the copy button.


Or choose to backup. If not you're going to have a great number of useless PNG.

QUOTE (analog999 @ Mar 5 2012, 04:47 PM) <{POST_SNAPBACK}>
I'm not running UVP on my setup, so I'm not sure how the UVP setup works, or what files needs to be edited.


You must have a .uvp file (with description filename) in the Ultra VP folder within HP folder. And modify the call to Vpinmame in a call to UltraVP in the table script.


QUOTE (analog999 @ Mar 5 2012, 04:47 PM) <{POST_SNAPBACK}>
I agree, the resizing of the FP tables sucks bigtime. I don't know why he doesn't just attempt to stretch the table to the dimensions of your screen and then let you fine tune. Unless the file format was known, editing this would be impossible without the FP code, and we all know that isn't going to happen any time soon.


I think they have tools to decompress fpt files at gopinball, so file format must be known

QUOTE (analog999 @ Mar 5 2012, 04:47 PM) <{POST_SNAPBACK}>
As for the DMD positioning, I agree as well, and that's one of the reasons I want to buy Russ' board, I think that the only thing that you'll have to do once you have his board is maybe turn the DMD off in the script. Again, though, I don't know why VP (or actually, it's probably pinmame) wasn't designed so that you could have a default position and window size, and then adjust for specific games if necessary. Editing this would require writing an editor based on the pinmame code.


There's a default size & position. It's what I did with SetDMD : modify the first table DMD, set it as default => all new rom will be at this position/size.


#7 analog999

analog999

    Enthusiast

  • Platinum Supporter
  • 149 posts
  • Location:Washington

  • Flag: United States of America

  • Favorite Pinball: Tron LE

Posted 05 March 2012 - 05:47 PM

QUOTE (xio @ Mar 5 2012, 04:27 PM) <{POST_SNAPBACK}>
I had to make subfolders for some FP tables beacause they use the same filenames for resources files (.fpl if I remeber well). When I discovered that HP can work with subfolders I had already made up 90% of the tables, so I did not change everything, but it's mcuh easier to manage with subfolders than having all in one folder.


Okay, I'll see what I can do. It shouldn't be too difficult.

QUOTE (xio @ Mar 5 2012, 04:27 PM) <{POST_SNAPBACK}>
QUOTE (analog999 @ Mar 5 2012, 04:47 PM) <{POST_SNAPBACK}>
I agree it's the image management that takes time, hence why I tried to make it as easy as possible. I was doing some editing of my own last night and the one thing I would like to handle differently in the next version of the software is to backup the existing image before it's overwritten if you use the copy button.

Or choose to backup. If not you're going to have a great number of useless PNG.

Yes, that's so simple, I don't know why I didn't think of that. The next rev will include this option.


QUOTE (xio @ Mar 5 2012, 04:27 PM) <{POST_SNAPBACK}>
You must have a .uvp file (with description filename) in the Ultra VP folder within HP folder. And modify the call to Vpinmame in a call to UltraVP in the table script.

Sounds exactly like the images and movie. I should be able to easily add this to the manager, but it won't include modifying the table script.

QUOTE (xio @ Mar 5 2012, 04:27 PM) <{POST_SNAPBACK}>
I think they have tools to decompress fpt files at gopinball, so file format must be known


Interesting, I'll have to take a look at that. Could be a big time saver to whip something up. Although it's not high on my radar.

QUOTE (xio @ Mar 5 2012, 04:27 PM) <{POST_SNAPBACK}>
There's a default size & position. It's what I did with SetDMD : modify the first table DMD, set it as default => all new rom will be at this position/size.

Didn't know that either. Good to know, that will save me a lot of time (but still waiting for Russ' board!)


#8 xio

xio

    Pinball Fan

  • Platinum Supporter
  • 583 posts

  • Flag: France

  • Favorite Pinball: Recent ones rather than old ones, unlike wine

Posted 06 March 2012 - 07:08 PM

When I try to import xml I got this error :


Though, the program did find the xml file, as it made a backup (named "Visual Pinball.xml.original.2012-3-6_08-03")

#9 analog999

analog999

    Enthusiast

  • Platinum Supporter
  • 149 posts
  • Location:Washington

  • Flag: United States of America

  • Favorite Pinball: Tron LE

Posted 06 March 2012 - 07:12 PM

QUOTE (xio @ Mar 6 2012, 07:08 PM) <{POST_SNAPBACK}>
When I try to import xml I got this error :
Though, the program did find the xml file, as it made a backup (named "Visual Pinball.xml.original.2012-3-6_08-03")



Can you PM me or attach a copy of your XML file so I can debug it please?

Thanks

Edited by analog999, 06 March 2012 - 07:12 PM.


#10 analog999

analog999

    Enthusiast

  • Platinum Supporter
  • 149 posts
  • Location:Washington

  • Flag: United States of America

  • Favorite Pinball: Tron LE

Posted 06 March 2012 - 08:30 PM

Xio, thanks for sending it over. This was an easy fix. Add this line to the top of your XML file, using notepad or another text editor:

CODE
<?xml version="1.0" standalone="yes"?>

Edited by analog999, 06 March 2012 - 08:31 PM.


#11 analog999

analog999

    Enthusiast

  • Platinum Supporter
  • 149 posts
  • Location:Washington

  • Flag: United States of America

  • Favorite Pinball: Tron LE

Posted 06 March 2012 - 09:02 PM

QUOTE
I'm at step 6 (after having imported my XML file) : is it normal that no association is shown between table & images ? when I click on a table, only the upper text fields are filled (name, description, ...), there's nothing in BG, wheel, etc..

Also, all tables are invisible by default ?


Yes, it is normal. Unless you want to change images, you don't need the images area filled in, so it doesn't go try to find them on the import. Yes, all tables are invisible by default. See the documentation (12)

Edited by analog999, 06 March 2012 - 09:24 PM.


#12 analog999

analog999

    Enthusiast

  • Platinum Supporter
  • 149 posts
  • Location:Washington

  • Flag: United States of America

  • Favorite Pinball: Tron LE

Posted 07 March 2012 - 09:36 PM

Version 1.1 released with copy button backup option and fix for those who import an xml file that is missing the XML header tag.

#13 analog999

analog999

    Enthusiast

  • Platinum Supporter
  • 149 posts
  • Location:Washington

  • Flag: United States of America

  • Favorite Pinball: Tron LE

Posted 08 March 2012 - 04:32 PM

Future Pinball Version Released.

#14 Zablon

Zablon

    Pinball Fan

  • Members
  • PipPipPipPip
  • 642 posts

  • Flag: United States of America

  • Favorite Pinball: Funhouse

Posted 08 March 2012 - 05:08 PM

Going to try this out. I've been doing it all by hand so I have it down to an art..but as of late, I've been having an issue with backglasses not loading in hyperpin. Maybe I'm just fudging something, this could help smile.gif

#15 xio

xio

    Pinball Fan

  • Platinum Supporter
  • 583 posts

  • Flag: France

  • Favorite Pinball: Recent ones rather than old ones, unlike wine

Posted 08 March 2012 - 05:27 PM

U're coding faster than I test biggrin.gif

I did a few tries with v1.0, but I still have to see what it makes when you want to add a table. It's not easy to test with an already working installation.

On a very first idea, here are some things I think would be useful (but maybe I'm not using it the right way) :
- table/images association, so when you click on one file you can easily see if it's linked to one or more files. I would have it on program start, but I don''t understand why images aren't loaded by default
- to have a check button or something, to identify missing files, and a "search help" (a link to VPF search on table description (if that's OK with VPF team of course), or to google, or ?)






#16 analog999

analog999

    Enthusiast

  • Platinum Supporter
  • 149 posts
  • Location:Washington

  • Flag: United States of America

  • Favorite Pinball: Tron LE

Posted 08 March 2012 - 06:16 PM

QUOTE (xio @ Mar 8 2012, 06:27 PM) <{POST_SNAPBACK}>
U're coding faster than I test biggrin.gif

I did a few tries with v1.0, but I still have to see what it makes when you want to add a table. It's not easy to test with an already working installation.

Don't know what to tell you here, I think it's pretty easy to test with an working install. I wouldn't not use my software, it is such a time saver. I can make changes to the XML really quickly with this tool.

QUOTE (xio @ Mar 8 2012, 06:27 PM) <{POST_SNAPBACK}>
- table/images association, so when you click on one file you can easily see if it's linked to one or more files. I would have it on program start, but I don''t understand why images aren't loaded by default


Well initially the directories aren't set to specific installations, so that's why I didn't load the images automatically. I could auto load them once the directories are set, I just have to flag that they've been done. I'll put that feature in the next revision. You have to remember that this was just a quick and dirty tool that I whipped up while I was at my mother in law's over the weekend. The button was there for testing and it just kind of stuck... in other words, just laziness. whistle.gif

QUOTE (xio @ Mar 8 2012, 06:27 PM) <{POST_SNAPBACK}>
- to have a check button or something, to identify missing files, and a "search help" (a link to VPF search on table description (if that's OK with VPF team of course), or to google, or ?)


That would be easy to do.

I have some additional ideas myself. Like filtering the game list.. linking roms and turning off/on direct draw for a table. Filtering the game list.. save the XML when the DB is saved.. Filtering the game list..

Edited by analog999, 08 March 2012 - 06:17 PM.


#17 xio

xio

    Pinball Fan

  • Platinum Supporter
  • 583 posts

  • Flag: France

  • Favorite Pinball: Recent ones rather than old ones, unlike wine

Posted 09 March 2012 - 06:58 PM

I wanted to try out with new added table Jigglebox. I downloaded both table & Media Pack.

So I deleted databases & started again from step 1 : import xml, save DB. I restarted ATM, load DB, and Refresh tables.

Finding "Jigglebox" was not easy, how is it sorted ? (about that, maybe an alphabetic sorting option would be great)

Then I loaded images, choosed the BG, PF & W images by clicking on them (I don't know if I had to do that?).

Next I filled the table description (copy/paste from one image filename), manufacturer (I've put JP Salas on some tables, maybe the program won't like it as there's a list), year, & made it visible.

Clic Save DB & Save XMl. I launched HP, Jigglesaw was here & working. Test.... succeed biggrin.gif

Now I may need to make better use of the tool, but it worked well on my first real try, thx Analog wink.gif

#18 analog999

analog999

    Enthusiast

  • Platinum Supporter
  • 149 posts
  • Location:Washington

  • Flag: United States of America

  • Favorite Pinball: Tron LE

Posted 09 March 2012 - 07:06 PM

QUOTE (xio @ Mar 9 2012, 06:58 PM) <{POST_SNAPBACK}>
I wanted to try out with new added table Jigglebox. I downloaded both table & Media Pack.

So I deleted databases & started again from step 1 : import xml, save DB. I restarted ATM, load DB, and Refresh tables.

Finding "Jigglebox" was not easy, how is it sorted ? (about that, maybe an alphabetic sorting option would be great)

Then I loaded images, choosed the BG, PF & W images by clicking on them (I don't know if I had to do that?).

Next I filled the table description (copy/paste from one image filename), manufacturer (I've put JP Salas on some tables, maybe the program won't like it as there's a list), year, & made it visible.

Clic Save DB & Save XMl. I launched HP, Jigglesaw was here & working. Test.... succeed biggrin.gif

Now I may need to make better use of the tool, but it worked well on my first real try, thx Analog wink.gif


I know - finding tables is not easy. That's why I need to re-write the table list as a filterable list. It's a bit of work though, unfortunately.

If you are starting with a blank list and refresh the tables, then they will be sorted by table file name in alphabetical order.

You shouldn't need to delete the database to add one table. Just refresh the table list once the database has been loaded. If you do this, then the new table should be added to the very end of the list.

You do not need to add the images. It's just there to help you manage them if you have multiple files, and to help fill out the description/manufacturer/year/type data. The software pulls that info directly from the media pack's image file name once you've located it.

FYI, updates are going to come slow. I initially wrote this tool for my use, and it's working great for me. I'll work on the feature requests as I have time. The idea to search for missing images is a good one and will be one of my top priorities for the software.

Edited by analog999, 09 March 2012 - 07:12 PM.


#19 xio

xio

    Pinball Fan

  • Platinum Supporter
  • 583 posts

  • Flag: France

  • Favorite Pinball: Recent ones rather than old ones, unlike wine

Posted 09 March 2012 - 09:10 PM

QUOTE (analog999 @ Mar 9 2012, 08:06 PM) <{POST_SNAPBACK}>
FYI, updates are going to come slow. I initially wrote this tool for my use, and it's working great for me. I'll work on the feature requests as I have time. The idea to search for missing images is a good one and will be one of my top priorities for the software.


There's no hurry ! Thanks for sharing it and u've got all the time you need to improve it

#20 numiah

numiah

    Pinball Fan

  • Validating
  • PipPipPipPip
  • 984 posts
  • Location:Netherlands

  • Flag: Netherlands

  • Favorite Pinball: TOTAN

Posted 10 March 2012 - 08:41 AM

Thank you for sharing this GEM.
Works a treat !

**Each pinball machine is a tiny universe... that we control.**