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

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

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

Gammel
Posts: 654
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: 13737
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: 13737
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)

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

Post by Nividium » Sun, 21. Oct 07, 00:44

Ok, here is an update. Seems I screwed up with the new version and had the code check array size as a means to determine if there are any rock. Turns out arrays can have size but still be "null". So, I deleted all code concerning preliminary checking of Sector rock using individual arrays and appending. Replaced this checking with 1 find debris command that checks for "any" debris type with a yield > 0. Works good now. No more "Sell Energy Cells" when you assign a Harvestor to a Sector. Weird.

Anyhow it is fixed. As this is not a major "Version" update, the auto-update code will not activate, so you will need to "Standby" all Harvestors, then "restart" them.

Deleted User

Post by Deleted User » Sun, 21. Oct 07, 00:52

Thanks Nividium, my guys are working again.

Thanks for the speedy fix. :)

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

Post by apricotslice » Sun, 21. Oct 07, 09:33

I've installed the new version (without tinkering with it) and the ecells selling is still showing up, but as I watched, this went away. Its like that message is actually the ship being idle but the wrong thing is displaying ????

Also, is it possible to get the script to clear away all the debris with a zero yeild ? It doesnt need to do anything with dirt, just clear the debris as if it had. Part of the reason for running this is getting rid of the debris, not just mining the ore.

Also, I noticed that when you assign a homebase to a ship, it refuses to do anything unless the ship has soem of the ore or silicon or nvidium on board. Could the script not bother with that and assume the homebase wants it, regardless of it has any already ? The player has to take some responsibility for orders given.

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

Post by Pogi » Sun, 21. Oct 07, 15:14

Its like that message is actually the ship being idle but the wrong thing is displaying ????
Yeah I noticed that too, not a big deal though, I watched the miner and he did not go sell just went idle then went and bought e-cells..Kind of took me by suprise though the first time I saw my miner with the command "selling e-cells"..lol
X3..The most fun a man can have...With his clothes on.

maxfever63
Posts: 80
Joined: Sat, 10. Mar 07, 18:08
x3

Post by maxfever63 » Sun, 21. Oct 07, 17:40

Hi, Nividium. Is your script usable with XTM or is there any issues? Because I can't get it run. Thanxs.

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

Post by Nividium » Sun, 21. Oct 07, 21:25

apricotslice wrote:I've installed the new version (without tinkering with it) and the ecells selling is still showing up, but as I watched, this went away. Its like that message is actually the ship being idle but the wrong thing is displaying ????

Also, is it possible to get the script to clear away all the debris with a zero yeild ? It doesnt need to do anything with dirt, just clear the debris as if it had. Part of the reason for running this is getting rid of the debris, not just mining the ore.

Also, I noticed that when you assign a homebase to a ship, it refuses to do anything unless the ship has soem of the ore or silicon or nvidium on board. Could the script not bother with that and assume the homebase wants it, regardless of it has any already ? The player has to take some responsibility for orders given.
Hmm...I did not see it do that with this latest 2.01 version, but obviously it is if you saw it do that. I am not sure why it does that. There isn't even a sell E Cells command in there. :D Previously, it did that because there was an error ie: I was using the "size" of an array to test if there where any debris in a sector (kind of a preliminary test before it zerod in on actual desired minerals. ie: to save time with not bothering to run code if there isn't any rock in the Sector to begin with, right. Well it turns out that an array "can" have size even though it has "null" nothing in it. Don't mistake that for "0" zero, I mean "null". Very dumb if you ask me. How can "null" nothing have "size". Anyhow, I removed all code associated with using arrays and made just 1 single check for all types of rock with a yield of at least 1. So, the code would end if there was no rock. Fixed. Now you say, it still does that? Can you tell me exactly under what conditions this happens and for how long does this "sell E-Cells" show and then vanish? Ie: The ship: does it have a Homebase, if so, is it a ship or a Factory. Is there enough free room on the ship. What mineral is it harvesting at the time. How many E-Cells where onboard at the time of the incident. What Sector was it mining in? Did the Sector still have minerals in it or was there nothing in there. The more facts you can give the better I can try to recreate the situation and understand what is going on and then troubleshoot the problem.

Well, that might be part of the reason why "you" are running the script, but you don't speak for everyone or have the same needs and desires as everyone. The script is a debris harvestor, not an eraser.

The Harvestor needs to be told what mineral to collect. There are 4 ways of doing that. 1) Make an input interface ie: 1 button that calls a script with a pop-up on it that asks you to input a number which represents the mineral you wish to harvest. 2) Randomly harvest and unload 3) Add the name of the Mineral to the Name of the Homebase Ship or Factory. 4) Have a sample rock/s in the cargo bay of the ship or HQ or Factory so it knows what to collect. Would you like me to code in all 4 options? How big of a Hard Drive do you have to hold the script? I made the decision to do it this way, now stop your complaining. :D

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

Post by Nividium » Sun, 21. Oct 07, 21:37

maxfever63 wrote:Hi, Nividium. Is your script usable with XTM or is there any issues? Because I can't get it run. Thanxs.
I don't know if it's usable with XTM, TMX, JB7, 93J, or any of the 1000 other scripts and mods out there. Maybe I should hire a team of developers to test every concievable combination and run quality control beta testing for 6 months. You can't write scripts and have your script directory polluted with a bunch of other scripts, because a person will just screw themselves up otherwise. I have no scripts or mods installed whatsoever other than the Vanilla game install when I write scripts. Also, I never, ever, under any circumstances, test any of my scripts with any other scripts or MODS. I hope everyone will know that by now and stop asking me the same question over and freakin over again.

maxfever63
Posts: 80
Joined: Sat, 10. Mar 07, 18:08
x3

Post by maxfever63 » Sun, 21. Oct 07, 22:34

Don't bother Nividium. You'll never hear about me again. Your script doesn't work with XTM but there is a clever alternative in the new official bonus pack from ES. :P

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

Post by apricotslice » Mon, 22. Oct 07, 02:53

now stop your complaining.
If your going to interpret suggestions for making improvements as complaints, then fine. I'll stop posting.

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

Post by Gammel » Mon, 22. Oct 07, 03:26

I have a curious little suggestion.
It you have the harvestor set to a home base, can the Harvestor check to see if the home base has energy cells stocked, and use those rather than going to buy more? :?
!!! Caution!!!
Signature lost!
Please contact your Admin!

Post Reply

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