Importing Game from JSON
Import Tools
Importing a game or its components from its JSON can be done in three ways:
- Paste the desired JSON object on the page https://qeng.org/import_tasks.php, specify the game ID, and click Import. This link is also available from the “Import tasks” menu item on the game edit page.
- In the editor of a specific task, switch the editing mode to JSON (the JSON button in the editing toolbar) and paste the JSON code of one level there. This allows you to quickly update the settings, codes, bonuses, and hints of a specific level.
- (for developers) Send a POST request to `https://qeng.org/import_tasks.php?gid=<your game ID>&json=1` with a correctly formatted JSON object in the request body. For authentication, you need to retain the cookie from the authorization request, which is described in detail here: Embedding the engine into other services
Objects for Import
Each object that can be imported can be exported to retrieve its structure in the current game, as described in the export instructions section.
Uploading New Levels
If you need to add NEW levels to the game, the JSON should be a list of one or more levels, separated by commas. For the level to be added (rather than updating an existing one), it must NOT have a `number` field inside the `task` settings section. A description of the level structure can be found here.
Editing Existing Levels
If you need to update EXISTING levels in the game, the JSON should be a list of one or more levels, separated by commas, and the `number` field in the `task` settings section must be passed (corresponding to the level number being edited). A description of the level structure can be found here.
If present in the JSON, game settings from the `task` section will replace the existing values in the engine. If fields are omitted from the provided JSON, they will remain as they were.
For other sections (`codes`, `bonuses`, `hints`), if the section is present in the JSON, it will completely replace the existing one. If omitted, the section remains unchanged.
Uploading the Entire Game
It is possible to upload the entire game from a JSON object. For this, the JSON must be a complete game JSON, as described on the JSON structure description page. Additionally, you must add the field "delete_all_tasks": 1 to the JSON to delete all existing levels and reload the game from scratch, for example:
{ "game": { "name": "#New Unnamed Game 2", }, "tasks": [{"task": {"number": 1, "working_name": "Title"}, "codes": [], "bonuses": [], "hints": []}], "gbonuses": [], "lines": [], "delete_all_tasks": 1, }
If present in the JSON, game settings from the `game` section will replace the existing values in the engine. If fields are omitted from the provided JSON, they will remain as they were in the game before.
For other sections (`gbonuses`, `lines`), if the section is present in the JSON, it will completely replace the existing one. If omitted, the section remains unchanged.
Uploading Game Settings
You only need to pass the game settings structure in the JSON, as described on the JSON structure page.
Uploading Global Bonuses
You only need to pass the global bonuses structure in the JSON, as described on the JSON structure page.
Uploading Lines
You only need to pass the global bonuses structure in the JSON, as described on the JSON structure page.
Using AI (chatbots) to Create and Edit Levels
Modern chatbots (ChatGPT, Claude, Gemini, etc.) do an excellent job of generating and editing levels, codes, hints, and bonuses in JSON format for the qeng.org engine.
You can find the ready-to-use system prompt for chatbot configuration in the section: Using AI to create tasks.