All user data for FoundryVTT. Includes worlds, systems, modules, and any asset in the "foundryuserdata" directory. Does NOT include the FoundryVTT installation itself.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
3.8 KiB

1 year ago
  1. /**
  2. * Override which attributes of an Actor should be kept from the exported adventure data rather than imported from
  3. * the source compendium.
  4. */
  5. const ACTOR_IMPORT_OVERRIDES = {
  6. "oSQ3Q9tzTohksAtf": ["system"], // Crawling Hand (elite)
  7. "QnbMaJPU7jG4uhaC": ["system"], // Soul Feeder (elite)
  8. "GsrqCDf0Dc9PisEt": ["system"], // Violet Fungus (weak)
  9. "RFCxaIS4OkacCpxD": ["system"], // Bog-rotted Froghemoth (weak)
  10. "pFPLCspUfJ2FUMcj": ["system"], // Falxi Orshendiel
  11. "GoGNtiHuYycppLPk": ["system"], // Cynemi
  12. "u36SRb3lyB4beHCN": ["system"], // Lasda Venkervale
  13. "HBRz8BVLVN9u9Odp": ["items"] // Corpselight
  14. }
  15. // Abomination Vaults
  16. const ABOMINATION_VAULTS = {
  17. slug: "abomination-vaults",
  18. title: "Abomination Vaults",
  19. actorOverrides: ACTOR_IMPORT_OVERRIDES,
  20. importOptions: {
  21. enhancedMaps: {
  22. label: "Use Enhanced Maps",
  23. default: true,
  24. sceneIds: {
  25. original: ['MSHO9s465zhZIuH7', '2dHU2g8WUOc4NZlq', 'TE8aNKdE5NKGSgoV', 'l9piQKpfF80Tf4Ee', 'D3ZsHuxFbD9XJ8xm', 'C1FHtLrwQGvYvHEj', 'xlVpxXlwLDBkigNr', 'jZ6KNRkZJbhIFTUH', 'k9jeCoWPx2z9Q3WU', '6JuLFPWO21xzKgbc', 'RYdmLnFJOm9YjMjc', '5yFFxnSZdYE1NWYM', 'sY80sj7X5MD0mH2A'],
  26. enhanced: ['MSHO9s465zhZIuH7', 'lQkXSdxvO9CRxohD', '9hB3ZY7buScJPXEy', '3Nat4ImT49niZUdr', 'BDb75TAOyhTzNzte', 'N4Gsv8cBg1oK6EGS', 'Y4pI9rvbaVvmK2kn', 'B9O44gBwHIUTRasQ', '2bM6K9jKWHJoYURa', 'lKRTHUBDXYzwd80e', 'MrRFPOICNcpBbfca', 'Z5ExlCWEpqm0SMe1', 'kxMIly2TCSidrRf1', 'SkPDNmMoL4M4r1it', 'o3zbh5CXtTQiWKwZ', '3Z2uyLiembwA6fft', 'pRvx3DZRnH50eV6d']
  27. },
  28. handler (adventure, option, enabled) {
  29. const sceneIds = option.sceneIds;
  30. const original = new Set(sceneIds.original);
  31. const enhanced = new Set(sceneIds.enhanced);
  32. const updates = sceneIds.original.concat(sceneIds.enhanced).reduce((acc, id) => {
  33. if ( game.scenes.has(id) ) acc.push({
  34. _id: id,
  35. navigation: (enabled && enhanced.has(id)) || (!enabled && original.has(id))
  36. });
  37. return acc;
  38. }, []);
  39. return Scene.implementation.updateDocuments(updates);
  40. }
  41. },
  42. activateScene: {
  43. label: "Activate Initial Scene",
  44. default: true,
  45. handler: (adventure, option, enabled) => {
  46. if ( !enabled ) return;
  47. return game.scenes.get(option.sceneId)?.activate();
  48. },
  49. sceneId: "MSHO9s465zhZIuH7"
  50. },
  51. displayJournal: {
  52. label: "Display Introduction Journal Entry",
  53. default: true,
  54. handler: (adventure, option, enabled) => {
  55. if ( !enabled ) return;
  56. return game.journal.get(option.entryId)?.sheet.render(true);
  57. },
  58. entryId: "2Q0QtLA7FQYcMMD9"
  59. },
  60. customizeJoin: {
  61. label: "Customize World Details",
  62. default: false,
  63. background: "modules/pf2e-abomination-vaults/assets/journal-images/vignettes/av-cover.webp",
  64. handler: async (adventure, option, enabled) => {
  65. if ( !enabled ) return;
  66. const module = game.modules.get("pf2e-abomination-vaults");
  67. const worldData = {
  68. action: "editWorld",
  69. name: game.world.data.name,
  70. description: module.data.description,
  71. background: option.background
  72. }
  73. await fetchJsonWithTimeout(foundry.utils.getRoute("setup"), {
  74. method: "POST",
  75. headers: {'Content-Type': 'application/json'},
  76. body: JSON.stringify(worldData)
  77. });
  78. game.world.data.update(worldData);
  79. }
  80. }
  81. },
  82. // The ID of the 'Getting Started' journal to determine if the adventure has been imported before.
  83. gettingStartedId: "3iU3rV1nbiW2OYXM"
  84. };
  85. export default {
  86. moduleId: "pf2e-abomination-vaults",
  87. packName: "av",
  88. journalFlag: "isAV",
  89. cssClass: "pf2e-av",
  90. adventure: ABOMINATION_VAULTS,
  91. languages: ["en"]
  92. }