⚙️ Technical Deep-Dive

Short Description

This document explores the internal mechanics of the Gorgeous Events state machine, the construction pipeline, and the automated voiding system.

Long Description

Gorgeous Events are built on a deterministic state machine that ensures every event follows a strict lifecycle: InvalidTriggeredInitializedStartedProcessingFinished. The system integrates deeply with the Object Variable system for data persistence and the Voiding system for dependency management.

🔄 Event Lifecycle

The lifecycle is managed by UGorgeousEvent and observed by the UGorgeousEvents_GIS subsystem.

stateDiagram-v2
    [*] --> Triggered: Create Event
    Triggered --> Initialized: Construction Complete
    Initialized --> Started: OnEventStarted
    Started --> Processing: OnEventProcessing
    Processing --> Finished: OnEventFinished
    Finished --> [*]: Voiding / Cleanup
    
    Processing --> Processing: Sub-Events / Loop
    Processing --> Finished: All Voiding Requirements Met

🏗️ The Construction Pipeline

Events are created using a two-phase process to ensure all variables are ready before logic starts.

  1. Handle Creation: UGorgeousEvents_GIS creates a UGorgeousConstructionHandle.
  2. Assignment: The UGorgeousAssignmentMapper applies initial values to the event's Object Variables.
  3. Build: The handle consumes the mapper and returns the fully initialized UGorgeousEvent.

⏸️ Voiding System Mechanics

The Voiding system prevents an event from finishing until its VoidingContexts are cleared.

  • Context Registration: Events can register requirements like "Wait for Animation", "Wait for Input", or "Wait for Sub-Event".
  • Pause/Resume: The event remains in the Processing state while contexts are active.
  • Auto-Voiding: Some actions automatically register voiding contexts that clear upon completion.

🌲 Flow Tree Interpreter

The UGorgeousFlowTreeInterpreter executes UGorgeousFlowTree assets by converting nodes into a sequence of Gorgeous Events.

  1. Traversal: The interpreter follows the tree edges based on node results.
  2. Execution: Each node triggers a specific event or logic block.
  3. State Management: The interpreter tracks the active node and handles branch resolution.