Game Icons

As of Gfire 0.9.1, you can now use custom game icons to represent what your friends are playing in place of the red die icon.

How to use and install game icons

Depending on your Operating System, you'll be working with a different directory, but the concept is still the same. To make a custom game icon, create a 16x16 .png image and use this naming convention:

game_xfireshortname.png

For example, the icon for the game Borderlands would look like this: game_brdrlnds.png, or for Half-Life 2, game_hl2.png. You can find the shortname in the games_list.xml file.

Now that you have your new icon made, place it in this directory (these are the defaults):
Windows: C:\Program Files\Pidgin\pixmaps\pidgin\emblems\16\
Linux: /usr/share/pixmaps/pidgin/emblems/16/ (may need root to edit depending on distro)

Likewise, game_list.xml can be found here:
Windows: C:\Users\<YOUR USERNAME>\Appdata\Roaming\.purple\
Linux /home/<YOUR USERNAME>/.purple/

Where to get icons

Download an icon pack

Members of the community may upload icons in custom packs that you can find and install. There is an irregularly updated icon pack available from the Gfire team which can be found  here. Extract the icons into the directory mentioned above and restart Pidgin to have them in effect immediately. We will keep this up to date at our own discretion.

NOTE: The icons are now compressed in the directory structure "/emblems/16/icons.png". You only need to extract the zip file into the pixmaps folder now, and then select 'yes' to merge all the folders. You can still navigate into "/emblems/16/" and put the files into pixmaps/emblems/16/ on your filesystem if you like.

Rip the icons from Xfire

To do this, you will need:

  • A functioning Linux environment (We assume Ubuntu here)
  • A functioning Windows environment (We assume Win7 here, although  WINE may work)
  •  ImageMagick (We assume the Linux variant)
  •  Resource Extract (Windows only)

From the Client

Extract the game icons from Xfire's icons.dll in .bin format with Resource Extract under Windows.
Save this bash script as convert.sh and then place it in the folder where you extracted the .bin files to:

#!/bin/bash
if [[ $# -lt 1 ]]; then
	echo "Usage: $0 outdir"
	exit 1
fi
if [[ ! -d $1 ]]; then
	mkdir -p $1
fi
list=`ls *.bin 2>/dev/null`
for file in $list; do
	if [[ "$file" =~ icons_XF_(.+)\.ICO_ICONS\.bin ]]; then
		lower=$(echo "${BASH_REMATCH[1]}" | tr "[A-Z]" "[a-z]")
		echo "${BASH_REMATCH[0]} -> $1/game_$lower.png"
		convert -scale 16x16 ico:${BASH_REMATCH[0]}[0] $1/game_$lower.png
	fi
done;
exit 0

Navigate to the location where you stored your .bin files in a Linux terminal and then enter:

bash convert.sh converted

If this doesn't work, try:

sh convert.sh converted

This will create a new folder called "converted" with all the .png files inside. You can replace the "converted" portion of the command with anything you like.

From C:\Programdata\Xfire\Icons\

When Xfire gets new game support, it stores the extra .ico files in C:\Programdata\Xfire\Icons (in Vista/Win?7) until the client itself gets updated. These are easy to get to and easy to convert. All you need is a modified version of the script above, that looks a bit like this:

#!/bin/bash

if [[ $# -lt 1 ]]; then
	echo "Usage: $0 outdir"
	exit 1
fi
if [[ ! -d $1 ]]; then
	mkdir -p $1
fi
list=`ls *.ico 2>/dev/null`
for file in $list; do
	if [[ "$file" =~ (.+)\.ico ]]; then
		lower=$(echo "${BASH_REMATCH[1]}" | tr "[A-Z]" "[a-z]")
		echo "${BASH_REMATCH[0]} -> $1/game_$lower.png"
		convert -scale 16x16 ico:${BASH_REMATCH[0]}[0] $1/game_$lower.png
	fi
done;
exit 0

And just like above, save the file as convert.sh, drop it into the folder where the .icos are, then run this command:

bash convert.sh converted

or

sh convert.sh converted