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

Pathfinder Companion Script: Getting it to work?

Hello all! I just started using Roll20 for my Pathfinder game and found this amazing script. We use the Pathfinder Community Sheet in its newest iteration and although the Companion Script did not originally work after I reinstalled it multiple times and restarted the API Sandbox it suddenly worked (and I don't know why). It gave me a warning that the API does not work properly with this version of the Community Sheet but the API in fact worked flawlessly and I ended up importing a bunch of NPCs and monsters. But then after I came back to my computer a couple hours later the script wasn't working anymore and I wouldn't get any response from the script in chat in Roll20 as if it wasn't installed at all. After reinstalling a couple times it worked again and then after a while it stopped working again.  I understand that I am supposed to use this API with "Version 1.6X" of the Community Sheet but I cannot even get that older version to work properly because when I put in a custom sheet and use the CSS, HTML and Translation for an older version (1.69). I am helplessly lost, would appreciate any pointers. Surely some people still use the Companion Script API and have it working...?
1674571069
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi Scarlett, I haven't updated the companion script in a while, but nothing on the sheet has changed that much to stop it from working. The version error should be considered more of a warning. That said, my coding skills were a lot less developed when I made the companion, so something certainly could be screwing with it. Can you tell me if there were any errors on your API script page when it stopped working? And, you don't need to reinstall, you should be able to just restart the sandbox when it crashes.
Hello Scott, Thank you for the quick answer! The only output of the API is  "%c Warning: %c migrate repeating attacktype Dropdowns, there are no rows for ability " I checked after it stopped working each time and there was no other output there, just this and then the API wouldn't respond at all anymore. Neither restarting the sandbox nor reinstalling fixed it, it just seemed to work again a while later. 
1674574691

Edited 1674574877
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, strange. That error message is actually from the character sheet. I'm not entirely sure what's going on. I'll see if I can carve out some time to investigate, but I'm in crunch time on some projects at work so it might be a bit. EDIT: Can you also give me replication steps for this, or at least as detailed as you can? What commands you were running, what game actions you were doing, etc. And, can you use the character vault to import any characters that were active at the time of the crash into this game .
No worries and take your time! I installed the API from the drop-down menu in the API section and it originally did not work, after it restarted the sandbox I launched the game and the API was unresponsive like it wasn't installed at all. So I suppose the crash happened before any characters were involved? I'm wondering if there's an issue with the game itself and will also try some experimentation.
I installed the API on a different game and it worked fine. On the game I was previously using the API is installed but entirely unresponsive. Even when I type  !pfc --config there is no response at all, as was the case earlier. The game uses the Community Sheet as mentioned.
It seems that when the sandbox originally states  No existing sandbox found.  Preparing sandbox to start on game activity. and I then launch it the API works as intended but after that it will randomly stop working and only start working again if I somehow get it back to the original state in which it says "No existing sandbox found." Does a restart not completely wipe the slate?
1674580452
Kraynic
Pro
Sheet Author
ScarlettRevorce said: No existing sandbox found.  Preparing sandbox to start on game activity. That is usually the message you get if no one is logged into the game, since the api sandbox is only active the game is active.  Are you logged into the game on another tab/window when you get this message?
Kraynic said: ScarlettRevorce said: No existing sandbox found.  Preparing sandbox to start on game activity. That is usually the message you get if no one is logged into the game, since the api sandbox is only active the game is active.  Are you logged into the game on another tab/window when you get this message? I wasn't, this message appeared whenever I logged out and let the game sit idle with nobody in it for a while... and then the API would work when I launched it. Going to test this now.
Copied the game including everything it had, in the copied version it works so I guess technology is just magic. 
Follow up question: when I try to import a monster I created with the Monster Generator program using this exact bit of code in Roll20 !pfc --parse|{{Widdemanne Forestshade                                                          CR 1 XP 400 *A Medium Humanoid Init +1; Senses Darkvision 60ft; Perception +1 ------------------------------ DEFENSE ------------------------------ AC 12, touch 11, flat-footed 11 (+1 Dex, +1 natural) hp 15 (2d8+6) Fort +3, Ref +4, Will +1 ------------------------------ OFFENSE ------------------------------ Speed 30 ft. Melee +1 spear +6 (1d8+7/x3)  Special Attacks 1d6 Sneak Attack ------------------------------ STATISTICS ------------------------------ Str 18, Dex 12, Con 16, Int 8, Wis 12, Cha 6 Base Atk +1; CMB +5; CMD 16 Feats Stealthy Skills Escape Artist +3, Stealth +3 Languages Common SQ Humanoid Traits, Trackless Step ------------------------------ SPECIAL ABILITIES ------------------------------ +1 spear A Widdemanne Forestshade wields a +1 spear, the bonuses are included in its stats above. Humanoid Traits A humanoid usually has two arms, two legs, and one head, or a human-like torso, arms, and a head. humanoids have few or no supernatural or extraordinary abilities, but most can speak and usually have well-developed societies. They are usually Small or Medium (with the exception of giants). Every humanoid creature also has a specific subtype to match its race, such as human, dark folk, or goblinoid. -Humanoids breathe, eat, and sleep. Trackless Step (Ex)  A Widdemanne Forestshade leaves no trail and cannot be tracked. It may choose to leave a trail if so desired. ------------------------------ ECOLOGY ------------------------------ Environment:  Organization:  Treasure:  }} it gives me this message  and the sheet it generates is entirely empty. What am I doing wrong? Not sure if its a faux pa to add this to this thread but I'm also not sure if it'd be a faux pa to make a new thread for this after making this thread so I'm just gonna take the chance. Thanks in advance and thanks for the help so far!
The API seems to spontaneously stop and start working and at this point I'm curious and want to find out whats happening so I will compile all I know. I installed the API through the dropdown menu and am using the latest version of the Pathfinder Community Sheet.  When I originally installed the API it gave me a compability warning in chat in-game which I overwrote and the API was working fine. I imported a handful of statblocks, then I left to get some sleep and when I got back the next day the API was entirely unresponsive. When I send a command in chat there is no reaction from the API whatsoever.  The API Sandbox gives me this message while this is happening I have verified that if I copy the game including everything but the forums (which are empty anyway and most definitely shouldn't matter) and freshly install the API it works fine until an uncertain point when it stops working again. I have also found that if I leave the game sit empty until the API Sandbox shuts down and then reinstall the API it will work also, again until it randomly stops working again.  While the API is working as intended (as it is right now after a fresh install) the API Sandbox Output is this I am incredibly curious about what is going on here and would love to figure this out.  Thank you for your time!