HideNSeek:	A mod by Bane. 		theBane@hotmail.com		AIM: Bane 908
Online at http://HideNSeek.5u.com, containing the download link and help for playing and administrating.

About:
Quite simply, its Hide and Seek, online. This mod was made because I would occasionally play it online, with friends (In KOOPA888's Unreal server). However, the games had no real rules. Nothing could be enforced, mainly, people could still move. So I made this mod, after I learned UScript. It has rules. You can't cheat (well, theoretically), there is a scoring system, people CANNOT move when they are hidden, or while counting, and players are invisible and inaudible while hiding (not realistic, but I say it's more fair). 

Installation:
Copy HideSeek.u to \unreal\system . This is the main file, containing all the game code
Note that I have deleted the source code from the .u file, to make it smaller (by like 200k). If you'd like a copy of the source code, just E-Mail me or send me an IM on AIM (contact information at top). If you think you can make it more efficient, find a bug, or whatever, feel free to send me suggustions/fixes.
HideNSeek.txt and HnSFeatures.txt are help files, copy them somewhere.
HSPlayerStarts.ini contains my setup of several maps. If you want to host a server, you need to set up most maps for HideNSeek, as Coop maps aren't very good when you can hide anywhere in a huge map, and when everyone spawns in the same spot. This file contains a few maps, pre-set up. But feel free to make your own configurations.

Gameplay:
Quite simply, one person counts, everyone else hides. The game will not begin unless there are at least two people present, and will terminate if everyone leaves. The person who is it is randomly determined at start, and in each additional round it is the first person to be found, or random pick again if no one is found. The person is it is forced to stand still, and will automatically count down from the count time, while everyone else hides. This time is variable, defaults to 30 seconds, and can be changed in game. Once the time reaches 0, everyone is forced to be marked as ready. They will then become immobile, and must wait to either be found or for the round to end. Players CAN 'feign death', which will make them harder to find. This IS intentional, and IS encouraged (default key to feign death is 'F', the command is 'feigndeath'). Depending on the game rules (and must be set before the beginning of the game), players who are found will either help to find the remaining players, or will become spectators. The person who is it 'tags' other players by shooting them. A default weapon is given at the beginning of each round, and ammo replenishes at the rate of 1 every second. Whenever someone who is it (including players who were found and now help) finds another player, they will receive 1 point. If every person is found, the original it receives 5 points. Otherwise, any players that remain hidden receive 3 points. Also, there are several commands that can be used in the game. Typing 'commands' into the console will list all of the available commands, typing 'commands <A command> will give more specific information about the command.

Administrating:
Many aspects of the game can be changed with pre-defined settings available in the HideNSeek.ini file, also available under Advanced Options. Examples include whether players are given a searchlight, the weapon they receive (default is the dispersion pistol), and whether or not hiding players who are found help find others. These can only be changed outside of the game, but others can be changed in game. Typing 'Admincommands' into the console will give a list of commands available only to administrators (the list is also only available to admins). Typing 'Admincommands <A command>' will give specific information about individual commands, including the correct usage. Variables that can be changed include the time betweens rounds (and minutes), and the time players have to hide (in seconds).
HideNSeek also has a moderator class. Moderators do not have as much power as a full administrator, but they still have a good deal of power that they have the ability to abuse. Moderators log in using the ModLogin command (?password=... will not work for Moderators). The password is case sensitive, and failed login attempts can result in an automatic kick. Moderators can use all of the Admin commands (List below), but not the PSCommands. Because they typically aren't needed while admins are present, there is a configurable boolean to remove all of a moderator's power while any administrators are present. They will regain their power once all admins log out.

Customized Playerstarts:
Because most maps that are suitable for playing Hide and Seek in have single spawn areas, custom playerstarts can be added into maps. The location of these starts will be saved into a configuration file, HSPlayerStarts.ini, along with a brief description of the start (which must be provided when added). The contents of this file are likely cryptic, and it is advised that you do not tamper with the file unless you know what you are doing. All of the playerstarts will be re-added when the map is reloaded - up to 20 playerstarts can be added on up to 20 different maps. The playerstarts can be modified in game with the PS commands, in-game documentation is available by typing 'PSCommands' into the console. Naturally, only admins have access to these commands. In addition to playerstarts, Events can be stored, and the complete list of all events for a specific map will be executed when the map loads. This is intended to open areas in certain maps that have triggers that may be destroyed by the Hide and Seek gametype (i.e. monsters), or to close off specific areas, if the possibility exists. 
The PlayerBlock system has been completely re-done. Originally, HideNSeek allowed up to 20 individual blocks to be added to a single map. This allowed areas of a map to be blocked off, making the playing area for some maps much smaller. Now, instead of adding a single block to a map, HideNSeek allows an entire region to be blocked off. HideNSeek will then automatically fill that area with blocks. The advantage of this is that large areas, normally requiring several blocks to fully block off, can now be blocked with just a single entry of the new PrismArea structure. PrismAreas consist of two vectors. Both must be added, either in the game or by directly editing the HSPlayerStarts.ini file. 20 PrismAreas can exist in a single map, but the total number of playerblocks this can add is significantly greater. Eight commands exist for using these new PrismAreas, see the PSCommands section below. The blocks themselves are still invisible, and require a BlockImage if they are to be seen. BlockImages are images of a hand, showing players blocked off areas. BlockImages can be added with the AddImage command. They are not blocks themselves, just an image (of a hand). The hand image was made by <T>HeadShot.

Commands: HideNSeek has many commands added, both for Admins and regular players.
All commands have in-game documentation, that gives a brief description oh the command. It can be viewed by typing 'commands <Command>', 'AdminCommands <Command>' or 'PSCommands <Command>', depending on the command type.

To view the actual source code for these commands, they are all locatated in HSHuman, a subclass of Human.

==================================================================================================================
Regular Commands:  All players can use these.

Ready - This marks a player who is finding a hiding spot as ready. When all players are ready, the IT will stop counting. 
changestartmsg <Message> - This changes the message that you say when you are IT and finish counting. The message must be under 100 characters long. The default message is "Ready or not, here I come!"
Reset - This command will move you to a starting position on the map. You cannot do this if you are hiding, if PSMode is active, or if you have already used the maximum number of resets. The maximum number of resets is determined by the game's admin. Spectators are exempt from the last rule.
Time - This command will give you the amount of time remaining in the current round (or say that there is no round active), as well as the round number and total number of rounds, if any.
ToggleScores - This command will change the scoreboard from the new HideNSeek scoreboard to the default scoreboard, if you prefer the classic scoreboard.
Giveup - This command will end the round if you are IT, and simply cannot find anyone. Players who are still hidden will receive points.
Safety - This command turns on/off the safety for your weapon. While on, your weapon will not fire, it will only make a clicking noise (that others cannot hear). This is useful while hiding but not feigningdeath, to make sure you don't accidentally fire, giving away your position
ChangeSkin - This command will change your skin. This is useful if you want to pose as a corpse in a map, i.e. hiding by pretending to be a decoration. Your skin is automatically reset at the beginning of every round.
SetAnim - This command plays an animation, but only if you are feigning death. This is useful for posing as a corpse, as most are not in the normal feign death position.
Away - This command will put you in away mode. At the beginning of each round, you will respawn as a spectator. Therefore, you won't be participating in the game until you come back from away mode (done by typing Away again). If you are seeking when you go into away mode, you will immediately become a spectator. If you are IT, Another seeker will become IT if one exists, if not the round will end. If hiding, you remain hiding until either found or the round ends, and will become a spectator then. It is encouraged that you use this command instead of just leaving the game open and leaving the computer, as then you will be quickly found, and if you become IT, you will lock up the game for an entire round unless an admin is present.
SetMusic - This command changes the song being played. Type the song name, and optionally the song section to use. If no music package is specified, it will attempt to load the package of the same name as the song, i.e. "K_Vision" becomes "K_Vision.K_Vision". Package must be specified if the name is different.
ModLogin <Password> - This command is used to log a player in as a moderator. Moderators can use most of the AdminCommands, and will receive most AdminMessages. The password is case-sensitive, and does not work at all if the GameInfo's password is blank. Note that if you get the password wrong, you will be automatically kicked.

==================================================================================================================
Admin Commands - These commands can only be used by administrators and active moderators.

Giveup* <Optional GivePoints> - This command can also be used for admins and mods to force the end of the round. The optional boolean after GiveUp determines if points will be rewarded. If nothing is specified, it uses the default setting: Points are rewarded only if you are the IT. 
AddWeapon* <Weapon Classname> <optional bool bDontSave> - This command will give all players the weapon (This will also only work for weapons) specified by ClassName. It is specified the same was as a summon, so package can be omited if it is unreali or unrealshare. The weapon will be added to the array of weapons given to players if there is room, unless bDontSave is true.
ListBooks - This commands list all the HNSBooks currently on the map. This is to be used in conjunction with QueryBook and DestroyBook. It will list all the book's ID numbers (based on the book's unique name) and the total number of books on the map.
QueryBook <ID> - This command gives you the owner (if any) of the book of the given ID.
DestroyBook <ID> - This command will destroy a book of a given ID. This should be used if a book is continually falling out of the world, thereby flooding the serverlog. If the book is owned by someone, it will have the same effect as if they recalled it by themself.
Stats - This command will list the number of players, the number of spectators, the number of players hiding, and the number of seekers in the game, according to the Gametype. If this information is incorrect, you should use ResetAll (See below) to fix the information. Errors in the information can cause unpredictable gameplay, albeit mostly minor annoyances.
ResetAll - This command will reset all of the game information; the number of players in the game and the number hiding will be re-calculated, all searchlights will be destroyed and re-added if necessary; the JumpZ of all players will be reset to the Map's JumpZ or the game's JumpZ; If no one is it, a new it will be picked.
Kick <Player Name/ID> - This command allows you to kick players. It has been changed for Hide and Seek. In addition to being able to kick by playername, this command can also kick by player ID (IDs are shown on the scoreboard, and only for moderators and administrators), and can also be used to kick everyone (for whatever reason). Kicking by player name works the same as the default kick. Kicking by ID is simple, just do 'Kick <ID>'. Note that if you try to kick a player who's name begins with a number, it will try to kick the ID, and not the player. i.e. 'Kick 1Bane' will kick ID 1, NOT player 1Bane. Admins can kick all players by using "*" as the playername.
NextIt* <Player Name/ID> - This command will choose the person to be IT for the next round. This command will 'lock' the choice, meaning that the HideNSeek gameinfo will not change the choice, until the next round. Using "None" or "No one" will make no one the next it, until the HideNSeek gameinfo changes it. If the choice is locked, using NextIt on that player again will unlock it.
MakeIt <Player Name/ID> - This command will make a spectator into a temporary seeker. Like kick, this command will work for either playernames or playerIDs. 'MakeIt *' can also be used to make all spectators into temp-its. Unlike kick, moderators can use the wildcard. This command will have no effect on players who are away, who are not spectating, or if the round has not yet started (Command must be used after the IT finishes counting).
ForceAway <Player Name/ID> - This command will force a player to go into away status, or to come back if they don't know how to return or didn't know they went away. Like kick, this command uses either playernames or playerIDs. This should be used on any player that has gone away, without using the away command. It is very annoying when players who are away get chosen to be the IT. Also idle players will end up hiding at player starts, which can be seen as giving the IT a few unfair points.
SetRound <Round-number> - This command will change the current round number. Useful if you want to extend playing time on a map, without causing everyone to lose their score.
ChangeItType <Random/FirstFound/LastFound/InOrder> - This command will change how the next IT is chosen. FirstFound will pick the first player found to be IT next, LastFound will pick the last player found to be IT, Random choose a random person to be IT every round, and InOrder will cycle through the list of all players, making everyone IT at the same rate, regardless of who found who when.
Wait - This command will stop the countdown to the beginning of the next round. This is useful if people are expected to join, but will miss the beginning of the round, and then become spectators for an entire round. This command has no effect if there is not currently a countdown.
SwitchLevel - This command has been modified for Hide and Seek, so that moderators can change the current level.
ToggleMods (Admins only) - This command will toggle the bModsWhileAdmin boolean in HideNSeek gameinfo. It will either make all logged in moderators active (bModsWhileAdmin is false), or make all active moderators inactive (bModsWhileAdmin is true). All admins will be messaged the change, including the number of moderators made active/inactive, and all affected moderators will be notified as well.

Commands marked with an * will send a message to all Admins and Mods telling them about the change.
==================================================================================================================
PlayerStart Commands - These commands can only be used by administrators
Note that these commands will work best offline. I believe, but am not postive, that changes are not always properly saved online.

AddEvent <EventName> - This command will add an event to the list for the map. Events are trigger for each specific map 1 second after the start. 
RemoveEvent <EventName OR EventNumber> - This command will remove an event from the list, either by finding a match Event Name, or by using the number of the event.
SetMapJumpZ <New-JumpZ> - This command changes the JumpZ for the map, and also immediately changes the current jumpZ for all players. Map jumpZ is used instead of the game's JumpZ, if bUseMapJumpZ is true.
AddPlayerStart <Optional Description> - This command will add a summonable playerstart in front of you (as if you had summoned it, it uses the exact same location offset). The location of the new start, as well as the description (if one was added) will be stored into HSPlayerStarts.ini . The description is not necessary, and is only used to help you figure out what playerstart goes where, when viewing the INI file.
RemovePlayerStart <Entry-number> - This command will remove a summoned playerstart, both from the INI file, and will also delete the playerstart from the map.
Changecount <NewTime> - This command will change the number of seconds IT will count for. The time is limited to between 10 and 180 seconds.
ChangeRoundTime <NewTime> - This command will change the length of each round (measured in minutes). The change will be announced and the round time will be lengthened or shortened accordingly. The round will end if the remaining time is less than 0.
ListStarts <optional 'Log PlayerStarts', optional 'Log Events', optional 'Log Blocks'> - This command will message you the following stats: The current map number and total maps used, the number of PlayerStarts that exist on the map, the number of Events that were triggered on the map, and the number of PlayerBlocks that exist on the map. If '1' or 'true' is used for any of the Logs, it will log all of the PlayerStarts, Events, or PlayerBlocks used in the map.
ListEvents - This command will message you a list of all events used on this map.
ClearLists <optional EveryList, optional DeleteStarts> - Use this command to remove all playerstarts from the map. Normally, it will only remove the INI entry. To remove the PlayerStart lists for all maps, put '1' or 'true' after the command. To also delete the PlayerStarts on the current map, place a '1' or 'true' after EveryList. Note that if you wish to Delete the playerstarts, but not for all maps, you must put a '0' or 'false' for EveryList.
ShowStarts - This command will allow you to view all PlayerStarts and PlayerBlocks on the map. Only one person may view the PlayerStarts at a time, and you are given 30 seconds of un-interuptable viewing time. After that time has passed, another player may decide to view the starts, making them invisible to you once again. While the PlayerStarts and PlayerBlocks are visible, you can put your cursor over them, and over any mover, to get information about them on your HUD. The HUD will show the location of each PlayerStart or Block, the entry number, and the object's name. Information can also be viewed about movers, it will show the Mover Type (i.e. BumpOpenTimed or TriggerOpenTimed), the mover's tag (to make it easier to add an event to trigger them, if you wish to), and also the Mover's name.
AddImage - This command will add an image showing that this area is off limits. It is intended to be accompanied with PlayerBlocks. It was made as a separate class because most situations require multiple PlayerBlocks, but only one BlockImage is needed per group, and more would just look odd.
RemoveImage <Entry-Number> - This command will destroy a summoned Image, and remove the saved location from the Config.
ClearPending - The Pending Vector is used as a placeholder for the AddLocation and AddTracer commands. A PrismArea requires two vectors, and those two commands will add one vector at a time. ClearPending will delete the Pending Vector if it is set.
AddLocation - This command will either set the Pending Vector to your current location, or create a new PrismArea using your current location and the current Pending Vector.
AddTracer - This command will either set the Pending Vector to the tracer location, or create a new PrismArea using the tracer location and the current Pending Vector. The tracer location is at most 500 units in front of you, less if there is a wall less than 500 units in front of you, in which case it will stop at the wall. The ShowTracer command will let you see where the tracer is, and if PSMode is enabled you will be able to see the actual vector it represents. 
AddBoth - This command will create a PrismArea using your current location and the tracer location. The pending vector is not used for this command; it is ignored if it is set to anything.
RemovePrism <ID> - This command will remove a PrismArea from the config file. Also, any playerblocks within the deleted PrismArea will also be deleted, even if they do not belong to that PrismArea. 
ShowTracer - This command will show an effect where the tracer is. The effect will move as you move or change direction. The tracer will always be 500 units in front of you, or at the wall you are facing. 
ShowPrism <ID> - This command will 'flag' a PrismArea of the given ID. If the PrismArea is already flagged, it will be de-flagged. The result of flagging a PrismArea is that 8 effects will be spawned at the 8 corners of the PrismArea. Only you will be able to see these effects.
ShowAllPrisms - This command will flag all PrismAreas on the map, as described above. In addition, any new PrismAreas added after using this command will be visible to you automatically.

=====================================================================================================================
Variables:
This is a list of all the config variables in the GameInfo, and a brief description of what they do

class<weapon> Weapons[3]- This array contains all the weapons that will be given to all players at the beginning of the game. By default, players will start only with the dispersion pistol. Any weapon can be added into the array, including third party weapons. Note that ammo automatically regenerates at the rate of 1 per second, so additional ammo is not needed.
bool BFoundPlayersHelp - If true, Whenever a player is found, he starts helping the IT find others. If False, or if there are already MaxIts players seeking, found players become spectators for the rest of the round.
bool Bgivesearchlight - If true, players spawn with a searchlight.
int playerJumpz - The default JumpZ of players. If the map jumpZ is 0, or if bUseMapJumpz is False, this will be used.
int Roundpause - Time in seconds between rounds, doubled for the first round of the map. All players are spectators during this time. It counts down as blue "x..." in the center of the screen.
int DefaultRoundTime - Round time, in minutes, used if the MapRoundTime is 0 or if bUseMapTimes is False, this time will be used.
int resetsallowed - Number of times a player is allowed to Reset his postion. Spectators can reset it any number of times.
bool Ballowweapons - If true, weapons and ammo will not be deleted at the beginning of every map. Players can therefore grab additional weapons.
bool BUseAllStarts - If true, and summoned playerstarts are present, all playerstarts will be used, including normal ones. Normally, the original player starts are not used if summoned player starts exist.
int MaxDist - The maximum distance players will spawn from the IT. Assuming this works. I'm actually not positive. 0 is no limit. 
bool bUseMapJumpz - If true, the JumpZ for individual maps will be used (saved in HSPlayerstarts.ini), instead of the Default PlayerJumpz stored in HideNSeek.ini.
bool bUseMapTimes - If true, the Round time and Count time stored in HSPlayerStarts.ini will be used, instead of DefaultRoundTime and DefaultCountTime in HideNSeek.ini.
int RoundLimit - Maximum number of rounds before the game ends and moves on to the next map in the Maplist. 0 is no limit. 
int ScoreLimit - Maximum score for a person before the game ends and moves on to the next map in the Maplist. 0 is no limit. 
ENextItType NextItType - Determines the way the NextIt is determined. Can be one of four values: Random, FirstFound, LastFound, and InOrder.
int MaxIts - Maximum number of players that can be seeking at once. Includes the IT. 0 is no limit. 
bool BNoBooks - If true, all books except the ones made from the inventory item will be destroyed. This is in case you don't want players to be able to bookjump. However, I consider it to be a useful strategy, hence me making the inventory item.
bool BNoSkinChanges - If true, players cannot use the ChangeSkin command.
bool BNoAnimChanges - If true, players cannot use the SetAnim command.
string ModeratorPassword - This string is the login password for moderators. They have less power than a full admin, and can not do any of the PlayerStart Commands. However, they still have a good deal of power, so this password should not be given away lightly. The password is case sensitive (Note that the admin password is not...). Any failed login attempts are logged and the person is automatically kicked. Note that if the password is blank (default), moderators are not allowed at all, and all attempts will fail and then result in a kick.
bool bNoModsWhileAdmin - If true, moderators have no power at all while an administrator is present. They can login, and will be considered logged in, but will have no active power while admins are present. They will become active again when all admins leave the game, and will lose this power once any log back in. Inactive moderators are informed of these changes through messages.

Credits:
People who have helped me make this mod possible...
<T>HeadShot has been a great help, he has been my main tester for a long time, and has helped me find a good number of bugs.
Also, he has found A LOT of spots in many maps, I still can't figure out how he got so much better at my own game.
Finally... he made the image for the BlockImage (the hand), and helped me touch up the icon for the BookHolder.
KOOPA888 mosted a great coop server for a long time. One of the odder things done in there was Hide and Seek... only it worked mainly on the honor system, without any enforceable rules. If not for playing on that server, I never would have started this mod.

