Screenshot Sender v2
====================
by Wormbo (original idea by Mc.Gugi)


Important: This mutator onl works on a dedicated server, so if you only play
online without actually hosting a dedicated server game, you shouldn't install
this. Servers running the Screenshot Sender will automatically puch the
required files to your client.


Installation
------------
Extract the *.u and *.ucl files to the UT2004\System directory. To ensure the
mutator is always active and cannot be disabled, add it to the ServerActors
list under [engine.GameEngine] in your server's main ini file, usually
UT2004.ini:

ServerActors=ScreenshotSenderA1.MutScreenSender

If you want to be able to turn the Screenshot Sender on and off at runtime,
instead add it to the mutators list as usual via webadmin or the parameter

?mutator=ScreenshotSenderA1.MutScreenSender

Do not add it to the ServerPackages.


Configuration
-------------
Behavioral options are configurable via webadmin. To create screenshot profiles
you currently need to use the in-game console. (Webadmin console won't work.)

Available commands:

Mutate Shot [#listnumber|nick|all|all!] [options]
Mutate Screenshot Take [#listnumber|nick|all|all!] [options]
	Takes a screenshot of the specified player, all players or all players and
	spectators. Options are evaluated for this screenshot request, but can also
	be stored permanently.

Mutate Screenshot List
	List available players, their status and a shortcut number. You can use the
	shortcut number to request a screenshot from players with weird or rapidly
	changing nicks.

Mutate Screenshot Config [options]
	Applies the specified options without taking a screenshot. Make sure you
	end the options string with a save command to make them permanent.

Available options: (all case-insensitive)

Gray/Color/RGB[=bits/colors]
	Sets color or grayscale mode with the default or specified color depth.
	Color depth is either the number of colors per channel or the number of
	bits per channel or in total. The mutator picks the type that makes most
	sense: Values of 8 and below are bits per channel, for color mode values
	between 9 and 24 are total bits and will be rounded to multiples of 3,
	higher values are colors per channel and will be extended to the next
	power of 2, but at most 256.
	Default for gray mode are 6 bits (64 colors) without dithering, default
	for color mode is 5 bits/channel (32k colors) without dithering and RGB
	defaults to 8 bits/channel without dithering.
	The 'gray' and 'color' keywords can be shortened to G and C, respectively.

Bits=bits
	Just changes the bits per channel or in total. Same rules as for the
	Gray/Color color depth apply, except it really wants the number of bits.
	This option can be shortened to B.

Dither[=True/False/1/0]
	Enables (or disables with False/0) dithering via error diffusion. This
	can increase image quality at color depths below the defaults, but makes
	compression slightly less effective. Can be shortened to D.

NoDither/ND
	Disables dithering.

TargetSize=pixels/resolution/width
	Sets the target size for client screenshots. If a resolution (WWWxHHH) is
	specified, it is converted to the number of pixels. The maximum size is
	307200, which corresponds to a resolution of 640x480.
	Can be shortened to 'size'.

FileName=pattern
	Sets a pattern for naming the screenshot files on the server.
	Available placeholders are:
		%g - game type class name
		%l - map file name ("level")
		%y - year
		%m - month with leading zero
		%d - day of month with leading zero
		%h - hour with leading zero in 24h format
		%n - minute
		%s - second
		%i - player GUID
		%p - player name (filtered)
	Can be shortened to F.

Load=profilename
	Loads the specified profile. By default the condifured manual profile is
	loaded. Use this option to load a different profile, e.g. if you want to
	request a screenshot using that profile, or if you want to modify that
	profile. If the profile doesn't exist, an empty configuration is created
	but not yet saved. Can be shortened to L.

Save[=profilename]
	Saves the configuration to the specified or last loaded profile.
	Can be shortened to S.

Reset/Del=profilename
	Deletes the specified profile. Can be shortened to R.

Auto/Manual=profilename
	Sets the default profile for automatic or manual screenshot requests to
	the specified profile name. The profile will be created with default
	settings if it doesn't exist. Can be shortened to A or M, respectively.

The default configuration is as follows:
[ScreenshotSenderA1.MutScreenSender]
AutoProfileName="Auto"
ManualProfileName="Manual"
TimeoutSeconds=10
InitialTimeoutSeconds=60
ListenPort=0
bTryNextAvailablePort=True
AutomaticScreenshotsPerMatch=0

[Auto ScreenshotProfile]
OutputFileName=AutoShot__%i__%y-%m-%d_%h-%n-%s__%p__%g_%l
TargetSize=100000
BitsPerChannel=5
UseGrayscale=False
UseDither=False

[Manual ScreenshotProfile]
OutputFileName=ClientShot__%i__%y-%m-%d_%h-%n-%s__%p__%g_%l
TargetSize=100000
BitsPerChannel=5
UseGrayscale=False
UseDither=False

You can use the command line option -ScreenshotProfile=filename.ini to load and save
screenshot profiles in a different ini file.
