space-wizards / space-station-14

A multiplayer game about paranoia and chaos on a space station. Remake of the cult-classic Space Station 13.
https://spacestation14.io
MIT License
2.12k stars 2.8k forks source link

punching wires doesnt shock you #25121

Open deltanedas opened 4 months ago

deltanedas commented 4 months ago

Description

you can just get a bat and start hitting wires in maints without insuls and it just works

deltanedas commented 4 months ago

same with cutting wires, at least lv

Peptide90 commented 4 months ago

Description

you can just get a bat and start hitting wires in maints without insuls and it just works

Checks out if it's a wooden bat ;) might take awhile though. HV cables should be super strong though always advocated for that.

deltanedas commented 4 months ago

its not terribly slow also wirecutters dont shock either

MjrLandWhale commented 4 months ago

Ok so here's the issue: Electrocution damage scaling is based on a natural log function (In the CalculateElectrifiedDamageScale method). At lower power values (like hitting an LV wire) you end up returning a negative value from this function. The TryDoElectrifiedAct method it gets called in doesn't do anything if that value is less than zero.

This can be fixed by either clamping or maxing the value with the minimum being (imo) somewhere between 0 and 1.

Impact/balance wise though, it'll piss a LOT of people off. The behavior becomes: if you attack a powered wire AT ALL without some form of insulation, you get shocked. Given the amount of juice flowing through LV I think it is reasonable, but this will impact break-in attempts heavily, and zombies MASSIVELY.

I have the change staged in my fork, but wanted some feedback before I try PR'ing it.

deltanedas commented 4 months ago

and zombies MASSIVELY.

shitter zombies shouldnt be "cutting" wires

this will impact break-in attempts heavily

i have never seen anyone else try to use it, just myself

but if you want to break in as an antag: a. buy gear specifically for that (emag, jaws, susbox) b. steal it from an engi c. just disposal in

if you want to break in as a non antag, bwoink

MjrLandWhale commented 4 months ago

shitter zombies shouldnt be "cutting" wires

Agreed, but this affects more than wires directly. Attacking things like grilles/fences with wires under them also gets affected by this. Zombies would need to start going through walls when trying to get past shocked doors with electrified grilles under a window.

i have never seen anyone else try to use it, just myself

Same as above, but your counterpoints are also valid and I may be overthinking it.

deltanedas commented 4 months ago

Zombies would need to start going through walls when trying to get past shocked doors with electrified grilles under a window.

hrp zombie whos only thought is "brains" being able to tell what grille will or wont shock them:

MjrLandWhale commented 4 months ago

Fair enough.

Side note: This issue is caused by #24829 Based on the discussion in there, the current behavior is intentional. Whether it is desired is another story...

Peptide90 commented 4 months ago

Fair enough.

Side note: This issue is caused by #24829 Based on the discussion in there, the current behavior is intentional. Whether it is desired is another story...

It looks like it was pointed out twice in that PR too that the damage was still too low. Even just looking at the table at the top, 30KW of power doing 0 damage is bonkers.

Let's remind everyone you only require 50mA to stop a heart, provided the power is applied across the heart. This is over the top thinking but assuming the station runs at 230/400V because why not, that's like 20W, orders of magnitude less than the minimum damage we have.

As mentioned in that PR too, any value of electrification should affect the player. IMO anything less than a few kW should damage with a tiny stun. Anything over like 30kW should be a hard stun. Then take a look at your log and start dusting people.

deltanedas commented 4 months ago

also a related funny i accidentally punched an apc on a wreck (the one with 4 parts connected by lattice, apc in top right part) and it almost instakilled me

but eating wires is ok

MjrLandWhale commented 3 months ago

So here's my idea:

0 - 4.9 KW: You get notionally shocked. No damage, but a message & visual effect to indicate something powered and that it mildly "shocked" you. 5 - 50 KW: This is your bread and butter for LV shocking. This would cover punching LV or anything like grilles on top of LV. Like before it includes a message and visual effect, but now it introduce sscaling shock and stamina damage. This means you can still break the object, but are slowed by managing stamina along with the consequence of taking shock damage. 50.1 - 150 KW: We're now entering MV territory. Consequences in this range are more severe. I'm thinking similar damage scaling to present, with a reduced knockdown timer. 150+ KW: This is HV territory. The consequences should be severe. Retain current damage scaling and knockdown.

A separate but related change I had in mind: tools & weapons made using wooden handles (Pickaxe, Shovel, and Baseball bat) should have a siemens coefficient since wood would realistically insulate the user. Nothing crazy, but something between 0.6 - 0.9.

These changes would also introduce new opportunities for people working with budget insuls. A pair with a 0.5 coefficient wont save you from taking damage when hitting a 10KW LV. Combine that with a 0.9 coefficient baseball bat though, and you can hit that same LV without consequence. The downside is you need to be destructive to enjoy that benefit.

As for APCs, doors, generators, and such... things get weird. From my testing on APCs, it looks like when attacking it you are shorting the MV net into you. Only issue is the "theoretical" supply from a substation is always 150kw... Shouldn't damage be calculated based on the currently supplied power instead of theoretical power? From a game design perspective that seems like a much better option.

MjrLandWhale commented 3 months ago

As for APCs, doors, generators, and such... things get weird. From my testing on APCs, it looks like when attacking it you are shorting the MV net into you. Only issue is the "theoretical" supply from a substation is always 150kw... Shouldn't damage be calculated based on the currently supplied power instead of theoretical power? From a game design perspective that seems like a much better option.

aaaand that's caused by #24554

edit: Even better, this means the damage from attacking electrified components is static based on the theoretical max draw, while attacking wires scales based on the current supply?

TokenStyle commented 2 months ago

I'm getting electrified on LV, MV, HV wires. Checked on dev map by punching with baseball bat, wrench, bare hands. Or bug is on something else?

Like, when electricity is off, or too low to get any damaged from electrified