SERVERSCROLL
AUTHOR: [ACE]CPAN
Code is Copyrighted for visual reference.  Please email myself prior to use of code
in this package.

Support at http://www.aceteam.org

ServerScroll is based on the code written by El Muerte with his
ServerAdds v1.04.  This Actor was built upon the direct code with permission.
All inner workings are the same source code only with some enhancements, 
additions and 2 bug fixes.

[=====------Thanks  To------=====]

- El Muerte for permission to use and edit his code 
- MSuLL for looking over the code and his contributions
	(SuppressLog, EmptyServer Disable, and for sparking the Custom Gametypes idea.
- UnitedScriptors.org for code help, named: }TCP{Wolf and SkullKrusher

[=====------Enhancements------=====]
See changelog at the end of this file for order of additions

Added a Universal List for 15 messages that will display regardless of
gametype being played.

Added Individual Gametype Lists to enable server admins to display 10 
different messages for the different gametypes.

Added random Admin text messages to remove the need for duplicate lines
to display them as Admin text.

Added an integer to allow configuration of how often the random messages
appear.

Added new WebAdmin code to allow for entire updates via web to include:
Admin Message Color, Admin Realm, Admin Username, Admin Password, All Message lines 
and all configuration values.

Added the feature to have the Admin Username and Password be Case-sensitive

Added Log Suppression at startup

Added Message Disable when Server is Empty

Changed "Change Admin" to "Admin Settings"

Moved bEnabled to "Admin Settings"

[=====------Bug  Fix------=====]

Fixed the problem of the full array delete.
	--ServerAdds would copy the last array value and apply it to the next one 
	down when deleting from a list of 25 messages resulting in duplicate 
	entries in the Array and an inability to remove them via webadmin.

Fixed The Multiple admin messages in Random Multiple/Multiple Random messages
	--Yes, there's a different between those two see "iAddType settings" below.
	I put a bool var in to set TRUE when one ADMIN message goes through and 
	set the code to bypass the ADMIN part to avoid the FROZEN ADMIN MESSAGE
	problem after one passes through.  It is then set to FALSE the next time 
	the timer runs.

[=====------Installation Steps------=====]
1. UPGRADE FROM SERVERADDS
2. Regular Installation
3. Edit Unrealtournament.ini or Server.INI
4. Restart Server
5. Local Server Test

[=====------Upgrade from ServerAdds------=====]

Open your Server.ini file and edit the following:

[Engine.GameEngine]
ServerActors=ServerAdds.ServerAdds
-to-
ServerActors=ServerScroll.ServerScroll

[UWeb.WebServer]
Applications[#]=ServerAdds.WebAdmin
ApplicationPaths[#]=/ServerAdds
-to-
Applications[#]=ServerScroll.WebAdmin
ApplicationPaths[#]=/ServerScroll

Where # is the number for ServerAdds

Copy the .u file into the System Directory

Set the settings from ServerAdds (in the server.ini file) into the ServerScroll.ini
Then copy the scroll lines into the proper sections.

Upload the ServerScroll.ini into the System Directory.

Restart the server.

[=====------Regular  Installation------=====]

2. Copy Files:
copy .u file into the System Folder
copy .ini file into the System Folder

[=====------Edit UnrealTournament/Server.ini------=====]

3a. Edit UnrealTournament.ini or Server.ini:

[Engine.GameEngine]
ServerActors=ServerScroll.ServerScroll

[=====------WEB ADMIN------=====]

3b. Web Admin -- Edit UnrealTournament.ini or Server.ini

[UWeb.WebServer]
Applications[#]=ServerScroll.WebAdmin
ApplicationPaths[#]=/ServerScroll

Replace the # for a free entry.

To protect the WebAdmin with a password you have to add the 
following to the ServerScroll.ini file:

[ServerScroll.WebAdmin]
AdminRealm=ServerScroll Admin
AdminUsername=test
AdminPassword=test

If you set the AdminRealm, AdminUsername, AdminPassword to the same 
values as the Default UT WebAdmin you don't have to login again.

Default Log in with
user: test
pass: test

Clear the Username and Password to disable the login.

[=====------ServerScroll  INI------=====]

3c.If you do not have the ServerScroll.ini, add the following section into a
new file and name it ServerScroll.ini  Save this file in the System Directory:

[ServerScroll.ServerScroll]
fDelay=30
iRepeat=1
iGroupSize=1
iRandom=4
iAddType=3
bDontWrapList=False
bEnabled=True
bRandomAdmin=True
cAdminMessageColor=(R=255,G=255,B=255,A=0)
sGameType[0]=
sULines[0]=
sGT0Lines[0]=
sGT1Lines[0]=
sGT2Lines[0]=
sGT3Lines[0]=
sGT4Lines[0]=
sGT5Lines[0]=

sGameType holds 6 values [0 - 6]
sULines holds 15 values [0 - 14]
sGT#Lines holds 10 Values [0 - 9]

[=====------SETUP/Configuration------=====]

- bEnabled defines if the ServerAdds are being send or not

- bSuppressLog suppress the LOG output of the Message counts

- bDisableWhenEmpty stops the scrolls when there is no one on the server

- fDelay is the delay in seconds when a new message is displayed
(default = 300 , 5 minutes)

- iRepeat is the numer of repeats of every message cycle, it's advised to leave it
to the default value (1)

- iGroupSize is the size of a message group, this is used in some

-iRandom is the count to generate a random number.  The LOWER the number the MORE
Admin Text messages there will be and vice versa.  0 and 1 make it never display
Admin Text messages.

iAddType settings
- iAddType defines how to display the messages, it can have the following values:

 0	Old Skool, just display all lines every cycle, it seems to
	be limited to only the first 4 lines.
 1	Cycle list, every time the next message is display, 1 line
	at the time.
 2	Cycle list with groups, every time a group of messages is
	displayed, use iGroupSize to define the size of the Groups
 3	Random message, displays a random message (only 1 line)
 4	multiple random messages, this displays a iGroupSize amouth
	of random messages
 5	random multiple messages, this displays a group of messages,
	the first message is randomly chosen, the next iGroupSize
	lines are the lines that succeed the first line in the list

- bDontWrapList defines if the list should be wrapped when it reaches the end of
the lines (only for grouped messages, type 2,4 and 5). Default is false, so it
will display the first line again in the group. If true the Grouped messages will
not be filled completely, only the remaining items will be displayed.

- sGameType[#] are the gametypes that will check against the gametype loaded on 
the server.

- sULines[#] are the lines of text that will be displayed, you can add up to 15
lines (0 to 14). These lines will display for ALL gametypes

-sGT#Lines[#] are the lines of text that will be displayed for each 
specific gametype.  You can add up to 10 lines (0 to 9) for each list.

-bRandomAdmin removes the need to manually enter in Admin Messages with the '#'
precursor.  ServerScroll will randomly assign messages to be Admin Text when this
is enabled.  If set to FALSE, the need for the '#' precursor to display Admin Text
will be needed.

-cAdminMessageColor is the color of the messages when they are broadcast across the
screen as Admin Text.  


If you add an # in front of the text the
message will be an Admin message and appear in the middle of the 
screen.


[=====------Restart  Server------=====]

4. Restart Server:
use Admin Quit or other preferred method of server restart.


[=====------Local Server Test------=====]

5. Local Server Test
Follow the same above installation instructions.
Then start a DEDICATED SERVER on your machine.
Once the server has fully started, open a web browser and browse to:

http://local/Server IP/ServerScroll
Login if needed and continue to configure from there.

[=====------Change  Log------=====]

Change Log

--v08b

Made the lists Generic calling the gametype from Level.Game.Class.Name
Updated the Add and Delete Webadmin to handle the generic gametypes
Added the Gametype editing WebAdmin code
Hardcoded all WebAdmin to eliminate UHTM errors during install
Added Automatic Menu Reload when Gametypes are added or deleted

--v07b

Added Log Suppression to the Admin Page 
Added Empty Server Disable to not SPAM servers with messages when there are no players in Admin Settings
Changed Change Admin to Admin Settings
Moved bEnabled to the Admin Settings page

--v06b

Fixed Error in Code when Multiple Admin Messages are Broadcast 
HardCoded the Change log into the WebAdmin instead of using UHTM 

--v05b

Fixed duplicate Random Messages in a row

--v04b

Fixed Bug with having Random Admin Messages Unchecked or False

--v03b

Added Admin Username/Password change and web admin code
Made Admin Username/Password able to be toggled as Case-Sensitive
Added Web Configuration of Admin Message Color
Added Web Configuration of iRandom
Added Web Configuration of Admin Realm

--v02b

Added Domination Lines and web admin code
Added Assault Lines and web admin code
Changed web admin to use multiple pages instead of one

--v01b

Rewrote the SLines into ULines
Added DM/TDM Lines and web admin code
Added Capture the Flag Lines and web admin code
Added MonsterHunt Lines and web admin code
Added Jailbreak Lines and web admin code

--ServerAdds v1.04

Starting code base used with permission from El Muerte
