Generating a Magic Dosbox game profiles from file names

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #6849
    wigginjs
    Participant

    Hi,

    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:

    ./10th Frame/bowl.exe
    ./11THHOUR/#STARTME.BAT
    ./1869/1869.EXE
    ./1942 pacific/1942.exe
    ./3SISTERS/#startme.BAT
    ./4×4 Offroad Racing/4×4.exe

    And generates the following:
    * a collection.xml with a <game> statement like this:
    <game>
    <id>f91c853e-672e-4af7-af19-5aa58cf0375f</id>
    <type>item</type>
    <avatar>avatar.png</avatar>
    <description>10th Frame</description>
    </game>

    * 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?

    #6851
    Al ex
    Keymaster

    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.

    #6852
    wigginjs
    Participant

    Hi Alex,

    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?

    #6853
    Al ex
    Keymaster

    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.

    #6854
    Al ex
    Keymaster

    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.

    #6855
    wigginjs
    Participant

    Nope, I have the paid version.

    #6856
    admin
    Keymaster

    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 path

    #6857
    wigginjs
    Participant

    Hi,

    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?

    #6858
    wigginjs
    Participant

    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/ ?

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.