How much are you into programming or scripting.? There is a API Documentation of how Galaxy communicates with Plugins and it should explain a lot of things if you have experience. You can find it here:
https://galaxy-integrations-python-api.readthedocs.io/en/latest/overview.html#features But let me run you through the important things:
1. you basically need a manifest file and a running script. You can copy the examples from the page and create a plugin.py and a manifest.json
2. create yourself an uuid. easiest way is to use a online randomizer or something like this.
https://guidgenerator.com/
Add this uuid in your manifest.json instead of the xxxxx placeholder. Change the other data like author, email if you want. but its not needed
3.Decide a plattform you wish to create this plugin for. Check the Plattform ID List in the documentation and decide what you need. you can also always start with "test" which is already set in the manifest.json you copied and change it later. You need to change your plattform in the plugin.py file as well. There is a plattform definition on line 11:
Platform.Test, # choose platform from available list
Change Test to your new plattform. Beware that there is a mapping here. if you have chosen Nintendo Wii as your plattform the id in the manifest file is "nwii" and your Plattform Constant in plugin.py is "Platform.NintendoWii"
More about this later.
4. Go to the Galaxys Plugin watchfolder (also written in the documentation but on windows its C:\Users\%user%\AppData\Local\GOG.com\Galaxy\plugins\installed) and create a folder like test_<your_uuid>
5. Move your manifest.json and plugin.py inside your folder. also add the galaxy.api library folders. The easiest way to do this if you have integrations like steam is to go into the steam plugin folder and copy the galaxy folder inside your own plugin. your folder should look like this:
galaxy
manifest.json
plugin.py
6. This should be enough to test the plugin if it works. Start up GoG Galaxy, go to Settings and check if you have a new integration. Try to activate the plugin and check if you have a Test Game inside your library. If yes everything worked so far. If not them something went wrong. To remove the the game you need to deactivate the plugin again.
7. After the succesful test open plugin.py with an editor (download notepad++ if you have nothing better than the windows text file editor) and look for the function:
async def get_owned_games(self):
return [
Game('test', 'The Test', None, LicenseInfo(LicenseType.SinglePurchase))
]
This one is used by Galaxy, when the plugin is loaded. You can see your Test Game here. If you change the Games inside te function and create a List for example like this:
return [
Game('SOUP01', 'The Legend of Zelda: Skyward Sword', None, LicenseInfo(LicenseType.SinglePurchase)),
Game('RMCP01', 'Mario Kart Wii', None, LicenseInfo(LicenseType.SinglePurchase)),
Game('RSBP01', 'Super Smash Bros. Brawl', None, LicenseInfo(LicenseType.SinglePurchase)),
Game('RZDP01', 'The Legend of Zelda: Twilight Princess', None, LicenseInfo(LicenseType.SinglePurchase))
]
you can add now your own games for the integration. This is basically the information that Galaxy needs to import them. How you want to get them is up to you. You can just hardcode them. Create a textfile and read the textfile in python code to create this List of Game Objects. Depending on you knowledge you can form this plugin like you want.
Just a little side note: Sometimes Galaxy does not find a specific game and it will be listet as "Unknown Game" This is because the ID (in the example it is SOUP01 was not registered for the plattform) The error message in the GoG Galaxy logs will be something like "nwii_SOUP01 ist not registered in database, Entry for
https://gamesdb.gog.com/platforms/nwii/external_releases/SOUP01 does not exist"
In that case you need to figure out a correct ID or simply try to use the game name as an ID as well. Like this
Game('The Legend of Zelda: Skyward Sword', 'The Legend of Zelda: Skyward Sword', None, LicenseInfo(LicenseType.SinglePurchase))
In most cases it works
If you want to change your plattform you need the mapping that was earlier mentioned. If you go to the \galaxy\api folder, there is a const.py file. Open it to see thich Plattform Name belongs to the plattform id:
Plattform.NintendoGameCube -> ncube
Plattform.PlayStation -> psx
And so on