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

[PF] Pathfinder Companion Script v1.X for Neceros sheet

It's rather small "test"-game I'm running, to try new things like scripts and macros. It's about 5 players, maybe 20 npcs (mainly dummies for spelleffects), a handfull handouts and pages.
1510897244
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, ok, well there goes that possible explanation then. I'll have to look into what's causing that infinite loop then.
Hey Scott!  I had a break from Roll20 recently, but I'm back with questions!  (This script has been amazing for my QoL running my game btw) So what I'm seeing here is a buff I created that gives an alchemical strength bonus.  When I set it in the character sheet, everything applies fine.  When I set it through pfc menus though it doesn't apply the strength bonus to any of my attack damage.  I looked at the output of the sandbox console and got this: "-=> Pathfinder Companion vPrototype 1.0 || Compatible with Sheet Version 1.6x <=-  [Tue Aug 15 2017 13:37:58 GMT+0000 (UTC)]" {"name":"condition-Energy Drain","current":"0","max":"","_id":"-KzA4eRr_Oo7b-_7cQsp","_type":"attribute","_characterid":"-Kz7FyiGiyjmHQkommHG"} "0" "%c Notice: %c caught STR-mod event: api " "%c Notice: %c caught INT-mod event: api " "%c Notice: %c PFSkills updateAbilityBasedSkills getting array: " "%c Notice: %c [array]:========================================= " "CS-Athletics,Climb,Swim" "%c Notice: %c ========================================================= " "%c Notice: %c PFSkills updateAbilityBasedSkills getting array: " "%c Notice: %c [array]:========================================= " "Appraise,Artistry,Artistry10,Artistry2,Artistry3,Artistry4,Artistry5,Artistry6,Artistry7,Artistry8,Artistry9,CS-Nature,CS-Religion,CS-Society,CS-Spellcraft,Craft,Craft10,Craft2,Craft3,Craft4,Craft5,Craft6,Craft7,Craft8,Craft9,Intimidate,Knowledge-Arcana,Knowledge-Dungeoneering,Knowledge-Engineering,Knowledge-Geography,Knowledge-History,Knowledge-Local,Knowledge-Nature,Knowledge-Nobility,Knowledge-Planes,Knowledge-Religion,Linguistics,Lore,Lore10,Lore2,Lore3,Lore4,Lore5,Lore6,Lore7,Lore8,Lore9,Spellcraft" "%c Notice: %c ========================================================= " "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" No other scripts running.  I'll play around with it some more in the next week to see if I can figure it out, just wanted to throw it out there in case you've seen it before! Thanks, Noe3
Game Master said: Sends the condition with number of rounds to the tracker and counts them down. But instead of deleting the condition from the tracker, when it reaches 0, it goes to -1; -2 etc. and causing the api-sandbox to shut down with an infinite loop error. I have the exact same problem. My game is a simple test page with only the characters imported with the example script from Scott's gist.
1511293697
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Norman G. said: Hey Scott!  I had a break from Roll20 recently, but I'm back with questions!  (This script has been amazing for my QoL running my game btw) So what I'm seeing here is a buff I created that gives an alchemical strength bonus.  When I set it in the character sheet, everything applies fine.  When I set it through pfc menus though it doesn't apply the strength bonus to any of my attack damage.  I looked at the output of the sandbox console and got this: "-=> Pathfinder Companion vPrototype 1.0 || Compatible with Sheet Version 1.6x <=-  [Tue Aug 15 2017 13:37:58 GMT+0000 (UTC)]" {"name":"condition-Energy Drain","current":"0","max":"","_id":"-KzA4eRr_Oo7b-_7cQsp","_type":"attribute","_characterid":"-Kz7FyiGiyjmHQkommHG"} "0" "%c Notice: %c caught STR-mod event: api " "%c Notice: %c caught INT-mod event: api " "%c Notice: %c PFSkills updateAbilityBasedSkills getting array: " "%c Notice: %c [array]:========================================= " "CS-Athletics,Climb,Swim" "%c Notice: %c ========================================================= " "%c Notice: %c PFSkills updateAbilityBasedSkills getting array: " "%c Notice: %c [array]:========================================= " "Appraise,Artistry,Artistry10,Artistry2,Artistry3,Artistry4,Artistry5,Artistry6,Artistry7,Artistry8,Artistry9,CS-Nature,CS-Religion,CS-Society,CS-Spellcraft,Craft,Craft10,Craft2,Craft3,Craft4,Craft5,Craft6,Craft7,Craft8,Craft9,Intimidate,Knowledge-Arcana,Knowledge-Dungeoneering,Knowledge-Engineering,Knowledge-Geography,Knowledge-History,Knowledge-Local,Knowledge-Nature,Knowledge-Nobility,Knowledge-Planes,Knowledge-Religion,Linguistics,Lore,Lore10,Lore2,Lore3,Lore4,Lore5,Lore6,Lore7,Lore8,Lore9,Spellcraft" "%c Notice: %c ========================================================= " "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" No other scripts running.  I'll play around with it some more in the next week to see if I can figure it out, just wanted to throw it out there in case you've seen it before! Thanks, Noe3 Hmm, ok, on taking a second look at that log output, this looks like it might be a sheetworker issue. I'll dig in deeper and talk with Chris over the holiday weekend and see what I can figure out.
Scott C. said: Norman G. said: Hey Scott!  I had a break from Roll20 recently, but I'm back with questions!  (This script has been amazing for my QoL running my game btw) So what I'm seeing here is a buff I created that gives an alchemical strength bonus.  When I set it in the character sheet, everything applies fine.  When I set it through pfc menus though it doesn't apply the strength bonus to any of my attack damage.  I looked at the output of the sandbox console and got this: "-=> Pathfinder Companion vPrototype 1.0 || Compatible with Sheet Version 1.6x <=-  [Tue Aug 15 2017 13:37:58 GMT+0000 (UTC)]" {"name":"condition-Energy Drain","current":"0","max":"","_id":"-KzA4eRr_Oo7b-_7cQsp","_type":"attribute","_characterid":"-Kz7FyiGiyjmHQkommHG"} "0" "%c Notice: %c caught STR-mod event: api " "%c Notice: %c caught INT-mod event: api " "%c Notice: %c PFSkills updateAbilityBasedSkills getting array: " "%c Notice: %c [array]:========================================= " "CS-Athletics,Climb,Swim" "%c Notice: %c ========================================================= " "%c Notice: %c PFSkills updateAbilityBasedSkills getting array: " "%c Notice: %c [array]:========================================= " "Appraise,Artistry,Artistry10,Artistry2,Artistry3,Artistry4,Artistry5,Artistry6,Artistry7,Artistry8,Artistry9,CS-Nature,CS-Religion,CS-Society,CS-Spellcraft,Craft,Craft10,Craft2,Craft3,Craft4,Craft5,Craft6,Craft7,Craft8,Craft9,Intimidate,Knowledge-Arcana,Knowledge-Dungeoneering,Knowledge-Engineering,Knowledge-Geography,Knowledge-History,Knowledge-Local,Knowledge-Nature,Knowledge-Nobility,Knowledge-Planes,Knowledge-Religion,Linguistics,Lore,Lore10,Lore2,Lore3,Lore4,Lore5,Lore6,Lore7,Lore8,Lore9,Spellcraft" "%c Notice: %c ========================================================= " "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" No other scripts running.  I'll play around with it some more in the next week to see if I can figure it out, just wanted to throw it out there in case you've seen it before! Thanks, Noe3 Hmm, ok, on taking a second look at that log output, this looks like it might be a sheetworker issue. I'll dig in deeper and talk with Chris over the holiday weekend and see what I can figure out. I played around with it for a bit and couldn't find much else out.  Fortunately the simple workaround is to set the buff in the character sheet menu rather than pfc =D  Let me know if you need any info on how to recreate it.
1511374167
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
MJ and Game Master, I can't replicate this issue in my scriptorium game (which is actually rather large). Would you be willing to let me do some testing in your games to see what is going on? Thanks, Scott
1511389542
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Norman G. said: Scott C. said: Norman G. said: Hey Scott!  I had a break from Roll20 recently, but I'm back with questions!  (This script has been amazing for my QoL running my game btw) So what I'm seeing here is a buff I created that gives an alchemical strength bonus.  When I set it in the character sheet, everything applies fine.  When I set it through pfc menus though it doesn't apply the strength bonus to any of my attack damage.  I looked at the output of the sandbox console and got this: "-=> Pathfinder Companion vPrototype 1.0 || Compatible with Sheet Version 1.6x <=-  [Tue Aug 15 2017 13:37:58 GMT+0000 (UTC)]" {"name":"condition-Energy Drain","current":"0","max":"","_id":"-KzA4eRr_Oo7b-_7cQsp","_type":"attribute","_characterid":"-Kz7FyiGiyjmHQkommHG"} "0" "%c Notice: %c caught STR-mod event: api " "%c Notice: %c caught INT-mod event: api " "%c Notice: %c PFSkills updateAbilityBasedSkills getting array: " "%c Notice: %c [array]:========================================= " "CS-Athletics,Climb,Swim" "%c Notice: %c ========================================================= " "%c Notice: %c PFSkills updateAbilityBasedSkills getting array: " "%c Notice: %c [array]:========================================= " "Appraise,Artistry,Artistry10,Artistry2,Artistry3,Artistry4,Artistry5,Artistry6,Artistry7,Artistry8,Artistry9,CS-Nature,CS-Religion,CS-Society,CS-Spellcraft,Craft,Craft10,Craft2,Craft3,Craft4,Craft5,Craft6,Craft7,Craft8,Craft9,Intimidate,Knowledge-Arcana,Knowledge-Dungeoneering,Knowledge-Engineering,Knowledge-Geography,Knowledge-History,Knowledge-Local,Knowledge-Nature,Knowledge-Nobility,Knowledge-Planes,Knowledge-Religion,Linguistics,Lore,Lore10,Lore2,Lore3,Lore4,Lore5,Lore6,Lore7,Lore8,Lore9,Spellcraft" "%c Notice: %c ========================================================= " "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" "SHEET WORKER ERROR: You attempted to set an attribute beginning with 'repeating_' but did not include a Row ID or Attribute Name in repeating_weapon_total-damage" No other scripts running.  I'll play around with it some more in the next week to see if I can figure it out, just wanted to throw it out there in case you've seen it before! Thanks, Noe3 Hmm, ok, on taking a second look at that log output, this looks like it might be a sheetworker issue. I'll dig in deeper and talk with Chris over the holiday weekend and see what I can figure out. I played around with it for a bit and couldn't find much else out.  Fortunately the simple workaround is to set the buff in the character sheet menu rather than pfc =D  Let me know if you need any info on how to recreate it. Ok, This appears to be an error with the sheet, although for me, it doesn't apply the buff to the damage regardless of if I trigger via script or manual enable/disable.
Scott C. said: I can't replicate this issue in my scriptorium game (which is actually rather large). Would you be willing to let me do some testing in your games to see what is going on? Sure, how do you want to do this ?
1511446806
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
PM me a game invite, and then I'll need gm access once I've joined. I probably won't be able to do it till sometime this weekend tho (Thanksgiving here)
1511666425

Edited 1511666481
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
V1.01511665715 Changelog Fix for infinite loop error when using round tracking for buffs/conditions Backend changes to how sheet version validation works Also, the buff applying to damage should be fixed on the sheet side once the next sheet update goes live.
I couldn't figure out how to post this to the Trello so I hope this is ok to post here. Cannot read property 'substring' of undefined TypeError: Cannot read property 'substring' of undefined at TrackedObj._validateAttrs (/home/node/d20-api-server/api.js:787:21)
1511744378
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Thanks Haks, The Trello is where the team communicates, this is the right place for error reports. Can you give me some more info on what the context of that error is? What were you doing, any commands that you sent to cause the crash, etc?
Scott C. What does  Damage/Effect Listener exactly do? How i should to use it? I am looking for answer  Ur manual with nothing in result. Soo. What does Listener do?
1512891664

Edited 1512891701
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The listener is a feature that did not make it into the current iteration of the script. I'll be working on it on my next development pass, once I finish the Starfinder HUD.
And a one more little question. Is there any way to easy add item in the Player Charter Sheet?
Scott C. said: The listener is a feature that did not make it into the current iteration of the script. I'll be working on it on my next development pass, once I finish the Starfinder HUD. Thanks for ur answer
1513631660

Edited 1513631752
Sorry, I did not see you ask for more information, and I have forgotten what prompted it before. Cannot read property 'id' of undefined TypeError: Cannot read property 'id' of undefined at mookHandler (apiscript.js:3176:95) This one came from me putting a picture, meant for a token, on the VTT. It wasn't attached to a character sheet, just a token straight from my library.
1513632535
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, ok, thank you, that should help me out.
Scott, Really loving this script. However I am also getting this error (not signed up for trello) not sure how to use its interface. Cannot read property 'substring' of undefined TypeError: Cannot read property 'substring' of undefined at TrackedObj._validateAttrs (/home/node/d20-api-server/api.js:787:21) Essentially this occurs when applying the conditions/buff if its not tied to a selected token status marker. If its set the error does not occur. The easy fix would be to assign the graphics, however is there a way to have a feature added where you do not have to set the icon in the PFC buffs (ie left as null or blank, also add the ability to set to null) so we could just use : !pfc --apply,condition=ConditionName,remove|characterid|characterid|... !pfc --apply,buff=BuffName,remove|characterid|characterid|... and no graphic would appear. My thinking is that it would then be possible to use in a macro to call from another script such as custom status marker per se' and still apply the condition.  Mark
1514256598
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Thanks for the bug report mark. It looks like something is off in the application of conditions/buffs. They shouldn't require a marker at all.
Thanks Scott, FYI if I use an unassigned status marker even directly from the token and not the PFC the error is triggered as well.
One other bug I found it on the !pfc --token menu. When you change the Multiplier if you have any value in Aura 1 other than null it reports that number back in the same file.. Example below: It doesn't affect the functionality it does change the multiplier the menu just reports it wrong.
1514264431
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, ok, that's a bizarre one, must be referencing a variable incorrectly. I'll get on these in the new year.
Hey Scott (Merry Christmas!) Noticed that using the script, even if I turn OFF status markers/buffs if I use a status icon it will apply the buff/debuff. It will also randomly assign (rarely and I don't know what causes it) a buff with a number attached to it (like a web icon with a red #3). I've circumvented for now by just changing all the icons to one my group doesn't ever use and it's fine like that.
Hi! I've been using this script for a couple weeks now and am amazed at the work you put into it (and in Javascript, which is the bane of my existence at work...I prefer my C# and SQL lol). I did have a question though, perhaps more of a request: During the parse process, would it be possible to add a flag for things such as Power Attack, 2h/1h, or other such feats that modify damage/attack rolls? In most cases you'd want it on, and it would be nice to have that parse in on its own. I know thats a huge undertaking to take into account every feat, but I feel at least Power Attack might be one to be looked at since that is fairly ubiquitous. 
1515027159
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ummm, I'm getting better at statblock parsing thanks to my work on some other projects, but that might still be a little much.
Yeah, I figured it might be, but thought it'd be worth mentioning if you had a better idea. Thanks for replying though :)
Hi! With the current functionality the counter for Buffs/Conditions is off by 1. Example of current functionality: PC is blinded for 1 round. Command: "!pfc --apply,condition=Blinded,rounds=1". -> The blinded condition is added in the turn counter at second position.  In just the next initiative step the blinded condition decrements to zero and is automatically deleted, which leaves the PC not blinded for 1 Round but instead like not really blinded at all. --------- Solution: Delete the condition when the counter reaches -1 instead when it reaches 0. Otherwise each Buff/Condition will be off by one round. Edit: Yes I know I can circumvent that by setting the duration 1 higher. But it would be weird to set the duration of a 3 round buff to 4, just to prevent the bug.
1515344759
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, thanks for the catch darkim.
While prepared casters seem to be covered with the resource tracker, there doesn't seem to be an inherent method for spontaneous casters to track spells used. Am I missing something? Is there a recommended way to do this? (Perhaps by adding custom tracking attributes/elements?)
1515353936
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The way that spell tracking works depends on how you set up your sheet. If you're set up as prepared casting you can decrement spells available. If you are spontaneous, you can increment spells used.
Scott C. said: The way that spell tracking works depends on how you set up your sheet. If you're set up as prepared casting you can decrement spells available. If you are spontaneous, you can increment spells used. Prepared casters can see--assuming they have the "show uses" option selected--how many spells are available. Attempting to decrement an expended spell also gives notice: "Insufficient Spellcasting." The former bit isn't reliable, however, as the sheet may require manual refresh to show the number of spells actually available. The warning provides a reliable cue in spite of this, making it useful.  On the other hand, there doesn't seem to be any sort of notification to alert the spontaneous caster that he's cast more than is possible. Nor is information provided on how many spell uses remain available for a particular spell level, either before or after incrementing a spell. Opening the character sheet obviously provides the information desired, but the point of the spellbook macro (and the incrementer/decrementer) is the promise of not having to do that all the time.  Then again, I may be ignorant of something that would change my understanding entirely. 
1515367443
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, I'll have to refresh my memory on how that part of the script is working. It is supposed to do all of that for spont casters. Certainly possible that I screwed up tho.
Scott C. said: Hmm, I'll have to refresh my memory on how that part of the script is working. It is supposed to do all of that for spont casters. Certainly possible that I screwed up tho. Believe me, it's just as possible that I'm doing something wrong or am not aware of something I should be!
1515371980

Edited 1515371995
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I haven't actually used the script myself in a while, let me get back into it and see what's going on. As you can see from the previous posts, I've also got some bugs to hunt and kill :)
Scott C. said: I haven't actually used the script myself in a while, let me get back into it and see what's going on. As you can see from the previous posts, I've also got some bugs to hunt and kill :) This is a low-level inquiry so it only makes sense to put an investigation way down on your list and get to the important stuff instead. I appreciate that you've taken the time to contemplate it at all! And by the way, amazing work on all this! 
Hi, I hope this is the correct place for this: I get this error Message everytime I upload a new token into the game, and when I move the token or change it. This is my current configuration: The API-Console output is as following: "TypeError: Cannot read property 'id' of undefined\n at mookHandler (apiscript.js:3176:95)\n at graphicHandler (apiscript.js:3201:17)\n at RegisterEventHandlers.on (apiscript.js:3349:46)\n at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:146:1), <anonymous>:65:16)\n at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:146:1), <anonymous>:70:8)\n at TrackedObj.set (/home/node/d20-api-server/api.js:909:14)\n at updateLocalCache (/home/node/d20-api-server/api.js:1194:18)\n at /home/node/d20-api-server/api.js:1378:11\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)" What am I doing wrong?
1516051800
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Thank you Darkim. I'm working on chasing this error down. Several others have reported it as well.
Hey Scott, As I said earlier: I really love the script it speeds up the game by so much! One suggestion for a future update from my side: You think it's feasible to implement something that lets you set up ability penalties caused by poisons, diseases or curses with the script? We currently use the work around that we have "buff" called "poisoned" but you still need to adjust the values and such manually. Just a thought ;-) /K
1516374512
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I do actually have something in mind for that.
Hello! I am so SO happy that I have found this thread!  I have been using your wonderful script for some time, but it seems with my most recent game I've started up 2 weeks ago, I've encountered some problems that I simply don't know how to fix myself.  Granted, this is the first script I've ever used, so... I'm uncertain if it truly is due to the script, or an error on my part.  Hopefully, you can help me figure it out! My first problem is that some of the macro buttons (when selecting the character token) do not work for two of my players.  Upon clicking their Fort/Will/Ref saves, this is the response that is spat out: For this particular player, I should also note that the name for some reason is not that of her character.  I would have thought that such would be the reason as to why she's having issues using the token macros, but for my other player who gets the same response, his name correctly shows up.  I have tried having my player remake their character on a completely new character sheet, but even then the same problem occurs.  It is only for those two players, the rest have no issue. Second, these are two script errors I have received a couple of times.  I'm uncertain what they are, so I figured I'd post them both here: Cannot read property 'substring' of undefined TypeError: Cannot read property 'substring' of undefined at TrackedObj._validateAttrs (/home/node/d20-api-server/api.js:787:21) Cannot read property 'bar1_link' of null TypeError: Cannot read property 'bar1_link' of null at _.some (apiscript.js:3052:59) So my last question I don't believe is script related.  When skimming through the thread, the user Karankwan had suggested this button: [BUTTON TEXT](!pfc --apply,buff=BUFFNAME,rounds=#,swap|@{target|character_id}) This is SUCH a great idea!  The thing that caught my interest right off the bat was also the rounds option.  Is this a feature I was not aware of, that the script can do with buffs/debuffs?  In his gif, it states "Round 1".  That looks super helpful!  Though I'm uncertain if it's a feature or something he's manually inputting himself, but with many of the spells my characters are using, having a very easy way to track rounds on a buff would be beyond wonderful. Thanks for all the help! - Maddie
1516382396

Edited 1516382698
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi Maddie, I'm glad you've been enjoying the script and i apologize for the issues you've been having. So addressing your questions in order: The macro button issue can you verify that the corresponding buttons on the sheet itself are working? Can you open the problem characters and post what the contents of the custom abilities for each of the problem buttons is? These errors look like they are two separate problems, but I can't quite be sure.  Can you give me some more detail on what you/your players were attempting when you got them? What commands did you send or what events happened on the VTT?  The first error looks like the script is sending something invalid to the vtt, but I'm not sure where it's coming from. The second looks like it isn't properly gating for actual objects. Did these show up in the script's error message in chat (AKA the first image in Darkim's post above ), or did they crash your sandbox? The rounds manipulation is indeed a feature of the script's buff/condition handling. You can find all the details on the script's functions detailed in the user's manual . For brevity's sake, only the basic commands are outlined in the quick help that is created in game.
Scott C. said: Hi Maddie, I'm glad you've been enjoying the script and i apologize for the issues you've been having. So addressing your questions in order: The macro button issue can you verify that the corresponding buttons on the sheet itself are working? Can you open the problem characters and post what the contents of the custom abilities for each of the problem buttons is? These errors look like they are two separate problems, but I can't quite be sure.  Can you give me some more detail on what you/your players were attempting when you got them? What commands did you send or what events happened on the VTT?  The first error looks like the script is sending something invalid to the vtt, but I'm not sure where it's coming from. The second looks like it isn't properly gating for actual objects. Did these show up in the script's error message in chat (AKA the first image in Darkim's post above ), or did they crash your sandbox? The rounds manipulation is indeed a feature of the script's buff/condition handling. You can find all the details on the script's functions detailed in the user's manual . For brevity's sake, only the basic commands are outlined in the quick help that is created in game. Thanks for the prompt reply, Scott!  I will try to answer these questions the best I can but may need some guidance on how to get you the proper answers... 1.  1. The buttons on the character sheets themselves do work.  It is what my players have to resort to, due to the macros not working. 2. I'm not quite sure what you're asking here, so I'll do a  gif of what is shown under defenses and what happens when I click things. 2.  1. Both were two separate errors that happened when my players were attempting to make saves. I'll include pictures below. 3.  These showed up in the chat box, much akin to what Karmin's post above shows. The above error was done when my player made a new character sheet (our attempt to try to fix the issue), and I was applying the default token settings to his new token/sheet. This error happened after my other player, who joined a couple days ago, was showing me that she too was having the issue. 3.  Thanks for the info!  I have the manual bookmarked and reference it often, but must have missed that bit of info!  I'll look into it again, thanks. :) I hope that's the information you were looking for!
1516389794
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Maddie, Thanks for the quick response with that info. For my second question on the button issue, I was wondering what the content of the problem token abilities is on the attributes & abilities tab of the character sheet. For the errors, I'll have to figure out what's going on there. I'm happy the error detection caught them though, so at least your sandbox isn't crashing. For the second error, what exactly was your player doing when she triggered that error showing you that she also had the button issue?
Scott, It took me a moment to figure out what you meant, but eventually, I figured it out.  Going into the Attributes & Abilities tab of the two character sheets, I went in to "edit" the save throws and discovered those weird names there.  I think it's odd that they don't reflect the actual character name... So I swapped them out for the correct names and spelling, which immediately solved the issue!  Whew!  Hopefully the names don't get reverted back at some point. As for the errors, the second one I'm not exactly sure, as this was a couple days ago.  I may have deleted her token and attempted to reset it with a new one, once more as a possible fix to the issue.  Or perhaps I tried switching who controlled the character from one person to another, again, as another possible fix.  I wish I had the specific details, but I don't honestly remember.  :(
1516397176
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
No problem, glad that fixed the button issue. I would guess that you set up the menus before the character was properly named (this may be something I need to put handling for into the script), and so it was using the randomly generated name of the character. If you get those errors again, post back here with what you were doing and I'll try to hunt the causes down.
Scott C. said: I do actually have something in mind for that. Fantastic news!!
I'd like my players to be able to do a daily spell reset, but with the spell tracking the way it is, I can't seem to find a way to reset the number of spells cast (to zero for spontaneous casters) without going to each spell that was used individually and hitting the reset button. Setting the "spellclass-0-level-#-spells-per-day" to zero with something like ChatSetAttr works temporarily, but all progress is lost with a sheet recalculation. Any advice? Nobody else in the thread seems to have had this problem so far, so maybe I'm just missing something.