[SCRIPT] [2012.01.21] Automated Satellite Network v2.00

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

alex2069
Posts: 205
Joined: Thu, 22. Dec 05, 21:19
x3tc

[SCRIPT] [2012.01.21] Automated Satellite Network v2.00

Post by alex2069 » Mon, 23. Nov 09, 05:35

Automated Satellite Network v2.00
by alex2069 and Amriel

:arrow: Credits/Thanks
I'm a very busy Uni student at the moment (entering my final years), and as such my X-gaming has decreased substantially. :(
So special thanks to Amriel who used the v1.33 script and fixed some bugs/todos that were present (v2.00).


:arrow: Install
  • SPK (recommended)
    <not available at this time> (.spk)
    To install, use Cycrow's Plugin Manager.
  • ZIP

    [ external image ] xdownloads.co.uk (.zip)
    To install, extract to your X3TC directory - or more specifically: open the zip file; files in the scripts folder go in scripts folder, t in the t folder.
    If it asks to overwrite any files, do so (will just be an older/same versions or my library files from some of my other scripts).
:arrow: Description
  • A more advanced automated satellite network system. It will give you a deployment of 1xSatellite or 8xSatellites in a box formation to maximise your view.
    Features include (among others):
    • Automatic satellite buying.
    • Ships will "know" where they are, so they wont "race" for satellites and sectors.
    • Intelligent Jumpdrive usage (if Auto-Jump is on).
    • Intelligent energy purchasing.
    • Finds new sectors using the Explorer Command Software.
    The Configuration Menu:
    [ external image ]

    The Deployment:
    [ external image ]
:arrow: Usage
  • Menu control is located in the ships command console under Special Commands > Automated Satellite Network. It requires that you have Special Command Software MK1 installed on said ship.
    I'd recommend using Argon Discoverers - they're fast, and cheap to replace.
    To deploy an Advanced Satellite, it will cost you 1000 credits.
    For a Navigation Relay Satellite; 500 credits.
  • Deployment Configuration
    • Ware Type: Advanced Satellite or Navigation Relay Satellite
      Note: You should be consistent within a game, as currently they will NOT detect different satellite deployments.
      i.e. You could end up with 8xAdvanced Satellites and 8xNavigation Relay Satellites in the same sector.
      If you're going to change this around, do with with a Home Sector and Jump Radius or something.
    • Home Sector: This works in conjunction with the Jump Radius below.
      If set to null, the setting is ignored (as is Jump Radius) and it becomes a universal deployment.
    • >> Clear Home Sector: Does what it says; clears the Home Sector (above).
    • Jump Radius: When a Home Sector is set, the ship will only deploy and monitor satellites within X jumps.
      e.g. Jump Radius = 0, Home Sector = Kingdom End, then it will only deploy and check within Kingdom End.
      If Jump Radius = 1, then it will check Kingdom End, Rolk's Drift, and Three Worlds. etc
    • Tethered Return: ON or OFF
      If true, then the ship will return to its original sector and complete it first before continuing to another sector.
    • Explore: ON or OFF
      If true, then the ship will go into unknown sectors to buy and deploy.
      As of v2.00, this feature uses the Explorer Command Software.
    • Low Credit Threshold: Set a credit amount that you consider to be "running low".
      If your credits drop below this limit, the system will only deploy a single satellite per sector until either:
      A) All sectors it's covering have at least 1, then it'll continue like normal.
      or B) Your credits go over this limit, and once again, it'll continue like normal.
      This setting does nothing if Gate Illumination is FALSE and Arrangement is 1.
    • Minimum Credit Limit: Set when you consider yourself too poor to continue.
      Once your credits drop below this limit, the system will go into standby mode until you go over again.
    • Use Ship's Friend-Foe Settings: ON or OFF
      This forces your ship to ignore all stations and sectors to any race set to Foe in the ship's settings.
      It will attempt to find an alternate route if the quickest path is through Foe-related sectors.
    • Prioritise Single Deployment: ON or OFF
      If enabled, no matter your Low Credit Threshold setting the ship will aim to populate every sector with at least a single satellite before finishing arrangements.
  • Deployment Arrangement
    • Arrangement: Can be either 1 or 8.
      If set to 1, a single satellite will be deployed at 1/2 its range above (0, 0)
      If set to 8, then 8x satellites will be deployed in a box-type arrangement at range/sqrt(3) points in the sector. This gives full coverage - zero blank spots.
    • Gate Illumination: TRUE or FALSE
      If enabled, any gates that are beyond the range of the standard box-type arrangement will be highlighted with a satellite above and below it (y +/- range/2) (as in above deployment pic).
    • Extra Configurations Coming Soon
  • Race Deployment
    • Simply turn on or off wether or not you want it to deploy within sector owned races.
:arrow: General Questions
  1. What happens when a ship places all the satellites in his territory?
    The ship will proceed to the nearest sector that needs attending to and continue deploying from there.
    This does of course depend on your settings - the Jump Radius and Home Sector. If all within his area are covered, he will go into stand by and periodically (10min) check for missing/lost satellites.
  2. What will a ship do that has no satellites?
    It will head for the nearest station to acquire them.
    If using the Jump Radius and Home Sector options, it WILL leave its area, buy, and if Tethered Return, it will go back to the sector it was last deploying within, or start at the nearest that needs it tending to (within its area of course).
  3. Will ships use their Jumpdrive?
    If a ship has a Jumpdrive installed, and has the Auto-Jump option enabled (check before asking for help with this!), then the ship will use it.
  4. Will they automagically buy energy?
    If it has no energy, it will buy some (up to 20% of its cargo hold) on the way to its destination(s). It has been programmed to be extremely smart with its jumping and energy handling, and will even "back track" to get energy if it's worth it in the long run.
  5. What happens for ships with small cargo holds?
    If the destination is so far that multiple jumps are required, it will sector hop to it, buying extra amounts of energy to decrease the total number of jumps required, eventually arriving at its destination with a standard 20% cargo of energy.
  6. What happens if the ship is attacked?
    Tries to find a station to shelter in when it is attacked or otherwise has problems or things to consider, instead of just sitting in space.
:arrow: Disclaimer
  • Yes, I know, there are other deployment scripts out there. But they're usually quite limited or not maintained or something. And I'm a bit of a perfectionist, and I like having my satellites in a perfect 8 point arrangement, lol.
    This script started as a conversion from the X3:R script by Bhruic (http://forum.egosoft.com/viewtopic.php?t=118299), but much of it has been rewritten and it is now a lot faster and less computationally intensive.
:arrow: Uninstall
  • Uninstall via. the script package.
:arrow: Technical
  • -Uses Text File and Text Page 2073.
    -Uses Special Command Slot 552.
:arrow: Version History
  • v2.00 - 2012.01.21 (by Amriel)
    • Albion Prelude Tested.
      Now uses Explorer Command Software so it can find new sectors on its own without cheating.
      Now shows currently active tasks. A task of "Automated Satellite Network" means it's thinking about its next move.
      No longer stalls while scanning the entire universe after deploying a satellite. Instead, it looks at the closest sectors first, then expands its scan range if it can't find a sector to deploy in.
      Tries to find a station to shelter in when it is attacked or otherwise has problems or things to consider, instead of just sitting in space.
      No longer jumps directly to undiscovered sectors when in explore mode, and flies through gates the long way instead. This should allow all sectors it discovers to be connected on the map.
      Now bypasses its safe path check if it is capable of jumping, to speed up the decision-making process.
      "Illuminate Gates" now works with single centre deployment, and will deposit one satellite over each gate.
      Route finding algorithm has been cleaned up a bit.
  • v1.33 - 2009.12.01
    • Fixed a stupid bug that would overwrite the pageId number that occurred only on first installs.
  • v1.32 - 2009.12.01
    • Fixed critical bug where a ship would inifintly try to jump.
      Fixed a bug causing the ship to head for the most distant sector after all sectors were completed with single deploy enabled.
      Added minor distance calculations for arriving in-sector station jumping.
      Added a check for comparing stations when buying energy based on free freight amount.
  • v1.31 - 2009.12.01
    • Fixed a minor library start up error.
  • v1.30 - 2009.11.30
    • Added race specific deployment options.
      Updated the menu system to use the new v2.5 stuffs (considerably easier/nicer to use).
  • v1.20 - 2009.11.29
    • Added automated Jumpdrive/energy buying usage - the ship will "sector hop" to its destination(s) if it needs to.
      Added a check for required notoriety when attempting to buy wares.
      Added a check for Earth and the Hub sector; they now have specific deployment configurations (Earth -> Only Centre, Hub -> Only two (above/below centre)).
      Fixed a bug where not-known stations could be selected when explore was off (thanks to ThisIsHarsh from my Universal Locator thread).
      Fixed a bug causing a ship with a single sector (Home Sector set and Jump Radius = 0), to deploy in entire universe.
  • v1.11 - 2009.11.25
    • Added the ability to clear the Home Sector.
      Added Low Credit Limit option.
      Added Minimum Credit option.
      Added Use Ship's Friend-Foe Settings.
      Added Gate Illumination option.
      Added Use Ship's Friend-Foe Settings option.
      Added Prioritise Single Deployment option.
      Fixed a couple of spelling errors.
      Fixed a bug where Nav Sats were being deployed at the Adv Sat positions.
      Fixed a bug where you were being charged Adv Sat rates for Nav Sat deployments.
      Fixed a bug allowing ships to go through not-known sectors even though Explore was set to FALSE.
      Fixed an issue where all ship configs were global - due to this they will be reset to the default. Further changes will be local.
  • v1.01 - 2009.11.24
    • Critical bug fix for alternate sector route finding.
  • v1.00 - 2009.11.23
    • Initial release.
Edit [1st Dec 2015]: replaced outdated x1tp with working xdownloads link. X2-Illuminatus
Last edited by alex2069 on Mon, 23. Jan 12, 09:59, edited 16 times in total.

Hartzaden
Posts: 209
Joined: Thu, 26. Mar 09, 18:26
x3tc

Post by Hartzaden » Mon, 23. Nov 09, 13:19

hay this seems nice. downloading atm

so several ships running this command with shared territory will communicate with each other? what happens when a ship places all the sats in his territory. will he idle in space or return to homebase.

also what happens if said ship runs out of sats? will it buy new ones within its territory or will it yell at you to git it more?

alex2069
Posts: 205
Joined: Thu, 22. Dec 05, 21:19
x3tc

Post by alex2069 » Mon, 23. Nov 09, 14:39

Yea, sorry, I really didn't feel like writing the details in the initial post; I was a bit lazy, lol.
I've updated it with a detailed description of the config and answers to your questions.

Also update to v1.01 - There is a script error that causes alternate path finding to fail every time (you will get messages of "I am unable to find a safe route..." in your log).
Also removed a few debug lines I'd left in.

Nosferatu666rules
Posts: 158
Joined: Fri, 6. Feb 09, 16:50

Post by Nosferatu666rules » Mon, 23. Nov 09, 19:15

seems nice, only thing im missing is what happens if you dont select a home-sector, i asume it just goes out and deploys satellites everywhere, currently testing it with 5 kestrels (i just love the 600+ m/s)

so far seems to work good, i was waiting for something like this since the normal deploy satellites command just blows,

this is gonna be the first time using sattelites for something else then missions ^^

love how they buy their own satellites too, you just give them the command and they do the work without bugging you every few minutes.

now just hope they don't empty my cash reserves (A)

StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Post by StormMagi » Mon, 23. Nov 09, 19:30

What about modifying it for deploying satellites in the sectors of selected races? Or is that a bit much? :P
MOD XR Show Skills

Flying spaceships since 1993.

Tasolth
Posts: 79
Joined: Mon, 20. Oct 08, 21:49

Post by Tasolth » Mon, 23. Nov 09, 21:47

Looks good, I've been looking for a decent script just for deploying sats.

Only potential problem I see is a lack of jump drive use for large territory coverage, and the ability to avoid xenon / pirate sectors.

alex2069
Posts: 205
Joined: Thu, 22. Dec 05, 21:19
x3tc

Post by alex2069 » Wed, 25. Nov 09, 09:57

Nosferatu666rules wrote:seems nice, only thing im missing is what happens if you dont select a home-sector, i asume it just goes out and deploys satellites everywhere
Yea, sorry, didn't mention that. Updated main post.
Nosferatu666rules wrote:now just hope they don't empty my cash reserves (A)
In case it is an issue, but mostly for earlier game times, there is now an option to stop this.
StormMagi wrote:What about modifying it for deploying satellites in the sectors of selected races? Or is that a bit much? :P
If you're desperate, you can use the new ship F-F option. However this will affect where it can buy them as well making its use for you a bit limited.
I'm trying to figure out a "neat" way of implementing it - possibly next version.
Tasolth wrote:Only potential problem I see is a lack of jump drive use for large territory coverage, and the ability to avoid xenon / pirate sectors.
Jump drive usage - intelligently - is a lot harder to implement than I'd realised. Especially when concerning ships that, even with full cargo holds of ECells may not be able to get even close to their targeted destination.
But yea, I plan to implement it sometime soon.

As for the xenon/pirate sectors issue, with the new ship F-F setting enabled, set where you don't want it to go on the ships race relation section. I haven't tested it thoroughly, but it appears to be working correctly.


Also an update to v1.11
  • Added the ability to clear the Home Sector.
    Added Low Credit Limit option.
    Added Minimum Credit option.
    Added Use Ship's Friend-Foe Settings.
    Added Gate Illumination option.
    Added Use Ship's Friend-Foe Settings option.
    Added Prioritise Single Deployment option.
    Fixed a couple of spelling errors.
    Fixed a bug where Nav Sats were being deployed at the Adv Sat positions.
    Fixed a bug where you were being charged Adv Sat rates for Nav Sat deployments.
    Fixed a bug allowing ships to go through not-known sectors even though Explore was set to FALSE.
    Fixed an issue where all ship configs where global - due to this they will be reset to the default. Further changes will be local.

Nosferatu666rules
Posts: 158
Joined: Fri, 6. Feb 09, 16:50

Post by Nosferatu666rules » Thu, 26. Nov 09, 00:07

found a bug, my hub has 4 times TOO MANY satelites :P

the ships all were deploying advanced satelites so no trouble between advanced and the other one, i shot down the satelites (cargo bay was full and i was bored) but they got replaced,

the hub is the only place i noticed this though

EDIT: there are more then 4 on each cornor now...

Tasolth
Posts: 79
Joined: Mon, 20. Oct 08, 21:49

Post by Tasolth » Thu, 26. Nov 09, 21:17

Thanks for the update. later on I intend to use a fast m6 for my sat duty.

Curious if when moving to a new sector if the script uses a move to position command, or a move to sector and then a move to position. If its move to sector the auto jump should catch it and jump.

alex2069
Posts: 205
Joined: Thu, 22. Dec 05, 21:19
x3tc

Post by alex2069 » Thu, 26. Nov 09, 23:56

Nosferatu666rules wrote:found a bug, my hub has 4 times TOO MANY satelites :P

the ships all were deploying advanced satelites so no trouble between advanced and the other one, i shot down the satelites (cargo bay was full and i was bored) but they got replaced,

the hub is the only place i noticed this though

EDIT: there are more then 4 on each cornor now...
Apparently the Terrans aren't too pleased with the deployment of satellites in Earth either, lol.
I'm about to go out, but I'm assuming this would be a similar issue for when you don't have the correct clearance levels (for The Moon, etc) as well - has anyone noticed this?

Tasolth wrote:Thanks for the update. later on I intend to use a fast m6 for my sat duty.

Curious if when moving to a new sector if the script uses a move to position command, or a move to sector and then a move to position. If its move to sector the auto jump should catch it and jump.
Currently it just uses "[THIS] -> fly to sector $arg.sector" - so no, it wont use the auto jump. This little section of the script is almost completely untouched from the original conversion; back when there was no such thing as the auto-jump setting.
However I've been looking through the default move/jump scripts, and thankfully they take care of a very large portion of the jump "if ... " crap, so next chance I get I'll fix it up.

Nosferatu666rules
Posts: 158
Joined: Fri, 6. Feb 09, 16:50

Post by Nosferatu666rules » Fri, 27. Nov 09, 00:40

is there a way to make this into a wing-command?

that'll make it easier to keep track and manage the sattelite-pooping-fleet (my kestrels keep dying, >_< maybe i should give them shields for a change)

be sweet to just add a ship to a wing and know it'll do its thing

alex2069
Posts: 205
Joined: Thu, 22. Dec 05, 21:19
x3tc

Post by alex2069 » Fri, 27. Nov 09, 01:50

When testing I start a new game, cheat myself like 20 ships and send them on their way (which btw looks really cool as they map and populate the entire universe); I've had passing thoughts about how "nice" it would be if it worked with wings, but never looked much more into it.
I've not done much with wing scripting so I'm not sure how exactly it all works, but I'm definitely going to look into it now.

Nosferatu666rules
Posts: 158
Joined: Fri, 6. Feb 09, 16:50

Post by Nosferatu666rules » Fri, 27. Nov 09, 01:53

alex2069 wrote:When testing I start a new game, cheat myself like 20 ships and send them on their way (which btw looks really cool as they map and populate the entire universe); I've had passing thoughts about how "nice" it would be if it worked with wings, but never looked much more into it.
I've not done much with wing scripting so I'm not sure how exactly it all works, but I'm definitely going to look into it now.
which is all we can ask for :)

alex2069
Posts: 205
Joined: Thu, 22. Dec 05, 21:19
x3tc

Post by alex2069 » Sun, 29. Nov 09, 07:31

Update to v1.20 - 2009.11.29

For Tasolth: Added automated Jumpdrive/energy buying usage - the ship will "sector hop" to its destination(s) if it needs to.
I've tried to make it extremely smart/human like with its jumping and energy usage. While its buy limit is 20% of cargo hold, if it sees a need, it will buy more to get to where it's going. It will even backtrack if it's worth while, and of course, only fly if its the quickest.
This will allow even a small M5 ships to get to its destination quickly even through 20% of its hold may only be 2 jumps.
There are still a few minor parts that need fixing/checks so if anyone notices anything weird or finds a problem, say so.

For Nosferatu666rules: Added a check for Earth and the Hub sector; they now have specific deployment configurations (Earth -> Only Centre, Hub -> Only two (above/below centre)).

And some other fixes:
-Added a check for required notoriety when attempting to buy wares.
-Fixed a bug where not-known stations could be selected when explore was off (thanks to ThisIsHarsh from my Universal Locator thread).
-Fixed a bug causing a ship with a single sector (Home Sector set and Jump Radius = 0), to deploy in entire universe.

Nosferatu666rules
Posts: 158
Joined: Fri, 6. Feb 09, 16:50

Post by Nosferatu666rules » Sun, 29. Nov 09, 12:36

awesome, :) thnx a bunch!

now lets see if a hammer can get rid of those extra satellites :twisted:

Tasolth
Posts: 79
Joined: Mon, 20. Oct 08, 21:49

Post by Tasolth » Sun, 29. Nov 09, 22:10

well.... that certainly was quick :D You have my thanks 8)

retardsINspace
Posts: 3
Joined: Sun, 21. Oct 07, 07:55

Post by retardsINspace » Mon, 30. Nov 09, 02:43

Error:
The library files for this script "Automated Satellite Network" are out of date and are very likely incompatible.

Current version: 120
You will need to download the latest version.



I just downloaded this. Other installed scripts:
Apricot Cbeam
Extended Mod Pack
Hotkey Manager
NPC Bailing Addon
Salvage Claim Software
The Marauder Shipyard
Universal Buys/Sells Locator
Advanced Jumpdrive

alex2069
Posts: 205
Joined: Thu, 22. Dec 05, 21:19
x3tc

Post by alex2069 » Mon, 30. Nov 09, 03:56

I bring you a new version: v1.30

For StormMagi: Added race specific deployment options.

And for the rest of us, just a hugely improved configuration menu (so much nicer). I was using my old v2.0 menu scripts, but with v2.5 there is no need with the new menu commands.

@retardsINspace
This would be because of the Universal Buys/Sells Locator (one of my scripts).
Part of the reason I went through the new menu stuff (in this script) is to learn it in preparation to (finally) update the Uni Loc menus and such - it hasn't been updated in a while and is only using my old 1.20 library.
Reinstall the Automated Satellite Network script (as in, do it last), and it'll overwrite the 1.20 stuff and should then work... The Uni Loc should still work - I haven't changed anything that should affect it for memory.
It's a bit odd though; I'd always assumed the Plugin Manager checked script version information and only overwrote for later versions (unless you used the zip files, which would explain why it overwrote with older versions).

Kosta F
Posts: 41
Joined: Sat, 27. Jan 07, 10:04
x3ap

Post by Kosta F » Mon, 30. Nov 09, 09:27

retardsINspace wrote:Error:
The library files for this script "Automated Satellite Network" are out of date and are very likely incompatible.

Current version: 120
You will need to download the latest version.



I just downloaded this. Other installed scripts:
Apricot Cbeam
Extended Mod Pack
Hotkey Manager
NPC Bailing Addon
Salvage Claim Software
The Marauder Shipyard
Universal Buys/Sells Locator
Advanced Jumpdrive
Hey, having the same issue, tried reinstalling as well as uninstalling uni best buy, but no good.

I dont see the command in special commands.

Could another script be taking it's spot? if so how do I check?

alex2069
Posts: 205
Joined: Thu, 22. Dec 05, 21:19
x3tc

Post by alex2069 » Mon, 30. Nov 09, 14:29

Try updating the Universal Locator (just released new version)... This should hopefully fix it...
It's quite late here, but tomorrow I'll install a second fresh copy of X3 to test it.
A sure fix is to delete all scripts starting with "a2069.lib" in your scripts folder, and install the scripts again. With the now updated Uni Loc using the same library version, it should be all good.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”