What are Scripts and how do you Install them?

What are Scripts and how do you Install them?

What are Scripts and how do you Install them?

Think of Scripts as magical add-ons that can transform your AI Dungeon experience in amazing ways—from automatic dice rolling and stat tracking to custom world-building tools and special effects. The best part? You don't need to be a programmer or know a single line of code to use them! Our incredible community has already created dozens of ready-to-use Scripts that you can install in just a few clicks.

Whether you want to add RPG mechanics, new visuals and themes, track character relationships, or completely customize how your adventures work, there's probably already a Script for that. Installing them is as simple as copy-and-paste, and suddenly your stories can do things you never thought possible. Ready to discover what your adventures have been missing?

Simply choose one of the featured community made Scripts below or browse our Discord's Script Library forum to find many more!

Featured Scripts

Auto-Cards

Hashtag DnD

Story Arc Engine (SAE)

Random Events

Narrative Guidance Overhaul

Immersive D20

Scenario Script Installation Guide:

  1. Use the AI Dungeon website on PC (or view as desktop if mobile-only)
  2. Create a new Scenario or edit one of your existing Scenarios
  3. Open the DETAILS tab at the top while editing your Scenario
  4. Scroll to the bottom and select EDIT SCRIPTS
  5. Select one of the Library, Input, Context, or Output tabs on the left depending on which is required by the Script you wish to install
  6. Delete all code within said tab
  7. Copy and paste the correct section of code into the now-empty tab
  8. Repeat steps 5-7 for each respective tab required by your chosen Script
  9. Click the big yellow SAVE button in the top right corner
  10. And you're done!

Keep in mind that any Adventures created from your Scenario will include the added Script(s). This even applies retroactively for preexisting Adventures!

When combining multiple Scripts, ensure that each of the Input, Context, and Output tabs only include the following lines once:

const modifier = (text) => {
  // Your Script's code goes here
  return { text }
}
modifier(text)

Didn't find the perfect Script for you?

Consider making one yourself, learn about creating Scripts for AI Dungeon or check out Magic's collection of Scripting tips & tricks!

icon
image

© Latitude 2024