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
This post has been closed. You can still view previous posts, but you can't post any new replies.

5e Shaped Companion Script Thread 2

1461055384

Edited 1476479314
Lucian
Pro
API Scripter
This script is designed to enhance the 5e Shaped Character sheet by Kryx. It provides a variety of import methods, token & character configuration services, and dynamic sheet enhancements (ammo, death save, HD processing etc). Full details of the functionality can be found in the documentation available on github , along with a  changelog listing fixes and features for each version. Installation There are two ways of installing the script: Via the Roll20 1-Click interface (Current Live Version 4.6.1) go to your API scripts page and select the 5e Shaped Companion from the drop-down list. This will give you the latest publicly released version of the script, and will update automatically to any new version each time you load your campaign. The publicly released version tends to be anywhere up to a week behind the latest development version (see next point) Manual installation of latest development version  (Current Live Version 4.9.0) You can find the latest script from my github - you can also see the latest changelog and up-to-date documentation there as well. Copy the raw text of 5eShapedCompanion.js into a new script in your API settings (or paste it over your previous version if updating) This version of the script will not update automatically - you will to have to copy/paste new versions in by hand This version contains the latest updates to the script before they are submitted and accepted by Roll20, so if there's a specific feature or bugfix that you can't wait for, this is the way to get it. Usage Please see the  Github Documentation for full details on available command and other functionality. Problems and Bugs If you're having trouble getting set up, don't understand something, or just need a bit of guidance, post here in this thread and I or someone else will try to help you. Please note that everyone here volunteers their time freely and without compensation; it is a basic courtesy to ensure that you have familiarised yourself with the available documentation for Roll20 in general and the script in particular before asking for help. You may feel like you don't have time to read everything and just want a quick answer; and you might get lucky and find someone in a patient mood who is willing to copy and paste the relevant section of the docs back to you; but remember that not having time to be courteous and respectful can cut both ways ;-) If you read the docs and don't understand them, that's a bug with the docs - so please let me know and I will try to make them clearer. If you believe you've found a bug, the preferred method of reporting it is to create a GitHub issue. First of all, please check the  issue list to see if the bug in question has already been reported. If you don't see an existing report, you can add a new one by clicking the "New Issue" button on the issue list page. Please try to be as detailed as possible when reporting bugs; a bug which just says "Import Doesn't Work" will most likely just be ignored. As a minimum you should include with you report: The complete and exact steps you took to produce the problem, including the full API commands that you ran - ideally you will have tried these again to ensure that they reliably reproduce it. If I can't reproduce your problem I can't fix it. Any messages that were generated in your API log when the problem occurred + any API crash error (also reported on the API script page) The exact version of the script that you are running (printed in the API log when the API starts up) and the exact version of the character sheet you are using (displayed on the sheet itself) For statblock import problems, please also include the complete text of the statblock, exactly as it appears in the GM notes of the token Feature Requests If you have a suggestion for a feature or an enhancement, you can post it here or you can submit it as a Github issue (see above). Please note that this script is designed to be a support script for the 5e Shaped Sheet, not a "Run your whole Campaign" UberScript - so if your request is something that isn't specific to the sheet I'm likely to suggest you put a separate script request out on the API forum rather than including it in this script.
1461055642
Lucian
Pro
API Scripter
1.1.0 (2016-04-18) Bug Fixes abilities: Changed to not create a macro action when there are no corresponding actions. ( 335fdd9 ), closes #2 hpRoll: Fix hp rolling to respect max setting for token bar ( b18e2a4 ), closes #23 statblock: Support statblock abilities in two line format ( d7904b0 ) Features config: Add auto HD and Roll HD on drop options to config UI ( 4e08a92 ), closes #25 config: Support max dex for medium armor and half-proficiency saves houserules ( 0868c9a )
1461066645
Lucian
Pro
API Scripter
PLEASE NOTE: The link for the script HAS CHANGED.  Please get it from the new post at the head of this thread. The script at the old link is no longer being updated and will be removed shortly.
I can confirm that the 1-click install is live
It is live, but it looks like the version that is live is 1.0.3, so hopefully 1.1 is pushed soon.
1461075823
Lucian
Pro
API Scripter
Kevin said: It is live, but it looks like the version that is live is 1.0.3, so hopefully 1.1 is pushed soon. How do you figure that?
1461075933
Lucian
Pro
API Scripter
Eeek. Have just seen what you saw - the log says 1.0.3. Need to investigate.
1461076168
Lucian
Pro
API Scripter
Ok, sorry guys, version 1.1.0 *is* live, but the code that injects the version number is wrong, and is using the last-but-one version, so the script reports itself as 1.0.3. 1-click is giving you the latest, but the latest doesn't *know* it's the latest! Lucian
Thanks Lucian for checking into it!
1461100321
Lucian
Pro
API Scripter
1.2.0 (2016-04-19) Bug Fixes abilities: Don't create lots of junk token actions for multiple tokens from same char ( c53a4fe ) build: Fix changelog compare links ( 59436ed ) build: Inject correct version number into released script. ( 431c1d4 ) command-parser: Report errors for unresolved options when comma-separated ( 6e1cad9 ) docs: Prune TOC slightly and ensure README gets committed ( aa43e7a ) docs: Unmangle docs for roll20 script page - they don't deal well with linebreaks. ( 9e38035 ) Features statblock-import: Read statblocks from character GM notes as well as tokens. ( 1b3d594 ) 1.1.1 (2016-04-19) Bug Fixes spell-import: Make it expand all gender pronoun placeholders in the emote ( acf580a ), closes #39
Just reported this on github: Unrecognised or poorly formed option Lich Getting an error upon updating to the latest script version. The error occurs when trying to import a monster when using !shaped-import-monster --Lich or any other monster. I copied the text for importing directly from the forum thread to ensure I wasn't mistyping it. This error is occurring in existing games as well as a fresh game running the custom sheet, SupportScript, 5eMonsters, 5eSpells and Numbered scripts only.
Kaelev said: Just reported this on github: Unrecognised or poorly formed option Lich Getting an error upon updating to the latest script version. The error occurs when trying to import a monster when using !shaped-import-monster --Lich or any other monster. I copied the text for importing directly from the forum thread to ensure I wasn't mistyping it. This error is occurring in existing games as well as a fresh game running the custom sheet, SupportScript, 5eMonsters, 5eSpells and Numbered scripts only. I had no issue importing Lich just a few minutes ago. Are you sure you have the scripts named correctly?
Shadowspawn said: Kaelev said: Just reported this on github: Unrecognised or poorly formed option Lich Getting an error upon updating to the latest script version. The error occurs when trying to import a monster when using !shaped-import-monster --Lich or any other monster. I copied the text for importing directly from the forum thread to ensure I wasn't mistyping it. This error is occurring in existing games as well as a fresh game running the custom sheet, SupportScript, 5eMonsters, 5eSpells and Numbered scripts only. I had no issue importing Lich just a few minutes ago. Are you sure you have the scripts named correctly? I have two games (my test game and one other I play in regularly) that are having this issue.  The other two games I have aren't having this problem. All games have the exact same scripts, named the exact same thing and are using the latest version of the scripts and sheet.
Okay, I retract my error.  I figured it out.  When copying the monster js script, I missed a character, so the script wasn't running and I didn't catch it.
1461405399
Zym
Sheet Author
Hello, Could someone point me in the right direction for adding action macros to my imported npcs. Is there any implemented features for this in the shaped script api. None that I can see but I thought I would ask.
1461405476
Lucian
Pro
API Scripter
Alexander said: Hello, Could someone point me in the right direction for adding action macros to my imported npcs. Is there any implemented features for this in the shaped script api. None that I can see but I thought I would ask. <a href="https://github.com/symposion/roll20-api-scripts/blob/master/5eShapedCompanion/latest/README.md#creating-token-actions-for-characters" rel="nofollow">https://github.com/symposion/roll20-api-scripts/blob/master/5eShapedCompanion/latest/README.md#creating-token-actions-for-characters</a>
1461414785
Zym
Sheet Author
A saint and a scholar. Thank you.
1461424943

Edited 1461424972
Any Token Action Spellbook command in the works?
1461425120
Lucian
Pro
API Scripter
Doug E. said: Any Token Action Spellbook command in the works? Unlikely. Kryx is keen to implement this within the sheet itself rather than as a script command. He's quite snowed under at the moment and I've just bought a smallholding in the Spanish mountains, so I suspect it may be a while before it gets done. Sorry. Lucian
How about implementation of an option to import the big text save and ability check macros as token actions?
1461432618
Zym
Sheet Author
What is big text save?&nbsp;
1461435770
Lucian
Pro
API Scripter
1.3.3 (2016-04-23) Bug Fixes irrelevant command line arguments are no lnger saved to state, fixes #34 ( afe41eb ), closes #34 json-import: Make it more tolerant of patch versions of JSON files ( 6e69ec6 ) statblock-import: Escape &lt; etc ( 2341642 ) Features abilities: Added advTracker query action ( 1d03b56 ) abilities: Added advTracker token actions ( 9e48348 ) advTracker: Add auto revert option ( c43bb50 ) configUI: Added additional Advantage Tracker options ( b94b9d3 ) hpRolling: Set values for all non-linked attributes, not just HP ( b1b51c2 ) spell-slots: Automatically decrement spell slots on casting ( 4c98d13 )
1461435883
Lucian
Pro
API Scripter
Kaelev said: How about implementation of an option to import the big text save and ability check macros as token actions? I can add this to the list. I probably won't be spending any more time on the script until later next week, however - a lot of other stuff going on here at the moment. Lucian
Lucian said: Doug E. said: Any Token Action Spellbook command in the works? Unlikely. Kryx is keen to implement this within the sheet itself rather than as a script command. He's quite snowed under at the moment and I've just bought a smallholding in the Spanish mountains, so I suspect it may be a while before it gets done. Sorry. Lucian Until then, I am using Kevin's TokenAction creator script for "spellbook" and "prepared" tokens.
1461437407

Edited 1461437439
I was just wondering why Skills are now under the Ability Checks token? If we just trying to consolidate, should it be called Abilities and Skills? On the official 5E sheet, they are listed as Skills.
1461439806
Kryx
Pro
Sheet Author
API Scripter
Skills are ability checks. They are a specific ability check. See the Phb.
Fair enough, but I think it may be confusing to some players as it deviates from the official sheets listing as skills. May be just a low priority, nice to have: option to have skills under Ability Checks or have a separate Skills token.
Im getting an error with a lot of spells now with&nbsp;ShapedScripts v1.3.3 and sheet v2.4.15. Example: Hellish Rebuke gives errors: (From ):Shaped Scripts An error occurred. Please see the log for more details. "5eShapedCompanion 1461443624588 ERROR : TypeError: Cannot read property 'get' of null" "5eShapedCompanion 1461443624597 ERROR : TypeError: Cannot read property 'get' of null\n at apiscript.js:3056:28\n at Array.filter (native)\n at ShapedScripts.handleSpellCast (apiscript.js:3056:9)\n at apiscript.js:2969:18\n at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:153:9)\n at ShapedScripts.triggerChatWatchers (apiscript.js:2967:8)\n at ShapedScripts.handleInput (apiscript.js:2462:13)\n at handlerWrapper (apiscript.js:3564:18)\n at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:105:34), &lt;anonymous&gt;:65:16)\n at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:105:34), &lt;anonymous&gt;:70:8)"
1461446462

Edited 1461446521
Kryx
Pro
Sheet Author
API Scripter
John S. said: Fair enough, but I think it may be confusing to some players as it deviates from the official sheets listing as skills. May be just a low priority, nice to have: option to have skills under Ability Checks or have a separate Skills token. It doesn't deviate from the system. In D&D 5e skills are a specific usage of an Ability Check. In the PHB they are grouped under each ability. The paper sheet already has ability check modifiers on the left side (as does the shaped sheet) so there isn't a need to repeat them with the specific skills.
1461447489

Edited 1461448227
Brunhine
API Scripter
John S. said: Im getting an error with a lot of spells now with&nbsp;ShapedScripts v1.3.3 and sheet v2.4.15. Example: Hellish Rebuke gives errors: (From ):Shaped Scripts An error occurred. Please see the log for more details. "5eShapedCompanion 1461443624588 ERROR : TypeError: Cannot read property 'get' of null" "5eShapedCompanion 1461443624597 ERROR : TypeError: Cannot read property 'get' of null\n at apiscript.js:3056:28\n at Array.filter (native)\n at ShapedScripts.handleSpellCast (apiscript.js:3056:9)\n at apiscript.js:2969:18\n at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:153:9)\n at ShapedScripts.triggerChatWatchers (apiscript.js:2967:8)\n at ShapedScripts.handleInput (apiscript.js:2462:13)\n at handlerWrapper (apiscript.js:3564:18)\n at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:105:34), &lt;anonymous&gt;:65:16)\n at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:105:34), &lt;anonymous&gt;:70:8)" I will look in to this. Just talked to Lucian, he will either be releasing a fix or an update soon.
1461448989
Lucian
Pro
API Scripter
1.3.4 (2016-04-23) Bug Fixes spell-slots: Disable spell slot handling, not ready for use yet. ( dac9f21 ) spell-slots: Prevent error when normal spell slots are missing - e.g. for warlock spells. ( 5f75e45 ) Sorry guys, it turns out the spell slot implementation was a rushed mess that I shouldn't have released. I have disabled it for the moment so that it doesn't cause any more problems.
1461449206
Lucian
Pro
API Scripter
@John S, 1.3.4 should fix your problem. Let me know if it doesn't.
John S. said: Lucian said: Doug E. said: Any Token Action Spellbook command in the works? Unlikely. Kryx is keen to implement this within the sheet itself rather than as a script command. He's quite snowed under at the moment and I've just bought a smallholding in the Spanish mountains, so I suspect it may be a while before it gets done. Sorry. Lucian Until then, I am using Kevin's TokenAction creator script for "spellbook" and "prepared" tokens. As am I. I have not found the in-sheet macros to be of any use (as a GM) at all. To me, the huge advantage of token macros is that I don't have to open sheets nor clog up my macro bar&nbsp;to cast spells or use attacks/actions of creatures and NPCs. It is not such a big deal for my players who run everything from the sheets and don't have the lag issues I have. (My computer sucks).&nbsp; Can this script be used along with Kevin's TokenAction Script or would they bang heads?
@Doug it shouldn't be any issue to run both. Ultimately they both have completely different commands even though they do similar things.&nbsp;
It isn't very obvious from the update notes posted above, but I have now completely integrated all of the original advantage tracker functionality, plus some (please let me know if I missed anything): You can now disable markers completely&nbsp; You can now choose which markers are used for advantage and disadvantage You can now configure the announcement output to be either public, GM whispered, or completely silent&nbsp; You can choose to ignore NPCs entirely Please see !shape-config for all of the above.&nbsp; I have also included a new feature I am really proud/excited about: auto revert. You should soon see a new check box in the sheet. When you have that option enabled, if the script detects a d20 roll made at (dis)Advantage, it will automatically switch your roll option back to the normal roll 1 mode.&nbsp; I'm excited for you all to get your hands on this feature, and I hope you are all as happy with it as I am =)&nbsp;
Lucian said: @John S, 1.3.4 should fix your problem. Let me know if it doesn't. Thanks! Will give it a go.
Kryx said: John S. said: Fair enough, but I think it may be confusing to some players as it deviates from the official sheets listing as skills. May be just a low priority, nice to have: option to have skills under Ability Checks or have a separate Skills token. It doesn't deviate from the system. In D&D 5e skills are a specific usage of an Ability Check. In the PHB they are grouped under each ability. The paper sheet already has ability check modifiers on the left side (as does the shaped sheet) so there isn't a need to repeat them with the specific skills. Hey now, all I said was that is deviated from the sheet (and your sheet) that calls them Skills, not the system. I understand that "A skill represents a specific aspect of an&nbsp;ability score, and an individual’s proficiency in a skill&nbsp;demonstrates a focus on that aspect." (phb. p. 174), but they are still 100% referred to as skills in the entire phb. If anyone wants to lump them with ability checks, then so be it. I was just trying to point out something that may cause confusion. Kryx, Lucien , Kevin, Brunhine and everyone else here helps me run a great game of D&D for my players... and for that I am eternally grateful for all of your efforts.
1461487756
Lucian
Pro
API Scripter
Doug E. said: As am I. I have not found the in-sheet macros to be of any use (as a GM) at all. To me, the huge advantage of token macros is that I don't have to open sheets nor clog up my macro bar&nbsp;to cast spells or use attacks/actions of creatures and NPCs. It is not such a big deal for my players who run everything from the sheets and don't have the lag issues I have. (My computer sucks).&nbsp; Can this script be used along with Kevin's TokenAction Script or would they bang heads? For the avoidance of doubt, the plan here is to create a spellbook macro that will launch a spellbook in the chat window, showing buttons for spells that are available to cast, as well as additional buttons to cast some spells as rituals where that option is available. Kryx would like this to be done as a sheet macro rather than an api command so that it is available to non-pro users, which makes sense. Unfortunately it's quite a lot of work to do it right (spells are actually incredibly complicated when you get into it), and real life has caught up with both of us in a big way recently, so it's probably going to be a few weeks before this happens. You should note that although the script can help add sheet macros to the token bar, all it is doing is automating a process that you can do manually - you can make token action macros that call through to the sheet macros. So although you can't drag the sheet macros direct to token actions, you can use them in the token action bar with a little bit of additional work. Take a look at the abilities that are created when you run !shaped-abilities &nbsp;to see how this works. Also note that you can add individual spells to your token actions with !shaped-abilities &nbsp;by doing something like !shaped-abilities --Fireball &nbsp;. Given that each character most likely only has a few regularly-used spells with mechanically variable output like damage/attack rolls etc this can help cover most of the usages. I accept that it's not a perfect solution - I really want a proper spellbook too - but it's something for the meantime. Lucian
1461488826
Kryx
Pro
Sheet Author
API Scripter
Also of note the script just references the in sheet macros and chat macros. So you are using them. :) As Lucian said the plan is to do the same method as the actions macro. I could also have the words on the core page trigger the chat macro.
Just another heads up for everyone. I am starting work on the long/short rest &nbsp;commands!
Is it possible to import monsters from the compendium with this tool?
1461588620
Kryx
Pro
Sheet Author
API Scripter
You can simply drag and drop from the compendium. The API has no access to it.
Brunhine said: Just another heads up for everyone. I am starting work on the long/short rest &nbsp;commands! Oh god yes please. Easily one of the things that is so needed. Then my setup for almost automated everything is done!
The new version seems to be repeating the description of the spells on import
1461816361

Edited 1461819202
I can't remember if this has been asked before, so forgive me if it's been covered... Is there a way to import custom spells from text like with npcs/creatures? If I were to paste a spell into the GM notes or something??? I don't think this is possible, but I thought I would ask. Thanks in advance! EDIT: Yes, I have the appropriate JSON files/scripts set up. Importing spells that are in the JSON is no problem. I'm only asking about new/custom spells.
1461841955
Lucian
Pro
API Scripter
Wade said: I can't remember if this has been asked before, so forgive me if it's been covered... Is there a way to import custom spells from text like with npcs/creatures? If I were to paste a spell into the GM notes or something??? I don't think this is possible, but I thought I would ask. Thanks in advance! I'm afraid not, no. Custom spells are less common than custom monsters, and generally they have less info to fill in as well, so I can't see myself investing the effort required to implement it at this point. If you have custom spells that you use frequently I'd recommend creating a custom JSON file for them instead, and then you can use them with !shaped-import-spell .
1461850192

Edited 1461850281
Having some problems trying to figure out why one of my campaigns isn't accepting the newest version of your script. The other campaigns seem to accept it just fine, and they all have the same API scripts, all updated. I have tried disabling everything except for the 5e Companion Script and still I get this error.&nbsp; TypeError: Cannot set property 'houserules' of undefined TypeError: Cannot set property 'houserules' of undefined at ShapedScripts.checkInstall (apiscript.js:8581:54) at Object.&lt;anonymous&gt; (apiscript.js:5140:11) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:105:34), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:105:34), &lt;anonymous&gt;:70:8) at checkForReady (/home/node/d20-api-server/api.js:1013:12) at /home/node/d20-api-server/api.js:1092:9 at c (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:14:64) 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) EDIT: I have tried enabling the Companion script via the Roll20 1-click, and using the raw. Neither seem to work.
1461883108

Edited 1461883322
I did a little searching, but haven't found much on this. Would it be simple to have a way for this script to interact with the output functionality of the sheet? For example, a player clicks a macro that changes their token's sheet output to "Whispered to GM" and back to "Public" as needed? I see it can be controlled with your !Shaped-config command, but that seems to work for new sheets, rather than a toggle.
Viridian Crow said: I did a little searching, but haven't found much on this. Would it be simple to have a way for this script to interact with the output functionality of the sheet? For example, a player clicks a macro that changes their token's sheet output to "Whispered to GM" and back to "Public" as needed? I see it can be controlled with your !Shaped-config command, but that seems to work for new sheets, rather than a toggle. +1 This would be useful for hidden rolls to the GM. &nbsp;I actually prefer all rolls to GM except attacks. But with the current setup, it's tough to do.
1461886148
Kryx
Pro
Sheet Author
API Scripter
How is it tough? Can't you set that on each sheet? How would toggling the global whisper solve that? It would hide everything.