How do I write Scripts and use Scripting?

How do I write Scripts and use Scripting?

icon
This article is under construction! It seems you’ve stumbled across an unfinished article. There may be missing information, empty sections, or poor formatting. If you don’t find it helpful, please check back later, or look for help on our Discord.

How to use Scripting

Scripting allows you to attach JavaScript code to a Scenario in order to change the way the interface functions and create unique and different experiences within AI Dungeon. It can be accessed from the very bottom of the Scenario Editing screen, but only on Desktop: it is not accessible on mobile. At this time, the only way to use Scripts in an Adventure is by starting it from a Scenario where the Scripts were made.

If you know how to add Scripting, you can use it to do simple things, like reminding the player to edit the Memory or making edits to it for them, or very complex things, like changing the way inputs work or feeding hidden context to the AI.

At this time, Scripting is still a somewhat experimental feature and is complex to use. Currently, the best documentation for this is on the official Latitude GitHub or the old Wiki page.

icon
Remember that you can always find more information on this, or any subject, by asking on our official Discord Server or reading the Wiki.

icon
image

© Latitude 2023