Fatfingers,
From the way I understamd the plugin technology works, there should be a record available to your plugin that contains info about the selected/launched game (see below).
See the below excerpt from the Mala Plugin SDK pdf.
I think, instead of having UGC files for every game, maybe you can create the standard configs - ie, 8way.ugc, 4way.ugc, etc - and based on what is in
"InputControl: Pchar; : Control type (mame.xml)" - you can call the correct UGC.
I haven't tried it, but it seems possible.
What do you think?
type
TEventGame = record
Description: Pchar; : Name of the game
Rom: Pchar; : Rom file of the game
CloneOf: Pchar; : Master rom file if any
Manufacturer: Pchar; : Manufacturer of the game
Genre: Pchar; : Genre of the game (catver.ini)
Year: Integer; : Year
InputButtons: Integer; : Count of input buttons (mame.xml)
InputCoins: Integer; : Count of coins (mame.xml)
InputPlayers: PChar; : Count of players + alternating
InputControl: Pchar; : Control type (mame.xml)
VideoScreen: Pchar; : Screen type
VideoOrientation: Pchar; : Screen orientation
VideoWidth: Integer; : Width of screen
VideoHeight: Integer; : Height of screen
DriverStatus: Pchar; : Driver status
Controls: Pchar; : Control type (controls.ini)
JoyUp: Pchar; : Game function Joy Up (controls.ini)
JoyDown: Pchar; : Game function Joy Down (controls.ini)
JoyLeft: Pchar; : Game function Joy Left (controls.ini)
JoyRight: Pchar; : Game function Joy Right (controls.ini)
Button1: Pchar; : Game function Button 1 (controls.ini)
Button2: Pchar; : Game function Button 2 (controls.ini)
Button3: Pchar; : Game function Button 3 (controls.ini)
Button4: Pchar; : Game function Button 4 (controls.ini)
Button5: Pchar; : Game function Button 5 (controls.ini)
Button6: Pchar; : Game function Button 6 (controls.ini)
Button7: Pchar; : Game function Button 7 (controls.ini)
Button8: Pchar; : Game function Button 8 (controls.ini)
Details: Pchar; : Control details (controls.ini)
RomPath: Pchar; : Path of rom file
Extension: Pchar; : Extension of rom file
Played: Integer; : Play counter
end;