Streaming Hub 0.1

Expressions

Combine paths, literals, comparisons, arithmetic and Boolean logic in If branches and Step Conditions.

Alpha

Where expressions are used

Use an expression in an If action to choose whether its body runs. You can also open a step's common settings and assign a Step Condition; the individual step runs only when that expression is true. A Step Condition is useful for one guarded action, while If is clearer when several actions share the same branch.

Paths and literals

  • Project variable: {vars.counter}
  • Runtime value: {runtime.ai.last.text}
  • Signal contract: {event.user.name}
  • Number literal: 10 or 2.5
  • Boolean literal: true or false
  • String values are normally compared without wrapping the resolved path in quotation marks, for example {runtime.piper.language}==en.

Comparison operators

  • Equal: {vars.counter}==10
  • Not equal: {event.payload.message}!=event.payload.message
  • Greater than: {event.payload.Amount}>25
  • Greater than or equal: {vars.progress}>=100
  • Less than: {runtime.queue.count}<5
  • Less than or equal: {event.user.level}<=3

Boolean logic

  • AND requires both sides: {runtime.piper.allowed}==true AND {vars.piper_talk}==true
  • OR accepts either side: {event.user.isModerator}==true OR {event.user.isBroadcaster}==true
  • Use parentheses when combining groups: ({vars.mode}==chat OR {vars.mode}==all) AND {vars.enabled}==true
  • NOT can invert a supported Boolean expression where the selected editor accepts it.

If example: donation tiers

Add If with {event.payload.Amount}>=50. Put the large donation animation, sound, and chat reply inside its body. Add another If with {event.payload.Amount}<50 for the normal reaction. This keeps every action in a tier together.

Step Condition example: optional speech

Open Piper Speak Step Details and set its condition to {event.payload.message}!=event.payload.message AND {vars.piper_talk}==true. The step runs only when the event contains a real message and speech is enabled; surrounding OBS steps continue normally.

Missing values

When a placeholder cannot be resolved, Streaming Hub can leave its path text visible. This makes {event.payload.message}==event.payload.message useful as a missing-value check: both sides become the same literal path only when the event supplied no replacement. Test this behavior with the exact signal and field you use.

Type discipline

Compare numbers with numbers and Boolean values with true or false. Do not add decorative quotation marks around a path merely because the resolved value is text; they become part of the expression. Use a period as the decimal separator.

Validation and testing

Use autocomplete, Insert Field, and Encyclopedia contracts instead of typing paths from memory. Test the true case, false case, missing field, zero, and boundary value. Inspect Logs when an expression cannot be parsed or a step is unexpectedly skipped.