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

Question on Mark's Shaped NPC Importer & Conveter

1438407993

Edited 1438740126
I was directed to this great tool: <a href="https://app.roll20.net/forum/post/1816031/script-d" rel="nofollow">https://app.roll20.net/forum/post/1816031/script-d</a>... However, when I attempt to convert a simple Goblin, the only macro that gets converted is Init (Initiative). Anyone familiar with the script able to figure out what I'm doing wrong? EDIT: It turns out the error is on my end, when copy-pasting from pdf in MacOSX, a "phantom" space appears after each line in the monster stat block. These spaces, in turn, throw off the converter. Goblin Text: Goblin Small humanoid (goblinoid), neutral evil Armor Class 15 (leather armor, shield) Hit Points 7 (2d6) Speed 30 ft STR 8 (−1) DEX 14 (+2) CON 10 (+0) INT 10 (+0) WIS 8 (−1) CHA 8 (−1) Skills Stealth +6 Senses darkvision 60 ft, passive Perception 9 Languages Common, Goblin Challenge 1/4 (50 XP) Nimble Escape. The goblin can take the Disengage or Hide action as a bonus action on each of its turns. Actions Scimitar. Melee Weapon Attack: +4 to hit, reach 5 ft, one target. Hit: 5 (1d6 + 2) slashing damage. Shortbow. Ranged Weapon Attack: +4 to hit, range 80/320 ft, one target. Hit: 5 (1d6 + 2) piercing damage.
What version of the sheet/importer are you using? Mark's been doing a lot of updating and I think one of the more recent sheet updates altered some attributes. &nbsp;So if you're using the new sheet and the old importer (or the new importer but an old sheet) that could be the problem. &nbsp;What you wrote looks correct to me though. &nbsp;It should import properly as far as I can tell.
Brian said: What version of the sheet/importer are you using? Mark's been doing a lot of updating and I think one of the more recent sheet updates altered some attributes. &nbsp;So if you're using the new sheet and the old importer (or the new importer but an old sheet) that could be the problem. &nbsp;What you wrote looks correct to me though. &nbsp;It should import properly as far as I can tell. I don't see any version #'s, but it is this version:&nbsp; <a href="https://github.com/mlenser/roll20/blob/master/scri" rel="nofollow">https://github.com/mlenser/roll20/blob/master/scri</a>... I believe it is the latest verison. It's the one he links to in the first page here:&nbsp;<a href="https://app.roll20.net/forum/post/1816031/script-d-and-d-5e-shaped-npc-importer-and-converter/?pagenum=1" rel="nofollow">https://app.roll20.net/forum/post/1816031/script-d-and-d-5e-shaped-npc-importer-and-converter/?pagenum=1</a> Last edited May 10.
Sorry. It being late, I didn't ask the other question: what version of the sheet. Are you just using the one that pops up when you want to select a sheet or have you copy and pasted the code from his github as a custom sheet? If you didn't make the custom sheet, that could easily be the problem.
Aaron, if you're not a Pro member on roll20, you can't use the API so you won't be able to use the importer
1438439637
Kryx
Pro
Sheet Author
API Scripter
Importer does require API, which requires Pro, indeed.
Liam said: Aaron, if you're not a Pro member on roll20, you can't use the API so you won't be able to use the importer My friend is a Pro member. I've volunteered to DM for his group. He has the API code for the importer loaded.
1438444050
Kryx
Pro
Sheet Author
API Scripter
I just tested your exact stat block and everything imported correctly - stats, skills, languages, actions, etc Please check the API console to see if you see any errors.
Brian said: Sorry. It being late, I didn't ask the other question: what version of the sheet. Are you just using the one that pops up when you want to select a sheet or have you copy and pasted the code from his github as a custom sheet? If you didn't make the custom sheet, that could easily be the problem. I'm not sure what you mean... And nothing in Mark's documentation that I've found says you need to make a custom sheet. Here's where the issue stands: After a night of messing with the format of the stat block, we've got the following macros to convert over on a Goblin: Init, Scimitar, Shortbow It *should* be creating macros for Str, Dex, Con, Int, Wis, and Cha, right? Something is going wrong there. Anyhow, my friend is helping me troubleshoot it over the next couple days, so I'm sure he'll figure out where/why the glitch is occurring.
1438444185
Kryx
Pro
Sheet Author
API Scripter
Aaron I. said: It *should* be creating macros for Str, Dex, Con, Int, Wis, and Cha, right? Something is going wrong there. Hmm? Only macros for actions are made. Everything else is on the sheet or you need to make yourself. That seems to be the misunderstanding.
Mark said: Aaron I. said: It *should* be creating macros for Str, Dex, Con, Int, Wis, and Cha, right? Something is going wrong there. Hmm? Only macros for actions are made. Everything else is on the sheet or you need to make yourself. That seems to be the misunderstanding. Ah...thanks for clarifying Mark. :) What threw me off was that the first time, I started without a clean sheet, and somehow your code produced Str, Dex, Con, Int, Wis, and Cha macros in the Attribute and Abilities section based on whatever was on the "dirty" sheet to begin with. I'd been trying to replicate that. Hah. *shakes head*
1438444344
Kryx
Pro
Sheet Author
API Scripter
You can create them as token macros if you want. The wiki has the documentation for what those buttons are called.
Mark said: You can create them as token macros if you want. The wiki has the documentation for what those buttons are called. Yep. I learned how to do that. I was just hoping there was a way to do it more efficiently than copy-pasta for every monster I create or use your handy importer for.
1438444653
Kryx
Pro
Sheet Author
API Scripter
Well if you create a macro for ability checks and saves you already have 12 macros for each creature in addition to init and actions. If you add in skills you're at 18-22 more. I could see only saves being useful - I can add it as an option on the importer. At this very moment I'm working on the spells @ higher level, but could do that sometime within the next few days (if not today).
1438446426

Edited 1438446632
Mark said: Well if you create a macro for ability checks and saves you already have 12 macros for each creature in addition to init and actions. If you add in skills you're at 18-22 more. I could see only saves being useful - I can add it as an option on the importer. At this very moment I'm working on the spells @ higher level, but could do that sometime within the next few days (if not today). No worries, I appreciate all the work you've done so far. Saving me loads of time, without a doubt. :) I think I was aiming for 8-9 macros: Initiative, 1-2 Attacks, Str, Dex, Con, Int, Wis, Cha (ability checks/saves) Possibly with a prompt to add an optional integer to the Str, Dex, Con, Int, Wis, Cha check to account for proficiency for a skill or saving throw that monster is proficiency in.
1438446507
Kryx
Pro
Sheet Author
API Scripter
I could employ the new query system to have a general Check, Save, or Skill macro for each creature. I'll look into it sometime soon.
I've had another couple oddities happening with the converter and macros... Latest one I was converting a Stirge - a pretty simple monster - but the only macro the converter produced was Init (the stirge's Blood Drain attack was conspicuously absent). A similar problem happened with converting a Myconid, except instead of creating a macro for its Fist attack, I got a strange macro for its Rapport Spores. Any idea if there's something wrong on my end inputing raw data?&nbsp; Text for the Stirge: Stirge Tiny beast, unaligned Armor Class 14 (natural armor) Hit Points 2 (1d4) Speed 10 ft., fly 40 ft. STR 4 (-3) DEX 16 (+3) CON 11 (+0) INT 2 (-4) WIS 8 (-1) CHA 6 (-2) Senses darkvision 60 ft., passive Perception 9 Languages - Challenge 1/8 (25 XP) Actions Blood Drain. Melee Weapon Attack: +5 to hit, reach 5 ft., one creature. Hit: 5 (1d4 + 3) piercing damage, and the stirge attaches to the target. While attached, the stirge doesn't attack. Instead, at the start of each of the stirge's turns, the target loses 5 (1d4 + 3) hit points due to blood loss. The stirge can detach itself by spending 5 feet of its movement. It does so after it drains 10 hit points of blood from the target or the target dies. A creature, including the target, can use its action to detach the stirge. Text for the Myconid: Myconid (adult) Medium plant, lawful neutral Armor Class 12 (natural armor) Hit Points 22 (4d8 + 4) Speed 20ft. STR 10 (+0) DEX 10 (+0) CON 12 (+1) INT 10 (+0) WIS 13 (+1) CHA 7 (-2) Senses darkvision 120 ft., passive Perception 11 Languages - Challenge 1/2 (100 XP) Distress Spores. When the myconid takes damage, all other myconids within 240 feet of it can sense its pain. Sun Sickness. While in sunlight, the myconid has disadvantage on ability checks, attack rolls, and saving throws. The myconid dies if it spends more than 1 hour in direct sunlight. ACTIONS Fist. Melee Weapon Attack: +2 to hit, reach 5 ft., one target. Hit: 5 (2d4) bludgeoning damage plus 5 (2d4) poison damage. Pacifying Spores (3/Day). The myconid ejects spores at one creature it can see within 5 feet of it. The target must succeed on a DC 11 Constitution saving throw or be stunned for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. Rapport Spores. A 20-foot radius of spores extends from the myconid. These spores can go around corners and affect only creatures with an Intelligence of 2 or higher that aren't undead, constructs, or elementals. Affected creatures can communicate telepathically with one another while they are within 30 feet of each other. The effect lasts for 1 hour.
1438506523
Kryx
Pro
Sheet Author
API Scripter
The stirge imported correctly for me. Stats are all ok, Blood drain imported fine. Myconid just didn't handle the (3/Day) syntax. I've fixed that in the latest. The target is still weird though.
Mark said: The stirge imported correctly for me. Stats are all ok, Blood drain imported fine. Myconid just didn't handle the (3/Day) syntax. I've fixed that in the latest. The target is still weird though. Strange. Yeah, something wrong must be going on with the API on our end then. Hopefully my friend can solve it. Yes the Myconid is weird. I tried just entering it manually (after running the converter) on the Abilities & Attributes section, but when I set it to "show token action" no macros appear when the token is selected like it should. Whereas if I made the monster from scratch I could. Not sure where the error is, but there definitely is one.
1438583582
Kryx
Pro
Sheet Author
API Scripter
There is no error with the latest. The target field for one of his attacks is off, but everything else is normal. Though it sounds like you are doing weird things - you'll have to make a video or something for me to understand better.
Mark said: Well if you create a macro for ability checks and saves you already have 12 macros for each creature in addition to init and actions. If you add in skills you're at 18-22 more. I could see only saves being useful - I can add it as an option on the importer. At this very moment I'm working on the spells @ higher level, but could do that sometime within the next few days (if not today). What about Saves as a "Drop Down Menu"? Skills wouldn't be a bad choice either, as its rare for them to NEED more than a couple skills. So Making Perception, Stealth, Insight at the top of the list would be advised and then the remain falling below, for NPCs that is.
1438619008
Kryx
Pro
Sheet Author
API Scripter
Greg B. said: What about Saves as a "Drop Down Menu"? Mark said: I could employ the new query system to have a general Check, Save, or Skill macro for each creature. I'll look into it sometime soon.
1438658201

Edited 1438663801
Mark said: There is no error with the latest. The target field for one of his attacks is off, but everything else is normal. Though it sounds like you are doing weird things - you'll have to make a video or something for me to understand better. Mark, sure! I appreciate the help. Here's my step-by-step with screenshots as I try to convert a homebrew "Skum" monster... Step-by-step 1. I set up a “Skum” sheet with avatar and default token, and save the changes. 2. With the skum token selected, I open Edit Token, set Represents Character to “Skum”, and the Name to “Skum.” I click the Show Nameplate box as well. 3. In Edit Token, in the GM Notes box, I paste the following monster stat block following the Monster Manual format (yes, it’s a custom-made monster), then I Save Changes. Skum Medium humanoid, lawful evil Armor Class 12 Hit Points 26 (4d8+8) Speed 15 ft., swim 35 ft. STR 18 (+4) DEX 14 (+2) CON 14 (+2) INT 6 (-2) WIS 6 (-2) CHA 3 (-4) Damage Vulnerabilities psychic Senses darkvision 60 ft., tremorsense 60 ft. (underwater only), passive Perception 8 Languages limited telepathy with other skum and its aberration masters 60 ft. Challenge 1/2 (XP 100) Aberration Thrall. While in the presence of a master aberration, skum are immune to fear and charm effects from non-aberrations. Slippery. Skum have advantage on their Strength (Athletics) or Dexterity (Acrobatics) checks to escape a grapple. Water Breathing. Skum can only breathe air for a number of minutes equal to their Constitution score (14), after which they begin drowning. ACTIONS Multiattack. The skum makes two attacks: one with its bite and one with its claw. Underwater, the skum makes a bite, claw, and tail slap attack. Bite. Melee Weapon Attack: +6 to hit, reach 5 ft., one target. Hit: 8 (1d8+4) piercing damage. Claw. Melee Weapon Attack: +6 to hit, reach 5 ft., one target. Hit: 6 (1d4+4) piercing damage. Tail Slap. Melee Weapon Attack: +6 to hit, reach 5 ft., one target. Hit: 6 (1d4+4) bludgeoning damage. 4. With the “Skum” token selected, in the Chat dialogue I enter !shaped-import . 5. I receive the message that the “Skum” has been updated. It has Hit Points and AC where they should be, and the Init macro. However it has no attack macros. EDIT: And to confirm this wasn't a fluke from it being a custom-made monster, I copy-pasted the Bandit's stat block (without any editing whatsoever) and got the same result: AC and HP where they should be, and an Init macro, but no other macros. BANDIT Medium humanoid (any race), any non-lawful alignment Armor Class 12 (leather armor) Hit Points 11 (2d8 + 2) Speed 30ft. STR 11 (;t-0) DEX 12 (+1) CON 12 (+1) Senses passive Perception 10 INT 10 (+0) WIS 10 (+0) Languages any one language (usually Common) Challenge 1/8 (25 XP) ACTIONS CHA 10 .(:tO) Scimitar. Melee Weapon Attack: +3 to hit, reach 5 ft., one' target. Hit: 4 (1d6 + 1) slashing damage. Light Crossbow. Ranged Weapon Attack: +3 to hit, range 80 ft./320ft., one target. Hit: 5 (1d8 + 1) piercing damage.
1438669896

Edited 1438675116
Kryx
Pro
Sheet Author
API Scripter
Stats need to be on the token in GM notes, not the journal. The journal and sheet will be created for you - the only thing you'll have to do is link the token.
Mark said: Stats need to be on the token in GM notes, not the journal. The journal and sheet will be created for you - the only thing you'll have to do is link the token. Yes, I put stats in the token's GM notes in Step #3 screenshot. That second part I don't understand. In order to link the token via "Represents Character" I need to create a character entry in the journal, otherwise there is no character to link to!
1438677805
Ziechael
Forum Champion
Sheet Author
API Scripter
Mark said: you'll have to do is link the token. Not wanting to butt in, but from the wording it suggests that Mark is saying that you run it on a token with the info in the GM notes, it will then create a sheet/journal and populate it for you.. after which the only thing you'll need to do it link the token to the newly created sheet. Please correct me if i'm wrong Mark. Have you tried running it on a non linked token Aaron?
1438678618

Edited 1438678666
Kryx
Pro
Sheet Author
API Scripter
He did put it in the right place now that I look at it while not on my phone. But he doesn't need to do step 1. Importing will create the sheet. I'll test skum, but I'm pretty sure it's going to work. Bandit has an issue with charisma that would need to be fixed. Aaron, can you copy tour API log please?
Ziechael said: Mark said: you'll have to do is link the token. Not wanting to butt in, but from the wording it suggests that Mark is saying that you run it on a token with the info in the GM notes, it will then create a sheet/journal and populate it for you.. after which the only thing you'll need to do it link the token to the newly created sheet. Please correct me if i'm wrong Mark. Have you tried running it on a non linked token Aaron? Ah there it is. :) Thanks!
Mark said: He did put it in the right place now that I look at it while not on my phone. But he doesn't need to do step 1. Importing will create the sheet. I'll test skum, but I'm pretty sure it's going to work. Bandit has an issue with charisma that would need to be fixed. Aaron, can you copy tour API log please? I don't know how to get a copy of the API log...but remember it's my friend who is the subscriber, not me. It actually worked doing it without any sheet. I'm going to try a few more and see it that holds true, but it looks like I got it now. Thanks for following up with me, much appreciated :)
Ah crap, nevermind. I just tried converting the Commoner (simplest stat block), and got the same problem. HP/AC convert fine, so does Init, but no attack macro. Here's the stat block: COMMONER Medium humanoid (any race), any alignment Armor Class 10 Hit Points 4 (1d8) Speed 30ft. STR 10 (+0) DEX 10 (+0) CON 10 (+0) INT 10 (+0) WIS 10 (+0) CHA 10 (+0) Senses passive Perception 10 Languages any one language (usually Common) Challenge 0 (10 XP) ACTIONS Club. Melee Weapon Attack: +2 to hit, reach 5 ft., one target. Hit: 2 (1d4) bludgeoning damage.
1438681473
Kryx
Pro
Sheet Author
API Scripter
I just tested commoner and it imported perfectly for me. Club is under actions. Without API logs there isn't much more I can do.
1438690651
Ziechael
Forum Champion
Sheet Author
API Scripter
Aaron, on the game (formerly campaign) page there should be a settings drop down, in there should be an API scripts option, if you go there then get the game open in another tab you can run the script to import a stat-block, any errors recorded will be logged in the API console towards the bottom, copy and paste anything from there that suggests an error. I hope that helps...
Here's the latest API log my friend sent to me: "---- Parsing statblock ----" "parsed statblock: GUARD#Medium humanoid (any race), any alignment#Armor Class 16 (chain shirt, shield)#Hit Points 11 (2d8 + 2)#Speed 30 ft#STR 13 (+1)#DEX 12 (+1)#CON 12 (+1)#INT 10 (+0)#WIS 11 (+0)#CHA 10 (+0) #Skills Perception +2#Senses passive Perception 12#Languages any one language (usually Common)#Challenge 1/8 (25 XP)#ACTIONS#Spear. Melee or Ranged Weapon Attack: +3 to hit, reach 5 ft or range 20/60 ft, one target. Hit: 4 (1d6 + 1) piercing damage." "section.actions" {"Spear":"Melee or Ranged Weapon Attack: +3 to hit, reach 5 ft or range 20/60 ft, one target. Hit: 4 (1d6 + 1) piercing damage."} "Ability Init created" "value" "Melee or Ranged Weapon Attack: +3 to hit, reach 5 ft or range 20/60 ft, one target. Hit: 4 (1d6 + 1) piercing damage." "Spear" "key 2" "Spear" "Ability Spear created" "bar1: setting link to: -JvrsNKxxcjAH5nBtSiI" "bar1: setting current to: 16" "bar2: no defined bar setting in shaped-scripts (at the top of the page), clearing bar2." "bar3: setting current to: 11" "bar3: setting max to: 11" "Guard updated" "Token does not represent a character" "Still working after trying to roll hp" "msg.content: !shaped-import" "---- Parsing statblock ----" "parsed statblock: Skum#Medium humanoid, lawful evil#Armor Class 12#Hit Points 26 (4d8+8)#Speed 15 ft, swim 35 ft#STR 18 (+4)#DEX 14 (+2)#CON 14 (+2)#INT 6 (-2)#WIS 6 (-2)#CHA 3 (-4)#Damage Vulnerabilities psychic#Senses darkvision 60 ft, tremorsense 60 ft (underwater only), passive Perception 8#Languages limited telepathy with other skum and its aberration masters 60 ft#Challenge 1/2 (XP 100)#Aberration Thrall. While in the presence of a master aberration, skum are immune to fear and charm effects from non-aberrations.#Slippery. Skum have advantage on their Strength (Athletics) or Dexterity (Acrobatics) checks to escape a grapple.#Water Breathing. Skum can only breathe air for a number of minutes equal to their Constitution score (14), after which they begin drowning.#ACTIONS#Multiattack. The skum makes two attacks: one with its bite and one with its claw. Underwater, the skum makes a bite, claw, and tail slap attack.#Bite. Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 8 (1d8+4) piercing damage.#Claw. Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 6 (1d4+4) piercing damage.#Tail Slap. Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 6 (1d4+4) bludgeoning damage." "section.actions" {"Multiattack":"The skum makes two attacks: one with its bite and one with its claw. Underwater, the skum makes a bite, claw, and tail slap attack.","Bite":"Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 8 (1d8+4) piercing damage.","Claw":"Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 6 (1d4+4) piercing damage.","Tail Slap":"Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 6 (1d4+4) bludgeoning damage."} "Ability Init created" "Ability MultiAtk created" "value" "Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 8 (1d8+4) piercing damage." "Bite" "key 2" "Bite" "Ability Bite created" "value" "Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 6 (1d4+4) piercing damage." "Claw" "key 2" "Claw" "Ability Claw created" "value" "Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 6 (1d4+4) bludgeoning damage." "Tail Slap" "key 2" "Tail Slap" "Ability Tail Slap created" "bar1: setting link to: -JvrufenZP78LEquAzIS" "bar1: setting current to: 12" "bar2: no defined bar setting in shaped-scripts (at the top of the page), clearing bar2." "bar3: setting current to: 26" "bar3: setting max to: 26" "Skum updated" "Token does not represent a character" "Still working after trying to roll hp" "msg.content: !shaped-import" "---- Parsing statblock ----" "parsed statblock: Skum#Medium humanoid, lawful evil#Armor Class 12#Hit Points 26 (4d8+8)#Speed 15 ft, swim 35 ft#STR 18 (+4)#DEX 14 (+2)#CON 14 (+2)#INT 6 (-2)#WIS 6 (-2)#CHA 3 (-4)#Damage Vulnerabilities psychic#Senses darkvision 60 ft, tremorsense 60 ft (underwater only), passive Perception 8#Languages limited telepathy with other skum and its aberration masters 60 ft#Challenge 1/2 (XP 100)#Aberration Thrall. While in the presence of a master aberration, skum are immune to fear and charm effects from non-aberrations.#Slippery. Skum have advantage on their Strength (Athletics) or Dexterity (Acrobatics) checks to escape a grapple.#Water Breathing. Skum can only breathe air for a number of minutes equal to their Constitution score (14), after which they begin drowning.#ACTIONS#Multiattack. The skum makes two attacks: one with its bite and one with its claw. Underwater, the skum makes a bite, claw, and tail slap attack.#Bite. Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 8 (1d8+4) piercing damage.#Claw. Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 6 (1d4+4) piercing damage.#Tail Slap. Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 6 (1d4+4) bludgeoning damage." "section.actions" {"Multiattack":"The skum makes two attacks: one with its bite and one with its claw. Underwater, the skum makes a bite, claw, and tail slap attack.","Bite":"Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 8 (1d8+4) piercing damage.","Claw":"Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 6 (1d4+4) piercing damage.","Tail Slap":"Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 6 (1d4+4) bludgeoning damage."} "value" "Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 8 (1d8+4) piercing damage." "Bite" "key 2" "Bite" "value" "Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 6 (1d4+4) piercing damage." "Claw" "key 2" "Claw" "value" "Melee Weapon Attack: +6 to hit, reach 5 ft, one target. Hit: 6 (1d4+4) bludgeoning damage." "Tail Slap" "key 2" "Tail Slap" "bar1: setting link to: -JvrufenZP78LEquAzIS" "bar1: setting current to: 12" "bar2: no defined bar setting in shaped-scripts (at the top of the page), clearing bar2." "bar3: setting current to: 26" "bar3: setting max to: 26" "Skum updated" "msg.content: !shaped-import" "---- Parsing statblock ----" "parsed statblock: COMMONER# Medium humanoid (any race), any alignment# Armor Class 10# Hit Points 4 (1d8)# Speed 30ft# STR# 10 (+0)# DEX# 10 (+0)# CON# 10 (+0)# Senses passive Perception 10# INT# 10 (+0)# WIS# 10 (+0)# Languages any one language (usually Common)# Challenge 0 (10 XP)# ACTIONS# CHA# 10 (+0)# Club. Melee Weapon Attack: +2 to hit, reach 5 ft, one target.# Hit: 2 (1d4) bludgeoning damage.#" "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." "Error setting empty value: charisma" "section.actions" {} "Ability Init created" "bar1: setting link to: -Jvrw4s4d_4nsUYTRS10" "bar1: setting current to: 10" "bar2: no defined bar setting in shaped-scripts (at the top of the page), clearing bar2." "bar3: setting current to: 4" "bar3: setting max to: 4" "Commoner created" "Still working after trying to roll hp"
And then for the bandit, which worked for him but produced 2 sheets: BANDIT Medium humanoid (any race), any non-lawful alignment Armor Class 12 (leather armor) Hit Points 11 (2d8 + 2) Speed 30ft. STR 11 (;t-0) DEX 12 (+1) CON 12 (+1) Senses passive Perception 10 INT 10 (+0) WIS 10 (+0) Languages any one language (usually Common) Challenge 1/8 (25 XP) ACTIONS CHA 10 .(:tO) Scimitar. Melee Weapon Attack: +3 to hit, reach 5 ft., one' target. Hit: 4 (1d6 + 1) slashing damage. Light Crossbow. Ranged Weapon Attack: +3 to hit, range 80 ft./320ft., one target. Hit: 5 (1d8 + 1) piercing damage. "---- Parsing statblock ----" "parsed statblock: BANDIT#Medium humanoid (any race), any non-lawful alignment#Armor Class 12 (leather armor)#Hit Points 11 (2d8 + 2)#Speed 30ft#STR#11 (;t-0)#DEX#12 (+1)#CON#12 (+1)#Senses passive Perception 10#INT#10 (+0)#WIS#10 (+0)#Languages any one language (usually Common)#Challenge 1/8 (25 XP)#ACTIONS#CHA#10.(:tO)#Scimitar. Melee Weapon Attack: +3 to hit, reach 5 ft, one' target. Hit: 4 (1d6 + 1) slashing damage.#Light Crossbow. Ranged Weapon Attack: +3 to hit, range 80 ft/320ft, one target. Hit: 5 (1d8 + 1) piercing damage.#" "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." "Error setting empty value: charisma" "section.actions" {"Scimitar":"Melee Weapon Attack: +3 to hit, reach 5 ft, one' target. Hit: 4 (1d6 + 1) slashing damage.","Light Crossbow":"Ranged Weapon Attack: +3 to hit, range 80 ft/320ft, one target. Hit: 5 (1d8 + 1) piercing damage. "} "Ability Init created" "value" "Melee Weapon Attack: +3 to hit, reach 5 ft, one' target. Hit: 4 (1d6 + 1) slashing damage." "Scimitar" "key 2" "Scimitar" "Ability Scimitar created" "value" "Ranged Weapon Attack: +3 to hit, range 80 ft/320ft, one target. Hit: 5 (1d8 + 1) piercing damage. " "Light Crossbow" "key 2" "Light Crossbow" "Ability Light Crossbow created" "bar1: setting link to: -JvthitWpKWCHaPMPD_V" "bar1: setting current to: 12" "bar2: no defined bar setting in shaped-scripts (at the top of the page), clearing bar2." "bar3: setting current to: 11" "bar3: setting max to: 11" "Bandit created"
And the troglodyte, with an "unexpected end to input": TROGLODYTE Medium humanoid (troglodyte), chaotic evil Armor Class 11 (natural armor) Hit Points 13 (2d8 + 4) Speed 30ft. STR 14 (+2) DEX 10 (+0) Skills Stealth +2 CON 14 (+2) INT 6 (-2) WIS 10 (+0) Senses darkvision 60ft., passive Perception 10 Languages Troglodyte Challenge 1/4 (SO XP) CHA 6 (-2) Chameleon Skin. The troglodyte has advantage on Dexterity (Stealth) checks made to hide. Stench. Any creature other than a troglodyte that starts its turn within 5 feet of the troglodyte must succeed on a DC 12 Constitution saving throw or be poisoned until the start of the creature's next turn. On a successful saving throw, the creature is immune to the stench of all troglodytes for 1 hour. Sunlight Sensitivity. While in sunlight, the troglodyte has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight. ACTIONS Multiattack. The troglodyte makes three attacks: one with its bite and two with its claws. Bite. Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 4 (1d4 + 2) piercing damage. Claw. Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 4 (1d4 + 2) slashing damage. "---- Parsing statblock ----" "parsed statblock: TROGLODYTE#Medium humanoid (troglodyte), chaotic evil#Armor Class 11 (natural armor)#Hit Points 13 (2d8 + 4)#Speed 30ft#STR#14 (+2)#DEX#10 (+0)#Skills Stealth +2#CON#14 (+2)#INT#6 (-2)#WIS#10 (+0)#Senses darkvision 60ft, passive Perception 10#Languages Troglodyte#Challenge 1/4 (SO XP)#CHA#6 (-2)#Chameleon Skin. The troglodyte has advantage on Dexterity#(Stealth) checks made to hide.#Stench. Any creature other than a troglodyte that starts its turn within 5 feet of the troglodyte must succeed on a DC 12#Constitution saving throw or be poisoned until the start of the creature's next turn. On a successful saving throw, the creature is immune to the stench of all troglodytes for 1 hour.#Sunlight Sensitivity. While in sunlight, the troglodyte has disadvantage on attack rolls, as well as on Wisdom#(Perception) checks that rely on sight.#ACTIONS#Multiattack. The troglodyte makes three attacks: one with its bite and two with its claws.#Bite. Melee Weapon Attack: +4 to hit, reach 5 ft, one target.Hit: 4 (1d4 + 2) piercing damage.#Claw. Melee Weapon Attack: +4 to hit, reach 5 ft, one target.Hit: 4 (1d4 + 2) slashing damage.#" {} "Parsing was incomplete due to error(s)" "SyntaxError: Unexpected end of input"
1438724115

Edited 1438724364
The only other API code I know we're using are: 5e-shaped-scripts.js / SpellManager / Spell Array PowerCardInfo RandomEncounters.js
1438724628
Kryx
Pro
Sheet Author
API Scripter
Aaron I. said: Here's the latest API log my friend sent to me: "Error setting empty value: charisma" Charisma was not set properly. Fix that and you'll fix the import. Same problem with Bandit - I mentioned this earlier. The trog has "SO XP". change that to 50 and it works. The parser is pretty good, but if you're encountering errors you need to try to clean up your import text - the book doesn't give great text. The Bandit for example has "10 .(:tO)" for charisma. You should obviously fix that.
1438724785

Edited 1438725067
Ziechael said: Aaron, on the game (formerly campaign) page there should be a settings drop down, in there should be an API scripts option, if you go there then get the game open in another tab you can run the script to import a stat-block, any errors recorded will be logged in the API console towards the bottom, copy and paste anything from there that suggests an error. I hope that helps... I think that is just part of the problem: often, no errors are appearing. While I was able to get past logs from my friend (see above), I also did exactly as you instructed. Joined the Game and opened Settings &gt; API Code simultaneously. Placed a token. In its GM Notes entered stats for Commoner. Ran !shaped-import. It produced AC/HP and Init, but no attack macros . No error was logged, the API Output Console just reads: "Commoner updated"
1438725376

Edited 1438725636
Kryx
Pro
Sheet Author
API Scripter
Aaron I. said: I think that is just part of the problem: often, no errors are appearing. While I was able to get past logs from my friend (see above), I also did exactly as you instructed. Joined the Game and opened Settings &gt; API Code simultaneously. Placed a token. In its GM Notes entered stats for Commoner. Ran !shaped-import. It produced AC/HP and Init, but no attack macros . No error was logged, the API Output Console just reads: "Commoner updated" There were errors - go look at the log you posted. The charisma errored out. There is a huge difference between Skum (which) worked, and Commoner (which didn't): Skum: parsed statblock: Skum#Medium humanoid, lawful evil#Armor Class 12#Hit Points 26 (4d8+8)#Speed 15 ft, swim 35 ft#STR 18 (+4)#DEX 14 (+2)#CON 14 (+2)#INT 6 (-2)#WIS 6 (-2)#CHA 3 (-4) Commoner: parsed statblock: COMMONER# Medium humanoid (any race), any alignment# Armor Class 10# Hit Points 4 (1d8)# Speed 30ft# STR# 10 (+0)# DEX# 10 (+0)# CON# 10 (+0) The whole commoner block is messed up. It seems you have spaces at the beginning of every line - not sure how that happens. Are you using word or something? I suggest you use notepad, notepad++ or some text editor that doesn't add formatting.
Mark said: Aaron I. said: Here's the latest API log my friend sent to me: "Error setting empty value: charisma" Charisma was not set properly. Fix that and you'll fix the import. Same problem with Bandit - I mentioned this earlier. The trog has "SO XP". change that to 50 and it works. The parser is pretty good, but if you're encountering errors you need to try to clean up your import text - the book doesn't give great text. The Bandit for example has "10 .(:tO)" for charisma. You should obviously fix that. Mark-- I know exactly what you mean, but that doesn't work, and let me explain... I've tried the Troglodyte (and many other monsters) multiple times with cleaned text (esp. XP, Charisma, and skills). Since every time I cleaned up the text I was getting the same dang problem, I thought "what if don't &nbsp;clean up the text, maybe that will make a positive difference?" Well, of course it didn't. So I just re-tested the way I'd been entering the Troglodyte many times before: with cleaned text (posted below). No errors in the API Console Output. However, the Troglodyte is created without any attack macros . Again, HP/AC and Init are fine, just there are no attack macros. Cleaned Text for the Troglodyte (Try #9): TROGLODYTE Medium humanoid (troglodyte), chaotic evil Armor Class 11 (natural armor) Hit Points 13 (2d8 + 4) Speed 30ft. STR 14 (+2) DEX 10 (+0) CON 14 (+2) INT 6 (-2) WIS 10 (+0) CHA 6 (-2) Skills Stealth +2 Senses darkvision 60ft., passive Perception 10 Languages Troglodyte Challenge 1/4 (50 XP) Chameleon Skin. The troglodyte has advantage on Dexterity (Stealth) checks made to hide. Stench. Any creature other than a troglodyte that starts its turn within 5 feet of the troglodyte must succeed on a DC 12 Constitution saving throw or be poisoned until the start of the creature's next turn. On a successful saving throw, the creature is immune to the stench of all troglodytes for 1 hour. Sunlight Sensitivity. While in sunlight, the troglodyte has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight. ACTIONS Multiattack. The troglodyte makes three attacks: one with its bite and two with its claws. Bite. Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 4 (1d4 + 2) piercing damage. Claw. Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 4 (1d4 + 2) slashing damage.
1438725815
Kryx
Pro
Sheet Author
API Scripter
I just tested it and it works perfectly fine. "msg.content: !shaped-import --clean" "old sheet removed before importing" "---- Parsing statblock ----" "parsed statblock: TROGLODYTE#Medium humanoid (troglodyte), chaotic evil#Armor Class 11 (natural armor)#Hit Points 13 (2d8 + 4)#Speed 30ft#STR#14 (+2)#DEX#10 (+0)#CON#14 (+2)#INT#6 (-2)#WIS#10 (+0)#CHA#6 (-2) #Skills Stealth +2#Senses darkvision 60ft, passive Perception 10#Languages Troglodyte#Challenge 1/4 (50 XP)#Chameleon Skin. The troglodyte has advantage on Dexterity#(Stealth) checks made to hide.#Stench. Any creature other than a troglodyte that starts its turn within 5 feet of the troglodyte must succeed on a DC 12#Constitution saving throw or be poisoned until the start of the creature's next turn. On a successful saving throw, the creature is immune to the stench of all troglodytes for 1 hour.#Sunlight Sensitivity. While in sunlight, the troglodyte has disadvantage on attack rolls, as well as on Wisdom#(Perception) checks that rely on sight.#ACTIONS#Multiattack. The troglodyte makes three attacks: one with its bite and two with its claws.#Bite. Melee Weapon Attack: +4 to hit, reach 5 ft, one target.Hit: 4 (1d4 + 2) piercing damage.#Claw. Melee Weapon Attack: +4 to hit, reach 5 ft, one target.Hit: 4 (1d4 + 2) slashing damage." "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." "section.actions" {"Multiattack":"The troglodyte makes three attacks: one with its bite and two with its claws.","Bite":"Melee Weapon Attack: +4 to hit, reach 5 ft, one target.Hit: 4 (1d4 + 2) piercing damage.","Claw":"Melee Weapon Attack: +4 to hit, reach 5 ft, one target.Hit: 4 (1d4 + 2) slashing damage."} "Ability Init created" "Ability MultiAtk created" "value" "Melee Weapon Attack: +4 to hit, reach 5 ft, one target.Hit: 4 (1d4 + 2) piercing damage." "Bite" "key 2" "Bite" "Ability Bite created" "value" "Melee Weapon Attack: +4 to hit, reach 5 ft, one target.Hit: 4 (1d4 + 2) slashing damage." "Claw" "key 2" "Claw" "Ability Claw created" "bar1: setting link to: -JvujA0DxSeQlzBb4MLn" "bar1: setting current to: 11" "bar2: no defined bar setting in shaped-scripts (at the top of the page), clearing bar2." "bar3: setting current to: 13" "bar3: setting max to: 13" "Troglodyte created" Please copy you API log. If it's the same as above then I think there is something inherently wrong with your process that is adding spaces at the beginning of every line.
"---- Parsing statblock ----" "parsed statblock: COMMONER# Medium humanoid (any race), any alignment# Armor Class 10# Hit Points 4 (1d8)# Speed 30ft# STR# 10 (+0)# DEX# 10 (+0)# CON# 10 (+0)# INT# 10 (+0)# WIS# 10 (+0)# CHA# 10 (+0)# Senses passive Perception 10# Languages any one language (usually Common)# Challenge 0 (10 XP)# ACTIONS# Club. Melee Weapon Attack: +2 to hit, reach 5 ft, one target.# Hit: 2 (1d4) bludgeoning damage.#" "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." "section.actions" {} "Ability Init created" "bar1: setting link to: -JvujosAbzSkF5fEGO7I" "bar1: setting current to: 10" "bar2: no defined bar setting in shaped-scripts (at the top of the page), clearing bar2." "bar3: setting current to: 4" "bar3: setting max to: 4" "Commoner created"
1438726165

Edited 1438726242
By API log you mean copy-pasting from the API Output Console like @Ziechael describes, correct? Above is my latest try at the Commoner (yes, with cleaned text). I bolded the error message, though I'm not sure why I'd be getting that, since the token image is of course in my Roll20 Library.
1438726319
Kryx
Pro
Sheet Author
API Scripter
Mark said: there is something inherently wrong with your process that is adding spaces at the beginning of every line. This is the issue. You can see the difference between my log and yours - yours all have a space after the # However you're copying adds a space before each line.
I see it too. Thanks. I'm copying from a PDF using Acrobat DC, then pasting into TextEdit (a simple richtext editor). Is there an "industry standard" for cleaning text for parsing I should be using?
1438727162
Kryx
Pro
Sheet Author
API Scripter
Any text editor should work. Perhaps try using Shift+tab to remove any indentation.
I will definitely try that out, thank you Mark. Unfortunately, I seem to have triggered an error that disabled our scripts, so I'll wait until my friend can attend to the API properly. /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 ^ Error: Firebase.update failed: First argument contains undefined in property 'bar1_value' at Error (&lt;anonymous&gt;) at Ba (/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:9:49) at Ba (/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:207) at Aa (/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:8:462) at Ea (/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:403) at H.J.update (/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:146:318) at TrackedObj._doSave (
1438728582
Kryx
Pro
Sheet Author
API Scripter
If you're doing API work you might want to have him make you a GM - at least temporarily.
1438739784

Edited 1438739876
He did make me the GM, but I wouldn't dare go near modifying API code! I wouldn't know what I was doing really, and would probably botch things up. Copy-pasting it is about as far as I should get into working with API code. And Mark, I wanted to give you a shout out for helping me figure out what the problem was (spaces appearing in my copy-paste stat blocks). You really went above the call for troubleshooting something that was on the user end (my fault) and not a problem at all with your code. I'm confident between myself and some of the more tech savvy player we can figure out a way to stop/remove those spaces. The professionalism and courtesy of folks on Roll20 I've met so far is impressive. If there was a way to give you XP/reputation or vote for your code I would absolutely do that.&nbsp;
Mark -- I wanted to give you an update. My friend figured out that the problem had to do with Mac's Linux line endings, versus Windows's line endings (the latter which your script is written for). This is where my "phantom" spaces were coming from. He tweaked a few things in our code to convert Linux line endings to Windows, and it's working great. I think he's forking your code on github and sending you a pull request. Thanks again!