Jump to content

How to die from pulling out (health) circuits as Wx-78!


Recommended Posts

Note: This is just a sorta jokey post, and delving into the technicalities of how the circuits in the Wx rework is programmed. And it's a cool party trick if you do it on a server!

1647705629_GIF4-20-20225-01-34PM.thumb.gif.e27438f96da8ab0d87d5626269624367.gif

 

You've just stumbled upon this post, you're looking at the gif, and you can clearly see myself pulling out a circuit and then immediately dying. Surely this is modded? Commands were used?

Nope! This here can technically happen in normal gameplay! How the heck can you die from pulling out a health circuit as Wx? I'll show you!

While it looks like all the circuits that add max health do is scale your current health to match the percentage before you put in the circuit, the health circuits also technically add/substract .01 hp when plugged/detached respectively!

local function maxhealth_change(inst, wx, amount)
    if wx.components.health ~= nil then
        local current_health_percent = wx.components.health:GetPercent()

        wx.components.health:SetMaxHealth(wx.components.health.maxhealth + amount)

        wx.components.health:SetPercent(current_health_percent)

        if not wx.components.health:IsDead() then
            -- We want to force a badge pulse, but also maintain the health percent as much as we can.
            local badgedelta = (amount > 0 and 0.01) or -0.01
            wx.components.health:DoDelta(badgedelta, false, nil, true)
        end
    end
end

Why in the world was it programmed that way? Well if you saw that note there in the snippet of the code, it's so that the health badge in the UI does it's green/red pulse when health circuits are plugged in/detached! It's just Klei's hacky little solution to forcing a pulse.

So, I saw this when stumbling through the code, and the most devilish of thoughts came to my head, surely that means you could die from pulling out a health circuit, if you had less than or equal to 0.01 hp before pulling it out! And I found a fairly simple process to do just that.

The simplest process I found was first getting hit by Dragonfly(or any other 75 damage dealing mob) and leaving yourself at 75 out of 150 hp. Plugging in a hardy circuit 2.0 then raises your hp to 150.01 out of 300 hp (Remember! the current health scales to match the old percentage of hp you had, and then that .01 hp is added on).

Getting hit twice again will then leave you at .01 hp, as you take 150 damage. Visually your HUD will say you have 1 hp, but that's because it rounds up, otherwise it'd be saying you have 0 hp which makes no sense haha.

And voila! You can pull out your wonderful hardy circuit and perish from playing with your mechanical innards as the game removes .01 hp from you. There's no gameplay advantage to this, I just thought it's a funny consequence of how the health circuits in Wx's rework were programmed. Finding these weird odd ways games were programmed in certain areas is one of my favourite niches. Again, while there is no gameplay advantage, I think it makes for a cool party trick! I figured amongst the pages of feedback and suggestions a post that showcases a silly thing in the rework would be fun to do.

Oh, and for your death message? It will be listed as "Shenanigans"!

Link to comment
Share on other sites

Does anything else deal decimal damage? Maybe fire, damage over time like starving, or attacks from enemies after damage reductions from armor or garlic? Could this hypothetically happen without you going out of your way to do it it you pulled out a hardy circuit while the HUD says you have 1 health if you were exceptionally unlucky?

Link to comment
Share on other sites

21 minutes ago, Cheggf said:

Does anything else deal decimal damage? Maybe fire, damage over time like starving, or attacks from enemies after damage reductions from armor or garlic? Could this hypothetically happen without you going out of your way to do it it you pulled out a hardy circuit while the HUD says you have 1 health if you were exceptionally unlucky?

Several weapons players can wield do decimal damage; most only go to one decimal place, a few go to two, but a decaying Ham Bat can go up to three. Freezing and starving do damage at the same rate, 1.25 health per second, so I don't think they could do it by themselves. There's also damage modifiers and healing modifiers to consider, like from Warly's food or Wigfrid's passive perks. Being in a PvP world would probably make it easier for this to happen naturally though, if you'd survived getting hit with a partially rotten hambat earlier that day or something.

Link to comment
Share on other sites

46 minutes ago, Cheggf said:

Does anything else deal decimal damage? Maybe fire, damage over time like starving, or attacks from enemies after damage reductions from armor or garlic? Could this hypothetically happen without you going out of your way to do it it you pulled out a hardy circuit while the HUD says you have 1 health if you were exceptionally unlucky?

As I said, yep! It could theoretically happen to you in normal play, practically it'll almost never happen but it could happen. Starving deals 1.25 damage every 1 second, temperature damage(freezing/overheating) deals the same amount of damage but it instead of doing it only every second like starving it does it every single frame which totals 1.25 damage every second, that's a good part of the game where health goes far into the decimals for hp.

Link to comment
Share on other sites

10 hours ago, Hornete said:

As I said, yep! It could theoretically happen to you in normal play, practically it'll almost never happen but it could happen. Starving deals 1.25 damage every 1 second, temperature damage(freezing/overheating) deals the same amount of damage but it instead of doing it only every second like starving it does it every single frame which totals 1.25 damage every second, that's a good part of the game where health goes far into the decimals for hp.

offtopic but i would love a setting to increase that number

Link to comment
Share on other sites

1 hour ago, ArubaroBeefalo said:

offtopic but i would love a setting to increase that number

a setting to increase starving/freezing damage? I think you can change the TUNING.STAVE_KILL_TIME, TUNING.REEZING_KILL_TIME to do that.

Link to comment
Share on other sites

On 4/20/2022 at 11:17 PM, Hornete said:

Oh, and for your death message? It will be listed as "Shenanigans"!

Thanks, I love it, I'm always in for some shenanigans.

Edit: I guess it no longer works with 125 max hp. So... new idea! Empathy circuit! Effect: destroys your sanity. When pulled out: death by shenanigans.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
×
  • Create New...