Mechanic script reference — SHD.build ISAC

CALCULATION MODEL REFERENCE

MECHANIC SCRIPT LANGUAGE

Read the generated scripts used to explain combat mechanics. ISAC stores and evaluates typed data; displayed scripts are read-only.

TALENT MECHANICS COMBAT CALCULATIONS
01

READING GENERATED SCRIPTS

READ ONLY

Editors create structured events, conditions, state changes, and outcomes. ISAC transcribes those records into a compact script so you can inspect calculation order without reading JSON or application code.

{#each statements as statement}
{statement.token}{statement.meaning}
{/each}
02

NORMALIZED COMBAT EVENTS

{Object.keys(MECHANIC_EVENT_REGISTRY).length} EVENTS

Each branch begins with one event. Event values carry details such as target identity, distance, critical state, movement state, and nearby entity counts.

{#each Object.values(MECHANIC_EVENT_REGISTRY) as event}
{event.label}{event.key}

{event.description}

{#if event.fields?.length}
    {#each event.fields as field}
  • {field.path}{field.label} · {field.type.toUpperCase()}
  • {/each}
{/if}
{/each}
03

ACTION FAMILY RECIPES

{Object.keys(TRIGGER_ACTION_REGISTRY).length} RECIPES

Action Families seed common mechanic shapes. They map familiar game language to normalized events and validated parameters, then copy an editable branch into the source item.

{#each Object.values(TRIGGER_ACTION_REGISTRY) as action}
{action.label}{action.key}
{/each}
04

VALUES, EXPRESSIONS, AND CONDITIONS

Expressions combine numbers with references through addition, subtraction, multiplication, division, minimum, maximum, and clamp operations.

VALUE SOURCES

{#each valueSources as item}
{item.syntax}{item.use}
{/each}

CONDITION OPERATORS

{#each predicateOperators as item}
{item.syntax}{item.use}
{/each}
05

ISAC ATTRIBUTE VARIABLES

{data.attributeSummary.documented}/{data.attributeSummary.total} DOCUMENTED

Attribute outcomes reference the current ISAC Attribute registry. Names and descriptions below update with that data, so improving an Attribute description improves this reference.

{matchingAttributes.length} OF {data.attributeSummary.total} SHOWN
{#each matchingAttributes as attribute (attribute.id)}
{attribute.name}{attribute.unit ? ` (${attribute.unit})` : ''} {attribute.id}
{String(attribute.category ?? 'UNCATEGORIZED').toLocaleUpperCase()} {String(attribute.type ?? 'UNCLASSIFIED').toLocaleUpperCase()} {String(attribute.calculation_type ?? 'UNSPECIFIED').toLocaleUpperCase()}

{String(attribute.description ?? '').trim() || 'DESCRIPTION NEEDED · Add calculation guidance in the ISAC Attribute editor.'}

{#if sourceRanges(attribute).length || attribute.cap_value !== null}
{#each sourceRanges(attribute) as source} {source.label}{source.value}{attribute.unit ?? ''} {/each} {#if attribute.cap_value !== null} CAP{attribute.cap_value}{attribute.unit ?? ''} {/if}
{/if}
{:else}
NO ATTRIBUTE VARIABLES MATCH Change the search terms to inspect another Attribute.
{/each}
06

EVENT REDUCERS

Reducers turn matching event history or current scenario data into an activation. A periodic reducer must name its interval; ISAC excludes a branch when its cadence is unknown.

{#each reducers as item}
{item.syntax}{item.use}
{/each}
07

TRACKED STATE

State pools track stacks, counts, scalars, marks, or resources. Agent pools belong to the build; target pools keep separate values for each enemy.

{#each mutations as item}
{item.syntax}{item.use}
{/each}
08

OUTCOMES AND ORDER

Outcome phases control calculation order. This distinction matters when one event changes Health before another outcome reads current Health.

PHASES

{#each phases as item}
{item.syntax}{item.use}
{/each}

RESULT TYPES

{#each outcomeKinds as item}
{item.token}{item.detail}
{/each}

VALUE BASES

{#each bases as basis}{basis}{/each}
09

PLANNED BUILDER SCENARIOS

MAXIMUM POTENTIAL

The planned mode uses each mechanic’s configured best-case values to calculate a ceiling. It applies peak stacks and maximum supported target or ally counts.

CUSTOM SCENARIO

The planned mode uses player-selected toggles, counts, percentages, and cadence inputs to model a specific combat situation.

10

WORKED MECHANICS

PRECISE TRAUMA

Body shots add one target-bound stack and headshots add two. Each hit refreshes that enemy’s shared one-second expiry; the expiry deals one live Skill Damage value per final stack.

SUPERIOR FIREPOWER

Nine hits on one target add a Relentless stack. Each write refreshes the ten-second pool timer.

HAPPY SURVIVAL

A periodic branch restores Health from nearby-enemy count. Each shot pays its Health cost before calculating additional damage from current Health.