/tg/ Station 13 - Modules - TypesVar Details

bane

Bane component

Applied to items and projectiles that modifies damage dealt to certain things. For example a sword that deals 2x damage to specifically skeletons.

For items, you are not limited to only dealing more damage. Supports smaller multipliers or removing flat damage. For projectiles, you are limited to only dealing more damage, at least until further refactors are done.

Vars

added_damageFlat damage added when the bane effect applies. Defaults to 0 (no change).
affected_biotypesA bitfield of mob biotypes that this bane component applies to. If NONE, applies to all biotypes. Defaults to NONE.
damage_multiplierMultiplier applied to damage when the bane effect applies. Defaults to 1 (no change).
label_textOptional text to show in the weapon label readout, if not set it will generate a generic one based on the biotypes
on_bane_callbackCallback invoked after bane damage is applied, allows for applying other effects. (arguments: target, attacker) Return value doesn't matter
pre_bane_callbackCallback invoked before bane damage is applied, allows for modifying the damage or applying other effects. (arguments: target, attacker, damage_modifiers) Return value doesn't matter, but you can modify the damage_modifiers list to change the attack's values
should_bane_callbackCallback invoked when checking if a target is valid to be baned (arguments: target) Return a boolean, FALSE to stop the bane effect or TRUE to allow it

Var Details

added_damage

Flat damage added when the bane effect applies. Defaults to 0 (no change).

affected_biotypes

A bitfield of mob biotypes that this bane component applies to. If NONE, applies to all biotypes. Defaults to NONE.

damage_multiplier

Multiplier applied to damage when the bane effect applies. Defaults to 1 (no change).

label_text

Optional text to show in the weapon label readout, if not set it will generate a generic one based on the biotypes

on_bane_callback

Callback invoked after bane damage is applied, allows for applying other effects. (arguments: target, attacker) Return value doesn't matter

pre_bane_callback

Callback invoked before bane damage is applied, allows for modifying the damage or applying other effects. (arguments: target, attacker, damage_modifiers) Return value doesn't matter, but you can modify the damage_modifiers list to change the attack's values

should_bane_callback

Callback invoked when checking if a target is valid to be baned (arguments: target) Return a boolean, FALSE to stop the bane effect or TRUE to allow it