xboxscene.org forums

Author Topic: Setting Skin From Mxm.xml And Pxgame Renamer  (Read 171 times)

luma

  • Archived User
  • Jr. Member
  • *
  • Posts: 59
Setting Skin From Mxm.xml And Pxgame Renamer
« on: December 01, 2004, 10:32:00 AM »

First, a comment - seems like just about everybody here has switched to some other dashboard for daily use.  I've been using Avalaunch and UnleashX for a while now and just got around to checking out MXM.  All told, MXM seems to have quite a few rough edges, and there really isn't anything in it that makes me want to ditch UnleashX as my default dash - EXCEPT SCRIPTING!  Boy I really like the ActionScript funcitonality of MXM, and I can see myself using MXM as a utility more than a dashboard because of it.  My install CD (now using evox in a setup very similar to Slayer's) is currently being re-written to utilize the glory of MXM ActionScripts.  Enough fawning, onto the questions.

First, the situation:  I mod a lot of xboxes for resale, and I do everything I can to make sure that the software I load on those boxes is stable and simple.  My average customer doesn't know the first thing about computers, nevermind having any ability to run an FTP program, so simplicity is really an overriding factor.  Because of that the xboxes I resell use Avalaunch as the default dashboard.  For game management, nothing out there really beats the one-button simplicity of the Px HD Loader.  It's ugly, but it makes it drop-dead simple to a) copy games from dvd b) see how much free space you have, and c) delete games to make room for new games, all in one easy interface.  As we all know, the one big downside is it's retarded folder naming standard.  I found DBZRacer's script for renaming the folders useful, but I wanted something even more simple.

So....  I'm working on using MXM as a sort of utility with one function: rename PxGame folders to the XBE game name and back again if desired.  I want this to be easy to launch from Ava (or whatever) and simple to use.  I've removed all the prompting from the script - when you run it, it just goes ahead and renames all the folders in E:\HDDLoader and F:\HDDLoader and then displays a brief message telling you what it's done.  Here's what I created (again with a heavy debt to DBZRacer)

CODE

 

   0
   0
   0
   0
   0
   false
   ::Simplicity Remix
   ::Simplicity Remix
 



 
   PXGame to Game Name
   px2game.png
   
    ;Set this to the desired target folder for games (no drive letter)
     SET SourceFolder "HDDLoader"

    ; Initialization
     SET RenameCount "0"

     :EDriveRename
     SETFUNC FolderEmpty PATHEMPTY E:\%SourceFolder%
     IF %FolderEmpty% == "1" GOTO FDriveRename
     SET GamePath "E:\\%SourceFolder%"
     GOTO DefineSearch

     :FDriveRename
     SETFUNC FolderEmpty PATHEMPTY F:\%SourceFolder%
     IF %FolderEmpty% == "1" GOTO DoneSearch
     SET GamePath "F:\\%SourceFolder%"
     GOTO DefineSearch


     :DefineSearch
     BEGINSEARCH %GamePath%\pxgame*
     GOTO SearchTop

     :SearchTop
     IF %search_type% == "dir" GOTO DIRFound
     IF %search_type% == "file" GOTO NextSearch
     IF %GamePath% == "E:\\%SourceFolder%" goto FDriveRename
     GOTO DoneSearch

     :DIRFound
     SETFUNC GameTitle XBETITLE %GamePath%\%search_name%\default.xbe

    ; strip the crap
     SETFUNC CleanTitle FatXify %GameTitle% ""

     BeginDraw UseCurrent
     MessageBox "Renaming %search_name% to %CleanTitle%"
     EndDraw

    ; rename it
     RENAME %GamePath%\%search_name% %GamePath%\%CleanTitle%
     ADD RenameCount 1

     :NextSearch
     SearchNext
     GOTO SearchTop

     :DoneSearch
     EndSearch
     BeginDraw UseCurrent
     MessageBox "Renamed %RenameCount% folder(s)."
     EndDraw
     Delay 3
     QUIT
   

 

 
   Game Name to PXGame
   game2px.png
   
    ;Set this to the desired source folder for games (no drive letter)
     SET SourceFolder "HDDLoader"

    ; Initialization
     SET RenameCount "0"

     :EDriveRename
     SETFUNC FolderEmpty PATHEMPTY E:\%SourceFolder%
     IF %FolderEmpty% == "1" GOTO FDriveRename
     SET GamePath "E:\\%SourceFolder%"
     SET PXNumber "-1"
     GOTO DefineSearch

     :FDriveRename
     SETFUNC FolderEmpty PATHEMPTY F:\%SourceFolder%
     IF %FolderEmpty% == "1" GOTO DoneSearch
     SET GamePath "F:\\%SourceFolder%"
     SET PXNumber "-1"
     GOTO DefineSearch

     :DefineSearch
     BEGINSEARCH %GamePath%\*
     GOTO SearchTop

     :SearchTop
     IF %search_type% == "dir" GOTO DIRFound
     IF %search_type% == "file" GOTO NextSearch
     IF %GamePath% == "E:\\%SourceFolder%" goto FDriveRename
     GOTO DoneSearch

     :DIRFound
     SETFUNC FindDefault FILEEXISTS %GamePath%\%search_name%\default.xbe
     IF %FindDefault% == "1" GOTO PxFind
     GOTO NextSearch

    ; Loop until we find the next PxGame name
     :PxFind
     ADD PXNumber 1
     SETFUNC PxCheck FILEEXISTS %GamePath%\PxGame%PXNumber%
     IF %PxCheck% == "1" GOTO PxFind

     BeginDraw UseCurrent
     MessageBox "Renaming %search_name% to PxGame%PXNumber%"
     EndDraw

    ; rename it
     RENAME %GamePath%\%search_name% %GamePath%\PxGame%PXNumber%
     ADD RenameCount 1

     :NextSearch
     SearchNext
     GOTO SearchTop

     :DoneSearch
     EndSearch
     BeginDraw UseCurrent
     MessageBox "Renamed %RenameCount% folder(s)."
     EndDraw
     Delay 3
     QUIT
   

 

 
  Reboot
  reboot.png
  reboot
 

 
  mxm
  px2game.png
  f:\apps\mxm\default.xbe
 




Now, my question:  I can't seem to get it to use the ::Simplicity Remix skin.  Every time it starts up, it just selects a random skin.  Likewise, it is auto-adding items to the menu which I don't want either.  Do I have the <config> portion of the XML screwed up?  MXM just seems to ignore it.

Next question:  Is there any way to speed up the initialization of MXM?  I really don't need FTP support, or menu caching, or much of anything else - I just want to select one of the options and run the script, no more.  I'm led to understand there's no way to disable the silly Matrix-style text trails, but speeding up the init at all would be helpful.  Any tips?

If you want a copy of this with the .PNG icon files (just add your own MXM default.xbe), you can snag a copy here <
Logged