Change TASClient Rank Icons - MiniTutorial

Change TASClient Rank Icons - MiniTutorial

Discuss development of lobby clients, server, autohosts and auto-download software.

Moderators: Moderators, Lobby Developers

Post Reply
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Change TASClient Rank Icons - MiniTutorial

Post by SinbadEV »

Since about February 2010 TASClient has support for custom Rank Icons. The official documentation for this is apparently to "read the changelog" which contain the following pieces of information on the subject.

From the Changelog entry on the subject:
* new ranks icons
* PYTHON : AddPlayerIconType renamed to AddOrReplaceIconList and allows you to replace existing image list like ranks, battle states etc
* PYTHON : replacing rank icon example added

and inside api.txt

Code: Select all

- AddOrReplaceIconList(name, iconsDict)
    replace the default icons with
        name == 'rank','connectionstate','playerstate','syncstate','battlestate','readystate','laddercup'
    or add new icon list, use SetPlayerIconId to set the icon id to a player
    iconsDictExample = {0:{'File':'filepath.bmp/jpg/png', 'Name':'Rank1', 'MaskColor':16777215}, 1:{'File':'filepath.bmp/jpg/png', 'Name':'Rank2', 'MaskColor':16777215} ...}
- SetPlayerIconId(playerNick,iconTypeName,iconId)
So, In order to specify a custom set of rank icons you must make a script, based on the example one sitting in ..\Spring\Lobby\python\scripts\subf called replaceIcons.py

I have created an example set of icons and associated script:
Image
SinbadEV_Icons.V0.1.7z
(5.44 KiB) Downloaded 37 times
To use this script just drop it in the ..\Spring\Lobby\python\scripts\ folder along with the images.

There was another thread where people posted a bunch of sets of icons that could be used. I'd suggest people post, in response to this thread, icons that they have found/made so other people can use them.

Each rank is a 16x16 image and the 'MaskColor':16777215 part determines which pixels will be transparent... 16777215 is white (which is basically the web-style color FFFFFF in decimal) so if you wanted purple pixels to be transparent you would use 16711935 (FF00FF) and if you wanted black pixels to be transparent you would use 0.

The traditional set uses 16x16 icons but it looks like this is only because of the font and layout... larger or smaller icons seem to be supported.
SinbadEV wrote:Image
ImageImageImageImage
Image
Image
ImageImageImage
Image
Image
Image

Image
Image
Image
Image
ImageImageImage
ImageImageImage
ImageImageImage
Image

Image
Image
Image
Image
Image
Image
Image
Image

Image
Image
Image
Image or Image
Image
Image
Image
Image
JAZCASH wrote:ImageImage
ImageImage
ImageImage
ImageImage
ImageImage
ImageImage
ImageImage
ImageImage
TradeMark wrote:Image
Saktoth wrote:Image
Image
Big Take wrote:Image
Image
Image
Image
Image
Image
Image
Image
smoth wrote:I grabbed these off of google..
ImageImageImageImageImageImageImageImageImage

ImageImageImageImageImageImageImageImageImageImage

ImageImage
Gota wrote:Image
Image
Image
Image
Satirik wrote:Image
Image
Image
Image
Image
Image
Image
Image
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Change TASClient Rank Icons - MiniTutorial

Post by Neddie »

You missed some icons.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Change TASClient Rank Icons - MiniTutorial

Post by Gota »

I like jaz's icons.
Nice.
User avatar
DavetheBrave
Posts: 281
Joined: 22 Jun 2005, 02:52

Re: Change TASClient Rank Icons - MiniTutorial

Post by DavetheBrave »

+1
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Change TASClient Rank Icons - MiniTutorial

Post by SinbadEV »

neddiedrow wrote:You missed some icons.
I didn't re-post the ones that were all 8 in one image... and it's entirely possible I missed more too feel free to post the ones you think I've missed.
Post Reply

Return to “Lobby Clients & Server”