Jump to content
LaunchBox Community Forums

A Quick Control Scheme Maker Somebody May Want.


Recommended Posts

Ok first off, I whipped this together in around an hour and it could probably be improved, but it fully fits the bill for what I needed.
I thought I'd throw it on here as somebody else may want or need something like it.

Basically, I wanted a control map per game that I could show during a startup screen/theme. So I made a base image/project in gimp, and exported all the varieties that I would need. In my case this is a 6 button layout in the format of:
3 4 6
1 2 5
The numbers are strange because players 3 and 4 only have 4 buttons, but I digress.
My different layouts have the form of coin, start, both or none, and then how many buttons I'm showing in the layout (1-6).

I wanted to make a quick python script that you could enter which flavor (coin, start, both, or none), then how many buttons, and a title. Then based on your selection you would be prompted for what you would want as a label for each button. I then put all of that onto the image, and save it as title.png in the folder I'm using as storage. I then just add the image through launch box as my controller panel and I can directly use it in my startup theme.

If you want to use this, you just need a python 3 install. And then run a "pip install pillow" to get the library I use.

I've included my controller template project, the exported png's that I use for my base images, and the python script that does the magic (map_maker).

Anybody could quickly change the default maps etc and paths. As well as the dictionary/look up table that places labels. I just thought somebody may want something like this, and could use it as a starting point.

I probably didn't need all the different flavors, but I was being picky and wanted unused buttons to be greyed out when not in use.

Good Luck!controller_stuff.zip

xbox_map.png

arcade_dummy.png

  • Like 1
Link to comment
Share on other sites

  • 5 months later...

It's a neat idea, showing a controller map image as part of the game launch/details.

I think I'd probably go for a little built in editor where the background controller image is selected/uploaded for a game, and then a bit of xml definition which describes the coordinates of text labels, and have Launchbox render the image and the labels over the top on demand via a plugin.

But regardless of approach, this seems like it might be a fair bit of work to assign everything. Maybe just per platform to show where the user controller maps to the original platform controller would be an easier base approach.

Link to comment
Share on other sites

The xml would probably work (and be better in all honesty).

But I know python better than xml, so I went sledgehammer mode and bashed it until it fit the need lol.

Yeah I got it working on my splash screen by uploading the image as the control board or something like that. Then you can directly access that image as it's in the game's object variable that the theme xml stuff uses.

I'm sure there is probably a way to parameterize the button labels, I just don't know how to get it from the game info to the xml (ie pass it from one to the other). The theme stuff is global, so it relies on all the games defines, so you could point the theme at a generic control board for the overlay like you say.

I just make sure that a game has fanart backgrounds (or I add some) then every game launching can use that and the game specific controller image in the theme. Like I said sledgehammer, but now that it's set up, I only update it when I add new games.

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...