Skip to content

Handcuff balance changes, Ruko edition! #12602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jul 18, 2025
Merged

Conversation

Rukofamicom
Copy link
Contributor

@Rukofamicom Rukofamicom commented Apr 18, 2025

About The Pull Request

This pull request tweaks the order of operations with attempts to break out of cuffs, and also adds a dash of RNG into the mix as well. For most breakout attempts this RNG will not factor.

Specifically what is changed:

  • Players who are bucklecuffed will work their way out of the cuffs first now, instead of taking a full minute or more to unbuckle themselves only to still be cuffed. Buckling someone who is cuffed will prevent them from running around, but will not make it take any additional time for them to break out of their restraints, and once the restraints are off they can easily unbuckle themselves.

  • Players who are restrained in any way (handcuffs, bolas/legcuffs, straight jacket) are no longer forced to stand still in order to begin working their way out of the restraints. This means the "keep dragging them in circles" is no longer going to do anything to slow a potential escape attempt.

  • Because of the above bullet point dramatically reducing the practical time it takes for a player to break out of restraints, all handcuff type restraints have had their base breakout time increased substantially to compensate. Handcuffs take three minutes, zip ties take two minutes and cable cuffs take one minute.

  • Rather than needing to attempt a breakout for the full duration all at once, players will loop through a 5-second interval. Every 5 second interval brings the player closer to breakout, so even if they are stunned again in the middle of their escape attempt they don't lose all of their progress. Once the player has spent a total number of 5-second attempts equal to the breakout time, they will be freed from the cuffs.

  • And finally the sprinkles of RNG: every breakout attempt adds a 0.25% chance of successfully wriggling out sooner, and rather than squirming out of cuffs always being blatantly obvious, each 5-second attempt offers only a small chance of being noticed by nearby players.

And then a few assorted tweaks because I was in the area of code anyway:

  • Updated several numbers still in deciseconds to use the MINUTES and SECONDS macros
  • Adjusted the straight jacket down from five minutes to only two minutes for breaking out
  • Removed the "instant cuff break" for xenomorphs, they now use the same one as hulks do since they can break the cuffs while moving
  • Breakout click cooldown has been reduced from 10 seconds to 2 seconds, because a 10 second click cooldown is such a long time it leads to players believing they are experiencing a bug when it's actually working entirely as intended. There's no reason to put players on a 10 second click cooldown, though this will make breaking out of certain objects (such as welded lockers) take a lot less time. I don't think this time difference is consequential in the vast majority of cases though.

Why It's Good For The Game

First and foremost because there is nothing worse as a player than being unable to do or interact with anything for extended periods of time. If security is parading someone around for an extended period of time instead of processing them, it really sucks for that player and they do not often remember to include time spent being paraded around as time served. In many cases it can be worse than being dead because you can't even chill with ghosts or decide if there's another role you would like to take.

Handcuffs are a good tool for restraining players, but they should not be an indefinite restraint for an officer to endlessly parade someone around, and players deserve more opportunities to keep going after non-lethal takedowns. Players exercising their chances at freedom should be aware that if they are not possible to stop with non-lethal force, security may be forced to resort to more lethal implements instead.

If security notices a breakout attempt, they can stun, remove and re-apply the cuffs to "re-adjust" them and reset the breakout counters, so this does not completely remove the ability for security to keep someone restrained, but does add more risk to doing so for extended periods of time instead of processing the detained player.

Testing Photographs and Procedure

This is me managing to break out at 40 seconds, getting very lucky on the compounding chance
dreamseeker_eYFZzYldZp

Testing the bucklecuffing:
image

I tested specifically that the resist buttons and interface buttons both work to remove the cuffs, both when buckled and when not, as well as testing that I can move around while trying to remove cuffs.

Changelog

🆑
balance: Hand restraints such as handcuffs are now much simpler to break out of. Each attempt takes only five seconds and gives a miniscule chance of breaking out immediately if you get lucky with a compounding chance after each attempt. Each attempt stacks up to eventually being enough to guarantee the cuffs are removed once your total attempts are equal to the breakout time as well.
balance: Attempts to remove any types of restraint (Bola, cuffs, straight jackets, etc.) no longer require you to be still and motionless, which means you can run around like a headless chicken and still break out of some cuffs. Being dragged in circles by an officer no longer interrupts breakout attempts either.
balance: Because the general process for breaking hand restraints is now much more consistent, the base times for all three hand restraints has been increased dramatically so that handcuffs are still effective at their intended purpose, just without being an indefinite restraint.
tweak: Buckle-cuffed players are able to remove their restraints first now, so buckling a player who is cuffed does nothing to lengthen the effective restraint time further, it only prevents them from running around.
tweak: straight jackets take two minutes to break out of instead of five now, because five is an excessive amount of time to potentially stack on top of cuffs.
tweak: Xenomorphs can no longer instantly break cuffs. They use the same define and code as hulks do, taking five seconds to break the cuffs. In both hulk and xeno cases, the cuffs can now be broken while moving.
/:cl:

@Rukofamicom
Copy link
Contributor Author

This is my version of solving the same problem as #12586

This has been cooking for a bit, and seeing the other one motivated me.

@Tsar-Salat Tsar-Salat added the Balance Approved The balance of this PR has been approved label Apr 18, 2025
@Tsar-Salat
Copy link
Contributor

I like it. Will do a audit review later.

@wikimody
Copy link
Contributor

wikimody commented Apr 18, 2025

I think bolas should either still require you to stand still or get the benefit of extended time to. Otherwise they kind of lose their purpose, turning them from solid way of slowing someone down in combat into 3 second of slowdown (with has its uses but given you could be shooting someone instead its way worse).

@Rukofamicom
Copy link
Contributor Author

Given how powerful slowdown is and how instant bolas are I don't think it's necessary in that case.

@DarnTheMarn
Copy link
Contributor

For anyone interested in how the math works out, if my understanding of the PR is right after your tenth escape attempt 50 seconds in, you are more likely to have escaped than remain cuffed. So although you could technically remain cuffed for a full three minutes, you should go out and buy a lottery ticket if you manage that.

@Rukofamicom
Copy link
Contributor Author

I've just ran the numbers again to double check and no I am pretty sure you are incorrect, though the compound chances do admittedly add up faster than I expected and might need to be tweaked.

@MarkusLarsson421
Copy link
Contributor

I kind of disagree with the ability to break out of a straight jacket. Has this always been a case because I remember being unable to break out of them? They are not as common or easily acquirable as cuffs nor are they standard usage. Not to mention they're a large item and between 0-2 of them exist on every map.

If someone wants to put them in a straight jacket, I am in favour to assume they're doing it for a good reason rather than for them to be a dick.

@ClownMoff
Copy link
Contributor

ClownMoff commented Apr 19, 2025

If security notices a breakout attempt, they can stun, remove and re-apply the cuffs to "re-adjust" them and reset the breakout counters, so this does not completely remove the ability for security to keep someone restrained, but does add more risk to doing so for extended periods of time instead of processing the detained player.

I think this is too clunky and unnatural, it should be something that most players can come up with inmediatly instead of being frustrated on why I can't stop this dude from freeing himself.

@Rukofamicom
Copy link
Contributor Author

Yes straight jackets have always been able to be broken out of it just took five straight minutes of standing still.

to_chat(src, span_notice("You attempt to wriggle your way out of [cuffs]..."))
while(do_after(src, 5 SECONDS, timed_action_flags = IGNORE_USER_LOC_CHANGE|IGNORE_HELD_ITEM, hidden = TRUE))
cuff_breakout_attempts++
if(cuff_breakout_attempts * 5 SECONDS >= breakouttime || prob(cuff_breakout_attempts))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

message_admins("[src] broke out of [cuffs] after [cuff_breakout_attempts]")

Or somethin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind but I do worry about some spam

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

included in most recent push where I tweaked the math on breakout

@Rukofamicom
Copy link
Contributor Author

Rukofamicom commented Apr 20, 2025

Poured over numbers and adjusted the compounding breakout chance. Instead of a compounding 1% chance, it is a compounding 0.25% chance. This means it takes 23 breakout attempts (just shy of two minutes in total) to achieve a 50% likelihood of breaking out early. Cuffs are still not likely to hold for the full three minutes, but they are still guaranteed to break on attempt 36.

@Rukofamicom Rukofamicom requested a review from Tsar-Salat April 22, 2025 16:11
@Tsar-Salat Tsar-Salat dismissed their stale review May 21, 2025 17:58

addressed

Copy link
Contributor

@Tsar-Salat Tsar-Salat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another log request, but can you add a log for when handcuffs are taken off? Theres a combat log for when they are applied, but thats it.

Im handling a report right now and I realize that its not logged which is quite annoying.

I will give my approval afterwards.

@Rukofamicom
Copy link
Contributor Author

Rukofamicom commented May 21, 2025

Sounds like a good thing to log, yeah.
I'll probably throw a log into when the escape attempts are visible too

@Nakalon
Copy link
Contributor

Nakalon commented Jul 4, 2025

Players who are restrained in any way (handcuffs, bolas/legcuffs, straight jacket) are no longer forced to stand still in order to begin working their way out of the restraints. This means the "keep dragging them in circles" is no longer going to do anything to slow a potential escape attempt.

Bro thank fuck, i always thought that was so ass.

@Rukofamicom
Copy link
Contributor Author

Game breaking issues have happened due to things I don't understand. Will update if/when I can.

@ClownMoff
Copy link
Contributor

What happened?

@Rukofamicom
Copy link
Contributor Author

The handcuffs simply stopped working part way through the round. They would be permanent and impossible to break out of entirely.

@Rukofamicom
Copy link
Contributor Author

All minor bugs that came up in testing have been fixed, as well as the one glaringly major bug which I should have caught in my own testing.

This is ready to merge @Tsar-Salat @PowerfulBacon

@Tsar-Salat Tsar-Salat added this pull request to the merge queue Jul 18, 2025
Merged via the queue into BeeStation:master with commit 876c575 Jul 18, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants