[SCRIPT] Mobile Mining / Mineral Collection Software v3.21 [UPDATED 26/8/07]

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

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

Is this script....

5 - Excellent
68
65%
4 - Good
28
27%
3 - Average
7
7%
2 - Poor
1
1%
1 - Awful
1
1%
 
Total votes: 105

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny »

Fine by me, anyone wants to host just go ahead.

Maybe I get around to getting decent online storage eventually.
User avatar
Shadow1980
Posts: 214
Joined: Sat, 8. Jul 06, 16:30
x4

Post by Shadow1980 »

My pleasure. :-)
The surest sign of intelligent life in the universe is that none of it has tried to contact us.
Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny »

Update BMS V2.34

The script has been extended to include a trading mode.

Trader miners now offer a reasonable income at the start of the game before the player has enough cash to buy a lot of sector traders. The nice thing is that later on the ships can then be switched to supply mode as player starts building factories that require minerals.

Supply Mode
The ship delivers only to its homebase. Identical behaviour to script version 2.16

Trader Mode
The ship will look to deliver to a station within a 1 jump range of the collection sector. It will deliver to NPC as well as player factories. Upon resuming collection it will check the local market for which mineral is most in demand and concentrate on just collecting that type. The pilot will take a 10% cut of the money made on a delivery to NPC facilites (the standard charge is used when delivering to player factories.)

How do I select which mode the script runs in?
Trader mode is activated by either not having a homebase or setting it to a station that does not use minerals, such as a SPP or cattle ranch etc. The only difference this makes is in where the money gets sent (player account or base)

Supply mode is set by having a home base that uses minerals as a product or resource. This means that all your ships that were running script version 2.16 will continue to function as before

The script will automatically switch mode if the homebase is changed

Notes on Trader mode
1. The ship will only look for factories in sectors that contains at least one player ship/sat/ factory i.e. is visible
2. The ship will supply to the factory with the highest demand. It does not check prices.
3. Be careful to not saturate the mineral market. Too many Traders miners will cram full every available factory in range.
4. Nividium is not collected or sold in trader mode - use supply mode to collect it.

Testing showed that 7 Mercuries in Home of Light would happliy supply the market in Argon Prime and Red Light.

As always, the script will automatically upgrade on all ships when the new files are installed.
Last edited by Bunny on Wed, 30. Aug 06, 18:17, edited 1 time in total.
User avatar
jackleonfraust
Posts: 1172
Joined: Tue, 27. Dec 05, 00:42
x3

Post by jackleonfraust »

one of my personal favorite scripts.
User avatar
DeadZone
Posts: 108
Joined: Fri, 26. Sep 03, 09:44
x4

Post by DeadZone »

Definiatly gonna give the new version a try
AcidB
Posts: 87
Joined: Mon, 8. Mar 04, 09:42
x3

Post by AcidB »

Hey, greetings.

Ive tryed this script at weekend but my ships didnt do anything. Nether my caiman miner is collecting ore nor my m3 is attacking asteriods. What did i wrong? Ive installed every need components at the ships, im able to give the orders, but the ships were doing nothing...ok nothing is a bit to strong. My orecollecters were flying directly in to the deep of the univers. after 2 or 3 ingamehours by letting them alone, ive founded out that the oreminers were fare fare away from the middle of the sector, about 150 till 200km. What did they do there? And my oredestroyer m3 was still sitting in the middle of the sector, sometimes it flews short around but most it did nothing.

Uhm did i forgot something? I dont think so....

Acid

PS: you see, im from ger. this is my best english i can give you, i hope youll understand what i mean
Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny »

Some questions:

Which sector are you trying to mine?
Do you have any satellites in the sector?
What type of scanner do the ships have?
Are the mobile mining ships running as traders or just supply ships?

The fact that the ships are flying off into deep space indicates they are desperately searching for rocks.

Last question, are you using the latest version?

[EDIT] When you mean asteroids, you mean the rocks that do not appear on the scanner right?

Here are details about how the script looks for rocks
1. Use scanner, if none found
2. Use satellites, if none found
3. Make a small random move and use scanner, if none found
4. Make a large random move and use scanner
AcidB
Posts: 87
Joined: Mon, 8. Mar 04, 09:42
x3

Post by AcidB »

Ok lets go deeper in detail.

Ive bought the caiman miner, installed the triplex scanner and the jumpdrive, all trading softwares, lets say it short ive installed everything.

My miningsector is the sector to the right from trantor (Elenas Glück in german).
Nope, i didnt installed any sats in this sector.
The miner was running as a supplyer.

Yes with asteroids i ment mineable rocks.

The problem is still existing(there).

Acid
Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny »

Okay I'll try to replicate the problem tonight.

For now I'd suggest throwing a satellite in there near the rocks (check that they have the mineral type required by your station)

Since the M3 is not attacking rocks I think the ship is not seeing them and performing random searches.
AcidB
Posts: 87
Joined: Mon, 8. Mar 04, 09:42
x3

Post by AcidB »

OK ill try it later.

Thx man.
Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny »

Last night, I ran two miners in Elena's Fortune with no satellites in the sector (both in supply mode). Both ships immediately started breaking and collecting rocks.

I think I know what the problem is.

If I understand correctly you are in the sector to the right of Elena's Fortune. That sector is Olmancketslat's treaty. This contains only asteroids that show up on the scanner (map asteroids) but no rocks.

Now this script will not attack map asteroids. This is because I found that there appears to be a problem with them not respawning when they were destroyed out of sector. So I have left the task of breaking the map asteroids to the player.

So there are two possible solutions:
1. You can break the asteroids in Olmancketslat's treaty with a mobile drilling system with single shot each. The mobile miners will then happily breakdown and collect the remaining debris.

2. You can move the mobile miners to Elena's fortune where there is already a plentiful supply of rocks.

I hope this clears up the difficulties.

However...I did find a different bug. Supply ships are trading. Just how this got past testing is a mystery. Anyway, the fix for that should be out in a day or two.

Cheers

Bunny
AcidB
Posts: 87
Joined: Mon, 8. Mar 04, 09:42
x3

Post by AcidB »

No, no i ment elenas fortune...the sector to the right of trantor. Mh...could it be that some of my installed scripts or mods make your script disfunctional?
Or should i try to install some weapons on the caimans and see what will happen?

Acid
Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny »

Yes, if the Caimans have weapons then they should break their own rocks.

But, what I do not get is why your M3 running attack rocks is not breaking any :?

Have you run the BlackRain less asteroids mod?

[EDIT] check if all the scripts have been installed in the scripts folder

BMS v2.34 should contain the following scripts

BMS.BreakRocks
BMS.CheckMineralDemand
BMS.CheckSats
BMS.DockedTasksV2
BMS.Mainscript
BMS.MineBoss
BMS.MonitorShip - included for old version compability
BMS.Restart
BMS.SellMinerals
BMS.WaitShieldRecharge - included for old version compability
gen.bunny.monitorship
gen.bunny.waitshieldrecharge
lib.bunny.clearturretcommands
lib.bunny.deploysatellite
lib.bunny.emptyscript
lib.bunny.getbestturret.pow
lib.bunny.getfreetaskslot
lib.bunny.isvalidsector
lib.bunny.randommove
lib.bunny.setpilotname
setup.bms

(now about half a megs worth :o )
Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny »

BMS version 2.40 released, the bug fix now stops supply ships from moonlighting as traders.

@AcidB
Did you finally have success?
Black Gryphon
Posts: 4328
Joined: Mon, 13. Mar 06, 00:30
x4

Similar issue...

Post by Black Gryphon »

Hi Bunny,

I had a similar issue. Had a fully kitted out Demeter Miner assigned to collect minerals for my complex in Aldana's only to have it sit there. The complex had plenty of Silicon but was down to only a few units of Ore. If I set the miner on collet rocks off it would and get a load of rocks (ore). It looks like you have a new update out so I will have to try that. Though it won't be for the Aldana complex I get fed up and added 2 L Ore mines to the complex.
Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny »

Hmm, time to put together another debug version and trawl through the logs :headbang:

Is like anyone actually happy with what their miner is doing? :|
User avatar
jackleonfraust
Posts: 1172
Joined: Tue, 27. Dec 05, 00:42
x3

Post by jackleonfraust »

i haven't found that many problems. i like it.
Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny »

Ah a mostly happy customer, thank you! :) .

This thread is showing that we have a problem here in that the complexity of this script is making it less than user friendly. So how can I solve this?.

Debug logs are not that easy to follow unless you know the internals of the script and leaving the game to figure out what a script is doing is a no no.
Plus it means fiddling with the script editor to switch the feature on.

Okay, so what about messages to the player log?. This idea maybe okay for one ship but not fifty.

The fudge solution may be to switch on log messages when the ship is carrying one unit of say warheads. That way the player can opt to see what the ship is doing in the game and also switch off the messages when they are not needed.
AcidB
Posts: 87
Joined: Mon, 8. Mar 04, 09:42
x3

Post by AcidB »

Bunny wrote: BMS.BreakRocks
BMS.CheckMineralDemand
BMS.CheckSats
BMS.DockedTasksV2
BMS.Mainscript
BMS.MineBoss
BMS.MonitorShip - included for old version compability
BMS.Restart
BMS.SellMinerals
BMS.WaitShieldRecharge - included for old version compability
gen.bunny.monitorship
gen.bunny.waitshieldrecharge
lib.bunny.clearturretcommands
lib.bunny.deploysatellite
lib.bunny.emptyscript
lib.bunny.getbestturret.pow
lib.bunny.getfreetaskslot
lib.bunny.isvalidsector
lib.bunny.randommove
lib.bunny.setpilotname
setup.bms

OhKay, ive checked the X-scriptfolder and found out, that the following files are different to yours.

BMS.SetDebugLog
BMS.FindTradeTarget

gen.bunny.waitshiprecharge


Why is it differently?

Ive installed one beta thing and one drilling thing on the caiman,started the collect ore com. will see what happen next.

And biggy big big thanks that you ve interested in your "customers", ment that you want that anything of your "product" will function ;)

Acid
Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny »

BMS.SetDebugLog -
ignore it I should have taken it out of the package. All it would do is allow you to assign a debug log file to the ship.

BMS.FindTradeTarget - This is okay I missed this out of my list :oops: .
It does the job of finding a factory to sell minerals to. It is only used in trader mode.

gen.bunny.waitshieldrecharge - forces the ship to wait after hitting a rock.

Don't forget to try the new version 2.40 or you ships will just trade the minerals to the surrounding factories.

Here is a test suggestion:
1. Put a satellite close to some rocks
2. Take an M3 amd run "Attack Rocks" in mode 1 (destroy all rocks)
3. This ship should first fly to a position in satellite range and then turn and attack some rocks (if there are some rocks close by then it will do them instead)

If this does not work then there is some fundamental problem with rock finding.

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