Tip 26 - Those damn logos
URL: http://www.bostonbrothers.com
Ok - this had better be in a tip somewhere - even if valve probably WILL remove the ability soon.
Here is how the logo system works.
The halflife engine uses sprites a lot. The logos you spray are sprites.
These sprites are generally contained within .wad files - and this one is no exception. It is in the file pldecal.wad
Now, when you go to the customisation screen and choose a logo - it is picking a .bmp from the logo directory, and when you exit that screen it creates the pldecal.wad for you.
The rules for thes ebitmaps are simple and ell understood - it must be 64x64 in size, 256 colours - which are interpreted as a greyscale, from least to most transparent.
When you spray it, it is coloured, and the transparency works by fading.
However, that isn't the only type of sprite halflife supports, and the one you're interested in is a full colour sprite.
Now - the first thing you have to do is create your image.
Your image MUST be sized in multiples of 8, and have a total area of less than 11000 odd - probable sizes are 112x80 and 80x80 (and smaller)
While editing the image you can happily work in true colour mode, but change it down to 256 colour (8 bit) mode for the last steps.
The image should be 255 colours - and contain NO pure blue (pure blue is #0000FF) if you have any real blue in your image, replace it with a slightly off blue (#0000FE or #0101FF) - you'll barely be able to tell the difference.
Now - the edges of your image will probably blur into the background. Be careful of this - it won't work quite the way you expect.
Only the EXACT edge of the transparency colour will be transparent - the fading will still be there. So either try to minimise the fading, or have it fade to a neutral colour (mid grey say) so that it looks 'sensible' on anything ou spray it on to.
Do NOT fade into the blue transparency colour - as this will leave an off blue edge when you spray it - and that will look awful except when sprayed onto blue walls.
So, for this final step, be sure to set 'fade' 'feather' 'antialias' 'tolerance' and all such things in your paint program to zero.
Now - change the last colour in the pallette (the 256th) to pure blue - and fill any areas you wish to be transaprent with it.
Save your image out as a bitmap, no RLE (its an advanced option - a type of compression, turn it off if you turned it on, otherwise don't worry about it)
Call the image file "{LOGO.BMP" The { is important. Save it in a temp directory with nothing but iteslef and maybe the tools you want to use.
Now - you need to make the image into the pldecal.wad file. This is technical.
You need some external programs. Wally is good - and allows you to just drag and drop your file in.
Alternatively, you can use the programs that come with the halflife SDK (also available seperately) makels and qlumpy
The commands you need are:
makels . pldecal pldecal.ls
qlumpy pldecal
Now use this file to replace the pldecal.wad in either whatveer game you want to use it in. (The \halflife\tfc\ directory, or the \halflife\cstrike or wherever)
And be VERY VERY careful not to accidentally to into customisation, or it will overwrite it with a bitmap from the logos directory (or one of the built in logos)
Now - making sure it shows up in game. There are some console commands (which might be in a config file) which would prevent you, or others, seeing your lovely logo.
So add somethig like this to the end of your autoexec.cfg
cl_allowupload 1; cl_allowdownload 1; cl_allowuploadingame 1; cl_allowdownloadingame 1; cl_allowuploads 1; cl_allowdownloads 1; mp_decals 300; r_decals 300
You MIGHT also need the following, which aids some video cards:
gl_polyoffset 4
(Sensible values for that are -1, -0.1, 0.1, 1, and 4)
That can help decals show up on some (notably old TNT) cards.
i