/tg/ Station 13 - Modules - TypesVar Details - Proc Details

tackler

For when you want to throw a person at something and have fun stuff happen

This component is made for carbon mobs (really, humans), and allows its parent to throw themselves and perform tackles. This is done by enabling throw mode, then clicking on your intended target with an empty hand. You will then launch toward your target. If you hit a carbon, you'll roll to see how hard you hit them. If you hit a solid non-mob, you'll roll to see how badly you just messed yourself up. If, along your journey, you hit a table, you'll slam onto it and send up to MAX_TABLE_MESSES (8) /obj/items on the table flying, and take a bit of extra damage and stun for each thing launched.

There are 2 separate """skill rolls""" involved here, which are handled and explained in rollTackle() (for roll 1, carbons), and splat() (for roll 2, walls and solid objects)

Vars

base_knockdownLaunching a tackle calls Knockdown on you for this long, so this is your cooldown. Once you stand back up, you can tackle again.
min_distanceSome gloves, generally ones that increase mobility, may have a minimum distance to fly. Rocket gloves are especially dangerous with this, be sure you'll hit your target or have a clear background if you miss, or else!
rangeYour max range for how far you can tackle.
skill_modA flat modifier to your roll against your target, as described in rollTackle(). Slightly misleading, skills aren't relevant here, this is a matter of what type of gloves (or whatever) is granting you the ability to tackle.
speedHow fast you sail through the air. Standard tackles are 1 speed, but gloves that throw you faster come at a cost: higher speeds make it more likely you'll be badly injured if you fly into a non-mob obstacle.
stamina_costHow much stamina it takes to launch a tackle
tackle_refA wearkef to the throwdatum we're currently dealing with, if we need it
tacklingIf we're currently tackling or are on cooldown. Actually, shit, if I use this to handle cooldowns, then getting thrown by something while on cooldown will count as a tackle..... whatever, i'll fix that next commit

Procs

checkObstacleCheck to see if we hit a table, and if so, make a big mess!
checkTackleSee if we can tackle or not. If we can, leap!
do_grabHelper to do a grab and then adjust the grab state if necessary
negative_outcomeOur negative tackling outcomes.
neutral_outcomeOur neutral tackling outcome.
positive_outcomeOur positive tackling outcomes.
registerTackleStore the thrownthing datum for later use
rollTackleThis handles all of the modifiers for the actual carbon-on-carbon tackling, and gets its own proc because of how many there are (with plenty more in mind!)
sacksack() is called when you actually smack into something, assuming we're mid-tackle. First it deals with smacking into non-carbons, in two cases:
splatThis is where we handle diving into dense atoms, generally with effects ranging from bad to REALLY bad. This works as a percentile roll that is modified in two steps as detailed below. The higher the roll, the more severe the result.
splatWindowA special case for splatting for handling windows

Var Details

base_knockdown

Launching a tackle calls Knockdown on you for this long, so this is your cooldown. Once you stand back up, you can tackle again.

min_distance

Some gloves, generally ones that increase mobility, may have a minimum distance to fly. Rocket gloves are especially dangerous with this, be sure you'll hit your target or have a clear background if you miss, or else!

range

Your max range for how far you can tackle.

skill_mod

A flat modifier to your roll against your target, as described in rollTackle(). Slightly misleading, skills aren't relevant here, this is a matter of what type of gloves (or whatever) is granting you the ability to tackle.

speed

How fast you sail through the air. Standard tackles are 1 speed, but gloves that throw you faster come at a cost: higher speeds make it more likely you'll be badly injured if you fly into a non-mob obstacle.

stamina_cost

How much stamina it takes to launch a tackle

tackle_ref

A wearkef to the throwdatum we're currently dealing with, if we need it

tackling

If we're currently tackling or are on cooldown. Actually, shit, if I use this to handle cooldowns, then getting thrown by something while on cooldown will count as a tackle..... whatever, i'll fix that next commit

Proc Details

checkObstacle

Check to see if we hit a table, and if so, make a big mess!

checkTackle

See if we can tackle or not. If we can, leap!

do_grab

Helper to do a grab and then adjust the grab state if necessary

negative_outcome

Our negative tackling outcomes.

We pass our tackle result here to determine the potential outcome of the tackle. Typically, this results in a very poor state for the tackler, and a mostly okay outcome for the tackled.

First, we determine severity by taking our roll result, multiplying it by -10, and then rolling within that value.

If our tackler is human, their armor will reduce the severity of the roll. We pass along any MELEE armor as a percentage reduction. If they're not human (such as a carbon), we give them a small grace of a 10% reduction.

Finally, we figure out what effect our target receives and what our tackler receives:

neutral_outcome

Our neutral tackling outcome.

Our tackler and our target are staggered. The target longer than the tackler. However, the tackler stands up after this outcome. This is maybe less neutral than it appears, but the tackler initiated, so... This outcome also occurs when our target has blocked the tackle in some way, preventing situations where someone tackling into a blocker is too severely punished as a result. Hence, this has its own proc.

positive_outcome

Our positive tackling outcomes.

We pass our tackle result here to determine the potential outcome of the tackle. Typically, this results in a very poor state for the tackled, and a positive outcome for the tackler.

First, we determine severity by taking our roll result, multiplying it by 10, and then rolling within that value.

If our target is human, their armor will reduce the severity of the roll. We pass along any MELEE armor as a percentage reduction. If they're not human (such as a carbon), we give them a small grace of a 10% reduction.

Finally, we figure out what effect our target receives. Note that all positive outcomes inflict staggered, resulting in a much harder time escaping the potential grab:

registerTackle

Store the thrownthing datum for later use

rollTackle

This handles all of the modifiers for the actual carbon-on-carbon tackling, and gets its own proc because of how many there are (with plenty more in mind!)

The base roll is between (-3, 3), with negative numbers favoring the target, and positive numbers favoring the tackler. The target and the tackler are both assessed for how easy they are to knock over, with clumsiness and dwarfiness being strong maluses for each, and gigantism giving a bonus for each. These numbers and ideas are absolutely subject to change.

In addition, after subtracting the defender's mod and adding the attacker's mod to the roll, the component's base (skill) mod is added as well. Some sources of tackles are better at taking people down, like the bruiser and rocket gloves, while the dolphin gloves have a malus in exchange for better mobility.

sack

sack() is called when you actually smack into something, assuming we're mid-tackle. First it deals with smacking into non-carbons, in two cases:

If it's a carbon we hit, we'll call rollTackle() which rolls a die and calculates modifiers for both the tackler and target, then gives us a number. Negatives favor the target, while positives favor the tackler. Check rollTackle() for a more thorough explanation on the modifiers at play.

Then, we figure out what effect we want, and we get to work! Note that with standard gripper gloves and no modifiers, the range of rolls is (-3, 3). The results are as follows, based on what we rolled:

Finally, we return a bitflag to COMSIG_MOVABLE_IMPACT that forces the hitpush to false so that we don't knock them away.

splat

This is where we handle diving into dense atoms, generally with effects ranging from bad to REALLY bad. This works as a percentile roll that is modified in two steps as detailed below. The higher the roll, the more severe the result.

Mod 1: Speed-

Mod 2: Misc- -Flat modifiers, these take whatever you rolled and add/subtract to it, with the end result capped between the minimum from Mod 1 and 100. Note that since we can't roll higher than 100 to start with, wearing a helmet should be enough to remove any chance of permanently paralyzing yourself and dramatically lessen knocking yourself unconscious, even with rocket gloves. Will expand on maybe

Effects: Below are the outcomes based off your roll, in order of increasing severity

splatWindow

A special case for splatting for handling windows