 

                               -=Hack to create maps with downloadable sky=-
                                                         by DreaD


I've found a hack that can be used to create maps with custom sky textures that will be downloaded when a player connects to the server. Pity I didn't think of this 2 years ago when I started mapping...

Normally sky textures belong in the main/env/ directory, however it is possible load a sky from a different directory if you use a relative path. For example if you were to set the worldspawn property (or type in the console):

sky clouds

the game will load main/env/customsky??.tga for the sky textures. However if you were to use:

sky ../textures/skys/clouds

it will load main/textures/sky/customsky??.tga instead. Now as long as you use the sky textures somewhere else in your map they will be downloaded just like any other custom texture is.

I have created a simple demonstration map. You will see that the cube in the top corner has each of the sky textures applied to it. The surface flags are set to nodraw so it won't be seen when the map is loaded in the game but the textures applied to it will still be downloaded when someone connects to a server.

Important things:

- This has not been extensively tested so there may be problems using this method that I've not yet encountered.

- When using KPCMF to pack your maps make sure you untick sky or you'll end up with two sets of sky textures in the zip.

Have fun testing.  