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

1431350556
The Aaron
Pro
API Scripter
Also, I'm pretty sure Stephen S. wrote a spell importer for 5e already.
1431351020
Kryx
Pro
Sheet Author
API Scripter
From what I remember him writing it was abandoned and doesn't work.
Hmmm okay fair enough then, I'v read a few people using it but using it alongside of buttons from created spellpage too which sorta defeats the point if you can just press the button to read it etc. I suppose it doesn't matter really in the end. It was mostly just to make the ease of adding spells into the game more quickly tis all. Thanks anyways. :) I'll have a look into making an easier way myself somehow.
1431358414
Kryx
Pro
Sheet Author
API Scripter
I wish I had a good solution for spells. The only thing I can think of is creating a journal item with the RAW data of all spells and then the user selects his token and imports a spell by name which pulls from that journal.
1431362122
The Aaron
Pro
API Scripter
That's vaguely how Stephen's script worked, though the dataset was in the JS.
Mark, thats what I have been more or less been setting up in my game. When the character sheet starts to get full with spells from repeating macros, it starts to lag pretty hard. (I tried to just write the first letter to every spell for wizards as place-holders, not a wise idea). Right now I made an excel sheet in which I can do a 3-step process to move a spell over into the abilities while keeping to templates. Unfortunately it obviously doesn't fully and perfectly parse things but it saves alot of typing and time. I use Aarons CharUtils to import the spells from another sheet into the players. They can tick them as they see fit to identify that they are "prepared". Which will also show as a button and I find this a far more satisfying tracker. True I might need to click the button to remember the details etc, but the spells name is usually self-explanatory or reminding enough.
1431370820

Edited 1431374111
Saevar L. said: Mark, thats what I have been more or less been setting up in my game. When the character sheet starts to get full with spells from repeating macros, it starts to lag pretty hard. (I tried to just write the first letter to every spell for wizards as place-holders, not a wise idea). Right now I made an excel sheet in which I can do a 3-step process to move a spell over into the abilities while keeping to templates. Unfortunately it obviously doesn't fully and perfectly parse things but it saves alot of typing and time. I use Aarons CharUtils to import the spells from another sheet into the players. They can tick them as they see fit to identify that they are "prepared". Which will also show as a button and I find this a far more satisfying tracker. True I might need to click the button to remember the details etc, but the spells name is usually self-explanatory or reminding enough. Char Util's why have I not heard of this. I have used Stephen's spell importer it does work, but it only has the free spells that WotC released and in order to add additional spells you need to parse, and cut/paste and change the json file. It works but its not very elegant. It also setups up the macros for power cards, which is nice if you are using them, but i've switched over the default templates. Stephens was a 3 step process. 1 Create a Table with all the spells that are available to that Class. Then you simply go into the table and change the weights (1 is spell book, 2 is spell book and macro activated, and 0 is ignore), then you process another script that changes those values and finally process the final command to import it into the character sheet / macros.
Char Utils is amazing for just storing abilities and dumping them into new NPCs etc :)
1431376518
The Aaron
Pro
API Scripter
Thanks!
Ok So i love this script it is a major time saver but i am running into an issue. When i try to import spell casters the spells won't import. I have had luck with only 1 spell caster import so far and it was the Acolyte. I am currently trying to do this NPC. This is what it looks like after any gramatical and formatting errors. I dont understand why I only ever got the one spell caster to import correctly Please Help ARCHMAGE Medium humanoid (any race), any alignment Armor Class 12 (1 5 with mage armor) Hit Points 99 (18d8 + 18) Speed 30ft. STR 10 (+0) DEX 14 (+2) CON 12 (+1) INT 20 (+5) WIS 15 (+2) CHA 16 (+3) Saving Throws lnt +9, Wis +6 Skills Arcana +13, History +13 Damage Resistance damage from spells; non magical bludgeoning, piercing, and slashing (from stoneskin) Senses passive Perception 12 Languages any six languages Challenge 12 (8,400 XP) Magic Resistance. The arch mage has advantage on saving throws against spells and other magical effects. Spellcasting. The archmage is an 18th-level spellcaster. Its spellcasting ability is Intelligence (spell save DC 17, +9 to hit with spell attacks). The arch mage can cast disguise self and invisibility at will and has the following wizard spells prepared: Cantrips (at will):fire bolt, light, mage hand, prestidigitation, shocking grasp 1st level (4 slots): detect magic, identify, mage armor, magic missile 2nd level (3 slots): detect thoughts, mirror image, misty step 3rd level (3 slots): counterspell,fly, lightning bolt 4th level (3 slots): banishment, fire shield, stoneskin 5th level (3 slots): cone of cold, scrying, wall of force 6th level (1 slot): globe of invulnerability 7th level (1 slot): teleport 8th level (1 slot): mind blank 9th level (1 slot): time stop ACTIONS Dagger. Melee or Ranged Weapon Attack: +6 to hit, reach 5 ft. or range 20/60 ft., one target. Hit: 4 (ld4 + 2) piercing damage.
1431637950
Kryx
Pro
Sheet Author
API Scripter
Spells do not import. I'd have to write a spell importer for everyone. It's on my TODO list eventually.
ok i just realized i updated a PC sheet using the importer for a character i made and i manually put the spells in. That would be awesome I have been looking for a spell importer but have yet to actually find one anywhere in the forums. Thanks for the quick reply Mark
1431639646
Kryx
Pro
Sheet Author
API Scripter
Stephen S apparently has one, but from what I saw it wasn't simple.
There's quite a few that you could get no problem in terms of legal trouble and having to have some sort of standard, EE, UA and the ones in the basic rules: <a href="http://dnd.wizards.com/products/tabletop/players-b" rel="nofollow">http://dnd.wizards.com/products/tabletop/players-b</a>... Fair few of them are quite popular, so some sort of API that has all of the EE, etc spells in it could function without having to work out how to parse all of the hundreds of spells by code.
1431699981

Edited 1432375859
Kryx
Pro
Sheet Author
API Scripter
15th May 2015 (1.76) Allow for multiple hit dice Exmaple: 69 (8d8+1d10+28) will now add 8 d8s and 1 d10.
1431806188
Kryx
Pro
Sheet Author
API Scripter
16th May 2015 (1.77) Prevent some uncaught errors for certain weird syntaxes Allow for recharges on a short or long rest Fixed multiattack for werecreatures
1432316201
Kryx
Pro
Sheet Author
API Scripter
22nd May 2015 (1.78) Added a function to decrease ammo when it is used.
1432819302
Kryx
Pro
Sheet Author
API Scripter
28th May 2015 (1.79) Added setting to show bar 1-3
I've been using this script to populate my game recently, and my only issue is statblocks. I've basically been taking the one format I know parses, and manually typing in data to it. But there has to be a better system, right? At the very least a place to copy the text from?
1432880275
Kryx
Pro
Sheet Author
API Scripter
The monster manual. Paste a statblock here if you're having trouble with it parsing.
If I'm understanding what he is saying, it's that he is manually typing it from the physical Monster Manual book.
1432903232
Kryx
Pro
Sheet Author
API Scripter
If you're going to type it then you might as well type it directly in the sheet. The script only works if you follow the mm format. it doesn't add anything else.
1432923496

Edited 1432923587
Hey @Mark I'm interested in trying the ammo decreasing function but I'm fuzzy on how to supply the {{auto_ammo}} and {{ammo_field}} properties to the template. I must be missing something obvious?? help?
1432924710
Kryx
Pro
Sheet Author
API Scripter
Ed, under weapons you must turn on range, ammo, and auto. On the script you have to have the setting turned on at the top of the script. (set it to true)
Mark said: Ed, under weapons you must turn on range, ammo, and auto. OK, I'm looking at the 5e shaped sheet Apr 25th version and I see each ranged weapon has an ammo count and range fields, but I don't think that's what you're talking about. I'm still hopelessly lost!
1432926494
Kryx
Pro
Sheet Author
API Scripter
Ed B. said: Apr 25th version There is your problem.
Mark said: Ed B. said: Apr 25th version There is your problem. That was it! I assume ammo decreasing will work OK for NPCs, I have to flip over to the Player version of the sheet to use it, but switching betwen NPC&lt;--&gt;Player tabs won't create any conflicts/instability?
1432930147
Kryx
Pro
Sheet Author
API Scripter
Ed B. said: That was it! I assume ammo decreasing will work OK for NPCs, I have to flip over to the Player version of the sheet to use it, but switching betwen NPC&lt;--&gt;Player tabs won't create any conflicts/instability? The weapons page is only usable by those who have the PC tab activated. If you want to have NPCs swap between the two you can. Some things change like proficiency so be wary of that.
Mark said: The monster manual. Paste a statblock here if you're having trouble with it parsing. Being that there's no PDF version monster manual, only scans, text doesn't copy and paste very well.
1433010154
Kryx
Pro
Sheet Author
API Scripter
Askren said: Being that there's no PDF version monster manual, only scans, text doesn't copy and paste very well. It copies with about a 95% accuracy. I also sanitize out most of the common errors.
1435110761
Lucian
Pro
API Scripter
Hi, Many thanks for all your work on this - it's really useful. After playing around for a little while, I had a couple of questions/requests: Is there are a reason why the Token Actions it creates use the name of the character rather than %{selected|XXX} ? This is probably my ignorance of the implications of this, but I can't see how you could use a Token Action without it being selected, and not coding the name of the character into the macro will obviously make it less fragile (I found this out when I changed the name of one of the imported characters when an import didn't work quite perfectly (The assassin/bandit page of the MM PDF I'm using is very broken) Is there any chance we could have Target vs AC included as an option in the import script? I like having this on and it would be handy not to have to set it manually for each new character sheet. Many thanks, Lucian
1435132143
Kryx
Pro
Sheet Author
API Scripter
Selected only works if you have the token selected. It wouldn't work if you're accessing the sheet directly (instead of token actions) and it wouldn't work on mobile. If the name fails to import I'd suggest reimporting after making changes. Names are quite important to get right. I can indeed add this setting.
1435337260

Edited 1435337285
I would request if possible a heal all command to heal all tokens on a layer on a map. After I've finished with a map I like to put it all back in place and manually healing everything on the map can take a while. I don't know if that's out of the scope of this converter though but since it changes the HP with the randomHP stuff seems like it would know what the HP is.
1435355564
Kryx
Pro
Sheet Author
API Scripter
Healing all tokens isn't really within the scope of this script. This script is meant to handle a few things: Converting from the old script Importing Rolling HP of creatures Ammo Counting Any other 5e related common things It could be done here, but I don't think a utility script like that really belongs here. Rolling HP is even questionable, but it was on this script when I took it over from the old version.
Mark said: Healing all tokens isn't really within the scope of this script. This script is meant to handle a few things: Converting from the old script Importing Rolling HP of creatures Ammo Counting Any other 5e related common things It could be done here, but I don't think a utility script like that really belongs here. Rolling HP is even questionable, but it was on this script when I took it over from the old version. And eventually importing PCs :)
@Mark, What about a setting to show names on all of the NPCs? Also a script would be most appreciated by someone that I could flag the PC / NPC sheets from Public to Hidden, from Hidden to Public and Names on to Names off, rather than having to modify everyone. It could be as simple as Show All PC / NPC Names? Yes Show All PC / NPC Rolls? No (Hidden) Maybe this is more a request for The Aaron's CharMod but thought i'd throw it out there.
1435416833
Kryx
Pro
Sheet Author
API Scripter
Greg B. said: @Mark, What about a setting to show names on all of the NPCs? sure Greg B. said: Also a script would be most appreciated by someone that I could flag the PC / NPC sheets from Public to Hidden, from Hidden to Public and Names on to Names off, rather than having to modify everyone. It could be as simple as Show All PC / NPC Names? Yes Show All PC / NPC Rolls? No (Hidden) Maybe this is more a request for The Aaron's CharMod but thought i'd throw it out there. I don't understand. What should be public? What should be hidden? You want a script command to edit all NPC's roll settings?
1435419132

Edited 1435419163
Mark said: Greg B. said: @Mark, What about a setting to show names on all of the NPCs? sure Greg B. said: Also a script would be most appreciated by someone that I could flag the PC / NPC sheets from Public to Hidden, from Hidden to Public and Names on to Names off, rather than having to modify everyone. It could be as simple as Show All PC / NPC Names? Yes Show All PC / NPC Rolls? No (Hidden) Maybe this is more a request for The Aaron's CharMod but thought i'd throw it out there. I don't understand. What should be public? What should be hidden? You want a script command to edit all NPC's roll settings? Yes, roll and name settings if possible. As I often miss changing the setting, and then I use the roll and i'm like darn, that was suppose to be public. I use both methods with my games. I have an old school game I run where I show all dice as they would prefer a game with no fudging, or alterations to save characters. Then I have more of a carebear style where I keep things hidden from the players, so if adjustments need to be met, I'd prefer they not know the details.
1435420356
Kryx
Pro
Sheet Author
API Scripter
Ya, I have some difficulties in that area as well. I, like you, want to have pretty much everything public to have no fudging or alterations. I find the effects area of a monster to be the most troublesome in this regard. I'll add an item for name. Rolling I need to do some thinking. I doubt it'll be easy, or even possible, to grab every journal and check if it's NPC and then make changes. Maybe. I'd have to check w/ Aaron.
Mark said: Ya, I have some difficulties in that area as well. I, like you, want to have pretty much everything public to have no fudging or alterations. I find the effects area of a monster to be the most troublesome in this regard. I'll add an item for name. Rolling I need to do some thinking. I doubt it'll be easy, or even possible, to grab every journal and check if it's NPC and then make changes. Maybe. I'd have to check w/ Aaron. Cool, thanks Mark. I'm sure Aaron will be stopping by at some point this weekend. If not I'll make a script request for it.
1435426428
Kryx
Pro
Sheet Author
API Scripter
If his script can do it I think that'd be best. If not then I'll do it.
1435484417
Kryx
Pro
Sheet Author
API Scripter
27th June 2015 (1.80) Added the ability to show the monster's name to players Parsed SdX to 5dX
Mark said: 27th June 2015 (1.80) Added the ability to show the monster's name to players Parsed SdX to 5dX Sweet, does this also show the Monster Name in the Roll Template? As that is sort of what my original suggestion was after, but it may be mute once Aaron weighs in with his super awesome change all script.
1435496474
Kryx
Pro
Sheet Author
API Scripter
You've been able to show the monster's name for a while. It's shaped.showName. I just added the ability to show it to players.
So, this section: shaped.sheetOutput = 'hidden'; //change to 'hidden' if you wish the sheet to whisper all commands to the GM shaped.whisperDeathSaves = true; //change to false if you wish NPC death saves to be rolled openly Doesn't seem to be working for me. When I make a new token, these options are set to public. Love your script BTW, it's saved me dozens and dozens of hours already.
1435526048

Edited 1435526074
Mark said: You've been able to show the monster's name for a while. It's shaped.showName. I just added the ability to show it to players. Might be missing the mark(pun intended), here is a screenshot of what i'm looking for. Obviously the Blue is already there, a setting for Pink would be amazing.
1435526098
Kryx
Pro
Sheet Author
API Scripter
See my latest post on the character sheet: <a href="https://app.roll20.net/forum/post/2016392/#post-21" rel="nofollow">https://app.roll20.net/forum/post/2016392/#post-21</a>... It's an error due to minification.
1435591633
Kryx
Pro
Sheet Author
API Scripter
29th June 2015 (1.81) Added the ability to change the settings items for all PCs, all NPCs, or all characters. Updated the fields for that and importing to match the refactoring done on the sheet.
As I am scooping up several API scripts while building a 5E world, am I correct in understanding that this is pulled from the MM pdf? Sorry if this is answered somewhere in there, eyes are already killing me after hours of writing today x.x
1435653355
Kryx
Pro
Sheet Author
API Scripter
The importer expects you to copy the monsters from the 5e MM PDF, yes. You can also do it manually.