[WIP] XaiCorp. Automining *Betatesters required*

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

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

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

[WIP] XaiCorp. Automining *Betatesters required*

Post by moggy2 » Sat, 25. Mar 06, 06:18

Download | Submit Bug | Request Feature | Readme

Script : Xai Corporation AutoMining for X3
Version: X3.0.1
Download : http://www.xai-corp.net/project/XaiCorp-AutoM
Documentation: Online Readme
Author : Dr Xavia
E-mail : doc@xai-corp.tk
Desc. : Automated Mobile Mining

_____________

2 commands:
  • Station Supply Miner
    Automated Mobile Miner
The commands works while the player is present or in oos.

If this works correctly then it should be possible to build a fully automated miner from the component scripts.

While writing this I noticed a number of strange things going on, such as destroyed or collected rocks still existing but not visible, and collection the same rock over and over again(that explains how egosoft's script appears to continue to mine debris out of sector while not actually containing any commands to fire the guns :) ). I've put in some work arounds but they need to to be tested over a period of time to make sure it doesn't upset the game.

This is a beta version and probably clashes with some other script, I haven't checked.

Download | Submit Bug | Request Feature | Readme
Last edited by moggy2 on Tue, 28. Mar 06, 00:58, edited 1 time in total.

Electric_Kola
Posts: 1882
Joined: Sun, 29. May 05, 21:10
x3tc

Post by Electric_Kola » Sat, 25. Mar 06, 06:23

Thanks moggy, been waiting for something like this.

Now I just have to buy a new copy of the game to try out this and all the new scripts :(
"There must be a finite number of inhabited worlds. Any finite number divided by infinity is as near to nothing as makes no odds, so the average population of all the planets in the universe can be said to be zero, From this it follows that the population of the universe is also zero, and that any people you may meet from time to time are merely the product of a deranged imagination" - Douglas Adams

metalvenom
Posts: 250
Joined: Tue, 15. Nov 05, 00:15
x4

Post by metalvenom » Sat, 25. Mar 06, 16:16

this is great news:) on of the aspects of x3 i'd really like to do is become a miner and have a fleet of miners working for me.
i hope you can get this to work with just a freighter miner (no station required) so i can have them collect till full shooting rocks themselves then message me that they are full and ready to sell:)

thanks and good luck

D_Zorro
Posts: 2027
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by D_Zorro » Sat, 25. Mar 06, 16:27

yo got yourself another tester. :twisted: :D been looking for something like this too.


DZorro,
System spec: Pentium (R) D 2.66 Ghz, Ram : 2048 DDR, HD : 250 GIG 7200 RPM intern 8 MB cash
Videocard : Nvidia Geforce 8800 GTS 320mb : Realtek
Laptop : AMD athlon 64 3200 + 1024 DDR 80 gig HD Conexant AMC Audio, Ati mobility Radeon Express 200

Fus
Posts: 83
Joined: Sun, 20. Nov 05, 18:37
x4

Post by Fus » Sun, 26. Mar 06, 14:46

I'll give it a go, I have two miners collecting rocks in Siezewell, I'm hoping to have 10 .. why ? ... to improve the framerate of course :D

Everytime I fly through the sector in my Elephant i spend a few minutes carving up the smaller roids for my miners.
I have never seen a miner use the mobile drilling kit so I keep one on the El for my own gratification :)

One thing I would like to know, what does a miner do when the hold is full ? Havn't got that far yet as I keep telling them to dock with my factories.
( It was a complex hub with 7 facs but has been more profitable since I sold the hub :)

User avatar
al_main
Posts: 1379
Joined: Wed, 6. Oct 04, 10:26
x3

Post by al_main » Mon, 27. Mar 06, 00:56

I dont think u'll be able to do that to improve the framerate. I tried something similar in Antigone Memorial where my complex is. Went round breaking up LOTS of rocks for collection - They simply respawn so that instead of one big rock you get one big rock with most of the field from the last time you broke it up still there around it. You just end up with MORE rocks. ie for every rock you break up it will respawn and so u'll still have the big rock but with lots of smaller ones around it if your TSs havent collected them up before it respawns.

The result:
I have many of these strange 'big rock with lots of little rocks around it' formations and two entries in my log saying "Your ship has been destroyed in sector Antigone Memorial by Asteroid". I've now given up on that. Though my collectors did collect quite a bit of Ore/Silicon, although its impossible to say how much as I kept transferring it into my complex. As one that got destroyed was a dolphin super freighter from nearby Kingdoms End I'd suspect they didnt collect enough to cover the ship costs....

Fus
Posts: 83
Joined: Sun, 20. Nov 05, 18:37
x4

Post by Fus » Mon, 27. Mar 06, 01:03

lol, Siezewell is now a minefield, I too keep stealing their collected wares but one of the ships has managed to collect Nividium, any ideas where I can cash this in ?

User avatar
al_main
Posts: 1379
Joined: Wed, 6. Oct 04, 10:26
x3

Post by al_main » Mon, 27. Mar 06, 01:18

One trading dock in Teladi Space (Think Mines of Fortune?)

Or Jumpdrive Construction Fabs if using LV's Jumpdrive kits

Or get my Nividium Demand increase script (extra nividium selling places)

Or put in a ship then sell for half price at a shipyard

(Depends how much you've got :D )

AL

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 » Mon, 27. Mar 06, 01:59

I think the paranid will buy the Nividium.

One of the things I'm wondering about is whether the debris mined by this script respawns. Since picking up rocks, or shooting them doesn't actually destroy the debris object, and in the case of shooting them creates several new objects, this script manually deletes the object once it's been collected or shot. I don't know if this is a bug or part of the repsawning process but a) it caused problems targeting the debris, and b) I went from 0 debris to 63 debris objects in a 2.5km range in a short space of time. I was worried that long term usage would bring the game to a grinding halt if I didn't remove them once they'd been used.

User avatar
al_main
Posts: 1379
Joined: Wed, 6. Oct 04, 10:26
x3

Post by al_main » Mon, 27. Mar 06, 02:14

I'd remove them otherwise this will happen...
al_main wrote:I dont think u'll be able to do that to improve the framerate. I tried something similar in Antigone Memorial where my complex is. Went round breaking up LOTS of rocks for collection - They simply respawn so that instead of one big rock you get one big rock with most of the field from the last time you broke it up still there around it. You just end up with MORE rocks. ie for every rock you break up it will respawn and so u'll still have the big rock but with lots of smaller ones around it if your TSs havent collected them up before it respawns.

The result:
I have many of these strange 'big rock with lots of little rocks around it' formations and two entries in my log saying "Your ship has been destroyed in sector Antigone Memorial by Asteroid".

alphalvr
Posts: 1540
Joined: Sun, 13. Nov 05, 18:19
x3ap

Post by alphalvr » Mon, 27. Mar 06, 02:31

if it does automining why the need for betatesters....its automaticc :P sorry beer talking :thumb_up:

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 » Mon, 27. Mar 06, 03:31

alphalvr wrote:if it does automining why the need for betatesters....its automaticc :P sorry beer talking :thumb_up:


:P because if you don't check thoroughly what it's actually doing you may find that's it's been doing things it shouldn't have been and as a consequence end up being at war with the spaceflies! Now we wouldn't want that to happen now would we :wink:

ragamer
Posts: 523
Joined: Wed, 6. Nov 02, 20:31
x4

Post by ragamer » Wed, 29. Mar 06, 22:08

Moggy... If you destroy the entity that "find debris" returns, you are messing up the hicherarchy (they are groups of rocks)

In your "plugin.Xai.AutoM.collect.xml" remove the destroy instruction (catch instruction already removes the rock) and instead add a loop on the single debris object with the condition:

while $debris -> has collectible rocks
$ammount = [THIS] -> catch ware object $debris
$total=$total + $ammount
end
return $total

I did and works like a charm

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 » Wed, 29. Mar 06, 22:35

ragamer wrote:Moggy... If you destroy the entity that "find debris" returns, you are messing up the hicherarchy (they are groups of rocks)
...

I did and works like a charm
except in oos where the catch command doesn't remove the rock and you end up just picking up the same few rocks over and over until the cargobay is full.

I'm not sure about the hierarchy either. It's what I initially assumed but now I'm not so sure. It's all a little wierd. Much more testing needed.

ragamer
Posts: 523
Joined: Wed, 6. Nov 02, 20:31
x4

Post by ragamer » Wed, 29. Mar 06, 22:48

Mmm OOS... true, but Standard Egosoft command does only a catch order... Mmm... I haven't checked if the density of the fields are diminished when OOS. I will.

ragamer
Posts: 523
Joined: Wed, 6. Nov 02, 20:31
x4

Post by ragamer » Fri, 31. Mar 06, 13:37

K... I have continued investigating. Using catch ONLY OOS works flawlessly also.

I accidentaly discovered something very important when I was testing your script in conjuction with my turret script... The mysterious flag 32768 used at find debris forces the instruction to RETURN ONLY THE DEBRIS THAT HAVE COLLECTIBLE ROCKS...

...To be perfect now I only need to find if there is a similar flag to return ONLY the debris that DO NOT have collectible rocks and everything we need to do automated mining efficient scripts will be there.

Jakesnake5
Posts: 2880
Joined: Fri, 17. Feb 06, 04:55
x4

Post by Jakesnake5 » Fri, 31. Mar 06, 14:57

Sounds good.

Think I'll give this a whirl in Hellena's, as I hava a sili mine there.

ragamer
Posts: 523
Joined: Wed, 6. Nov 02, 20:31
x4

Post by ragamer » Sat, 1. Apr 06, 14:20

K... the last few tips on my investigation:

- "Find Debris". Do not evaluates properly distances to middle sized debris. If you use the Find.Nearest flag, find ignores bigger Debris that are nearer than smaller ones. Seems like internally it adds the Debris size to the distance magnitude or something because if you switch to Find.Random, the bigger ones are selected (so they are considered Debris)

- "[THIS] -> is target $target in firing range of turret $turretid". Seems like, again, the internal mechanics have problems meassuring the distances accurately to Debris & you can have TRUE results while in fact, the weapon range is not enough to reach the target (OFC the tests were made with a SINGLE weapon mounted to be sure that only 1 weapon range was tested).

[UPDATE]
I have played a bit more using the interface to meassure distances to debris and the things are funny:

- "[THIS] -> get distance to $debris". Returns a lower value than it should... if I ADD to this result the object size ("$debris -> get object size") I get a more accurate value (all the time I shoot using the "corrected" distance I land the shot.

Jakesnake5
Posts: 2880
Joined: Fri, 17. Feb 06, 04:55
x4

Post by Jakesnake5 » Sat, 1. Apr 06, 17:24

Getting a 'ReadText2010-421 [ReadText2011-421]' in the Trade command list.

It does a little picking up while IS, but not much. It acts like its after something, but after picking up 2 rocks, it doesn't seem to be able to get the rest.

Did right fine to start. Rolled up to the selected rock (demeter haule), whipped around, fired the mining laser, then picked up 2 pieces before it started acting confused.

OOS, thats another matter. With the 'Collect Rocks' the rocks would only be picked up every 10-20 seconds. The autominer was getting the 'collectable' pieces ever second.

I think the IS problem is cause by the collectable pieces being too close to the uncollectable bits of the rock that was broken up.

Still, its not having ME to break them up thats nice.

Also, watching the ship OOS shows it not moving (similar to Collect Rocks). I'm doing the experiment in Aladna Hill, and I parked an Ore mine there, and used the Trade Command for it.

Going to jump IS to see if it does anything strange. :D

Jakesnake5
Posts: 2880
Joined: Fri, 17. Feb 06, 04:55
x4

Post by Jakesnake5 » Sat, 1. Apr 06, 17:51

OMFG!! :o

Ok, we have a SERIOUS bug with OOS automining. I can't even properly DESCRIBE it. Its ugly, very bad.

Give me a few and I'll post the screenies (once I shrink them from 5meg each that is).

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