[SCRIPT] Sector Takeover v2.4.3 [Updated 20-Apr-2007]

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply

How do you rate this script?

Excellent
241
67%
Good
90
25%
Average
14
4%
Poor
5
1%
Abysmal
10
3%
 
Total votes: 360

User avatar
nirwin
Posts: 2879
Joined: Tue, 1. Nov 05, 23:07
x3tc

[SCRIPT] Sector Takeover v2.4.3 [Updated 20-Apr-2007]

Post by nirwin » 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 ]

:arrow: Downloads
Zip file: Click here
Spk file: Click here (installs via Cycrow's Script Installer)


:arrow: Compatability
This script has been verified as compatable with X3 version 2.0.02 (and all previous versions).


:arrow: 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


:arrow: Purpose
To allow a player to ultimately defeat his enemies by taking over their sectors.


:arrow: 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.


:arrow: 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.


:arrow: 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.


:arrow: 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.


:arrow: 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.
Last edited by nirwin on Thu, 13. Sep 07, 16:20, edited 43 times in total.
Nirwin
------
Sector Takeover | Unlimited Resources (x2/x3)

User avatar
nirwin
Posts: 2879
Joined: Tue, 1. Nov 05, 23:07
x3tc

Post by nirwin » Tue, 6. Jun 06, 00:22

Please note the v2.0 beta contains a phrase that does not come from the language file so is therefore untranslateable, but since there are currently no translations for this script I don't see that being an immediate problem. However I do intend to correct that soon.

Also the balancing of the new tax may need to be tweaked, or something crazy might happen like it giving you billions of credits by accident (though hopefully that won't happen) so you may want to keep a backup of your saves in case you need/want to go back to them.

Please let me know your thoughts on how much money the tax script gives you (see ReadMe for details).
Last edited by nirwin on Tue, 6. Jun 06, 13:49, edited 1 time in total.
Nirwin
------
Sector Takeover | Unlimited Resources (x2/x3)

DesertEagle
Posts: 117
Joined: Thu, 2. Feb 06, 05:32
x3

Post by DesertEagle » Tue, 6. Jun 06, 00:37

Good work Nirwin, I'll take a look.

Cheers,
DE

russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo » Tue, 6. Jun 06, 06:17

Nice job guys. (Did you get your dates confused....?)

The sector tax option looks great, as does keeping the stations. Wish I hadn't destroyed all of that, way back when... :) But, two things:

By "a day", is that 24 hours of actual game play time, or ?
And, I was wondering if you looked into the respawning of the conquered race's trading ports/shipyards. Does it happen randomly, or does there need to be an enemy shipyard nearby? I thought I had that figured out, but, I'm starting to wonder again....

bendyspex
Posts: 837
Joined: Tue, 13. Apr 04, 10:39
x3

Post by bendyspex » Tue, 6. Jun 06, 09:02

Good one guys, glad to see this script is really getting going again. This would work really well with the Terracorp script, and the AL Competitors script, since they both build factories in random places, and I have a few in my sectors.
Good work :)

Brodie
Posts: 760
Joined: Tue, 10. Feb 04, 00:10
x4

Post by Brodie » Tue, 6. Jun 06, 10:02

bendyspez wrote:
Good one guys, glad to see this script is really getting going again
Well said, i agree!!! Good work guys! :D

User avatar
al_main
Posts: 1379
Joined: Wed, 6. Oct 04, 10:26
x3

Post by al_main » Tue, 6. Jun 06, 11:23

Small suggestion:

Would neaten up the script abit to change the toggle raiding partys question to be an AL plugin option also instead of a command run from the combat menu.

Also what are your future plans for the script?

Any chance you were thinking of expanding it to add an option of other races attacking and claiming sectors against each other? As that would be a great feature! :)

Also you got any plans to extend the tax system in the opposite directio aswell? Ie that you woud have to pay per day to keep your stations protected in major race space? As in my opinion this would help balance out alot while making the game more challenging!

AL

User avatar
nirwin
Posts: 2879
Joined: Tue, 1. Nov 05, 23:07
x3tc

Post by nirwin » Tue, 6. Jun 06, 13:22

russbo wrote:Nice job guys. (Did you get your dates confused....?)

The sector tax option looks great, as does keeping the stations. Wish I hadn't destroyed all of that, way back when... :) But, two things:

By "a day", is that 24 hours of actual game play time, or ?
And, I was wondering if you looked into the respawning of the conquered race's trading ports/shipyards. Does it happen randomly, or does there need to be an enemy shipyard nearby? I thought I had that figured out, but, I'm starting to wonder again....
Russbo, I'll be honest you have played with this script MUCH more than I have, so I am currently trusting your judgement, so please don't go doubting yourself. :D
DesertEagle or I will however definately look at it as soon as we get chance, cause it's also kinda spoiling it for me, I keep getting a Pirate base respawning in Loomanckenstrats.
And yes I got my dates confused :oops: As my programming teacher used to tell me, "the worst coder here is copy-and-paste", and I fell victim to it again.

A day is indeed 24 hours of gameplay time, but the count is rmembered so it will carry on from where you left off when you load a game, so it should work perfectly, I did wonder if the interval was a bit too large.

@al_main
We certainly have some ideas kicking about, and we have thought about making other races fight for sectors.
I'm not too sure about charging player for factory rent, but I guess it would be fairer, I just tell myself that my factories pay a tax themselves and it doesn't affect me, the problem is, the more sectors you conquer, the more of your own infrastructure you need so it could end up being negative equity for the player (unless you put your stations in your sectors). I'll give it more thought, feel free to try and convince me.

I think me and DesertEagle need to discuss our plans and come up with a firm set of priorities and then we will let everyone know our plans, there is certainly a lot to do.

@everyone else
Thanks for all the positive feedback, I'm really pleased this script has got moving again too, as this is one of the things I want most from X3.
Nirwin
------
Sector Takeover | Unlimited Resources (x2/x3)

User avatar
al_main
Posts: 1379
Joined: Wed, 6. Oct 04, 10:26
x3

Post by al_main » Tue, 6. Jun 06, 13:39

If the tax worked the opposite way aswell then it would give you an incentive to go get your own sectors, whereas at the moment its something of a novelty.

Anyway, just tie it to another AL plugin and then everyone is happy and can pick and choose themselves!

User avatar
nirwin
Posts: 2879
Joined: Tue, 1. Nov 05, 23:07
x3tc

Post by nirwin » Tue, 6. Jun 06, 14:00

al_main wrote:If the tax worked the opposite way aswell then it would give you an incentive to go get your own sectors, whereas at the moment its something of a novelty.

Anyway, just tie it to another AL plugin and then everyone is happy and can pick and choose themselves!
I do like your reasoning, and I think it would add a lot more depth to the script, however the question arises of what happens when you can't pay? Does your station get destroyed? Seized by the sector owner? Or do you get given a mission to work off the balance and if you succeed your station is left alone, if not you lose it? The last option I really don't want to have to implement just yet as it will be quite a bit of work that is a bit off the point.
Also should the money come from the station or the player? and if it can't get it from one should it attempt to take it from the other?
These are questions I will have to ponder, but feel free to give me your thoughts on these questions, it could certainly help.

I think I will put the functionality (should we decide to implement it-which I now think we will) in with the existing tax script and then you can either decide to have taxing or not.
Nirwin
------
Sector Takeover | Unlimited Resources (x2/x3)

User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot » Tue, 6. Jun 06, 14:13

nirwin wrote:........... Or do you get given a mission to work off the balance and if you succeed your station is left alone, if not you lose it? .......

this *could* be rather simple to include ..

lets say the player cant pay rent for a Cah. Bak. in Argon space ..
now a mission is offered to get the rent back to 0 ..
this mission could simply be that you have to kill a 'procesed food fab' of an enemy of the Argon .. (would the player have a weapon fab than the target becomes a weapon fab)
this way you can earn the rent and the Argon 'weaken' the enemy at the same time and also increase your ability to sell ..
(it would also imo keep it somewhat 'realistic' ..)


G

User avatar
al_main
Posts: 1379
Joined: Wed, 6. Oct 04, 10:26
x3

Post by al_main » Tue, 6. Jun 06, 14:30

If you wanted to keep it simply money, i'd say take it from players account, then try station account.

If it cant take it i'd:

- Put a 15 min wait in the script and then try again.
- If still no then send an incomming:
"You owe the Argon Federation" X credits in back rent. Due to your late payment this has now been increased to Y credits"
(And increase the amount outstanding by 10% or something)

Other thoughts:

You might want to move from daily to hourly to avoid trying to take a very large chunk of money and more take the funds gradually so easier to avoid missing payments.

200,000 is a VERY large for what a small station earns in a day. Smallest earn 7000 per hour profit = 168,000 per day. Might want to reduce this figure to 75,000 per day or so?

If you feel like the extra work could do 50,000 in border sectors and 100,000 in core sectors? Depends how much work you ant to put into it! :D

andysonofbob
Posts: 263
Joined: Sun, 23. Jan 05, 17:58
x3

Post by andysonofbob » Tue, 6. Jun 06, 14:57

Top banana.

Its galls me rotten that you cannot claim a sector in the vanilla X3 and you guys have Jim'll Fixed It for me.

Its a small addition to the game but a very welcome one

Thanks

User avatar
nirwin
Posts: 2879
Joined: Tue, 1. Nov 05, 23:07
x3tc

Post by nirwin » Tue, 6. Jun 06, 15:29

al_main wrote:If you wanted to keep it simply money, i'd say take it from players account, then try station account.

If it cant take it i'd:

- Put a 15 min wait in the script and then try again.
- If still no then send an incomming:
"You owe the Argon Federation" X credits in back rent. Due to your late payment this has now been increased to Y credits"
(And increase the amount outstanding by 10% or something)

Other thoughts:

You might want to move from daily to hourly to avoid trying to take a very large chunk of money and more take the funds gradually so easier to avoid missing payments.

200,000 is a VERY large for what a small station earns in a day. Smallest earn 7000 per hour profit = 168,000 per day. Might want to reduce this figure to 75,000 per day or so?

If you feel like the extra work could do 50,000 in border sectors and 100,000 in core sectors? Depends how much work you ant to put into it! :D
Some great input there, thanks very much, I never took the time to sit down and monitor a stations profits, the values I used were merely a guess.
I think I will put the rent down to 75,000 a day but also divide it up so you make a 12th of that payment every 2 hours or something like that.

Sadly the border and core concepts aren't dynamic, so this script kind of wrecks that philosophy, so for that reason alone, I am going to ignore the border/core values.

@RS
Hello there, thanks for the information, I think if I did end up taking your suggestion I'd have to study some of your scripts first.
One thing I want to avoid is forcing players into race rank loss, so I think what might work well is to make it a choice, you do that mission or the race claims your station. 'Cause personally I'd rather lose the station than the race rank.
Nirwin
------
Sector Takeover | Unlimited Resources (x2/x3)

Brodie
Posts: 760
Joined: Tue, 10. Feb 04, 00:10
x4

Post by Brodie » Tue, 6. Jun 06, 20:51

Will you release a version which can be installed by Cycrows Script Installer, like the original version??

User avatar
nirwin
Posts: 2879
Joined: Tue, 1. Nov 05, 23:07
x3tc

Post by nirwin » Wed, 7. Jun 06, 09:49

Brodie wrote:Will you release a version which can be installed by Cycrows Script Installer, like the original version??
I didn't know it was released in CSI format.
Umm I'm not sure how to do that, but Cycrow will undoubtedly have made it quite easy to do so I'll look into it and try to get a version up tonight.
Nirwin
------
Sector Takeover | Unlimited Resources (x2/x3)

Brodie
Posts: 760
Joined: Tue, 10. Feb 04, 00:10
x4

Post by Brodie » Thu, 8. Jun 06, 01:05

Thanks dude. Cycrows cool if you want to ask him how to convert it

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Thu, 8. Jun 06, 02:31

theres 2 main methods to createing the script packages.

the first is to just load up the script creator, fill in the required fields, then add all the required files and save. Remember, you dont need to fill out all the fields, you can get away with just script name, author and version and any script and t files require.

the other is to write a packager script, infomation on this is in the help file. Its basically a simple text file of commands to set all the required data and files. The files can be wildcards, so something like plugin.takeover.* could add all the files. Then just run the script in the script packager to create. Then when you update the script, its as simple as editing the version and running the script again

if your not sure about creating the packager script, you can just use the Gui and create the package, then use the generate packager script option to create one automatically. Then you can edit it if you need to

User avatar
nirwin
Posts: 2879
Joined: Tue, 1. Nov 05, 23:07
x3tc

Post by nirwin » Thu, 8. Jun 06, 11:19

Cheers Cycrow, I had actually read your thread about the CSI and it was pretty self explanatory, but I couldn't package up the script last night (band practice).

However this script is now available for the Cycrow Script installer, so head over to page one and get downloading, if there are any problems with it let me know.
Nirwin
------
Sector Takeover | Unlimited Resources (x2/x3)

russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo » Thu, 8. Jun 06, 16:24

Well, if you attack a race's trading port, and their stations, trust me, you'll lose race rank, LOL.

One question, before I start destroying my universe again. Do we now not have to destroy all stations in the sector, or, just all "enemy" stations, or, ? Reason why I ask, is that I'm not really sure how to figure out which station is an enemy one, and which one belongs to some other race. Before I start harassing the Split again, I want to make sure I know what I'm doing. I looked at the race rankings in each station in Split territory, and found them all to be "Split", which means, I have to destroy them all (as per current instructions), which, ruins the economic incentive. Nirwin, could you please elaborate on this before I rub the russbo paw over Rhy's Desire? I'm aiming a little "smaller" this time....

Thanks! Nice job with the Cycrow script installer and raiding options. Works great.

Post Reply

Return to “X³: Reunion - Scripts and Modding”