Maybe 'nested' variables would work ? See https://github.com/RetroPie/EmulationStation/pull/703