League-of-Foundry-Developers/scene-packer

Scene Packer not linking journal pins

Closed this issue · 5 comments

Submitted By: bradfordly#6351
Feedback Type: Bug

Core: 0.8.6
System: dnd5e v1.3.3
Module Version: scene-packer v2.2.20

Description:
Attempting to use Scene Packer after updating to 0.8.* - packing only properly links tokens to actors and fails linking journal pins.

Steps to reproduce:

  1. Create journal entries, actors, scenes as normal
  2. Add actor tokens and journal pins to scene
  3. Export journals, actors, scenes to module's compendium packs
  4. Run the "Pack Scene Data" option from the right click menu
  5. Run the relink macro with save changes enabled
  6. Launch a new world and click "Yes To All" from the Scene Packer module importer
  7. Activate scene; and observe that actor tokens were properly unpacked, but journal pins were not
Module Settings
enableContextMenu: true
Active Modules SoundBoard--v1.5.2; SoundBoard-BlitzCommunityPack--v1.0.0; SoundBoard-BlitzFreePack--v1.0.0; about-time--v0.8.5; adjusted-movement--v0.1.4; advanced-macros--v1.8; adventure_aquilian-tomb--v1.0.0; bug-reporter--v1.3.0; combat-utility-belt--v1.5.0; compendium-folders--v2.3.2; dae--v0.8.13; ddb-importer--v2.1.5; dfreds-droppables--v1.2.5; dice-calculator--v0.6.8; dice-so-nice--v3.4.2; dnd5e-helpers--v2.0.4; easy-target--v2.12; forien-quest-log--v0.6.0; foundry_community_macros--v0.41; furnace--v2.6.1; healthEstimate--v2.5.8; immoris--v1.0.0; initiative-double-click--v1.0; lessfog--v0.8.1; lib-wrapper--v1.7.0.0; lootsheetnpc5e--v3.1.0; midi-qol--v0.8.11; pings--v1.2.12+0.8.6; polyglot--v1.6.6; popout--v1.3; scene-packer--v2.2.20; settings-extender--v1.1.6+0.8.6; skill-customization-5e--v2.3.0; socketlib--v1.0.6; split-journal--v1.1; token-info-icons--v2.3.2; token-mold--v2.13.1;

web logs produce the following warning upon attempting to unpack the scene:
adventure_aquilian-tomb | Could not find 3 notes to spawn. The following journals were not found. Array(3) [ {…}, {…}, {…} ] ​ 0: Object { _id: "r4zXhtMo88lpGyi5", icon: "icons/svg/book.svg", entryId: undefined } ​ 1: Object { _id: "LAN8vk8yrvfQ7gPr", icon: "icons/svg/book.svg", entryId: undefined } ​ 2: Object { _id: "lfrZOsfiVoFiIE7m", icon: "icons/svg/book.svg", entryId: undefined } ​ length: 3 ​ <prototype>: Array [] scene-packer.js:34:177
edit: removing irrelevant information

The scenes.db pack file seems to be properly set with ID values:

{
  "_id": "SkJQpD3luRMU2h1l",
  "name": "Misty Cave",
  "active": false,
  "navigation": false,
  "navOrder": 0,
  "navName": "",
  "img": "modules/adventure_aquilian-tomb/assets/uymqekapzqh82l8iugi83ilqypjy.jpg",
  "foreground": "",
  "thumb": "worlds/immoris-dev/scenes/thumbs/slAs4kTIwAQlIvYa.png",
  "width": 2048,
  "height": 2048,
  "padding": 0.25,
  "initial": null,
  "backgroundColor": "#000000",
  "gridType": 1,
  "grid": 100,
  "shiftX": 0,
  "shiftY": 0,
  "gridColor": "#000000",
  "gridAlpha": 0.2,
  "gridDistance": 5,
  "gridUnits": "ft",
  "tokenVision": true,
  "fogExploration": true,
  "fogReset": null,
  "globalLight": false,
  "globalLightThreshold": null,
  "darkness": 0,
  "drawings": [],
  "tokens": [
    {
      "_id": "aE2AoDAAdWLCKuDm",
      "name": "Goblin(1)",
      "displayName": 0,
      "actorId": "M6pocDI7LxRds0Vo",
      "actorLink": false,
      "actorData": {
        "name": "Goblin(1)",
        "data": {
          "attributes": {
            "hp": {
              "value": 7,
              "max": 7
            }
          }
        }
      },
      "img": "modules/immoris/assets/ddb-images/other/npc-token-Goblin.jpeg",
      "width": 1,
      "height": 1,
      "scale": 0.8,
      "mirrorX": false,
      "mirrorY": false,
      "x": 1400,
      "y": 1300,
      "elevation": 0,
      "lockRotation": false,
      "rotation": 0,
      "effects": [],
      "alpha": 1,
      "hidden": false,
      "vision": true,
      "dimSight": "60",
      "brightSight": 0,
      "dimLight": 0,
      "brightLight": 0,
      "sightAngle": 0,
      "lightAngle": 0,
      "lightAlpha": 0.25,
      "lightAnimation": {
        "speed": 5,
        "intensity": 5
      },
      "disposition": -1,
      "displayBars": 40,
      "bar1": {
        "attribute": "attributes.hp"
      },
      "bar2": {
        "attribute": null
      },
      "flags": {}
    },
    {
      "_id": "s5vViscPIXj0ZSKf",
      "name": "Goblin(2)",
      "displayName": 0,
      "actorId": "M6pocDI7LxRds0Vo",
      "actorLink": false,
      "actorData": {
        "name": "Goblin(2)",
        "data": {
          "attributes": {
            "hp": {
              "value": 7,
              "max": 7
            }
          }
        }
      },
      "img": "modules/immoris/assets/ddb-images/other/npc-token-Goblin.jpeg",
      "width": 1,
      "height": 1,
      "scale": 0.8,
      "mirrorX": false,
      "mirrorY": false,
      "x": 1600,
      "y": 1300,
      "elevation": 0,
      "lockRotation": false,
      "rotation": 0,
      "effects": [],
      "alpha": 1,
      "hidden": false,
      "vision": true,
      "dimSight": "60",
      "brightSight": 0,
      "dimLight": 0,
      "brightLight": 0,
      "sightAngle": 0,
      "lightAngle": 0,
      "lightAlpha": 0.25,
      "lightAnimation": {
        "speed": 5,
        "intensity": 5
      },
      "disposition": -1,
      "displayBars": 40,
      "bar1": {
        "attribute": "attributes.hp"
      },
      "bar2": {
        "attribute": null
      },
      "flags": {}
    }
  ],
  "lights": [],
  "notes": [
    {
      "_id": "r4zXhtMo88lpGyi5",
      "entryId": "pGYiCeMRegFjUrxa",
      "x": 650,
      "y": 850,
      "icon": "icons/svg/book.svg",
      "iconSize": 40,
      "iconTint": null,
      "fontFamily": "Signika",
      "fontSize": 48,
      "textAnchor": 1,
      "textColor": "#FFFFFF",
      "flags": {}
    },
    {
      "_id": "LAN8vk8yrvfQ7gPr",
      "entryId": "0pG6sVzk0tbG8e4P",
      "x": 1650,
      "y": 1550,
      "icon": "icons/svg/book.svg",
      "iconSize": 40,
      "iconTint": null,
      "fontFamily": "Signika",
      "fontSize": 48,
      "textAnchor": 1,
      "textColor": "#FFFFFF",
      "flags": {}
    },
    {
      "_id": "lfrZOsfiVoFiIE7m",
      "entryId": "B3qgjcGPRPfcraTJ",
      "x": 2250,
      "y": 1350,
      "icon": "icons/svg/book.svg",
      "iconSize": 40,
      "iconTint": null,
      "fontFamily": "Signika",
      "fontSize": 48,
      "textAnchor": 1,
      "textColor": "#FFFFFF",
      "flags": {}
    }
  ],
  "sounds": [],
  "templates": [],
  "tiles": [],
  "walls": [],
  "playlist": null,
  "playlistSound": null,
  "journal": null,
  "weather": "",
  "folder": null,
  "sort": 0,
  "permission": {
    "default": 0
  },
  "flags": {
    "adventure_aquilian-tomb": {
      "scene-journal": {},
      "scene-position": null,
      "journals": [
        {
          "_id": "r4zXhtMo88lpGyi5",
          "entryId": "pGYiCeMRegFjUrxa",
          "x": 650,
          "y": 850,
          "icon": "icons/svg/book.svg",
          "iconSize": 40,
          "iconTint": null,
          "fontFamily": "Signika",
          "fontSize": 48,
          "textAnchor": 1,
          "textColor": "#FFFFFF",
          "flags": {}
        },
        {
          "_id": "LAN8vk8yrvfQ7gPr",
          "entryId": "0pG6sVzk0tbG8e4P",
          "x": 1650,
          "y": 1550,
          "icon": "icons/svg/book.svg",
          "iconSize": 40,
          "iconTint": null,
          "fontFamily": "Signika",
          "fontSize": 48,
          "textAnchor": 1,
          "textColor": "#FFFFFF",
          "flags": {}
        },
        {
          "_id": "lfrZOsfiVoFiIE7m",
          "entryId": "B3qgjcGPRPfcraTJ",
          "x": 2250,
          "y": 1350,
          "icon": "icons/svg/book.svg",
          "iconSize": 40,
          "iconTint": null,
          "fontFamily": "Signika",
          "fontSize": 48,
          "textAnchor": 1,
          "textColor": "#FFFFFF",
          "flags": {}
        }
      ],
      "tokens": [
        {
          "sourceId": "Actor.M6pocDI7LxRds0Vo",
          "compendiumSourceId": "Compendium.immoris.actors-ddb.kV8T9BJw9xCtSx9C",
          "tokenName": "Goblin(1)",
          "actorName": "Goblin",
          "x": 1400,
          "y": 1300
        },
        {
          "sourceId": "Actor.M6pocDI7LxRds0Vo",
          "compendiumSourceId": "Compendium.immoris.actors-ddb.kV8T9BJw9xCtSx9C",
          "tokenName": "Goblin(2)",
          "actorName": "Goblin",
          "x": 1600,
          "y": 1300
        }
      ]
    },
    "scene-packer": {
      "source-module": "adventure_aquilian-tomb",
      "packed-with-version": "2.2.20"
    },
    "cf": {
      "id": "temp_rrqwr56hh7n",
      "path": "The Aquilian Tomb - Scenes",
      "color": "#000000"
    }
  }
}

I'm not much of a JS dev but I'll try and see if I can pinpoint where those references are getting lost and getting set as undefined in the warning mentioned in the previous comment.
EDIT: taking a second look here, it appears the tokens are getting an attribute set compendiumSourceId but the notes are not.

sneat commented

Just confirming that Scene Packer was active when you exported the journals to your compendium?

Did you want to jump on the scene packer discord (in the readme) and we can step through it together?

Can confirmed; had Scene Packer enabled before creating any journals / scenes and their compendium packs. Happy to get on the Discord!

sneat commented

Discussed on discord, issue was introduced in v0.8.3 of Foundry VTT.