[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

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

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

Post by apricotslice » Sun, 14. Oct 07, 13:22

I had that problem. Cycrow released a complete new version of it, renamed and all, and the pack is for that.

So you need to do what I had to do and download the latest version of the installer.

@Nividium

Ta, that makes more sense. :)

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

Post by Nividium » Wed, 17. Oct 07, 04:40

Ok, I have update the Auto Debris Harvestor to version 2.

- Added ability to use other ship as a Homebase.
- Added ability to use "any" ship as a Harvestor (if XL cargo class)
- Reduced the number of Sectors a Harvestor will sell to down to 5.
- Checked Harvestors with using the Headquarters and they work fine except they will not stop making deliveries to the HQ unless you manually give them some other ship Command ie: Standby, idle etc. They will not abide by any HQ setting to limit their deliveries that is meant for the CAG, MK3 or other Agent type ships.
- Improved the AI for anti-attack behavior and added code that "STOPS" a Harvestor from working ie: Terminates Command if they Jump-Out. Also, added their ability to Dock if attacked and they lost their Jumpdrive or for some bizzare reason they do not have enough Fuel.
- Changed the "buy Fuel" took out annoying messages, simplified. It no longer auto checks for credits and makes Player pay if Homebase is dry. Instead, it wastes alot of time now. It will fly to SPP realize it has no credits and fly all the way back to work Sector and begins working. Make sure you put credits in your Stations!
- Made alot of internal code changes.

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

Post by Pogi » Wed, 17. Oct 07, 08:51

I'm holding on to the first one....Someday, it will be a classic.. :D

In the last two days 5 miners have made me 50 million, cleaned out Kingdom End and Three Worlds and working on Seizwell now...I'm leaving my HQ parked inside a TL until there is no more dirt for them to harvest..Which will be a long long time...Cheers :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 » Wed, 17. Oct 07, 14:29

Pogi there is no problem with unloading your HQ. Just don't assign any Harvestors to it if you are worried about them overfilling it. They will leave your HQ alone if they do not make it their Homebase. Also, the free miners sellers won't sell to the HQ either, if you make the prices less than average price.

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

Post by Pogi » Thu, 18. Oct 07, 00:42

Oh....Thanks :D
X3..The most fun a man can have...With his clothes on.

Gammel
Posts: 668
Joined: Tue, 10. Jul 07, 08:07

Post by Gammel » Thu, 18. Oct 07, 01:10

Woo! An update for this awesome script.

For those of us that had the old script running, is there anything we need to keep in mind while updating to the new version. I know when updating some other scripts, players had to set all ships using that scripts commands to 'idle' and then change the script over.
Does this apply here?
!!! Caution!!!
Signature lost!
Please contact your Admin!

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

Post by Nividium » Thu, 18. Oct 07, 02:24

No, I think you just install the new version and it re-starts the miners with the command by itself. Not sure. See what happens I guess.

Gammel
Posts: 668
Joined: Tue, 10. Jul 07, 08:07

Post by Gammel » Thu, 18. Oct 07, 04:38

Oh well, no one seems to be reporting any problems with upgrading.
I just thought Id check anyway. :D
!!! Caution!!!
Signature lost!
Please contact your Admin!

Gammel
Posts: 668
Joined: Tue, 10. Jul 07, 08:07

Post by Gammel » Thu, 18. Oct 07, 22:53

Oop, double post. But I just wanted to highlight a problem I seem to be having with the new version. :(
My caimen, that was supplying one of my complexes in Olmank's from the rubble in Brennan's. I disabled the miner before I changed the script, just to be on the safe side. Un-installed the old script, re-installed the new one, and then restarted my miner.
I straight away noticed my complex wasn't filling with minerals as fast anymore. So I watched the harvester for a while. He would go into Brannan's, get some minerals, jump to Olmank's, put them in the complex. Then he'd jump back into Brennan's, but then straight away jump back into Olmank's, carrying nothing. Dock with the complex, exit again, jump back into Brennan's. Collect ore. And the process would repeat. He was chewing Energy Cells up like no ones business.

Any ideas?
!!! Caution!!!
Signature lost!
Please contact your Admin!

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

Post by Nividium » Fri, 19. Oct 07, 01:04

Gammel wrote:Oop, double post. But I just wanted to highlight a problem I seem to be having with the new version. :(
My caimen, that was supplying one of my complexes in Olmank's from the rubble in Brennan's. I disabled the miner before I changed the script, just to be on the safe side. Un-installed the old script, re-installed the new one, and then restarted my miner.
I straight away noticed my complex wasn't filling with minerals as fast anymore. So I watched the harvester for a while. He would go into Brannan's, get some minerals, jump to Olmank's, put them in the complex. Then he'd jump back into Brennan's, but then straight away jump back into Olmank's, carrying nothing. Dock with the complex, exit again, jump back into Brennan's. Collect ore. And the process would repeat. He was chewing Energy Cells up like no ones business.

Any ideas?
I have been unable to reproduce the behaviour you have described. I created a Complex that requires Ore in Olmank and sent the Caimen to harvest in Brennans. But, there where so many Pirates attacking the Harvestor, that it would just jump out, send me an email and Terminate the Command.

So, I set up another Complex in Ore Belt and sent the Harvestor to mine in Cloudbase West (Goners) and watched the harvestor for several hours. It performed flawlessly.

I don't know. Does your Complex have "Credits" in it? What is the complex made up of, what combo of Factories? Do the Pirates attack you? Did you try stopping the harvestor again with a "Standby" command and then restart him? I really don't know what to suggest, the harvestor works perfect in all my tests.

Gammel
Posts: 668
Joined: Tue, 10. Jul 07, 08:07

Post by Gammel » Fri, 19. Oct 07, 01:17

Well the complex contains:
1x Argon aPPC Fab
1x Boron bPPC fab
1x Argon gPPC fab
1x Argon aHEPT fab
2x Boron Crystal fab
1x Boron SPP L
1x Boron Biogas L
1x Boron BoFu L
1x Argon Cattle Ranch L
1x Argon Cahoona L

When I stopped him, I actually sent him off to quickly cart some stuff to one of my other stations. Things have been getting hectic here, since I took over Olmank's with Nirwins Sector Take over Script. I have been under near constant pirate attack. But they only go after my Trading Station, and leave everything else alone. My Caimen Mineral Harvester has never been attacked by anything, to my knowledge anyway. Ive destroyed many of the local pirate bases so regular Pirate activity in my area is rather low.
!!! Caution!!!
Signature lost!
Please contact your Admin!

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

Post by apricotslice » Fri, 19. Oct 07, 08:14

If anyone is interested, I've set up a mod that includes an HQ definition with 50 mill space, making it ideal for this script, which I included v2 of in the spk.

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

Deleted User

Have a Problem

Post by Deleted User » Sat, 20. Oct 07, 13:58

I'm having a problem with this script, When I run it on one of my Mercury Super Frieghters. It goes buys E-Cells, then jumps to work sector, then the command display goes right to sell E-Cells. But it just sits in center of sector doing nothing. Have had command running on one ship for 6 hours and it still just sitting there saying Sell Ware...Energy Cells. Didn't have a problem once with the first version, but second will not function. Any ideas? And does any one have the first version I misplaced my USB drive I have all my scripts saved to. :oops:

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

Post by apricotslice » Sat, 20. Oct 07, 15:32

I noticed that too. I switched it to a sector I knew was chock full of dirt, and its been happy ever since, so its possible the script is not recognising the nothing to collect condition for some reason. As you said, it worked fine in v1.

Deleted User

Post by Deleted User » Sat, 20. Oct 07, 22:24

Yes I've tried that too. Still no joy. A little odd, guess I'll just have to do with out it till I can find out what is causing the problem. Have spent last hour going throught the scripts. Not much experiance with scripting so it's a learning experiance. :)


EDIT:: BTW Apricotslice. Does the Version in your "Apricot Salvage Mod" work been looking at your mods. Thinking about making a few more X3 copies to try them out. Already have 4 different ones going, not counting my clean install. :lol: (The Syndicate, XTM, Rougey's, and XFP Transcend)

Post Reply

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