Skip to main content

Module hints

Module hints 

Source
Expand description

Scriptwriter pipe-hints on a direction: a source filename and per-cue attribute overrides. Port of _parse_direction_hint and friends.

Structs§

Hints
What a direction’s pipe-hints yielded.

Constants§

HINT_ATTRS
Script-facing hint name → the SfxEntry field it populates. Add a key here to support a new attribute; nothing else needs to change.
LOOPED_CUE_PREFIXES
Cue prefixes whose layers loop, so a play_duration percentage is meaningless — the mixer only honours it for MUSIC / SFX / BEAT.

Functions§

filter_sfx_overrides
Narrow attribute hints to the ones this cue can use: silence cues take none, looped layers drop play_duration.
fmt_g
Python’s %g / f"{v:g}": shortest form, trailing zeros dropped.
format_hint_attr
Render an override back into script-hint form (play_volume_pct=20%). Inverse of the HINT_ATTRS lookup, used by the script regenerator.
hint_range
Accepted range per target field, mirroring the SfxEntry validators.
parse_direction_hint
Split raw into its direction text, source hint and attribute hints.
parse_hint_value 🔒
py_repr
Python repr() of a string: single quotes unless the value contains one.