Skip to content

Нарративный скриптинг и отдельный аддон для него - #122

Open
HollowHorizon wants to merge 86 commits into
devfrom
v2.6-narrative-addon
Open

HollowHorizon wants to merge 86 commits into
devfrom
v2.6-narrative-addon

Conversation

@HollowHorizon

Copy link
Copy Markdown
Collaborator

Вся сюжетная логика переезжает в аддон. Пересмотрена система State-функций с некоторыми расширениями:

  • Чекпоинты и фиксация изменений
  • Отменяемые действия
  • Лямбды и асинхронные действия с сохранениями
  • State-функции в произвольных файлах

@HollowHorizon
HollowHorizon force-pushed the v2.6-narrative-addon branch 2 times, most recently from 7a26713 to 05ac86e Compare October 24, 2026 17:21
Move dialogue runtime, UI, `.story` tooling, resources, and tests into a standalone Narrative addon. Add extension points for IDE script templates and camera poses, and rebuild scripting environments when addon contributions change.
Extract dialogues and cutscenes into the Narrative addon, with shared camera and timeline extension points. Add type-aware IDE context completions and load freshly built addons directly in development runs.
Introduce a compiler and runtime for persistent story stages, including resumable call stacks, saved locals, checkpoints, stage lambdas, and parallel branches. Replace the previous state executor and wire story lifecycle and persistence into scripts and nodes.
Support stage lambdas with receivers and up to eight parameters, and save stage receivers and context parameters as arguments. Improve restart-safe control flow, iterable loops, value serialization, and recovery when saved locals or calls no longer match.
Journal serializable action calls so stories can undo and redo changes across restarts. Add checkpoint labels, temporary actions, story controls, and reversible NPC movement and interaction APIs.
Add FIR diagnostics for stage and action constraints, prevent unsafe lambda captures, and preserve saved lambda result types across restarts. Improve branch lifecycle and concurrency, isolate NBT snapshots, add recoverable story saves, and handle loop overflow and coroutine cancellation safely.
Show stage, checkpoint, and reversible-action markers with localized tooltips, and keep gutter markers and run targets aligned while edits are pending analysis. Also report when captured mutable variables need an initializer.
Replace StoryHandle-based test state with an Any? local, isolating checks that stage analysis rejects non-saveable captured variables.

And fix #121
Decode whole NBT tags at the root and log deserialization failures. Resolve saved narrative variables through registered script paths so their keys remain stable when worlds move.
Save entity-owned stories during entity serialization instead of eagerly on every change, and allow undo to resolve off-world NPCs. Add distinct checkpoint colors and navigation targets for rewind and temporary calls.
Treat cancellations caused by an unloaded, non-destroyed entity as a wait for that entity to return. Other external cancellations now fail the story instead of saving it in a state with nothing to resume.
Treat direct action calls as stage boundaries so completed actions are not repeated and interrupted actions finish under their existing journal record after a restart. Persist serializable action results, recognize action aliases, and mark action boundaries in the editor gutter.
Run position and entity-follow movement inside forceLoad so NPCs can finish walks without nearby players. Treat stale entity references replaced in the registry as unloaded during story actions.
Add Kotlin-aware smart indentation, delimiter pairing, and multiline selection wrapping to text fields. Improve popup focus handling and add a console control to clear the visible log entries.
Collect member and extension completions for typed receivers after handling package receivers. Add coverage for UI modifier chains, class and companion receivers, and importable extensions.
Let UI sounds and audio previews start, advance, and finish while gameplay is paused, while preserving pause behavior for gameplay sounds.
Add `ServerLevel.npc` to configure NPCs before spawning and return an existing NPC when its ID is already active. Deprecate the older `npc` helper in favor of the new API, and explicitly type the NPC goal selector.
HollowHorizon and others added 30 commits November 1, 2026 21:14
Reuse unchanged layout subtrees and cache measurements, streamline style and render work, and preserve graph node identity across visibility changes. Add regression tests for layout reuse and state invalidation.
Co-Authored-By: _BENDY659_ <109421782+bendy659@users.noreply.github.com>
Add F2 symbol renaming across project scripts, animation-name diagnostics, and model previews for animation completions.
Support story functions with parameters, results, and flow callbacks, including calls to functions in other stories. Add function editing and navigation in the graph IDE, plus compiler and persistence support.
Track values that must survive stage boundaries and report unsaveable locals, while supporting more stage-lambda and call patterns. Strengthen story graph checks for import cycles, reserved names, and stages inside plain blocks; fix literal handling for untyped values.
Add a story-context operator and prioritize type-compatible nodes when linking graph values. Remove entity NBT merge/read commands, add empty-slot equipment icons, and render dragged items in an overlay that doesn't resize the inventory.
Infer block types from connected values, add nested sections for structured inputs and outputs, and handle nullable values with checks and fallbacks. Update graph pin styling and links, and register additional NBT serializers.
Add type-aware fields for strings, numbers, enums, flags, and vectors, with value snippets and arithmetic input. Improve Kotlin highlighting and completion snippets, support container parameters and expression nodes, and update position helper behavior and documentation.
Add a reusable registry picker with search, inventory and full-registry tabs, and configurable block-state properties. Migrate narrative graph fields to the new picker and centralize centered popup alignment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant