Skip to content

[#6923] Add system-specific adventure importer dialog with actions#6946

Open
arbron wants to merge 1 commit into5.3.xfrom
adventure-importer
Open

[#6923] Add system-specific adventure importer dialog with actions#6946
arbron wants to merge 1 commit into5.3.xfrom
adventure-importer

Conversation

@arbron
Copy link
Copy Markdown
Collaborator

@arbron arbron commented Apr 16, 2026

Adds a new Adventure Importer sheet that follows the dnd5e design style. Following the example of core with its V2 importer, this sheet is not made default and instead must be opted into on a per-adventure basis.

Adventure Importer 5e

The new sheet includes support for pre- and post-import actions which are presented as checkboxes on the importer sheet to give control to users. There are three actions initially provided by the system: "Activate Scene", "Display Journal", and "Customize World", but modules can add their own actions.

Each adventure can use flags to define which of the actions is run when that adventure is imported and customize their behavior. There is also a new AdventureRegistry that allows defining actions for a single adventure or for all adventures in a module. Actions added through the registry can support custom handlers without having to add to the global configuraiton.

// These actions will be run across all adventures in the module
dnd5e.registry.adventures.setModule("dnd-adventures-faerun", {
  importActions: ["activateScene", "displayJournal"]
});

// This specific adventure has a different set of actions
dnd5e.registry.adventures.setAdventure("Compendium.dnd-adventures-faerun.adventures.Adventure.OJuc9WnDJDAETIFr", {
  importActions: [{ id: "displayJournal", journalId: "x0TaNijLJkanmufc" }]
});
Adventure Quickstart Dialog

The system also contains a dialog that presents actions available after using quickstart to load the adventure. By adding a separate quickstart handler actions can opt in to support on quickstarted adventures. These actions are passed all of the adventures that have that action and their configs so they can optimize if more than one adventure is quickstarted.

Adds a new Adventure Importer sheet that follows the dnd5e design
style. Following the example of core with its V2 importer, this
sheet is not made default and instead must be opted into on a
per-adventure basis.

The new sheet includes support for pre- and post-import actions
which are presented as checkboxes on the importer sheet to give
control to users. There are three actions initially provided by
the system: "Activate Scene", "Display Journal", and "Customize
World", but modules can add their own actions.

Each adventure can use flags to define which of the actions is run
when that adventure is imported and customize their behavior.
There is also a new `AdventureRegistry` that allows defining
actions for a single adventure or for all adventures in a module.
Actions added through the registry can support custom handlers
without having to add to the global configuraiton.

```javascript
// These actions will be run across all adventures in the module
dnd5e.registry.adventures.setModule("dnd-adventures-faerun", {
  importActions: ["activateScene", "displayJournal"]
});

// This specific adventure has a different set of actions
dnd5e.registry.adventures.setAdventure("Compendium.dnd-adventures-faerun.adventures.Adventure.OJuc9WnDJDAETIFr", {
  importActions: [{ id: "displayJournal", journalId: "x0TaNijLJkanmufc" }]
});
```

The system also contains a dialog that presents actions available
after using quickstart to load the adventure. By adding a separate
quickstart handler actions can opt in to support on quickstarted
adventures. These actions are passed all of the adventures that
have that action and their configs so they can optimize if more
than one adventure is quickstarted.
@arbron arbron added this to the D&D5E 6.0.0 milestone Apr 16, 2026
@arbron arbron self-assigned this Apr 16, 2026
@arbron arbron added ui User interface related features or bugs api ux User experience related features or bugs priority: high labels Apr 16, 2026
arbron added a commit that referenced this pull request Apr 17, 2026
Adds a new window that pops up when the system is first launched to
provide some first run improvements to users. This window displays
a welcome message & several links to documentation & support pages.

Beneath that are some important settings that are useful to get set
immediately including rules version, calendar, bastion, and whether
the metric system is used. Any changes to these settings are saved
when the window is closed and a reload will be prompted if needed.

The second tab contains a list of all of the first-party modules
offered for the system. These modules can be easily enabled from
this screen and any selected modules will be enabled when the app
is closed.

The list of modules is contained in a JSON file included with the
system, but it will also check the copy of that file on the
`publish-wiki` branch of the GitHub. This should allow the system
to add new modules to this listing without requiring a new system
version.

 ### Todo
- [ ] Write welcome dialog & links
- [ ] Modify compendium browser filters to match selected rules
      and enabled modules
- [ ] Integrate with adventure quickstart dialog #6946

Closes #6922
arbron added a commit that referenced this pull request Apr 17, 2026
Adds a new window that pops up when the system is first launched to
provide some first run improvements to users. This window displays
a welcome message & several links to documentation & support pages.

Beneath that are some important settings that are useful to get set
immediately including rules version, calendar, bastion, and whether
the metric system is used. Any changes to these settings are saved
when the window is closed and a reload will be prompted if needed.

The second tab contains a list of all of the first-party modules
offered for the system. These modules can be easily enabled from
this screen and any selected modules will be enabled when the app
is closed.

The list of modules is contained in a JSON file included with the
system, but it will also check the copy of that file on the
`publish-wiki` branch of the GitHub. This should allow the system
to add new modules to this listing without requiring a new system
version.

 ### Todo
- [ ] Write welcome dialog & links
- [ ] Modify compendium browser filters to match selected rules
      and enabled modules
- [ ] Integrate with adventure quickstart dialog #6946

Closes #6922
arbron added a commit that referenced this pull request Apr 17, 2026
Adds a new window that pops up when the system is first launched to
provide some first run improvements to users. This window displays
a welcome message & several links to documentation & support pages.

Beneath that are some important settings that are useful to get set
immediately including rules version, calendar, bastion, and whether
the metric system is used. Any changes to these settings are saved
when the window is closed and a reload will be prompted if needed.

The second tab contains a list of all of the first-party modules
offered for the system. These modules can be easily enabled from
this screen and any selected modules will be enabled when the app
is closed.

The list of modules is contained in a JSON file included with the
system, but it will also check the copy of that file on the
`publish-wiki` branch of the GitHub. This should allow the system
to add new modules to this listing without requiring a new system
version.

 ### Todo
- [ ] Write welcome dialog & links
- [ ] Modify compendium browser filters to match selected rules
      and enabled modules
- [ ] Integrate with adventure quickstart dialog #6946

Closes #6922
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api priority: high ui User interface related features or bugs ux User experience related features or bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant