[SCR] Condense Asteroids

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

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

Post Reply
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

[SCR] Condense Asteroids

Post by Gazz » Mon, 5. May 08, 20:55

(Das entsprechende deutsche Topic ist hier.)

[ external image ] . Condense Asteroids . [ external image ]


The universe is full of space junk. Asteroids with yield 1, yield 3... BAH.
The true micromanager must use them all but the voice of reason says you're nuts...
Besides, the FPS in the sector would be terrible if you completely mined Ore Belt. Mines are even worse than asteroids. =)

Anyone for a game of pool?
Gently push 2 asteroids into one another and hey presto - you have one bigger asteroid.
You can't push too hard because you want 1 asteroid. Not 6123461 fragments.

A simple idea. It would have been a very simple script - had I not insisted on animating this process... and allowing multiple ships to work simultaneously. Silly me.
  • Required: X3 v2.5
  • Required Equipment:
    Tractor Beam
    Mineral Scanner
    Special Command Software Mk1
What the script does:
  • There is 1 Menu Button (Piracy Menu)
    Input: Target Sector
    Input: Minimum Yield of the asteroids
  • Which asteroids your ship condenses is determined by it's freight.
    1+ units of ore and it deals with ore asteroids. You get the idea...
  • If installed, the ship uses a jumpdrive to reach the target sector.
  • Asteroids with less than the Yield you specify are ignored.
  • Every condensed asteroid costs 1.200.000 Credits.
    That is the price of the extra mine that you do not have to build.
    The advantages are better performance in the sector and an easier time building a complex.
    (Moving mines around is annoying at best.)
  • The speed at which the asteroids move is low but keep in mind that an asteroid of average "rock" density has a mass of about 8.000.000.000 tons.
  • Your ship creates asteroids with a max yield of 99.
    If that is not enough for you, edit the script. =P
  • Entering a high minimum yield prevents the ship from burning a lot of your credits but it will rarely be able to match asteroids into a perfect 99 without having access to the small ones.
    Your decision.
  • Due to the way X3 calculates the mine's productivity, combining the asteroids actually results in a small loss. 2 small mines produce a fraction of 1 yield point more than 1 big mine.
    Through the joys of X3's integer math there are no fractions .
    You can't crash 2 huge chunks of rock into one another without a few tiny bits flying off. =)
Scripts for the complex builder: ComplexCleaner v2, Condense Asteroids, Super Tractor, A.R.E.S. Station Building


[ external image ] (ZIP)

Resources used:
COMMAND_TYPE_PIRACY_56
T-File / PageID 7045
Last edited by Gazz on Wed, 7. May 08, 17:50, edited 4 times in total.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

jlehtone
Posts: 21801
Joined: Sat, 23. Apr 05, 21:42
x4

Re: [SCR] Condense Asteroids

Post by jlehtone » Mon, 5. May 08, 21:46

Gazz wrote:Besides, the FPS in the sector would be terrible if you completely mined Ore Belt. Mines are even worse than asteroids. =)
Mines alone are not so bad. Not even 90 of them. But when you do complex them ...


Nice script though. :thumb_up:


(After peak at the other thread for how you add numbers:) I guess I'll still do the vanilla for those 68 rocks behind Maelstorm. If I ever go there.
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Re: [SCR] Condense Asteroids

Post by Gazz » Mon, 5. May 08, 21:58

jlehtone wrote:Mines alone are not so bad. Not even 90 of them. But when you do complex them ...
The real fun begins when you start arranging those 6km chunks of rock. =P
(After peak at the other thread for how you add numbers:) I guess I'll still do the vanilla for those 68 rocks behind Maelstorm. If I ever go there.
I'm still debating whether to go for perfection there.
According to this thread I could calculate the projected productivity of the 2 asteroids and recreate them as the yield that would result in the combined productivity.

A small headache with integer math when yields can only be integers, too.
This kinda defeats any attempt at real perfection. =P


However - what would be reasonable is to run the combine script just like it does now but check the formula on impact to see if there would be a full "bonus yield point".
Fractions are rounded down.

Not sure if the impact of this would warrant the added work.
Just get more asteroids like with the Super Tractor script. =P
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

jlehtone
Posts: 21801
Joined: Sat, 23. Apr 05, 21:42
x4

Re: [SCR] Condense Asteroids

Post by jlehtone » Mon, 5. May 08, 22:29

Gazz wrote:
jlehtone wrote:Mines alone are not so bad. Not even 90 of them. But when you do complex them ...
The real fun begins when you start arranging those 6km chunks of rock. =P
Fun? You are talking to vanilla player. How would I know (that diameter of Mine is less than 6km as you can "easily" make a grid with 6km spacing out of them and have space in between)? :roll:
[ external image ]

Or how Ore Belt FPS would be with 90 Mines, 410 Factories and 499 CCK ...
[ external image ]
I'm still debating whether to go for perfection there.

A small headache with integer math when yields can only be integers, too.
You do have an entirely plausible reason for losing the fractions: the physical merging procedure is never perfectly lossless and small chips fall off the rubble when pounding with the Sledge Hammer. Part of the price of the convenience. Besides, if you would do fractional math, then those using Complex Calculators would have to too, instead of adding up the component yields of their one Mine.
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Re: [SCR] Condense Asteroids

Post by Gazz » Mon, 5. May 08, 22:37

jlehtone wrote:You do have an entirely plausible reason for losing the fractions: the physical merging procedure is never perfectly lossless and small chips fall off the rubble when pounding with the Sledge Hammer. Part of the price of the convenience.
Awesome! I can just as well explain that the loss is a little bit higher and completely skip all the intermediate math.
Why thank you, Sir! =P

Edit: I actually DID the math now.
A yield 1 asteroid gets a "bonus" yield of 0.835. This linearry declines to 0 for a 100 yield asteroid. Substracting the bonus you get with the new fab you can in some cases get 1 more yield out of building 2 small ones.

Nothing to lose sleep over. =)
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Thu, 29. May 08, 20:03

Version 3 released.

Bugfix.
The script was creating bugged asteroids.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Tritous
Posts: 899
Joined: Sat, 15. Jan 05, 17:20
x3tc

Post by Tritous » Sat, 2. Aug 08, 14:43

There are in fact two plausable reasons for not using this though.

a: just how many mines do you need? I calculated how many ore mines I'd need for 1AHEPT, 6BHEPT, 125MJ, 2x1GJ (which is 5 Otas reapers with a Hyperion leader every 20 hours, plus lots of 1GJ to sell as profit). And i only need ore mines....

b: in some ways more mines is better since it increases ore/sil storage space. If a ship gets excited and starts to oversell then that inertia is what keeps a complex stable. very hard to break a station that can hole 50k

I am tempted to use it through purely for asthetics: I've got a nice 4 silicon rocks (2x40, 2x42) sitting underneath my very beautiful complex...Adding too many more would mess it up so I may want to limit the number of rocks i have serving as a floor to my complex >.<
Give a man a fire, he'll stay warm for a day
Set a man on fire, he'll stay warm for the rest of his life ;)

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Sat, 2. Aug 08, 15:02

Tritous wrote:a: just how many mines do you need?
That's a reason?
b: in some ways more mines is better since it increases ore/sil storage space. If a ship gets excited and starts to oversell then that inertia is what keeps a complex stable. very hard to break a station that can hole 50k
For a single station that might apply but in a complex it's more than likely that ore using factories will add plenty of storage space.

Besides, using the Complex Cleaner mod, the storage space of mines in a complex scales up with the asteroid yield.
So even a complex of all mines does not have to suffer from that problem.
Granted, vanilla mines don't do that but then you can't use this script to begin with so... =P
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Tritous
Posts: 899
Joined: Sat, 15. Jan 05, 17:20
x3tc

Post by Tritous » Sat, 2. Aug 08, 21:57

hehe, well i use XTM, so vanilla is just a flavour to me :P. Then again, the advantage of the complex warehouses covers many of my needs.

and yes, the number of mines you need is an arguement. I was considering mining all over 20 yield in the oort cloud and realised that apart from the comedy of it...why would i want to mine 49k ore an hour and 43k silicon an hour?

Mind, if ore isn't getting used much, then not much storage is needed >.<
Give a man a fire, he'll stay warm for a day
Set a man on fire, he'll stay warm for the rest of his life ;)

User avatar
s9ilent
Posts: 2033
Joined: Wed, 29. Jun 05, 01:45
x4

Post by s9ilent » Sun, 3. Aug 08, 00:57

To Gazz- Heh, Nice picture, I have the sudden impulse to watch Spaceballs now...???

To jlehtone- How has your computer not imploded from rendering that? Let alone building it

Tritous
Posts: 899
Joined: Sat, 15. Jan 05, 17:20
x3tc

Post by Tritous » Sun, 3. Aug 08, 15:18

I'm having a little confusion here. I gathered from reading the top that the purpose of this script is to take all asteroids over a certain yield and merge them into a small number of "superasteroids" which can be mined with less mines and higher productivity.

When I try to use it I believe what is happening is it is taking the small rocks and merging them into minable asteroids but only with yields of 40. I thought the script meant less mines, not more? Am I just being as dense as a roid or is it a bug. for reference I'm OOS.
Give a man a fire, he'll stay warm for a day
Set a man on fire, he'll stay warm for the rest of his life ;)

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Sun, 3. Aug 08, 17:07

Are they even finished merging?

We're talking about rocks with a mass on a million ton scale.
Those don't move like rabbits.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Tritous
Posts: 899
Joined: Sat, 15. Jan 05, 17:20
x3tc

Post by Tritous » Sun, 3. Aug 08, 18:50

ship command console->none
audio message something like "asteroid tug autopilot off"
message log saying no more rocks with yield 40 found, total 2 small asteroids merged into larger ones or something like that.
I waited a little longer after that too, it's not moving any more, although it did some seemingly unproductive moving before that

but no apparant change to the asteroid list. Certainly no big ones, and still just the same 2x40 and 2x42 yields that were there before and that I hoped to merge.

The ship doing the merging is an argon mammoth, it has a tractorbeam, the software and mineral scanner.

Only thing I can think of is it's a huge (200km) sector, maybe it isn't recognising asteroids that far outside it's range, even through theyve already been scanned and are on the map?

hope the info helps


edit: oddly the three 80+ mines have just appeared. Does the condensing process continue AFTER the ship has finished?
Give a man a fire, he'll stay warm for a day
Set a man on fire, he'll stay warm for the rest of his life ;)

Rawn
Posts: 79
Joined: Mon, 10. Dec 07, 18:15
xr

Post by Rawn » Mon, 4. Aug 08, 11:13

yes after the message it takes much more time until the roids are finished
the ships give the roids just a "push" in the right direction

Tritous
Posts: 899
Joined: Sat, 15. Jan 05, 17:20
x3tc

Post by Tritous » Mon, 4. Aug 08, 14:59

ah, I thought when it said it was done it meant it was done, not that the ship is done but the roid isnt ;)
Give a man a fire, he'll stay warm for a day
Set a man on fire, he'll stay warm for the rest of his life ;)

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Mon, 4. Aug 08, 18:39

Well, pushing harder would result in multi million ton rocks colliding at high speeds.
You might get enough gravel to pave a road between 2 gates but no minable asteroid. =)
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Tritous
Posts: 899
Joined: Sat, 15. Jan 05, 17:20
x3tc

Post by Tritous » Mon, 4. Aug 08, 20:26

hmm, the X3 Rail Gun?
Give a man a fire, he'll stay warm for a day
Set a man on fire, he'll stay warm for the rest of his life ;)

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Mon, 4. Aug 08, 20:30

Sort of but more along the lines of "shooting a freight train at the enemy".

But why so modest? Think big, shoot planets!
ENTERING ATMOSPHERE!
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Tritous
Posts: 899
Joined: Sat, 15. Jan 05, 17:20
x3tc

Post by Tritous » Tue, 5. Aug 08, 03:41

odd you say that, I use a complex arranger script to create what looked like the most menacacing turret defence establishment ever. I decided it was either a generic "DEATH RAY" (something that stylish needs the marks, and has to be in capitals by convention) or possibly a tractor beam and I was thinking about using it to wipe out a sector or two of competition.

Alas, it was merely a few fabs, but eventually their income will allow me to do things the conventional way. Not to mention the rest of my fab, which now looks very presentable what with the minimal number of roids ;)
Give a man a fire, he'll stay warm for a day
Set a man on fire, he'll stay warm for the rest of his life ;)

Figge04
Posts: 55
Joined: Wed, 18. Dec 13, 16:59
x4

Post by Figge04 » Sat, 11. Jan 14, 21:10

Would this script work with albion prelude?

Post Reply

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