[SCRIPT] Sector Takeover v2.4.3 [Updated 20-Apr-2007]
Posted: Tue, 6. Jun 06, 00:12
Sector Takeover v 2.4.3 (20th Apr 2007)
An X3: Reunion script originally by acrh2, modified/enhanced by DesertEagle and nirwin.
[ external image ]
Downloads
Zip file: Click here
Spk file: Click here (installs via Cycrow's Script Installer)
Compatability
This script has been verified as compatable with X3 version 2.0.02 (and all previous versions).
Threads
Previous thread
http://forum2.egosoft.com/viewtopic.php?t=117807
Official thread
http://forum2.egosoft.com/viewtopic.php?t=143524
French (Français) thread
http://forum2.egosoft.com/viewtopic.php?p=1698791
Purpose
To allow a player to ultimately defeat his enemies by taking over their sectors.
How it works
* Only foe sectors can be claimed. An appropriate adjustment to "Global Commands" menu under "Pilot" menu may be required: for example, to claim an Argon sector, the relation to Argon must be set to "Foe" and then transmitted to "all reachable properties". After the sector has been claimed, the relation can be set back to "Friend".
* In order to claim a sector, the player must destroy all stations in the sector, and build his own Trading Dock in the sector. The ownership of the sector will automatically go to the player within 5 sec. Alternatively, the player can first build his Trading Dock, then destroy all other stations in the sector.
* A player-owned Trading Dock can be marked so that it would not claim a sector (for example, those Tradings Docks used for commerce in pirate sectors). In order to do that, the player must rename the Trading Dock in question so that its name starts with "$" (dollar sign).
* If all player-owned Trading Docks in a claimed sector are destroyed, the ownership of the sector will immediately go back to the original race.
* Enemy sectors of the original owner race located within up to 4 jumps of the claimed sector will periodically send small raiding parties to destroy player's Trading Docks to take the sector back. The player must then defend his Trading Docks, and try to claim all enemy sectors of the same race in that part of the X-Universe.
* A new command "Sector Takeover options" command is now available under Command Console / Combat menu. This command, when executed, will send an incoming question to the player. The player must then exit out of the Command Console and check his logbook. Several options will now be selectable: "Toggle raiding parties" - allows to enable or disable raiding parties attacking player-owned Trading Docks, "Uninstall" - uninstalls the script, "Do nothing" - does nothing. Select one of the options and press the enter key to execute the option.
* Each station located within a player-owned sector will pay the player a fee of 3,125 credits an hour (more for shipyards and EQ docks), this fee covers protection for the factory, space rental and various other things. This fee is paid once an hour.
* Each station that the player owns, that is located in a sector owned by another race (except Xenon or Kha'ak), will be charged a tax at the same rate as that which is charged to their stations in your sectors (see above).
The amount goes straight from the players account. When the player cannot afford the tax, the station is 'seized' by the owner of the sector it is located in.
Player owned stations in a player owned sector are not charged a tax (because that tax would just go straight back to the player).
* The Player can decide whether or not to allow other races or businesses to set up stations in each of their individual sectors. This is acheived through the "Sector Takeover options" message. For more details see "Sector Takeover - miscellaneous usage instructions / Player sectors and foreign commerce" towards the end of this file.
Version history
2.4.3 - Added the ability to choose which sectors get effected by Player GOD. Moved the spawn suppression system to it's own AL plugin to avoid the problems with the core script. Stopped Player GOD creating multiple stations with the same name in the same sector. Fixed a potential bug where stations could spawn too close together(not properly fixed due to limitations of the scripting language, but good enough). Made maximum number of stations in a sector scalable based on the size of the sector. Numerous optimisations based on the 'sectorarray' variable.
2.4.2.1 - Fixed a bug that meant if the player was claiming sectors with an HQ, that sector would return to the original races control.
2.4.2 - Fixed Player GOD crash to do with overly long 'if' statement. Stations spawned by Player GOD will now, have shields, be owned by the correct race, not be enemy stations, and not be Player stations. Also added code for HQ claiming, to enable this feature users must open 'SectorTakeover.timer' script and change the line 'HQCLAIMING = FALSE' to 'HQCLAIMING = TRUE'.
2.4.1 - [TESTING RELEASE] Fixed a problem in the player GOD script which meant it could attempt to access an element of a potentially empty array. This exploit may have caused the crashes reported in v2.4.
Made Pirate raiding parties consist of pirates rather than Yaki.
Also added German translation. Many thanks to 'JabbaTheHutt' for this.
2.4 - Added a plugin to simulate the work of GOD in player controlled sectors, therefore making stations spawn in player sectors, thus making sector conquering more profitable. Improved timing of script that removes unwanted hard-coded stations, so now the player should never notice them. Also restored the "Sector Takeover options" command (Thanks to Armageddon for that fix).
2.3 - Removed some debugging output that I accidentally left in version 2.2, also added a script to remove hard coded respawning stations (this is not yet ideal, the station stays around long enough to spawn things, but will eventually be removed. I will improve upon this later).
2.2 - Fixed a bug that meant Unknown sectors couldn't be claimed. Stopped player owned stations being charged a tax in Kha'ah and Xenon sectors. French translation added (thanks to Serial Kicked for his work on that).
2.1 - Added the taxation of player-owned factories in another races sectors, with a harsh penalty if you cannot afford the tax. Fixed a bug that prevented the taxation system being disabled in the 'AL settings' window. Moved the name of the station tax script to a language file to allow translation.
2.1 - Added the taxation of player-owned factories in another races sectors, with a harsh penalty if you cannot afford the tax. Fixed a bug that prevented the taxation system being disabled in the 'AL settings' window.
2.0 - Added a station tax to the game to give the player a reward for conquering sectors.
1.8 - Modified functionality -- Only original owning race stations are counted against the player when determining whether or not the player has conquered the sector. Script taken over by DesertEagle & nirwin.
1.7 - New functionality added - Combat command menu has a new option "Sector Takeover Options".
1.6 - Added automatic claiming of sector gates to prevent Xenon from respawning.
1.5 - Further gameplay tweaks - the frequency of rading parties and the distance from which they come (in sectors) will vary with the fighting rank of the player.
1.4 - Gameplay tweaks. Added the ability to mark certain Trading Docks to not claim a sector.
1.3 - Various speed optimizations. Fixed a bug related to Pirate raids. Added install and uninstall messages.
1.2 - Major update. Now only player owned Trading Dock stations can be used to claim a sector.
If there are enemy sectors of the same race as the original owner within 8 jumps of the overtaken sector, these sectors will periodically send raiding parties to destroy player's Trading Docks stations to take the sector back.
1.1 - Optimized sector releasing routine while fixing a very rare but possible bug when a player owned sector would be released without prior taking it over (for example, a bought sector).
1.0 - Original release.
Installation/Uninstallation/Upgrading (ZIP file)
Installation
Unzip the archive into your X3 directory, eg "C:\Program Files\Egosoft\X3 Reunion". Make sure that your script editor is enabled (check official Egosoft "Scripts and Modding" forum for instructions).
Load your savegame or start a new game.
Uninstallation
Method 1(versions 1.7+):
First disable the SectorTakeover tax system from the 'AL settings' menu if present, as described in the section 'Enabling/Disabling the Tax system' below, then uninstall through the Combat command menu, wait 15 seconds, save the game, quit to desktop, then delete the script files from "scripts" directory which start with "SectorTakeover." and "al.SectorTakeover", and the file "setup.SectorTakeover". Reload the game.
Method 2(all versions):
First disable the SectorTakeover tax system from the 'AL settings' menu if present, as described in the section 'Enabling/Disabling the Tax system' below, then execute SectorTakeover.uninstall script, wait 15 seconds, save the game, quit to desktop, then delete the script files from "scripts" directory which start with "SectorTakeover." and "al.SectorTakeover", and the file "setup.SectorTakeover". Reload the game.
Updating to a new version
Please uninstall the old version first as described above, then install the new version.
Enabling/Disabling Sector Takeover plugins & miscellaneous usage instructions
Tax System plugin
If you would like to enable or disable the tax system perhaps because you don't want the benefit of station tax, it can be disabled from the 'Global AL Tasks' menu.
To acheive this, go to the options menu, choose Gameplay, then 'Global AL Tasks' and set the 'Sector Takeover Tax' option to 'No'
Player GOD plugin
If you would like to stop the plugin from spawning stations in player controlled sectors, you can disable it from the 'Global AL Tasks' menu.
To acheive this, go to the options menu, choose Gameplay, then 'Global AL Tasks' and set the 'Sector Takeover Player GOD' option to 'No'
The Respawn Suppression System Plugin
If you would like to stop the plugin from removing certain stations that are forced to respawn in the same sectors, go to the options menu, choose Gameplay, then 'Global AL Tasks, and set the 'Sector Takeover Respawn Suppression System' option to 'No'.
Player sectors and foreign commerce
If you would like to set whether or not your sectors allow foreign races or businesses to setup stations, go to the 'Combat' section of your ships 'command console' and choose 'Sector Takeover options', then read the Incoming message.
In that message you can - amongst other things - set the foreign commerce policy for your current sectors, all your sectors at once, check the foreign commerce setting for your current sector and list which of your sectors allow foreign commerce, by selecting the appropriate action. If you decide to check the setting for your current or all of your sectors, the report will be placed in your message log.
Bug/issue tracker
Bugs/issues/requests can be entered in the bugtracker or in this thread.
The bugtracker is used for multiple X3 projects so please select Sector Takeover before submitting a report.
An X3: Reunion script originally by acrh2, modified/enhanced by DesertEagle and nirwin.
[ external image ]
Downloads
Zip file: Click here
Spk file: Click here (installs via Cycrow's Script Installer)
Compatability
This script has been verified as compatable with X3 version 2.0.02 (and all previous versions).
Threads
Previous thread
http://forum2.egosoft.com/viewtopic.php?t=117807
Official thread
http://forum2.egosoft.com/viewtopic.php?t=143524
French (Français) thread
http://forum2.egosoft.com/viewtopic.php?p=1698791
Purpose
To allow a player to ultimately defeat his enemies by taking over their sectors.
How it works
* Only foe sectors can be claimed. An appropriate adjustment to "Global Commands" menu under "Pilot" menu may be required: for example, to claim an Argon sector, the relation to Argon must be set to "Foe" and then transmitted to "all reachable properties". After the sector has been claimed, the relation can be set back to "Friend".
* In order to claim a sector, the player must destroy all stations in the sector, and build his own Trading Dock in the sector. The ownership of the sector will automatically go to the player within 5 sec. Alternatively, the player can first build his Trading Dock, then destroy all other stations in the sector.
* A player-owned Trading Dock can be marked so that it would not claim a sector (for example, those Tradings Docks used for commerce in pirate sectors). In order to do that, the player must rename the Trading Dock in question so that its name starts with "$" (dollar sign).
* If all player-owned Trading Docks in a claimed sector are destroyed, the ownership of the sector will immediately go back to the original race.
* Enemy sectors of the original owner race located within up to 4 jumps of the claimed sector will periodically send small raiding parties to destroy player's Trading Docks to take the sector back. The player must then defend his Trading Docks, and try to claim all enemy sectors of the same race in that part of the X-Universe.
* A new command "Sector Takeover options" command is now available under Command Console / Combat menu. This command, when executed, will send an incoming question to the player. The player must then exit out of the Command Console and check his logbook. Several options will now be selectable: "Toggle raiding parties" - allows to enable or disable raiding parties attacking player-owned Trading Docks, "Uninstall" - uninstalls the script, "Do nothing" - does nothing. Select one of the options and press the enter key to execute the option.
* Each station located within a player-owned sector will pay the player a fee of 3,125 credits an hour (more for shipyards and EQ docks), this fee covers protection for the factory, space rental and various other things. This fee is paid once an hour.
* Each station that the player owns, that is located in a sector owned by another race (except Xenon or Kha'ak), will be charged a tax at the same rate as that which is charged to their stations in your sectors (see above).
The amount goes straight from the players account. When the player cannot afford the tax, the station is 'seized' by the owner of the sector it is located in.
Player owned stations in a player owned sector are not charged a tax (because that tax would just go straight back to the player).
* The Player can decide whether or not to allow other races or businesses to set up stations in each of their individual sectors. This is acheived through the "Sector Takeover options" message. For more details see "Sector Takeover - miscellaneous usage instructions / Player sectors and foreign commerce" towards the end of this file.
Version history
2.4.3 - Added the ability to choose which sectors get effected by Player GOD. Moved the spawn suppression system to it's own AL plugin to avoid the problems with the core script. Stopped Player GOD creating multiple stations with the same name in the same sector. Fixed a potential bug where stations could spawn too close together(not properly fixed due to limitations of the scripting language, but good enough). Made maximum number of stations in a sector scalable based on the size of the sector. Numerous optimisations based on the 'sectorarray' variable.
2.4.2.1 - Fixed a bug that meant if the player was claiming sectors with an HQ, that sector would return to the original races control.
2.4.2 - Fixed Player GOD crash to do with overly long 'if' statement. Stations spawned by Player GOD will now, have shields, be owned by the correct race, not be enemy stations, and not be Player stations. Also added code for HQ claiming, to enable this feature users must open 'SectorTakeover.timer' script and change the line 'HQCLAIMING = FALSE' to 'HQCLAIMING = TRUE'.
2.4.1 - [TESTING RELEASE] Fixed a problem in the player GOD script which meant it could attempt to access an element of a potentially empty array. This exploit may have caused the crashes reported in v2.4.
Made Pirate raiding parties consist of pirates rather than Yaki.
Also added German translation. Many thanks to 'JabbaTheHutt' for this.
2.4 - Added a plugin to simulate the work of GOD in player controlled sectors, therefore making stations spawn in player sectors, thus making sector conquering more profitable. Improved timing of script that removes unwanted hard-coded stations, so now the player should never notice them. Also restored the "Sector Takeover options" command (Thanks to Armageddon for that fix).
2.3 - Removed some debugging output that I accidentally left in version 2.2, also added a script to remove hard coded respawning stations (this is not yet ideal, the station stays around long enough to spawn things, but will eventually be removed. I will improve upon this later).
2.2 - Fixed a bug that meant Unknown sectors couldn't be claimed. Stopped player owned stations being charged a tax in Kha'ah and Xenon sectors. French translation added (thanks to Serial Kicked for his work on that).
2.1 - Added the taxation of player-owned factories in another races sectors, with a harsh penalty if you cannot afford the tax. Fixed a bug that prevented the taxation system being disabled in the 'AL settings' window. Moved the name of the station tax script to a language file to allow translation.
2.1 - Added the taxation of player-owned factories in another races sectors, with a harsh penalty if you cannot afford the tax. Fixed a bug that prevented the taxation system being disabled in the 'AL settings' window.
2.0 - Added a station tax to the game to give the player a reward for conquering sectors.
1.8 - Modified functionality -- Only original owning race stations are counted against the player when determining whether or not the player has conquered the sector. Script taken over by DesertEagle & nirwin.
1.7 - New functionality added - Combat command menu has a new option "Sector Takeover Options".
1.6 - Added automatic claiming of sector gates to prevent Xenon from respawning.
1.5 - Further gameplay tweaks - the frequency of rading parties and the distance from which they come (in sectors) will vary with the fighting rank of the player.
1.4 - Gameplay tweaks. Added the ability to mark certain Trading Docks to not claim a sector.
1.3 - Various speed optimizations. Fixed a bug related to Pirate raids. Added install and uninstall messages.
1.2 - Major update. Now only player owned Trading Dock stations can be used to claim a sector.
If there are enemy sectors of the same race as the original owner within 8 jumps of the overtaken sector, these sectors will periodically send raiding parties to destroy player's Trading Docks stations to take the sector back.
1.1 - Optimized sector releasing routine while fixing a very rare but possible bug when a player owned sector would be released without prior taking it over (for example, a bought sector).
1.0 - Original release.
Installation/Uninstallation/Upgrading (ZIP file)
Installation
Unzip the archive into your X3 directory, eg "C:\Program Files\Egosoft\X3 Reunion". Make sure that your script editor is enabled (check official Egosoft "Scripts and Modding" forum for instructions).
Load your savegame or start a new game.
Uninstallation
Method 1(versions 1.7+):
First disable the SectorTakeover tax system from the 'AL settings' menu if present, as described in the section 'Enabling/Disabling the Tax system' below, then uninstall through the Combat command menu, wait 15 seconds, save the game, quit to desktop, then delete the script files from "scripts" directory which start with "SectorTakeover." and "al.SectorTakeover", and the file "setup.SectorTakeover". Reload the game.
Method 2(all versions):
First disable the SectorTakeover tax system from the 'AL settings' menu if present, as described in the section 'Enabling/Disabling the Tax system' below, then execute SectorTakeover.uninstall script, wait 15 seconds, save the game, quit to desktop, then delete the script files from "scripts" directory which start with "SectorTakeover." and "al.SectorTakeover", and the file "setup.SectorTakeover". Reload the game.
Updating to a new version
Please uninstall the old version first as described above, then install the new version.
Enabling/Disabling Sector Takeover plugins & miscellaneous usage instructions
Tax System plugin
If you would like to enable or disable the tax system perhaps because you don't want the benefit of station tax, it can be disabled from the 'Global AL Tasks' menu.
To acheive this, go to the options menu, choose Gameplay, then 'Global AL Tasks' and set the 'Sector Takeover Tax' option to 'No'
Player GOD plugin
If you would like to stop the plugin from spawning stations in player controlled sectors, you can disable it from the 'Global AL Tasks' menu.
To acheive this, go to the options menu, choose Gameplay, then 'Global AL Tasks' and set the 'Sector Takeover Player GOD' option to 'No'
The Respawn Suppression System Plugin
If you would like to stop the plugin from removing certain stations that are forced to respawn in the same sectors, go to the options menu, choose Gameplay, then 'Global AL Tasks, and set the 'Sector Takeover Respawn Suppression System' option to 'No'.
Player sectors and foreign commerce
If you would like to set whether or not your sectors allow foreign races or businesses to setup stations, go to the 'Combat' section of your ships 'command console' and choose 'Sector Takeover options', then read the Incoming message.
In that message you can - amongst other things - set the foreign commerce policy for your current sectors, all your sectors at once, check the foreign commerce setting for your current sector and list which of your sectors allow foreign commerce, by selecting the appropriate action. If you decide to check the setting for your current or all of your sectors, the report will be placed in your message log.
Bug/issue tracker
Bugs/issues/requests can be entered in the bugtracker or in this thread.
The bugtracker is used for multiple X3 projects so please select Sector Takeover before submitting a report.