[SCR] [X3AP] Drone Mining and Trading System v1.2.2 [UPDATED 11/08/2014]

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

destroll
Posts: 8
Joined: Sat, 5. Nov 11, 15:36
x3tc

Post by destroll » Mon, 27. Jan 14, 04:57

Ah, thanks for that bit of insight.
Still very new to using mods on X3 and not entirely sure which ones are capable of running in tandem.
Guess I'll just keep a (separate) drone escort fleet in the sectors I send the mining droids to to be on the safe side.
Conglomo Corp. "We own EVERYTHING."
CNGM on the GSE. Like us on Spacebook!
"Spacebook" is a registered trademark of the
Conglomo Corporation. ©MMCMXLVIII
"Conglomo, we even own YOU."

zanzal
Posts: 309
Joined: Sat, 15. Sep 12, 07:42
x3tc

Post by zanzal » Mon, 27. Jan 14, 05:10

DevilishMoney wrote:Hello Zanzal

I am using Lucikes Prospector script and would like to know if your script is faster and more efficient with collecting minerals or is your script made just to be quicker and easier to set up.

Thanks
The Drone Miner uses freight drones for collection of minerals. So lets say if you have 20xTS running Prospector, you could also just have 1 Drone Miner TL configured to use 20 freight drones and the mining rate should be fairly close. The 20xTSs will have a trade advantage selling the minerals probably netting you higher than average prices. Of course you could always make your TL use 100 freight drones and then you are much more efficient overall even with inefficient trading. However, keep in mind the more hostile your Universe the more likely it is you will suffer loses.

To make an example, in my last Universe I was running Improved Races 2.0 and pirates were really aggressive against my TLs, especially in one sector (Dark Space Cluster). In that case that particular Drone Miner made no profit at all because it constantly lost drones to Pirate M3s. Even though it easily killed pirates, it was often not before losing a drone or two. So keep in mind that a mining fleet of 20 TSs has a much higher survivability than a single Drone Miner with 100 freight drones and you'll need to factor that into your efficiency if your in a particularly hostile Universe.

Assuming few losses, Drone Miners will always be more efficient than using a mobile mining fleet of M3s or TSs.

gastovski
Posts: 152
Joined: Tue, 3. Dec 13, 11:20

Post by gastovski » Mon, 27. Jan 14, 10:40

Well, for some sectors i can mine Nvidium (northeast-east side of the map). But for many other sectors (mostly southwest-west) i can't even mine simple Ore minerals.

ManticoreMig
Posts: 13
Joined: Thu, 13. Dec 12, 11:00

Post by ManticoreMig » Mon, 27. Jan 14, 15:46

Hello Zanzal,

I haven't had much time to test de script lately, but from the shorts tests I made with v1.1, I can say that it is working flawlessly, especially the auto-equip component.

If i may do a few suggestions:
EchoFinder wrote: 1. Since this is supposed to be used in lieu of a mining station, I suggest it use energy cells while operating. I'd say 1-3 energy cells per deployed drone. I see drones bringing in at least 3 units of ore per trip and they can hold a maximum of 100 (Particularly after breaking large asteroids) so this is more than a fair trade.
Well, since vanilla X3R you can remote mobile mine with TSs, with no penalties. The only drawback is that the setup and maintenance was very time consuming. This function was improved in X3TC to the point that, after enormous setup work, it was possible to have huge mobile mining fleets, roving sectors, producing huge loads of minerals, autonomously, all of this vanilla with bonus pack. X3AP "balanced" this aspect by making the rocks non-respawning. What zanzal made was basically automate the setup and operation process even further. So I believe that an energy pay-off is not needed.
EchoFinder wrote: 2. The ability to deploy satellites and lasertowers for use as a screen. Both can be held by freight drones so they can be used to set them up and take them down for extended mining operations.
It would be an interesting idea, though maybe in a different script/comand? Like a dedicated ship that sets up and maintains fields of satellites/lasertowers/mines?
zanzal wrote: So maybe rather than have the drone miner use a falcon hauler or in XRM's case a TS to store overflow, maybe we have the Falcon Hauler running a command that tries to keep the drone miner from becoming full. Done right such a script might be useful for carriers/missiles/ecells/ore/etc. Are there any scripts that currently can do this that you know of? It seems like such a basic problem that such a script might already exist.
CLS2 can do this, and it is part of the bonus pack, it might be difficult to setup, but its extremely versatile, I use it all the time for tasks like these (like supplying fuel/missiles to my capital ships, or shift goods around between complexes). Though I think there are other scripts out there that can do this too.

zanzal
Posts: 309
Joined: Sat, 15. Sep 12, 07:42
x3tc

Post by zanzal » Mon, 27. Jan 14, 19:55

gastovski wrote:Well, for some sectors i can mine Nvidium (northeast-east side of the map). But for many other sectors (mostly southwest-west) i can't even mine simple Ore minerals.
Greetings gastovski,

I was not able to recreate your issue with the asteroids you reported. I broke the roid you mentioned in Atreus Delta with a mobile drilling system and the Drone Miner cleaned up the rocks just fine.

zanzal
Posts: 309
Joined: Sat, 15. Sep 12, 07:42
x3tc

Post by zanzal » Mon, 27. Jan 14, 20:52

Echofinder wrote:3. The ability to store and use items in docked fighters. M7Cs were made for this type of activity, but lack the cargo space to do so.
I've thought about this some more and it doesn't really make much sense. A non upgraded TL for about 20-28 mil with 30-50k base cargo or an M7C for 16 mil carrying 100 mil in fighters just to extend its cargo bay... The M7C option doesn't make any sense if your mining silicon and ore..

I think testing the script on Nividium for gastovski had momentarily warped my perspective. I did some more testing over the weekend and my gut feeling is that the Drone Miner is balanced well against Ore/Silicon mines given the high initial cost of setting one up (25-28 mil) no extra energy consumption is needed. I still need to sit down and create spreadsheet with mine baselines and dozens of test runs to make sure, but I am comfortable with the operating costs of mobile mining being replacement drones and missiles. It will be a lot more variable than the energy costs, but in general everything about the Drone Miner is going to variable so it will not be easy to compare it to a mine.

Echofinder
Posts: 250
Joined: Mon, 18. Jun 12, 06:05
x3tc

Post by Echofinder » Tue, 28. Jan 14, 21:13

Yeah, on second thought the addition of fighter cargo capability was just a shot at making M7Cs useful somehow. I'll just edit the cargo stats for that.

How about the ability to convert fighter drones into more freight drones using resources? Fighter drones are easy to acquire and can be produced, but freight drones are only obtainable via NPC stations, and only a few at that.

gastovski
Posts: 152
Joined: Tue, 3. Dec 13, 11:20

Post by gastovski » Thu, 30. Jan 14, 00:26

Ok i got it working. I did go to those sectors and manually broke nvidium asteriods just for one time and got no error whatsoever. The mod works fine and awesome!.

zanzal
Posts: 309
Joined: Sat, 15. Sep 12, 07:42
x3tc

Post by zanzal » Thu, 30. Jan 14, 00:43

Echofinder wrote:How about the ability to convert fighter drones into more freight drones using resources? Fighter drones are easy to acquire and can be produced, but freight drones are only obtainable via NPC stations, and only a few at that.
Yeah, I don't much like the idea that Boron pretty much exclusively sell all the freight drones in my galaxy. I like the freedom to go to war with all the races at any given time. Capped TLs rarely have freight drones on them. I'll investigate making a script that lets one produce freight drones at the PHQ this weekend. I assume that it is not possible to dock a freight drone to the PHQ and reverse engineer it. I'll try that first and see though. If that doesn't work I'll add a Freight Drone blueprint by script and see if the PHQ is able to manufacture it, and if so then we'll just need to decide on a proper way to acquire the blueprint without cheating it in. Will let you know.

Echofinder
Posts: 250
Joined: Mon, 18. Jun 12, 06:05
x3tc

Post by Echofinder » Thu, 30. Jan 14, 23:25

I can tell you that you can't RE a drone. You can dock it but it won't appear on the menu.

If you script in a BP, PHQs can produce the drone like any other ship, but the clock starts the moment it's finished. There's a bit of micromanaging as well.

zanzal
Posts: 309
Joined: Sat, 15. Sep 12, 07:42
x3tc

Post by zanzal » Fri, 31. Jan 14, 01:00

Sounds interesting. Then that's what I'll do. And since the drones don't auto-dock that provides an opportunity for the mechanism for purchasing the blue print as as well.

I'll make a separate script, 'Freight Drone Production':

1. You can run the command on your PHQ as an active command.
2. If you don't have the blueprint then the script will prompt you to license the blueprint for 1mil credits before running.
3. When a drone gets created, and it has no active command, homebase, movement, and cargo and is within 30 km of the station, the station will direct it to dock and then repackage it as a Freight Drone ware.

So then you can build them from your PHQ whenever you want, it won't be a mandatory feature so if someone doesn't want it they don't have to use it.

zanzal
Posts: 309
Joined: Sat, 15. Sep 12, 07:42
x3tc

Post by zanzal » Fri, 31. Jan 14, 04:22

For those that might be interested in some numbers for Drone based mining, I present the mining log:

Drone Miner Mining Log 1

It compares Drone Mining and Trading solo (with 100 drones) Ore only and Silicon only against Drone Mining and Trading with a dedicated OK Trader. Each data set uses the first 9 hours of mining in Seizwell and after each run the game was reloaded so the ore field remained the same for each test.

In both Silicon and Ore tests using the OK Traders the TL eventually hauled in more ore than the OK Trader was able to sell forcing the TL to do some trading itself. This happened much more quickly with Silicon which I think is to be expected given how much less it is used compared to ore.

The end result is that Drone Mining and Trading is significantly more efficient with a dedicated trader, but the amount of difference is what was most impressive. Using a dedicated trader was 2-3x more efficient than trading with the TL. That really isn't a bad thing since the main value of trading with the TL is that the TL can automatically dispose of any overflow that your factory can't handle, however, it also means that future versions need to focus on optimizing the trade portion of the script.

Sinnerman49
Posts: 108
Joined: Thu, 20. Sep 07, 17:00
x3

Post by Sinnerman49 » Sun, 2. Feb 14, 00:18

If I wanted to change the command slot that this script runs on, what else would I have to do aside from changing the 4 codes in the t file?

(It's conflicting with another mod I have installed)

zanzal
Posts: 309
Joined: Sat, 15. Sep 12, 07:42
x3tc

Post by zanzal » Sun, 2. Feb 14, 03:38

The file you would also need to change is scripts/setup.zanzal.droneminer.xml. You would have to change the line $key = COMMAND_X to the new command value.

BTW, which mod does it conflict with so I can add it to the compatibility report?

Sinnerman49
Posts: 108
Joined: Thu, 20. Sep 07, 17:00
x3

Post by Sinnerman49 » Sun, 2. Feb 14, 18:21

Zanzal -

I'm play testing Litcube's Universe, and his mod puts in a Marine Training command into 421, so I'm attempting to use 430.

I'm able to change the T-file in X-Studio, but when I try to change the setup script to reference "COMMAND_DRONEMINER_TRADER" it gives me a syntax error like it cannot find that command (I troubleshot this by trying to do it on a fresh install, and it worked fine, as soon as I dropped LU into the game, it no longer saw COMMAND_DRONEMINER_TRADER)

zanzal
Posts: 309
Joined: Sat, 15. Sep 12, 07:42
x3tc

Post by zanzal » Sun, 2. Feb 14, 23:20

Unfortunately, I can't offer you any advice using the in-game script editor. X-Studio is the recommend method for editing scripts. You might just try changing it from COMMAND_X to the number 430.

so maybe:

Code: Select all

$key = 430
It might work and its much easier than trying to figure out how to look up a constant in MCSI. Thank you for letting me know about the issue, I'll document the incompatibility. Will consider a compatibility patch when Litcube's Universe gets a public beta/release.

Sinnerman49
Posts: 108
Joined: Thu, 20. Sep 07, 17:00
x3

Post by Sinnerman49 » Fri, 14. Feb 14, 06:52

Got it working by changing the command to [COMMAND_TYPE_TRADE_30]

However, Litcube's Universe doesn't include the Mobile Drilling System - what logic does the Drone Miner use to bust large asteroids? Will it use missiles?

I've set it up, and let it loose, but it doesn't seem to want to do anything with me IS, OOS it will move around and it's current order is:

Killing......
Asteroid

So I know it WANTS to get it ;)

zanzal
Posts: 309
Joined: Sat, 15. Sep 12, 07:42
x3tc

Post by zanzal » Fri, 14. Feb 14, 20:35

My advice would be to not use the bust asteroids feature in Litcube's Universe until the issue can be sorted out. The script in question is plugin.zanzal.droneminer.bustroid, but I am not on the testing team for LU and don't have the time to join it at the moment.

I'll fix it shortly after LU gets a public release. Until then I recommend busting asteroids manually using missiles.

zanzal
Posts: 309
Joined: Sat, 15. Sep 12, 07:42
x3tc

Post by zanzal » Sat, 15. Feb 14, 00:25

Version 1.1.1 is now available. It adds some gate avoidance logic to the Drone Miner. Also available as an optional download, the Freight Drone Production script. For those that might want to produce freight drones at their PHQ, the Freight Drone Production script will allow you to purchase the Blueprint for 1 million cr and it will convert the Freight Drones produced by the PHQ into a ware item so that you don't have to manually dock one onto a ship.

Zaknafein
Posts: 384
Joined: Thu, 31. Mar 11, 20:48
xr

Post by Zaknafein » Sat, 22. Mar 14, 23:05

its been 2,5 months since i posted here on page 1 and i now finally had time again to play a little albion prelude.
i want to thank you for this script, its even better than i imagined! the menu is so nice structured and reasonable coloured. i also like the huge grade of automatism you put in this script, its just config once and then "fire & forget".
i know i was the one who requested an option to reduce the numbers of freight drones: i had it running for like 3 minutes and then tested it with more and more drones and ended up to 60 freight- and 20 fightdrones. its just so nice to look at and really brings life into the sector.

so thats about it, just wanted to say thank you.



/edit oh i forgot, i found a lil "bug" : i play xrm and preinstalled the requirements before i started the script. i installed a "military grade" scanner (triplex scanner). when i started the script the tl went on to buy a "improved" scanner (duplex scanner). it didnt recognize the better one. not a biggie but still worth mentioning i think.

i also have a lil tipp for german players to make this script usable without readtext errors:
open the t-file ("8101-l044") and edit the third line "language id =" from 44 to 49. then rename it to 8101-l049
Ofc ***modified***, modders doing what Egosoft cant.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”