Renegade Scripts.dll
Copyright 2007 Vloktboky, Whitedragon(MDB), Mac, Jonathan Wilson

This file is part of the Renegade scripts.dll
The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version. See the file COPYING for more details.
In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
Only the source code to the module(s) containing the licenced code has to be released.

---

Project Title: Server Side Game Manager
Previous Title: Server Side All Out War
Main Coder: Whitedragon
Additions and Assistance by: mac, jonwil, and v00d00
Orginal Author: vloktboky
Last Release Date: August 5th, 2007
Latest Version: 2.0.2

---

Installation:

Windows:
Open the "WFDS Server Files" folder.
Copy the ssgm.ini, scripts.dll, scripts2.dll, bhs.dll, shaders.dll, d3d8.dll, and d3dx9_30.dll files to your server folder, 
overwriting any existing files.
Next copy all files from the data folder in this download to your server's data folder.
Finally, open up ssgm.ini and configure all settings to your liking and start your server!


Linux:
Download and install the LFDS wrapper from http://www.brenbot.com/wrapper/.
Open the "LFDS Server Files" folder.
Copy ssgm.ini, patcher, scripts-RH8.so, scripts-RH7.so, bhs8.so, and bhs.so to your server folder, overwriting any 
existing files.
Next copy all files from the data folder in this download to your server's data folder.
Run the patcher program to patch your LFDS to load the scripts file.
Finally, open up ssgm.ini and configure all settings to your liking and start your server!

---

Update History:



Version 2.0.2:
  - Change: The "New settings detected and loaded!" message will now include the INI file that the settings were loaded from.
            This was done so that plugins using the SettingsLoader class will display a different message than SSGM when
            new settings are found.
  - BugFix: Mission maps spelled with a lowercase m will no longer be detected as an unknown mod.
  - BugFix: Fixed an exploit in the crate system.

Version 2.0.1:
  - New: Character changes will now be logged under the "_CHANGECHARACTER" header similar to how the pre 2.0 "_PURCHASE" 
         worked. This includes every way that your character can be changed.
  - New: Added additional documentation for making plugins and adding new CTF flag positions.
  - Change: SSGM no longer requires a modified objects file to function. It is still capable of loading modified objects
            files, however.
  - BugFix: The CTF class specific enable setting(CTF_C##_Enabled) now works correctly.
  - BugFix: Fixed a bug that caused your ammo to return to normal if you refilled when infinite ammo was enabled.
  - BugFix: Harvesters now spawn correctly in CTF mode.
  - BugFix: The "DisableBaseDefenses," "DisablePowerPlants," "DisableRefineries," "DisableSoldierFactories,"
            "DisableVehicleFactories," "DisableRepairPads," and "DisableCommCenters" settings are now properly included and
            documented in ssgm.ini.
  - BugFix: Fixed a bug in the example plugin source where it wouldn't pass the plugin version to SSGM.
  - BugFix: Fixed the incorrect Random Vehicle Crate coordinates for Nod on Hourglass.

Version 2.0:
  - New: Renamed to SSGM(Server Side Game Manager).
  - New: Ported to scripts 3.4.1.
  - New: Major code overhaul, reorganization, and optimization.
  - New: Added support for modifications, both standalone and PKG. Some features, such as crates and drop weapons, will 
         automatically be disabled when the server is running a mod.
  - New: Added new setting "EnableInfiniteAmmo" which gives all infantry weapons, except C4 and beacons, infinite ammo.
  - New: Extra information has been added to vehicle kill messages, including the driver/owner of the vehicle and the last
         amount of damage done to the vehicle before it was killed.
  - New: Vehicle and beacon purchases will now be logged. See the "LogVehiclePurchases" and "LogPowerupPurchases" settings.
  - New: Extra ingame kill messages have been added for when a player kills theirself or is killed by a base defense, 
         harvester, or tiberium. See the "EnableExtraKillMessages" setting.
  - New: Added logging for C4 detonations and disarms under the "_C4" log header. Controlled by the "LogC4" setting.
  - New: Added setting "LogBeacons" to control beacon logging. Previously it was always enabled.
  - New: Vehicle purchase auto-binding has been added. When a player buys a vehicle and is the first person to enter it, 
         it will be automatically bound to them.
  - New: Vehicle wreckage revive auto-binding has been added. When a vehicle wreck is revived it will be automatically bound 
         to either the person who repaired it the most or to its previous owner if revived within 30 seconds of the vehicle
         dying.
  - New: A new plugin system has been added which lets users load a list of .dll/.so files into the FDS.
         See the "Plugin" section of ssgm.ini for more information.
  - New: Capture The Flag mode has been added. See the "GameMode" setting.
  - New: The version of SSGM, scripts.dll, and bhs.dll will now be outputted to the ssgm_version.ini file on startup.
  - New: A section has been added to ssgm.ini to list the acceptable sniping characters for the sniping modes.
  - New: The translated preset name and translated current weapon for both objects has been added to the end of the 
         gamelog killed events.
  - New: Player and vehicle kill messages will now include if C4 or a beacon was used to kill the player/vehicle. The kill 
         messages will read "(Timed C4, Remote C4, Proximity C4, or Beacon)" instead of the usual "(Preset/Currently held weapon)".
  - BugFix: AI bots will no longer crash the server.
  - BugFix: Harvesters will now properly spawn in the infantry only game mode.
  - BugFix: Fixed a bug where crates would use the wrong model when "AllowVehCrates" was set to 1.
  - BugFix: Fixed a bug that caused vehicle wreckages to sometimes have no health bar.
  - Change: Many settings have been renamed, removed, or merged with other settings:
            All settings dealing with logging are now properly prefixed with "Log".
            "LogVehicleCreate" has been superseded by "LogVehiclePurchases" and was removed. This means that the "_VEHICLE" 
            log header is no longer used.
            "LogHarvesterDeath" has been merged with "LogVehicleKills".
  - Change: Disabled characters and vehicles will now be completely unpurchasable.
  - Change: Non sniper characters will now be replaced with sniper characters in the PT menu when running in the sniping modes.
  - Change: Locked vehicles will no longer take on the team of their owner. Friendly players will still be unable to damage 
            them, however.
Version 2.0 CTF Changes from SSCTF 1.3:
  - New: Added command "!captures" which shows the capture limit and the amount of times each team has captured the flag.
         The same keyboard shortcut(VehBind/Home) that triggers "!bind" in AOW mode will instead trigger "!captures" in
         CTF mode.
  - New: Added command "!flaginfo" which shows the location of each team's flag.
         The same keyboard shortcut(VehBL/Insert) that triggers "!bl" in AOW mode will instead trigger "!flaginfo" in
         CTF mode.
  - New: Setting "ShowFriendlyFlagRadar" has been added which toggles whether friendly flags will appear on the radar.
  - New: Setting "ShowEnemyFlagRadar" has been added which toggles whether enemy flags will appear on the radar.
         Players will need bhs.dll to see this.
  - New: A new class system has been added. The class systems allows you to have multiple sets of pedestal positions 
         per map with one being randomly chosen each game.
  - New: Reverse CTF mode has been added. In Reverse CTF the flags are reversed, meaning that the GDI flag is in the Nod base 
         and the Nod flag is in the GDI base. The objective is to take the enemy flag from your base and run it to your
         pedestal in the enemy base. 
         Reverse CTF uses the class system and is therefore random, meaning that even when it is enabled not all games will
         be reversed.
         Reverse CTF can be toggled on or off through the "EnableReverseCTF" setting.
  - Change: Players will no longer receive money or points for stealing, picking up, or returning the flag, or killing the
            flag carrier.
  - Change: Various settings have been renamed or moved.



Version 1.5:
  - New: Ported to scripts 2.5.2.
  - New: A Bandwidth exploiter detector has been added. This will automatically detect players who attempt to use the 
         BW exploit. See "EnableBWDetector", "BWDefault", and "KickBWExploiters" settings.
  - New: You can now put weapon presets into the disable list. This will stop them from appearing as spawn weapons 
         and in the random weapon crate.
  - New: Setting "Write_Gamelog_to_SSAOWlog" has been added. If enabled this will make Gamelog write all its log messages 
         to the SSAOW log (ie FDSLogRoot) instead of gamelog(2).txt.
  - New: Added additional translated presets to ssaow.ini.
  - BugFix: Fixed the objects file always being in use while the FDS is running.
  - BugFix: Fixed a crash bug that was triggered when you set Config in server.ini to anything other than svrcfg_cnc.ini.
  - BugFix: Disabled characters no longer appear in the random character crate.
  - BugFix: Disabled vehicles no longer appear in the random vehicle crate.
  - BugFix: The Gamelog_Archive_Logfiles setting now works on Windows.
  - BugFix: You are now refunded the proper amount of credits for buying a disabled alternate skin character.
  - Change: General Gamelog code cleanup.



Version 1.4.1:
  - New: Ported to scripts 2.3.
  - New: Setting "ForceTeam" has been added. This setting can be used to force all players that join the server
         to switch to the specified team. Intended for CO-OP servers where all players are supposed to be on
         the same team.
  - Change: When you buy a disabled character you will now be switched to your team's spawn character instead
            of a minigunner.
  - Change: The vehicle death animations have been temporarily removed due to a severe crash bug. They will
            hopefully be fixed and re-added in the next release.
  - BugFix: Fixed a crash bug relating to the Butter Fingers crate.
  - BugFix: Fixed a crash bug relating to the Tiberium Death crate.

Version 1.4:
  - New: Ported to scripts 2.2.2.
  - New: New docs folder containing files with more detailed descriptions of some of SSAOW's features.
  - New: All settings can now be used in both the [General] section and the map specific section. See ssaow.ini for
         more information.
  - New: Added "BlockCombatRefills" setting, which will disallow players fromn refilling while in combat.
  - New: New crate settings: "EnableCrates", "EnableNewCrates" and "AllowVehCrates".
  - New: Added "DefenseShootWrecks" setting, which decides if base defenses will shoot vehicle wreckages.
  - New: Added setting "ObjectsFile", which allows you to change the objects file that will be loaded.
  - New: Added "EnableSpawnWeapons" setting, overrides the spawn weapon setting in svrcfg_cnc.ini. Used for the sniping modes.
  - New: New "EnableLog" and "EchoLog" settings. "EnableLog" will override all other SSAOW log options. "EchoLog" determines
         if log messages will also be echoed to the FDS console.
  - New: Added "InvincibleBuildings" setting. Prevents buildings from being damaged.
  - New: Added DisableBeacons setting, which removes beacons from the PT menu.
  - New: New output message to the SSAOW log when a map ends. This will include details on how the map was won and who won it.
  - New: New version of gamelog with a setting to use the old or new version.
  - New: New keyboard shortcuts feature! This allows players with the correct client side scripts to simply
         press various keys to activate different commands. This will be used by many of the other SSAOW features.
         Players will need to download http://black-cell.net/clientscripts.zip to be able to use this. 
  - New: New taunt animations using the keyboard shortcuts. There will be 9 taunts, each mapped to a numpad key.
  - New: New keyboard shortcuts to vote on polls. "Page up" for "!vote yes", and "Page down" for "!vote no".
  - New: Vehicle locking system has been added! This allows players to take ownership of and lock vehicles.
         The following are the commands/keyboard shortcuts to utilize this new system. All commands must be said in team chat.
         !Bind/Home Key - Gives you ownership of the vehicle you are currently driving. The vehicle must not 
          be bound to anyone else.
         !Unbind - Relinquishes ownership of your bound vehicle.
         !Lock - Locks your vehicle. Anyone on your team that enters it's driver seat will be removed. If the
          driver of the vehicle is not the owner when it is locked they are vkicked.
         !Unlock - Unlocks your vehicle,
         !BL/Insert Key - Binds and locks a vehicle in one command.
         !Vkick - Removes the player in the driver seat of your vehicle without locking it.
  - New: Command !c4 has been added. This command lets you see the C4 usage of your team. Must be said in teamchat,
         can also be accessed through the End keyboard shortcut.
  - New: A new setting has been added that lets you change the character players spawn as! See ssaow.ini for details.
  - New: 3 new gamemodes have been added. Infantry only, Sniping, and 500 Sniping. The gamemode can be changed by 
         using the "Gamemode" setting in ssaow.ini. See docs/gamemodes.txt for more info.
  - New: New output to the SSAOW log when someone picks up a crate under the header _CRATE.
  - BugFix: The Beacon Crate no longer pages you with a string of garbage text.
  - BugFix: Fixed ShowPlayerKillMessage, LogHarvesterDeath and LogVehicleDeath crashing the server.
  - BugFix: The DDE channel now works again and has a setting to change it's service name.
  - BugFix: Fixed players getting creditted twice for killing buildings on Islands.
  - BugFix: Beacon logging has been re-enabled and shouldn't crash on FieldTS.
  - BugFix: AFK kicker will no longer kick players if they're the only player on their team.
  - BugFix: Vehicle wreckages will now be revived when they reach full health, not half health.
  - BugFix: Fixed a bug that caused people with bhs.dll to crash when someone got a character changing crate while in a vehicle.
  - BugFix: Fixed vehicle fires staying behind after the vehicle is destroyed.
  - BugFix: SSAOW will now load it's settings correctly on every map.
  - Change: Player kill messages show the player's current weapon(Note: This is not always the weapon they used to kill/were killed with).
  - Change: The God Crate was removed.
  - Change: Crates now take 3 minutes to spawn. In addition 2 crates cannot exist at the same time.
  - Change: When someone buys a disabled character they will now be changed to a minigunner and refunded the cost of the
            character they bought.
  - Change: People who get the Spy Crate are now turned into SBHs. They will also lose their spy status after they kill 1 building.
  - Change: Revived vehicles are now neutral instead of the team that revived them.
  - Change: Armor and weapons dropped by players will despawn after 8 seconds.
  - Change: The header for player kills has been changed from _KILL to _PLAYERKILL and the header for vehicle kills has been changed from _KILL to _VEHKILL.
  - Change: The settings file is now ssaow.ini instead of server2.ini.



Version 1.3.4:
  - BugFix: Exploit Fixes for NoName/HostName/Non Printable Player Names.
  - BugFix: A setting has been added to disable crates.
  - BugFix: GDI not being able to kill GDI Wreckages
  - BugFix: Nod not being able to kill Nod Wreckages
  - BugFix: Wreckages will no longer be attacked by base defenses.
  - BugFix: People no longer get points for repairing wreckages. 
  - Bugfix: Dropscript for GDI/Nod Flametank fixed.
  - New: New ssaow.ini with updated/added coordinates for crates.

Version 1.3.3:
  - New: Ported to scripts 2.0
  - Change: All "under attack" sounds are team specific now.
  - New: Crates (orginal code by vloktboky from dragonade, additions and bugfixes by mac & v00d00, see crates.txt for details)
  - New: Vehicle Wreckages (orginal code by vloktboky from dragonade)

Version 1.3.2:
  - BugFix: Made to work with all custom maps, less crashes.
  - New: Added gamelog support for BRenBot.
  - New: Added pickup sounds for picked up weapons.
  - Change: Moved variable for dropped weapons into each map's section, so it can be turned off for every map. 
            (needed for FieldTS)

Version 1.3.1:
  - Change: Removed the sound effect for dropped weapons.
  - BugFix: Made it so DefaultEngL1, DefaultEngL2, and DefaultOther weapon lists are used if their respected weapons list 
            are not located within the detected map's settings.

Version 1.3:
  - BugFix: A bug where weapons would not drop if kill messages were disabled has been resolved.
  - Change: "DisableBaseDefenses" has been moved to the map specific section of ssaow.ini.
  - New: "DisablePowerPlants", "DisableRefineries", "DisableSoldierFactories", "DisableVehicleFactories", "DisableRepairPads",
          and "DisableCommCeneters" has been added.  See the map specific section of ssaow.ini for details.
  - Change: The player who laid a deployed beacon will now be announced with the beacon's deployment message.
  - New: Token friendly items have been added to the output log code.  The key used is shown below:
      _DEBUG - Debug messages
      _GENERAL - General information messages
      _BUILDING - Building Event
      _ALERT - Kicked Event
      _PURCHASE - Purchase Event
      _KILL = Kill Event
      _BEACON = Beacon Event
  - New: BHS.dll support has been added.  The following features have been added, and can be acquired by players who have 
         the Scripts.dll Version 1.9.1 library or higher installed:
      * Buildings now report when they are fully repaired.
      * Buildings now report when their destruction is imminent.
      * Turrets now report when they are under attack.
      * The Harvesters now report when they are under attack.
      * The Obelisk charge up sound can now be heard.
      * The Cargo Plane's engines can now be heard.
      * EVA reports when a vehicle was destroyed if you are near the vehicle.
      * Players now scream when they are killed.  (Female characters have a female scream)
      * Spawn and Weapon sound effects have been added for when a player spawns or when a dropped weapon is created.
      * Fog is now apart of the random weather feature.  The fog will not disrupt your field of vision.
  - New: A DDE channel has been added to allow for external applications to send console input to the FDS directly.  
         To send a command, use Poke.  Service = "RenegadeFDS", Topic = "FDSCommand", Item = "Command".  
         An example of this, in mIRC, would be to type the command: "/dde RenegadeFDS FDSCommand Command msg test" => "> Host: test".
  - New: Code has been added to prevent users from killing Purchase Terminals and the Cargo Plane.



Version 1.2:
  - BugFix: The bug where the server would crash when a player was killed with no killer has been fixed.
  - New: DisableBaseDefense option added.  Setting this to 1 in the INI file will disable all the major base defenses. 
         (GDI AGT, Nod Obelisk, GDI Guard Towers, and Nod Turrets)
  - New: WeaponStart List added.  You can now choose what weapons (powerups) are to be given to a player when he/she spawns.  More information can be found in the INI file.
  - AddFile: Additional presets file (objects_NO_BEACONS.ddb) has been added.  See above Note.



Version 1.1:
  - New: Disable List added.  You can now choose what characters/vehicles are not allowed per map.  
         See INI file for more information.
  - BugFix: If the killer was in a vehicle during a kill, the vehicle will now be displayed in the kill message.
  - BugFix: Safety check code has been added.  TranslatePlayerName will now always work without fear of the FDS crashing.
            The option to enable/disable this feature has been removed. It will now always be enabled.
  - New: MapID Debug mode added. This setting forces the FDS to output a valid MapID that can be used in the INI file to 
         recognize the loaded map.
  - New: DestroyPlayerVeh setting added. If enabled, the server will kill the vehicle a player was in if the player leaves 
         the server or commits suicide.
  - New: Custom Kill Messages added.  This section, which can be found in the INI file, allows for custom kill messages 
         for Soldier VS Soldier kills and Vehicle VS Soldier kills. See the INI file for more information.
  - BugFix: If a player kills him/herself, he/she will not drop a weapon or an armor piece.
  - BugFix: The bug where the fire from a vehicle was sometimes left behind if it was killed has been resolved.



Version 1.0:
  - Initial Release

