[Script] SatelliteDeploy v1.12 (18/01/2006)

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

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

Post Reply
Bhruic
Posts: 222
Joined: Thu, 22. Jul 04, 01:40
x3tc

[Script] SatelliteDeploy v1.12 (18/01/2006)

Post by Bhruic » Tue, 3. Jan 06, 14:50

Version: 1.12
Date: 18/01/2006
Author: Bhruic
Description: Allows automated deployment of Navigational Relay Satellites or Advanced Satellites within explored space.

Features:

Automates purchase and deployment of either navsats or advsats.
Robust sector checking ensures ships will avoid any sector controlled by an enemy race.
Continually scans for, and replaces destroyed satellites.
Deploy in either single or box formation.
Can 'tether' a ship to a particular sector.

Details:

The SatelliteDeploy script (SatDep for short) is designed to do exactly what the name suggests - deploy satellites. It can either deploy single satellites (above the 0,0 point), or in a 'box' formation (8 satellites deployed so that they all barely encompass the 0,0 point). The box formation gives much greater coverage of sectors, making it very easy to spot all ships in most sectors.

Having pilots deploying satellites for you is not free, however. They charge 1000 credits for each Advanced Satellite they deploy, and 500 credits for each Navigational Relay Satellite they deploy.

The script is designed to be very robust, and multiship friendly. For example, if you have multiple ships running the script, they will keep track of where each ship is going, ensuring they don't duplicate efforts. This occurs for both sector coverage (the actual dropping off of the satellite(s)), and station selection (buying replacement satellite(s)).

You have the option putting ships on a virtual 'tether', should you wish it. Each ship gets assigned a 'home sector'. You can select a number of jumps from that sector to limit each ship to. The ship will only deploy satellites in those sectors, although it will travel farther afield if it needs to, to purchase satellites. If the number of jumps is set to zero, then there is no effect from having a home sector set.

When travelling to deploy satellites or purchase them, the script will only consider travel through sectors that are considered 'safe'. It uses the ship's friend/foe settings, and the ownership of each sector to determine this. If, for example, you don't want your ship to travel through Pirate sectors, you may simply set Pirates to 'foe' (only for that ship), and the ship will no longer travel through that sector. Also, a sector must have been previously discovered by you before the ship will consider travelling to/through it - it won't explore sectors for you. A combination of these two facts may, however, cause your ship to get 'stranded'. If you set the Paranid to 'foe', for example, and your ship was in Argon Prime, it would be unable to find a safe route to the sectors below (and including) Bad Debt. You would be required to either manually fly the ship there, or cause it to jump, for it to continue.

Usage:

Adds 2 new menu options to the Special Command Software Mk1 menu.
Once the either option is selected, you will be prompted for the following:
"Home sector" - The origin sector for the 'tether', as described above
"Jump radius" - The number of jumps from the home sector it will deploy satellites (0 turns off the home sector feature)
"Formation" - Select '1' for single satellite per sector, or select '8' for the box formation (other numbers will terminate the script)
"Continue" - This determines how the ship will act when it is required to resupply (purchase more satellites). If this is set to '1', the ship will return to the sector it was at previously, and choose a new destination from there. If this is set to '0', the ship will not return, and will begin deploying from its new location.

---

Basically it looked like the other deploy scripts were pretty much unsupported at this point, and I wanted something a little more advanced.

http://bhruic.dyndns.org/SatelliteDeploy-v1.12.zip
http://bhruic.dyndns.org/SatelliteDeploy-v1.12.spk

Mirror:
http://www.welshmountainscience.co.uk/o ... -v1.12.zip

Bh
Last edited by Bhruic on Wed, 18. Jan 06, 23:20, edited 5 times in total.

Kroyon
Posts: 107
Joined: Thu, 11. Dec 03, 14:36
x3tc

Post by Kroyon » Tue, 3. Jan 06, 14:56

I'm not going to be your guinea pig! :P
Windows 7 64bit
Corsair Dominator 6GB RAM
GeForce GTX 295 Co-Op 1792MB
AMD Phenom II X4 Quad Core 965 3.4GHz

User avatar
CO. Dragon Corp
Posts: 490
Joined: Wed, 23. Nov 05, 14:49

Post by CO. Dragon Corp » Tue, 3. Jan 06, 15:19

Kroyon wrote:I'm not going to be your guinea pig! :P
Really? So you actually never played X2 or X3?



:p :lol:

Good skript. First thing I'll do is to try a translation into german. Then I'll test it...
Commanding Officer of the 'Dragon Corporation'
[ external image ]

User avatar
Dgn Master
Posts: 1311
Joined: Fri, 27. Feb 04, 10:36
x3tc

Post by Dgn Master » Tue, 3. Jan 06, 15:21

I will :P

I'll check it on my day off though as i don't have much time to play till then.
Could the parents of the little Argon girl, Suzie, please claim her sealed jar of remains?
She didn't mind the gap and ended up vapourized!

X-it
Posts: 1311
Joined: Wed, 6. Nov 02, 20:31
x3

Post by X-it » Tue, 3. Jan 06, 15:58

I'm successfully using the XAI corps script that does the same, but if you implement the 8 sat feature you'll be a god in my book! :)

Also, if you made it possible to make deployments in unexplored sectors, that would be great. Would be very handy when starting new games, and you don't feel like going through the exploration part over and over.

Bhruic
Posts: 222
Joined: Thu, 22. Jul 04, 01:40
x3tc

Post by Bhruic » Tue, 3. Jan 06, 16:04

It's actually very easy to make it do unexplored sectors as well - there's a global flag '$bExplore' in bhr.deploy.satellites.xml - by default it is set to 0. Change it to 1, and pathfinding, satellite deployment and station selection will all allow for unexplored sectors.

Bh

X-it
Posts: 1311
Joined: Wed, 6. Nov 02, 20:31
x3

Post by X-it » Tue, 3. Jan 06, 16:23

Thanks, will give it a try!

User avatar
CO. Dragon Corp
Posts: 490
Joined: Wed, 23. Nov 05, 14:49

Post by CO. Dragon Corp » Tue, 3. Jan 06, 16:45

@Bhruic: After I've translated the four lines (one hell of a work :lol: ) I've tested the script. Now I got a few questions:

1.) For what price is the satellit-deployer looking for? Starting one of my M4 from Argon Prime it set it's destination to "paranid communication center", which is quite far away if I remember correctly...

2.) Why does the ship doesn't show it's current order? Like an unitrader for instance, there are three slots that show his status: a) Name, b) Where it is (for instance "space" or "argon equipment dock") and where it is flying to (for instance "paranid communication centre) and finally c) what's the current order like "buying ware e-cells 342".

And these third slot is empty respectively there is a "none" (but in german "Kein") :wink: .


Is this supposed to be that way or did I do some stupid mistake while translating these 4 lines of text? Is there something I should not translate?

Here is the translation, please check it out:

<?xml version="1.0" encoding="UTF-8"?>
<language id="49">
<page id="2010" title="Commands" descr=" ">
<t id="528">Erweiterte Navigationssatelliten Installieren</t>
<t id="529">Navigationssatelliten Installieren</t>
</page>
<page id="2011" title="Commands" descr=" ">
<t id="528">ErwNavSatInst</t>
<t id="529">NavSatInst</t>
</page>
</language>
Commanding Officer of the 'Dragon Corporation'
[ external image ]

Bhruic
Posts: 222
Joined: Thu, 22. Jul 04, 01:40
x3tc

Post by Bhruic » Wed, 4. Jan 06, 01:04

1) It's designed to find the closest station. You might think that the "Paranid Communication Center" is pretty far from Argon Prime, but I think you'll find there are no closer stations with Advanced Satellites. At least in my game, they tend to be quite rare, as a lot of the stations don't seem to get supplied with the Majalit they need.

2) The ship will show it's current order if it's moving. It won't show an order if it's trying to find a new location. I wasn't able to figure out how to do that at this point. It can take a long time to figure out where to go if it needs to take a secondary route to reach its destination. As long as it hasn't put a message into the log, however, it's likely to be doing something. :)

Thanks for the translation, I'll add that to the next version.

Bh

User avatar
CO. Dragon Corp
Posts: 490
Joined: Wed, 23. Nov 05, 14:49

Post by CO. Dragon Corp » Wed, 4. Jan 06, 01:51

Bhruic wrote:1) It's designed to find the closest station. You might think that the "Paranid Communication Center" is pretty far from Argon Prime, but I think you'll find there are no closer stations with Advanced Satellites. At least in my game, they tend to be quite rare, as a lot of the stations don't seem to get supplied with the Majalit they need.

2) The ship will show it's current order if it's moving. It won't show an order if it's trying to find a new location. I wasn't able to figure out how to do that at this point. It can take a long time to figure out where to go if it needs to take a secondary route to reach its destination. As long as it hasn't put a message into the log, however, it's likely to be doing something. :)

Thanks for the translation, I'll add that to the next version.

Bh
Last time I looked there was an "Advanced Nav Sat Factory" in Argon Prime.....and that's where the ship is :D .

But maybe it got destroyed by one of these "accident happened to station xy in sector yz..." messages floating around at the BBS. Gotta take a look and report back...

Or is it not supposed to buy in factories?

/edit: Gnah...this was obvious ^^. The factory is empty. And all it would need are e-cells. Ok, so the script is working fine, my apologies. :)

But I got a little request:

Could you add an input to set the sectors that should get nav sats? It should work the same way as the multiple-sector-patrol: You add as many sectors as you want over the command-slots. Then you start the command. Now the ship searches for available nav stats. After it get some it will start to deploy them in the given sectors. Sectors can be removed from the list by adding them again over the command-slot.

That would avoid the ship from wasting money by placing satellites in sectors that are very far away from my "active" sectors.

Also, like the multiple sector patrol, there should be always a report-message about what sectors are get the sats deployed to. Just to make sure the player is able to look it up in case he forgot the sectors he set :D :wink: .

If that's possible it would be a great addition! :)
Last edited by CO. Dragon Corp on Wed, 4. Jan 06, 02:27, edited 5 times in total.
Commanding Officer of the 'Dragon Corporation'
[ external image ]

User avatar
Rakeris
Posts: 407
Joined: Wed, 31. Dec 03, 04:25
x4

Post by Rakeris » Wed, 4. Jan 06, 01:56

I'll check it out.....I'm to lazy and not bored enough to put sats in every sector I've explored. :P I've tried a few of the other sat scripts out there and they didn't work to good.....one of them put 5 sats in argon prime >.<

Bhruic
Posts: 222
Joined: Thu, 22. Jul 04, 01:40
x3tc

Post by Bhruic » Wed, 4. Jan 06, 03:26

CO. Dragon Corp wrote: Could you add an input to set the sectors that should get nav sats? It should work the same way as the multiple-sector-patrol: You add as many sectors as you want over the command-slots. Then you start the command. Now the ship searches for available nav stats. After it get some it will start to deploy them in the given sectors. Sectors can be removed from the list by adding them again over the command-slot.
Hmm, I looked into the patrol script, it seems like an annoying way to handle it. You have to manually select each sector, without immediate feedback on whether a sector is currently in the list or not.

I don't think I'd want to do it that way. What I may do is allow the setting of a 'home' sector, and a number of jumps from that sector to place satellites. It's not quite as good, because you still may get them placed in sectors you don't really need, but it would be easier to control, I think.

For example, if you set the home to Argon Prime, and set jumps to 3, it would cover all the Argon sectors, as well as Atreus Clouds.

The number of jumps will probably be a 'low priority' option, although the home sector may be more valuable. Personally I find it a bit of a waste to, say, go all the way from Argon Prime to Family Pride to grab satellites, then turn around and go back to Argon Prime to use them. But I'm approaching it from a "I want satellites everywhere" perspective, which I admit everyone else may not be as interested in.

Hmm, that's an idea, maybe as well as setting the number of jumps, you could set the race(s). So it would only drop satellites in sectors owned by, say, Argon and Boron. That way you could set the jumps higher, without worrying that it's going to dump a bunch of useless satellites in Pirate or Paranid space (as examples).

We'll see. :)

Bh

RRRoamer
Posts: 332
Joined: Sat, 21. Feb 04, 02:27
x4

Post by RRRoamer » Wed, 4. Jan 06, 05:14

That set by race would be VERY nice! There are times when I would want to exclude a race without having to set them to enemy...
--RRRoamer

X-it
Posts: 1311
Joined: Wed, 6. Nov 02, 20:31
x3

Post by X-it » Wed, 4. Jan 06, 10:07

CO. Dragon Corp wrote:Last time I looked there was an "Advanced Nav Sat Factory" in Argon Prime.....and that's where the ship is :D .
That factory is almost always empty, at least in my game.

This script is great, not just so you don't have to deploy satellites yourself, but also because you don't have to search for the satellites yourself. :)

User avatar
CO. Dragon Corp
Posts: 490
Joined: Wed, 23. Nov 05, 14:49

Post by CO. Dragon Corp » Wed, 4. Jan 06, 14:55

Bhruic wrote:
CO. Dragon Corp wrote: Could you add an input to set the sectors that should get nav sats? It should work the same way as the multiple-sector-patrol: You add as many sectors as you want over the command-slots. Then you start the command. Now the ship searches for available nav stats. After it get some it will start to deploy them in the given sectors. Sectors can be removed from the list by adding them again over the command-slot.
Hmm, I looked into the patrol script, it seems like an annoying way to handle it. You have to manually select each sector, without immediate feedback on whether a sector is currently in the list or not.

I don't think I'd want to do it that way. What I may do is allow the setting of a 'home' sector, and a number of jumps from that sector to place satellites. It's not quite as good, because you still may get them placed in sectors you don't really need, but it would be easier to control, I think.

For example, if you set the home to Argon Prime, and set jumps to 3, it would cover all the Argon sectors, as well as Atreus Clouds.

The number of jumps will probably be a 'low priority' option, although the home sector may be more valuable. Personally I find it a bit of a waste to, say, go all the way from Argon Prime to Family Pride to grab satellites, then turn around and go back to Argon Prime to use them. But I'm approaching it from a "I want satellites everywhere" perspective, which I admit everyone else may not be as interested in.

Hmm, that's an idea, maybe as well as setting the number of jumps, you could set the race(s). So it would only drop satellites in sectors owned by, say, Argon and Boron. That way you could set the jumps higher, without worrying that it's going to dump a bunch of useless satellites in Pirate or Paranid space (as examples).

We'll see. :)

Bh
That's quite a good idea!

Even though I think the way it works for the multiple sector patrol is ok. Lets assume the last message is SOMEWHERE in your huge message log and you don't want to search for it. All you have to do in order to find out which sectors are in the list is to stop the patrol ship and start the patrol again. A new log entry will appear with all the given sectors.

Quite easy if you ask me. Also, if you just give the sectors you want, everything else could be left out: Restriction to one race, or excluding of some races, home sector. Imho it would be the clearest and easiest way to do this.

But at least it's your mod and I just give ideas :wink: .
Commanding Officer of the 'Dragon Corporation'
[ external image ]

Bhruic
Posts: 222
Joined: Thu, 22. Jul 04, 01:40
x3tc

Post by Bhruic » Wed, 4. Jan 06, 15:37

CO. Dragon Corp wrote: Even though I think the way it works for the multiple sector patrol is ok. Lets assume the last message is SOMEWHERE in your huge message log and you don't want to search for it. All you have to do in order to find out which sectors are in the list is to stop the patrol ship and start the patrol again. A new log entry will appear with all the given sectors.

Quite easy if you ask me. Also, if you just give the sectors you want, everything else could be left out: Restriction to one race, or excluding of some races, home sector. Imho it would be the clearest and easiest way to do this.

But at least it's your mod and I just give ideas :wink: .
I'm willing to be convinced, but I must admit that I don't see why it would be the 'clearest and easiest'. Let's assume that you've got someone starting a relatively new game, and they want to hit up the 'small box' of starting sectors (ie, the immediate Argon and Boron sectors around Argon Prime). That's 22 sectors that they have to make a point of specifically marking. That's a lot of sectors. ;) It's not such a chore for the Patrol script because you generally don't Patrol that big an area. But when deploying Satellites, you may want to cover a large number of sectors.

Doing that my way, you'd have to do 4 things - select a home sector (ie, Argon Prime), set a sector jump limit (6 sectors would work, or you could choose Herron's Nebula or The Hole and only need 5 sectors), and set the races to Argon and Boron. That seems a lot easier than manually selecting sectors 22 times. To me, anyway. :)

(btw, got the 8-point sat system working, handles both AdvSat and NavSat at the proper range from the 0 point 8))

Bh

X-it
Posts: 1311
Joined: Wed, 6. Nov 02, 20:31
x3

Post by X-it » Wed, 4. Jan 06, 15:57

Bhruic wrote:btw, got the 8-point sat system working, handles both AdvSat and NavSat at the proper range from the 0 point 8)
Great! When will you be able to share this with us? :)

Bhruic
Posts: 222
Joined: Thu, 22. Jul 04, 01:40
x3tc

Post by Bhruic » Wed, 4. Jan 06, 16:05

Well, I'm redoing all of the script parts, as when I was making them, I was in C++ mode (if you looked at the script, the variable names probably gave that away ;)), so it wasn't as 'script efficient' as I'd have liked (at this point I've pretty much redone all of the parts). Plus I'm trying to build in the option(s) to limit based on sector/jumps/race/etc. So we'll see.

Right now I'm minorly stuck on the whole 'option' system, as I'm trying to use as few menu slots as possible, but I can't figure out how best to deal with the various 'selection' type things.

Bh

User avatar
CO. Dragon Corp
Posts: 490
Joined: Wed, 23. Nov 05, 14:49

Post by CO. Dragon Corp » Wed, 4. Jan 06, 16:17

Bhruic wrote:
CO. Dragon Corp wrote: Even though I think the way it works for the multiple sector patrol is ok. Lets assume the last message is SOMEWHERE in your huge message log and you don't want to search for it. All you have to do in order to find out which sectors are in the list is to stop the patrol ship and start the patrol again. A new log entry will appear with all the given sectors.

Quite easy if you ask me. Also, if you just give the sectors you want, everything else could be left out: Restriction to one race, or excluding of some races, home sector. Imho it would be the clearest and easiest way to do this.

But at least it's your mod and I just give ideas :wink: .
I'm willing to be convinced, but I must admit that I don't see why it would be the 'clearest and easiest'. Let's assume that you've got someone starting a relatively new game, and they want to hit up the 'small box' of starting sectors (ie, the immediate Argon and Boron sectors around Argon Prime). That's 22 sectors that they have to make a point of specifically marking. That's a lot of sectors. ;) It's not such a chore for the Patrol script because you generally don't Patrol that big an area. But when deploying Satellites, you may want to cover a large number of sectors.

Doing that my way, you'd have to do 4 things - select a home sector (ie, Argon Prime), set a sector jump limit (6 sectors would work, or you could choose Herron's Nebula or The Hole and only need 5 sectors), and set the races to Argon and Boron. That seems a lot easier than manually selecting sectors 22 times. To me, anyway. :)

(btw, got the 8-point sat system working, handles both AdvSat and NavSat at the proper range from the 0 point 8))

Bh
Mhm...ok, thatmakes sense. Didn't think aboutthat some want to cover the universe with one ship, that would be some hell of a work to insert all the sectors to the toc... :o

"Congratulation, I've officially been pimp...ehrm...CONVINCED" :lol:
Commanding Officer of the 'Dragon Corporation'
[ external image ]

User avatar
Trevelvis
Posts: 1042
Joined: Sun, 4. Apr 04, 15:20
xr

Post by Trevelvis » Wed, 4. Jan 06, 17:12

You have to remember to set Pirates to enemy otherwise it gets blown up all the time going through Pirate sectors. It would be good also if in the orders it would say something apart from None.

Excellent scripts though :)

Post Reply

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