Page 1 of 1

[1.1.109] Spidertron firing more rockets than needed

Posted: Thu Jul 11, 2024 8:27 pm
by Saibantes2
Spidertron seems to try to not shoot more missiles at one enemy than are needed for the kill, but sometimes it shoots more than needed.

  • Spidertron, loaded with regular rockets
  • Stronger Explosives researched to 12
This is enough to kill a Behemoth Worm with one rocket: (((200 + 480%) - 10) - 30%) = 805 > 750. This can be confirmed by manually shooting a rocket.
When firing automatically, Spidertron will shoot two missiles at once for each Behemoth Worm.
It will only shoot one missile with Stronger Explosives 13.




Different phrasing:
When Stronger Explosives 13 is researched, a Spidertron loaded with regular Rockets will only shoot one such rocket at a Behemoth Worm (no more rockets are fired while the first one is in flight). When Stronger Explosives is only researched to 11, Spidertron will fire two missiles at once, because one is not enough to kill a Behemoth Worm. This indicates to me that it was intentional that Spidertron will only fire as many rockets as needed.
However, the threshold seems to be off. With Stronger Explosives 12 only one rocket is needed, but it fires two.

Re: [1.1.109] Spidertron firing more rockets than needed

Posted: Thu Jul 11, 2024 10:39 pm
by boskid
Thanks for the report, however based on current knowledge this is working as intended. There is a 10% margin on the estimated damage to be taken before entity is considered "will die, no need to shoot anymore". This 10% margin is to make sure there are no floating point errors causing entity to not survive or if regeneration is taken into account the entity gets enough damage to be killed anyway. If you count 10% margin, behemoth worm with 750 HP will need at least 825 of predicted damage to not have more rockets being launched. From what i see in 2.0 the margin will be reduced to 5%

Re: [1.1.109] Spidertron firing more rockets than needed

Posted: Fri Jul 12, 2024 2:48 pm
by Saibantes2
Thank you for the explanation!

I find even 5% a lot, considering that Spidertron could shoot at something else instead, but ¯\_(ツ)_/¯


I just tested what happens with laser turrets, but they hit instantly, so that should be irrelevant there.