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

[5e Shaped Companion] Easy Spell Import Macro

1488813294

Edited 1488813724
Hey all! I'm sure most of you already have an easy system for managing this, but I wanted to come up with a quick "click, click, click" way of using the awesome spell importing feature that comes as part of the Shaped Companion script. For that, I designed the following macro: /w GM &{template:5e-shaped}{{title=Spell Import Options}}{{show_character_name=1}}{{character_name=@{selected|character_name}}}{{text_big=Additional Filters}}{{freetext=--school(e.g. --school Transmutation) Restrict the list to the specified school of magic --oaths (e.g. **--oaths Ancients) Restrict the list the specified paladin oath or oaths. If multiple, comma-separated oaths are given, it will match any of spell that falls under any of the supplied oaths. Valid values are Ancients, Vengeance and Devotion --domains (e.g. --domains War, Light) Restrict the list to the specified cleric domain or domains. If multiple, comma-separated domains are given, it will match any spell that has any of the supplied domains --patrons (e.g. --patrons Archfey) Restrict the list to the specified warlock patron or patrons. If multiple, comma-separated patrons are given, it will match any spell that has any of the supplied patrons. Valid values are Archfey, Fiend and Great Old One --overwrite If this option is included, the script will ovewrite existing spells with the same name with the new spells requested, otherwise they will be skipped}} !shaped-import-spell-list --level ?{Level|0|1|2|3|4|5|6|7|8|9} --classes ?{Class|Bard|Cleric|Druid|Paladin|Ranger|Sorcerer|Warlock|Wizard} ?{Additional("--" before each option)|} If you have any suggestions/improvements, I'd be happy to hear them! Thanks to Kryx and Lucian for working together to bring us awesome tools to run our 5e games with!
And as soon as I had it working without a problem and make this post, I can no longer get it to submit the GM whisper before calling the API command. Hmm...
Bump for help
Does anyone have any insight into why the chat output won't trigger until I've gone through all the queries?
1488927245
The Aaron
Pro
API Scripter
Yes, sorry.  Roll Queries, Attribute References, Inline Rolls, etc are all expanded before the command is submitted to be processed (or perhaps I should say, as a command is submitted).  It can't know what to do until you finished answering all the references.
The Aaron said: Yes, sorry.  Roll Queries, Attribute References, Inline Rolls, etc are all expanded before the command is submitted to be processed (or perhaps I should say, as a command is submitted).  It can't know what to do until you finished answering all the references. Are there any known work-arounds for this?
Jyro X said: The Aaron said: Yes, sorry.  Roll Queries, Attribute References, Inline Rolls, etc are all expanded before the command is submitted to be processed (or perhaps I should say, as a command is submitted).  It can't know what to do until you finished answering all the references. Are there any known work-arounds for this? You could use an API Command Button , e.g. [Import Spell List](!shaped-import-spell-list --level ?{Level|0|1|2|3|4|5|6|7|8|9} --classes ?{Class|Bard|Cleric|Druid|Paladin|Ranger|Sorcerer|Warlock|Wizard} ?{Additional --options})
Silvyre said: Jyro X said: The Aaron said: Yes, sorry.  Roll Queries, Attribute References, Inline Rolls, etc are all expanded before the command is submitted to be processed (or perhaps I should say, as a command is submitted).  It can't know what to do until you finished answering all the references. Are there any known work-arounds for this? You could use an API Command Button , e.g. [Import Spell List](!shaped-import-spell-list --level ?{Level|0|1|2|3|4|5|6|7|8|9} --classes ?{Class|Bard|Cleric|Druid|Paladin|Ranger|Sorcerer|Warlock|Wizard} ?{Additional --options}) Already tried this and I'm getting the same effect. The input for the queries launches before the output to chat. However, I have not tried that formatting that you did with the "?" - I'm not sure what the significance of this is?
1488959055
Kryx
Pro
Sheet Author
API Scripter
Please tell me the following does not import every spell per level for these classes: !shaped-import-spell-list --level ?{Level|0|1|2|3|4|5|6|7|8|9} --classes ?{Class|Bard|Cleric|Druid|Paladin|Ranger|Sorcerer|Warlock|Wizard} I highly recommend not importing that many spells to a character sheet.
1488960098
Jakob
Sheet Author
API Scripter
Kryx said: Please tell me the following does not import every spell per level for these classes: !shaped-import-spell-list --level ?{Level|0|1|2|3|4|5|6|7|8|9} --classes ?{Class|Bard|Cleric|Druid|Paladin|Ranger|Sorcerer|Warlock|Wizard} I highly recommend not importing that many spells to a character sheet. That's exactly what it does. :P
Jakob said: Kryx said: Please tell me the following does not import every spell per level for these classes: !shaped-import-spell-list --level ?{Level|0|1|2|3|4|5|6|7|8|9} --classes ?{Class|Bard|Cleric|Druid|Paladin|Ranger|Sorcerer|Warlock|Wizard} I highly recommend not importing that many spells to a character sheet. That's exactly what it does. :P Precisely what it does and seems to work fine. It's the only reason I would use the script (primarily for classes like Druid/Paladin/Cleric) to easily import their spells for when they level up.
1488990192
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Yes. I can confirm this. I ran it once for an NPC, and then canceled the import it once I realized what it was doing. If you want to add automation to the Shaped Companion, I would suggest using the excellent API button interface created by  Avatar of Woah .
Jyro X said: Silvyre said: You could use an API Command Button , e.g. [Import Spell List](!shaped-import-spell-list --level ?{Level|0|1|2|3|4|5|6|7|8|9} --classes ?{Class|Bard|Cleric|Druid|Paladin|Ranger|Sorcerer|Warlock|Wizard} ?{Additional --options}) I have not tried that formatting that you did with the "?" - I'm not sure what the significance of this is? I replaced those with their HTML entity, which prevents the Roll Query from executing until the Command Button is pressed.
1489001725

Edited 1489003057
Silvyre said: Jyro X said: Silvyre said: You could use an API Command Button , e.g. [Import Spell List](!shaped-import-spell-list --level ?{Level|0|1|2|3|4|5|6|7|8|9} --classes ?{Class|Bard|Cleric|Druid|Paladin|Ranger|Sorcerer|Warlock|Wizard} ?{Additional --options}) I have not tried that formatting that you did with the "?" - I'm not sure what the significance of this is? I replaced those with their HTML entity, which prevents the Roll Query from executing until the Command Button is pressed. This actually completely resolves the issue I was running into! Thank you, Sylvyre. Corrected macro (for those interested): --snip-- The forums aren't allowing me to copy/paste the HTML entity to where it makes sense. For those curious, just replace the "?"'s with "& # 63;" (no spaces).
1489052709
Kryx
Pro
Sheet Author
API Scripter
Hey guys, Please see the recommendations on the  latest post by Lucian about importing spells from class . We've been discussing removing the classes option all together, but for now are testing the limit on !shaped-import-spell-list.
1492202970

Edited 1492203299
I was wondering if it would be possible for the !shaped-abilities  to include the option for setting up the class features Sheet's API command button as a token action. ie this bit /w @{CharacterName|character_name} &{template:5e-shaped} {{character_name=@{CharacterName|character_name}}} @{CharacterName|show_character_name} {{title=^{CLASS_FEATURES}}} {{text_big=@{CharacterName|classfeatures_macro_var}}}
1492203484
Kryx
Pro
Sheet Author
API Scripter
Modnar Wylde said: I was wondering if it would be possible for the !shaped-abilities  to include the option for setting up the class features Sheet's API command button as a token action. ie this bit /w @{CharacterName|character_name} &{template:5e-shaped} {{character_name=@{CharacterName|character_name}}} @{CharacterName|show_character_name} {{title=^{CLASS_FEATURES}}} {{text_big=@{CharacterName|classfeatures_macro_var}}} If you ask for this on the script's thread I'm sure Lucian can easily add this.