[SCRIPT] Auto Debris Harvestor v2.01 by Nividium 10/20/2007 UPDATED

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

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

Pogi
Posts: 522
Joined: Thu, 13. Apr 06, 12:35
x2

Post by Pogi » Fri, 12. Oct 07, 15:21

@Apricotslice...set up a "mining relay station" in between your HQ and the harvestors..assign the relay station to the harvestors as their HB..HB some TS to your HQ to transfer the ore/silicon/nividium from the mining relay station to your HQ (can use XAI script for repeat transfer)..Problem solved...Cheers

You can find the station here:

http://forum.egosoft.com/viewtopic.php?t=190539
X3..The most fun a man can have...With his clothes on.

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Fri, 12. Oct 07, 15:39

Great idea, but kinda negates my game plan.

I'm using this script with the stations within a HQ script, so my HQ is acting as a super-complex. The aim being to not have any stations at all other than the HQ and thus not needing any ships other than the debris gatherers and UT's.

The downside I can see, is that in having a ship ferrying dirt from the relay station to the HQ, the relay station is never going to be full of any product anyway.

But for a more normal game approach, yes, your suggestion would be perfect.

I'm pondering upsetting Nividium a lot further (hopefully not) by making 2 versions of the key scripts, one for silicon, the other for ore, and then having a second command for ore, and assigning the ship via its command to one or the other. Thats within my limited scripting ability, and would solve the problem, albiet doubling the number of ships I'd be using.

My modified Discos are proving absolutely perfect for the job :)

Pogi
Posts: 522
Joined: Thu, 13. Apr 06, 12:35
x2

Post by Pogi » Fri, 12. Oct 07, 15:48

the relay station is never going to be full of any product anyway.
I don't understand what you mean here? The relay station is just that, designed to relay minerals to another station. You can best sell off of it too if you want, but for your needs just set up several and adjust the price so your TS that are HB to you HQ buy stock from it and the HB TS on the relay sell to the HQ...You are never going to solve the problem with the minerals because your HQ has such a huge storage..the relay station will make sure you get supply of both ore and silicon as well as nividium..(use bunny for that).
X3..The most fun a man can have...With his clothes on.

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Fri, 12. Oct 07, 15:53

HB ?

I really didnt follow that sorry.

As far as I can see, using any station as a relay, would entail moving the dirt a lot slower than the gatherers can deliver it. But anything faster than a pack-snail is going to keep the relay station from ever filling up of its product. If it is slow enough to allow the station to fill up, then the gatherers will stop working while it is.

Pogi
Posts: 522
Joined: Thu, 13. Apr 06, 12:35
x2

Post by Pogi » Fri, 12. Oct 07, 17:10

HB=Homebase...the mining relay station is "standard" meaning that it only holds standard amount of minerals..It will empty every time one of your HB TS from your HQ go for a pickup... :D
X3..The most fun a man can have...With his clothes on.

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Sat, 13. Oct 07, 11:14

This is very odd.

I've been watching my ships. They definitely fill up with ore, they travel to my HQ, off load, and return to get more.

But the HQ always has ZERO stock of Ore ! ??????

For the life of me I cant work out why.

The scripts transfer silicon over no problem, but they lose all the ore.

Is this something to do with the HQ being the homebase ?

User avatar
Nividium
Posts: 800
Joined: Tue, 21. Aug 07, 01:31

Post by Nividium » Sat, 13. Oct 07, 12:19

Hi apricotslice,
The Headquarters does seem to behave dif than regular Factories. The Harvestors seem to work fine with regular type stations but you are correct in that the Harvestors are having a hard time dealing with the Headquarters for some reason. I did not do extensive testing with the Harvesters while having them use the Headquarters as their Homebase. I can see now that they do not perform well with the Headquarters and will udate the main post to reflect this problem. Thank you for bringing this to my attention apricotslice.

In the mean time, do what Pogi says, he knows alot about how to do good mining and how best to use scripts and resources and organize things way better than me, so listen to what he recommends ok apricotslice.

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Sat, 13. Oct 07, 12:26

I'm happy with the silicon even if the ore is going missing, and after all, they are clearing out all the useless roids for me and improving framerates.

So the script is well worth using anyway :)

xxbluedragonxx
Posts: 375
Joined: Wed, 29. Aug 07, 13:08

Post by xxbluedragonxx » Sat, 13. Oct 07, 14:25

Have you got trade with other races Yes for your HQ? That could be why the ore is disappearing. Another reason could be your own UTs or CAGs could be taking the ore and selling it.

If you set trade with other races No then any CAG based there will only buy for it. You might want to turn on Trade Barrier (Commercial Agent) in the HQ commands. That will stop all other CAGs trading with it.

For UTs and Station Manager ships or other traders of yours as far as I know they ignore the "trade with other races" settings so the only way you can stop them taking anything from the HQ is to adjust the HQ prices so they have a higher chance of getting a better deal elsewhere. The HQ prices are both a "sell" price AND a "buy" price from my understandings!

xxbluedragonxx
Posts: 375
Joined: Wed, 29. Aug 07, 13:08

Post by xxbluedragonxx » Sat, 13. Oct 07, 14:30

On a related note I noticed this behaviour: I have my fleet of 15 mining ships now cleaning up Home of Light. My HQ is in Seizewell. I have noticed they are more often going to the HQ and dropping off ore there. They have no home base.

They are also roaming really far. One ship I saw it trying to sell to a Drone Fab in Wastelands which is on the other side of the universe. The Drone Fab was full of silicon when the miner arrived there so it idled a bit and then jumped to another sector nearby to try to sell there using up even more energy cells. It had a cargo bay of 71 silicon.

I plan on moving the fleet further south to Paranid space soon specifically to mine Savage Spur as I blew up a number of low yield asteroids in there manually. Then the fleet can collect the rocks. This should be even further away from my HQ but I think they will still do the same and travel all across the universe?

Any way to limit the distance they go or preferably not keep going to the HQ or player docks or some such?

Another suggestion is it possible to have them collect as much as they can in their cargo bay then try to sell? Currently they pick up a small amount then jump and try to sell and then jump back which seems more inefficient since the amount they picked up could be any number up to 300 (so the full cargo space is never used on anything bigger than a Demeter Miner anyway)

xxbluedragonxx
Posts: 375
Joined: Wed, 29. Aug 07, 13:08

Post by xxbluedragonxx » Sat, 13. Oct 07, 15:16

Ok I got an idea :lol: sorry for the multiple posts but I wanted to seperate them out a bit.

So I think this one would help a lot of the HQ and roaming traders: make use of the transporter device so if you assign homebase as a TL they will transport their cargo into the TL if it has room! If not they go idle and wait until there is room.

I think this would be the most elegant solution and provide the best option for a mining operation.

A TL as the "mobile base". A fleet of mining ships. You could assign the TL as the home base. The miners will then deposit their cargo at the TL using their transporter device (since they all have one anyway!)

This would have the benefit of a truly mobile operation. You could jump the TL and the fleet to a sector and keep them all in the same place. Maybe use a CLS ship to take wares from the TL to sell.

And if you use LV's beamdock script you could even dock the miners at the TL and then move the whole operation anywhere you want! I think this would be a more logical mobile mining operation with the TL functioning as the mobile base and it having a tender which sells or ships the freight someplace. No more HQ issues either! Just assign the miners to the TL and they will never go to the HQ or roam all over the place :)

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Sat, 13. Oct 07, 15:23

I'm not using any cags, stations managers or anything, and there is only 1 UT, and it hasnt been on that side of the universe for some time now.

I've sat there and watched the ships dock and undock, with the hq details screen up, and the ore doesnt even flash on and off.

xxbluedragonxx
Posts: 375
Joined: Wed, 29. Aug 07, 13:08

Post by xxbluedragonxx » Sat, 13. Oct 07, 15:29

That must be some bug if you use a HQ as a homebase. My fleet has no homebase and they deposit ore just fine (but it depends on the prices elsewhere!) Well I hope Nividium can fix it though the TL homebase/transporter wares might help ;) Can you tell I'd really really like that feature? :D

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Sat, 13. Oct 07, 15:31

I've actually gone back to the defualt mode of no homebase, so they just sell wherever its needed. 4 ships are making very nice money doing it.

And Ore Belt now looks like somone hoovered it :)

Funnily enough, CBSW is taking a lot longer to clear.

Pogi
Posts: 522
Joined: Thu, 13. Apr 06, 12:35
x2

Post by Pogi » Sat, 13. Oct 07, 16:06

@Apricotslice...If you have a bunch of stations inside your HQ and any of them are using ore for production..They will take the ore instantly for their use...One post I read of yours somewhere you had 20+ stations in your HQ..Ore has a larger storage at these stations while silicon does not. So naturally your ore will disappear from stock before you can even see it stocked.. :D
X3..The most fun a man can have...With his clothes on.

User avatar
Nividium
Posts: 800
Joined: Tue, 21. Aug 07, 01:31

Post by Nividium » Sat, 13. Oct 07, 20:32

Hello, xxbluedragonxx,
yes, I will impliment all of those changes into an update. Ie:

1) Enable using a TL as the Homebase
2) Decrease the number of Sectors a Harvestor will check in order to sell
3) Remedy the odd Headquarters behavior
4) Review all code for logic and streamlining
5) Reduce the amount of Energy Cells allocated as a Fuel Tank and Min Fuel allowed.

Thanks for the feedback peeps. Originally, I only created this script as a not so serious exercise to merely clear out debris rocks and sell them, but now I can see that people are quite interested in this script. So, I will look at it again from the beginning and see what I can do to make it more useable. Thanks again everyone.

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Sun, 14. Oct 07, 03:11

Originally I didnt have any stations that used ore. I did add 3 1mj shield stations, but by what the ships were carrying in, they should not ahve used it as fast as delivered.

Nividium, I noticed that the homebase script has a reference to using the bases ecells, but it doesnt seem to be using the same calculation. In the other 2 scripts that have it, there are 2 calculations. the first is a total divided by 4, and the second further divides that by 4. But in the homebase script, there is only a single divide. Hence I think the ships end up with too many ecells on board. You might want to look at it. It could be fine, but the code is definitely different.

User avatar
Nividium
Posts: 800
Joined: Tue, 21. Aug 07, 01:31

Post by Nividium » Sun, 14. Oct 07, 12:20

apricotslice wrote:Originally I didnt have any stations that used ore. I did add 3 1mj shield stations, but by what the ships were carrying in, they should not ahve used it as fast as delivered.

Yes, I don't know about the effect of having Factories running inside Factories with the Headquarters. But, I will be getting to the bottom of any normal/regular functionality that the Harvestors should have while dealing with the Headquarters ie in a Vanilla state.

Nividium, I noticed that the homebase script has a reference to using the bases ecells, but it doesnt seem to be using the same calculation. In the other 2 scripts that have it, there are 2 calculations. the first is a total divided by 4, and the second further divides that by 4. But in the homebase script, there is only a single divide. Hence I think the ships end up with too many ecells on board. You might want to look at it. It could be fine, but the code is definitely different.

Yes, I know about that, it is not an error. Doesn't matter now because I have removed that parasitic behaviour from the Harvestors. But, to let you know what it was doing. The main EC buying thing uses a 1/4 of a ship's cargo space as it's "Fuel Tank" and 1/4 of that "Fuel Tank" is watched and is called the "Reserve", hence the /4 /4 calculations you saw, however, if the ship is docked at it's Homebase, then it disregarded the "reservse" and just filled the "Fuel Tank" to it's max amount. But, that has changed now anyhow. Harvestors will no longer steal EC from their Homebase.

Also, I reducing the "Fuel Tank" down to a max of 1000 EC no matter how big your ship is ie: get max cargo space /4 = Fuel tank. If Fuel tank > 1000 then Fuel tank = 1000. The same "reserve" will be maintained though ie /4 /4. It is required for Emergency Jumps and to Jump to SPP and if that SPP is empty by the time you get there you also want some more in order to Jump to a second SPP etc so a reserve of 1/4 of your Fuel Tank is set up for that. Max would be 1000/4 = 250.

Also, I am adding all Moveable ships as being able to be used as Auto Harvestors too, so you can use your TL, Carrier, Destroyer or any other ship that you can strap a Jumpdrive and Transporter Device onto as an Auto Harvestor if you wish. Except for ships that cannot carry mineral cargo class wares, then they cannot be used either.

Also, I am adding the ability to make any other ship a Homebase to your ship in addition to the standard Docks and Stations too. So, now you can have a fleet of TL's all Homebased to a fleet of Carriers or Destroyers or TL's or TS, TP anthing that will carry mineral class wares. I leave that totally open and up to the user to decide what they want to use as a Homebase. Total freedom. No more controls.

Also, I have reduced the search of the Harvestors down to only 5 sector radius for selling and only 1 sector radius for looking up demand. So, they will look to the surrounding 1 Jump sectors for mineral useage and types, but when it comes time to actually sell the minerals, they will search 5 sectors in all directions and NO more than that. This will conserve the fuel useage given that they will now have smaller fuel tanks to begin with. The longer they work an area, the less amount of demand there will be, so you can now expect email messages to start coming in and alot more "idleing" by the Harvestors, because they can't sell all they harvest like they did before. It's a trade off.






xxbluedragonxx
Posts: 375
Joined: Wed, 29. Aug 07, 13:08

Post by xxbluedragonxx » Sun, 14. Oct 07, 12:25

Awesome changes coming! I can't wait! :) Yes the local trading can saturate that is why they are travelling so far right now I guess. But instead of 15+ miners all jumping all over the map it nicer to have them store ore at a big ship and then use another one or two to deliver and sell. Or if there is no home base they try to find a buyer themselves. I like it!

That is great I look forward to using a TL as a big mining ship! :D

Lidza
Posts: 403
Joined: Wed, 12. Oct 05, 23:23
x3

Post by Lidza » Sun, 14. Oct 07, 12:31

@Nividium

Hi

My old and reliable installer seem unable to read the spk file (probably has a difference compression not readable by old versions) and sincerely I'm not keen to reinstall X3 and everything else again just to have an up-to-date installer version.

So, is there a chance to have this script in zip format? Thanks

Post Reply

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