[MOD] Improved Station Miner

The place to discuss scripting and game modifications for X Rebirth.

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

User avatar
pilakin
Posts: 235
Joined: Sat, 16. Feb 08, 23:44

[MOD] Improved Station Miner

Post by pilakin »

Improved Station Miner

Before:

- Mining resource is decided upon absolute amounts. If your station has 1000 Plasma and wants to buy 20000 more plasma while it has 0 ions wanting to buy 15000 ions, the miner will gather even more plasma because the absolute amount of 20000 wanted plasma is bigger than the wanted 15000 ions. this strategy makes no sense however, if you need ions for your station to produce things.

- Mining location is chosen randomly within the station's system. Miners are often sent very far away in enemy territory to mine common resources like ore, which they could have mined in the station's home zone being perfectly safe.

- Miner won't unload his cargo if the homebase has zero amount of this ware in stock

After:

- Mining resources are chosen relatively. A 0/15000 resource has priority over a 1000/20000 resource.

- Miner is sent to the closest location from the base containing the resource. That being said, some resources are rare and the miner will still need to go far away, but ore is mined in the neighborhood

- The unloading issue has been resolved in a clean way

https://www.dropbox.com/s/bkae54kpxvoef ... 0Miner.zip

[ external image ]


If you're using Jey123456's Improved Traders put this file into aiscripts folder. It contains his 0.22 file extended by my additions.
https://www.dropbox.com/s/b490aeme152be ... tation.xml
Last edited by pilakin on Fri, 6. Dec 13, 10:49, edited 7 times in total.
spartanheyho
Posts: 162
Joined: Sun, 24. Nov 13, 16:06

Post by spartanheyho »

Will this conflict with jay's trade fixes?
User avatar
pilakin
Posts: 235
Joined: Sat, 16. Feb 08, 23:44

Post by pilakin »

Actually I was building it, while having his files on. So if somebody tells me, how it works on vanillish game, that would be great ^^ I'll make a link to edited version of his mining.ship.station.xml in a minute.
Frosty273
Posts: 15
Joined: Sun, 24. Nov 13, 15:34

Post by Frosty273 »

pilakin wrote:Actually I was building it, while having his files on. So if somebody tells me, how it works on vanillish game, that would be great ^^ I'll make a link to edited version of his mining.ship.station.xml in a minute.
Hey Pilakin! First off BIG KUDOS for creating this!

In terms of Vanilla, I am only running your "OverrideObstructionCheck" mod, and the "IgnoreJumpFuel" mod too, but the Improved Mining Ship mod is not working for my vessels sadly. Going to install Jays Improved Trade Mod to see if the combination clears the issue.

Thanks again! :)
Frosty273
Posts: 15
Joined: Sun, 24. Nov 13, 15:34

Post by Frosty273 »

spartanheyho wrote:Will this conflict with jay's trade fixes?
Seemingly unable to find this, looked all through Nexus or was I looking in the wrong place? Do you have a link for it?

Thanks
Frosty273
Posts: 15
Joined: Sun, 24. Nov 13, 15:34

Post by Frosty273 »

Frosty273 wrote:
spartanheyho wrote:Will this conflict with jay's trade fixes?
Seemingly unable to find this, looked all through Nexus or was I looking in the wrong place? Do you have a link for it?

Thanks
Sorry, hadn't checked the Scripts And Modding Section here on the Egosoft Forum! :shock:
Cactus_Punch
Posts: 31
Joined: Sat, 7. Dec 13, 10:16

Post by Cactus_Punch »

This works much better when mining actually works, once I assign miners to a station they will gather resources for a while then get stuck trading with the station which it shows as "trading with /%" or "trading with nil" any ideas?
User avatar
pilakin
Posts: 235
Joined: Sat, 16. Feb 08, 23:44

Post by pilakin »

Cactus_Punch wrote:This works much better when mining actually works, once I assign miners to a station they will gather resources for a while then get stuck trading with the station which it shows as "trading with /%" or "trading with nil" any ideas?
who's showing "trading with %s", the miner or the station? the mining script always shows "gathering resources in [sector]". if the miner is showing "trading with %s", it's not running the mining script any more. the manager assigned it to trade wares then.

also sometimes the miner might seem stuck at the station, but he's actually unloading the cargo. it takes veeeery long to unload 15,5k ore (a cargolifter drone carries 222 ore, so that's 70 cargo lifting trips).

also make sure your manager has enough money. it's weird but if your manager doesn't have enough money to pay for complete load, the ship will just be sitting there waiting for the manager to get money. in the end no money is transferred though, but the manager still needs to have it. i can't do anything about this, as this mechanic is hidden in a hardcoded command.
Last edited by pilakin on Mon, 9. Dec 13, 14:24, edited 1 time in total.
Cactus_Punch
Posts: 31
Joined: Sat, 7. Dec 13, 10:16

Post by Cactus_Punch »

I've made sure all those things are correct, guess its just the game being poop as usual -.-
User avatar
pilakin
Posts: 235
Joined: Sat, 16. Feb 08, 23:44

Post by pilakin »

but what does the miner tell, if you look at his captain's current commands? if it doesn't say "gathering resources in XY", it's not even running the script modified by this mod.
swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti »

My miner was also stuck because a drone was too stupid to get back in the ship... Exit sector, win!

REQUESTS:

- Smarter asteroid-search. Go towards the asteroids asked to mine, not just fly around.

- Double or triple the mining-beam range... NPC and player. Pew pew from a greater distance!

- No-clipping for drones returning to ship. Its a lesser evil to see them go thru objects then get stuck for hours
StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Post by StormMagi »

Is this compatable with the Smart Miner mod? http://forum.egosoft.com/viewtopic.php?t=351735
MOD XR Show Skills

Flying spaceships since 1993.
User avatar
pilakin
Posts: 235
Joined: Sat, 16. Feb 08, 23:44

Post by pilakin »

you guy's misjudge what this script does. it only tells the miner what to mine and in what sector. on top of that it fixes the unloading problem.

things like drones problems or actual mining AI, visible or out of zone, is not modified or touched by this in any way. yes it is compatible with smart miner. although, that script was updated last in 1.17. so don't expect too much from it.
StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Post by StormMagi »

Which was updated in 1.17 the Smart Miners mod or the XR file for mining ai?
MOD XR Show Skills

Flying spaceships since 1993.
Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Post by Vim Razz »

smart miner (0.4) was last updated in 1.17, and there may have been some changes since then with vanilla drone behavior which is giving it trouble.

If that file were up to date, though, then this mod and that mod would complement each other. They don't conflict at all.
StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Post by StormMagi »

Ah, afaik the Smart Miner only deals with the mining ship atm...
MOD XR Show Skills

Flying spaceships since 1993.
swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti »

pilakin wrote:you guy's misjudge what this script does. it only tells the miner what to mine and in what sector. on top of that it fixes the unloading problem.

things like drones problems or actual mining AI, visible or out of zone, is not modified or touched by this in any way. yes it is compatible with smart miner. although, that script was updated last in 1.17. so don't expect too much from it.
Sooooo... Can you add some more features. While i dont have any coding-knowledge, it wont take much to fix the mining.
Krunch
Posts: 54
Joined: Sun, 19. May 13, 18:44
x3ap

Post by Krunch »

Is this updated for 1.19?

Return to “X Rebirth - Scripts and Modding”