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

Darkim said: 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? Im having the same issue. Script Starts up fine but after errror I get the following message in Api Output Console  "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)"
Scott C. said: Thank you Darkim. I'm working on chasing this error down. Several others have reported it as well. I got rid of the error by setting  "Represent Character" to a character in journal --  Set "Represent Character" back to none and error is gone- Not an elegant workaround but hopefully it will help you with the issue --  Script doesnt seem to like Nan in new token creatins???? 
Davis Y. said: 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. i created a macro whith ChatSetAttr to handle the spells for spontaneous casters. since it doesn't matter which spell was cast i checked the "total spells manually" box and i've built the macro to give in chat the number of spells left for each level with a button to change directly the "spells-per-day" field. The appropriate line could be inserted in the description or macro text of the spells to act more like the spell tracking feature. As far as i can tell the easiest approach to spontaneus casters is to just act on the total
Marco S. said: i created a macro whith ChatSetAttr to handle the spells for spontaneous casters. since it doesn't matter which spell was cast i checked the "total spells manually" box and i've built the macro to give in chat the number of spells left for each level with a button to change directly the "spells-per-day" field. The appropriate line could be inserted in the description or macro text of the spells to act more like the spell tracking feature. As far as i can tell the easiest approach to spontaneus casters is to just act on the total Would you mind sharing that macro? I'd like to try it out, it seems like what I'm looking for.
&{template:pf_generic}{{name=@{selected|character_name} spells}} {{ 1 [[@{selected|spellclass-0-level-1-spells-per-day|max}-@{selected|spellclass-0-level-1-spells-per-day}]] left [use](!modattr --sel --silent --spellclass-0-level-1-spells-per-day|1 ) 2 [[@{selected|spellclass-0-level-2-spells-per-day|max}-@{selected|spellclass-0-level-2-spells-per-day}]] left [use](!modattr --sel --silent --spellclass-0-level-2-spells-per-day|1 ) 3 [[@{selected|spellclass-0-level-3-spells-per-day|max}-@{selected|spellclass-0-level-3-spells-per-day}]] left [use](!modattr --sel --silent --spellclass-0-level-3-spells-per-day|1 ) 4 [[@{selected|spellclass-0-level-4-spells-per-day|max}-@{selected|spellclass-0-level-4-spells-per-day}]] left [use](!modattr --sel --silent --spellclass-0-level-4-spells-per-day|1 ) 5 [[@{selected|spellclass-0-level-5-spells-per-day|max}-@{selected|spellclass-0-level-5-spells-per-day}]] left [use](!modattr --sel --silent --spellclass-0-level-5-spells-per-day|1 ) 6 [[@{selected|spellclass-0-level-6-spells-per-day|max}-@{selected|spellclass-0-level-6-spells-per-day}]] left [use](!modattr --sel --silent --spellclass-0-level-6-spells-per-day|1 ) 7 [[@{selected|spellclass-0-level-7-spells-per-day|max}-@{selected|spellclass-0-level-7-spells-per-day}]] left [use](!modattr --sel --silent --spellclass-0-level-7-spells-per-day|1 ) 8 [[@{selected|spellclass-0-level-8-spells-per-day|max}-@{selected|spellclass-0-level-8-spells-per-day}]] left [use](!modattr --sel --silent --spellclass-0-level-8-spells-per-day|1 ) 9 [[@{selected|spellclass-0-level-9-spells-per-day|max}-@{selected|spellclass-0-level-9-spells-per-day}]] left [use](!modattr --sel --silent --spellclass-0-level-9-spells-per-day|1 ) [reset](!setattr --sel --silent --spellclass-0-level-1-spells-per-day --spellclass-0-level-2-spells-per-day --spellclass-0-level-3-spells-per-day --spellclass-0-level-4-spells-per-day --spellclass-0-level-5-spells-per-day --spellclass-0-level-6-spells-per-day --spellclass-0-level-7-spells-per-day --spellclass-0-level-8-spells-per-day --spellclass-0-level-9-spells-per-day ) }}
1518023026
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi all, I have submitted a fix for the errors from dragging tokens not connected to a character onto the vtt. The handling for spontaneous caster spell tracking is not working as intended, and I am working on fixing this. I wanted to get the fix for the error messages out in the meantime though. The new code will probably merge next week. In the meantime, the updated code can be found on my branch of the repository .
Hi, great fix on the Bug, Scott! Thanks Current Bugs on my list: Condition Turn counter off by one  (Report) Spell counter: Click on increase/decrease first prints a message (eg. Qty: 0/3) and then  increases the 0 to 1. The correct output would have been (Qty 1/3). This confuses the players. This does not happen every time. Seems to be dependent on the performance. "!pfc --whisper,pc=swap,npc=swap,stats=swap" not working correctly The "PC: Whisper GM" can't be changed via the script. "NPC" and "Stats rolls" work fine.
Hello! I am back to this thread with a general user question.  Is there a way to add debuff tracking for Hexes, or debuffs that aren't a part of the list of debuffs?  We have a witch in our group, and all of her Hexes are getting so hard to track each round on multiple enemies.  I love the debuff macros that can be created for things such as "Sickened", and wanted to know if there currently is a means of doing it for other things. Thanks in advance for the assistance! -- Maddie
1520317117
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You could make a buff for each of them and then use the tracking with that. Currently there isn't other automation.
Hey Scott, I'm having some trouble with the companion script and applying buffs to my tokens even though the feature has been turned off and is applied to the campaign. I'm currently using version 1.x and here's a quick screen grab at my settings for the script.&nbsp;<a href="https://gyazo.com/2b73052bc9ec314ba960162d93380be4" rel="nofollow">https://gyazo.com/2b73052bc9ec314ba960162d93380be4</a>
1521666418
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
So, it isn't applying the buff or it is?
Hello! I do hope I'm not getting to be too annoying at this point! I've discovered an issue I've been having with the script as of the past two weeks, and I'm uncertain if it's due to something on my end or otherwise.&nbsp; My problem has been getting the tokens I make to remain linked to the character sheet I assign them to. What I would normally do in the past is create the NPC/Monster character sheet and save it once everything had been filled it.&nbsp; I'd then upload the token I want to represent that enemy into Roll20/onto the map.&nbsp; This would be followed with me going into the settings for the token and assigning it to the NPC it's supposed to represent.&nbsp; At that point, all I'd really need to do is delete the token, and then the next time I drag that NPC onto the playing field, the token would come out with all it's relative information filled in and macros available. Now when I do the same steps above, when I go to pull the NPC out onto the playing field, the generic blue and white image comes out (without the token assigned).&nbsp; Sometimes if I restart the script, things go back to working properly, but as of yesterday when I was prepping our session, even restarting the script doesn't seem to work anymore.&nbsp; Is this something that I'm doing wrong on my end?&nbsp;&nbsp; Thanks in advance for all your hard work and help! - Maddie Some hopefully helpful information:&nbsp;&nbsp; Character Sheet: Pathfinder (Community) Version 1.720 This is an error that currently pops up when I examine the script.&nbsp; Not sure if it has anything to do with what's going on? "ERROR: You cannot set the imgsrc or avatar of an object unless you use an image that is in your Roll20 Library. See the API documentation for more info." "ERROR: You cannot set the imgsrc or avatar of an object unless you use an image that is in your Roll20 Library. See the API documentation for more info." "%c Notice: %c Attributes at version: 0 " "%c Warning: %c migrate repeating attacktype Dropdowns, there are no rows for weapon " "%c Warning: %c migrate repeating attacktype Dropdowns, there are no rows for item " "%c Warning: %c migrate repeating attacktype Dropdowns, there are no rows for spells " "%c Warning: %c migrate repeating attacktype Dropdowns, there are no rows for ability " "-=&gt; Pathfinder Companion v1.01518021707 || Compatible with Sheet Version 1.6,1.7x &lt;=- [Wed Feb 07 2018 16:41:47 GMT+0000 (UTC)]"
1523561406
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
That error isn't actually an error. It's a bug with how Roll20 checks the validity of images set via api (an empty image url is seen as invalid). Can you post a screencap of your script config menu?
Scott C. said: You could make a buff for each of them and then use the tracking with that. Currently there isn't other automation. I want to use this feature as well, but would this mean I'd have to setup every hex/buff for every character sheet manually? That seems error prone, because I will surely put one or more typos in there over time :-). I know a possible solution would be to setup a character template and clone this for every new character I add, but maybe you have a better idea how to setup Buffs en-bulk.
1523624724
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Currently the manual method is the only way. You could probably use chatsetattr to do it via macro. I've also got a feature in the works that will automate it.
Sure!&nbsp; Hope this helps: <a href="https://gyazo.com/ad143fdb2484459ff273927f7d3b6056" rel="nofollow">https://gyazo.com/ad143fdb2484459ff273927f7d3b6056</a>
1523714712
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Maddie, could you enable or disable a buff/condition and then copy the text from the API console to here? I think I know what's going on.
Hello Scott, I did what you said, but it seems this is the only thing that's showing up in the API console box: "-=&gt; Pathfinder Companion v1.01518021707 || Compatible with Sheet Version 1.6,1.7x &lt;=-&nbsp; [Wed Feb 07 2018 16:41:47 GMT+0000 (UTC)]"
1523903211
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, ok, well that makes it unlikely that what I thought was going on is actually what is going on. Where are the images for the tokens from? The marketplace? your uploaded library?
I make them myself and upload them.&nbsp; Using TokenTool, I pull from PDF images (via screen capture), or sometimes the internet.
1523906126
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
hmm, ok, so definitely not that then. Hmm, can you vault one of the problem characters into&nbsp; this game
I believe I properly imported one of the characters.&nbsp; Let me know!
1523907802
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
thanks, what is the character name?
Valstoi.&nbsp; He's been by far the most problematic NPC that just won't keep a token.&nbsp; Granted, there are others, but his is the one I consistently have issues with.
1524006035

Edited 1524006454
Script works perfectly for PCs, but it links the HP value for all NPCs which negates that option for "mooks." Basically, unique characters should have linked HP values on all their tokens across various pages, and red-shirts or mooks should not. How am I going about this wrong?
1524033065
vÍnce
Pro
Sheet Author
You still need to setup your initial token with unlinked bars if it's a mook. ( Linking_Tokens_to_Journals ) example, set up your initial monster token with "represents character" set to the monster and with properly linked bars.&nbsp; ie HP, AC, etc is correctly linked.&nbsp; Then, if the monster is a mook/red-shirt, you'll want to change the token bars links to "none".&nbsp; Now when you copy the token and paste, PFC will auto-number and each mook and each token will have it's own unique, unlinked HP, AC, etc.&nbsp;
Hey there! I was recommended to use this script by [DM]ighty Maddie, and, so far, it has been really making my pathfinder game a lot more clean and quick from my side of the table. Thanks for making this script! Anyways, onto the scripty glitchy news. Lately, I've ran into some heavy issues with the script in my game. It's very odd; my older tokens, like the original PCs of this game, all are linked up just fine, having their buttons on the top left give them great, easy access to their abilities, defenses, etc. However, the GM side of things has mounting issues. First and foremost, while the stuff works for older character entries in my game, I am completely unable to use the !pfc --config command in order to open the configuration menu of the script. Even worse, though, is that my tokens are not having issues linking to the script, such as them not having their buttons popup in the top left when I select their tokens, even though their health and armor are linked in their bars. Then, just last night, I had an issue where an NPC I made and linked through the token menu (dropdown to the character, select, wait for it to link), didn't work at all. It didn't link health or armor, and, when I tried to drag the token from the sidebar, it didn't link the token image with it, so I got the mocking blueman in his white square instead. Any help given is greatly appreciated, as this script has quickly become an integral part of my game! Thank you!
Right after I made this post (of course), I got a popup from the PFC in my game that says the following: (From Pathfinder Companion): This version of the Neceros Pathfinder Sheet Companion is only compatible with sheet version 1.6 or 1.7. You do not appear to be using the correct Neceros Pathfinder sheet, please switch to the appropriate sheet, or the companion script for your sheet. The script has not initialized and will not respond to events or commands. Override Compatibility Warning
1527567808

Edited 1527567842
vÍnce
Pro
Sheet Author
Nothing happens when you try "!pfc --config" ?&nbsp; Sounds like pfc has stopped.&nbsp; Are you seeing any errors in the API console or chat?
1527575089

Edited 1527575312
Welp. Scripts seem to have spite for me posting on forums, and start working again just to make me look dumb. I clicked the "override" warning button that popped up, refreshed, and things seemed to fix. While it is fixed for now, tho, I'm not sure if it will last. Mostly because I don't do scripting lol. Anyways! The only errors in the API were two things: at one point, there was an error saying my sandbox had been stopped because there seemed to be an infinite scripting loop, so it shut down. That, I only saw once today. Otherwise, the only issue I saw was the missing token ID thing that I've been told is not a big issue. EDIT: annnnd just as script giveth, script taketh away. Back to error of no config. Here's what's in the sandbox. SyntaxError: Unexpected token h in JSON at position 313 SyntaxError: Unexpected token h in JSON at position 313 at JSON.parse (&lt;anonymous&gt;) at character.get (apiscript.js:1489:46) at /home/node/d20-api-server/api.js:801:7 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Rd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400 at S (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:57:1015)
1527577925
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Mark, what were you attempting in that last error message?
Since the config had been working, I tried to "apply to all" with the the PFC settings I had for character sheets. I was told it would take a little bit to apply to all, but it took over an hour, so I tried to see if there was any response from me hitting the config command again, which there wasn't. Went to the sandbox, saw that, came back, not working again. I mean, I honestly probably just shoulda took the graces the sheet gave me and not messed with it, but I'm not a very smart man :c
1527580773
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, ok, thanks for the report.
So, otherwise, though, the config/script in general doesn't seem to be working, again. Sorry for being so back and forth on this, but it seems the issues are pretty wishy washy as well. Any ideas for why my script isn't doing well in my campaign? I checked with [DM]ighty Maddie's campaign, and hers seems to work well and good compared to the failures I'm running into.
I've had this pop up on one of my tables as well. I just used a different table and transmogrified stuff to the affected table where they were used in a session with no problems. I don't know what is causing it. I went into the settings and reset everything so it is using new versions of the sheet. My other tables seem to have no issue.
1527626414
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, I've gotten several reports of intermittent bugs (my favorite kind :/). I'm traveling at the moment, but I'll take a deep dive this weekend when I'm back home and on stable internet.
@Mark: Wild speculation here but, could you try restarting the sandbox when the !pfc --config menu doesn't show up the next time? I believe one of the following two options will happen: 1. After restarting the sandbox the !pfc command will work again 2. You receive the compatibility warning If you receive the warning, override it and retry the !pfc --config command, I believe it should work then. I believe there is an issue I've seen in my games that the comparison between the version of the Neceros Sheet and the Companion Script version is not working as robust as it worked before. It seems the recalculation of the sheet attributes is too slow, the pfc script reads an undefined version info of the sheet and refuses to start at all. If the issue keeps persisting feel free to invite me to your game and we can have a look.
Basically, hitting the compatibility warning button is the only thing that allows the script to work in my game fully. I have to hit it each time I refresh/restart the game, which is pretty mind-numbing.&nbsp;
1528400450
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
hmm, thanks Mark, I'll look into that.
I'm not completely sure what solved it for me, because I scrambled to find the exact reason and somehow got it to work again. I believe it might have something to do with the archived character named "version check" that is created by the companion script. Maybe try deleting this, it will be automatically recreated when the API is restarted so there is no risk in trying.
1528465261
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, that character should be deleted after start up.
I'll give it a shot when I get a chance today. Something else I noted was longer than usual times on my Bestiary table when I was using the Companion script to make a creature. One took 37 seconds to parse. I had never seen one take that long. It works fine. I was just surprised. I suppose it could be on my end too. I haven't made any this week as I was grading AP History exams, but I will hopefully be done earlier tonight and get a few more moved over from Bestiary 5.
1528493147

Edited 1528493168
vÍnce
Pro
Sheet Author
Scott C. said: Hmm, that character should be deleted after start up. I notice that I might have 2 or more "version check" characters at times.&nbsp; Sometimes none... I often just delete them.&nbsp; I'm often running our latest beta code for the sheet, so I'm not sure if that has any impact.
Update: I've now gotten this error in my API Sandbox a couple times. I hope it might help to figure out what's going on.
Additionally, I got an error that I was told to post here :o Unexpected token h in JSON at position 1232 SyntaxError: Unexpected token h in JSON at position 1232 at JSON.parse ()
1528672117
The Aaron
Pro
API Scripter
That sounds like you aren't getting a clean copy of the script.&nbsp; Try copying it from the raw link:&nbsp;<a href="https://raw.githubusercontent.com/Kurohyou/roll20-api-scripts/master/Pathfinder%20Companion%20Neceros/1.01518021707/PFCompanion.js" rel="nofollow">https://raw.githubusercontent.com/Kurohyou/roll20-api-scripts/master/Pathfinder%20Companion%20Neceros/1.01518021707/PFCompanion.js</a>
Mark O. said: Update: I've now gotten this error in my API Sandbox a couple times. I hope it might help to figure out what's going on. I can somewhat confirm, I'm seeing this pop up in my games too but couldn't pinpoint where it came from. Are you certain it's from PFC (ie because you just have that script active when it happens)?
Sorry for such a late reply! So I copied my game, with all the journals, characters, etc, but no scripts. Using the same pathfinder script, obviously. Instead of getting the normal script, I copied the raw data as posted by Aaron, posted it in script api, saved everything, seems a-ok in the sandbox. I get into game, try to use the&nbsp; !pfc --config command, and it seems as though the command does nothing whatsoever. Unlike my normal, original game, though, there is not even an error popup in the chat that I can click and seemingly fix the issues I've been having. If it helps at all, it seems as though the API sandbox always has issues like the following when I open it, with ID seeming to change sometimes.&nbsp; "Sheet Worker ERROR: Unable to find valid character with ID -LHUPghyCdQo84I7Mt1n"
1531683541
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Thanks Mark. I'll be taking a look at PFC in the (hopefully) near future.