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

Creating spells with set attribute (help!)

1588415988

Edited 1588434081
EDIT: 2. I found out that i can prevent it from cutting the command by typing \ in front of every #. Hi! 3 questions/problems. 1 . I've been trying to figure out a way to use the set attribute, to more easily inset homebrew spells into character sheets. So far i have found this:  !setattr {{ --sel --repeating_spell-1_-CREATE_spellname|My Spell --repeating_spell-1_-CREATE_spellschool|conjuration --repeating_spell-1_-CREATE_spellcastingtime|1 action --repeating_spell-1_-CREATE_spellrange|Self --repeating_spell-1_-CREATE_spellduration|1 minute --repeating_spell-1_-CREATE_spelldescription|... }} Does anyone know the lines for the rest of spell setup. e.g. spellcasting ability, savingthrow / effect ect. I've been fumbling around, but can't seem to get them all to work 2. (solved) I would also like to be able to add damage/healing into the description. I usually use: [Extra Healing](!
[[1d8]] Healing) to create a button that can be pressed in the chat when the spell is used. However, i can't figue out how to keep the !setattr to stop cutting the command at the first #. When i put the line above into the --repeating_spell-1_-CREATE_spelldescription|... line it cuts it off and only writes "[Extra Healing](!& I'm not really that good at this scripting or macro stuff, and mostly borrow / copy what you smarter people figure out. So the question is. Is it possible to force it to read the whole line, or somehow keep it from altering/cutting it? 3. I also wondered if it would be possible to use this command in the shaped spellbook manager if we get it to work
1588433537

Edited 1588433865
Dumbhuman
Pro
Marketplace Creator
ChatSetAttr doesn't have a carriage return (!
) defined in its list of HTML replacements.  For adding a new line, it uses a different syntax under its replace syntax (which includes syntax for brackets as well).  You could try: !setattr {{ --sel --replace --repeating_spell-1_-CREATE_spellname|My Spell --repeating_spell-1_-CREATE_spellschool|conjuration --repeating_spell-1_-CREATE_spellcastingtime|1 action --repeating_spell-1_-CREATE_spellrange|Self --repeating_spell-1_-CREATE_spellduration|1 minute --repeating_spell-1_-CREATE_spelldescription|...[Extra Healing]( \n<< 1d8 >> Healing) }} Sorry, I don't have any experience with the Shaped Sheet nor with writing spells to a character sheet.  If you're using Firefox, you could try right clicking on some field in the spell description and selecting "Inspect Element" from the contextual menu.  That may help uncover field names you need.
1588434003

Edited 1588434048
KC . said: ChatSetAttr doesn't have a carriage return (!
) defined in its list of HTML replacements.  For adding a new line, it uses a different syntax under its replace syntax (which includes syntax for brackets as well).  You could try: !setattr {{ --sel --replace --repeating_spell-1_-CREATE_spellname|My Spell --repeating_spell-1_-CREATE_spellschool|conjuration --repeating_spell-1_-CREATE_spellcastingtime|1 action --repeating_spell-1_-CREATE_spellrange|Self --repeating_spell-1_-CREATE_spellduration|1 minute --repeating_spell-1_-CREATE_spelldescription|...[Extra Healing]( \n<< 1d8 >> Healing) }} Just tried it out, but it doesn't work. However, as i wrote in my EDIT, i figured out that by writing \ in front of every #, the line worked :) Thx for the effort though!
1588434579
Dumbhuman
Pro
Marketplace Creator
Sorry about that.  I figured it was worth a shot.  Glad you found something that solves that part of your issue though.
1588435140
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Assuming this is for the Shaped Sheet, you can simply edit the code included in the Shaped Script (which contains the SRD, since the API has no access to the Compendium) to add the necessary lines. For example, here is Magic Missile: {"name":"Magic Missile","level":1,"school":"Evocation","castingTime":"1 action","range":"120 feet","components":{"verbal":true,"somatic":true},"duration":"Instantaneous","description":"You create three glowing darts of magical force. Each dart hits a creature of your choice that you can see within range. A dart deals 1d4 + 1 force damage to its target. The darts all strike simultaneously, and you can direct them to hit one creature or several.","higherLevel":"When you cast this spell using a spell slot of 2nd level or higher, the spell creates one more dart for each slot level above 1st.","damage":{"damage":"1d4","damageBonus":"1","damageType":"force"}},
keithcurtis said: Assuming this is for the Shaped Sheet, you can simply edit the code included in the Shaped Script (which contains the SRD, since the API has no access to the Compendium) to add the necessary lines. For example, here is Magic Missile: {"name":"Magic Missile","level":1,"school":"Evocation","castingTime":"1 action","range":"120 feet","components":{"verbal":true,"somatic":true},"duration":"Instantaneous","description":"You create three glowing darts of magical force. Each dart hits a creature of your choice that you can see within range. A dart deals 1d4 + 1 force damage to its target. The darts all strike simultaneously, and you can direct them to hit one creature or several.","higherLevel":"When you cast this spell using a spell slot of 2nd level or higher, the spell creates one more dart for each slot level above 1st.","damage":{"damage":"1d4","damageBonus":"1","damageType":"force"}}, Yeah that seems to work for me. Thanks mate! Do you know if it would be possible to set up the !setattr to create spells in OGL sheet version?  Since I'm using that in my main campaign? Or is that simply impossible due the the OGL versions "drop down" menus for spell output, casting modifier etc. ?