Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

How do I access Demiplane Pathfinder2e attributes from Mod API?

July 12 (1 month ago)

I am trying to access character sheet attributes from a Mod Script for Demiplane Pathfinder2e characters.  

I have tried:

  •   getAttrByName
    • works fine with the Roll20 "pathfinder2eofficial" sheets
    • returns undefined for Demiplane "nexus_pathfinder2e" sheets
  • findObjs({_type: 'attribute', _characterid: c.id})
    • works fine with the Roll20 "pathfinder2eofficial" characters
    • returns a list of attributes akin to a token with no character sheet for the "nexus_pathfinder2e" characters 
      • even though c.get("charactersheetname") returns "nexus_pathfinder2e"
  • getSheetItem(c.id, "fortitude", function(item) { });
    • crashes out the script with a "TypeError: Cannot read properties of undefined (reading 'fortitude')"
  • I tried a version of  Lord Farquaad's test script for getSheetItem
    • responds with "Error fetching hit_points: TypeError: Cannot read properties of undefined (reading 'hit_points')"


  • I am running "##########> Sandbox [EXPERIMENTAL 2025-04-09] : Ready fired after 5.15s, 22 objects."
  • I have logged into Demiplane in another tab
  • I can also see the Demiplane sheet inside Roll20 attached to the token
  • I can attach attribute links to the bars
  • I can use @{attribute} in macros

Am I missing something?  Is this feature in flux?  I have seen references from Aaron and Keith regarding work on Mod compatibility with Beacon sheets, are the Pathfinder2e Demiplane ones also part of the Beacon sheets?  I haven't seen any reference to using getSheetItem() for Demiplane Pathfinder2e or Starfinder2e sheets.  Any help is welcome.

July 13 (1 month ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator

Demiplane sheets are not currently accessible to the API as far as I know.

July 16 (1 month ago)

Edited July 16 (1 month ago)

Is this correct?  Because the Demiplane Character Integration help document seems to suggest otherwise.  If it is "supposed" to work and is just not working for me, I wonder if it has anything to due with a similar potential bug I am having.  

I am able to access attribute values via @{attribute} or @{selected|attribute} in my macros for Roll20 (pathfinder2eofficial) character sheets, but when I use the same macro on a Demiplane sheet (nexus_pathfinder2e) it only works when I click the "Test Macro" button.  In other words, once I save the macro and try to invoke it by clicking it in the menu bar or by calling it via hashtag, it only works with pathfinder2eofficial sheets.  With nexus_pathfinder2e sheets  it complains that there is no such attribute (I was using perception in my tests which exists on both sheets).  Yet I can access the same attribute by typing the @{selected|attribute} into chat, or by running the same macro with the "Test Macro" button.  It behaves the same in Chrome or Firefox.