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

Calling A Spell From Character Sheet as a Macro?

I apologize if there is already a solution to this, I looked through the forums but I couldn't find anything that helped me. Essentially what I am trying to do is input a spell Name and Description on a 5e Character sheet and have a macro linked to that spell position. So for example let's say I have a bard with 3 level 1 spells, if you look at the shaped spell sheet it shows the three spells under the level 1 tab with the "Cast" button on the right side of each spell. Spell 1 Thunderwave Spell 2 Cure Wounds Spell 3 Bless I'm trying to find out if I can make a macro that finds the character sheet of the selected token, grabs the desired slot under the spellbook, and essentially "presses" the cast button for that spell slot. Would anyone have any ideas on this?
1439256539

Edited 1439256609
Silvyre
Forum Champion
Wes said: You can do this. It is done by copy and pasting the roll template output into the token action field. On the character that you wish to make a token action for, use the roll button from the character sheet. Select the chat panel in the bottom right corner, and press the "Up Arrow" key. (This will output the template code for the roll that was just done.) Copy and paste the entire output to your characters token action field. Now you can use token actions to "Take Over the World"! The above advice regards calling the information released by pressing a button on a character sheet from a macro. Cameron R. said: I'm trying to find out if I can make a macro that finds the character sheet of the selected token, grabs the desired slot under the spellbook, and essentially "presses" the cast button for that spell slot. It is not currently possible for a macro to call repeating sections of a character sheet. See: Official support for repeating sections in character sheets
Okay so it's not possible the easy way then due to the repeating issue. :/ I saw I was able to extract the button's command but the macro wouldn't change if the spell were to be modified afterwards within the sheet. I gave the linked support forum my +1, thanks for the info! :)
Cameron, if I understand this right, YES, this is completely and utterly possible. xD Many of my macros operate on this very thing for Weapons and Class Actions, so spells wouldn't be so difficult at all really. ^^ It would take some time of course, but it's definitely not impossible. <a href="https://app.roll20.net/forum/permalink/2242101/" rel="nofollow">https://app.roll20.net/forum/permalink/2242101/</a> It's outdated, but I'll be updating it soon, along with some potential weapon and your spell macros.
1439432953
Silvyre
Forum Champion
Mark said: Spells are repeating. They cannot be referenced. However, for anyone interested, Benson Y. just posted a great resource that can assist in working around this issue.
i have sort of done something like this in my 5e game. essentially, i made a character, 'wizardspellbook,' and then populated it with relevant spells. i then used the cast button to send the output to chat. then i pressed ... shift-up arrow, i think, and that gave me the code for the macro. i copied that to an ability on the character sheet, and replaced the relevant character links with selected|whatever. hey presto, a spellbook i could use for characters/npcs, with nice output that looks like it is coming off the spell section of the 5e shaped sheet.
1439457376
Kryx
Pro
Sheet Author
API Scripter
Sure, you could always create token macros to emulate the spell, but if you ever change it then it won't be updated. That's not a workaround, that's a totally different option which isn't the same. For example you can't toggle higher level query.
Mark said: ...For example you can't toggle higher level query. I have several spell macros that work off of the spell caster's level. They are given the attribute magelevel. Every three levels it gains power? [[(@{magelevel}/3)d6]]
1439487950
Kryx
Pro
Sheet Author
API Scripter
OldSchoolChris said: I have several spell macros that work off of the spell caster's level. They are given the attribute magelevel. Every three levels it gains power? [[(@{magelevel}/3)d6]] That works perfectly fine for 3.5, but does not work for 5e. I was referring to the feature on my shaped sheet to toggle a query to select a higher level on and off.
1439522548

Edited 1439523231
i used a query to determine casting level and then used the query in the calculations. this is a basic example of the spell ray of frost @{selected|output_option} &{template:5eDefault} {{spell=1}} {{character_name=@{selected|character_name}}} @{selected|show_character_name} {{title=Ray of Frost}} {{spellschool=Evocation}} {{spellfriendlylevel=Cantrip}} 0 0 {{spellshowinfoblock=1}} {{spellshowdesc=1}} {{spelldescription=A frigid beam of blue-white light streaks toward a creature within range. Make a ranged spell attack against the target. On a hit, it takes 1d8 cold damage, and its speed is reduced by 10 feet until the start of your next turn. The spell’s damage increases by 1d8 when you reach 5th level (2d8), 11th level (3d8), and 17th level (4d8).}} 0 {{spellshowattack=1}} {{spellattack=[[d20 + @{selected|intelligence_mod} + @{selected|PB} + (@{selected|global_spell_attack_bonus})]]}} {{spellattackadv=[[d20 + @{selected|intelligence_mod} + @{selected|PB} + (@{selected|global_spell_attack_bonus})]]}} 0 0 {{spellshowdamage=1}} {{spelldamage=[[(((@{selected|wizard_level}+6.2)/5.6)-.5)d8 + 0 + 0 + (@{selected|global_spell_damage_bonus}) + 0d0]] Lightning}} 0 0 {{spellcasttime=1 Action}} {{spellduration=Instantaneous}} {{target=1 Target}} {{range=60 feet}} {{spellgainedfrom=Wizard}} {{spellcomponents=V, S}} @{selected|classactionspellcast} and this is fireball, complete with a roll query @{selected|output_option} &{template:5eDefault} {{spell=1}} {{character_name=@{selected|character_name}}} @{selected|show_character_name} {{title=Fireball}} {{spellschool=Evocation}} {{spellfriendlylevel=Level 3}} 0 0 {{spellshowinfoblock=1}} {{spellshowdesc=1}} {{spelldescription=A bright streak flashes from your pointing finger to a point you choose within range and then blossoms with a low roar into an explosion o f flame. Each creature in a 20-foot-radius sphere centered on that point must make a Dexterity saving throw. A target takes 8d6 fire damage on a failed save, or half as much damage on a successful one. The fire spreads around corners. It ignites flammable objects in the area that aren't being worn or carried.}} {{spellshowhigherlvl=1}} {{spellhigherlevel=When you cast this spell using a spell slot of 4th level or higher, the damage increases by 1d6 for each slot level above 3rd.}} {{spellshowsavethrow=1}} {{spellsavedc=[[@{selected|wizard_spell_dc} + 0]]}} {{spellsavestat=Dex}} {{spellsavesuccess=1/2 Damage}} 0 {{spellshowdamage=1}} {{spelldamage=[[(5+?{Spell Slot Level|3})d6 + 0 + 0 + (@{selected|global_spell_damage_bonus}) + 0d0]] Fire}} 0 0 {{spellcasttime=1 Action}} {{spellduration=Instaneous}} {{target=20 foot radius}} {{range=150 feet}} {{spellgainedfrom=Wizard}} {{spellcomponents=V, S, M}} @{selected|classactionspellcast} /edited to add the following: and the call for these spells from the other character sheet, or the settings macros, or whereever, looks just like this: %{WizardSpellbook|Fireball} these macros account for caster levels, reference attributes automatically, use roll templates, etc.&nbsp;
1439710461

Edited 1439710483
That's not a bad version. xP We just need some no-life to input ALL the 5E spells into a character sheet and then toss them to everyone. XD ... *coughgivemeacoupledayscough* x.x
1439718242
Kryx
Pro
Sheet Author
API Scripter
Dalton H. said: i used a query to determine casting level and then used the query in the calculations. This is already supported on the 5e shaped sheet. Toothless the Night Fury said: We just need some no-life to input ALL the 5E spells into a character sheet and then toss them to everyone. XD The 5e Shaped scripts already has a spell importer. Though API only works for Pro users.
Mark, do you have a link to a forum for the spell importer? I'm fresh when it comes to API usage, though I've already used your NPC importer a few times already.
1439759444
Kryx
Pro
Sheet Author
API Scripter
It's the same script. Thread&nbsp; <a href="https://app.roll20.net/forum/post/1816031/script-d" rel="nofollow">https://app.roll20.net/forum/post/1816031/script-d</a>... Read that thread for how it works.
Mark said: It's the same script. Thread&nbsp; <a href="https://app.roll20.net/forum/post/1816031/script-d" rel="nofollow">https://app.roll20.net/forum/post/1816031/script-d</a>... Read that thread for how it works. Thanks Mark!
1439760089
Kryx
Pro
Sheet Author
API Scripter
Ya, if you have any question feel free to ask them there. You have to populate the spells data, but I have some examples on my github.
i didn't know about the script, but the reason i wanted to have all the spells in just a few locations was the delay we were getting from the token selections. this way, the pc/npc character sheets don't need as many repeating sections for spells, which at the time i was doing that, seemed to be causing 15-30 seconds of lag between selecting a token and being able to do anything. don't get me wrong, your sheet is amazing, but my work computer (which i am currently using) literally takes a minute to open up your sheet. I actually have to click a button telling the computer to keep at it. Since i get lots of free time at work and use that free time to populate my 5e campaign (or whatever i am doing lately), that became an issue, and this was my solution. bear in mind that this was months ago, so changes have been made, i understand, to the token/attribute linking system. but this is still an issue if i try to open the character sheets with spells on them. now, this computer is a POS not worthy of stomping out if it catches fire, and is actually less powerful than my galaxy s3 mini in every way except storage capacity and holding paper down on a windy days capacity, but nothing i have encountered on roll20 even gets close to that.
1439799864

Edited 1439800072
Kryx
Pro
Sheet Author
API Scripter
Dalton H. said: repeating sections for spells, which at the time i was doing that, seemed to be causing 15-30 seconds of lag between selecting a token and being able to do anything I ran many tests. The highest of which is 10s. Since you're running a much slower computer and are getting higher numbers I would encourage you to post that info with details on the bug thread:&nbsp; <a href="https://app.roll20.net/forum/post/2306148/5e-shape" rel="nofollow">https://app.roll20.net/forum/post/2306148/5e-shape</a>... If you want to hard code spells I suggest you follow the updated versions which have roll queries and display that info. Especially since I'm going to remove the old syntax from the roll template soon.
posted as requested. hope it helps. i don't actually need to mess with it anymore, someone else wanted to run, and i like playing more than running. now i am playing with the fate accelerated sheet.
I'm having difficulty with the Higher Level Query on the NPC sheet as a GM. The pop up menu to select the spell level doesn't come up, so it always rolls as a 1st level spell. It works on the PC sheets, but not the NPC. Hovering over the damage it states ({{spell_cast_as_level=}}) Also, I note that even on the PC sheet, you can place the info in the Higher Level Query, but the rolls are not happening, it is just getting a value of 0 for the extra level damage, no matter what Higher Lvl Dmg Dice or Higher Lvl Dmg Die values I put in.
1440074465
Kryx
Pro
Sheet Author
API Scripter
Eric, Higher level query is broken on some spells in the Aug 12th build. It's now Aug 20th and Roll20 has not released a version since then. When they do release that version it's all fixed. NPC vs PC sheet shouldn't matter - they're both broken in the Aug 12th version.
Thanks for the quick response! Good to know, otherwise the sheets have been great, thanks for all the hard work!