Combat Research


Damage dealt to your enemies will contribute to your technology research. Includes settings to scale the effect damage has on research progress, unlocking early research options, and to disable the lab recipe. The only good bug is a dead bug!

Tweaks
a month ago
1.1 - 2.0
2.12K
Combat Cheats

i Demolisher fix

2 months ago
(updated 2 months ago)

Hello!

I like this mod, but I ran into an issue while playing with https://mods.factorio.com/mod/warptorio-space-age mod.
While you only need to deplete a demolisher's health once, each segment is a separate entity, which meant the mod added research for each segment killed alongside the head. This means that demolishers give ~40x the intended research (looking at game code, they have 41 segments in addition to head, I think).
I discovered this because warptorio adds a separate demolisher type, and for some reason I couldn't make the code work when copying your lines from vanilla. Probably because I wasn't referencing it properly.

The good news is, I discovered an alternative way to handle things. You can simply set to ignore entity.type == "segment", same way you ignore non-hostile entities dying. This means only the head will count for a kill, preventing "excess" research. Though it won't separate between the demolisher sizes, so perhaps it's of no use to your intended design.

On a side note, any reason you used a hidden 400 divisor instead of using float value for the scaling setting?

2 months ago

Thanks for the report and recommendation. It'll be a while before I can get to a fix, but it's on my to do list. Interesting that you seeing this. There was a report shortly after the update for Space Age about this and thought I got it at a good spot with giving the demolishers their own scale.

For the 400 weight, that was through testing. I'm rusty on my programming so I'm keeping things simple. I tried a few equations to get something that felt balanced in a Warptorio 2.0 run. I figured if it felt balanced there, it would be good. I couldn't figure out a good one so I use the weight method now. Just did a bunch of testing with different weights and found the 400 divisor gave a good balance as a default setting.

2 months ago

I see. Yeah that makes sense. The Space Age variant of Warptorio that I linked is made by someone else from scratch, and its approach to enemy spawning is very different.
Anyway, hope my input may be of help in the future.

2 months ago

hahah!! yeah this is happening to me too. it's so funny. i personally don't mind this because killing a demolisher is laborious but it is what it is. can probably be just shoved down into a mod option for those who want it

a month ago
(updated a month ago)

Good news! An update is coming shortly! Thank you very much for this report! My apologies on the time it took to resolve, I was getting stuck on a solution for the other report received, then tried your recommendation and was able to resolve both issues at once! As OwenAsh mentioned, the original idea of the Demolisher scale was to allow for a nice bonus when Demolishers were killed, but that was also setup when I didn't have any other ideas to balance the Demolishers. With this in place, Demolishers will receive the same adjustments as all other enemies in the damage scale setting. This change should also allow for wider compatibility of any mods that add additional enemies, at least theoretically. Please let me know if you notice any new weirdness with the update!

New response