
-----------------------------------------------------
X² The Threat - Pirate Guild [AL Plugin]
-----------------------------------------------------
Written by the "Anarkis Federation" (2004-2005)
-----------------------------------------------------

--------------
What Is It ? 
--------------

This Plugin for X² give to the Pirates a kind of global A.I. 


When the plugin starts, a fixed amount of money is given to the pirates, and a HQ is randomly 
choose between the Pirate Bases. This HQ will choose to focuse the attacks on a specific race
(the player IS a race) and it will give orders to the other pirates bases. These orders can be :

- Make money : If funds are low, it will give money to the Guild.
- Weaken Defenses : The pirate base will try to destroy the nearest M6 of the target race
- Pillage Sector : The pirate base will send a massive fleet to raid a sector
- Patrol : Some pirate ships will patrol to another pirate owned sector
- Reinforce : The pirate base will build some ships
- Send fleet to HQ : Some ships will be sent to the HQ.

By the way, each pirate base will defend itself against offenders. They will also try to hack 
nearby enemy M3 ships in order to get control over them. They will also attack specific TS in 
order to make money. The pirate bases will also buy M3 ships from differents races. 

When the funds are high enough the HQ can decide to buy a Teladi M6 Corvette to protect one
of its pirate bases.

Finally, when the HQ reach a given amount of docked ships, it will decide to launch a massive attack 
fleet against a sector of the targeted race. After this assault, a new random HQ and a new target
race will be selected.


--------------
Tips
--------------

-  For more details about this Plugin, BEFORE activating the AL Plugin, go to the Script Editor, 
open AAA.Pirate.AI file, go to the line n°005, and change 'Pirate.Verbose' to TRUE. Now, activate the
plugin, wait for a while (5-10 minutes) and look at your Logbook. You will see a log of the pirate
activities. (using this trick to locate pirate bases is considered as a cheat). 

- Using this Plugin will make the game much harder. Expect to loose a lot of TS and M6 when the
Pirate Guild choose to attack your assets. You're strongly advised to destroy each pirate base you
find.

- Some lightly defended stations can be destroyed by the pirates.

- Some pirate ships are overtuned and can be very hard to hit. 


--------------
Compatibility
--------------
- Official Universe : Yes
- Saved Games       : Yes
- Custom Universes  : Yes (Pirates MUST be present in the custom map)
- Custom scripts    : Yes (should be compatible with all other scripts)


--------------
Installation 
--------------
- Unzip this .RAR archive in your X² Main Folder ("c:\Program Files\Egosoft\X2 - The Threat")
- Run X2
- Launch a new game or load one of your savegames
- Go to Options / Artificial Life
- Look for "Pirate Guild : Intelligent Pirate Behaviours"
- Set to TRUE to activate this plugin


--------------
UPGRADING FROM 1.15
--------------

Version 1.15 had a serious issue. It's advised to use load a game saved before the installation of the version. If it's not possible : 

- Open the Script Editor. 
- Locate a file called : "AAA.Repair.LT.bug"
- Press R to run it
- When asked for an input, select "null"

This script will destroy *ALL* Pirate owned LaserTowers to correct the bug.


--------------
UnInstall
--------------
- Go to Options / Artificial Life
- Look for "Pirate Guild : Intelligent Pirate Behaviours"
- Set to FALSE to desactivate this plugin
- Wait about 20-30 minutes of game
- Save your game and quit
- Delete all the files from this archive in your 'scripts' folder


--------------
Version History
--------------

v1.20
 (+) Pirates bases can buy LaserTowers (up to 4 by pirate base)
 (+) If Jumpfleet 1.6 or more is installed and factory respawn is activated, the Pirate Guild can attack stations
 (+) You are paid for killing Pirate M6 (50k)
 (+) You are paid for the destruction of Pirate Bases (100k)

v1.16 -BugFix-
 (+) Small code improvements
 (*) AI always check if the Pirate base still exists before giving orders to it
 (*) Patrol Fix : Less ships used. 
 (*) Patrol Fix : If no pirate sector found in range, the patrol will be sent in a random sector
 (*) Invasion Fix : Using a timer to recall ships
 (*) Defense Fix : Base defense radius reduced from 100km to 30km
 (-) Pirates cannot buy LaserTowers anymore (will be fixed soon i hope)

v1.15
 (+) Pirates bases can buy LaserTowers
 (+) Fleets sent against a M6 or a TL has been reduced
 (+) Maximum amount of ships owned by a same Pirate Base has been reduced
 (*) Bugfix : Plugin is compatible with X² Firelance mod

v1.10
 (+) Lot of scripts rewritten from scratch
 (+) Pirates can now target TL ships
 (+) Pirate Bases can attack from a greater distance
 (+) Rebalanced the size of some fleets
 (+) Better Weapons in pirate M3 and M6
 (*) Bugfix : Pirates aren't able anymore to hack the playership
 

v1.00 - Initial Public Release


--------------
Contact
--------------

YOu can contact me at : pigeonpunk@numericable.fr

Or simply at the Egosoft Forum : http://www.egosoft.com/x2/forum      (nickname : SerialKicked)