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.

[Script] 5e Shaped Support Script

Does the lastest version of the script no longer use the 0.1.1 fifthMonsters JSON?
Greetings, Some observations. Seems that by default, monsters that have zero modifiers on their main attribute when imported (base state 10) have issues with their basic attacks that use said attribute where it doesnt seem to add the actual roll to the damage output. If I disable and reenable the damage check sheetworkers seems to recognize that something is written down there. Example: Importing acolyte, club attack outputs damage at zero. Before and after resetting. That being said, is it normal that once I import something and open its character sheet, it brings up a secondary prompt saying cancel or import with blue buttons? Sometimes this is glitchy and doesn't respond and I need to delete character and reimport. This also interferes with non linked attribute mapping being assigned to tokens as the attributes do not exist on the time of creation to assign it to selected token.
1459815636
Lucian
Pro
API Scripter
Version 0.4.5: Fix --all. Sorry, I broke this by being careless. It should "work" again now, assuming it doesn't kill your API sandbox and eat your campaign in a rampaging fit of wanton destruction.
1459815706
Lucian
Pro
API Scripter
Kaelev said: Does the lastest version of the script no longer use the 0.1.1 fifthMonsters JSON? Correct. You need to get a newer copy of the JSON.
1459815931
Lucian
Pro
API Scripter
@Jose - This sounds like a bug with the sheetworkers. I'll investigate tomorrow and chat with Kryx about it. The import overlay thing is an unfortunate necessity imposed on us by the limitations of the Roll20 platform. API scripts cannot trigger sheetworkers, so you need to open the sheet and trigger the import for the sheetworkers to run. The alternative was to duplicate all the sheetworker code in the API script, which neither Kryx nor I were very keen on. One thing I would advise is patience when you click Import on the overlay - the process can sometimes take a long time (up to 30 seconds for complex monsters on my machine). Other than that, if you find cases where it happens reasonably reliably, let me know and I'll try and look into further.
1459816065
Lucian
Pro
API Scripter
... and yes, I am aware of the non-linked attribute problem. It hasn't been a huge issue for me because the only attribute I tend to use non-linked is HP, and that can be auto-rolled on token drop anyway. Unfortunately it's not easy to fix, because many of the attribute values are only calculated after the sheetworkers run, so I can't set them properly without duplicating the sheetworker logic in the API.
Yeah, guess it doesnt seem to be the import process itself just actual sheetwork updates, playing around with other things and it doesn't seem to like flat damage values without other modifiers, like the bonus Ankheg acid damage either. I needed to actually change the value for it to recognize it.
So between the Shaped-Support, TokenMod, and TokenAction scripts I created two macros.  The first macro (ImportMonster) is simply to speed up typing out the !shaped-import-monster command: !shaped-import-monster --?{Monster} Then I have a second macro (ConfigureToken) to fully configure my token: !token-mod --set bar3|@{selected|HP} bar2_value|@{selected|AC} bar1_value|@{selected|speed} !ta --initiative,saves,skills,traits,actions,reactions,legendary,lair So my workflow is: 1) Drop the token and select it. 2) Run my ImportMonster macro, type in the name and hit enter. 3) Shift-Double click on the token to open the sheet and start the import. 4) After the import completes (while the token is still selected) run my ConfigureToken macro. 5) Hit edit on the open sheet, click to save the default token, then save the sheet. It takes maybe a grand total of 10-15s to have a properly linked token with all relevant token actions setup.  You can of course setup your bars differently and if you use the AdvantageTracker script you can add !at --create command to the ConfigureToken macro as well.
@Kevin: When setting the tokens HP this way, has it successfully happened?  I've tried this and it's not setting the bar to HP for me.  This is how I configure my bars due to the fact that my players like to keep the HP bar as the first bar above their tokens.  Bar 1 (green = speed), Bar 2 (red = HP), Bar 3 (grey = AC).
1459829384

Edited 1459830788
@Lucian: Could you please post a complete custom npc script for the new setup? I've tried multiple things and I'm still getting Unexpected number in the API. I have one script I named OnReady.js and in it I pasted: on('ready', function() { ShapedScripts.addMonsters(5ecustomnpcs); }); Then I created another script named 5ecustomnpcs.js and pasted the script for the npc I'm testing and instead of using "monsters" I used "5ecustomnpcs". Am I even on the right track.  Using this as a learning situation.  LOL.
Lucian H. said: Saevar L. "Liquid-Sonic" said: The all command just returns the query macro for me. :( I'd strongly advise against using it anyway - I'm thinking of removing it. It will probably kill your API sandbox and will make your campaign very laggy afterwards. Importing nearly 600 monsters in one go is generally not a clever thing to do. I imported it successfully without issues :D though i've no idea of the reprecussions yet, (I tested this in an empty campaign)
1459845079
Lucian
Pro
API Scripter
Hi Guys, Apologies for all the troubles that people have been having with the JSON - there are just too many different versions of stuff kicking around - some of the JSON in my script project is used internally for testing and doesn't have the right wrappers around it to be used for import which is especially confusing. I'm going to write a really clear README on the github on this + make sure *all* of the samples are 100% consistent so that people can get a handle on all of this easily Lucian
Kaelev said: @Kevin: When setting the tokens HP this way, has it successfully happened?  I've tried this and it's not setting the bar to HP for me.  This is how I configure my bars due to the fact that my players like to keep the HP bar as the first bar above their tokens.  Bar 1 (green = speed), Bar 2 (red = HP), Bar 3 (grey = AC). @Kaelev, I should have been specific that this is for setting up the token for my monsters/NPC.  For setting up the PC token I use the following macro (using your values instead of mine): !token-mod --set bar3_link|AC bar2_link|HP bar1_link|speed !at --create !ta --initiative,savequery,skillquery,attacks NOTE:  You can remove the "!at --create" line if you aren't using AdvantageTracker to create token actions for swapping adv/dis state from a token action. Then I have a separate macro for spellbook (!ta --spellbook) for casters and features (!ta --features) for characters who want their class features as token actions.
@Kevin: I figured you used it for NPCs. I haven't been successful in getting the HP to actually show up on the token in the bar. It sets my NPCs npc_speed and AC. Just not HP. 
Kevin said: Kaelev said: @Kevin: When setting the tokens HP this way, has it successfully happened?  I've tried this and it's not setting the bar to HP for me.  This is how I configure my bars due to the fact that my players like to keep the HP bar as the first bar above their tokens.  Bar 1 (green = speed), Bar 2 (red = HP), Bar 3 (grey = AC). @Kaelev, I should have been specific that this is for setting up the token for my monsters/NPC.  For setting up the PC token I use the following macro (using your values instead of mine): !token-mod --set bar3_link|AC bar2_link|HP bar1_link|speed !at --create !ta --initiative,savequery,skillquery,attacks NOTE:  You can remove the "!at --create" line if you aren't using AdvantageTracker to create token actions for swapping adv/dis state from a token action. Then I have a separate macro for spellbook (!ta --spellbook) for casters and features (!ta --features) for characters who want their class features as token actions. Just to be on the safe side, do you have a TA script specifically for ReShaped?
@Modnar - Yes, it can be found  here .
1459860108

Edited 1459860136
Kryx
Pro
Sheet Author
API Scripter
It will hopefully be merged into this script soon. *nudge Lucian*
1459862559
Lucian
Pro
API Scripter
Yeah, yeah, ok. I've been trying to make the JSON thing more friendly and robust but I guess we should probably get the token actions stuff folded in. Kevin, I'll PM you.
My API appears to have been broken by this script.  I tried to import the lich, but had selected a token that was from the marketplace, not from my personal library. Nothing happened in the tabletop, so I checked the log. This is what appeared: "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." I tried saving the script, which usually resets the API, but nothing happened. I tried reloading, and again, nothing happened. I've tried disabling the script, and even deleting it, but nothing is working.  It's also affecting other scripts, no API scripts are working in that campaign. Do I need to create a new campaign to get it working? Luckily, we haven't started play in that campaign yet, but I'd still prefer to not have to transmogrify everything to a new campaign.
1459864264
Lucian
Pro
API Scripter
Hi Alexander, I think that they're updating the API server at the moment - you'll have to wait until that's finished. Lucian
Lucian H. said: Hi Alexander, I think that they're updating the API server at the moment - you'll have to wait until that's finished. Lucian That would explain it.  Thanks!
1459878075

Edited 1459878232
I'm getting a error when I try to drop a token. I think it's related rolling of HP "ShapedScripts 1459877838097 TRACE : shapedModule.handleAddToken starting with this value: {\"configOptionsSpec\":{\"tokenSettings\":{\"bar1\":{},\"bar2\":{},\"bar3\":{}},\"newCharSettings\":{},\"genderPronouns\":[{}]},\"configUI\":{\"generalOptions\":{},\"tokenOptions\":{},\"newCharOptions\":{}}} and args {\"0\":{\"_id\":\"-KEbUznWNNQ8ZCDrRKPy\",\"_pageid\":\"-JtOT-iyw1oHqvaHg5vp\",\"left\":1004,\"top\":592,\"width\":70,\"height\":70,\"rotation\":0,\"layer\":\"objects\",\"isdrawing\":false,\"flipv\":false,\"fliph\":false,\"imgsrc\":\"<a href="https://s3.amazonaws.com/files.d20.io/marketplace/7474/yqkHSWjqrTPLpy6eFz845Q/max.png?1345590416\&quot;,\&quot;name\&quot;:\&quot;Orc" rel="nofollow">https://s3.amazonaws.com/files.d20.io/marketplace/7474/yqkHSWjqrTPLpy6eFz845Q/max.png?1345590416\",\"name\":\"Orc</a> %%NUMBERED%%\",\"gmnotes\":\"\",\"controlledby\":\"\",\"bar1_value\":\"\",\"bar1_max\":\"\",\"bar1_link\":\"\",\"bar2_value\":30,\"bar2_max\":\"\",\"bar2_link\":\"-KEbTehomdlWxdRETGko\",\"bar3_value\":\"\",\"bar3_max\":23,\"bar3_link\":\"\",\"represents\":\"-KEbTehi-Hj7tCacywVL\",\"aura1_radius\":\"\",\"aura1_color\":\"#00ff00\",\"aura1_square\":false,\"aura2_radius\":\"\",\"aura2_color\":\"#ffffff\",\"aura2_square\":false,\"tint_color\":\"transparent\",\"statusmarkers\":\"\",\"showname\":true,\"showplayers_name\":false,\"showplayers_bar1\":false,\"showplayers_bar2\":false,\"showplayers_bar3\":false,\"showplayers_aura1\":false,\"showplayers_aura2\":false,\"playersedit_name\":true,\"playersedit_bar1\":true,\"playersedit_bar2\":true,\"playersedit_bar3\":true,\"playersedit_aura1\":true,\"playersedit_aura2\":true,\"light_radius\":60,\"light_dimradius\":30,\"light_otherplayers\":true,\"light_hassight\":false,\"light_angle\":360,\"light_losangle\":\"\",\"light_multiplier\":1,\"sides\":\"\",\"currentSide\":0,\"lastmove\":\"948,439\",\"_type\":\"graphic\",\"_subtype\":\"token\",\"_cardid\":\"\"}}" "ShapedScripts 1459877838099 TRACE : &nbsp; roll20.getObj starting with this value: {} and args {\"0\":\"character\",\"1\":\"-KEbTehi-Hj7tCacywVL\"}" "ShapedScripts 1459877838099 TRACE : &nbsp; roll20.getObj ending with return value {\"name\":\"Orc\",\"bio\":\"\",\"gmnotes\":\"\",\"_defaulttoken\":1459877511009,\"archived\":false,\"inplayerjournals\":\"\",\"controlledby\":\"\",\"_id\":\"-KEbTehi-Hj7tCacywVL\",\"_type\":\"character\",\"avatar\":\"\"}" "ShapedScripts 1459877838100 TRACE : shapedModule.handleAddToken ending with return value undefined" "ShapedScripts 1459877838102 TRACE : shapedModule.handleChangeToken starting with this value: {\"configOptionsSpec\":{\"tokenSettings\":{\"bar1\":{},\"bar2\":{},\"bar3\":{}},\"newCharSettings\":{},\"genderPronouns\":[{}]},\"configUI\":{\"generalOptions\":{},\"tokenOptions\":{},\"newCharOptions\":{}}} and args {\"0\":{\"_id\":\"-KEbUznWNNQ8ZCDrRKPy\",\"_pageid\":\"-JtOT-iyw1oHqvaHg5vp\",\"left\":1004,\"top\":592,\"width\":70,\"height\":70,\"rotation\":0,\"layer\":\"objects\",\"isdrawing\":false,\"flipv\":false,\"fliph\":false,\"imgsrc\":\"<a href="https://s3.amazonaws.com/files.d20.io/marketplace/7474/yqkHSWjqrTPLpy6eFz845Q/max.png?1345590416\&quot;,\&quot;name\&quot;:\&quot;Orc" rel="nofollow">https://s3.amazonaws.com/files.d20.io/marketplace/7474/yqkHSWjqrTPLpy6eFz845Q/max.png?1345590416\",\"name\":\"Orc</a> %%NUMBERED%%\",\"gmnotes\":\"\",\"controlledby\":\"\",\"bar1_value\":\"\",\"bar1_max\":\"\",\"bar1_link\":\"\",\"bar2_value\":\"30\",\"bar2_max\":\"\",\"bar2_link\":\"-KEbTehomdlWxdRETGko\",\"bar3_value\":\"\",\"bar3_max\":23,\"bar3_link\":\"\",\"represents\":\"-KEbTehi-Hj7tCacywVL\",\"aura1_radius\":\"\",\"aura1_color\":\"#00ff00\",\"aura1_square\":false,\"aura2_radius\":\"\",\"aura2_color\":\"#ffffff\",\"aura2_square\":false,\"tint_color\":\"transparent\",\"statusmarkers\":\"\",\"showname\":true,\"showplayers_name\":false,\"showplayers_bar1\":false,\"showplayers_bar2\":false,\"showplayers_bar3\":false,\"showplayers_aura1\":false,\"showplayers_aura2\":false,\"playersedit_name\":true,\"playersedit_bar1\":true,\"playersedit_bar2\":true,\"playersedit_bar3\":true,\"playersedit_aura1\":true,\"playersedit_aura2\":true,\"light_radius\":60,\"light_dimradius\":30,\"light_otherplayers\":true,\"light_hassight\":false,\"light_angle\":360,\"light_losangle\":\"\",\"light_multiplier\":1,\"sides\":\"\",\"currentSide\":0,\"lastmove\":\"948,439\",\"_type\":\"graphic\",\"_subtype\":\"token\",\"_cardid\":\"\"},\"1\":{\"_id\":\"-KEbUznWNNQ8ZCDrRKPy\",\"_pageid\":\"-JtOT-iyw1oHqvaHg5vp\",\"left\":1004,\"top\":592,\"width\":70,\"height\":70,\"rotation\":0,\"layer\":\"objects\",\"isdrawing\":false,\"flipv\":false,\"fliph\":false,\"imgsrc\":\"<a href="https://s3.amazonaws.com/files.d20.io/marketplace/7474/yqkHSWjqrTPLpy6eFz845Q/max.png?1345590416\&quot;,\&quot;name\&quot;:\&quot;Orc" rel="nofollow">https://s3.amazonaws.com/files.d20.io/marketplace/7474/yqkHSWjqrTPLpy6eFz845Q/max.png?1345590416\",\"name\":\"Orc</a> %%NUMBERED%%\",\"gmnotes\":\"\",\"controlledby\":\"\",\"bar1_value\":\"\",\"bar1_max\":\"\",\"bar1_link\":\"\",\"bar2_value\":30,\"bar2_max\":\"\",\"bar2_link\":\"-KEbTehomdlWxdRETGko\",\"bar3_value\":\"\",\"bar3_max\":23,\"bar3_link\":\"\",\"represents\":\"-KEbTehi-Hj7tCacywVL\",\"aura1_radius\":\"\",\"aura1_color\":\"#00ff00\",\"aura1_square\":false,\"aura2_radius\":\"\",\"aura2_color\":\"#ffffff\",\"aura2_square\":false,\"tint_color\":\"transparent\",\"statusmarkers\":\"\",\"showname\":true,\"showplayers_name\":false,\"showplayers_bar1\":false,\"showplayers_bar2\":false,\"showplayers_bar3\":false,\"showplayers_aura1\":false,\"showplayers_aura2\":false,\"playersedit_name\":true,\"playersedit_bar1\":true,\"playersedit_bar2\":true,\"playersedit_bar3\":true,\"playersedit_aura1\":true,\"playersedit_aura2\":true,\"light_radius\":60,\"light_dimradius\":30,\"light_otherplayers\":true,\"light_hassight\":false,\"light_angle\":360,\"light_losangle\":\"\",\"light_multiplier\":1,\"sides\":\"\",\"currentSide\":0,\"lastmove\":\"948,439\",\"_type\":\"graphic\",\"_subtype\":\"token\",\"_cardid\":\"\"}}" TypeError: Cannot read property 'results' of undefined &nbsp; &nbsp; at apiscript.js:2540:59 &nbsp; &nbsp; at checkFinishedOps (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:109:36), &lt;anonymous&gt;:758:7) &nbsp; &nbsp; at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:109:36), &lt;anonymous&gt;:838:8) &nbsp; &nbsp; at null._onTimeout (/home/node/d20-api-server/node_modules/underscore/underscore.js:768:19) &nbsp; &nbsp; at Timer.listOnTimeout (timers.js:92:15) I'm using version 0.4.5 and sheet v2.3.3 With Logging at INFO "ShapedScripts 1459877991262 INFO : -=&gt; ShapedScripts v0.4.5 &lt;=-" "ERROR: Unable to find ability npc_hp for character Orc" TypeError: Cannot read property 'results' of undefined &nbsp; &nbsp; at apiscript.js:2540:59 &nbsp; &nbsp; at checkFinishedOps (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:109:36), &lt;anonymous&gt;:758:7) &nbsp; &nbsp; at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:109:36), &lt;anonymous&gt;:838:8) &nbsp; &nbsp; at null._onTimeout (/home/node/d20-api-server/node_modules/underscore/underscore.js:768:19) &nbsp; &nbsp; at Timer.listOnTimeout (timers.js:92:15)
To add a bit more information, I opened a different game using Support script 0.1.5 and Sheet 2.2.20. The HP rolling worked last week, but now crashed in the same location. I'm thinking it might be related to the API update. :(&nbsp;
1459880403
Lucian
Pro
API Scripter
Hi BP, I've looked into this and have made it a bit more robust in the face of this error - it no longer crashes the API now - but I believe you are right - roll20 have broken ability rolling via sendChat again :-( Will report it. Lucian
1459881136
Lucian
Pro
API Scripter
Version 0.5: More JSON improvements I have revamped the samples etc and changed the README to include some basic information. Anyone interested in doing custom spells or monsters should have a look at the samples directory and the README on github:&nbsp; <a href="https://github.com/symposion/roll20-api-scripts/tr" rel="nofollow">https://github.com/symposion/roll20-api-scripts/tr</a>... Let me know if that makes things a bit clearer! Version 0.5.1: HP Rolling is broken :-( The latest API server update from Roll20 has broken the HP rolling functionality. I'm waiting on a response from Riley, but in the meantime I've made the script a bit more resilient in the face of the problem. It doesn't Roll HP but at least it doesn't crash :-(
I tested with 0.5 it seems that Riley already fixed the issue with HP rolling.
Yup all fixed. 0.5.1 seems to have a bug in the roll check. You have inlineRolls instead of inlinerolls in the check of the returned rolls.
1459887022
Lucian
Pro
API Scripter
0.5.2: Fix cretinous bug I introduced in 0.5.1 :-) HP rolling appears to be working again now, I guess Riley re-fixed the abilities bug.
1459891915
Lucian
Pro
API Scripter
Token Action Requirements I'm about to start work on porting Kevin's Token Action creator into the main shaped support script, and I'd like some feedback on the proposed behaviour: I will add commands that do the same as the following ones in &nbsp;Kevin's script: actions, reactions, lair actions, legendary actions, initiative, features, saves/savequery, skills/skillsquery, traits For the time being, I don't propose to include a command that creates abilities for every spell, unless there's a particularly strong demand for it - it seems like a bad idea - it will get cluttered very quickly and spells have complex restrictions that mean they're probably better served with a different UI (see below) There will be a configuration option for the script which allows you to specify a list of abilities to be created by default for new characters There will be configuration options that let you specify which abilities should be created as token actions by default (whether they are auto-created for new characters or created manually with the chat commands There will be a command to output a spellbook in the chat window. This will list all spells grouped by level, with ones that are not castable (thanks to insufficient slots/not prepared) greyed out. For spells that can be cast as a ritual or at a higher level there will be a query that pops up when you click them. Anyone who saw my spellbook script for the old shaped sheet will have a rough idea of how it will look There will be a command to add abilites/token actions for named spells (!shaped-add-spell --Fireball, Firebolt, Witch bolt) The existing commands from advantage tracker will also be ported over, as well as options for having a token action made for these Brunhine also has some plans for additional options relating to advantage tracking - something to effectively replace the old query for advantage option That's all I can think of for the moment. Does anyone have any other thoughts relating to this area (I'm also going to be doing Rest handling + spell slots but that's a separate topic)?
1459896067
Tim
Pro
Sheet Author
Compendium Curator
That all sounds great to me. The spellbook stuff is particularly appealing. My only request around AdvantageTracker is to have a status marker for Roll2 (it currently just has a green dot for Advantage or a red dot for Disadvantage - maybe a purple dot for Roll2?). I use Roll2 because I find it makes having advantage/disadvantage more exciting if you see both results, but it gets confusing without a status marker.&nbsp;
1459896322

Edited 1459896692
Kryx
Pro
Sheet Author
API Scripter
I don't think roll2 should have a status icon as it is neither advantage or disadvantage. My suggestion is that the script not handle roll2 at all as it's meant as a set once kind of setting. Whereas the script is meant to allow you to swap between adv/dis/normal on the fly (the same as the sheet). I forget if Kevin implemented his script with it in the options or not. Though that's not my choice. @Lucian my goal is to make the actions and attacks stuff part of the sheet. If you're feeling ambitious the implementation could be done there and linked same as checks and saving throws. Otherwise just port what kevin has done. On automatically using spells: it doesn't handle cases like scorching ray. I think we'll have to have a toggle to auto use spell slots for each spell (default to yes)
@Lucian - This looks great to me. &nbsp;I assume though that you also meant to include attacks (which are technically different from actions). &nbsp;Regarding spells, I completely agree with the implementation, it is similar to what I wanted to eventually get to. @Kryx - I did add the option to switch to roll2, but this was more for the case where people might want to switch between normal and roll2 to handle advantage/disadvantage. Regarding automatically decrementing spell slots, maybe it is possible to add a flag via the freeform section so that this can be handled on a per spell basis? &nbsp;Also, there aren't a ton of great ways to handle things like Magic Missile or Scorching Ray, but would be good to brainstorm a way to better display this type of spell, because they sure seem like the exception rather than the rule and it's better to handle the outliers individually rather than having an all or none flag (particularly for two of the most common spells used, at least in my campaigns).
1459899043
Kryx
Pro
Sheet Author
API Scripter
I meant for the flag to exist individually on each spell.
Kryx said: I meant for the flag to exist individually on each spell. Ahh, sorry my mistake, I either missed the edit initially or misread it. &nbsp;Sounds like we are on the same page then.
1459899459
Tim
Pro
Sheet Author
Compendium Curator
@Kryx - I did add the option to switch to roll2, but this was more for the case where people might want to switch between normal and roll2 to handle advantage/disadvantage. This is exactly how I use it, for what it's worth. Advantage and Disadvantage are such a core part of the 5e experience, I like to make sure that their effects are very transparent (so that even if the result is low, you see that you got two shots at it!)
1459900729

Edited 1459903138
I think the newest update resolved my previous issue. My new question is there an equivalent of var spellData from the old script in the new one?
1459931553
Lucian
Pro
API Scripter
One final thing for all you peeps who are struggling with creating the required JSON format:&nbsp; <a href="http://jeremydorn.com/json-editor/?schema=N4IgLglm" rel="nofollow">http://jeremydorn.com/json-editor/?schema=N4IgLglm</a>... Enjoy!
1459951985
Lucian
Pro
API Scripter
Version 0.6: Initial implementation of token action creation You can now do many of the things that you can with the TokenAction creator. The basic command is !shaped-abilities and it takes various options to determine what it creates: --attacks - create an ability for each attack present in the character sheet --features - create an ability for each class feature present in the character sheet --traits -&nbsp;create an ability for each trait present in the character sheet --actions -&nbsp;create an ability for each attack present in the character sheet --reactions -&nbsp;create an ability for each attack present in the character sheet --legendaries -&nbsp;create an ability for each attack present in the character sheet --lairs -&nbsp;create an ability for each attack present in the character sheet --initiative - create an ability to roll initiative - -saves - create an ability to launch the chat window save buttons --savesquery - create an ability to launch the save drop-down query --skills -&nbsp;create an ability to launch the chat window skill buttons --skillsquery - create an ability launch the skill drop-down query --DELETE - delete all &nbsp;abilities on the token (including those not created by this script) Options can be combined, although you shouldn't specify both --savesquery & --saves or --skillsquery & --skills since one will overwrite the other (they both use the same name). If DELETE is specified, it runs first (obviously!).&nbsp;You can select multiple tokens at once and it will run for all of them. Please note that since this is a WIP at the moment, all of these will be created as token actions, and this is not configurable. I will be implementing configurable options for this in the next version. Also, I haven't yet implemented anything to add abilities automatically on character creation - again, coming in the next version.
1459981185

Edited 1459981264
Zym
Sheet Author
Hi there, random roll20 DM just walking by your thread. Obviously, like the rest, I am no coder. I am humbled by your work. I offer a cookie in exchange for knowledge. I was a DM a few months ago, or longer, and have re connected to roll20 to see the powers that be have changed the character sheets. I've loaded up my old campaign and used&nbsp;5e-shaped-scripts.js with the old character sheet to import a mindflayer into that campaign. I started a new campaign up, with the new character sheets and, ya know, just realised that I can't import monster stat blocks into cool tokens anymore. So found this awesomely long thread where coders talk in coding business terms, which I try to understand.&nbsp; Thought I would cave in, and just ask.... so can I import monsters from a Stat block with the new character sheets with an api script (one similar to !shaped-import). Ya see I really liked that script. I really would love something similar because I'd love to run some DDAL4 games. I can contribute a donation to support the work you did for that script and from what I have read in this thread, is that you are trying but haven't quite got there...
1459981929
Kryx
Pro
Sheet Author
API Scripter
Hi Alexander, If you check the&nbsp; original post there are instructions there. Monster and spell import both seem to be working.
So did some testing with 0.6, generally speaking it works well. &nbsp;One thing that tweaks my OCD a bit though... I don't use alphabetical token actions and I create abilities in a specific order, so regardless of the order that I specify the switches it puts them in a specific order. &nbsp;Now I can work around this by creating the macro with a line per option, so it isn't a big deal really, other than it being a bit spammy.
1460013630
Lucian
Pro
API Scripter
@Alexander: !shaped-import-statblock is your friend - it works the same way as the old script did @Kevin: Duly noted. I will change it to respect order as passed on the command line. I believe it's a trivial change.
1460014478
Zym
Sheet Author
With that, both Strahd, my players and I thank you immensely. Good day to you sir.
Now that you've added the options to set the default options on character sheet creation, and all the token linking, I'm using the script to import most of my npc, rather than drag and drop from the SRD. However I seem to be coming across a problem with the Duergar, when I try to drag a token out and it attempts to roll HP I get this message in the API log - "Unable to find attribute named hp_formula for character Duergar(-KEkmXpLIeczjl4jT0ue) in chat command." Which causes the scripts to shut down. Weirdly, the health on the character sheet itself won't display either - it just shows (). When I click on the edit mode button though it displays "4d8-4". When I click the HP, to display it in chat, I just get a syntax error - "SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but end of input found." When I drag the character across from the SRD, it seems to show the same thing for health, and has the same problem. So I'm not sure if it's a script problem, or a sheet problem. I just updated to the new version of everything about 2 hours ago.
1460036623
Lucian
Pro
API Scripter
Hi Xiavn, Good catch - thanks for the clear bug report. I've had a look at this and it's a bug in the sheet workers in the sheet itself. The Duergar is unusual in that it has an additional HP adjustment (based on its CON it should have 4d8+8 HP, but in fact it only has 4d8+4 in the MM, so the sheet adds a -4 adjustment to its expected HP). The script then later attempts to treat this value as a string (it can contain an expression like -4d4 if you want it to), but in this case it has previously been set as an integer, so the script explodes with an error. I'll send Kryx a heads up and hopefully he can fix it for the next version. Lucian
1460036865
Kryx
Pro
Sheet Author
API Scripter
I'll address this hopefully tonight.
Lucian said: Hi Xiavn, Good catch - thanks for the clear bug report. I've had a look at this and it's a bug in the sheet workers in the sheet itself. The Duergar is unusual in that it has an additional HP adjustment (based on its CON it should have 4d8+8 HP, but in fact it only has 4d8+4 in the MM, so the sheet adds a -4 adjustment to its expected HP). The script then later attempts to treat this value as a string (it can contain an expression like -4d4 if you want it to), but in this case it has previously been set as an integer, so the script explodes with an error. I'll send Kryx a heads up and hopefully he can fix it for the next version. Lucian That totally explains why when I was fiddling about I managed to roll 4d8+8 on a character sheet from the srd by adding +4 instead of -4! I was totally confused where it was getting the +4 from already, but I see it does it all automagically behind the scenes now.
1460048989
Lucian
Pro
API Scripter
Version 0.7: FX! Further to Kryx's recent additions to the sheet, I have now added support for auto-triggering FX from spells. You just have to fill in the details on the sheet and it will do the rest for you. For obvious reasons, if you turn this feature on for a spell, it will require you to click on a target when you cast the spell. In addition, for effects that require both a source and a target, like "beam", if there are multiple tokens for the casting character on the current page, you should select one as the caster before casting the spell, or it will select one at random! In practice you will almost certainly have a token selected in this situation anyway, since for mook casters you will most likely be casting from a token action. &nbsp; NB: This feature relies on some currently unreleased changes to the character sheet to work - hopefully these will be integrated into the sheet in the next day or so - I will keep you posted here. !shaped-abilities now respects the order of options passed on the command line when creating abilities.
Hey all, just a quick update on the Advantage Tracker side of things: Basic functionality has been coded up. It should be shipped off to Lucian soon and included in a upcoming update. Done: Ability to set rolltype via !shaped-at command accepts either --advantage --disadvantage or --normal Updated the associated token with the green status marker for advantage, or red for disadvantage Still to do: Update a newly placed token with the appropriate status marker if rolltype is not normal Allow for custom status marker choice functionality to create token actions for setting rolltype (though this will probably end up in the token action side that lucian already built) Want to do: Create a new config option that would allow for adv/dis to be set with a 'revert' flag that would revert the rolltype back to normal (or whatever it was before) after a roll is made.
1460054231
Kryx
Pro
Sheet Author
API Scripter
I commonly see red used for health status (the old 4e bloodied), but that may not be common amongst others. If it is then we should consider a different default color. Otherwise people like me who use it can change the default colors.