Want to force asteroid to fragment into exactly 1 subroid

I want to make a certain type of asteroid always fragment into exactly 1 subroid when it is destroyed. Does anyone know how to do this?

I tried giving it FragCount 1, but then it never fragments at all. I tried giving it FragCount 2, but then sometimes is fragments into 1, sometimes into 2, and sometimes into 3 subroids. That behavior with FC2 is to be expected from the NB description (±50% of FC) but from that I would also expect FC1 to give always exactly 1, which does not appear to be the case, rather disappointingly. Ideas?

@qaanol, on Oct 17 2010, 09:40 PM, said in Want to force asteroid to fragment into exactly 1 subroid:

I want to make a certain type of asteroid always fragment into exactly 1 subroid when it is destroyed. Does anyone know how to do this?

I tried giving it FragCount 1, but then it never fragments at all. I tried giving it FragCount 2, but then sometimes is fragments into 1, sometimes into 2, and sometimes into 3 subroids. That behavior with FC2 is to be expected from the NB description (±50% of FC) but from that I would also expect FC1 to give always exactly 1, which does not appear to be the case, rather disappointingly. Ideas?

http://gabeswebsite....double_take.gif

Qaanol needs help? Someone come, quick!

Can you use a special ship using an asteroid graphic that launches one escape ship upon death? The escape ship could also look like an asteroid. Both could have no turn ability whatsoever and also be non-targetable so they act like asteroids. The only problem would the be the radar blip and the sound as the escape ship leaves.

@oryhara, on Oct 17 2010, 10:18 PM, said in Want to force asteroid to fragment into exactly 1 subroid:

Qaanol needs help? Someone come, quick!

That is what is considered an unacceptable and useless response. If you have something helpful to say, that's great.

Anyways

@Qaanol:
Have you tried extensive testing with FragCount 1? Its possible that the nova engine is doing integer division and simply coming up with 0 or 1 subroids, and somehow getting 0 subroids for both results. The only other suggestion I would have would be to mimic the behaviour with a ship (super-roid) that has a bay that ejects another ship (sub-roid) and both ships act like asteroids (krypt pod behaviour with high speed but minimal acceleration, thus when you blast them, they move if they aren't destroyed).

Edit:
@DarthKev:

I'm not sure about the AI's tendency to launch "Escape Ship"-capable carried ships on death. I know you can make escape pods launch and fade into the background, but that's just cosmetic.

The main issue with this approach is controlling when the first ship launches the second ship. It would need to have a strong trader AI I guess, but also neutrally aligned with the player govt-wise so it doesn't attack until the player shoots it. It would also need a "can't be targeted" flag and really weak armour.

This post has been edited by LNSU : 17 October 2010 - 09:41 PM

@lnsu, on Oct 17 2010, 09:38 PM, said in Want to force asteroid to fragment into exactly 1 subroid:

Have you tried extensive testing with FragCount 1? Its possible that the nova engine is doing integer division and simply coming up with 0 or 1 subroids, and somehow getting 0 subroids for both results.

I expect it’s doing something like this, using integer division:

int GetFragCount(int fragcount = 0){
fragcount = max(0, fragcount);
int min_frags = fragcount / 2;
int max_frags = 3 * min_frags;
return RandInt(min_frags, max_frags);
}

Where RandInt does what you think it should. That is, the problem is, I suspect, using three times the minimum to get the maximum. I could be wrong on that, but the point is in my testing, FragCount 1 results in no fragment asteroids ever appearing.

I don’t want to use a shïp for this.

If you don't need the subroid to break into a subroid itself, you could just make all versions of the subroid identical.

@joshtigerheart, on Oct 18 2010, 10:36 AM, said in Want to force asteroid to fragment into exactly 1 subroid:

If you don't need the subroid to break into a subroid itself, you could just make all versions of the subroid identical.

Indeed, that was the idea. A single roid that, when you blast it, every once in a while spits out a scoopable commodity box, and the asteroid remains intact (by fragging into an identical copy of itself) so you can keep mining the “same” roid for a long time (with the possibility of slight modifications so it will eventually get smaller and then disappear, or just eventually become “mined out” and indestructible).

The problem is, FragCount 1 does not work, it is equivalent to FragCount 0. This is definitely an engine bug, as when Nova and the Nova Bible don’t line up, the bible is right and the program is wrong. And if I use FragCount 2 then more often than not the asteroid multiplies when destroyed.

Maybe you could go with the multiplying asteroid bit, make the asteroid's graphic look like a giant fuzz ball, and call the commodity Tribbles. Other than that, I don't know what to suggest. There's no way for any of us to fix this bug and I highly doubt ASW would be willing to fix it and release an update.

@lnsu, on Oct 17 2010, 10:38 PM, said in Want to force asteroid to fragment into exactly 1 subroid:

Edit:
@DarthKev:

I'm not sure about the AI's tendency to launch "Escape Ship"-capable carried ships on death. I know you can make escape pods launch and fade into the background, but that's just cosmetic.

I've seen it work just fine in SFA. Both the Federation and Klingon capital ships have shuttles which launch on the breakup of the mothership.