[script] [19.08.08] [X3 2.5] STO 1.72 overtake sectors

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

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

User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

[script] [19.08.08] [X3 2.5] STO 1.72 overtake sectors

Post by Trickmov »

Attention:
From now on, every support and the development of this script is stopped. This means, if problems occur, you will have to find a solution yourself.

STO v 1.72
written by Trickmov

STO is a script to overtake sectors

To the german topic:

http://forum.egosoft.com/viewtopic.php?t=196976

Download:

New Link (xdownloads.co.uk)
[ external image ]

Outdated Links
Mirror1
Mirror2 -> still older version


The installation:

The X³ Script Editor has to be activated for this script. For this you have to change the playername to "Thereshallbewings". The existing structure in the zip-file has to be copied to the x3-drawer.
By activating the X³ script editors you will get a so called "modified" to your profile. In normal ways this can´t be changed.


What makes this script unique:
- here you can choose the factory-type and the amount of stations that are placed in your sectors
- you can buy tunings at your dock (activate it in AL-menu)
- your cash on your dock can have an interest rate (turn this on or off in AL-menu)
- your dock consumes (sells) wares that are in it (activate it in AL-menu)
- your dock scans the sector for new stations (activate it in AL-menu)
- fully XTM-compatible (use of terran TradeDocks possible, special XTM-stations make no problems)
- sector-analysis (also usable from HQ), with this you can calculate the production in a sector and so, which factory could be useful in this sector
- when overtaking Khaak-sectors, the respawning Khaak-ships are destroyed
- Solar powerplants have correctly working secondary resource crystals
- the trade dock in the sector Avarice makes no problems (detected correctly)

The main script:

The script overtakes a sector when the owner is an enemy to the player (change this in global commands and send to whole property), when there are no more stations of the former owner in the sector and when there is a trade dock of the player.

X3 rebuilds stations in your sectors itself. STO prevents this by destroying these stations. So only STO is able to build stations of other races in your sectors.

Are all your trade docks in a sector destroyed, the sector will go immidiatly back to the original owner.


The AL-plugins:

- allow population:

If activated STO places new stations to your sectors.
Which type these have or of which race they are can be changed in the options. There you can select the max. number of stations in sector, too (max. 17). If you choose a max. number which is lower than the number of really existing stations, then there a no stations placed in this sector.
Stations are only placed, when the player isn´t in the sector, because this is performance-critical


- collect taxes:

If activated, once an hour taxes are calculated and collected. The tax rate is 3400 credits. You have to pay for every station in the folk-sectors, for every folk-station in your sector you will get taxes, this counts for complex-stations as well. STO gives a report about this to you. This can be switched on or off in the AL-Plugins.

Shouldn´t you be able to pay the taxes, you will get in every case the message and an added note about unsufficient cash flow. After that STO will wait for 5 minutes and try then again.

Is there still unsufficient cash on your account, STO will search on the station accounts. Cash from stations is taken, until there is enough cash. So after this procedure there may be some stations without cash.
Should there still be insufficient cash totally, STO will as long distrain stations until the debt has been payed.

The value of the station you will get from selling is 50% of the average price for this station. The additional sum will be added to the players account. Complexes count as one station for this procedure.

- allow raids:

If activated, the former owners will try to get their sectors back. How many ships and how often, depends on your fight rank.

- allow consume:

If activated, the sector population will consume wares that are at the trade dock. You will get the money for these wares to the account of the tradedock.
Consumed are up to 5% of the max. amount that can be at the tradedock.
The price of the ware has to be lesser or even to the average price to be consumed.
You can turn this off either here or for every station solo in the options.

- allow banking:

If activated, the sum on the account of the tradedock will have an interest rate of 1%.
You can turn this off either here or for every station solo in the options.

- sectorscan:

If activated it´s regularly tested, whether there are new stations not known by the player in the sector with tradedocks. If yes these are known from then on.
This command works with all tradedocks, not only in the own sectors.

- allow tunings:

If activated, you are able to !buy! tunings from your Trade-Dock, overtuning are impossible, overtuned ships are no problem. Known Problems:
- When transfering a tuning it´s not always possible to transfer the max. possible amount, a few transfer may be necessary.
- You can´t see the prices of the tunings
- It´s impossible to turn off the sound of transfering, so you only get an error-beep or an acknowlegded-beep

Refer to POED v1.11 at Egosoft.com for further details.
http://forum.egosoft.com/viewtopic.php?t=197159

The options:

You will find this command in the commandslot of every trade dock in a sector belonging to the player. Three inputs are needed, config1-3 or {X} {Y} {Z}

- input:

{0} {0} {2}
The options for this sector are now standard for every new one.

{0} {0} {3}
tax-report

{0} {0} {999}
Deinstallation, all parts of STO are terminated, the sectors will go to the former owners. After that you can save, delete all STO-parts from the scripts-drawer, and can go on playing.

{6} {Y} {Z}
Sektoranalysis:
Y=0 all factories, Y=1 all player-factories, Y=2 all NPC-factories
Z=0 all owned sectors, Z=1 this sector, Z=2 north-sector, Z=3 south-sector, Z=4 east-sector, Z=5 west-sector, Z=6 this and all neighbouring sectors

This is an real production- and usage-calculation, this means production and usage are calculated against the other.
Only known factories are noticed.
Sectors are only displayed, when they are known and the stargate to them is known


For following inputs counts: {Z}=0 for all sectors {Z}=1 only in this sector

{0} {0} {Z} report

{1} {Y} {Z} Y=0 all races, Y=1 Argons, Y=2 Borons, Y=3 Paranids, Y=4 Split, Y=5 Teladi, Y=6 Terran, Y=7 Goner, Y=8 Yaki, Y=9 Pirates.
Combinations are possible, too. (13= Argon and Paranid, 279= Boron, Goner and Pirates)

{2} {Y} {Z}
Y=0 all Factorytypes,
Y=1 Laserfactories,
Y=2 Shieldfactories,
Y=3 Rocketfactories,
Y=4 Solarplants,
Y=5 Biofactories,
Y=6 Foodfactories,
Y=7 Mines,
Y=8 Techfactories,
Y=9 Type 1-3,
Y=10 Type 5+6
There are only stations placed, which are really owned by this race.
The script plugin.STO.example give you an overview which wares are this really.

{3} {Y} {Z} Y=max. factories allowed to be placed

{4} {Y} {Z} Y=0 no banking, Y=1 banking allowed

{5} {Y} {Z} Y=0 no consume, Y=1 consume allowed



For users of SectorTakeover2.43:

My script isn´t based on SectorTakeover (completly new scripted) but in a few parts it works similar.
Using STO when using SectorTakeover formerly, should be no problem, just deinstall SectorTakeover like descripted, install STO, ready.

The main thing that disturbed me with SectorTakeover: I wasn´t able to select which stations were placed in my sectors and how many. To expand SectorTakeover would have meant to ask the three author if I may do this, and the scriptcode of SectorTakeover wasn´t really able to allow the changes I had in sense. So I decided to start a new script.


Possible command slot conflict:

STO uses command slot command_type_station_17, this may cause a conflict with other scripts using this slot (Mercenaries Guild by Cycrow).
For changing the command-slot of STO, you have to do the following:

Open with an Editor the file "447432.xml" in the t-drawer of your X3-Installation.
Search and replace all entries "1117" with "11X", where X is the number of a free station_command-slot.
Have a look at this list, to find a free slot.
http://forum.egosoft.com/viewtopic.php?t=96340

Then save the file and everything should work without problems.



Needed resources:

Station_command17

Textid: 7432


Versionhistory:

Version 1.00 (23.12.07)
first release.


Version 1.01 (28.12.07)
Problems with the taxes eliminated
Solarplants now have crystals as primary resource and work properly
Report made more beautyful
Message, when STO is terminated.


Version 1.50 (19.01.08 )
Error with taxes fixed (when stations were sold, to much money was taken from player account)
When new stations were placed, their direction was always the same (fixed)
Version control implemented
New:
sector analysis
tax report
tunings to buy

If you used an earlier version of STO before, i recommend the complete de-installation (by {0}{0}{999}) of the earlier version before installing this version. Because i forgot the version control in the earlier versions it may be better to procede like this. Everthing should work properly without doing so, but in eventual further versions you may have the same problem again.

Version 1.51 (24.01.08 )
New:
The sector-analysis is now available from the HQ and for all sectors. config1 is changed to sector, config2 and 3 are the same.
I didn´t want to loose one more command-slot, so the command is also called STO options.
It´s not necessary for the HQ to be placed in an own sector for this to work.

Version 1.52 (08.03.08 )
changes:

- error with consume/tunings fixed: when both was activated, tunings were sold
- XTM-compatibility improved: Now terran tradedocks are akzepted
- Avarice problem no longer exists, trade dock from auction detected correctly


Version 1.53 (08.03.08 )
changes:

- sector-scan now properly works with terran tradedocks


Version 1.60 (11.03.08 )

New:

- Obertaking of Khaak-Sector was possible until now, but handicapped by the respawning ships in these sectors. Now these Khaak-Ships are destroyed as soon as they respawn.

Simply the same, like in all other races sectors.

But, what´s working, is the AL-Plugin for the raids. These ships are not destroyed.

Another change is, that the Khaak- and Xenon-Ships now jump into the raided sector, but the other races don´t use the jump-drive.

Archive includes Script-Installer-file, too.

Version 1.61 (12.03.08 )
changes:
- small mistake in the raid fixed: Khaak-ships made no raids

Archive includes Script-Installer-File, too


Version 1.62 (14.03.08 )
changes:
- setup improved -> command slot conflict now easier to change

You don´t need this update, when you don´t have any command-slot-conflicts.

Archive includes Script-Installer-File, too


Version 1.63 (05.04.08 )
changes:

- Now all respawning stations and their orbital lasers are destroyed, at the setup of this version all stations and orbital lasers in the own sectors are marked once, so that they are not destroyed
- additional error- and acknowledged-beep for the options added

Archive includes Script-Installer-File, too


Version 1.65 (22.04.08 )
changes:

- error in previous version fixed, spawning solar plants were destroyed immidiatly
- Solar powerplants now have crystals as secondary resource. Existing solarplants with primary resource crystals are not automatically repaired, because some player may have planned their sectors with primary resource and I don´t want to destroy their production lines. If you want to change the existing solarplants from primary to secundary resource, you have to start the script plugin.STO.repair.solar.plants.
- error in banking fixed
- a few parts made as library scripts
- population-routine overworked

Version 1.68 (03.05.08 )
changes:

- names of a few stations in XTM fixed
- new races added (Terran, Goner, Yaki and Pirates)
- Combinations of races now possible
- second terran tradedock now accepted as STO tradedock, too
- problem with ARES fixed (without guarantee!)

Version 1.70 (05.05.08 )
changes:

- minor changes in respawn-suppression and in sectorscan
- tax-messages can be switched on or off in the AL-Plugins
- taxes changed:
  • before distraining, STO will search for cash on the stations accounts
  • now 50% of the average value of the station are calculated, not only the tax-rate
  • complexes will be distrained as whole, but for the taxes, still every complex-station counts
  • a surplus of cash from a distraining will be added to your account
Version 1.71 (16.08.08 )
changes:

- small bug in raids fixed (sectors with original owner player were raided)

Version 1.72 (19.08.08 )
changes:

- small bug in raids fixed (wrong sectors could still be raided)
Last edited by Trickmov on Thu, 11. Mar 10, 11:35, edited 53 times in total.
User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov »

If you have problems or something doesn´t work properly, please post in the german topic. Until now (06.01.08 ) there are no mayor problems known.

EDIT (05/05/08 ): Forget this, i´m here often enough :wink:
Last edited by Trickmov on Mon, 5. May 08, 17:08, edited 2 times in total.
Guardian004
Posts: 107
Joined: Fri, 2. Nov 07, 02:03

Post by Guardian004 »

downloading :lol:

it works fine on my end.

No conflicts with XTM :D
User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov »

fine, but there are still some problems with updating (no version control until now). :(

I´am going to fix it tomorrow.

On the other hand it´s not necessary to upload now a new version, because the script is working stable. :)
If i am going to release a new version in future it will include the version control.
Until then you can use this version without problems.
User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov »

Update: Version 1.50 (19.01.08 )

New:
sector analysis
tax report
tunings to buy

If you used an earlier version of STO before, i recommend the complete de-installation (by {0}{0}{999}) of the earlier version before installing this version.
Because i forgot the version control in the earlier versions it may be better to procede like this. Everthing should work properly without doing so, but in eventual further versions you may have the same problem again.
User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov »

About the sectoranalysis:

From factories the production-amount is known (M=2x, L=5x, XL=10x). This analysys calculates how many production-amounts of a ware are in a sector, also with the consumption.

The script also detects, if produced wares are consumed in the sector and calculates with it.

Solar-Plants have a much higher production as 2-10x, the exact amount is calculated.

Mines have also another production- and consumption-amount, this is also calculated.

An example:

The player has placed an Solar Power Plant M in Argon Prime.
The sector-analysis would report, that there is a production of 4x energy cells.
This means, the consumption of energy cells in sector is fully satisfied and you can supply 4 factories (type S=1x) more with energy cells.
User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov »

Update:Version 1.51 (24.01.08 )
New:
The sector-analysis is now available from the HQ and for all sectors. config1 is changed to sector, config2 and 3 are the same.
I didn´t want to loose one more command-slot, so the command is also called STO options.
It´s not necessary for the HQ to be placed in an own sector for this to work.
Last edited by Trickmov on Tue, 11. Mar 08, 13:19, edited 1 time in total.
User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov »

Update!:

Version 1.52 (08.03.08 )
changes:

- error with consume/tunings fixed: when both was activated, tunings were sold
- XTM-compatibility improved: Now terran tradedocks are akzepted
User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov »

Update:

http://www.merchant-haven.de/downloads. ... l&df_id=27

Version 1.53 (08.03.08 )
changes:

- sector-scan now properly works with terran tradedocks
- Avarice problem no longer exists, trade dock from auction detected correctly



EDIT: Archive now includes script-installer-file
Last edited by Trickmov on Tue, 25. Mar 08, 20:42, edited 3 times in total.
User avatar
Elffin
Posts: 371
Joined: Wed, 18. May 05, 22:34
x3tc

Post by Elffin »

Seems to be a good script - will give it a go!
russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo »

So, if one has been using the original Nirwin Sector Takeover (as I have for since its inception), and one starts using this one, do you keep the sectors that you have already captured?

Can someone elaborate on how the two scripts differ?

This one looks good, but, how different is it from Nirwins?
User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov »

russbo wrote:So, if one has been using the original Nirwin Sector Takeover (as I have for since its inception), and one starts using this one, do you keep the sectors that you have already captured?

Can someone elaborate on how the two scripts differ?

This one looks good, but, how different is it from Nirwins?
For using this, when having used SectorTakeOver2.43 before, you have to de-install SectorTakeOver, then install this and ready. This means, when installing STO, your "old" tradedocks from SectorTakeOver are detected and used in STO.


The differences between the two scripts are many:

- here you can choose the factory-type and the amount of stations that are placed in your sectors
- you can buy tunings at your dock (activate it in AL-menu)
- your cash on your dock can have an interest rate (turn this on or off in AL-menu)
- your dock consumes (sells) wares that are in it (activate it in AL-menu)
- your dock scans the sector for new stations (activate it in AL-menu)
- XTM-compatible
- one very important thing is the sector-analysis (even usable from HQ), with this you can calculate, which factory could be useful in a sector

The other things are nearly the same.
User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov »

Hope that there are no problems with the script :wink:

When you see any mistakes in my english translation, then please report to me via PN.




Thanks
Trickmov
User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov »

Update:

http://www.merchant-haven.de/downloads. ... l&df_id=27

Version 1.60 (11.03.08 )

New:

- Overtaking of Khaak-Sector was possible until now, but handicapped by the respawning ships in these sectors. Now these Khaak-Ships are destroyed as soon as they respawn.

Simply the same, like in all other races sectors.

But, what´s working, is the AL-Plugin for the raids. These ships are not destroyed.

Another change is, that the Khaak- and Xenon-Ships now jump into the raided sector, but the other races don´t use the jump-drive.

Archive includes Script-Installer-file, too.
Last edited by Trickmov on Mon, 5. May 08, 17:09, edited 1 time in total.
User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov »

Update (i hope the last in near future):


http://www.merchant-haven.de/downloads. ... l&df_id=27

Version 1.61 (12.03.08 )

changes:
- small error in raids fixed: Khaak-Ships made no raids


Archive includes also Script-Installer-File
User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov »

Update:

http://www.merchant-haven.de/downloads. ... l&df_id=27

Version 1.62 (14.03.08 )
changes:
- setup improved -> command slot conflict now easier to change

You don´t need this update, when you don´t have any command-slot-conflicts, there are no changes in the script itself.

Archive includes Script-Installer-File, too
LordArconius
Posts: 97
Joined: Wed, 2. Jun 04, 00:56
x3

Post by LordArconius »

Hello Trickmov

I have a question. Where do the taxes the player has to pay come from? The players account or from the stations account?
User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov »

From the players account, if you don´t have enough money, your stations are distrained.
But before this happens, you will get a message, when not having enough money and a grace period of five minutes.


Trickmov
LordArconius
Posts: 97
Joined: Wed, 2. Jun 04, 00:56
x3

Post by LordArconius »

Thx Trickmov will give a try.
Maxim Ownage
Posts: 4
Joined: Fri, 15. Feb 08, 04:12

Post by Maxim Ownage »

I've been enjoying using your script, but I have two questions.

I've taken over the 9 southern most Paranid sectors, and I have my options configured right, but their stations continue to respawn. I have sufficient ships to deal with this, so the only problem has been inconvience. You mentioned that 17 is the max number of stations that can be built in a sector. If I have 17 player owned stations in a sector, should the Paranid respawning stop?

Second, with the command "allow consume", does that effect Equipment Docks as well as Trading Stations?

I'm currently using STO v1.62

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