Story Cards Import and Export

Story Cards Import and Export

Story Cards Import and Export

Purpose

There are now a million ways to generate small bits of text, and most of them are outside of AI Dungeon. For example, you could give GPT-4 instructions and an example object and ask it to generate new Story Cards for you.

You can now use any method to create Story Cards and can then import those cards into AI Dungeon Scenarios or Adventures.

User Interface

You can find Story Card import / export at the bottom of the Details tab of the Scenario Editor or the Adventure Editor.

icon
Like Scripting, Story Card import / export is currently only available on web. Players using the native iOS and Android apps will not see this section.

Technical Details

Export Format

Story cards can be exported to a JSON file. No other formats are currently supported.

The structure of the JSON file must be a single array containing a list of Story Card objects.

[
  {
    "keys": "Fairy",
    "value": "You are Larry, a fairy living in the kingdom of Larion. You live in a fairy realm hidden under a grassy hill near the castle. Your skin is a light tinge of blue, your wings sparkle in the sunlight and you are very small and good at hiding. You are fascinated by humans and love to watch them from their flowers where you blend in. While you are hiding, suddenly",
    "type": "class",
    "title": "Fairy",
    "description": "You are Larry, a fairy living in the kingdom of Larion. You live in a fairy realm hidden under a grassy hill near the castle. Your skin is a light tinge of blue, your wings sparkle in the sunlight and you are very small and good at hiding. You are fascinated by humans and love to watch them from their flowers where you blend in. While you are hiding, suddenly",
    "useForCharacterCreation": false
  }
]

Import Format

Story Cards can be imported from a JSON file. No other formats are currently supported. If multiple files are selected, only the first file will be imported.

The structure of the JSON file must be a single array containing a list of Story Card objects.

[
  {
    "keys": "Fairy",
    "value": "You are Larry, a fairy living in the kingdom of Larion. You live in a fairy realm hidden under a grassy hill near the castle. Your skin is a light tinge of blue, your wings sparkle in the sunlight and you are very small and good at hiding. You are fascinated by humans and love to watch them from their flowers where you blend in. While you are hiding, suddenly",
    "type": "class",
    "title": "Fairy",
    "description": "You are Larry, a fairy living in the kingdom of Larion. You live in a fairy realm hidden under a grassy hill near the castle. Your skin is a light tinge of blue, your wings sparkle in the sunlight and you are very small and good at hiding. You are fascinated by humans and love to watch them from their flowers where you blend in. While you are hiding, suddenly",
    "useForCharacterCreation": false
  }
]

Only keys and value are required fields, the rest of the fields are optional.

If an import file is not a valid JSON format, an error will be shown.

Values in an import array that do not match the correct format will be ignored.

If you’re not sure why an import is failing, try a JSON validator, like this one.

Import Process

icon
When a valid file is imported, the new set of Story Cards will fully overwrite the previous set of Story Cards.

If the import file contains Story Cards with identical keys and types, only the first card for each keys / type combo will be used. A single key can appear in the keys value for multiple Story Cards of the same type, as long as the full keys value is unique.

FAQ

Why isn’t Story Card import / export supported for worlds?

All of the features of worlds have been migrated to Scenarios, and after AI Dungeon Legacy is shut down, we will be converting all existing worlds into Scenarios. Since worlds are now deprecated, we have not added support for Story Card import / export to worlds.

Why isn’t Story Card import / export supported on native?

While React Native allows us to share most of our client code between the web version and the native apps, interacting with the file system is a feature that does not have a shared implementation.

Why does import replace all of the Story Cards instead of just adding to them?

Replacing the Story Cards on import gives you the maximum amount of power with the minimum amount of complexity. For example, if you want to remove all of the Story Cards from a Scenario or Adventure, you could import an empty array, and all of the Story Cards would be removed. Supporting the same range of behavior without doing a full replacement would require a much more complex interface.

Why aren’t duplicate keys allowed?

It's easy to accidentally create massive amounts of duplicate Story Cards, so exact duplicate keys with the same type are not allowed when creating Story Cards through import or Scripting.

However, note that this only applies if all of the keys are exactly the same, so you could have human,king and human,queen as separate keys, and that's fine since the combination is different. You could even technically have human,king and king,human if you want. The one case you can’t have is two separate Story Cards for human,king and human,king where all of the keys are exactly the same and are in exactly the same order.

icon
image

© Latitude 2023