Author Topic: UltraStik 360 plugin question  (Read 2429 times)

KhenemetHeru

  • Newbie
  • *
  • Posts: 3
    • View Profile
UltraStik 360 plugin question
« on: November 06, 2016, 07:45:01 PM »
With the UltraStik 360 plugin, is there a way to modify the script to send a default configuration via UltraMap to the stick on selecting a game if there is no .ugc file found? As I understood it from the plugin's description, that's what it is supposed to do, but it does not do this in practice.

I'm forced to use "control" as the maps_info variable in the Attract Mode plugin settings because I can't realistically hand-create .ugc files for 9000+ games by name (that are all the right type), and while mostly it works by control type, when I load up Battle Zone for example, it tries to locate a .ugc with a null filename, because there's apparently no control type listing associated with the game from MAME's xml & ini files, and it errors out. ("Cannot find C:\Emulation\UltraMap\Maps\.ugc" is pretty close to the error shown in the dialog box, off the top of my head)

I'd like to reconfigure the plugin script to use a routine something like if control.ugc is found, then send control.ugc, else send 8-way_default.ugc in the section for loading a game, so that it will load the default the same way it does in the game exit section if no other file is found.

Transition.ToGame is the part I mean:
Code: [Select]
function ultra_plugin_transition( ttype, var, ttime ) {

if ( ScreenSaverActive )
return false;

switch ( ttype )
{
case Transition.ToGame:
fe.plugin_command( config["command"],
"\"" + maps_dir
+ fe.game_info( maps_info )
+ config["maps_ext"] + "\"" );
break;

case Transition.FromGame:
fe.plugin_command( config["command"],
"\"" + maps_dir
+ config["default_map"]
+ config["maps_ext"] + "\"" );
break;
}

return false; // must return false
}

Is this possible?