Schema Export/Import & AI Workflow
All three SQF wizards support schema export and import for AI-assisted content generation. Export your property definitions and existing data, paste the schema into an AI model (ChatGPT, Claude, Gemini, etc.), and import the AI's output directly back into your wizard.
This page covers everything you need to know about using AI to rapidly scale your quest content — from why it works, to the exact export formats, to a hands-on example you can follow step by step.
Why Use AI for Quest Generation?
Designing quests by hand is rewarding but slow. A single well-crafted quest with objectives, rewards, prerequisites, and flavor text can take 10–30 minutes. Multiply that by the 50–200 quests a typical RPG needs and you are looking at weeks of content work.
AI changes that equation dramatically. Here is the idea:
Set up your Categories, Flags, Numerics, and Texts in Step 2 (or apply a genre template). Optionally, create a few "seed" quests in Step 3 to establish your naming conventions and reward scale — this gives the AI concrete examples to learn from and produces better output, but it is not required. The schema export works perfectly with zero quests; the embedded instructions and property definitions alone are enough for the AI to generate valid data.
One click produces a JSON or Markdown file that contains your full property system, any existing quests, and over 15 sections of machine-readable instructions that teach the AI exactly how your data is structured.
Paste the export into ChatGPT, Claude, Gemini, or any other model. Ask for 20, 50, or 100 more quests. The AI matches your patterns — same property indices, same objective structures, same reward ranges — because the schema tells it exactly what is valid.
Save the AI output as a
.json file, import it back into the wizard, and review. You now
have a full quest database in minutes instead of weeks.
The key insight is that AI models are excellent at pattern replication. When you give them concrete examples plus structured rules, they produce output that is remarkably consistent. The SQF schema export is specifically designed to maximize that consistency — it does not just dump your data, it teaches the AI how to think about your quest system.
Overview
Schema export/import is accessed from Step 2 (Definitions) of each wizard via four buttons at the top of the step:
- Export Full JSON — Complete schema with data, instructions, and integration info
- Export Light JSON — Definitions and instructions only, no existing data
- Export Markdown — Human-readable tables and code blocks for chat interfaces
- Import Schema (JSON) — Load AI-generated JSON back into the wizard
This system is available in all 3 wizards: Quest Forge, Quest Chain Forge, and Procedural Quest Forge. Each wizard produces its own schema format tailored to that wizard's data structure, but all three follow the same export/import workflow described on this page.
Window > Simple Quest Forge, navigate to Step 2 — Definitions,
and look for the export/import foldout at the top of the panel. The four buttons are grouped together
under a "Schema Export/Import" header.
Export Modes
SQF offers three export formats, each suited to a different workflow. All three contain the same underlying information but present it differently depending on whether you need machine precision or human readability.
Full JSON
The most comprehensive export. This is the format you should use when you want the AI to generate a large batch of quests in one shot with minimal back-and-forth. The exported file contains five major sections:
1. schemaInfo
Metadata about the export itself. Contains the schema version number, the
templateType that was active when the export was created (if you applied a genre template),
and a timestamp recording when the export happened. The AI generally ignores this section,
but it is useful for your own bookkeeping when you have multiple export files.
2. instructions
This is the heart of the schema. It contains 15+ subsections of detailed guidance written specifically for AI consumption. These subsections include:
- whatQuestsAre — Explains what quests represent in your game context and how the property system works
- ecosystem — Describes the SQF ecosystem (Quest Forge, Quest Chain Forge, Procedural Quest Forge) so the AI understands where the data fits
- questionsToAskUser — Prompts the AI should ask you if information is missing (theme, difficulty range, narrative tone, etc.)
- whatYouCanDo — Explicitly lists what the AI is allowed to generate (new quest entries, objectives, rewards, property values)
- whatYouCannotDo — Explicitly lists what the AI must NOT change (property definitions, category entry lists, the schema structure itself)
- propertyGuidance — Per-property instructions including usage hints for every category, flag, numeric, and text field you defined
- designGuidance — Archetype patterns for 8 quest types (Kill, Collect, Escort, Delivery, Defense, Exploration, Talk/Interact, Multi-Objective) with recommended property configurations for each
- aiSpecificGuidance — A 6-phase workflow the AI should follow: (1) read schema, (2) study examples, (3) ask clarifying questions, (4) generate batch, (5) self-validate, (6) output clean JSON
- criticalNotice — Warnings about common mistakes (wrong field names, invalid indices, missing nested arrays)
Because these instructions are embedded directly in the JSON, the AI reads them automatically when you paste the file. You do not need to write your own prompt explaining the data format — the schema does it for you.
3. definitions
Your complete property system, exported exactly as you defined it in Step 2. For the Quest Forge this includes two levels of definitions (quest-level and objective-level), each with four property types:
- Categories — Each with a
label, anentriesarray of string values, and anallowMultipleflag - Flags — Each with a
nameanddefaultValue - Numerics — Each with a
name,isRange,isInteger,min, andmaxconstraints - Texts — Each with a
nameandlineCount
The AI uses this section to understand what values are legal. For example, if you have a "Difficulty"
category with entries ["Easy", "Medium", "Hard", "Legendary"], the AI knows that the
categoryValues for that slot must be an integer index from 0 to 3.
4. data
All of your existing quests (or chains, or procedural templates) serialized with full nested detail. For quests, each entry includes the code, name, description, icon reference, objectives array, rewards array, prerequisites array, and all dynamic property value arrays. This section serves as the AI's example set — the more quests you include, the better the AI understands your patterns.
5. jsonFormatExample
A complete, working JSON example showing the exact field names and nesting structure the AI must use
when generating new entries. This section is critical — without it, AI models
frequently guess wrong on field names (for example, using "name" instead of
"label" for category definitions, or "options" instead of
"entries"). The format example eliminates that guesswork entirely.
Light JSON
Contains definitions and instructions only, with an empty data array and no integration data. The instructions include a note telling the AI to ask you for context before generating.
When to use Light JSON:
- You want an interactive session with the AI rather than a one-shot bulk generation
- You are iterating on your property system and want the AI to suggest improvements before you commit to a design
- You want to describe your game verbally and have the AI generate quests based on your description plus the property constraints, rather than copying patterns from existing examples
- You are working with an AI that has a small context window and the Full JSON is too large (Light JSON is typically 60–80% smaller)
The trade-off is that without example data, the AI has less context about your intended style. You will likely need to provide more guidance in your prompt to compensate.
Markdown
A human-readable format that presents the same information using Markdown tables, bullet lists, and fenced code blocks. The property definitions become neat tables, the existing quests become structured entries with labeled fields, and the AI instructions are formatted as readable prose.
When to use Markdown:
- You are pasting directly into a chat interface (ChatGPT web UI, Claude chat, etc.) where JSON would be hard to read
- You want to review the export yourself before sending it to the AI
- You are using an AI that handles Markdown better than raw JSON (most chat-oriented models)
Cross-Reference Data
When you have external databases linked in your wizard's Setup step (Step 1), the Full JSON export automatically includes cross-reference data from those databases. This gives the AI visibility into what enemies, items, factions, and other quests exist in your project so it can generate quests that reference real game entities.
What Gets Included
Depending on which integrations you have linked, the export may include:
| Integration | Field in Export | Source |
|---|---|---|
| Simple Enemy Forge | linkedEnemies |
Enemy databases linked in Setup |
| Simple Item Forge | linkedItems |
Item databases linked in Setup |
| Simple Enemy Forge | linkedFactions |
Faction databases linked in Setup |
| Quest Forge (self) | availableQuests |
Other quest databases linked in Setup |
SchemaLinkedEntry Format
Each linked entity is exported as a {code, name} pair, using the SchemaLinkedEntry
format. For example:
This gives the AI both the machine-readable code (which it should use in objective target fields) and the human-readable name (which helps it understand what the entity actually is). The AI can then generate quest objectives like "Kill 5 WOLF_ALPHA" instead of inventing enemy codes that do not exist in your project.
Getting Full Metadata
The cross-reference data only includes codes and names — it does not include full property details from the linked databases. If you want the AI to understand your enemies' stats, items' properties, or factions' relationships in depth, the schema instructions include a note telling the AI:
For example, if your SEF export shows that DRAGON_FIRE has 5000 HP and is weak to ice, the AI might generate a quest chain where the player first acquires an ice weapon (SIF data) before facing the dragon (SEF data) as a quest objective (SQF data).
Import Process
Click Import Schema (JSON) and select a JSON file. The import process walks you through a series of dialogs to give you full control over how the imported data merges with your existing work.
The importer validates the JSON structure and extracts the definitions and data sections. If the JSON is malformed (missing brackets, trailing commas, etc.), you will see an error dialog at this stage. Make sure to strip any
```json wrappers before importing (see
Common Pitfalls below).
If the JSON contains a
definitions section, a dialog asks how to handle it:
- Replace All — Overwrites your existing property definitions with the ones from the JSON. Use this if the AI restructured your properties and you want to accept those changes.
- Keep Existing — Skips the definitions import entirely. Your current property system stays unchanged. This is the most common choice, since you usually want to keep your own definitions and only import new quest data.
- Cancel — Aborts the entire import.
If the JSON contains quest/chain/template entries, a second dialog asks:
- Replace All — Clears your existing data and replaces it with the imported entries. Use this when starting fresh from an AI-generated batch.
- Add to Existing — Appends the imported entries to your current data. If an entry has the same code as an existing one, the duplicate is skipped (first-wins). This is the most common choice for incremental AI generation.
- Cancel — Aborts the import (definitions may already have been imported if you chose Replace All in the previous step).
Each entry is validated individually: valid codes (no duplicates, no empty strings), matching property array lengths (categoryValues count must match number of category definitions), valid nested structures (objectives must be arrays, not flat fields), and valid references (enemy codes, item codes, quest codes checked against linked databases). A result popup shows:
- Imported — Number of entries successfully added
- Skipped — Number of entries skipped (duplicate codes or validation failures)
- Errors — Serious problems that prevented import (malformed entries)
- Warnings — Non-blocking issues (e.g., property array length mismatch was auto-corrected by padding or truncation)
```json ... ```), remove the markers before importing. The importer expects
pure JSON. See Common Pitfalls for details.
Recommended AI Workflow
This is the general workflow for AI-assisted quest creation. The next section walks through a concrete example with real quest data.
Use Step 2 to define your property system (or apply a template from the Templates dropdown). Optionally create a few example quests in Step 3 to establish your patterns and tone — this is recommended for best results but not required. If you do add seed quests, vary the quest types (kill, fetch, escort, etc.) so the AI sees the range of structures you expect.
Click "Export Full JSON" in Step 2. This creates a comprehensive file with your definitions, examples, integration data, and detailed AI instructions. Save it somewhere accessible. The file is typically 5–50 KB depending on how many quests you have.
Paste the JSON (or Markdown export) into your AI model. Tell it how many quests you want and any specific themes or constraints. For example: "Generate 20 more quests following these patterns. Focus on early-game content (levels 1-10). Include a mix of kill, collect, and escort quests." The schema's built-in instructions guide the AI on format, property usage, and design patterns, so you can keep your prompt short.
Copy the AI's JSON output, paste it into a text editor, save it as a
.json file, and
import it via "Import Schema (JSON)" in Step 2. Choose "Keep Existing" for definitions and "Add to
Existing" for data. Review the result popup for any skipped entries or warnings.
Switch to Step 3 and browse the imported quests. Check that property values make sense, objectives reference valid targets, and reward amounts are balanced. Edit any entries that need adjustment. If the overall quality is good but you want more variety, export again (now with a larger example set) and ask the AI for another batch.
Example Workflow: RPG Quests
This section walks through a complete, concrete example of using the AI workflow to populate an RPG quest database. Follow along to see exactly how each step works in practice.
Step 1: Set Up Properties (and Optionally Seed Quests)
Open the Quest Forge Wizard (Window > Simple Quest Forge > Quest Forge Wizard).
In Step 2, set up your properties. You could export right now with zero quests and the AI would
produce valid output — but for this example, we will add a few seed quests to show how they
improve AI consistency. Assume you have:
- Category: "Quest Type" — Entries: Main Story, Side Quest, Bounty, Daily
- Category: "Difficulty" — Entries: Easy, Medium, Hard, Legendary
- Flag: "Is Repeatable" — Default: false
- Numeric: "Recommended Level" — Integer, range 1–50
- Numeric: "Gold Reward" — Integer, range 0–10000
- Text: "Flavor Text" — 3 lines
In Step 3, optionally create a few hand-crafted quests to serve as examples for the AI:
| Code | Name | Type | Difficulty | Level | Gold |
|---|---|---|---|---|---|
WOLF_MENACE |
The Wolf Menace | Side Quest (1) | Easy (0) | 3 | 50 |
LOST_PENDANT |
The Lost Pendant | Side Quest (1) | Medium (1) | 8 | 150 |
DRAGONS_BANE |
Dragon's Bane | Main Story (0) | Legendary (3) | 45 | 5000 |
Give each quest 2–3 objectives, a reward entry, and a few sentences of flavor text. The variety matters — you have an easy kill quest, a medium fetch quest, and a hard boss quest. The AI will see these three archetypes and generate quests that span the same range.
Step 2: Export Full JSON
Go back to Step 2 and click Export Full JSON. Save the file as
rpg_quests_schema.json. The exported file will contain your property definitions,
any existing quests, linked database codes, and the full instruction set.
Step 3: Prompt the AI
Open ChatGPT, Claude, or your preferred AI model. Paste the contents of
rpg_quests_schema.json and add a prompt like:
The AI will read the embedded instructions, study your three examples, and generate 20 quests that match your format exactly.
Step 4: Save and Import
Copy the AI's JSON output into a text editor. Verify it starts with { and ends with
} (no ```json wrappers). Save it as ai_generated_quests.json.
Back in the Quest Forge Wizard, Step 2, click Import Schema (JSON) and select your file. In the dialogs:
- Definitions dialog: Choose Keep Existing (your property system is already set up)
- Data dialog: Choose Add to Existing (append to any existing quests)
The result popup will show something like: Imported: 20, Skipped: 0, Warnings: 0.
Step 5: Review in Step 3
Switch to Step 3. You now have 20+ quests. Browse through them, check the objectives, adjust any values that feel off, and you are done. If you want more, export again (now with a larger example set for even better AI context) and repeat.
Quest Forge Schema
The Quest Forge schema is the most complex due to the two-level property system and nested sub-entries. The exported JSON includes:
- Quest-level definitions — 4 property types (categories, flags, numerics, texts) that apply to the quest as a whole (e.g., Quest Type, Difficulty, Recommended Level)
- Objective-level definitions — 4 property types that apply to individual objectives within a quest (e.g., Objective Type, Target Count, Is Optional)
- Quests — Each with
objectives[],rewards[],prerequisites[], and both levels of dynamic property value arrays - 18 schema classes internally for full round-trip fidelity
The instructions section includes guidance on 8 quest design archetypes:
Kill Quest
Defeat X enemies. Objectives reference enemy codes. Scale count and difficulty with level.
Collect Quest
Gather X items. Objectives reference item codes. Can combine with kill (drops).
Escort Quest
Protect an NPC. Single objective with success/failure conditions. Usually higher reward.
Delivery Quest
Bring item A to NPC B. Simple structure, good for world-building flavor text.
Defense Quest
Hold a position. Wave-based objectives with enemy codes. High tension, high reward.
Exploration Quest
Discover locations. Multiple objectives for each area. Good for encouraging map traversal.
Talk / Interact
Dialogue-driven. Objectives are NPC interactions. Low combat, high narrative value.
Multi-Objective
Combines 2+ types. Kill enemies AND collect items AND talk to NPC. Complex but engaging.
Quest Chain Schema
The Quest Chain schema exports:
- Chain-level definitions — Single-level properties (no sub-entry properties). These describe the chain as a whole (e.g., Chain Type, Region, Is Main Storyline).
- Chains — Each with a
steps[]array. Each step contains:questCode— References a quest from your linked quest databasessortOrder— Determines step sequenceisRequired— Whether the step must be completed to advance the chainbranchGroup— Groups steps into branches for branching chain structures
- Available quest codes — From linked quest databases, exported as
{code, name}pairs so the AI knows which quests it can reference in chain steps - 15 schema classes for chain step validation and branch group integrity
Procedural Quest Schema
The Procedural Quest schema exports:
- Template-level definitions — Single-level properties describing the template (e.g., Template Category, Difficulty Range, Is Timed)
- Templates — Each with:
variables[]— Dynamic tokens the runtime fills in (source type, pool linkage, min/max ranges)objectiveTemplates[]— Templated objectives with{variable}token placeholders in description textrewardTemplates[]— Templated rewards with variable-driven amounts
- Variable system documentation — Detailed explanation of source types (Random,
Pool, Context), pool linkage to enemy/item/faction databases, and
{TOKEN}syntax for text substitution - 8 template archetype patterns — Kill Bounty, Fetch, Escort, Delivery, Defense, Investigation, Gathering, Challenge — each with recommended variable setups and objective structures
- 17 schema classes for template and variable validation
Procedural templates are more abstract than regular quests. Instead of "Kill 5 Alpha Wolves", a template might say "Kill {COUNT} {ENEMY}" where COUNT is a Random variable (range 3–10) and ENEMY is a Pool variable linked to your enemy database. The AI excels at creating these templates because the pattern is highly structured.
Common Pitfalls
Even with the detailed instructions embedded in the schema, AI models occasionally make mistakes. Here are the most common issues and how to fix them:
1. Wrong Field Names for Definitions
The most frequent error. The AI uses "name" instead of "label" for
category definitions, or "options" instead of "entries" for category
values.
Prevention: The jsonFormatExample section in Full JSON export was
designed specifically to prevent this. If you are using Markdown export or Light JSON, paste the
format example separately or tell the AI to use the exact field names shown.
2. String Values Instead of Integer Indices for Categories
Categories are stored as integer indices into the entries array, not as string values. AI models sometimes output the human-readable string instead of the index.
Prevention: The schema instructions explain the integer index system, but you can reinforce it in your prompt: "Remember: categoryValues are integer indices, not strings."
3. Flat Fields Instead of Nested Arrays
AI models sometimes output objectives and rewards as flat fields on the quest object instead of nested arrays. This happens most often with models that try to "simplify" the structure.
Prevention: If possible, include a few example quests with full nested structures in your export — the AI copies the nesting pattern from your examples. Alternatively, add an explicit note in your prompt: "objectives and rewards must be arrays, not flat fields."
4. JSON Wrapped in Code Fences
Most AI chat interfaces wrap code output in Markdown code fences. The SQF importer expects pure
JSON and will fail if it encounters ```json at the start of the file.
Prevention: Add "Output ONLY the raw JSON with no markdown formatting,
no code fences, and no explanation text" to your prompt. Alternatively, just strip the
```json and ``` lines manually before saving the file.
5. Property Array Length Mismatch
If you have 3 category definitions, every quest must have exactly 3 values in its
categoryValues array. AI models sometimes add extra values or omit some.
Prevention: The importer handles minor mismatches gracefully (padding with defaults or truncating), but it logs warnings. To avoid them, tell the AI: "Every quest must have exactly N categoryValues, M flagValues, etc." with the actual counts from your schema.
6. Invalid or Invented Codes
The AI may invent enemy codes, item codes, or quest codes that do not exist in your linked databases.
For example, generating an objective with "targetCode": "GOBLIN_KING" when your enemy
database has no such entry.
Prevention: The Full JSON export includes all linked codes in the cross-reference section. Tell the AI: "Only use enemy/item/faction codes from the linked lists in the schema. Do not invent new codes."
Tips for AI Generation
Use Full JSON for Bulk
Full JSON gives the AI everything it needs to generate quests that perfectly match your property system. Use it when you want 20+ quests generated in one shot. The embedded instructions eliminate the need for lengthy prompts.
Use Markdown for Chat
Markdown is easier for AI to read in a chat context. Use it when you want to have a conversation with the AI about your quest design before generating. The tables and formatting make it easy for both you and the AI to reference specific properties.
Include Examples
Create 3–5 hand-crafted quests before exporting. AI models learn from your examples and generate more consistent, well-structured quests when they can see your patterns. Vary the quest types to show the full range of structures you expect.
Validate After Import
Always review imported quests in Step 3. Check that category indices are valid, numeric values are within constraints, objectives reference real target codes, and text fields match your tone. The importer catches structural issues but cannot judge game balance.
Iterate in Batches
Generate 20 quests, review them, fix issues, then export again with the larger dataset. Each round gives the AI better context. Three rounds of 20 produces better results than one round of 60.
Use Light JSON for Brainstorming
When you are still designing your property system, export Light JSON and ask the AI to suggest quest ideas based on your definitions. This is great for discovering gaps in your property system before committing to a full generation pass.
Be Specific in Prompts
Instead of "generate 50 quests", say "generate 15 side quests for a forest zone, levels 5-15, mostly kill and collect types". Specificity produces more usable results with fewer edits needed.
Cross-Reference Schemas
If you use Simple Enemy Forge or Simple Item Forge, export those schemas too and paste all of them into the same AI conversation. The AI will generate quests that reference your actual enemies and items instead of generic placeholders.