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

Trouble with It's a Trap! API using 5e 2024

March 14 (2 weeks ago)

Edited March 14 (2 weeks ago)
Bill
Pro

Help please!

I originally made the trap using the It's a Trap! (5th Edition OGL by Roll20 Companion) on a 5e 2014 adventure. It worked fine.

I copied the adventure and converted it to 5e 2024. Then changed adventure to only use 5e 2024 character sheets. Now the It's a Trap! API is giving me error messages. Note that this error occurs both with newly created traps and ones ported over from the old 5e 2014 game.

When the token enters the range for detecting the trap using Passive Perception, I get:

If the Passive Perception is high enough to detect the trap:

  • (From Its A Trap! script): Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "J" found.
    Check API console logs for details.
  • The map stays activated on the GM layer (I had specified for it to deactivate and move to the Map layer).

If the Passive Perception is too low to detect the trap, I get:

  •  (From Its A Trap! script): Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "C" found.
    Check API console logs for details.
  • The map stays activated on the GM layer (I had specified for it to deactivate and move to the Map layer).

In both instances, the Mod Output Console reads:

"Error: Unable to find attribute named passive_wisdom for character Jareel the Just(-OLCXshloTo_Kxtz0gDS) in chat command."

"Error

    at /home/node/d20-api-server/textchat.js:729:15

    at String.replace (<anonymous>)

    at TextChatFactory.d20.textchat.doChatInput (/home/node/d20-api-server/textchat.js:564:33)

    at sendChat (/home/node/d20-api-server/api.js:2251:16)

    at apiscript.js:4003:9

    at new Promise (<anonymous>)

    at Function.rollAsync (apiscript.js:4002:14)

    at Function.getSheetAttr (apiscript.js:3896:31)

    at TrapTheme5EGeneric.getPassivePerception (apiscript.js:7179:33)

    at TrapTheme5EGeneric.passiveSearch (apiscript.js:6782:21)"

undefined


When the token enters the trap, which should trigger it, get nothing. I am guessing that the API is already in error at this stage.

Any help you might be able to give would be greatly appreciated. 

Bill






March 14 (2 weeks ago)

The Mod script is looking for an attribute named passive_wisdom, but the new sheet does not use attributes such as the 2014 sheet does. This is causing errors in older scripts which are programmed to draw data from the 2014 sheet.

March 15 (2 weeks ago)
The Aaron
Roll20 Production Team
API Scripter

The short answer is that It's A Trap needs to be updated to support Beacon sheets, likely using getSheetItem()  (specifically in the CharSheetUtils module).  I'll see if I can fit that in shortly.

March 16 (2 weeks ago)
Bill
Pro

Thanks Oginme for the advice, and The Aaron for providing a way forward (although not urgent for me at the moment, just planning ahead for when my players finish their current campaign).

Much appreciated.