Skip to content

Attributes

Zynj-git edited this page Apr 20, 2021 · 29 revisions

Attributes

Attributes control what functionalities are applied when processing the contents of the entry.
Attributes are positioned within bracket-encapsulation after a hash symbol in the keys field of entries.
Attributes become executed if the preceding conditions(s) of its line qualify.

Notes
  • The <root>._synonyms path of Objects also accept attributes in the same manner as the keys field.
  • Some attributes accept a value assignment via = to further configure the behavior.
    • Examples: [d=1], [rt=5], [am=3p=3rt]

List of Attributes

This list of attributes details and provides examples of the functionalities applied when the specific attribute is executed.

[d] Descriptor

  • Descriptor attribute.

  • Supplements the entry to the matching word of the last RegEx to form precise descriptors.

  • Default insertion becomes the lastIndexOf of match with the optional value assignment inserting it after match.

    Click for Examples
    keys entry result RegEx
    (your)(?!.*(his|her)).*(eyes?|iris)#[d] azure-blue You look at her eyes.
    She looks at your azure-blue eyes.
    RegEx
    (your)(?!.*(his|her)).*(sword|dagger|lance)#[d] legendary You equip your dagger then unsheathe your legendary sword.
    John#[d=1] (Your Party's Healer) John (Your Party's Healer) casts his spells.

[f] Filter Limiter

  • Filter limits the amount of entries whose group attributes share the same value with others.
  • The first function- attribute present within the brackets becomes the group attribute for the filter.
  • The optional value determines the amount of entries that are allowed from the group.

[i] Ignore

  • Ignore disables the execution of attributes if its count is exhausted.
  • The optional value determines the amount of unique executions before it becomes ignored/disabled.

[l] Length

  • Optional length attribute.

  • Determines the length of lines or history the condition must qualify within.

    • Use /mode to toggle between lines or history (Default)
  • Default length is lines.length with the optional value assignment incrementing the search from zero.

    Click for Examples
    keys entry result RegEx
    (you)#[l=1t] You are... Activates and runs the [t] attribute if (you) qualifies on the most-recent lines/history.
    (you)#[l=20d] very... Activates and runs the [d] attribute if (you) qualifies within the 20 most-recent lines/history.
    (you)#[lt] cool. Non-assignment of the optional value is the same as omitting the attribute in its entirety - results in a search of lines/history.join('\n').slice(info.maxChars)

[p] Positional

  • lines positional attribute.

  • Positions the entry relative to the length of lines in context.

  • Default position becomes lines.length with the optional value assignment pushing it further back.

    Click for Examples
    keys entry result regex
    .#[p=3] [Author's Note: You are the danger.] [Author's Note: You are the danger.]
    You walk to the mall to get yourself some milk.
    At the mall you notice that the store is closed.
    Unaware of the outlandish rage boiling within you, the manager is unprepared for the barrage of complaints you're about to unleash.
    RegEx
    .#[p=3] [Editor's Note: Be indescriptive, let the reader extrapolate information.] [Editor's Note: Be indescriptive, let the reader extrapolate information.]
    The enemy is.
    Enemy swing.
    You ouch.
    (forest|woods?|underbush),goblin#[p=3] Another wave of goblins prepare to strike from the bushes. Another wave of goblins prepare to strike from the bushes.
    > You attack the goblins.
    You kill the goblins and gain goblin loot.
    The next wave of goblins rush at you.

[m] Memory Positional

  • memoryLines positional attribute.

  • Positions the entry relative to the length of memoryLines in context.

  • Default position becomes memoryLines.length with the optional value assignment pushing it further back.

    Click for Examples
    keys entry result RegEx
    (you).*(die|perish)#[m] Death has promised to welcome your presence when the time comes. [... Remember]
    Death has promised to welcome your presence when the time comes.
    [... Story]
    In your final moments, you perish.
    RegEx

[t] Trailing Positional

  • Trailing and relative positional attribute.

  • Trails and positions the entry relative to the last qualifying RegEx in context.

  • Default position becomes the line above the qualifier with the optional value pushing it further back.

    Click for Examples
    keys entry result RegEx
    (you).*(cast|summon|conjure).*(fire-?(ball|vortex|tornado))#[t] > You masterfully incinerate the enemies. > You masterfully incinerate the enemies.
    In the midst of battle, you summon a fire-tornado
    RegEx

[r] Random Selector

  • Random selection attribute.

  • Randomly selects between contesting entries that share the same optional value.

    Click for Examples
    keys entry result RegEx
    (you).*(punch|hit|jab)#[r=1t] > You fail miserably. 33% Chance to pull > You fail miserably. into context as a trailing entry.
    (you).*(punch|hit|jab)#[r=1t] > You masterfully land a blow. 33% Chance to pull > you masterfully land a blow. into context as a trailing entry.
    (you).*(punch|hit|jab)#[r=1d] pitifully 33% Chance to pull pitifully into context as a descriptor of punch, hit, or jab.
    (you).*(shoot|fire)#[rt] > You effortlessly hit your target. 100% Chance to pull > You effortlessly hit your target. into context as a trailing entry.
    • In the above examples, the three first entries have a 33% chance of executing themselves while the fourth is uncontested and thus has a 100% execution rate.

[x] Exclude

  • Excludes the entry from processing until the specified threshold of turns is met.
  • Exclusion is done if its optional assignment is less than the current info.actionCount value.