Xfire Game Skins
If you do not have a game skin for the selected game, then you get some standard information about the server (and user if on the Friends tab).
However, if you do have a game skin for the selected game, that html is drawn in the infoview instead of the default bland information. In release 1.42, we've included game skins for Call of Duty Multiplayer, Battlefield 2, and Unreal Tournament 2004.
Note: game skins are separate from Xfire skins; they are displayed the same no matter which Xfire skin you have installed. They are also much easier to create as they are created in HTML.
Making your own Game Skin
For the purposes of the following discussion, assume that Xfire is installed into c:\\program files\\xfire. All game skins are stored below the c:\\program files\\xfire\\infoview directory, in a subdirectory based on the game. To find the proper filename for a game skin, look up the short name of the game in the c:\\program files\\xfire\\xfire_games.ini file by finding the game's entry, and then looking at the ShortName entry.
Template files are regular html, with the only difference being that certain strings are replaced by the Xfire program before displaying them. All of these strings begin and end with a percent (%). You can look at our example game skins to get an idea of how to use them.
Here are some of the key string replacements to use. Please look at c:\\program files\\xfire\\infoview\\bf2\\game_bf2_js.tmpl for more (it is included by game_bf2.tmpl).
- %user_ingame% - whether this is a user entry (with a server) or a server entry.
- %display_user% - if %user_ingame% is true, then this is the user's display name (username or nickname, depending on a preference setting).
- %text_name%, %text_ping%, %text_score% - translations of name, ping, and score into the user's language
- %language% - the language that the Xfire client has been configured to display. You can use it to make a game skin that can work in multiple languages (though you need to find someone to do the translations, of course).
- ... and more. If you have suggestions for information we should make available as string replacements, please let us know on the Xfire Skins forum.
Keep in mind that the same template file is used whether a server is selected on the Servers tab or a person is selected on the Friends tab. You should make your template work in both cases, by displaying user information if it's available, and then always displaying the server information.
Plans and Projects
Xfire currently supports more than 300 games. If we made game skins for every single game, the Xfire installer would become way too large. Instead, we plan to support some of the top games and distribute those game skins with Xfire. We fully support users creating their own game skins, and we would like to put together packages of some of the best ones to make available on our web site and through our download system so that everyone can benefit from them.
Make backups! If we end up bundling a new game skin with the next Xfire update and you were developing one of your own, it could be overwritten. Make sure to copy your work in development to somewhere outside of your Xfire installation directory.
Game skins offer a lot of power to express your creativity. Go wild! If you need a project, here are a few suggestions to get started with:
- Update one or more of our game skins to use XHTML instead of HTML 4.01 Transitional
- Add more fields to the Battlefield 2 game skin player list (such as kills and deaths).
Over time, we expect to improve our game skins and also to export more variables (% strings) to give you more power to develop great game skins. Help us out by discussing your ideas in the Xfire Skins forum. Many Xfire admins read the forums, though only a few of us regularly post.