Fill Bay And Return Home [23/06/05]

The place to discuss scripting and game modifications for X²: The Threat.

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

Post Reply
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13088
Joined: Sat, 9. Nov 02, 11:45
x4

Fill Bay And Return Home [23/06/05]

Post by Xenon_Slayer » Thu, 23. Jun 05, 23:05

Fill Bay And Return Home Ver.1

Code: Select all

You need a Trading system extension to work this command.

Do you see your ships going to and fro from the same factory getting the same product again and again, wouldnt you want it to stay there?
With this command you can send a ship to a factory to say until its cargo bay is full or its homebase needs the resources.

How to use:
1. Select what station you want to trade with.
2. Select the ware to buy.
3. Input the maximum price you want to pay for that ware.
4. Select how many times you want to repeat this run. Minus numbers make it go forever.

What is it good for:
Absolutely Nothing... Joking.

You can keep a ship at a tradeing station, buying crystals as soon as they come in.
You can keep ahead of other NPC ships aiming for the same things because you are already there.
You can stock up on weapons and other high priced things as soon as they are made.

If the ship has no homebase it will stay at that station until its full, once it does it will cry for help with an automated message.
Last edited by Xenon_Slayer on Sat, 25. Feb 06, 14:49, edited 2 times in total.
Come watch me on Twitch where I occasionally play several of the X games

Scoob
Posts: 9921
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob » Fri, 24. Jun 05, 02:45

Hmm, quite like the sound of this.

How about incorporating use of the jumpdrive with this script if more that a certain number of sectors away & have the ship take it's required ECs from home base, enough for outward & return journey. This would let you turn TLs into very effective warehouses.

Imagine, park several TSs in numerous stations & wait for the goodies to roll in, ideal for clearing out Silicon & Ore mines as well as weapon factories.

Scoob.

Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13088
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer » Fri, 24. Jun 05, 10:03

Ah, I never thought of TL use. I need to make sure that TS's dont try to fly to M2's or M1's as they cant dock. Perhaps if they have a Transporter Device they could fly along side it and send a message when they cant fit any more in.

Im wondering if this is to good for the player. Should I add actual pilots and a pay system like the BPH?

Jumpdrives would be a great addition too, although I need to learn how to implement them. Perhaps if I do use pilots they can get levels.

L1 - Basic: Go to the factory, stock up when the price is low enough.
L2 - Team Work: If other ships are at the station waiting for the same thing, share the goods.
L3 - Jumpdrive: The ability to go and get wares quickly.
L4 - Transporter Device: If the home base is a big ship and the ship has more runs to do it will make a quick transfer over.
L5 - Best Buys: The ship can spot a better deal near by and go there, rarther than staying in one place.

These levels could go up by the volume or price collected and sucsessfully taken back.

I also need to add the function so M5's dont try to pick up Huge types of cargo.

@Scoob thanks for your help.
Come watch me on Twitch where I occasionally play several of the X games

Scoob
Posts: 9921
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob » Fri, 24. Jun 05, 16:34

If it were me (which it's not but hey :-)) to keep things simple intially I'd be keen to get the basic fetch & carry working for the TSs home base when it's a TL (or M1). Surely a simple check seeing if the homebase of the TS running your script is dockable is all that's needed, isn't there a simple script command that does that for you? Obviously for a station the goods collected have to be relevent, but I'm sure you already have that covered. If the homebase is a TL I would have though the script would in many ways be somewhat simpler as ANY wares can be specified & transported physical space & funds permitting.

Also I would certainly consider adding an Amount of ware to wait for before returning to base "full". I.e. your Dolphin may have 2000 cargo, but you may decide a "full" run would be when you've got 208 silicon to prime your new Crystal Fab with. This combined with the buying price you've already included would enable your TS to sit in a Silicon Mine (once again for example) & wait til it's fully stocked (the price drops to 227) & load the entire stock of 208 into the TS & return to base. Obviously setting the Amount to 0 would be requesting a "full hold" for the TS in question. Additionallly if the number specified is too large for current cargo capacity it would be supplimented for max cargo size (amount / volume).

Next I'd phase in use of the JumpDrive to speed things along a bit, the ship taking the required E Cells from its homebase (which you'll need calculate based on ship type IF you allow this command to run on Fighters as well as TS, which would be good!).

As for coding a "pilot" who would charge you for this service I'd say maybe not. Reasoning that this script is in many ways a Hoarder script or to enable you to get the maximum load of wares, possibly irrespective of price, so it's not necessarily a money making script, more of a convenience script & I'd certainly be using it mainly in conjunction with a TL as factory supplies are pretty much covered already with the likes of BPH.

I think the real power of this script of yours will be the ability to use it with TLs/M1s. Just imagine, fleets of TS sat in all the Weapon and shield fabs across the universe, stocking up at the best price & then automatically ferrying them to your TL mobile warehouse base using their jump-drives! You could even have ships getting the ecells you need using this method...at totally automated mobile warehouse! Hmm, maybe the pilots should charge after all eh? :-)

Err, you're welcome for the "help" but just reckon I'm ginin you more work!

Scoob.

User avatar
Birdman
Posts: 508
Joined: Sat, 10. Jan 04, 09:07
x3

Post by Birdman » Fri, 24. Jun 05, 17:16

Scoob wrote:Hmm, quite like the sound of this.

How about incorporating use of the jumpdrive with this script if more that a certain number of sectors away & have the ship take it's required ECs from home base, enough for outward & return journey. This would let you turn TLs into very effective warehouses.

Imagine, park several TSs in numerous stations & wait for the goodies to roll in, ideal for clearing out Silicon & Ore mines as well as weapon factories.

Scoob.
Additionally, how about being able to stockpile at 0 price from your own fabs? That way, you could set up mining operations in an area (say Rhy's Desire), and load a M1/TL (with its own docked ships stockpiling, or just the ones at the stations returning), for distribution to other sectors.

Thanks.

Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13088
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer » Fri, 24. Jun 05, 20:37

Scoob wrote:If it were me (which it's not but hey ) to keep things simple intially I'd be keen to get the basic fetch & carry working for the TSs home base when it's a TL (or M1). Surely a simple check seeing if the homebase of the TS running your script is dockable is all that's needed, isn't there a simple script command that does that for you? Obviously for a station the goods collected have to be relevent, but I'm sure you already have that covered. If the homebase is a TL I would have though the script would in many ways be somewhat simpler as ANY wares can be specified & transported physical space & funds permitting.
Right now the logic is:
  • All ships can use this command. Including big ships
  • If there is no homebase dont move from the station
  • If the homebase is a station with the goods as a product or resource it will stay in the homebase loading off as many as it can. It will then wait for space to free up and slowly will add more and more of the ware. So if it is a resource, every cycle it goes down and the ship adds it again. This is where my SSP script comes in handy.
  • If the ware is not used by the station it will just stay there, bug.
  • If the homebase is not a staton it will try to dock, if it does dock it will unload until the homebase is full. If the homebase is full it will just sit there, bug.
Changes the NEED to be made
  • Big ships cant use this command, very easy to do with the init.
  • When ships cant dock with the ship, i.e TS's in M2's. Either an error message is sent or a transporter is used.
  • If the ware is not used by the homebase station, i.e Silicon in a SPP, send an other message to the player.
I have just seen a new use for this script, you can buy the product you are selling. So if the homebase is a Solar Power Plant, you can buy energy from an other SPP and sell it as your own.

Question: Is there a way to find the nearest gate to the target station, Its for the jumpdrive command.

I think that this command seems quite complex for AI ships, which is why I want pilots. Also, a pilot could fall asleap if it waits at a station to long. :)
Birdman wrote:Additionally, how about being able to stockpile at 0 price from your own fabs? That way, you could set up mining operations in an area (say Rhy's Desire), and load a M1/TL (with its own docked ships stockpiling, or just the ones at the stations returning), for distribution to other sectors.
Hold on a sec... That can work. Thats an other new feature I didnt spot!
Come watch me on Twitch where I occasionally play several of the X games

Harlock776
Posts: 2261
Joined: Wed, 9. Mar 05, 21:53
x2

could work

Post by Harlock776 » Sat, 25. Jun 05, 07:15

There are some paramenters to consider...

Not everyone sets up their factories the same way. Some of us assign only 3 to 5 freighters to a factory depending on what kind of factory it is while others don't use any frieghters they just fill the new factory with ecells and forget about it.

Also consider if the above is the norm for most players then leaving one or more of their gathering ships at a single fab will possibly slow down the gathering process. If one fab is out of something and yet another in another sector but the same distance away suddenly has the goods that the first fab still won't produce for another 30 mins then that frieghter is sitting there for nothing.

A freighter leaving from a centralized location is more efficient than leaving one at a fab until it's full. The only useful scenario for this kind of script is perhaps to make it easier to mobile mine? As a freighter gets full it can automatically go back to it's assigned TL and offload it's capacity and then go back out and gather again. There are some situations for certain stations that make something like this necssary though.

Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13088
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer » Sat, 25. Jun 05, 11:34

I believe you are getting at the fact filling a ship will take some time, any you are asuming that no mater what, the ship will just fill and fill until its done.
In fact this command takes into acount if the homebase is in need of the ware. If so it will leave early.
Come watch me on Twitch where I occasionally play several of the X games

User avatar
Birdman
Posts: 508
Joined: Sat, 10. Jan 04, 09:07
x3

Post by Birdman » Sat, 25. Jun 05, 11:41

OML wrote: Question: Is there a way to find the nearest gate to the target station, Its for the jumpdrive command.
Check Pg. 76 of MSCI Handbook to find gate locations. If for jumping into sector, will jump to center per Pg. 55.

EDIT: Also check this for actual distance comptation. http://www.egosoft.com/x2/forum/viewtopic.php?t=22983

Also check Pg. 67, get distance between 2 objects.

Post Reply

Return to “X²: The Threat - Scripts and Modding”