Water Turret

by Pi-C

This mod provides an early game Water thrower that does minimal damage but slows down the enemies (use steam for extra damage!) and an advanced turret for extinguishing fires (use "Hardened pipes" to give it extra resistances!).

Content
3 years ago
0.17 - 1.1
6.34K
Combat

b [Fixed?] Steam damage multiplier doesnt work even with hottest steam possible.

4 years ago

I used even the steam boiler from creative for hottest steam possible, but dps is still 0.15 and struggles to kill a small biter

4 years ago
(updated 4 years ago)

Temperature isn't taken into account for damage calculations by vanilla Factorio. Assigning different damage values to steam of different temperatures would require making a new prototype per temperature. I've chosen a different approach: listen to on_entity_damaged, and if an entity was damaged by a steam turret, check the temperature of the steam it shoots, get the ratio of default steam temperature and temperature of steam used by the turret, and multiply the damage taken by the entity with that factor.

This means that you'll always see "Damage: 0.15/s + 0.3/s Steam" (at the bottom of the stats display when you hover the cursor over a steam turret), regardless of the temperature the steam has. However, if you look above that, you'll see "Fluid damage modifier", which should be 1000% (10 times the original damage -- check the startup setting!) per default.
Unfortunately, there's nothing I can do about the wrong display (not that I know of, at least). But the full damage should be applied.

4 years ago

After taking a closer look, I noticed that I really didn't apply the addititonal damage correctly, so I'll rework that for the next release. However, the above still applies: Additional damage due to higher temperature is based on scripting at runtime, the prototypes don't know about this, and the tooltip will still show only the base damage.

Regarding balancing: I've used Creative Mod to generate steam with a temperature 1000 °C. The resulting factor (1000/165) is about 6, so instead of 0.15/s you'd get 0.9/s -- which still isn't a lot. Perhaps I should square the factor?

total_damage = final_damage * (hot_temperature/base_temperature)^2

This wouldn't affect the damage done by normal steam (because 1 squared still is 1), but dramatically increase the damage of steam at higher temperatures -- up to 5.4 HP for steam at 1000 *C. Do you think that's too much?

Another thing that bothers me: What if a mod made steam with a temperature between 100 °C and 165 °C? This should deal less damage than base steam. But if the health of an entity was the same or less than final_damage_amount (damage remaining after all resistance and damage modifiers have been applied to the base damage), it's health will be set to 0, so adding final_damage back to entity health, multiplying final_damage with the temperature factor, and substracting that value from entity health again will produce incorrect results. Unfortunately, there is no way to get the health an entity had before it took damage -- that's a limitation of base Factorio that must (but won't) be fixed by the devs.

4 years ago

Please try version 0.18.4! Sorry, I've got sidetracked and didn't get to work on this mod lately. I hope that it works now and that I didn't forget anything … :-)

New response