Space Station 13 - Modules - TypesVar Details - Proc Details

Emote

Most of the text that's not someone talking is based off of this.

Vars

age_basedWhether or not to adjust the frequency of the emote sound based on age.
audio_cooldownHow long is the cooldown on the audio of the emote, if it has one?
bypass_unintentional_cooldownIf true, an emote will completely bypass any cooldown when called unintentionally. Necessary for things like deathgasp.
cooldownThe cooldown between the uses of the emote.
emote_target_typeIf our target behavior isn't to ignore, what should we look for with targets?
emote_typeWhether the emote is visible or audible.
hands_use_checkChecks if the mob can use its hands before performing the emote.
keyWhat calls the emote.
key_third_personThis will also call the emote.
max_stat_allowedHow unconscious/dead can you be while still being able to use this emote intentionally? If this is set to DEFAULT_STAT_ALLOWED, it'll behave as if it isn't set.
max_unintentional_stat_allowedSame as above, how unconscious/dead do you need to be to have this emote forced out of you? If this is set to DEFAULT_STAT_ALLOWED, it'll behave as if it isn't set.
messageMessage displayed when emote is used.
message_AIMessage displayed if the user is an AI.
message_alienMessage displayed if the user is a grown alien.
message_larvaMessage displayed if the user is an alien larva.
message_mimeMessage displayed if the user is a mime.
message_monkeyMessage displayed if the user is a monkey.
message_observerMessage to display if the user is a spooky observer ghost.
message_paramMessage with %t at the end to allow adding params to the message, like for mobs doing an emote relatively to something else. Set this to EMOTE_PARAM_USE_POSTFIX to just use the postfix.
message_postfixMessage postfix with %t used when we don't want to use message_param for our targeting. Used for things like message_monkey or message_mime. Punctuation from the message will be stripped when this is applied, so make sure it's punctuated as well.
message_robotMessage displayed if the user is a robot.
message_simpleMessage to display if the user is a simple_animal.
mob_type_allowed_typecacheTypes that are allowed to use that emote.
mob_type_blacklist_typecacheTypes that are NOT allowed to use that emote.
mob_type_ignore_stat_typecacheTypes that can use this emote regardless of their state.
muzzle_ignoreIf the emote type is EMOTE_MOUTH but should still bypass a muzzle.
muzzled_noisesSounds emitted when the user is muzzled. Generally used like "[user] makes a pick(muzzled_noises) noise!"
only_forced_audioIf true, this emote will only make a sound effect when called unintentionally.
only_unintentionalWhether or not the emote can even be called at all if it's not intentional
param_descDescription appended to the emote name describing what the target should be, like for help commands.
soundSound to play when emote is called. If you want to adjust this dynamically, see get_sound().
species_type_blacklist_typecacheSpecies types which the emote will be exclusively not available to. Should be subclasses of /datum/species
species_type_whitelist_typecacheSpecies types which the emote will be exclusively available to. Should be subclasses of /datum/species
stat_allowedHow conscious do you need to be to use this emote intentionally?
target_behaviorIf we get a target, how do we want to treat it?
unintentional_audio_cooldownIf the emote is triggered unintentionally, how long would that cooldown be?
unintentional_stat_allowedHow conscious do you need to be to have this emote forced out of you?
varyWhether or not to vary the sound of the emote.
volumeHow loud is the audio emote?

Procs

act_on_targetPerform an action on the target of an emote, if one was found.
can_run_emoteCheck to see if the user is allowed to run the emote.
can_vocalize_emotesReturn whether a user should be able to vocalize emotes or not, due to a mask or inability to speak. If this returns false, any mouth emotes will be replaced with muzzled noises.
check_cooldownCheck whether or not an emote can be used due to a cooldown. This applies to per-emote cooldowns, preventing individual emotes from being used (intentionally) too frequently. This also checks audio cooldowns, so that intentional uses of audio emotes across the mob are time-constrained.
find_targetFind a target for the emote based on the message parameter fragment passed in.
get_soundTo get the sound that the emote plays, for special sound interactions depending on the mob.
get_volumeGet the volume of the audio emote to play.
play_sound_effectPlay the sound effect in an emote. If you want to change the way the playsound call works, override this. Note! If you want age_based to work, you need to force vary to TRUE.
replace_pronounReplace pronouns in the inputed string with the user's proper pronouns.
run_emoteHandles the modifications and execution of emotes.
runechat_emoteSend an emote to runechat for all (listening) users in the vicinity.
select_message_typeSelects the message type to override the message with.
select_paramReplaces the %t in the message in message_param by params.
should_play_soundCheck to see if the user should play a sound when performing the emote.
try_run_emoteTry to run an emote, checking can_run_emote once before executing the emote itself.

Var Details

age_based

Whether or not to adjust the frequency of the emote sound based on age.

audio_cooldown

How long is the cooldown on the audio of the emote, if it has one?

bypass_unintentional_cooldown

If true, an emote will completely bypass any cooldown when called unintentionally. Necessary for things like deathgasp.

cooldown

The cooldown between the uses of the emote.

emote_target_type

If our target behavior isn't to ignore, what should we look for with targets?

emote_type

Whether the emote is visible or audible.

hands_use_check

Checks if the mob can use its hands before performing the emote.

key

What calls the emote.

key_third_person

This will also call the emote.

max_stat_allowed

How unconscious/dead can you be while still being able to use this emote intentionally? If this is set to DEFAULT_STAT_ALLOWED, it'll behave as if it isn't set.

max_unintentional_stat_allowed

Same as above, how unconscious/dead do you need to be to have this emote forced out of you? If this is set to DEFAULT_STAT_ALLOWED, it'll behave as if it isn't set.

message

Message displayed when emote is used.

message_AI

Message displayed if the user is an AI.

message_alien

Message displayed if the user is a grown alien.

message_larva

Message displayed if the user is an alien larva.

message_mime

Message displayed if the user is a mime.

message_monkey

Message displayed if the user is a monkey.

message_observer

Message to display if the user is a spooky observer ghost.

message_param

Message with %t at the end to allow adding params to the message, like for mobs doing an emote relatively to something else. Set this to EMOTE_PARAM_USE_POSTFIX to just use the postfix.

message_postfix

Message postfix with %t used when we don't want to use message_param for our targeting. Used for things like message_monkey or message_mime. Punctuation from the message will be stripped when this is applied, so make sure it's punctuated as well.

message_robot

Message displayed if the user is a robot.

message_simple

Message to display if the user is a simple_animal.

mob_type_allowed_typecache

Types that are allowed to use that emote.

mob_type_blacklist_typecache

Types that are NOT allowed to use that emote.

mob_type_ignore_stat_typecache

Types that can use this emote regardless of their state.

muzzle_ignore

If the emote type is EMOTE_MOUTH but should still bypass a muzzle.

muzzled_noises

Sounds emitted when the user is muzzled. Generally used like "[user] makes a pick(muzzled_noises) noise!"

only_forced_audio

If true, this emote will only make a sound effect when called unintentionally.

only_unintentional

Whether or not the emote can even be called at all if it's not intentional

param_desc

Description appended to the emote name describing what the target should be, like for help commands.

sound

Sound to play when emote is called. If you want to adjust this dynamically, see get_sound().

species_type_blacklist_typecache

Species types which the emote will be exclusively not available to. Should be subclasses of /datum/species

species_type_whitelist_typecache

Species types which the emote will be exclusively available to. Should be subclasses of /datum/species

stat_allowed

How conscious do you need to be to use this emote intentionally?

target_behavior

If we get a target, how do we want to treat it?

unintentional_audio_cooldown

If the emote is triggered unintentionally, how long would that cooldown be?

unintentional_stat_allowed

How conscious do you need to be to have this emote forced out of you?

vary

Whether or not to vary the sound of the emote.

volume

How loud is the audio emote?

Proc Details

act_on_target

Perform an action on the target of an emote, if one was found.

This gets called in select_param if a valid object target was found, and should let you interact with the object being targeted while it's still in scope.

can_run_emote

Check to see if the user is allowed to run the emote.

Arguments:

Returns a bool about whether or not the user can run the emote.

can_vocalize_emotes

Return whether a user should be able to vocalize emotes or not, due to a mask or inability to speak. If this returns false, any mouth emotes will be replaced with muzzled noises.

check_cooldown

Check whether or not an emote can be used due to a cooldown. This applies to per-emote cooldowns, preventing individual emotes from being used (intentionally) too frequently. This also checks audio cooldowns, so that intentional uses of audio emotes across the mob are time-constrained.

Arguments:

Returns FALSE if the cooldown is not over, TRUE if the cooldown is over.

find_target

Find a target for the emote based on the message parameter fragment passed in.

Returns a matched target, or null if a specific match couldn't be made.

get_sound

To get the sound that the emote plays, for special sound interactions depending on the mob.

Arguments:

Returns the sound that will be made while sending the emote.

get_volume

Get the volume of the audio emote to play.

Override this if you want to dynamically change the volume of an emote.

Arguments:

Returns the volume level for an emote's audio component.

play_sound_effect

Play the sound effect in an emote. If you want to change the way the playsound call works, override this. Note! If you want age_based to work, you need to force vary to TRUE.

replace_pronoun

Replace pronouns in the inputed string with the user's proper pronouns.

Specifically replaces they/them/their pronouns with the user's pronouns, as well as %s (like theirs)

Arguments:

Returns the modified msg string.

run_emote

Handles the modifications and execution of emotes.

In general, what this does:

You most likely want to use try_run_emote() anywhere you would otherwise call this directly, as that will incorporate can_run_emote() checking as well.

Arguments:

Returns TRUE if it was able to run the emote, FALSE otherwise.

runechat_emote

Send an emote to runechat for all (listening) users in the vicinity.

select_message_type

Selects the message type to override the message with.

Arguments:

Returns the new message, or msg directly, if no change was needed.

select_param

Replaces the %t in the message in message_param by params.

The behavior of this proc is particularly dependent on target_behavior and emote_target_type. If target_behavior is EMOTE_TARGET_BHVR_RAW, we ignore any sort of target searching. Otherwise, we try to find a target in view to call this emote on based on emote_target_type.

If you want to call something on the target object itself while it's still in scope, override act_on_target().

Arguments:

Returns the modified string, or null if the given parameter is invalid. May also return EMOTE_ACT_STOP_EXECUTION if acting on the target should stop emote execution.

should_play_sound

Check to see if the user should play a sound when performing the emote.

Arguments:

Returns a bool about whether or not the user should play a sound when performing the emote.

try_run_emote

Try to run an emote, checking can_run_emote once before executing the emote itself.

Returns TRUE if the emote was able to be run (or failed successfully), or FALSE if the emote is unusable.