scene_import_simulator
Imports a simulator save into a new .gil game level, translating Lua, templates, signals, variables, and server rules so simulator content can be played and checked in Genshin.
Instructions
Bring a project of the 千星沙箱模拟器 (miliastra-beyond-simulator, the simulator outside the game for 2D + Lua levels) into a copy of a save, in one call, so that it can be played in the game itself: what passes in a simulator has not passed in the game. save is the simulator's full save (the .json it writes with 导出 → 完整存档; format "qxqy-simulator-save"). Everything it holds is written with the tools of this server: its Lua scripts (the text in the save, or the file beside it), its templates of client controls, its interface with the scripts on the controls that carried them, the rectangles of each device where they differ; the signals its scripts and its server rules name are defined, the variables its rules set are added to the player; and its server rules (when a signal comes from a script: set variables, send signals back) are written as the source of a node graph on the level entity and compiled. Template indices are the save's own after this, so every number in the Lua that was the index of a template in the simulator is put to the new index (only numbers of the Lua itself, never inside a string or a comment). The result says what was written, what could not be (notes: a look of a button the game has no state for, a parameter a rule reads and no script adds; the fill, soft edge and inverted mask of an image come over, and so do signals with several values, typed after what the scripts add), and what scene_check_client finds in the scripts against the finished save. Then playtest_start {mapPath} plays it. Reads the file format only; none of the simulator's code is used. Writes a new .gil in the workspace.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save | Yes | ||
| mapPath | No | ||
| outputName | No |