-
Notifications
You must be signed in to change notification settings - Fork 1
Skins for AKL
Kodi skins can be enhanced to support game views. Although games in general offer similar metadata as movies, it does also have some more extended information and a more diverse range of images or assets. Furthermore, between different gaming platforms the sizes or dimensions of these assets might completely differ. This page will describe the following items:
- how to add gaming support in general for skins
- how to get and show metadata for games
- the available metadata and assets through AKL
In my repository (dev/beta repo) you can find MODs and development versions for several skins with gaming support (Artic Zephyr: Reloaded, Artic Zephyr 2: Resurrection, Aeon Nox SiLVO, Titan Media Browser). In the kodi addon repository or in my own you can also find the Game studios icon pack. This will give access to a whole collection of gaming studio icons to be used in game views.
The best solution for making views or elements in your skin visible only when Game addons are active is to make use of an expression. With this expression you can check if the correct addon is running. Not only does this create support for AKL, but also for AEL, IAGL and the game views of Kodi itself. You can put that expression with the $EXP
reference in each of the condition fields.
Example
<expression name="InGameMode">[String.Contains(Container.FolderPath,plugin://plugin.program.akl) | Window.IsActive(games) | Container.Content(games)]</expression>
Now if you want to show certain elements or views only for AKL and game content use:
<visible>!$EXP[InGameMode]</visible>
Another example with all our favourite launchers:
<expression name="InGameMode"> [ String.Contains(Container.FolderPath,plugin://plugin.program.ael) | String.Contains(Container.FolderPath,plugin://plugin.program.advanced.launcher) | String.Contains(Container.FolderPath,plugin://plugin.program.advanced.emulator.launcher) | String.Contains(Container.FolderPath,plugin://plugin.program.akl) | String.Contains(Container.FolderPath,plugin://plugin.program.advanced.MAME.launcher) | String.Contains(Container.FolderPath,plugin://plugin.program.iagl) | Window.IsActive(games) | Container.Content(games) ] </expression>
Here we have some examples of variables which can be used getting metadata from the Games. It has built-in support for reading the metadata from the Kodi games db with a fallback to the game launchers like AKL (AEL/IAGL).
<!-- GAMES --> <variable name="GameTitle"> <value condition="!String.IsEmpty(Game.Title)">$INFO[Game.Title]</value> <value condition="!String.IsEmpty(ListItem.Title)">$INFO[ListItem.Title]</value> <value>$INFO[ListItem.Label]</value> </variable> <variable name="GamePlot"> <value condition="!String.IsEmpty(Game.Overview)">$INFO[Game.Overview]</value> <value condition="!String.IsEmpty(ListItem.Plot)">$INFO[ListItem.Plot]</value> <value>$INFO[ListItem.AddonSummary]</value> </variable> <variable name="GameStudio"> <value condition="!String.IsEmpty(Game.Developer)">$INFO[Game.Developer]</value> <value>$INFO[ListItem.Studio]</value> </variable> <variable name="GameGenre"> <value condition="!String.IsEmpty(Game.Genres)">$INFO[Game.Genres]</value> <value>$INFO[ListItem.Genre]</value> </variable> <variable name="GameYear"> <value condition="!String.IsEmpty(Game.Year)">$INFO[Game.Year]</value> <value>$INFO[ListItem.Year]</value> </variable> <variable name="GameRating"> <value>$INFO[ListItem.Rating]</value> </variable> <variable name="OneOrMoreLocalPlayersVar"> <value condition="String.IsEqual(Container.ListItem.Property(nplayers),1) | String.IsEqual(ListItem.Property(nplayers),1)">$LOCALIZE[32010]</value> <value>$LOCALIZE[32011]</value> </variable> <variable name="OneOrMoreOnlinePlayersVar"> <value condition="String.IsEqual(Container.ListItem.Property(nplayers_online),1) | String.IsEqual(ListItem.Property(nplayers_online),1)">$LOCALIZE[32010]</value> <value>$LOCALIZE[32011]</value> </variable> <variable name="GameAudioFlag"> <value condition="String.Contains(ListItem.Property(tags),atmos)">atmos.png</value> <value condition="String.Contains(ListItem.Property(tags),dtsx) | String.Contains(ListItem.Property(tags),dts-x)">dtsx.png</value> <value condition="String.Contains(ListItem.Property(tags),dts) | String.Contains(ListItem.Property(tags),dca)">dts.png</value> <value condition="String.Contains(ListItem.Property(tags),dolby hd)">dtshd_hra.png</value> <value condition="String.Contains(ListItem.Property(tags),dolby digital)">eac3.png</value> </variable> <variable name="GameThumb"> <value condition="!String.IsEmpty(ListItem.Icon)">$INFO[ListItem.Icon]</value> <value condition="!String.IsEmpty(ListItem.Art(boxfront))">$INFO[ListItem.Art(boxfront)]</value> <value condition="!String.IsEmpty(ListItem.Art(thumb))">$INFO[ListItem.Art(thumb)]</value> <value>DefaultAddonGame.png</value> </variable>
Each of the entity list items outputed by the AKL addon contain an extended set of metadata properties and art assets which can be used in the skin. In the following paragraphs we go over each entity and describe all properties available.
The following properties are available when accessing a Category as an list item:
Name | Type | Description |
---|---|---|
id | string/default | Unique identifier for this category |
name | string/default | The name of this category |
title | info | The name of this category |
genre | info | Genre |
rating | info | Rating of the game (number) |
trailer | info | Path or url associated trailer clip |
year | info | Year |
studio | info | Studio or company name |
plot | info | Description of category |
icon | art | Icon image for category |
fanart | art | Fanart image for category |
banner | art | Bannerimage for category |
clearlogo | art | Clean logo image for category |
poster | art | Poster image for category |
obj_type | properties | Type key = 'CATEGORY' |
AEL_Content | properites | AEL compatiblity type key = 'category' |
num_romcollections | properties | Number of rom collections in this category |
The following properties are available when accessing a ROM collection as a list item:
Name | Type | Description |
---|---|---|
id | string/default | Unique identifier for this ROM collection |
name | string/default | The name of this ROM collection |
title | info | The name of this ROM collection |
genre | info | Genre |
rating | info | Rating of the game (number) |
trailer | info | Path or url associated trailer clip |
year | info | Year |
studio | info | Studio or company name |
plot | info | Description of ROM collection |
icon | art | Icon image for ROM collection |
fanart | art | Fanart image for ROM collection |
banner | art | Bannerimage for ROM collection |
clearlogo | art | Clean logo image for ROM collection |
poster | art | Poster image for ROM collection |
obj_type | properties | Type key = 'ROMCOLLECTION' |
AEL_Content | properties | AEL compatiblity type key = 'launchers' |
The following properties are available when accessing a ROM/Game as a list item:
Name | Type | Description |
---|---|---|
id | string/default | Unique identifier for this ROM |
name | string/default | The name of this ROM |
title | info | The title or given name of this ROM |
genre | info | Genre |
rating | info | Rating of the game (number) |
trailer | info | Path or url associated trailer clip |
year | info | Year game was released |
studio | info | Studio or company name |
plot | info | Description of ROM collection |
icon | art | Icon image for ROM collection |
fanart | art | Fanart image for ROM collection |
banner | art | Bannerimage for ROM collection |
clearlogo | art | Clean logo image for ROM collection |
poster | art | Poster image for ROM collection |
platform | properties | The platform or system for this particular ROM |
nplayers | properties | The number of players supported (offline) |
nplayers_online | properties | The number of players supported when playing online |
esrb | properties | The ESRB rating |
boxsize | properties | Box size definition (dvd, square, wide) |
tags | properties | Comma separated tag values associated with this ROM |
obj_type | properties | Type key = 'ROM' |
AEL_Content | properties | AEL compatiblity type key = 'rom' |
AKL_InFav | properties | deprecated: "InFav_True" or "InFav_False" depending on if ROM is marked as favourite |
AKL_MultiDisc | properties | deprecated: "MultiDisc_True" or "MultiDisc_False" depending on if ROM is marked as multidisc |
AKL_Fav_stat | properties | deprecated: "Fav_OK", "Fav_UnlinkedROM", "Fav_UnlinkedLauncher", "Fav_Broken", "Fav_None" |
AKL_NoIntro_stat | properties | deprecated |
AKL_PClone_stat | properties | deprecated |
Some examples using the Arctic Zephyr Reloaded skin. Overview of companies/categories. (entity type categories)
Overview of systems per company/category. (entity type rom collections)
Overview of games/roms per system. (ROMs in ROM Collection)