CS222-UIUC / VNEditor

web-driven visual novel editor
2 stars 1 forks source link

finish four engine-side router #37

Closed TwinIsland closed 1 year ago

TwinIsland commented 1 year ago

support four manipulation on the engine, include:

  1. get_fid: get all frame id in game content in order
  2. engine_meta: get the metadata about the engine
  3. append_frame: append one frame into the game content, you can see a more detailed description about this part below
  4. commit: commit all the changes you made after the last commit, you can use it to achieve save function
  5. meta: get the metadata about the game content, include frame number, head/tail of frame, etc..

about append_frame

except task_id, its argument also include force, by setting it to be True, engine will skip checking if the given frame is valid or not. For the request body, it likes:

{
  "background": "background file name, not directory",
  "chara": [
    "character file name, not directory"
  ],
  "chara_pos": [
    [
      "coordinate of character at background, e.g. [12.1, 22.133]"
    ]
  ],
  "music": "music file name, not directory",
  "dialog": "dialogue in this frame",
  "dialog_character": "dialogue by who"
}

I'll finish the get_frame during this week, comment in issue to report bugs

Tesseract22 commented 1 year ago

Approved