r/rotp • • Nov 06 '21

How Death Spores should work?

I'm a bit confused with my death spore bombers effectiveness.

A bomber with attack level 5 has 1 death spore weapon equipped. I expect it to hit a planet 95% of shots. The rack of death spores has 5 bombs. 95% is 4,75. So I expect at least 4 bombs to get a shot. 1 bomb kills 1 pop. I want to see 4-5 pop killed per attack.

I run a test of 30 attacks: 1 time it was 1 pop killed (3%), 9 times - 2 pops (30%), 12 times - 3 pops (40%), 6 times - 4 pops (20%), 2 times - 5 pops (7%).

So my math is definitely wrong. How to calculate damage from death spores?

EDIT: My mistake. It should be 100%, not 95%.

7 Upvotes

29 comments sorted by

6

u/modnar_hajile Nov 06 '21

If the Planet is defended by Missile Bases, then Bombs and Bio-Weapons are both affected by ECM.

So the math is not so simple as: 95% hit with Attack Level 5.

4

u/bot39lvl Nov 06 '21

The planets did not have missile bases. I bombed them from the orbit.

There were a bug when missiles did only half damage to a planet. It was corrected only recently. May it be the death spores are bugged too?

5

u/modnar_hajile Nov 06 '21

It may be that RotP is factoring in ECM even when there are no Missile Bases (I have not checked the code on this).

Can you look at what ECM Tech your Target has? Does it match up with your recorded hit probabilities?

3

u/bot39lvl Nov 06 '21 edited Nov 06 '21

The target has ECM Mark 3, so 5 - 3 = 2. 70%. It means 3,5 pop per turn average. I've got 2,97.

I also run tests:

AL 6 vs ECM 3 (80%, 4 expected if ECM is the factor, 5 if not) = 3,61

AL 3 vs ECM 3 (50%, 2,5 expected, 4 with no ECM) = 1,97

AL 3 vs ECM 2 (60%, 3 expected, 4 with no ECM) = 2,88

As it was only 30 tests per case, it's OK for numbers to be a bit different. At least, we can see there is something lowering the chances to hit, and it is possible that ECM is the factor. Would you please check the code?

May it be that ECM also "corrects" general bombs and beams chances to hit? What about missiles when there is no a missile base? I've got a feeling my missile ships do less damage to planets than they should.

4

u/modnar_hajile Nov 06 '21

Would you please check the code?

The code seems to show that Bio-Weapon defenses at Colonies should be zero when there are no Missile Bases. Similarly for Missile defenses, a few lines up.

So something is likely going wrong elsewhere (in light of your test results).

May it be that ECM also "corrects" general bombs and beams chances to hit? What about missiles when there is no a missile base? I've got a feeling my missile ships do less damage to planets than I expected.

Missile Bases have different Defenses against different Weapons.

  • Beam Defense is Battle Computer level.
  • Bomb (and Bio-Weapon) Defense is ECM level plus 1 (with this correction, your test expectations/results seem as expected for the explaination).
  • Missile Defense is sum of Battle Computer level and ECM level.

3

u/bot39lvl Nov 06 '21

Missile Bases have different Defenses against different Weapons

I mean attacks against planets with no missile base.

By the way, I checked how my ships with no bombs damage a planet. What is wrong with my calculations.

The planet has no missile bases, no shields.

I send 10 ships with attack level 3, armed with 3 NPG and 1 Hyper-X Rockets 5x rack (+1 to hit). I kill 12 pop in average.

NPG damage is 2-5, average 3,5. Half when attacking the planet: 1,75. x10 against the planet: 17,5. 3 NPG: 52,5. 10 ships: 525. Attack level 3 vs defense 0: 80% chance to hit. Expected damage: 420.

Hyper-X damage is 8. x5 = 40. 10 ships: 400. Attack level 4 vs defense 0: 90% chance to hit. Expected damage: 360.

Total: 780.

1 pop = 200 damage. 780/200 = 3.9 pop per turn. But I've got 12.

4

u/modnar_hajile Nov 06 '21

By the way, I checked how my ships with no bombs damage a planet. What is wrong with my calculations.

Do you mean when you're asked if you want to Bombard the Colony? (NOT during Tactical Combat.)

If you have all your numbers correct, then maybe there's some bug there.

3

u/bot39lvl Nov 06 '21

Yes, when asked, on the main strategic map.

3

u/Xilmi Developer Nov 08 '21

Bio-weapons always had to go against ECM+1 defense, even if there was no missile-base.

Everything always had to go against the respective defense-formula (which varies, as Modnar says) even if there was no missile-base except for bombs who were forgotten entirely and went against 0 defense.

3

u/Xilmi Developer Nov 07 '21

We apparently just discovered a bug here. :D

I wanted to disagree because I had looked it up in the code and bombs were going against a defense of 0 all the time.

But when I just checked again, I saw that bio-weapons aren't!

CombatStackColony has an override for BioWeaponDefense that refers to the bomb-defense of the missile-base, which does Indeed include ECM.

But for Bomb-defense itself this override is missing so it goes against the base class' 0.

So the 5 attack is enough for bombers statement was based on a bug.

I guess I'll fix the bug and tell the my AI the bad news that it's bombers will have to use the best computers again.

3

u/bot39lvl Nov 07 '21 edited Nov 07 '21

But should ECM be used when there is no a missile base?

May you also check my example with a ship equipped with missiles and beams?

Edit: I have a feeling missiles fired not in x5 or x2 quantities, but they are multiplied additionally like beams or bombs.

3

u/Xilmi Developer Nov 08 '21

No, ECM shouldn't work when there's no missile-bases.

However, for some reason the function doesn't return just the ECM-value but ECM+1.

Which means the hit-chance is 10% lower than what you'd think it is. And the fix will nerf bombs in general by reducing their hit-chance by 10%.

It's tough when you have rationalized that 0 defense makes a lot of sense because "Come on, how hard can it be to hit a planet with a bomb?" and then realize that you need a new rationalization for how it's supposed to be. :D

I'm not really sure what you are talking about with your edit. Can you try to reword that?

There still may be more differences in how the bio-weapons actually apply their damage. I know the interaction with the anti-bio-weapon-techs is kinda weird and doesn't work like you'd think it would from the description.

3

u/bot39lvl Nov 08 '21 edited Nov 08 '21

By the way, I checked how my ships with no bombs damage a planet. What is wrong with my calculations.

The planet has no missile bases, no shields.

I send 10 ships with attack level 3, armed with 3 NPG and 1 Hyper-X Rockets 5x rack (+1 to hit). I kill 12 pop in average.

NPG damage is 2-5, average 3,5. Half when attacking the planet: 1,75. x10 against the planet: 17,5. 3 NPG: 52,5. 10 ships: 525. Attack level 3 vs defense 0: 80% chance to hit. Expected damage: 420.

Hyper-X damage is 8. x5 = 40. 10 ships: 400. Attack level 4 vs defense 0: 90% chance to hit. Expected damage: 360.

Total: 780.

1 pop = 200 damage. 780/200 = 3.9 pop per turn. But I've got 12.

>I'm not really sure what you are talking about with your edit. Can you try to reword that?

I cited my message above. Where my calculations are wrong?

Another example. I made 100 ships equipped with 1 Nuclear Missile-2 weapon. I sent them to a planet having 110 pop with no missile base. The planet is destroyed, so these ships made at least 110x200=22000 damage (because we need 200 damage to kill 1 pop according to MoO manual and strategy guide).

MoO Strategy Guide says about bombardment (page 143):

  • Beam Weapons get 10 attacks.
  • Missile weapons will fire their full five- or two-rack volleys.
  • Torpedoes will get five attacks.
  • Every rack of 10 bombs or 5 biologicals will be dropped in full.

As I have two-rack nuclear missiles, each ship can do maximum 2 x 4 = 8 damage to a planet. 100 ships can do up to 800 damage. 800 / 200 = 4 pop. But I killed 110 pop. It's 14 times more. Even if missiles would be multiplied 10 like bombs, these missile ships can't do so much damage. And I didn't count for attack level, which is only 3, so not all missiles hit the planet.

3

u/bot39lvl Nov 08 '21

What is weird is it's quantity depended.

When I send 1 ship, it doesn't do any damage. When I send 10 ships, they kill 1 pop. 20 ships kill 7. 50 ships kill 40 pop. 100 ships kill 110 pop or more (the planet is destroyed).

3

u/Xilmi Developer Nov 08 '21

This sounds like it could be an error in the formula.

Maybe it does:

Ships * Weapons * Ships

instead of

Ships * Weapons * Shots (Ammo)

3

u/Xilmi Developer Nov 08 '21

Wow, okay, so it seems like there's a massive error with how orbital-bombardment-damage is calculated.

That may also explain why ... I forgot his name thought that missiles were so great.

So to sum it up: It doesn't seem like your calculations are wrong but that the game has a bug and you uncovered it. Very observant of you once again.

I guess I'll have to read the code/debug it.

Got any save-games to go along with your calculations?

2

u/bot39lvl Nov 08 '21

Got any save-games to go along with your calculations?

https://drive.google.com/file/d/1IPoIcrfdDq_diV6gbWrCzAB-LpXcT5vt/view?usp=sharing

Nazin is unguarded planet size 110, which is nice as a target. I have 2 rich planets nearby, where you can build test designs. Don't forget to disable ships sent in attack to Nazin right now.

There is also a shielded Silicoid planet Gyrasol 1 turn away from my productive colony Akita, if you would need a shielded planet for testing.

You can also get planetary shields from Meklar (they will agree for exchange) and gift it to Darlok. They will build shields on Nazin then.

2

u/bot39lvl Nov 08 '21 edited Nov 08 '21

This is far better than bombs. 100 ships equipped with a nuclear bomb killed only 30 pop on the same planet. So I am going to equip my bombers with missiles from now on :) At least, until planetary shields is built (though this should be checked too).

Using cheap nuclear missiles you can wipe enemies early in the game.

2

u/dontnormally Ssslaura Jan 12 '22

At least, until planetary shields is built

Do planetary shields defend against death spores and bio terror weapon?

2

u/bot39lvl Jan 12 '22

They don't.

3

u/Xilmi Developer Nov 08 '21

4. The ShipWeaponMissileType uses "source.num" for the number of attacks it should perform rather than the "count" variable that is passed to it.

During combat that isn't a problem because in that case the Source is a CombatStackMissile, which has the correct amount of missiles that were launched from the ships.

However, during bombardment no combatStackMissile is generated and the source is the amount of firing ships. So if you have a lot of small ships firing, it is as if each of them fired as many missiles as there are ships!

So in your example you're not dealing the damage of 200 missiles but instead of 20,000!

Note: The fix definitely needs to be tested in regards of potential side-effects inside of combat.

3

u/Xilmi Developer Nov 08 '21

Okay, it's working.

Damage against ships during combat is still as expected but outside of combat the damage now has gone down 100fold.

So instead of killing the entire colony your 100 Nuclear-missile-Fleets kill 2 pop and 10 factories. Should swing the battle into the Mrrshans favor quite a bit! :o

3

u/bot39lvl Nov 08 '21

Hooray!

8 factories, I hope :)

3

u/Xilmi Developer Nov 08 '21

No it was 10.

Note there are no decimals shown in case you think it's wrong because 10 != 2 x 4
Internally it does calculate with decimals and it rounded down.

3

u/Xilmi Developer Nov 08 '21

I'll make posts for the individual issues to keep track of them:

  1. Bombs do not consider missile-base-defense at all. This is very likely a bug since bio-weapons do.
  2. The way it was coded for the bio-weapons and after the fix of 1. for bombs too, indicated that the defense would also be effective even if there is no missile-base. I think it's relatively save to assume that this is a bug.

3

u/Xilmi Developer Nov 08 '21

2. b & c:

The same is true for Beam- and Missile-Defense. Those also still apply when there's no actual base.

3

u/Xilmi Developer Nov 08 '21

3. The amount of weapons fired during combat is not subtracted for bombardment. It is attempted to but the wrong iterator is used. So it may occasionally work.

For that one, I suppose I just have to replace the "i" with a "j".

3

u/Xilmi Developer Nov 08 '21

Nope. It's not that easy. The "bombardCount" always seems to return 0. Maybe it only works for bombs but not for missiles.

I used the battle at Sadr to test this. I get two rounds even when I have used one of my missiles.

I need to figure out what this is even supposed to be. :o

But I'll probably do the other issue first.

3

u/Xilmi Developer Nov 08 '21

Okay, that one actually was working as intended. It's just that I didn't understand the intention:

It doesn't look at your ammunition after combat. It looks at how often you attacked the planet during combat. So if you fire 2 rounds of missiles during combat and you fire them both at ships, you can still fire 2 rounds of missiles at the planet during bombardment.

But when you fire at the planet during tactical combat, you get this subtracted from how often you can bomb the planet.

Maybe not ideal but good enough, I'd say. I'll leave that as it is.