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

Lucian said: Hi James, Do you already have a character in your campaign called Dragonclaw? The importer won't overwrite existing characters by default to avoid unfortunate accidents. If you're sure you want to overwrite the existing character, add --replace to the command and it will do so. You might want to read the documentation for the script - it describes all of this in lots of detail. If you don't believe that you already have a character called Dragonclaw, check your archived characters - because they count as well. If you *really* don't have a character called Dragonclaw already, there's a bug with the script - ping me a campaign invite and I'll take a look. Cheers, He's saying that he DOES have a character with that name, and that he IS using the --replace parameter, and it's not working.
1465739688
Lucian
Pro
API Scripter
Ah, sorry, my bad. Can you tell me: Exactly what command you are running What you have selected (if anything) when you run it What version of the script you are running (please try with the latest from Github if possible) Whether you have more than one existing character called Dragonclaw (check archived characters as well) Cheers,
Having issues with set defaults in "New Characters". It used to import everything as set (i.e. - whisper to GM, names on all templates, etc), but after I updated it doesn't seem to work. Here's a pic of what I have set and what it is importing as.
1465758406
Kryx
Pro
Sheet Author
API Scripter
Dvergr, you'll have to wait until Lucian updates the script to the latest changes. He knows.
Kryx said: Dvergr, you'll have to wait until Lucian updates the script to the latest changes. He knows. Ah, my bad. Sorry about that.
1465767328

Edited 1465767349
Lucian
Pro
API Scripter
3.0.0 (2016-06-12) Bug Fixes command-parsing: Allow spaces in option strings ( d56cceb ) config: Update configuration options to match changes for sheet 4.2.1 ( f28e8fe ) BREAKING CHANGES config: This resets most of the default new character settings - you will need to put them back to your desired values using !shaped-config Available from github in the usual place, see OP.
1465767699
Lucian
Pro
API Scripter
Just for the avoidance of confusion - some of the defaults setting for new characters will not work with the latest sheet unless you upgrade the script to 3.0.0 (which I have submitted for 1-click, but things are quite slow on that front at the moment!). Furthermore, when you upgrade to 3.0.0 it will wipe your current script preferences for the defaults for things like sheet output and "break initiative ties" etc - so you should run !shaped-config and reset them to your desired values. This release was done in something of a hurry with minimal testing, so let me know if I've broken anything! Cheers,
Copy that, chief. ;-)
This is the first time I have used the new Shaped sheet, so am just learning. When I setup the !shaped-abilities --abilityChecksQuery, it appears to set up everything, but when I click the token action, it gives me the below, which seems strange.  The monsters are importing correctly, but I get the errors off to the right in the chat window and the drop down is creating errors. I originally seemed to be getting numbers when I pull the monster from the side onto the map, but now I am getting the %%numberbered%%.  I have numbering 'on' in the !shaped-config.  I am not getting any errors in the API's and seems to be loading correctly. The API's I have loaded are below: suggestions?
1465769397
Kryx
Pro
Sheet Author
API Scripter
The query seems to be working fine from the sheet. The script should just reference that.
1465769837

Edited 1465769880
I am curious if it is an import error from the database or something else .  I just imported the monsters and when I roll from the sheet, I get the below. As you can see, I get an error each time i select a ST or an Ability chk. I imported using the !shaped-import-monster function
1465770064
Kryx
Pro
Sheet Author
API Scripter
That's definitely an old sheet version. Please ensure you're on the latest sheet and script version before reporting bugs.
1465770404

Edited 1465770958
I am using the drop down sheet that is currently published, do you mean that I have to use the custom sheet and manually add? I went to githhub and updated the sheet to the most current one.  I am still getting the same errors.
1465771013

Edited 1465771044
Kryx
Pro
Sheet Author
API Scripter
If you are going to manually update the script to the latest version then you have to manually update the sheet to the latest, yes. Either both on the pre-selected version or both on the latest (from our githubs) - your choice. If you updated the sheet can you please provide another screenshot? It should look different.
1465772473

Edited 1465772634
Kryx said: If you are going to manually update the script to the latest version then you have to manually update the sheet to the latest, yes. Either both on the pre-selected version or both on the latest (from our githubs) - your choice. If you updated the sheet can you please provide another screenshot? It should look different. I originally had the 5e Shaped Sheet in settings and the drop down 5e shaped companion script.  From there I imported the monsters, then ran the !shaped-abilities.  That is when I was getting the error.  Even after I update both to the new version, I still get the error. If I delete the NPC and then reinstall it using the most updated format, it seems to go away, but the name%%NUMBERED%% is still not working in the game.  Below is the screen shot using the current 5e shaped companion script from the library. screen shot (I have deleted the all but one of the old characters for testing).  the second is the custom shaped sheet and the most current 5e  shaped companion script from the site.   Based on this, I believe it is the companion script importing is giving the issue.  When it updates to the most updated verion with the most updated sheet, it will hopefully no longer be an issue I am still having an issue with the numbering when I pull the character to the map. Could the %%NUMBERED%% be a configuration issue where I selected the wrong toggle or something in !shaped-config?
Den G. said: Could the %%NUMBERED%% be a configuration issue where I selected the wrong toggle or something in !shaped-config? You need Aaron's TokenNameNumbered script for the Numbered stuff to work. It says in the documentation for the companion script on Github :)
Funny, I had it then deleted it thinking I had it covered.  Thanks for that!
See above, after reading, I noticed that there is now a configuration table to select token actions.  I selected the ones on the right and imported the monster.  Only the token actions on the left imported.  I had no issue importing the token actions using the chat commands, but the shaped scripts configurations are not working in game.  I checked for multiple imports (monsters) using the most updated scripts.
1465802464
Kryx
Pro
Sheet Author
API Scripter
So if you have the latest of both and the aaron's script then you just have the error of token macros not being created as per your last post, correct?
1465825858

Edited 1465825874
Ok, looks like I got everything working now with the latest version of the character sheet, and the latest version of the companion API, both from github directly, except for the "long rest" feature, which crashes the API every time its used. This is the error output I get: Error: Firebase.update failed: First argument contains NaN in property 'current' Error: Firebase.update failed: First argument contains NaN in property 'current' at Error (native) at Ba (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:9:186) at Ba (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:207) at Aa (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:8:462) at Ea (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:403) at H.J.update (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:146:318) at TrackedObj._doSave (/home/node/d20-api-server/api.js:566:27) at later [as _onTimeout] (/home/node/d20-api-server/node_modules/underscore/underscore.js:828:25) at Timer.listOnTimeout (timers.js:92:15) Im doing this on a fairly blank character sheet for testing, all i did was setup a level 5 barbarian, use rage 3 times, then try to long rest. Not sure if the sheet needs to be completely filled out to avoid this crash or not. Short rest works fine.
1465829065
Lucian
Pro
API Scripter
Hi Aaron, Glad you got it working in the end. I will take a look at the long rest thing when I get a  moment.
1465836342

Edited 1465836621
Kryx said: So if you have the latest of both and the aaron's script then you just have the error of token macros not being created as per your last post, correct? Correct, but there are no errors.   If use a chat window for !shaped-abilities, it tells me what is created for token actions, but if I select the configuration and want the token actions created with the import, it shows no errors, but does not create all the token actions.
1465836509

Edited 1465836536
Kryx
Pro
Sheet Author
API Scripter
Your post is rather confusing to me, and possibly to Lucian as well. You mentioned several problems, some of which were potentially caused by old versions. I'm now asking you to clarify that the "!shaped-abilities" is the only issue you currently have, after updating the versions. If not please be very detailed in what other issue has occurred.
1465836669

Edited 1465838491
Kryx said: Your post is rather confusing to me, and possibly to Lucian as well. You mentioned several problems, some of which were potentially caused by old versions. I'm now asking you to clarify that the "!shaped-abilities" is the only issue you currently have, after updating the versions. If not please be very detailed in what other issue has occurred. New versions seem to fix everything but the !shaped abilities (configuring for import)
Aaron, that Long Rest one is interesting. I tested on an existing character, and no crash. I wonder whether a new sheet is missing some variable the script expects.
1465848671
Lucian
Pro
API Scripter
Aaron, Thorsten, This is an intermittent one that I've seen reported before - and i've seen once or twice. I'm not yet sure under what circumstances it happens, but it looks like the script is trying to add a number to a non-existent value and getting an invalid value. I suspect, but am not sure, that the long rest thing is  a red herring - I think it may be happening earlier than that independent of user input, and may be something that is triggered  after character import. If anyone can reproduce it reliably I'd love a campaign invite... Also HD handling is broken by recent changes in the sheet - just looking at that now. Cheers,
1465849169
Lucian
Pro
API Scripter
I can also confirm that the default actions functionality is not working for several of the available options, for some reason.
Lucian said: I can also confirm that the default actions functionality is not working for several of the available options, for some reason. How can I test this? I have my campaign open that I just updated completely, and I haven't found any issues.
1465851525
Lucian
Pro
API Scripter
Ok, so I've worked out the problem, but not sure how to fix it. If you configure your default token actions to include things that depend on the contents of a repeating section, the script will attempt to check the contents of the relevant section to see if there's anything to add. Unfortunately, at the point that this happens, the user won't yet have clicked "import" on the sheet, so it doesn't work. This is *yet another* instance where the lack of proper interaction between sheet workers and the API is biting us in the a**. I'll need to chat to Kryx about how to fix this. In the meantime I think you'll have to stick to doing !shaped-apply-defaults after you've clicked "Import" on the character sheet. Will push a new version with the HD processing fixed tomorrow.
1465852368
Kryx
Pro
Sheet Author
API Scripter
I'm not sure there is anything we can do. People just have to fully import before doing other things.
1465852509
Lucian
Pro
API Scripter
The only thing I can think of (which probably isn't practical) is if there's some way that the sheet can set an attribute (which I can watch) when it has finished the initial importing - but I guess that would mean a lot of sheet worker restructuring. I guess perhaps it's time to give the powers that be a prod about actually fixing this limitation - it's really starting to be crippling in so many ways...
1465852675
Kryx
Pro
Sheet Author
API Scripter
We can try that route if you want. It wouldn't require much - 1 variable which I set and you clear.
1465852769
Lucian
Pro
API Scripter
Sure, happy to give it a go - I just assumed it would be really hard for you to set since the sheet workers cascade - so telling when things are complete is likely to be tricky. But obviously you know that code a lot better than I do, so perhaps it's not as bad as I thought...
1465853092
Kryx
Pro
Sheet Author
API Scripter
What exactly are you trying to determine? When the import is fully done?
1465906028
Lucian
Pro
API Scripter
Kryx said: What exactly are you trying to determine? When the import is fully done? Well that would be the simplest thing from my perspective. I need to be sure that all the values that I might want to read have been parsed from the SRD format and are present - and conversely I need to be able to tell that their absence is because e.g. the character has no reactions rather than just "reactions haven't been parsed yet". The alternative is that I move the script to watching specific attributes after import - e.g. watching for repeating_reaction_XXX_name changes and then creating any reaction token actions required at that point. Unfortunately that means a substantial rewrite of when and how token actions are created, which means it ain't gonna happen any time soon :-/
1465906328
Kryx
Pro
Sheet Author
API Scripter
Ya, this sounds like a nightmare from either approach.
I love the spell token action for the NPC's and was hoping to use for Spells for a PC token.   I was using the '%{Xavroar Trannythta|shaped_spells}' command for token action for my characters. For one of my characters in game, it worked as it did for the NPCs, but for all the others, it is giving me the following error 'No attribute was found for @{Xavroar Trannythta|spells_level_8_show}' I was copying this from the macro used for the NPC's. Suggestions?
1465938459
Lucian
Pro
API Scripter
Hi Den, Hmm, this sounds like a problem with the sheet macro itself - Kryx, do you have any insight on this?
1465939931
Kryx
Pro
Sheet Author
API Scripter
level 8 show should always be created. for (let i = 0; i <= 9; i++) { if ((!showLevelIfAllSlotsAreUsed && !getIntValue(v[`spell_slots_l${i}`])) || !v[`spells_level_${i}_macro_var`]) { finalSetAttrs[`spells_level_${i}_show`] = ''; } else { finalSetAttrs[`spells_level_${i}_show`] = true; } } I haven't had any issue with it. Add an attribute on the "Attributes & Abilities" tab (one of the 3 tabs not on the character sheet, but still on the character journal) named "spells_level_8_show" and just leave it blank.
Kryx said: level 8 show should always be created. for (let i = 0; i <= 9; i++) { if ((!showLevelIfAllSlotsAreUsed && !getIntValue(v[`spell_slots_l${i}`])) || !v[`spells_level_${i}_macro_var`]) { finalSetAttrs[`spells_level_${i}_show`] = ''; } else { finalSetAttrs[`spells_level_${i}_show`] = true; } } I haven't had any issue with it. Add an attribute on the "Attributes & Abilities" tab (one of the 3 tabs not on the character sheet, but still on the character journal) named "spells_level_8_show" and just leave it blank. The PC spells in character sheet show up as below: The import I used was this !shaped-abilities --actions --reactionsMacro --initiative --savingThrowsQuery --abilChecksQuery --advantageTrackerQuery --spells For spells, it imported the macro '%{Tegg Grimble|shaped_spells}' When I click the token action 'spells', I get the below.
1465994370
Kryx
Pro
Sheet Author
API Scripter
Den, This is a sheet issue. Please post there. I just tried recreating this issue and had no problem. Reproduction path: Create a new character set level to 9 wizard add fireball from srd click "Spells" at the bottom of the spells box" Output works fine in this case. Please post the reproduction steps you used for the spells. The script has no impact here.
Kryx said: Den, This is a sheet issue. Please post there. I just tried recreating this issue and had no problem. Reproduction path: Create a new character set level to 9 wizard add fireball from srd click "Spells" at the bottom of the spells box" Output works fine in this case. Please post the reproduction steps you used for the spells. The script has no impact here. Spells worked fine when used directly from character sheet. This character was made a few months ago (shaped V2), but not under newest script or newest companion script...so I deleted all the spells, then imported them again using !shaped-import-spell. That seemed to correct the problem.  There must be something that is just a bit off from the sheet from information imported a month ago to the current sheet.  This could possibly be an issue for others if they imported spells in past versions.  Time will tell.  Thanks for the help
1465997358
Kryx
Pro
Sheet Author
API Scripter
Huh, the token action just references the sheet's spells macro so there should be no difference in behavior. Perhaps this specific sheet never ran the update for generating the spells macro, but that wouldn't make sense unless you never opened the sheet (which is required for the sheet to update).
1466010639

Edited 1466012232
Hello, I think I need some help. I'm trying to set the !shaped-config command and it is not working. I'm not being able to hit the "view -->" section. When I do, it says: "Shaped Scripts. An error occurred. Please see the log for more details." When I go to the log it is something like this: "5eShapedCompanion 1466010216245 ERROR : TypeError: Cannot read property 'variants' of undefined\n    at apiscript.js:1747:49\n    at Array.every (native)\n    at Object.getObjectFromPath (apiscript.js:1747:22)\n    at VariantsMenu.makeToggleSetting (apiscript.js:4421:29)\n    at VariantsMenu.getMenu (apiscript.js:4932:30)\n    at ConfigUi.process (apiscript.js:4400:53)\n    at Command.handle (apiscript.js:3319:11)\n    at Object.processCommand (apiscript.js:3407:14)\n    at ShapedScripts.handleInput (apiscript.js:2223:49)\n    at handlerWrapper (apiscript.js:3060:18)" Click on the immages to better view. Could you help me please?
Kryx said: Huh, the token action just references the sheet's spells macro so there should be no difference in behavior. Perhaps this specific sheet never ran the update for generating the spells macro, but that wouldn't make sense unless you never opened the sheet (which is required for the sheet to update). Everything worked fine with the sheet when I clicked the specific spells, actions or anything else.  I have no idea how it could have happened, only that it seems to work fine when I do the import and keep the sheets the same.
Just import Green-flame blade and was testing the spells.  Below is how it rolled.  Warlock, 2nd level...so very weird...no damage.  suggestions?
1466070272

Edited 1466070298
Kryx
Pro
Sheet Author
API Scripter
GFB worked for me without adjusting anything. Are you on the latest version for the sheet? If so, can you send me an invite link and make me GM please?
1466089482

Edited 1466089508
Hello, im not sure if im doing something wrong or if im having a glitch, but my default token settings are not applying automatically. So I have a NPC char sheet setup by dragging over the veteran from the compendium, I drag a fresh token onto the map, set it as the default and save. If I drag the token onto the map, nothing happens. I can repeat the process, but set the token to represent the veteran, and then when I drag it out from the journal, it rolls the Hp & applies all of the bars properly, but does NOT setup the vision radius, bar and aura viewing permissions etc (essentially the advanced tab). If I use the !shaped-token-defaults command, everything applies perfectly, but it should do that automatically when I drag it out, so that I dont have to use that command over and over, right? using the latest github char sheet and API, both manually added.
1466093911
Kryx
Pro
Sheet Author
API Scripter
Bakunin said: Im sorry guys, I don't know if this forum is related to the 5e shaped companion script. If it is not, please, direct me if possible, because I tried to find it and had no success. Im kind of new to roll20 and im no native in english, so sometimes I get loss. Sorry for this. All things considered, Im having an error after the update of the 4.3.2, wich are: the "!shaped-config" options does not seems to work for new character sheets anymore. Eveytime I create a new char sheet, it does not comes with the premade config that I set on "!shaped-config" command, like "auto use ammo", or "show target's AC" for example. the option "Procces HD automatically" does not work, whatever I try to do. When the character uses the HD, it doesnt add to the current HP automatically nor decreases the use of HD. when I turn the "houserules" "Long Rest: No HP, full HD" on, the script crashes, and it needs to be restarted because of the following error: Error: Firebase.update failed: First argument contains NaN in property 'current' I tried the following solutions that didn't work: Create new character sheets setting manualy the character sheet version 3.4.1 updating manualy the character sheet version 3.4.2 reinstalling the API script version 3.0.0 reinstalling manualy the API script version 3.0.0 creating a whole new campaing with everything fresh. None the above helped me and the problem persists. I would appreciate some help, because I run a campaign with many players and it would help a lot to use the "Proccess HD automatically" feat. Thanks in advance See&nbsp; <a href="https://app.roll20.net/forum/permalink/3528432/" rel="nofollow">https://app.roll20.net/forum/permalink/3528432/</a>
Aaron R. said: Hello, im not sure if im doing something wrong or if im having a glitch, but my default token settings are not applying automatically. So I have a NPC char sheet setup by dragging over the veteran from the compendium, I drag a fresh token onto the map, set it as the default and save. If I drag the token onto the map, nothing happens. I can repeat the process, but set the token to represent the veteran, and then when I drag it out from the journal, it rolls the Hp & applies all of the bars properly, but does NOT setup the vision radius, bar and aura viewing permissions etc (essentially the advanced tab). If I use the !shaped-token-defaults command, everything applies perfectly, but it should do that automatically when I drag it out, so that I dont have to use that command over and over, right? using the latest github char sheet and API, both manually added. Same is happening to me Aaron. Also the problems I listed in the thread from above, wich Kryx help redirected me here.