Filters & Predicates

These options are used to define logic for mod functionality.

Filters are used to transform input values, whereas predicates are used to determine a yes/no value. For predicates, any value other than the empty string is considered a “yes”.

FilterChatInput

Default: $trim($input)

Filters messages before they're sent on a chat stream. If this returns the empty string, the command won't be sent to the chat stream.

Tokens:

FilterNarrativeStyle

Default: @($sneakCallout:$input;$capitalize($input))

Filters messages sent on a stream with narrative style enabled.

Tokens:

See also:

FilterNickname

Default: $sub($input 1 50)

Filters names set by players with /name or /nickname. The default option will limit names to 50 characters.

If the empty string is returned, or either error token is set, the command will fail.

Tokens:

  • $input
  • $target: If the name being set is the character name, name. Otherwise, nickname.

See also: EnableSetName.

PredicateAllowChatInput

Default: true

Determines whether chat input is allowed.

If either error token is set, the predicate will be considered a failure.

Tokens:

PredicateAllowLanguage

Default: $has(@(say;shout;whisper;low;faction;safehouse) $stream)

Determines whether roleplay languages can be used for a message.

Tokens:

PredicateApplyBuff

(blank by default)

Determines whether messages sent on a stream will apply buffs to a player. This is a QoL feature intended for roleplay servers.

Tokens:

See also:

PredicateAttractZombies

Default: $has(@(say;shout;meloud;doloud) $stream)

Determines whether a message on a stream will attract zombies.

Tokens:

See also: RangeMultiplierZombies.

PredicateClearOnDeath

Default: true

Determines what information is cleared when a player dies.

For example, if this is set to $neq($field languages), then roleplay languages will not be cleared when a player character dies.

Tokens:

  • $field: The field to check. This will be one of icon, languages, or nickname.
  • $username: The username of the player being checked.

PredicateEnableStream

Default: true

Determines whether a stream is enabled.

Tokens:

PredicateShowTypingIndicator

(blank by default)

Determines whether input will trigger the typing indicator.

For example, to enable typing indicators for ranged streams only, set PredicateShowTypingIndicator to $isRanged.

If FormatMenuName does not resolve for the typing menu type, typing indicators will not display.

Tokens:

  • $chatType
  • $input
  • $isRanged: Populated if the stream is a ranged stream.
  • $range: The range of the chat stream. Not included if it's not a ranged stream.
  • $stream

See also: FormatTyping.

PredicateTransmitOverRadio

Default: $any($has(@(whisper;low) $customStream) $not($customStream))

Determines whether a message should be transmitted over the radio.

This only controls whether messages that have already been transmitted will be visible. For faction/safehouse echo messages, use ChatFormatEcho.

Tokens:

PredicateUseNameColor

Default: $eq($stream say)

Determines whether name colors are used for a message.

Tokens:

See also:

PredicateUseNarrativeStyle

(blank by default)

Determines whether the narrative style is used for a message. If narrative style is used, messages will be enclosed in quotes and prefixed with a dialogue tag depending on the stream.

For example, with the default settings and a modified predicate, a message sent with /yell Hey will be transformed to shouts, “Hey!”. Note that the player name is not included; overhead and chat formats should include it as needed. See the buffy preset for examples.

Tokens:

See also: