Rampant, fixed


Based on Rampant 1.1.1 (new AI and enemies). 1. Perceptibly more dangerous. AI significantly rewritten, gameplay different. Can attack from afar. Improved search for a passage in the defense. By default, it does not populate the entire map. 2. +2 Factions. Can mutate existing nests. Mixed attacks from different factions. Can be combined with nests of other enemies

Content
4 months ago
1.1
31.2K
Enemies

b Krastorio 2 Tesla Coil gets damaged when it has acid pools in its radius

1 year, 5 months ago
(updated 1 year, 5 months ago)

So, Tesla Coils from Krastorio 2 can't be placed too close to each other, because they have a very big "relative radius". And because of that any mobs from Rampant Fixed that can leave acid behind, such as Acid Biters and Spitters, damage the coil if they spit an acid inside of this "relative radius"

I reported this to Krastorio 2 as well, because A) don't know which of these mods is the problem, and B) without Rampant everything is fine.

1 year, 5 months ago
(updated 1 year, 5 months ago)

Test passed. There are two powered Tesla coils, next to one of them is a flamethrower. Created an acid biter and spitter in editor mode that attacked the flamethrower. No coil damage found.

I think I need your save to reproduce the situation

1 year, 5 months ago
(updated 1 year, 5 months ago)

Sure, here it is: https://tempfile.io/en/yMgATtlUQCgntRS/file (sorry, I can't upload it directly)

Steps to reproduce:
1) See how acid biter attacks a flamethrower, leaving no acid
2) Use "Toggle Map Editor" button from EE to spawn as a character
3) Remove the flamethrower and let the biter aggro on you
4) See how Coil constantly takes damage

Note: disabling Factorissimo 2 fork changes nothing, I just checked

1 year, 5 months ago

The situation is confirmed
The Tesla gets damaged even if I spawn any "rampant fire" nearby directly from the editor. At the same time, normal fire does not cause damage.
This can't be at the expense of fire immunity, as some of the spawned entities dealt pure fire damage.
The damage is dealt regardless of whether I create fire/puddle for neutrals or enemies.

Unfortunately, I do not see that I could change.
An invisible entity is created around the Tesla. Maybe it takes damage and passes it to the tesla turrets.
Perhaps somewhere in the depths of the K2 code, there is a filter which sources of damage need to be excluded. And it takes into account the standard fire/spitts. If it is true then it might be better to give this invisible entity 100% damage resistance.

At the moment, you should place your Teslas away from places where bugs can spit.

1 year, 5 months ago

The collision entity for the tesla coil is invulnerable and doesn't take damage. I think the problem is that the damage action is giving the damage at the collision entity's position, which is identical to the tower position, so the tower is getting damaged as a result. I tried setting the collision entity as the neutral force but that didn't help.

I don't think I can fix this on the K2 side, rampant is causing the damage.

1 year, 5 months ago

Fire from rampant (both) deals damage through the on_damage_tick_effect event. It, unlike ordinary fire, allows to set filters and save the biter from its fire (greatly reduces lag). However, it is completely unclear why normal fire, which should damage everything, does not damage the coil.

Perhaps the fire does not affect all layers, but the area damage in on_damage_tick_effect event affects everything. I'll take another look at what can be done

1 year, 4 months ago
(updated 1 year, 4 months ago)

Unfortunately, I was not able to solve the problem of how to save damage to the player's buildings and not deal damage to the Tesla Coil.
It's definitely the "on_damage_tick_effect" method, but how it damages the coil, which is far away is not clear. Experiments with "collision_mask" didn't work.

Since the amount of time required exceeds what I am willing to spend on the solution, this will be a feature

1 year, 4 months ago
(updated 1 year, 4 months ago)

Well, you most likely won't build teslas outside of your base, and by the time you have them you probably have a decent defence, so I don't think it'll be such big of a problem.

Thank you for your efforts!

1 year, 4 months ago

This isn't the first bit of jank that has arisen from using turrets for the tesla coil range detection. Unfortunately it's the most UPS-efficient way to do it.

New response