Skip to content
Christian Jungerius edited this page Jun 7, 2022 · 14 revisions

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.

Expression

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>

Variables

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>

List items data scheme

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.

Category

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

ROM Collection

y

ROM

z

Clone this wiki locally