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

Hi Scott, Thanks for your API script. It's been a real time saver the past few sessions. I'm not very good at making macros. Or at least, understanding them. I would like to use the automatic condition applier part of the Companion, but the only thing that was provided on the User Manual was a macro that adds  buffs/conditions, not removes them.  !pfc --apply,condition=?{Select a Condition|Blind|Entangled|Invisible|Cowering|Fear|Pinned|Dazzled|Flat-Footed|Prone|Deafened|Grappled|Sickened|Helpless|Stunned|Fatigued|Energy Drain,drain ?{Add how much energy drain}} In fact, even with the normal remove buff command I have yet to fully understand how it works and have had to manually remove buffs every time because I can't seem to get the code right. Is there any way you could explain in lay man's terms how I could make an easy macro to add and remove buffs and status effects? I don't mind 4 buttons, but 30+ is a little ridiculous.  I was uncertain as to the status of whether or not you'd want inbox spam, but if you'd prefer to answer in a PM feel free to do so. Thanks for your time, and have a good day, Jared
I believe if you do: !pfc --apply,condition=?{Select a Condition|Blind|Entangled|Invisible|Cowering|Fear|Pinned|Dazzled|Flat-Footed|Prone|Deafened|Grappled|Sickened|Helpless|Stunned|Fatigued|Energy Drain,drain ?{Add how much energy drain}},swap you will have the add/remove functionality you desire.
1532103685

Edited 1532103701
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, that should do it. could also do this if you want to guarantee that it gets added/removed (untested, but should work): !pfc --apply,condition=?{Select a Condition|Blind|Entangled|Invisible|Cowering|Fear|Pinned|Dazzled|Flat-Footed|Prone|Deafened|Grappled|Sickened|Helpless|Stunned|Fatigued|Energy Drain,drain ?{Add how much energy drain}}?{add/remove|add, |Remove,,remove} Note that either version of the macro should only be stored in a character's abilities, not in a global macro to avoid the html encoding being removed.
Hey Scott, was hoping you could help me with an issue. When using the companion script, I cannot seem to get the Automatic Maccros to disable for the sheets, and regardless of the option being on/off in the control panel the tokens still have auto debuffs applied when they use their statusmarkers. 
Hello again Scott, Your script has been proving invaluable the past few months, but I've run into a strange snag.  Mook numbering has stop working for seeminly no reason. It works fine in one campaign, but not at all in another. I have no idea how to troubleshoot this beyond attempting to turn it on and off again and what not. Nothing I've done has yielded any results; I have yet to completely uninstall and reinstall the script, but I would rather that be the last option so I don't have to go through the tediousness of re doing all of my custom condition icons. Thanks ahead of time,  -Jared
1536870942

Edited 1536871314
DXWarlock
Sheet Author
API Scripter
I seem to running into an issue. When dragging to the table a token, or copy/paste the token I get: Companion API Script v1.01518021707  Error Handling The following error occurred: Cannot read property 'substring' of undefined TypeError: Cannot read property 'substring' of undefined at TrackedObj._validateAttrs (/home/node/d20-api-server/api.js:878:26) And no idea what it's trying to tell me is incorrect. Or even how to start helping narrow down info you may need beyond that.
I've run into two issues, one first and the second because of it. Initially, I got the following error when attempting to over-heal a mook: Companion API Script v1.01518021707  Error Handling The following error occurred: Cannot read property 'bar1_link' of null TypeError: Cannot read property 'bar1_link' of null at _.some (apiscript.js:3023:59) Please post this error report to the  Script forum thread . But the link provided goes to the trello board for the Sheet and Companion development project rather than here...  (I'm entirely willing to help, if I can, I'm a fairly able coder, but this also seems like a bug.  That said, I do run a number of browser-plugins that block script execution and while I thought I turned them all off, I may have missed something.) As regards the first error, the mook overhealing, is there a reason that there isn't a try/catch that, in the event of an un-linked barX (where barX is set to track HP in the Comapnion config), checks the token for a maximum value for barX and caps to that or reports an error maybe like, "BarX is set to track HP in your Companion config, but token {token reference} has neither a specified linked attribute nor a specified maximum value, so the Companion was unable to identify a valid maximim-cap for this token."?
1538552105

Edited 1538552140
DXWarlock
Sheet Author
API Scripter
The last few days I've been getting the "Compatibility Override" question upon API start. Alerting me that the script is not for the sheet version anymore. I've got both the one click API sheet, and script installed. Is there something I am missing, or is one just lagging behind the other?
DXWarlock said: The last few days I've been getting the "Compatibility Override" question upon API start. Alerting me that the script is not for the sheet version anymore. I've got both the one click API sheet, and script installed. Is there something I am missing, or is one just lagging behind the other? I've had this for at least the last couple months.
Kind-of a long shot here, but I figured it doesn't hurt to ask.  is there any kind of way where I can pull loot from one character and give it to another, effectively just equipment transfer across character sheets? I'm still learning the script and apologies in advance if this isn't the right place to post. Thanks
Yeah, use this.
Can't get the script to work today.  Getting a weird error message:  docker: Error response from daemon: failed to write unhaltered resolv.conf file content when setting up dns for sandbox c0ed87f043a18bc2f53a31a0df43a5d78d388f6a2f3ea3fe9a43d771fa83f983: open /var/lib/docker/containers/ec7f51cbae202c206b36fd5b8a19002eb5c2221cb7de157b74d89bc3062b712a/resolv.conf: no space left on device.
1542277409
Ziechael
Forum Champion
Sheet Author
API Scripter
John F. said: Can't get the script to work today.&nbsp; Getting a weird error message:&nbsp; docker: Error response from daemon: failed to write unhaltered resolv.conf file content when setting up dns for sandbox c0ed87f043a18bc2f53a31a0df43a5d78d388f6a2f3ea3fe9a43d771fa83f983: open /var/lib/docker/containers/ec7f51cbae202c206b36fd5b8a19002eb5c2221cb7de157b74d89bc3062b712a/resolv.conf: no space left on device. This is likely due to the ongoing known issue, reports are being consolidated here:&nbsp; <a href="https://app.roll20.net/forum/post/6965436/docker-script-error/?pageforid=6965923#post-6965923" rel="nofollow">https://app.roll20.net/forum/post/6965436/docker-script-error/?pageforid=6965923#post-6965923</a>
1542794729

Edited 1542796084
Hey, First of all, thanks for this incredible script. Also I have a question, is there a way to incorporate into the menus the buffs we add manually to the sheet? The buff section only allows some (many) preset buffs and conditions. In the same way as "attacks" gives access to default as well as personalized attacks, is there a way of accessing personalized buffs through the script? Thanks!
1542810369
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The script should output all buffs in the buff menu. What command are you running?
First I tried&nbsp; !pfc --apply,condition=ConditionName|characterid , but it did not apply the buff. I got the id by asking for it, so that one is correct. I also tried it without characterid , but with the token selected, no result. Then I tried !pfc --buffstatus with the character selected, but that buff did not appear in the menu.
1542812420

Edited 1542812436
Maybe it is because of the sheet version: 1.728
1542813551
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, buff status should have shown it, but your application command was off; you need to use buff=buffname. Can you tell me what shows up if you run the !pfc --statuscontrol command?
1542813565
vÍnce
Pro
Sheet Author
I've been using&nbsp;!pfc --statuscontrol to handle toggling buffs and conditions without any issues.
1542814424

Edited 1542814494
This is shown when I type&nbsp;&nbsp; !pfc --statuscontrol &nbsp;with the token selected.
This is the buff itself.
When I enter&nbsp; !pfc --apply,buff=klkll|-KKn0oedslKA2pykGf2b &nbsp;I get an error&gt; Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined at applyConditions (apiscript.js:1346:56)
1542816257
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, you're using the old style buffs. The buff handling in the script only supports the new style. Go to the sheet's settings and enable buff stacking.
Oh, ok. Thank you very much!
1542817243

Edited 1542817308
Now when I type&nbsp; !pfc --apply,buff=klkll|-KKn0oedslKA2pykGf2b &nbsp;with the token not selected, nothing happens. If the token is selected, I get the following error: Cannot read property '2' of null TypeError: Cannot read property '2' of null at _.some (apiscript.js:1361:72) If I put the row id instead of the buff name, token not selected nothing happens; token selected then same error as before. This is the macro now:
If I type&nbsp; !pfc --statuscontrol &nbsp;with the token selected, it shows the buff all right, but I cannot activate it, nor any of the conditions: I just get the same error: Cannot read property '2' of null TypeError: Cannot read property '2' of null at _.some (apiscript.js:1361:72)
!pfc doesn't work as a chat command out of the box, the script's source doesn't look like a valid userscript, and I don't see a way to load external scripts in the pf char sheet or in roll20 for that matter. How does one load this script into the context of a running game? Does loading such a script require the pro-only api access?
1542838329
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi Tyrir, unfortunately PFC requires that the creator of the game be an active pro subscriber as it is an API script. You won't be able to use it unless your game is hosted by a pro sub.
Well, I opened a new copy of the campaign, with no scripts in it. I added the companion. At first it worked fine, but then it started showing the same error again, although not with all characters. First it worked for all, now only for some. Don't know what it might be. There are no other scripts in that copy, only the companion. The error shown is: Cannot read property '2' of null TypeError: Cannot read property '2' of null at _.some (apiscript.js:1361:72)
Huh. I managed to break the script by being obsessive about automating and pointing out every possible thing because if I don't I'll forget things everywhere. In the Notes section of Skills, I use the following line to track how many bonus ranks the character should have available to them, working under the Spheres of Might system: &nbsp;&nbsp;&nbsp; [[5+5*@{customa1-mod}]] ranks free When rolling the skill, the result is this: Seems reasonable enough, right? Well, if I try to use a Group Roll that rolls a skill with that line in its notes... this happens. It's reproducible, and I'm using the Group Roll command copy-pasted straight out of the documentation (under Useful Macros) so it's not like I typo'd the syntax; the skills that don't have that line work. I realize the easy solution is just to remove that line from the Notes section, and I will, but all the same, it is an API-crashing glitch, so I figured it was prudent to mention it here.