15. January 2019 at 23:22 #6849
I’m trying to generate profiles for all of my Dos games from a list of file names. I’ve written a Python program that takes a list of filenames like this:
./4×4 Offroad Racing/4×4.exe
And generates the following:
* a collection.xml with a <game> statement like this:
* a directory under .MagicBox/Games/Data/(guid)/ that contains:
avatar.png (with no modifications)
config.xml pointing to the correct directory and executable
Temp/dosbox.config with a correct autoexec.bat
layouts.xml (with no modifications)
loopers.xml (with no modifications)
mapper.xml (with no modifications)
My problem is, it doesn’t work. When I overwrite my .MagicBox directory on my Android device and I open Magic Dosbox I have a blank collection. I think I’ve handled all of the text parsing and XML tagging correctly. Are there other files I need to modify to get these profiles to appear?16. January 2019 at 14:45 #6851
I know things like this are more for fun, and you probably don’t care about the extra amount of time it it takes to code it, but wouldn’t it be quicker and easier to simply import the games one by one? I mean, even if it’s 100 games, after an automated import, you’ll still have to edit each game profile to set up cycle options, game cover icon, touch control screen layout, etc.16. January 2019 at 15:41 #6852
Interesting point, but I actually think it was much faster for me to write this code than it would have been to manually define each game. You are right though, I will still need to edit the details of each game by hand, but one they are all in the interface I think that will be much easier. To answer your question though, this is a time saving technique for me.
Do you know if the files I listed are sufficient or if there are other places I have to define game profiles for them to show up in the UI?16. January 2019 at 17:38 #6853
For in-depth technical stuff, it’s best to ask Tony (the Magic Dosbox dev). He checks the forum very frequently, so he should respond to your question soon.17. January 2019 at 11:51 #6854
Just a thought – are you using the free version? Because it only allows one profile. I can’t tell for sure, but that might be a possible reason why the list is empty after a batch import of multiple games.17. January 2019 at 15:35 #6855
Nope, I have the paid version.18. January 2019 at 12:42 #6856
It looks good to me…maybe wrong xml locale? But maybe I can add to next version this feature. I can create game profile from each exe, com, bat on picked path18. January 2019 at 21:25 #6857
Happy to share this code and how I generated the list if that’s helpful. I don’t see a locale or language definition in the existing XML? Where would I define or validate that?18. January 2019 at 22:02 #6858
Also, does the <id></id> tag need to be anything specific, or does it just need to match the directory name in .MagicBox/Games/Data/ ?
You must be logged in to reply to this topic.