10
« on: May 25, 2020, 11:31:09 AM »
you can try " fe.game_info(Info.Players) "
or you can mod this...
//TECNO CAB
/////////////////////////magic images/////////////////////////////////
local magic_image_settings = {
genre = { path = "genre/", ext = ".png", mode = 0 } // modes: 0 = first match, 1 = last match, 2 = random,
players = { path = "players/", ext = ".png" },
}
//return file_name for genre
function genre( offset) {
local supported = {
//filename : [ match1, match2 ]
"action": [ "action" ],
"adventure": [ "adventure" ],
"fighter": [ "fighting", "fighter", "beat'em up" ],
"maze": [ "maze" ],
"paddle": [ "paddle" ],
"pinball": [ "pinball" ],
"platformer": [ "platformer", "platform" ],
"puzzle": [ "puzzle" ],
"racing": [ "racing", "driving" ],
"rhythm": [ "rhythm" ],
"rpg": [ "rpg", "role playing", "role playing game" ],
"shooter": [ "shooter", "shooter scrolling", "shmup" ],
"sports": [ "sports", "boxing", "golf", "baseball", "football", "soccer" ],
"strategy": [ "strategy"]
}
local cat = " " + fe.game_info(Info.Category, offset).tolower()
local matches = []
foreach( key, val in supported )
foreach( nickname in val )
if ( cat.find(nickname, 0) ) matches.push(key)
if ( matches.len() > 0 ) {
if ( magic_image_settings.genre.mode == 0 ) {
return magic_image_settings.genre.path + matches[0] + magic_image_settings.genre.ext
} else if ( magic_image_settings.genre.mode == 1 ) {
return magic_image_settings.genre.path + matches[matches.len() - 1] + magic_image_settings.genre.ext
} else if ( magic_image_settings.genre.mode == 2 ) {
local random_num = floor(((rand() % 1000 ) / 1000.0) * ((matches.len() - 1) - (0 - 1)) + 0)
return magic_image_settings.genre.path + matches[random_num] + magic_image_settings.genre.ext
}
}
return magic_image_settings.genre.path + "unknown" + magic_image_settings.genre.ext
}
//return file_name for players
function players( offset ) {
local info = fe.game_info( Info.Players, offset ).tolower()
if ( info.len() >= 1 ) return magic_image_settings.players.path + info.slice(0, 1) + magic_image_settings.players.ext
return magic_image_settings.players.path + "unknown" + magic_image_settings.players.ext
}