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

[Script] It's A Trap! v2.3

1521509612
Wulfric
Forum Champion
Marketplace Creator
Sheet Author
I loaded the scripts tonight but when I select a new token and click the Its a Trap button, all that seems to happen the that the token is marked with the cobweb. The menu options do not get posted to the chat and I can't config anything. Any idea what I may have done wrong?
1521510705
Wulfric
Forum Champion
Marketplace Creator
Sheet Author
I found the issue! If the chat As box has my GM account listed then it won't post but if I select anyone else it works fine. I have confirmed this in two different games.
1526483957

Edited 1526484115
when I try using this script it does nothing at all, there are no errors showing up. When I click the it'satrap wizard in my game after highlighting the trap it does nothing says nothing, I tried every version for my 5e game and nothing. I get:  "☒☠☒ Initialized It's A Trap! using theme '5E-Generic' ☒☠☒" "5eShapedCompanion 1526484054381 INFO : Detected sheet version as : 17.1.1" "5eShapedCompanion 1526484054383 INFO : Configuration state: {\"version\":4.7,\"config\":{\"genderPronouns\":[{\"matchPattern\":\"^f$|female|girl|woman|feminine\",\"nominative\":\"she\",\"accusative\":\"her\",\"possessive\":\"her\",\"reflexive\":\"herself\"},{\"matchPattern\":\"^m$|male|boy|man|masculine\",\"nominative\":\"he\",\"accusative\":\"him\",\"possessive\":\"his\",\"reflexive\":\"himself\"},{\"matchPattern\":\"^n$|neuter|none|construct|thing|object\",\"nominative\":\"it\",\"accusative\":\"it\",\"possessive\":\"its\",\"reflexive\":\"itself\"}],\"logLevel\":\"INFO\",\"tokenSettings\":{\"number\":true,\"bar1\":{\"attribute\":\"HP\",\"max\":true,\"link\":false,\"showPlayers\":true},\"bar2\":{\"attribute\":\"speed\",\"max\":false,\"link\":true,\"showPlayers\":false},\"bar3\":{\"attribute\":\"AC\",\"max\":false,\"link\":true,\"showPlayers\":false},\"aura1\":{\"radius\":\"\",\"color\":\"#FFFF99\",\"square\":false},\"aura2\":{\"radius\":\"\",\"color\":\"#59e594\",\"square\":false},\"light\":{\"radius\":\"5\",\"dimRadius\":\"\",\"otherPlayers\":false,\"hasSight\":true,\"angle\":360,\"losAngle\":360,\"multiplier\":1},\"showName\":true,\"showNameToPlayers\":true,\"showAura1ToPlayers\":true,\"showAura2ToPlayers\":true,\"monsterTokenName\":\"\"},\"newCharSettings\":{\"sheetOutput\":\"***default***\",\"deathSaveOutput\":\"***default***\",\"initiativeOutput\":\"***default***\",\"showNameOnRollTemplate\":\"***default***\",\"rollOptions\":\"***default***\",\"initiativeRoll\":\"***default***\",\"initiativeToTracker\":\"***default***\",\"breakInitiativeTies\":true,\"showTargetAC\":true,\"showTargetName\":true,\"autoAmmo\":true,\"autoRevertAdvantage\":true,\"houserules\":{\"mediumArmorMaxDex\":2,\"saves\":{\"useCustomSaves\":false,\"useAverageOfAbilities\":false,\"fortitude\":{\"fortitudeStrength\":false,\"fortitudeDexterity\":false,\"fortitudeConstitution\":false,\"fortitudeIntelligence\":false,\"fortitudeWisdom\":false,\"fortitudeCharisma\":false},\"reflex\":{\"reflexStrength\":false,\"reflexDexterity\":false,\"reflexConstitution\":false,\"reflexIntelligence\":false,\"reflexWisdom\":false,\"reflexCharisma\":false},\"will\":{\"willStrength\":false,\"willDexterity\":false,\"willConstitution\":false,\"willIntelligence\":false,\"willWisdom\":false,\"willCharisma\":false},\"savingThrowsHalfProf\":false},\"baseDC\":\"***default***\",\"expertiseAsAdvantage\":false,\"inspirationMultiple\":false,\"criticalDamageHouserule\":\"***default***\",\"proficiencyDice\":false,\"psionics\":false,\"customClasses\":false,\"honorToggle\":false,\"sanityToggle\":false,\"hitPointsRecoveredOnALongRest\":\"***default***\",\"hitDiceRecoveredOnALongRest\":\"***default***\"},\"tab\":\"***default***\",\"tokenActions\":{\"initiative\":true,\"abilityChecks\":null,\"advantageTracker\":null,\"savingThrows\":null,\"attacks\":null,\"statblock\":true,\"traits\":null,\"actions\":null,\"reactions\":null,\"legendaryActions\":null,\"lairActions\":null,\"regionalEffects\":null,\"rests\":true,\"spells\":true,\"showRecharges\":false,\"classFeatures\":null,\"feats\":null,\"racialTraits\":null},\"textSizes\":{\"spellsTextSize\":\"text\",\"abilityChecksTextSize\":\"text\",\"savingThrowsTextSize\":\"text\"},\"hide\":{\"hideAttack\":\"***default***\",\"hideDamage\":\"***default***\",\"hideAbilityChecks\":\"***default***\",\"hideSavingThrows\":\"***default***\",\"hideSavingThrowDC\":\"***default***\",\"hideSavingThrowFailure\":\"***default***\",\"hideRecharge\":\"***default***\",\"hideFreetext\":\"***default***\",\"hideContent\":\"***default***\"},\"applyToAll\":true,\"hitDiceOutput\":\"***default***\",\"display\":{\"showPassiveSkills\":false,\"showWeight\":\"***default***\",\"showEmote\":false,\"showFreetext\":false,\"showFreeform\":false,\"showDiceModifiers\":false,\"showCritRange\":false,\"extraOnACrit\":false},\"measurementSystems\":{\"distanceSystem\":\"***default***\",\"weightSystem\":\"***default***\"},\"automaticHigherLevelQueries\":\"***default***\",\"automaticallyExpendSpellResources\":true,\"automaticallyRollDamageForAttacks\":\"***default***\",\"automaticallyRollDamageForSavingThrows\":\"***default***\"},\"advTrackerSettings\":{\"showMarkers\":true,\"ignoreNpcs\":false,\"advantageMarker\":\"green\",\"disadvantageMarker\":\"red\",\"output\":\"silent\"},\"sheetEnhancements\":{\"rollHPOnDrop\":true,\"autoHD\":true,\"autoTraits\":true,\"turnRecharges\":false,\"ammoRecovery\":false},\"defaultGenderIndex\":2,\"variants\":{\"rests\":{\"longRestHDRecovery\":0.5,\"longRestHPRecovery\":1}},\"playerId\":\"-KojhYUIsJdtHmP8OrZP\"}}"
1526487600
Wulfric
Forum Champion
Marketplace Creator
Sheet Author
If you access the script in the API settings and scroll to the bottom, there are a set of fields to be completed and saved. If you are using the OGL sheet, select 5e OGL from the first dropdown and save the script. That should correct the issue. It took me a while to figure out what was going wrong when I ran into this.
Hi, so I tried using this but I cant get it to work. I'm using the OGL sheets and use the dnd 5e generic theme. I chose ogl in the dropdown and put in the names of the variables just in case. but all i get is that: "ItsATrapCreationWizard: Cannot read property '0' of undefined" "TypeError: Cannot read property '0' of undefined\n at msg (apiscript.js:6393:55)\n at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:151:1), <anonymous>:65:16)\n at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:151:1), <anonymous>:70:8)\n at /home/node/d20-api-server/api.js:1634:12\n at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560\n at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147)\n at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546)\n at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489)\n at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425)\n at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400"
1529415996
Ada L.
Marketplace Creator
Sheet Author
API Scripter
If you're using the dropdown list to choose "ogl", you don't need to fill in the names of the variables.
yeah, i thought so, just did it in case that was the problem
1529423333
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Could you provide the steps you took to produce the problem? 
1529424918

Edited 1529425844
I installed the script "It's a Trap! 5e Generic", it asked for dependencys which I accepted. In game (overlooked the settings at first) i tried the generated macro, didnt work, got that error message. Found the settings in the script section and changed it to the ogl sheet. saved and restarted the API. Used the script macro to get the same error message. Manually using !ItsATrap_trapCreationWizard_showMenu in the chat had the same effect. Apart from Its a Trap and its dependencys I only added StatusFX and Page FX. Just in case a dependency is missing or something here's a screenshot of my script library: nevermind, i'm an idiot..... I used the command without having a token in the gm layer selected. Should've read the manual.... XD sry for taking your time and thanks for this script =)
Felix M. said: I installed the script "It's a Trap! 5e Generic", it asked for dependencys which I accepted. In game (overlooked the settings at first) i tried the generated macro, didnt work, got that error message. Found the settings in the script section and changed it to the ogl sheet. saved and restarted the API. Used the script macro to get the same error message. Manually using !ItsATrap_trapCreationWizard_showMenu in the chat had the same effect. Apart from Its a Trap and its dependencys I only added StatusFX and Page FX. Just in case a dependency is missing or something here's a screenshot of my script library: You are selecting a token before you click on the "its a trap" menu configuration button correct?
Terrelle S. said: Felix M. said: ... You are selecting a token before you click on the "its a trap" menu configuration button correct? nope, I'm an idiot and did not do that. sry again. Next time I promise to read the manual first XD
I keep getting this error: SyntaxError: missing ) after argument list I'm not even sure if I'm choosing the right code. I just started.