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

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

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

Post Reply

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: 1138
Joined: Mon, 1. Dec 03, 20:44
x3ap

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

Post by Bunny » Sun, 4. Jun 06, 17:37

Mobile Mining / Mineral Collection Software V3.21

This gets a ship to mine/collect rocks and deliver to a home base or trade them locally

A big thanks to co-authors Lucike and SymTec ltd..

Download hosted by Xai Corporation:
http://www.xai-corp.net/files/xaicorp/p ... s-3.21.zip

German Forum Topic

How to use it:
Give the mobile mining ship the required equipment.
Select "Collect Minerals..." in the special commands menu.
Select the worked sector to mobile mine

Script is Egosoft patch compatible 1.3 to 2.002

Modes:
The script has two modes of operation - supply or trade. The mode is determined by which home base is given to the ship

Supply Mode:
This is selected by setting the homebase to a station that uses minerals as a product or resource. The ship will supply that station only. A TL can be used as a home base but has to remain stationary with the miner is working. Also the mining ship will require a transporter device to deliver the minerals to the ship.

Trader Mode:
This is choosen by either not setting a homebase or selecting one that does not use minerals i.e SPP or cattle ranch etc. The ship will deliver to any factory in a 1 jump range of the worked sector. A check will also be made to see which mineral is in greatest local demand and the ship will concentrate on collect that type.

General Features:
- Works both in and out of sector

- Satellite deployment:
The ship will check if the rocks it finds are outside of satellite coverage. If they are then it will deploy an onboard satellite. The ship will not purchase or load satellites itself, the player has to stock the ship.

- The ship checks satellites (nav & adv) in the worked sector to locate collectable rocks within their sensor range. This is in addition to a search made with the ship scanner.

- During mining the ship will also deploy and collect navigational beacons. The name of the beacon shows the ship ID and the type of mineral it is collecting. This makes looking easy to see what the ships are doing when looking at the sector map.

- The script contains code to prevent multiple mobile mining ships from bunching up/forming convoys which would otherwise reduce collection efficiency.

- The ship ignores yield zero rocks

- If the ship is fitted with a weapon it will break up rocks for collection (unarmed ships will just collect available fragments)

- The weapon turret with the most fire power is selected for breaking rocks (front or back)

- The ship will stop and wait for its shield to fully recharge after a rock collision

- Uses a jump drive if one is fitted. Energy will be taken from the home base for a round trip (this feature is only useful in supply mode)

- A ship can be forced to collect only one mineral type by placing "Ore" or "Silicon" in the ship/homebase name. German user should type "Erz" or "Silizium" instead. Ships with a TL homebase and free traders miners with no homebase can also use "Nividium" to collect this mineral.

- A standard charge for each unit of minerals delivered to player owned factories is
1 unit ore = 13 credits
1 unit silicon = 50 credits
1 unit nividium = 1610 credits
The charge for deliveries to NPC stations is 10% of the money made.
This charge covers pilot wages and costs.

- If the ship has a problem then a message is sent to the player log.

Supply mode Features:
- Mines/Collects only the minerals carried by the home base (product or resource)
- Delivers collected minerals to home base and resumes collecting in the worked sector
- If the factory cannot pay then the ship will undock and wait in sector for 10-20 mintes before attempting to unload the cargo again.

- If a delivery to the home base fails to empty the cargo bay to less than 90% full the ship will wait in the home sector for 10-20 mins
before attempting to deliver to the home base again. This prevents camping in docking slots and allows the station to use up minerals. The ship will resume collection after a successful delivery.

- Balanced collection of all minerals that a station uses (ore/silicon/nividium). This means if the station has more than 90% full stock of one mineral then ships will concentrate on collecting the other types that are required. If a station has all mineral stocks levels above 90% then the ship will wait in the home sector till they fall below this limit.

- Ships with a TL homebase will collect silicon and ore in balanced amounts. This behaviour can be overriden by placing "Ore", "Silicon" or "Nividium" in the mining ship name.


Trader mode Features:
- The ship checks which mineral is in greatest demand in a 1 jump radius and will mine the required type.
- The ship finds and delivers to the factory that requires the most units of mineral (Player and NPC factories covered).
- The ship will continue to deliver to factories until it is empty before resuming mining.
- Ore and silicon is collected and sold, nividium is not (market is too small for effective trading - use supply mode to collect nividium).

Required equipment
- Ore collector
- Mineral scanner
- Special commands software
- A weapon (if the ship is to mobile mine rather than just collect)
- Transporter device if home base is a TL

Optional equipment
- Jump drive
- Triplex scanner (Improves search capability)
- Satellites
- 25MW shields (In sector mining can be risky)

Version History
3.21 - Minor change to t and setup file
3.20 - Minor bug fix for messsage requesting rock breaking assistance
3.16 - Messages improved
- Bug fix - free trade ships will now no longer check for local mineral
demand if the ship name contains an override word ("Ore", "Silicon"
or Nividium")
- Ships will message for assistance if they are unable to break rocks
(unarmed collection craft)
- Miners with a TL homebase can now forced to collect a specific
mineral by using ship name overrides (ore, silicon and nividium
supported)
3.08 - Frequency of "Cannot find rocks" message reduced to one per 15
minutes or longer.
3.07 - Devnet version
3.06 - Rock search routine bug removed (back to 2.75 performance level)
- Damaged code in lib.by.randommove repaired
- A ship can be forced to collect one type of mineral by placing "Ore"
or "Silicon" in the ship name
3.02 - Balance collection bug removed.
3.00 - Script restructured by Lucike and SymTec ltd.
- TL as home base option
- Navigational beacon use
- Improved interface
2.75 - Diagnostics script added (can be run from the SE for trouble shooting)
- Minor bug fix to trader mode. Demand is now checked relative to worked sector rather than current one.
2.71 - Trade mode bug fixes
- Improved balanced collection of minerals
- Messages are now sent to player log if the ship experiences difficulties (more user friendly)
2.40 - Bug fix - supply ships were trading
2.34 - Trader mode added
2.16 - Satellite deployment added
- Turret commands are automatically cleared when the script starts
- Ship switches more frequently between collecting and mining rocks
2.06 - Feature - Balanced collection fixed
- Bug fix - Search of sector with no satellites
- Bug fix - Nividium collection
1.95 - Bug fix - ship were not shooting rocks if the sector had no satellites or only had the required rocks out of satellite range
- Balance collection of all mineral combinations
1.88 - Shield recharge waiting added + balanced collection of ore and silicon for a complex
1.74 - Mobile mining capability added
1.60 - Jump drive ships carry a 60 energy cell reserve
1.54 - Original release

Trouble shooting

If the ship has a problem then it will send a message to the player log. Here is the list of messages and suggested corrective action:

Message - "Cargobay of mining ship [SHIP] in [SECTOR] is over 90 precent full - waiting 10-20 mins"
Reason - This is displayed after the ship failed to deliver enough to it's homebase (supply mode).
Action - Check to see if the station has enough money and there is space for the ship's cargo on the station.

Message - "Homebase [STATION] of mining ship [SHIP] has no demand for minerals"
Reason - This could occur in supply mode when the station has more than 90 % capacity in all mineral stocks.
Action - See why the station is not using the minerals stock.

Message - "Mining ship [SHIP] cannot find [MINERAL] in [SECTOR] - large search started"
Reason - The ship could not find a rock with the required mineral type within range of the ship and satellite scanners
Action - Place satellites in the sector and check they cover rocks with the required mineral type.

Message - "Mining ship [SHIP] cannot find any useful rocks in [SECTOR] - large search started"
Reason - See previous message
Action - See previous message

Message - "Mining ship [SHIP] sees no demand for minerals in local market [SECTOR] - mining aborted"
Reason - This is a trader mode message that is triggered when there are no mineral using stations in the worked and neighbouring sectors. It is usually triggered by a lack of viable factories rather than saturated mineral stocks.
Action - Check if there are still any factories to trade to and see if they are full of minerals. Relocated the trader miner to another sector and restart the software.

Message - "Mining ship [SHIP] in [SECTOR] can find no factory to trade to - waiting 10-20 mins"
Reason - See previous message
Action - See previous message

Message - "Homebase [STATION] has insufficient credits to pay pilot of ship [SHIP] - waiting 10-20 mins"
Reason - This supply mode message indicates the station in question is broke.
Action - Give the station money

Message - "Station [STATION] did not have enough money to pay trader miner [SHIP]"
Reason - A trader mode message that a deliver of minerals to a player station has been stopped due to station not having enough cash.
Action - Give the station money

Message - Mining ship [SHIP] in sector [SECTOR] is unable to break rocks. Please send assistance
Reason - Unarmed collection ships will send this message if they have found suitable rocks which are not broken up enough.
Action - Break the rocks yourself or send a ship running "Attack Rocks" script to do the job.


Additional Notes

- This script does not create or destroy rocks directly. All of that is done by the game with weapons fire alone, both IS and OOS.
- This script can improve frame rate in rocky sector after several game hours. Entire sectors can be cleared with enough ships and time
- Map asteroids will not be mined, only rocks. Break the asteroid to mine it.

Recommended mining ship - Caiman Miner
1. It has multiple weapon slots that give it plenty of fire power (breaks rocks more quickly both IS and OOS).
2. The ship does not appear to get trapped in in sector rock respawns (Mercurys suffer badly from this problem)*
3. In sector mobile mining performance is better compared to other TS ships.

Weapon comments
IREs - Weak but accurate - IS and OOS rock breaking is slow
PACs - Reasonable power and accurate - Recommended
HEPTs - Very Good, if you can get them to fit in the ship
PSGs - Not recommended - Overkill and has a high risk of friendly fire and collateral damage
Mass Drivers - Powerful but needs ammo
Ion Disruptors - No effect on rocks

Mobile Drilling System - Great OOS/IS rock breaking performance. The rocks that get accidentally destroyed in sector will respawn latter.

The attack rocks script can also be used on fighters to help mobile mining ships concentrate on collecting rather than mining. Fighters break rocks faster than freighters.
Last edited by Bunny on Sun, 26. Aug 07, 13:21, edited 96 times in total.

Underz
Posts: 137
Joined: Thu, 3. Nov 05, 19:17
x3

Post by Underz » Sun, 4. Jun 06, 17:45

Just wondering, can you drop the minerals off at trading stations you own?

Bunny
Posts: 1138
Joined: Mon, 1. Dec 03, 20:44
x3ap

Post by Bunny » Sun, 4. Jun 06, 17:50

Should work - The script checks if the base has the mineral as product or resource. So you can boost mine production or supply a factory.

I'll check this....

Yes it works

User avatar
jackleonfraust
Posts: 658
Joined: Tue, 27. Dec 05, 01:42
x3

Post by jackleonfraust » Tue, 6. Jun 06, 20:48

How about TL ships?

Bunny
Posts: 1138
Joined: Mon, 1. Dec 03, 20:44
x3ap

Post by Bunny » Wed, 7. Jun 06, 10:41

jackleonfraust wrote:How about TL ships?
TL ship doing the collecting? - No, the ship needs a home base

TL ship as a home base? - No, the base has to handle minerals as resource/product or both.

Risky
Posts: 850
Joined: Mon, 29. Mar 04, 15:24
xr

Post by Risky » Wed, 7. Jun 06, 11:06

Sounds good. So I can jump into the ship blast a few rocks and then set it to collect and deliver while I go back on with my business.

Could be a case for a stock mine complex (just one Ore and one Silicon) as a homebase.

Does the script message you when it runs out of rocks?

Bunny
Posts: 1138
Joined: Mon, 1. Dec 03, 20:44
x3ap

Post by Bunny » Wed, 7. Jun 06, 11:41

At the moment the script will not send a message when no more collectable rocks can be found. I did not want people getting bombarded by messages.

However, if you see the ship moving far out of satellite range then that indicates it cannot find rocks and is making a manual search. This is a good time to smash up rocks the ships needs.

Bunny
Posts: 1138
Joined: Mon, 1. Dec 03, 20:44
x3ap

Post by Bunny » Sun, 11. Jun 06, 13:52

Ships now mobile mine both in and out of sector 8)

You need never shoot a rock ever again :wink:

A Team
Posts: 193
Joined: Sat, 29. Jan 05, 22:35
x3

Post by A Team » Wed, 14. Jun 06, 17:56

the download links are not working for me

Bunny
Posts: 1138
Joined: Mon, 1. Dec 03, 20:44
x3ap

Post by Bunny » Thu, 15. Jun 06, 14:09

:? Are you still having a problem there, they seem fine here today.

BlueSabor
Posts: 120
Joined: Tue, 27. Jul 04, 19:41
x4

Post by BlueSabor » Thu, 15. Jun 06, 16:02

A Team wrote:the download links are not working for me

Same here. :(

A Team
Posts: 193
Joined: Sat, 29. Jan 05, 22:35
x3

Post by A Team » Thu, 15. Jun 06, 17:03

still not working

Bunny
Posts: 1138
Joined: Mon, 1. Dec 03, 20:44
x3ap

Post by Bunny » Fri, 16. Jun 06, 10:09

Weird, okay try these (v1.74b)
Release version
mirror 2
mirror 3
mirror 4

Debug version
mirror 2
mirror 3
mirror 4
Last edited by Bunny on Sun, 18. Jun 06, 17:28, edited 1 time in total.

User avatar
Krim
Posts: 77
Joined: Tue, 6. Apr 04, 00:10
x4

Post by Krim » Fri, 16. Jun 06, 14:55

Could u make a SPK version?

A Team
Posts: 193
Joined: Sat, 29. Jan 05, 22:35
x3

Thanks

Post by A Team » Fri, 16. Jun 06, 15:13

Thanks mirror 2 works fine. mirror 1 still not working for me though

Post Reply

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