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

[Script] D&D 5e Shaped NPC & Spell Importer

1443828827
Kryx
Pro
Sheet Author
API Scripter
It's in the same repository
1443829172

Edited 1443829463
Ok, I found the list.  I'm rather new to messing with API scripts, but your instructions seemed easy enough in the opening post.  Exactly which files do I need for the full spell-importer?  Do I just copy the contents into the API scripts area of my campaign?  I already grabbed your NPC Importer for stat-blocks, so thank you very much for that. Essentially, where do I put the spellData.Json?
1444147048
Zym
Sheet Author
Holy F*&k this is amazing! I love the script. It will save me hours.
I seem to be having trouble while importing the Cloaker. I don't get any errors in the script, in fact it doesn't even register that I've tried importing the monster in the first place. I have tried removing sections to see if it would go, but it's still not registering. Here's the text I had on the token in the GM section: Cloaker Large aberration, chaotic neutral Armor Class 14 (natural armor) Hit Points 78 (12d10 + 12) Speed 10ft., fly 40 ft. STR 17 (+3) DEX 15 (+2) Skills Stealth +5 CON 12 (+1) INT 13 (+1) WIS 12 (+1) Senses darkvision 60ft., passive Perception 11 Languages Deep Speech, Undercommon Challenge 8 (3,900 XP) CHA 14 (+2) Damage Transfer. While attached to a creature, the cloaker takes only half the damage dealt to it (rounded down). and that creature takes the other half. False Appearance. While the cloaker remains motionless without its underside exposed, it is indistinguishable from a dark leather cloak. Light Sensitivity. While in bright light, the cloaker has disadvantage on attack rolls and Wisdom (Perception) checks that rely on sight. ACTIONS Multiattack. The cloaker makes two attacks: one with its bite and one with its tail. Bite. Melee Weapon Attack: +6 to hit, reach 5 ft., one creature. Hit: 10 (2d6 + 3) piercing damage, and if the target is Large or smaller, the cloaker attaches to it. lfthe cloaker has advantage against the target, the cloaker attaches to the target's head, and the target is blinded and unable to breathe while the cloaker is attached. While attached, the cloaker can make this attack only against the target and has advantage on the attack roll. The cloaker can detach itself by spending 5 feet of its movement. A creature, including the target, can take its action to detach the cloaker by succeeding on a DC 16 Strength check. Tail. Melee Weapon Attack: +6 to hit, reach 10ft., one creature. Hit: 7 (1d8 + 3) slashing damage. Moan. Each creature within 60 feet of the cloaker that can hear its moan and that isn't an aberration must succeed on a DC 13 Wisdom saving throw or become frightened until the end of the cloaker's next turn. If a creature's saving throw is successful, the creature is immune to the cloaker's moan for the next 24 hours Phantasms (Recharges after a Short or Long Rest). The cloaker magically creates three illusory duplicates of itself if it isn't in bright light. The duplicates move with it and mimic its actions, shifting position so as to make it impossible to track which cloaker is the real one. If the cloaker is ever in an area of bright light, the duplicates disappear. Whenever any creature targets the cloaker with an attack or a harmful spell while a duplicate remains, that creature rolls randomly to determine whether it targets the cloaker or one of the duplicates. A creature is unaffected by this magical effect if it can't see or if it relies on senses other than sight. A duplicate has the cloaker's AC and uses its saving throws. If an attack hits a duplicate, or if a duplicate fails a saving throw against an effect that deals damage, the duplicate disappears. Maybe someone can see something that I'm missing here?
1444461805

Edited 1444461934
It's something with the Phantasms section's line breaks. Try this one: Cloaker Large aberration, chaotic neutral Armor Class 14 (natural armor) Hit Points 78 (12d10 + 12) Speed 10ft., fly 40 ft. STR 17 (+3) DEX 15 (+2) Skills Stealth +5 CON 12 (+1) INT 13 (+1) WIS 12 (+1) Senses darkvision 60ft., passive Perception 11 Languages Deep Speech, Undercommon Challenge 8 (3,900 XP) CHA 14 (+2) Damage Transfer. While attached to a creature, the cloaker takes only halfthe damage dealt to it (rounded down). and that creature takes the other half. False Appearance. While the cloaker remains motionless without its underside exposed, it is indistinguishable from a dark leather cloak. Light Sensitivity. While in bright light, the cloaker has disadvantage on attack rolls and Wisdom (Perception) checks that rely on sight. ACTIONS Multiattack. The cloaker makes two attacks: one with its bite and one with its tail. Bite. Melee Weapon Attack: +6 to hit, reach 5 ft., one creature. Hit: 10 (2d6 + 3) piercing damage, Tail. Melee Weapon Attack: +6 to hit, reach 10ft., one creature. Hit: 7 (1d8 + 3) slashing damage. Moan. Each creature within 60 feet of the cloaker that can hear its moan and that isn't an aberration must succeed on a DC 13 Wisdom saving throw or become frightened until the end of the cloaker's next turn. If a creature's saving throw is successful, the creature is immune to the cloaker's moan for the next 24 hours Phantasms: (Recharges after a Short or Long Rest). The cloaker magically creates three illusory duplicates of itself if it isn't in bright light. The duplicates move with it and mimic its actions, shifting position so as to make it impossible to track which cloaker is the real one. If the cloaker is ever in an area of bright light, the duplicates disappear. Whenever any creature targets the cloaker with an attack or a harmful spell while a duplicate remains, that creature rolls randomly to determine whether it targets the cloaker or one of the duplicates. A creature is unaffected by this magical effect if it can't see or if it relies on senses other than sight. Aduplicate has the cloaker's AC and uses its saving throws.If an attack hits a duplicate, or if a duplicate fails a saving throw against an effect that deals damage, the duplicate disappears.
1444461988
Kryx
Pro
Sheet Author
API Scripter
It's likely the recharge.
That fixed it, thank you! I noticed that my API would freeze without a notification of an error after the first attempt on the Cloaker, preventing me from importing anything else after that.
1444502059

Edited 1444502097
Cameron R. said: That fixed it, thank you! I noticed that my API would freeze without a notification of an error after the first attempt on the Cloaker, preventing me from importing anything else after that. Yeah, it doesn't always produce a visible error.  I think that's a Roll20 thing though and nothing to do with the sheet.  I keep one token that I know works to test by selecting the token and running !build-monster, if I get feedback, I know things are working and I can try the new stat block.  If I don't get feedback I know I have to re-save/start the API scripts before moving on to the new stat block.
I apoligize for the basic questions I have to ask, I'm slowly learning but I am really a complete beginner with regards to any scripting. My players are getting all the (From Shaped) Stuff in their chat windows, for example when I'm dragging an unassigned token out or dragging out a monster (Which they can't see). I've had a look the the script and I can't figure out if there is a way of changing this so it is only sent to me? Thanks
1444642236
Kryx
Pro
Sheet Author
API Scripter
Zyn said: My players are getting all the (From Shaped) Stuff in their chat windows, for example when I'm dragging an unassigned token out or dragging out a monster (Which they can't see). I've had a look the the script and I can't figure out if there is a way of changing this so it is only sent to me? Hey Zyn, I can't imagine that happening. All messages are sent to the GM unless a player runs a command and then it also sends it to them. Line 139 deals with that. It always sends the log messages to the GM and if the command exectuer is not the GM then it also whispers it to them.
Kryx said: Zyn said: My players are getting all the (From Shaped) Stuff in their chat windows, for example when I'm dragging an unassigned token out or dragging out a monster (Which they can't see). I've had a look the the script and I can't figure out if there is a way of changing this so it is only sent to me? Hey Zyn, I can't imagine that happening. All messages are sent to the GM unless a player runs a command and then it also sends it to them. Line 139 deals with that. It always sends the log messages to the GM and if the command exectuer is not the GM then it also whispers it to them. I had one issue regarding this about two weeks ago, a PC mentioned that she saw the message come up "(From Shaped): Token bar3 is linked" when I placed down another PC's character token. It only seemed to happen when I had players split between more than 1 page (the PC that mentioned it was not on the page I was placing tokens).
I found it, after you mentioned i found line 143? With just a /w as opposed to /w gm. Not sure how I managed to change it as I havn't changed anything that far down the script. But it's sorted now, thanks.
Zyn said: I found it, after you mentioned i found line 143? With just a /w as opposed to /w gm. Not sure how I managed to change it as I havn't changed anything that far down the script. But it's sorted now, thanks. I've seen the same thing so I don't think it's something you changed.  Thanks for finding it so I can change mine!
I didn't want to type out all the spells myself for the spell importer so I wrote a simple parser in python to build the json for me. If anyone wants to try using it the code snippet is here&nbsp; <a href="https://gist.github.com/jhultgre/5101e397a05affe9fb87" rel="nofollow">https://gist.github.com/jhultgre/5101e397a05affe9fb87</a> . It expects a file path to a single spell and makes a new file with the json in it. It should work with most spells but probably wont work with everything.
1444810396
Kryx
Pro
Sheet Author
API Scripter
@Joe there are some great examples on my github. You should take a look.
1444810637
Kryx
Pro
Sheet Author
API Scripter
Khrain &nbsp;seen the same thing so I don't think it's something you changed. &nbsp;Thanks for finding it so I can change mine! Line 143 purposefully doesn't have GM after the "/w" as it is supposed to whisper the commandExecuter if that person isn't the gm. I'd be curious if you can provide a reproduction path for this issue. I can see how it can happen, but it seems like it'll only happen if a user runs a command at some point then they will be saved as the executer.
Kryx said: Khrain &nbsp;seen the same thing so I don't think it's something you changed. &nbsp;Thanks for finding it so I can change mine! Line 143 purposefully doesn't have GM after the "/w" as it is supposed to whisper the commandExecuter if that person isn't the gm. I'd be curious if you can provide a reproduction path for this issue. I can see how it can happen, but it seems like it'll only happen if a user runs a command at some point then they will be saved as the executer. I'll see if it happens again this week (tomorrow). &nbsp;It was mostly happening for one player who I don't think tried to run any commands related to the shaped script, but he probably ran a few PowerCards3 commands. &nbsp;He told me that he was getting messages "From Shaped", but I don't recall right now which messages he was getting - it wasn't anything that bothered me. &nbsp;I'll pay more attention and I'll change line 143 back.
1444937124
Kryx
Pro
Sheet Author
API Scripter
@Khrain: I've put out another version to clear "commandExecuter" on dragging tokens on the map. Please pull the Oct 15th version and do let me know if you encounter it again.
If it helps Kryx, the only API any of my players use is !endofturn for the TrackerJacker script, could it have picked up on that somehow? (Seems unlikely) P.s. On the previous page I posted some dragon statblocks that I was having trouble porting. I'm still having the same issues with them. While trying to port them in my entire API just stops working and I have to reset the scripts in order to do anything else with them. The Young/Wyrmling dragons seem to port fine, So I am assuming its something to do with the legendary moves/frightful presence, but after removing each block one by one, I'm still having the same issues ADULT RED DRACOLICH Huge Undead, Chaotic Evil Armor Class 19 (natural armor) Hit Points 256 (19d12 + 133) Speed 40ft., climb 40ft., fly 80ft. STR 27 (+8) DEX 10 (+0) CON 25 (+7) INT 16 (+3) WIS 13 (+1) CHA 21 (+5) Saving Throws Dex +7, Con +14 , Wis +8, Cha +12 Skills Perception + 14, Stealth +7 Damage Resistances Necrotic Damage Immunities Fire, Poison Condition Immunities charmed, exhaustion, frightened,&nbsp;paralyzed, Poisoned Senses blindsight 60ft., darkvision 120ft., passive Perception 23 Languages Common, Draconic Challenge 17 (18,000 XP) Legendary Resistance (3/Day). If the dracolich fails a saving throw, it can choose to succeed instead. Magic Resistance. The dracolich has advantage on saving throws against spells and other magical effects. ACTIONS Multiattack. The dracolich can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws. Bite. Melee Weapon Attack: +14 to hit, reach 10ft., one target. Hit: 19 (2d10 + 8) Piercing damage plus 7 (2d6) Fire damage. Claw. Melee Weapon Attack: +14 to hit, reach 5 ft., one target. Hit: 15 (2d6 + 8) Slashing damage. Tail. Melee Weapon Attack: +14 to hit, reach 15 ft., one target. Hit: 17 (2d8 + 8) Bludgeoning damage. Frightful Presence. Each creature of the dracolich's choice that is within 120 feet of the dracolich and aware of it must succeed on a DC 20 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dracolich's Frightful Presence for the next 24 hours. Fire Breath (Recharge 5-6). The dracolich exhales fire in a 60-foot cone. Each creature in&nbsp;that area must make a DC 22 Dexterity saving throw, taking 63 (18d6) Fire damage on a failed save, or half as much damage on a successful one. LEGENDARY ACTIONS The dracolich can take 3 legendary actions, choosing from the options below. Only one legendary action option can be used at a time and only at the end of another creature's turn. The dracolich regains spent legendary actions at the start of its turn. Detect. The dracolich makes a Wisdom (Perception) check. Tail Attack. The dracolich makes a tail attack. Wing Attack (Costs 2 Actions). The dracolich beats its tattered wings. Each creature within 10 feet of the dracolich must succeed on a DC 23 Dexterity saving throw or take 15 (2d6 + 8) Bludgeoning damage and be knocked prone. After beating its wings this way, the dracolich can fly up to half its flying speed. I'm not sure if I'm just missing something obvious?
1444947024

Edited 1444947278
Kryx
Pro
Sheet Author
API Scripter
Recharge and 3/day most likely. I need to fix those at some point. Debugging regex and the action path is a lot of work - a few hours that I don't want to dedicate currently. Hopefully soon. My current Regex seems to pick it up /(?:#)([A-Z][\w-\']+(?:\s(?:[A-Z][\w-\']+|[\(\)\/\d\-]|of|and|or|a)+)*)(?=\s*\.)/gi #Legendary Resistance (3/Day). If the dracolich fails a saving throw, it can choose to succeed instead. #Magic Resistance. The dracolich has advantage on saving throws against spells and other magical effects. ACTIONS #Multiattack. The dracolich can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws. #Bite. Melee Weapon Attack: +14 to hit, reach 10ft., one target. Hit: 19 (2d10 + 8) Piercing damage plus 7 (2d6) Fire damage. #Claw. Melee Weapon Attack: +14 to hit, reach 5 ft., one target. Hit: 15 (2d6 + 8) Slashing damage. #Tail. Melee Weapon Attack: +14 to hit, reach 15 ft., one target. Hit: 17 (2d8 + 8) Bludgeoning damage. #Frightful Presence. Each creature of the dracolich's choice that is within 120 feet of the dracolich and aware of it must succeed on a DC 20 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dracolich's Frightful Presence for the next 24 hours. #Fire Breath (Recharge 5-6). The dracolich exhales fire in a 60-foot cone. Each creature in that area must make a DC 22 Dexterity saving throw, taking 63 (18d6) Fire damage on a failed save, or half as much damage on a successful one. LEGENDARY ACTIONS The dracolich can take 3 legendary actions, choosing from the options below. Only one legendary action option can be used at a time and only at the end of another creature's turn. The dracolich regains spent legendary actions at the start of its turn. #Detect. The dracolich makes a Wisdom (Perception) check. #Tail Attack. The dracolich makes a tail attack. #Wing Attack (Costs 2 Actions). The dracolich beats its tattered wings. Each creature within 10 feet of the dracolich must succeed on a DC 23 Dexterity saving throw or take 15 (2d6 + 8) Bludgeoning damage and be knocked prone. After beating its wings this way, the dracolich can fly up to half its flying speed. Is how the statblock would be parsed. Testing that briefly on&nbsp;<a href="https://regex101.com/" rel="nofollow">https://regex101.com/</a> it looks like it should all work. :(
Zyn said: P.s. On the previous page I posted some dragon statblocks that I was having trouble porting. I'm still having the same issues with them. While trying to port them in my entire API just stops working and I have to reset the scripts in order to do anything else with them. The Young/Wyrmling dragons seem to port fine, So I am assuming its something to do with the legendary moves/frightful presence, but after removing each block one by one, I'm still having the same issues It still works for me. I copied your stat block, pasted it into a token and ran !build-monster. &nbsp;It created the dracolich, the token action buttons - everything. &nbsp;This is using the latest copy of the script. &nbsp;I didn't tweak the stat block in any way. Maybe it's a browser thing? &nbsp;I'm using Chrome&nbsp;46.0.2490.71 m
I'm using the same version of chrome as well as the updated script from yesterday. Even tried disabling all other api one by one and nothing. I must admit I'm rather stumped by this
1445013658
Kryx
Pro
Sheet Author
API Scripter
@Zyn: When the script fails from a bad import it's often very fiddly to get it working again. Try deleting the script and re-adding it.
1445045892

Edited 1445051655
EDIT: And now it works. &nbsp;We all experienced some slow screen updates so maybe it was server overload. Using the new script I get an error whenever dragging a token onto the map. &nbsp;I've reset the scripts several times and it does it for any monster token that I drag out. I get this in the output console : Spinning up new sandbox... "Shaped Scripts ready" "-=&gt; TokenLock v0.2.2 &lt;=- [Sun Apr 12 2015 12:18:42 GMT-0500 (CDT)]" "(21:36) PowerCards version 3.2.10 loaded. Last updated: July 31st, 2015 ~ 8:45 pm" "-=&gt; TableExport v0.2.0 &lt;=- [Sat Mar 28 2015 23:44:27 GMT-0500 (CDT)]" "Still working after trying to roll hp" /home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:1 orts, require, module, __filename, __dirname) { function g(a){throw a;}var j=v ^ SyntaxError: Unexpected end of input at Object.parse (native) at handleMove (evalmachine.&lt;anonymous&gt;:5068:70) at eval ( And this on the API script page: Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again. More info... For reference, the error message generated was: /home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:1 orts, require, module, __filename, __dirname) { function g(a){throw a;}var j=v ^ SyntaxError: Unexpected end of input at Object.parse (native) at handleMove (evalmachine.&lt;anonymous&gt;:5068:70) at eval (
Also - no reports of whispers going to anyone other than me (GM).
Tried Deleting the Script and readding it, sadly no luck. Still having the issues with the dragons. My players got another couple of messages from shaped using the new script. Changing the same line to /w gm sorted it again.
1445071355

Edited 1445071510
Kryx
Pro
Sheet Author
API Scripter
@Khrain: Your character does not have any hit dice defined. I've added a check and will now print out if that is the case. Nothing has changed there recently. @Zyn: The stat block you put above imports perfectly fine for me on Chrome. I'm going to need a reproduction path on the whisper part. The only time a player should ever get a whisper is if they run a command and become "commandExecuter". I believe I have holed up the only case where they could've ran a command in the past and if you then dragged a token on the map it would whisper them still. Please provide what your players have done in terms of commands and what you've done when they were whispered.
1445080488

Edited 1445080922
That's the strange thing. They received the message when I dragged a Monster (Whos sheet they didn't have access to) from the journal to the tabletop and it rolled health. They got the health message, although strangely only certain players received the message. I'm completely stumped by the stat block not working then Deleted the Script and reinstalled it today, still crashed when I tried to import it. Below are the only changes I have made to the script, which I believe? I've done right and shouldn't be the reason that this isn't importing (function (shaped) { &nbsp; /****Import Options***/ &nbsp; shaped.settings = { &nbsp; &nbsp; createAbilityAsToken: true, &nbsp; &nbsp; rollMonsterHpOnDrop: true, // will roll HP when character are dropped on map &nbsp; &nbsp; showName: true, //show the name on the map (not to players) &nbsp; &nbsp; showNameToPlayers: false, //show the name to players &nbsp; &nbsp; showCharacterNameOnRollTemplate: true , //show the character's name on their roll templates &nbsp; &nbsp; //useAaronsNumberedScript: true, //add numbers at the end if using his script &nbsp; &nbsp; //defaultTab: 'actions', //core is default. uncomment if you want the actions page. Change to 'spellbook' if you want the spellbook page. Change to 'all_npc' if you want to "Show All" for the NPC pages. &nbsp; &nbsp; sheetOutput: ' hidden ', //change to 'hidden' if you wish the sheet to whisper all commands to the GM &nbsp; &nbsp; whisperDeathSaves: true, //change to false if you wish NPC death saves to be rolled openly &nbsp; &nbsp; initiativeTieBreaker: true, //change to true if you want to add the initiative modifier as a tie breaker for initiatives. (I use it) &nbsp; &nbsp; whisperInitiative: true, //always whisper initiative &nbsp; &nbsp; initiativeAddsToTracker: true, //change to false if you do not want to add the initiative to the tracker (mainly for the app) &nbsp; &nbsp; addInitiativeTokenAbility: true, //change to false if you do not want a macro "Init" on every token &nbsp; &nbsp; attacksVsTargetAC: false, //show the target's AC when using attacks &nbsp; &nbsp; attacksVsTargetName: false, //show the target's Name when using attacks &nbsp; &nbsp; addSaveQueryMacroTokenAbility: true, //change to false if you do not want a macro "Save" on every token &nbsp; &nbsp; addCheckQueryMacroTokenAbility: true, //change to false if you do not want a macro "Check" on every token &nbsp; &nbsp; useAmmoAutomatically: true, &nbsp; &nbsp; //hideGMInfo: true, //hide some roll template info from your players. This requires that the gm uses a browser extension &nbsp; &nbsp; bar: [ &nbsp; &nbsp; &nbsp; /* Setting these to a sheet value will set the token bar value. If they are set to '' or not set then it will use whatever you already have set on the token &nbsp; &nbsp; &nbsp; &nbsp;Do not use npc_HP, use HP instead &nbsp; &nbsp; &nbsp; &nbsp;*/ &nbsp; &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; name: 'HP', // Green bar &nbsp; &nbsp; &nbsp; &nbsp; max: true, &nbsp; &nbsp; &nbsp; &nbsp; link: false, &nbsp; &nbsp; &nbsp; &nbsp; show: false &nbsp; &nbsp; &nbsp; }, { &nbsp; &nbsp; &nbsp; &nbsp; name: 'npc_AC', //Blue bar &nbsp; &nbsp; &nbsp; &nbsp; max: false, &nbsp; &nbsp; &nbsp; &nbsp; link: true, &nbsp; &nbsp; &nbsp; &nbsp; show: false &nbsp; &nbsp; &nbsp; }, { &nbsp; &nbsp; &nbsp; &nbsp; name: '', // Red bar &nbsp; &nbsp; &nbsp; &nbsp; max: false, &nbsp; &nbsp; &nbsp; &nbsp; link: false, &nbsp; &nbsp; &nbsp; &nbsp; show: false &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; ] &nbsp; };
1445083320
Kryx
Pro
Sheet Author
API Scripter
You have a comma after the last curly bracket for bars. Not sure if that is the error or not.
Hello, I have some problems running the spell importer, i'm using the&nbsp; 5e-spells.js in you repostory, but the spell doesn't import completly&nbsp; Am i doing something wrong ?
1445723904
Kryx
Pro
Sheet Author
API Scripter
What is wrong with it? Because it's condensed? You have unchecked "concentration", "V", "S", and "M" which means you're looking for a spell without all of those parameters. Recheck VSM and it'll work normally.
I feel like an idiot now, thanks !
Kryx, you and your sheet and script are amazing. &nbsp;The script is the only thing that made me go from plus to pro subscription. I was wondering if it's possible to prohibit the script from displaying hp rolls in chat when I drag tokens in play. &nbsp;It's strange, because once in a while the chat whisper goes to one or more players despite having /talktomyself turned on. &nbsp;It appears to be inconsistent, so I don't know what is happening.
1445853434
Kryx
Pro
Sheet Author
API Scripter
Pietro, you can remove that line in the script (line 143 which uses sendChat with commandExecuter).&nbsp;Though I'd rather fix the issue. The only situation that I can think of where a player would be whispered is if they previously ran a shaped command. I believe I fixed that though. Make sure you're on the latest and if you're able to give me a reproducible case then I can fix it.
Is it possible to make all the imported npc rolls only visible to the GM? I like to fudge number to benefit my PCs when necessary.
1446066996
Kryx
Pro
Sheet Author
API Scripter
See the settings page to change the output to whisper to the GM. You can also change this on the import script.
I'm feeling like a huge noob sorry, where do you find this settings page? The change of the import script, is it line 13?&nbsp;sheetOutput: 'hidden',
1446068572
Kryx
Pro
Sheet Author
API Scripter
Oh, sorry. Thought this was on the sheet thread. You can do it on the sheet on the settings page or on the script on that line, ya.
Is it possible to use this script to give manually created tokens with linked sheets macro buttons? For example, if I copy/pasted the statblock of a dragon and converted it, I would get a filled character sheet AND macro buttons for the actions it can do if applicable. I was wondering if the same can be done to an already filled sheet. Fighter Bob that I created manually, has Greatsword and Second Wind on his abilities. If I run the convert he gets those two and the current setup of "Saves", "Checks", "Ability" drop down rolls. My example is a bit clunky but I hope you get what I am trying to say.
1446092518

Edited 1446092912
Brother Sharp said: Is it possible to use this script to give manually created tokens with linked sheets macro buttons? For example, if I copy/pasted the statblock of a dragon and converted it, I would get a filled character sheet AND macro buttons for the actions it can do if applicable. I was wondering if the same can be done to an already filled sheet. Fighter Bob that I created manually, has Greatsword and Second Wind on his abilities. If I run the convert he gets those two and the current setup of "Saves", "Checks", "Ability" drop down rolls. My example is a bit clunky but I hope you get what I am trying to say. You can type the following command line to add "Save" and "Check" macros to a token that is linked to a sheet: !shaped-token-macro --query For everything else, you can import the stat block and have it make the attacks and abilities if it's an NPC. For PC sheets though, I think you need to manually create them. For example, I made these for a PC named Brak. The Name in [Brackets] is just what I called the macro in the Abilities & Attributes tab: [Init]&nbsp; %{Brak|Initiative} [Battleaxe]&nbsp; %{Brak|repeating_weapons_melee_0_weapon} [Warhammer]&nbsp; %{Brak|repeating_weapons_melee_1_weapon} [2nd_Wind] %{Brak|classaction1} In my weapon examples, his Battleaxe and Warhammer are in the 1st and 2nd melee weapon slots and 2nd Wind is his first Class Action. If Brak were an NPC, the macros would look a little different though: [Init] %{Brak|Initiative} [Battleaxe] %{Brak|repeating_actions_0_action} [Warhammer] %{Brak|repeating_actions_1_action} [2nd_Wind] %{Brak|repeating_actions_2_action} Battleaxe and Warhammer are in the 1st and 2nd Action slots, but this time 2nd Wind is in the 3rd Action slot.&nbsp;Since NPCs don't have different sections for Attacks and Class Actions.
Thank you Korgul, Alas I already know how to create them manually. Are there any more commands like&nbsp;!shaped-token-macro --query to add new macros to existing tokens?
Is there any ability to work backwards with the spell importer?&nbsp; Eg. To put a spell in a character sheet and get it to add it to the api (or spit out the code to add it to the api) so you can import that spell in the future. I have some homebrew classes with custom spells in my campaign and was just wondering if this was something already available via the script or something easily doable? Thanks
1446731062
Kryx
Pro
Sheet Author
API Scripter
Nope. If you want custom spells you'll need to add them to your JSON file.
The converter for NPCs from the old sheet does bring some, but not all, information over. It throws this error message: Exception: TypeError: Cannot call method 'indexOf' of undefined I'm not quite sure how to pin this down further. Let me know what I can do to help.
1447601698
Kryx
Pro
Sheet Author
API Scripter
The converter is unofficially deprecated. I should remove it. If you're looking to bring over spells the spell importer is better. If you're looking to bring over monsters it's better to just reimport. If you're bringing over PCs it takes only a few minutes to recreate the lost parts.
So noted. The importer is indeed most excellent. I just brought in a shapechanger and it got it almost perfectly. Very nice. For me, too, this script is reason to subscribe to Pro. There's one thing where I prefer a different choice than the one you made. You represent darkvision 60 as light 70, dim -5, multiplier 1. I prefer light 35, dim -5, multiplier 2. What this does is allow for the mechanic of "dim light seen as normal light, darkness seen as dim, up to 60ft" to work within roll20. When a character with darkvision sees dim light from another light source, the multiplier 2 makes it appear as regular light.
1447603402
Kryx
Pro
Sheet Author
API Scripter
Thorsten B. said: There's one thing where I prefer a different choice than the one you made. You represent darkvision 60 as light 70, dim -5, multiplier 1. I prefer light 35, dim -5, multiplier 2. What this does is allow for the mechanic of "dim light seen as normal light, darkness seen as dim, up to 60ft" to work within roll20. When a character with darkvision sees dim light from another light source, the multiplier 2 makes it appear as regular light. That also makes them see light sources twice as far. That's 3.X's low-light vision. It somewhat simulates it, but also greatly increase the vision of a torch. For example if a torch is 40/20 then the user sees 80/40 when he should see 40 bright and nothing more. Here is 5e's Darkvison: "You can see in dim light within 60 feet of you as if it were bright light, and in darkness as if it were dim light"
Right, you have a point. I've not been able to fully test that because I don't have a map with 105 feet or more of direct line of sight where I use light sources. It's all dungeons with much shorter distances. The character has dim light within 60 of themselves. So if they are say 80 feet away from a torch, then they see bright 40 and dim for the other 40 ... but that's okay because they'd have that dim light anyway from their own vision. It might be an issue at greater distances where there isn't an overlap between the torch and their own vision. I'll need to do some more testing to see how it behaves. For now, on the maps I'm using, I prefer the "bright 40" effect I get from the multiplier. It is a minor point, as it doesn't affect game play much one way or another.
1447605354
Kryx
Pro
Sheet Author
API Scripter
Neither option is perfect. It would require roll20 to allow darkvision to work by RAW. I can look into making it a setting in the future. At a quick glance it'd take like half an hour which I'd rather dedicate to fixing up the sheet to the new repeating stuff.
You are right that roll20 would need a "show dim as bright" option to really make this work right. Don't bother making this a setting. I'm probably the only one who even wants it, and I fiddled your code to do that for my tokens. I'm still wondering whether your way might not be better, for sources that only shed dim light such as moonbeam. I'd rather you fix things that actually matter :). And can I say again how much this import function makes me squee. That's hours I don't have to spend on creating monsters.