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—from automatic dice rolling and stat tracking to custom world-building tools and special effects. The best part? You don't need to know a single line of code to use them!

Our incredible community has already made dozens of ready-to-use Scripts, and you can add them to any Adventure in just a few clicks. If you are interested in making your own, check out this page.

How to add a Script

  1. Find a Script. Open Discover and choose Filters → Content Type → Scripts, or search for a Script by name. Browse Scripts in Discover →
  2. Save it. Script cards have a Save button instead of Play. Saving a Script keeps it ready for any Adventure.
  3. Add it to your Adventure. In any Adventure, open Game settings → Scripts and select “+ Add Script”. Your saved Scripts are under Saved.
  4. Play! The Script starts working with your next turn.

You can turn Scripts off, reorder them or remove them at any time from the same Scripts tab. Read this page for a full walkthrough.

Note: Scripts are made by community creators, so they can change how your story works in big ways. If something feels off, turn a Script off in the Scripts tab and see if that fixes it.
‣

Can I still add Scripts to my Scenario?

Featured Scripts

‣

Auto-Cards

‣

Inner Self

‣

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 down to Scripting and toggle ON → Scripts Enabled
  5. Select EDIT SCRIPTS
  6. 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
  7. Delete all code within said tab
  8. Copy and paste the correct section of code into the now-empty tab
  9. Repeat steps 5-7 for each respective tab required by your chosen Script
  10. Click the big yellow SAVE button in the top right corner
  11. 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! Players can still turn off the script from the Scripts tab of their adventure.

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)

Scripts not working?

Remember to check in the Gameplay tab of your Account Settings to check if you have both Scripting toggles enabled!

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 2026