$ show AyayaXiaowang/Ayaya_Miliastra_Editor
This repository is a desktop application for game content creation, specifically designed for a Genshin Impact-like game. It provides a node-based visual scripting system (Graph Code) where users create logic using interconnected nodes representing game functions (combat, skills, UI, etc.). The application features a PyQt6-based GUI for graph editing, resource management, and previewing, along with automation capabilities for OCR, screen capture, and input simulation to interact with the editor. It includes a robust validation engine to ensure graph correctness, a layout engine for auto-arranging nodes, and export pipelines to produce game-ready formats (.gil and .gia). The architecture is monolithic with distinct modules for the GUI (app/ui/), automation (app/automation/), core engine (engine/), and CLI tools (app/cli/ and private_extensions/ugc_file_tools/). Key entry points are the main GUI launcher (app.cli.run_app), validation CLI (app.cli.graph_tools), and the unified UGC tools CLI (private_extensions/ugc_file_tools). Data flows involve graph creation/editing, validation, layout, export/testing, and automation-driven interactions. External dependencies include PyQt6, RapidOCR (onnxruntime), OpenCV, Pillow, and keyboard/mouse libraries for automation.
The LLM identified 4 files worth highlighting for reuse:
Defines the @node_spec decorator and NodeSpec class for declaring node metadata (inputs, outputs, description, generic/enum constraints). This isolated pattern allows defining visual scripting nodes with strong typing and documentation, enabling extraction to other projects needing a node-based system. Demonstrates non-obvious skill in creating a clean, reusable node contract system.
Provides the base ValidationRule class with a standardized apply() method returning a list of EngineIssue objects. This pattern is used across hundreds of validation rules for graph code structure, signals, structs, etc. The base class is decoupled from specific rules, making it easily reusable in other validation contexts. Shows skill in designing an extensible, rule-based validation framework.
Facades port-type inference logic for resolving generic types, enum options, and variadic ports during node connection. This module isolates complex type inference from UI automation and editor recognition, allowing reuse in other visual programming systems. Demonstrates skill in handling type safety and generic constraints in a node graph context.
Provides a service facade for UI workbench functionality (caching, naming, import/export, variable defaults) via re-exported submodules. This decouples the main application from UI-specific concerns, enabling independent evolution and reuse in other applications needing UI state management. Demonstrates skill in defining clean service boundaries and dependency injection.