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] ScriptCards - Thread #2

1709727529
Kurt J.
Pro
API Scripter
ScriptCards 2.7.0 on GitHub The bleeding edge release of ScriptCards 2.7.0 is now up on my GitHub Repo . This version contains a lot of cleanup, refactoring much of the code into more manageable segments. While 2.7.0 has worked with everything I've tried, it is always possible there are newly introduced bugs given the scope of the changes, so please let me know if you run into any issues. There will be a followup release when the new API features are released later r this month. Changes in 2.7.0: Added the --z command to edit z-order information for objects. --z:objecttype:objectid|operation currently supports tofront and toback for graphics. Will support additional items/options when the March 2024  API update is released. Added --#storagecharid setting to allow you to specify a character ID for future --s and --l statements (in the currently running script) Added --#gmoutputtarget setting which defaults to "gm". If you set this to "self" the output of --* lines will be whispered to the player executing the script. You can also set this to any other valid whisper target. Added --#functionbenchmarking which defaults to 0. Set to 1 to turn on some basic statistics about calls to functinos (with -->). After your script finishes running the number of calls to each called function will be reported in the API console log as well as the number of  milliseconds the script took to run. Added --~|array;fromkeys;ArrayName;HashTableName will create an array with all of the keys in a given hashtable Added --~|hashtable;fromobject;HashTableName;objecttype;objectid  Ex: --~|hashtable;fromobject;myhash;character;@{selected|character_id} this function will look up the given object and parse out all attributes (except bio, notes, and gmnotes) into a hashtable with key/value  pairs equal to the attribute names and values.   Example:   !script {{   --~|hashtable;fromobject;myhash;graphic;@{selected|token_id}   --~|array;fromkeys;keys;myhash      --%keys|foreach;keys   --+[&keys]|[:myhash("[&keys]")]   --%|   }} Added --~|hashtable;getplayerspecificpages;HashTableName Retuns a hash with the contents of the Campaign's playerspecificpages object, which will have player IDs as keys and page IDs as values for those entries. Added --~|hashtable;setplayerspecificpages;HashTableName Will set the Campaign's playerspecificpages object. The source hash table should contain player IDs as keys and page IDs as values for them. Leave off the hash table name (but include the semicolon (;)) clear the value and return  all players to the ribbon page. New Pre-Set String Variable: [&SC_VERSION_NUMERIC], which will contain the version number in the format 0X0Y0Zr, where X is the major version, Y is the minor version, Z is the update number, and r represents the occasional "a", "b", etc. versions. All components are numeric, so v2.7.0  will be represented as "207000" (2=2, 07=7, 00=0, and 0=no fix update), while a theoretical 2.7.0a would be "207001". This can be used to require a specific minimum version of ScriptCards or to change the behavior of the script depending on the version. For example, assuming this had existed for 2.6.6b, the line below  would check for that minimum version number :   --?"[&SC_VERSION_NUMERIC]" -eq "" -or "[&SC_VERSION_NUMERIC]" -lt 206062|REPORT_BAD_SC_VERSION
1709747340

Edited 1709747468
Kurt J.
Pro
API Scripter
Norman said: Thanks Kurt, I'll take a look. I'm very much a beginner with the using the API and mods and am rapidly getting out of my depth :)  anyway, I'll keep plugging away at it - best way to learn - right? This is "quick and dirty", but here is an example of doing this in ScriptCards using a chat menu and rbuttons. The player can toggle on/off the modifiers. The rest of the group will only see the result when they hit "Take the Shot" !script {{ --#reentrant|[&SendingPlayerID]_TakeAShot --&Aiming|N --&Lily-Livered|N --&PartialCover|N --&HardCover|N --&Mounted|N --&Stealthy|N --:DisplayMenu| --#whisper|self --#title|Take a Shot --#leftsub|Option Selection -->MAKE_BUTTON|Aiming;Aiming;TOGGLE_BUTTON -->MAKE_BUTTON|Lily-Livered;Lily-Livered;TOGGLE_BUTTON -->MAKE_BUTTON|PartialCover;PartialCover;TOGGLE_BUTTON -->MAKE_BUTTON|HardCover;HardCover;TOGGLE_BUTTON -->MAKE_BUTTON|Mounted;Mounted;TOGGLE_BUTTON -->MAKE_BUTTON|Stealthy;Stealthy;TOGGLE_BUTTON --+|  --+|[c][rbutton]Take the Shot::TAKE_SHOT[/rbutton][/c] --X| --:TOGGLE_BUTTON| --?"[&[&reentryval]]" -eq "N"|&[&reentryval];Y|&[&reentryval];N --^DisplayMenu| --X| --:MAKE_BUTTON|Caption;Variable;ReentryPoint --?"[&[%2%]]" -eq "N"|&BColor;#999999|&BColor;#009900 --+|[c][rbutton:#FFFFFFF:[&BColor]][%1%]::[%3%];[%1%][/rbutton][/c] --<| --:TAKE_SHOT| --#whisper| --&Mods| --?"[&Aiming]" -eq "Y"|&Mods;++1 [Aiming] --?"[&Lily-Livered]" -eq "Y"|&Mods;+-1 [Lily-Livered] --?"[&PartialCover]" -eq "Y"|&Mods;+-1 [Partial Cover] --?"[&HardCover]" -eq "Y"|&Mods;+-2 [Hard Cover] --?"[&Mounted]" -eq "Y"|&Mods;+-2 [Mounted] --?"[&Stealthy]" -eq "Y"|&Mods;+-1 [Stealthy] --=AttackRoll|1d10 [&Mods] --+Attack Roll|[$AttackRoll] --X| }}
1709750650

Edited 1709750796
Hi all I am trying to jazz up the Death Saves with a Scriptcard.  Initially I had this !script {{ --/| set up the template, supernotes required to override default style --#whisper|self,gm --#overridetemplate|scroll --#title|Some flavour text --=Roll|%{selected|death_save} }} which I like because it does it and alongside the companion script, updates the character sheet. However, the player concerned is left in the dark unless they have their character sheet open, in which case they can see the radio buttons update, but I would rather the player also got the result of the roll.  Also that script results in a "visible to all" message that just gives the character name and }}.  Taking the last 2 curly braces out of the script fixes that, but that just seems wrong, so I started putting a new script together like so: !script {{ --/| set up the template, supernotes required to override default style --#whisper|self --#overridetemplate|scroll --=Roll| 1d20 + @{selected|global_save_mod} [Bless] + @{selected|death_save_bonus} [Death Save Bonus] --+| [F:Gothic:24][#570702]You roll [$Roll][/F][/#] --#title|some flavour text --*|@{selected|token_name} rolled a [$Roll] for death save }} which gives a nice scroll with flavour text to the player and the roll result to the GM, but I can't figure out a way to modify deathsave_succ or deathsave_fail using Modsetattr since it reports non numeric values.  I can also see this one getting messy as I try and account for natural ones, natural twenties. Can anyone see an easy way to adapt the first one to also give the player the outcome of the roll without the need to have their sheet open (we use 5e token action menu because it is awesome and takes up so much less screen space even when using 2 monitors), or a better way to do option 2?  I feel someone out there must have been down this ginnel before me ; ))
Hey Simon, Here is one possible way to handle the second scriptcard you have. It will check the roll and then use  ScriptCards Object Modification  to change the attributes. This does make the assumption that you are playing D&D 5e and are using the D&D 5e sheet by Roll20. It will handle 2 failures on a natural 1 and restoring 1 HP on a nat 20. It clears out the death saves and failures when stable or dead. !script {{ --/| set up the template, supernotes required to override default style --#whisper|self --#overridetemplate|scroll --#sourceToken|@{selected|token_id} --=Roll| 1d20 + [*S:global_save_mod] [Bless] + [*S:death_save_bonus] [Death Save Bonus] --+| [F:Gothic:24][#570702]You roll [$Roll][/F][/#] --#title|some flavour text --*|[*S:t-name] rolled a [$Roll] for death save --?[$Roll.Base] -eq 1|CriticalFailure --?[$Roll.Base] -eq 20|CriticalSuccess --?[$Roll] -ge 10|Success|Failure --:Done| --X| --:Success| --?"[*S:deathsave_succ2]" -eq "on"|[ --+|You are now stable at 0 HP! -->ClearDeathSaves| --]|[ --?"[*S:deathsave_succ1]" -eq "on"|&succNum;2|&succNum;1 --!a:[*S:character_id]|deathsave_succ[&succNum]:on --]| --^Done| --:Failure| --?"[*S:deathsave_fail2]" -eq "on"|[ --+|You have now died. RIP [*S:t-name] -->ClearDeathSaves| --]|[ --?"[*S:deathsave_fail1]" -eq "on"|&failNum;2|&failNum;1 --!a:[*S:character_id]|deathsave_fail[&failNum]:on --]| --^Done| --:CriticalSuccess| --+|You recover miraclously and have 1 HP. --!a:[*S:character_id]|hp:1 -->ClearDeathSaves| --^Done| --:CriticalFailure| --+|You have suffered a tragic setback. Critical failure --?"[*S:deathsave_fail1]" -eq "on"|[ --+|You have now died. RIP [*S:t-name] -->ClearDeathSaves| --]|[ --!a:[*S:character_id]|deathsave_fail1:on|deathsave_fail2:on --]| --^Done| --:ClearDeathSaves| --!a:[*S:character_id]|deathsave_succ1:|deathsave_succ2:|deathsave_succ3:|deathsave_fail1:|deathsave_fail2:|deathsave_fail3: --<| }} Let me know if you have any questions about this.
Hi Joshua Thank you so much!  Yes, we play 5e and use the 5e OGL sheet, sorry, should have been clear about that.   I would never have got it to that stage in a month of Sundays.  With the first option I had just figured out that the 5e Companion needed the player switch to be set and then it worked for just player and GM, but oddly in testing I noticed a total with any bonuses that equalled a 9 was being classed as a success...weird.  I far prefer your script, thanks once again
Kurt J. said: Norman said: Thanks Kurt, I'll take a look. I'm very much a beginner with the using the API and mods and am rapidly getting out of my depth :)  anyway, I'll keep plugging away at it - best way to learn - right? This is "quick and dirty", but here is an example of doing this in ScriptCards using a chat menu and rbuttons. The player can toggle on/off the modifiers. The rest of the group will only see the result when they hit "Take the Shot" !script {{ --#reentrant|[&SendingPlayerID]_TakeAShot --&Aiming|N --&Lily-Livered|N --&PartialCover|N --&HardCover|N --&Mounted|N --&Stealthy|N --:DisplayMenu| --#whisper|self --#title|Take a Shot --#leftsub|Option Selection -->MAKE_BUTTON|Aiming;Aiming;TOGGLE_BUTTON -->MAKE_BUTTON|Lily-Livered;Lily-Livered;TOGGLE_BUTTON -->MAKE_BUTTON|PartialCover;PartialCover;TOGGLE_BUTTON -->MAKE_BUTTON|HardCover;HardCover;TOGGLE_BUTTON -->MAKE_BUTTON|Mounted;Mounted;TOGGLE_BUTTON -->MAKE_BUTTON|Stealthy;Stealthy;TOGGLE_BUTTON --+|  --+|[c][rbutton]Take the Shot::TAKE_SHOT[/rbutton][/c] --X| --:TOGGLE_BUTTON| --?"[&[&reentryval]]" -eq "N"|&[&reentryval];Y|&[&reentryval];N --^DisplayMenu| --X| --:MAKE_BUTTON|Caption;Variable;ReentryPoint --?"[&[%2%]]" -eq "N"|&BColor;#999999|&BColor;#009900 --+|[c][rbutton:#FFFFFFF:[&BColor]][%1%]::[%3%];[%1%][/rbutton][/c] --<| --:TAKE_SHOT| --#whisper| --&Mods| --?"[&Aiming]" -eq "Y"|&Mods;++1 [Aiming] --?"[&Lily-Livered]" -eq "Y"|&Mods;+-1 [Lily-Livered] --?"[&PartialCover]" -eq "Y"|&Mods;+-1 [Partial Cover] --?"[&HardCover]" -eq "Y"|&Mods;+-2 [Hard Cover] --?"[&Mounted]" -eq "Y"|&Mods;+-2 [Mounted] --?"[&Stealthy]" -eq "Y"|&Mods;+-1 [Stealthy] --=AttackRoll|1d10 [&Mods] --+Attack Roll|[$AttackRoll] --X| }} ooo, I really like this.  so many applications.
Hey Kurt, I'm trying to use the new specifying a default value with version 2.6.6b in the One-Click and it seems to be adding an extra colon to the value in front. Am I doing something wrong? Thanks! !scriptcard {{ --#sourceToken|@{selected|token_id} --#emoteState|Hidden --#whisper|self --+Output|[*S:enhanced_defense:::Nope] }}
1709945324
Kurt J.
Pro
API Scripter
Erik M. said: Hey Kurt, I'm trying to use the new specifying a default value with version 2.6.6b in the One-Click and it seems to be adding an extra colon to the value in front. Am I doing something wrong? Thanks! !scriptcard {{ --#sourceToken|@{selected|token_id} --#emoteState|Hidden --#whisper|self --+Output|[*S:enhanced_defense:::Nope] }} Sorry about that. This is a bug in the code, and will be fixed in 2.7.2, which will be hitting the GitHub shortly.
1709945925
Kurt J.
Pro
API Scripter
ScriptCards 2.7.2 is now on GitHub Fixes for a few bugs, including some introduced by the 2.7.0 refactor. If you installed 2.7.0 from the GitHub, I highly recommend upgrading to 2.7.2. When using --~turnorder|addcustom, you can now specify and additional parameter to determine where in the turn order the entry gets inserted. You can leave the custom counter and formula empty (;;;) if you don't want to specify them, but the semicolons must be there. The available placement options are "top", "bottom", "before:tokenid", "after:tokenid" Ex: --~|turnorder;addcustom;My Fancy Custom Turn;99;-1;after:@{selected|token_id} Added --~|hashtable;getjukeboxtracks;HashTableName. This will create a hash table with the names of every jukebox track as keys and their object ID. It will also create keys with TrackName-playing, TrackName-loop, and TrackName-Volume. Updated function benchmarking output to include the number of script lines executed.
Hi, Does anyone have a sample script card they don't mind sharing for selecting a number to return a result. Something like choose a number between 1 and 10 and return the corresponding text for that number from a list of 10 items. Thanks in advance
Hey FFR, So if I am understanding your ask correctly here are a couple of options for ways to ask for input and choose from a list. In both of the below there is an array with 10 items.  ScriptCards Arrays  are 0 based so in both there is a conversion for people to choose from 1 to 10 and convert that to 0 to 9 for the array lookup. The first uses a Roll20 Roll Query  which may not be desirable depending. Roll20 processes all roll queries ?{} first before ScriptCards can act, so that will always prompt the user and ScriptCards has no control over that. !script {{ --~|array;define;ChoiceArr;One;Two;Three;Four;Five;Six;Seven;Eight;Nine;Ten --#title|Choose a number --&ChosenNumber|?{Choose a number|1,0|2,1|3,2|4,3|5,4|6,5|7,6|8,7|9,8|10,9} --+|You have chosen [b][@ChoiceArr([&ChosenNumber])][/b] }} The second uses ScriptCards Re-Entry buttons  to whisper a chat menu to the user and then display the corresponding array item. !script {{ --~|array;define;ChoiceArr;One;Two;Three;Four;Five;Six;Seven;Eight;Nine;Ten --#title|Choose a number --#reentrant|NumberChooser[$SendingPlayerID] --#whisper|self --&msg| --%i|0;[@ChoiceArr(maxindex)];1 --&msg|+[rbutton][= [&i] + 1]::DisplayChoice;[&i][/rbutton] --%| --+|[c][b]Choose a number between 1 and 10[/b][/c] --+|[c][&msg][/c] --:Done| --X| --:DisplayChoice|ChosenNumber --#whisper|0 --+|You have chosen [b][@ChoiceArr([&reentryval])][/b] --^Done| }}
1710106855

Edited 1710106934
Pak
Pro
I prefer the "--i" information request way over the roll query way. I don't care for the fact that roll queries ask their questions before the SC can run. You can also use "--i" to choose targets using SC. Just swap the "q" tag with the "t" tag. The tradeoff is another button you have to click in the chat: !scriptcard  {{    --iChoose a number from 1 to 10. ;CLICK HERE|q;number;Choose|1|2|3|4|5|6|7|8|9|10   --+|You chose [&number]!   --X| }}
Joshua N. Thanks for your response. Both options work for me so I've gone for the second options as I like selecting the choice in chat
I love Scriptcards in the sense that it's got a lot more functionality than Powercards... however, my biggest hangup is converting all my macros into using Scriptcards :( Do we have a good translation from Powercards to Scriptcards? Or if someone in the community is willing to take one of my old PowerCards and convert it over to Script - I might be able to rebuild my game system. Thoughts?
Hey David. I don't know of any conversion tool for powercards to scriptcards. I am not familiiar enough with powercards to write one but if you open a thread, post your powercard here, or go to the ScriptCards discord, I'm sure people could help you out. The discord is linked on the  ScriptCards wiki . I think posting the powercard and a screenshot of the output would probably be enough for folks to help you convert to ScriptCards.
Thanks, Joshua. I'll try out that discord too. Didn't even think about that resource.
1712099585

Edited 1712099653
I have a feature request that may possibly be only useful for me: With the --I command, would it be possible to send the query to a specific person, i.e. the GM? Often in a macro, there are attributes that can change (Like a withstand rating or if an NPC is using an ability) that players shouldn't know, but in order to get it into the script, I need to do a query. Since the player is the one attacking, they are the one that sees the query.  I've tried whispering a reentrant button to the GM, but it is a little clunky.  Thanks for looking!
So --i uses the button to get Roll20 target or roll query functionality. Roll20 specifies the sender there. Can you describe what was clunky about the re-entry button approach? I use reentrant scriptcards often and they have completely replaced --i usage for me so perhaps if you post your ScriptCard and what was clunky about it, folks could help possibly alleviate that.
1712160569

Edited 1712160676
Sure! So I have a subroutine in a library called ApplyDefense. It has an --i query as to if the target wants to use their defense attribute against an attack. It would be preferable if the players didn't know how many times the NPC has used that attribute in a turn. Here is the relevant code in my attack macro: --?[*T:IsNPC:::No] -eq Yes|[ --?[&CombatSkill] -ne Firearms -and [*T:dodge_this_turn:::No] -eq No|*;[rbutton]Use Defense?::ChooseDefense[/rbutton] --?[&CombatSkill] -eq Firearms -and [*T:firearm_dodge] -eq Yes -and [*T:dodge_this_turn:::No] -eq No|*;[rbutton]Use Defense?::ChooseDefense[/rbutton] --X| --]|[ --?[&CombatSkill] -ne Firearms -and [*T:dodge_this_turn:::No] -eq No|>ApplyDefense;[*T:character_id] --?[&CombatSkill] -eq Firearms -and [*T:firearm_dodge] -eq Yes -and [*T:dodge_this_turn:::No] -eq No|>ApplyDefense;[*T:character_id] --]| --:DefenseChosen| --:ChooseDefense| --IIs [*T:t-name] using ; Defense?|q;Def;Is the target using Defense?|Yes|No --?[&Def] -eq Yes|>ApplyDefense;[*T:character_id] --^DefenseChosen| --X| The library code is: --:ApplyDefense|Target ID --?[*T:enhanced_defense:::No] -eq Yes|=DefenseValue;[*T:defense_base] + [*T:enhanced_defense]|=DefenseValue;[*T:defense_base] --?[$DefenseValue] -le [*[%1%]:defense_used:::0]|SkipDefense --?[&Def] -eq Yes|SkipAskDefense --IIs [*[%1%]:t-name] using ; Defense?|q;Def;Is the target using Defense?|Yes|No --:SkipAskDefense| --?[&Def] -eq Yes|[ --=TotalDice|[$TotalDice] - [$DefenseValue] + [*[%1%]:defense_used] --!a:[%1%]|!defense_used:+=1 --]| --?[&Def] -eq No|SkipDefense -->SpendWillpower|-2;[%2%] --:SkipDefense| --<| The issue is that that once the script hits the reentrant button, it properly sends the button to me as the GM, but when the script starts again, any further action is taken by the GM and not the player who started the attack. 
So one possible way to accomplish this would be to replace all the --i prompts with rbuttons for the choice. I wouldn't use an rbutton to then go into a --i prompt. That seems redundant to me. Here's a barebones sample: !script {{ --#title|Re-Entry Example --#reentrant|ReentrantExample[&SendingPlayerID] --#whisper|self --&OriginalSender|[&SendingPlayerName] --#sourceToken|@{selected|token_id} --#targetToken|@{target|token_id} --/|YOUR STUFF --*Use Defense?|[rbutton]Yes::ChooseDefense;1[/rbutton] [rbutton]No::ChooseDefense;0[/rbutton] --:Done| --X| --:ChooseDefense| --&Def|[&reentryval] --?[&Def] -eq 1|>ApplyDefense;[*T:character_id] --^DefenseChosen| --:DefenseChosen| --#whisper|[&OriginalSender] --+|Resume to original sender --^Done| --:ApplyDefense|TargetCharacterID --/|YOUR LIBRARY CODE --<| }} So the couple things, the example starts out with --#whisper|self so the sending player is prompted with whatever choices they need to make. Their name is then stored into the string variable --&OriginalSender| which we'll use. Then the Use Defense? whispers the Yes No buttons to the GM like you had but those buttons will pass in 1 or 0 to the --:ChooseDefense label and procede like you have. Then in the --:DefenseChosen| label that you go-to in your example, you could use the &OriginalSender string variable to whisper to the original player to resume them making any other further choices to be made. When you are setting a variable, --i to do a roll query isn't the only way. Rbuttons already pass in a string variable to the function named [&reentryval] so you can use rbuttons without also needing a roll query. In using --i, you are delaying Roll20 chat processing for @{target} or roll query ?{} prompts. But by using @{target} or ?{} you are limited by how Roll20 implements those and ScriptCards doesn't have control of that implementation. Let me know if you have any questions about that example or how to apply it to your specific use case.
Thanks! This was good in that it works perfectly. And bad, cause now I have to go through my entire campaign to change all my info requests to buttons. LOL
SCRIPT: Condition/Status Markers I modified a script of Will M.'s to switch on different features of a character sheet successfully. For example if the token is marked with the bless marker it switches on the Global Save and Attack Modifier for that character sheet, and if it is marked for Half-cover it switches on the corresponding Global AC Modifier on the character sheet. Now that all being accomplished I can't figure out how to reverse the process for when I removed the condition/status markers from the token. Posted below is the script that created to switch on features. If anyone wants to show me how to remove and re-switch the features I would appreciate and grow in my newbie understanding of scripts. !!script {{ --/|Script Name : Set Token Status Marker --/|Version : 4.0 --/|Requires SC : 1.3.7+, TokenMod --/|Author : Will M. --/|Description : Sets a common condition or status on a token and provides --/| definition back to user on effect/impact of selected condtion/status --#reentrant|MarkToken --#title|Set Status --#titleCardBackground|#932729 --#whisper|self --#oddRowBackground|#FFFFFF --#evenRowBackground|#FFFFFF --#buttonbackground|#FFFFFF --#buttontextcolor|#0905f2 --#buttonbordercolor|#FFFFFF --#bodyFontSize|12px --#buttonFontSize|11px --#debug|1 --&TokenId|@{selected|token_id} --&tStyle|style="width:100%;padding:1px;border-spacing:0px;border-collapse:collapse;text-shadow: 0px 0px 0px black;border:0px dashed black;" --&trStyle1|style="border:0px dashed black;" --&tdStyle1|style="width:50%;text-align:left;background-color:#FFFFFF;font-size:100%" --&tdStyle2|style="width:50%;text-align:left;background-color:#FFFFFF;font-size:100%" --=Cond_Col|1 --=Stat_Col|1 --/| Initialize my defined list of StatusMarkers in pairs of values (StatusMarkerId;Name) --~|array;define;arySM;AFK;Bane;Bardic-inspiration;Blessed;Blindsight;Blink;Blur;Booming-blade;Concentration;Cursed;Dodging;Dying;Favored-foe;Flying;Half-cover;Hasted;Heroism;Hexed;Hunters-mark;Hypnotized;Madness;Mage-armor;Mirror-image;On-fire;Raging;Resistance;Sanctuary;Shield-of-Faith;Silenced;Sleeping;Slowed;Spider-climb;Stabilized;Stealth;Truesight;Zephyr-Strike --~|array;define;aryConditions;1d4;1d6;1d8;1d10;1d12;1d20;2d10;AFK;Bane;Bardic-inspiration;Blessed;Blindsight;Blink;Bludgeoning-resistance;Blur;Booming-blade;Cold-resistance;Concentration;Cursed;Disadvantage;Disease-immunity;Dodging;Dying;Favored-foe;Fire-resistance;Flying;Force-resistance;Half-cover;Half-cover;Hasted;Heroism;Hexed;Hunters-mark;Hypnotized;Lightning-resistance;Madness;Mage-armor;Magic-resistance;Mirror-image;Necrotic-resistance;Nonmagical-resistance;On-fire;Piercing-resistance;Poison-resistance;Psychic-resistance;Radiant-resistance;Raging;Resistance;Sanctuary;Shield-of-Faith;Silenced;Slashing-resistance;Sleeping;Slowed;Spider-climb;Stabilized;Stealth;Three-quarter-cover;Thunder-resistance;Truesight;Zephyr-Strike --/|Run through the array of SMs and break into Condition or Status --~SM_Name|array;getfirst;arySM --/|+Debug|SM_Name: [&SM_Name] --:LOOPSTART| --?[&SM_Name] -eq ArrayError|LOOPEND --/| Test to see if this is a condition or status --~COND_INDEX|array;indexof;aryConditions;[&SM_Name] --/|+Debug|Cond_Index: [&COND_INDEX] --&tbl|[td [&tdStyle1]][rbutton][sm width=16px][&SM_Name][/sm] [&SM_Name]::SET_STATUSMARK;[&TokenId]\[&SM_Name][/rbutton][/td] --?[&COND_INDEX] -eq ArrayError|IS_STATUS|IS_COND --:IS_COND| --/| Are we on column 1 or 2? --?[$Cond_Col.Total] -eq 1|COND_1|COND_2 --:COND_1| --&tbl|[tr [&trStyle1]] [&tbl] --=Cond_Col|2 --&tblCond|+ [&tbl] --^CONTINUE| --:COND_2| --&tbl|[&tbl] [/tr] --=Cond_Col|1 --&tblCond|+ [&tbl] --^CONTINUE| --:IS_STATUS| --?[$Stat_Col.Total] -eq 1|STAT_1|STAT_2 --:STAT_1| --&tbl|[tr [&trStyle1]] [&tbl] --=Stat_Col|2 --&tblStat|+ [&tbl] --^CONTINUE| --:STAT_2| --&tbl|[&tbl] [/tr] --=Stat_Col|1 --&tblStat|+ [&tbl] --^CONTINUE| --:CONTINUE| --~SM_Name|array;getnext;arySM --/+Debug|SM_Name: [&SM_Name] --^LOOPSTART| --:LOOPEND| --/| Complete the tables based on where we ended up? --?[$Cond_Col] -eq 1|COND_NO_BLANK_CELLS --&tblCond|+ [td][/td] --:COND_NO_BLANK_CELLS| --?[$Stat_Col] -eq 1|STAT_NO_BLANK_CELLS --&tblStat|+ [td][/td] --:STAT_NO_BLANK_CELLS| --/~LenS|string;length;[&tblStat] --/+Debug2| Length Cond: [&LenC] Stat: [&LenS] --&tblCond|[t [&tStyle]] [&tblCond] [/tr] [/t] --&tblStat|[t [&tStyle]] [&tblStat] [/tr] [/t] --/~LenS|string;length;[&tblStat] --/+Debug3| Length Cond: [&LenC] Stat: [&LenS] -->SECTION_HEADER|Mark Status --+|[&tblCond] --X| --:SET_STATUSMARK| --~Arg|string;split;\;[&reentryval] --/+Debug|[&reentryval] --/+Debug|[&Arg1] [&Arg2] --&TokenId|[&Arg1] --&SM|[&Arg2] --#titleCardBackground|#932729 --#oddRowBackground|#CEC7B6 --#evenRowBackground|#B6AB91 --#Title|[&SM] --#leftsub|[*[&TokenId]:t-name] --#rightsub| --#hidecard|0 --&SM_Token|[sm width=50px][&SM][/sm] --C[&SM]| 1d4:1d4|1d6:1d6|1d8:1d8|1d10:1d10|1d12:1d12|1d20:1d20|2d10:2d10|Acid-resistance:Acid Resistance|Advantage:Advantage|AFK:AFK|Bane:Bane|Bardic-inspiration:Bardic Inspiration|Blessed:Blessed|Blindsight:Blindsight|Blink:Blink|Bludgeoning-resistance:Bludgeoning Resistance|Blur:Blur|Booming-blade:Booming Blade|Cold-resistance:Cold Resistance|Concentration:Concentration|Cursed:Cursed|Disadvantage:Disadvantaged|Disease-immunity:Disease Immunity|Dodging:Dodging|Dying:Dying|Exhaustion:Exhaustion|Favored-foe:Favored Foe|Fire-resistance:Fire Resistance|Flying:Flying|Force-resistance:Force Resistance|Half-cover:Half Cover|Hasted:Hasted|Heroism:Heroism|Hexed:Hexed|Hunters-mark:Hunters Mark|Hypnotized:Hypnotized|Lightning-resistance:Lightning Resistance|Madness:Madness|Mage-armor:Mage Armor|Mirror-image:Mirror Image|Necrotic-resistance:Necrotic Resistance|Nonmagical-resistance:Nonmagical Resistance|On-fire:On Fire|Piercing-resistance:Piercing Resistance|Poison-resistance:Poison Resistance|Psychic-resistance:Psychic Resistance|Radiant-resistance:Radiant Resistance|Raging:Raging|Resistance:Resistance|Sanctuary:Sanctuary|Shield-of-Faith:Shield of Faith|Silenced:Silenced|Slashing-resistance:Slashing Resistance|Sleeping:Sleeping|Slowed:Slowed|Spider-climb:Spider Climb|Stabilized:Stabilized|Stealth:Stealth|Thunder-resistance:Thunder Resistance|Three-quarter-cover:Three Quarters Cover|Truesight:Truesight|Zephyr-Strike:Zephyr Strike --+ERROR|[b][c]Status not found![/c][/b] --:Acid-resistance| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]You have resistance to Acid damage.[/b][/c] --^MARK| --:Advantage| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]You have advantage on all Ability checks, Attacks, and Saving throws.[/b][/c] --^MARK| --:AFK| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]Player is Away From Keyboard[/b][/c] --+|[b]🔹Character's action is [sm width=25px]Dodging[/sm][/b] --@token-mod|_set statusmarkers|Dodging _ids [&TokenId] _ignore-selected --^MARK| --:Bane| --+|[c][&SM_Token][/c] --#rightsub|Status --@setattr|_sel _repeating_savemod_$0_global_save_active_flag|1 _silent --@setattr|_sel _repeating_tohitmod_$0_global_attack_active_flag|1 _silent --@act| -1| 10| _Bane [*[&ThisTarget]:character_name] --+|[c][b]You've are baned.[/b][/c] --+|[b]Whenever you Attack or make a Saving throw:[/b] --+|[b]🔹You must roll [sm width=25px]1d4[/sm]and subtract the result from your Attack roll or Saving throw, for the duration of the bane [i](10 turns)[/i][/b] --^MARK| --:Bardic Inspiration| --+|[c][&SM_Token][/c] --#rightsub|Status --@setattr|_sel _repeating_savemod_$1_global_save_active_flag|1 _silent --@setattr|_sel _repeating_tohitmod_$1_global_attack_active_flag|1 _silent --@setattr|_sel _repeating_skillmod_$0_global_skill_active_flag|1 _silent --@act| -1| 100| _Bardic Inspiration [*[&ThisTarget]:character_name] --+|[c][b]You've been inspired by your bards performance.[/b][/c] --+|You've gained one [sm width=25px]Bardic-inspiration[/sm] die. --+|🔹Once within the next 10 minutes, you can roll your [sm width=25px]Bardic-inspiration[/sm] die and add the results to one Ability check, Attack roll, or Saving throw. --+|🔹You can wait until after you roll your; Attack, Ability, or Saving throw before deciding to use your [sm width=25px]Bardic-inspiration[/sm] die, but must decide before the DM says whether the roll succeeds or fails. --+| 🔹Once you've used the [sm width=25px]Bardic-inspiration[/sm] die, it is gone. --+| 🔹You can have only one [sm width=25px]Bardic-inspiration[/sm] at a time. --^MARK| --:Bladesong| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]Your Blade is Singing![/b][/c] --@act| -1| 10| _Bladesong [*[&ThisTarget]:character_name] --+[sm width=25px]bladesong[/sm]|Your Bladesong lasts for up to (10 turns) --+|[b]🔹You gain a bonus to your AC equal to your Intelligence modifier (minimum of +1).[/b] --+|[b]🔹You are graced with supernatural speed [i](your walking speed increases by 10 feet.)[/i].[/b] --+|[b]🔹You are graced with supernatural agility, gaining [sm width=25px]Advantage[/sm] on Acrobatics checks.[/b] --+|[b]🔹You gain a bonus equal to your Intelligence modifier to any Constitution Saving throw you make to maintain your [sm width=25pc]Concentration[/cm] on a spell.[/b] --+|[b]The Bladesong ends if:[/b] --+|[b]🔹You become[sm width=25px]incapacitated[/sm][i](see condition)[/i][/b] --+|[b]🔹You put on medium, heavy armor, or use a shield[/b] --+|[b]🔹You use two hands to make an attack with a weapon. --^MARK| --:Blessed| --+|[c][&SM_Token][/c] --#rightsub|Status --@setattr|_sel _repeating_savemod_$2_global_save_active_flag|1 _silent --@setattr|_sel _repeating_tohitmod_$2_global_attack_active_flag|1 _silent --@act| -1| 10| _Bless [*[&ThisTarget]:character_name] --+|[c][b]You've been blessed by the gods![/b][/c] --+|[b]🔹You may add [sm width=25px]1d4[/sm] to your Attack or Saving throws[/b] --+|[b]🔹For the the duration of the spell (10 turns).[/b] --^MARK| --:Blindsight| --+|[c][&SM_Token][/c] --rightsub|Status --+|[c][b]You can perceive your surroundings without relying on sight, within a specific radius.[/b][/c] --+|[b]🔹You can use the 🦯Blindsight button to sense your surroundings up to 10'[/b] --^MARK| --:Blink| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]You're blinking in & out of this plane[/b][/c] --@act| -1| 10| _Blink [*[&ThisTarget]:character_name] --+|[b]🔹For the next [i](10 turns)[/i] roll a [sm width=25px]1d20[/sm] at the end of each turn, on a roll of (11 or higher), you vanish from this plane of existence and appear on the Ethereal plane. [/b] --+|[b]🔹At the start of your next turn, and when the spell ends if you are on the Ethereal Plane, You return to an unoccupied space of your choice that you can see within 10 feet of the space you vanished from.[/b] --^MARK| --:Blur| --+|[c][&SM_Token][/c] --#rightsub|Status --@act| -1| 10| _Blur [*[&ThisTarget]:character_name] --+|[c][b]Your body becomes blurred.[/b][/c] --+|[b]Shifting and wavering to all who can see you, unless the attacker is immune to this effect[/b] --+|[b]For the next [i](10 turns)[/i], or you until lose your [sm width=25px]Concentration[/sm][/b] --+|[b]🔹Attack rolls against you are [sm width=25px]Disadvantage[/sm][/b] --^MARK| --:Booming Blade| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]You're sheathed in booming energy until the start of your next turn.[/b][/c] --+|[b]🔹IF you willing move 5 feet or more, during this round, you take [sm width=25px]1d8[/sm] lighting damage[/b] --^MARK| --:Cold Resistance| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]You gain Resistance to cold damage.[/b][/c] --+|[b]🔹You take half the damage from any cold damage, for 1 hour.[/b] --@act| -1| 100| _Cold Resistance [*[&ThisTarget]:character_name] --^MARK| --:Concentration| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]You now are concentrating on a spell.[/b][/c] --+|[b]You lose concentration on the spell IF:[/b] --+|[b]🔹You cast another spell requiring concentration[/b] --+|[b]🔹You become incapacitated [i](see condition)[/i] or die[/b] --+|[b]IF you are hit while concentrating on a spell, you must make a Constitution Saving throw or lose concentration. [i](The DC is 10 OR half the damage you take, which ever is greater.[/i][/b] --^MARK| --:Cursed| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]You been cursed.[/b][/c] --+|[b]🔹You have [sm width=25px]Disadvantage[/sm] on Ability checks & Saving throws for the cursed ability score.[/b] --+|[b]🔹You are [sm width=25px]Disadvantage[/sm] on Attacks against the person who cursed you as long as you're cursed.[/b] --+|[b]🔹You must make a Wisdom Saving throw at the start of each of your turns, while cursed. IF you fail, you waste an action that turn doing nothing.[/b] --+|[b]Only a remove curse spell ends this effect. [/b] --^MARK| --:Disadvantage| --+|[c][&SM_Token][/c] --#rightsub|Status --+]|[c][b]You have disadvantage on all Attack rolls, Ability checks, and Saving throws[/b][/c] --^MARK| --:Dodging| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]Your focusing all your attention on avoiding attacks.[/b][/c] --+|[b]🔹You make [i]Dexterity Saving throws[/i] with [sm width=25px]Advantage[/sm].[/b] --+|[b]🔹Until the start of your next turn, all attacks against you have [sm width=25px]Disadvantage[/sm] IF you can see the attacker.[/b] --^MARK| --:Dying| --+|[c][&SM_Token][/c] --#rightsub|Status --@token-mod|_off has_bright_light_vision has_night_vision emits_bright_light emits_low_light --@token-mod|_set bar1_current|0 --+|[c][b]You are Dying![/b][/c] --+|[b]🔹You are unconscious [i](see condition)[/i][/b] --+|[b]🔹All attacks against you have [sm width=25px]Advantage[/sm].[/b] --+|[b]🔹All melee attacks that hit you are critical hits.[/b] --+|[b]🔹IF you are hit, you automatically fail 2 Death Saves.[/b] --+|[b]🔹IF the damage equals or exceeds your HP maximum, you suffer an [b]Instant Death[/b] --^MARK| --:Favored Foe| --+|[c][&SM_Token][/c] --#rightsub|Status --@setattr|_sel _repeating_damagemod_$0_global_damage_active_flag|1 _silent --@act| -1| 10| _Favored Foe [*[&ThisTarget]:character_name] --+|[c][b]You've called upon a mystical bond with Nature.[/b][/c] --+|[b]Marking a target as your Favored Foe, for [i](10 turns)[/i] or until you lose your [sm width=25px]Concentration[/sm][/b] --+|[b]🔹You may roll a [sm width=25px]1d4[/sm] and add the results to the damage dealt by your attack.[/b] --^MARK| --:Fire Resistance| --#rightsub|Status --+|[c][&SM_Token][/c] -#rightsub|Status --+|[c][b]You have resistance to fire damage.[/b][/c] --@act| -1| 600| _Fire Resistance [*[&ThisTarget]:character_name] --^MARK| --:Flying| --+|[c][&SM_Token][/c] --#rightsub|Status --@act| -1| 100| _Flying [*[&ThisTarget]:character_name] --+|[c][b]You are flying, you gain a flying speed of 60 feet for the duration of the spell, [i](100 turns)[/i][/b][/c] --+|[b]The ability ends IF:[/b] --+|[b]🔹You lose concentration on the spell[/b] --+|[b]🔹You are knocked prone[/b] --+|[b]🔹Your movement speed is reduced to 0[/b] --+|[b]IF the spell ends, and you're still aloft, THEN you take [sm width=25px]1d6[/sm] bludgeoning damage for every 10 feet you fall. UNLESS you can stop the fall.[/b] --^MARK| --:Half Cover| --+|[c][&SM_Token][/c] --#rightsub|Status --@setattr|_sel _repeating_acmod_$0_global_ac_active_flag|1 _silent --+|[c][b]You are half covered.[/b][/c] --+|[b]A target has half cover if an obstacle blocks at least half of its body. The obstacle might be a low wall, a large piece of furniture, a narrow tree trunk, or another creature, whether that creature is an enemy or a friend.[/b] --+|[b]🔹You get a +2 bonus to AC and dexterity saving throws.[/b] --^MARK| --:Hasted| --+|[c][&SM_Token][/c] --#rightsub|Status --@act| -1| 10| _Haste [*[&ThisTarget]:character_name] --@setattr|_sel _repeating_acmod_$1_global_ac_active_flag|1 _silent --+|[c][b]Your movement speed is doubled.[/b][/c] --+|[b]🔹You have [sm width=25px]Advantage[/sm] on all Dexterity saving throws.[/b] --+|[b]🔹You gain a +2 bonus to AC[/b] --+|[b]🔹You gain an additional action on each of your turns. That action may only be used to: Attack [i](one weapon attack only)[/i], Dash, Disengage, Hide. or Use an object action.[/b] --+|[b]When the effect ends, [i](10 turns)[/i] you cannot move or take any actions for one turn, as a wave of lethargy sweeps over you.[/b] --^MARK| --:Heroism| --+|[c][&SM_Token][/c] --#rightsub|Status --@act| -1| 100| _Heroism [*[&ThisTarget]:character_name] --+|[c][b]You're a Hero![/b][/c] --+|[b]🔹You are immune to being [sm width=25px]Frightened[/sm][/b] --+|[b]🔹You gain temporary hit points at the start of each of your turns, equal to the spell caster's spellcasting ability modifier, for the duration of the spell [i](100 turns)[/i][/b] --^MARK| --:Hexed| --+|[c][&SM_Token][/c] --#rightsub|Status --@act| -1| 600| _Hexed [*[&ThisTarget]:character_name] --+|[c][b]You've been hexed[/b][/c] --+|[b]🔹You have [sm width=25px]Disadvantage[/sm] on all ability checks made with the hexed ability.[/b] --+|[b] A [i]Remove Curse[/i] ends this spell early.[/b] --^MARK| --:Hunters Mark| --+|[c][&SM_Token][/c] --#rightsub|Status --@act| -1| 600| _Hunter's Mark [*[&ThisTarget]:character_name] --@setattr|_sel _repeating_damagemod_$1_global_damage_active_flag|1 _silent --+|[c][b]You have mystically marked your quarry.[/b][/c] --+|[b]Unti the spell ends [i](600 turns)[/i], or you lose your [sm width=25px]Concentration[/sm][/b] --+|[b]🔹You deal an extra [sm width=25px]1d6[/sm] damage whenever you hit it.[/b] --+|[b]🔹You have [sm width=25px]Advantage[/sm] on any Perception or Survival checks you make to track it.[/b][/c] --+|[b]🔹You can use a Bonus action on a subsequent turn, to mark a new creature. IF the target [sm width=25px]Exhaustion-6[/sm] before the mystical mark ends.[/b] --^MARK| --:Hypnotized| --+|[c][&SM_Token][/c] --#rightsub|Status --@act| -1| 100| _Hypnotized [*[&ThisTarget]:character_name] --+|[c][b]You are hypnotized.[/b][/c] --+|[b]🔹You are [sm width=25px]Incapacitated[/sm] [i](see condition)[/i][/b] --+|[b]🔹You have a movement speed of 0.[/b] --+|[b]The hypnosis ends if:[/b] --+|[b]🔹You take any damage[/b] --+|[b]🔹Someone uses an action to shake you out of your stupor.[/b] --^MARK| --:Inspiration| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]You've been inspired by the Gods![/b][/c] --+|[c][b]For exemplary role playing or other outstanding action.[/b][/c] --+|[b]🔹You can expend your [sm width=25px]Inspiration[/sm] dice whenever you make an attack roll, saving throw, or ability check.[/b] --+|[b]Spending your Inspiration gives you [sm width=25px]advantage[/sm] on that roll.[/b] --^MARK| --:Lightning Resistance| --+|[c][&SM_Token][/c] --#rightsub|Status --@act| -1| 10| _Lighting Resistance [*[&ThisTarget]:character_name] --+|[b]🔹You have resistance to lightning damage for [i](10 turns)[/i].[/b] --^MARK| --:Madness| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]You have been driven mad[/b][/c] --+|[b]🔹A [i]Lesser Restoration[/i] can rid you of short-term or long-term madness[/b] --+|[b]🔹A [i]Greater Restoration[/i] can rid you of indefinite madness[/b] --^MARK| --:Mage Armor| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]A protective magical force surrounds you[/b][/c] --+|[b]Until the spell ends, [i](8 hours)[/i].[/b] --+|[b]🔹Your base AC is 13 + your dexterity modifier.[/b] --+|[b]The spell ends if you put on armor or if the spell is dismissed as an action.[/b] --^MARK| --:Mirror Image| --+|[c][&SM_Token][/c] --#rightsub|Status --@act| -1| 10| _Mirror Image[*[&ThisTarget]:character_name] --+|[c][b]3 illusory duplicates of you suddenly appear.[/b][/c] --+|[b]Each time a creature targets you with an attack, click on the🪞Image button to determine if the attack targets one of the duplicates.[/b] --+|[b]🔹A duplicate's AC equals 10 + your Dexterity modifier.[/b] --+|[b]🔹If an attack hits a duplicate it is destroyed.[/b] --+|[b]🔹A duplicate ignores all AOE damage.[/b] --+|[b]A creature is unaffected by this spell if:[/b] --+|[b]🔹It can’t see[/b] --+|[b]🔹It relies on senses other than sight, as in [sm width=25px]Blindsight[/sm][/b] --+|[b]🔹It can perceive illusions as false, as in [sm width=25px]Truesight[/sm][/b] --+|[b]The spell ends after all duplicates are destroyed, or after [i](10 turns)[/i][/b] --^MARK| --:On Fire| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]You are on fire![/b][/c] --+|[b]🔹You will take [sm width=25px]1d6[/sm] fire damage on each of your turns until you put it out.[/b] --+|[b]🔹You may use an action to make a DC 10 dexterity check to extinguish the flames.[/b] --^MARK| --:Raging| --+|[c][&SM_Token][/c] --#rightsub|Status --@setattr|_sel _repeating_damagemod_$2_global_damage_active_flag|1 _silent --@act| -1| 10| _Raging[*[&ThisTarget]:character_name] --+|[c][b]You're raging and fight with a primal ferocity.[/b][/c] --+|[b]While raging, you gain the following benefits IF you aren’t wearing heavy armor[/b] --+|[b]🔹You have [sm width=25px]Advantage[/sm] on all Strength checks & Saving throws.[/b] --+|[b]🔹You have [sm width=25px]Resistance[/sm] to bludgeoning, piercing, & slashing damage.[/b] --+|[b]🔹You gain a bonus to your damage roll, when you make a melee weapon attack using strength.[/b] --+|[b]🔹Your rage ends early if you are knocked unconscious[, you haven’t made an attack, or taken damage.[/b] --+|[b]🔹You may end your rage as a bonus action.[/b] --+|[b]IF you are able to cast spells, you can’t cast them or concentrate on them while raging.[/b] --^MARK| --:Ready Action| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]You've readied an action[/b][/c] --+|[b]When the trigger occurs, you can either take your reaction right after the trigger finishes or ignore it.[/b] --+|[b]IF you readied a spell, the spell must have a casting time of 1 action. You cast it as normal but hold its energy, you release it as a reaction when the trigger finishes.[/b] --+|[b]Holding the spell’s magic requires concentration.[/b] --+|[b]IF your concentration is broken, the spell dissipates without taking effect and expends a spell slot.[/b] --+|[b]IF your trigger never occurs the spell dissipates without taking effect and and expends a spell slot.[/b] --^MARK| --:Resistance| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]You are resistance to _____ for [i](10 turns)[/i][/b][/c] --+|[b]🔹You may roll a [sm width=25px]1d4[/sm] and add the results to your saving throw.[/b] --+|[b]🔹You can roll the [sm width=25px]1d4[/sm] before or after making the saving throw.[/b] --+|[b]Once you use the [sm width=25px]1d4[/sm] the spell ends.[/b] --^MARK| --:Sanctuary| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]You have sanctuary.[/b][/c] --+|[b]Any creature who targets you with an atta⁠ck or a harmful spell must first make a Wisdom saving throw.[/b] --+|[b]IF they fail, then creature must choose a new target or lose the atta⁠ck or spell. [/b] --+|[b]IF you attack, cast a spell that affects an enemy, or deal damage to another creature, your sanctuary ends.[/b] --+|[b]You are not protected from area effects, such as the explosion.[/b] --^MARK| --:Shield of Faith| --+|[c][&SM_Token][/c] --#rightsub|Status --@act| -1| 100| _Shield of Faith[*[&ThisTarget]:character_name] --@setattr|_sel _repeating_acmod_$1_global_ac_active_flag|1 _silent --+|[c][b]A shimmering field appears around you [/b][/c] --+|[b]🔹You gain +2 bonus to AC for the duration [i](10 turns)[/i].[/b] --^MARK| --:Silenced| --+|[c][&SM_Token][/c] --#rightsub|Status --@act| -1| 100| _Silenced[*[&ThisTarget]:character_name] --+|[c][b]You've been silenced[/b][/c] --+|[b]Casting a spell including a verbal component is impossible.[/b] --+|[b]🔹You are [sm width=25px]Deafened[/sm][/b] --+|[b]🔹You are [sm width=25px]Immunity[/sm] to thunder damage[/b] --^MARK| --:Sleeping| --+|[c][&SM_Token][/c] --#rightsub|Status --@token-mod|_off has_bright_light_vision has_night_vision emits_bright_light emits_low_light --+|[c][b]You fall into a magical state of slumber, for [i](10 turns)[/i][/b][/c] --+|[b]You are unconscious until[/b] --+|[b]🔹The spell ends[/b] --+|[b]🔹You take damage[/b] --+|[b]🔹Someone takes an action to wake you.[/b] --+|[b]Undead and creatures immune to being charmed aren’t affected by this spell.[/b] --^MARK| --:Slowed| --+|[c][&SM_Token][/c] --#rightsub|Status --@setattr|_sel _repeating_acmod_$3_global_ac_active_flag|1 _silent --+|[c][b]You've been slowed.[/b][/c] --+|[b]🔹Your movement speed is halved[/b] --+|[b]🔹You AC has been reduced by 2[/b] --+|[b]🔹You take a -2 penalty to your Dexterity Saving throws[/b] --+|[b]🔹You cannot use your reactions.[/b] --+|[b]🔹You may only use an Action OR a Bonus Action.[/b] --+|[b]🔹You may make a Wisdom Saving throw at the end of each turn. On a successful save, the effect ends.[/b] --+|[b]Regardless of your abilities or magic items, you cannot make more than one melee or ranged attack during your turn.[/b] --+|[b]IF you attempt to cast a spell with a casting time of an action, roll a [sm width=25px]1d20[/sm]. On an [i]11[/i] or higher, the spell doesn’t take effect until the your next turn, and you must use your action on that next turn to complete the spell. IF you cannot completed the spell it is wasted.[/b] --^MARK| --:Spider Climb| --+|[c][&SM_Token][/c] --#rightsub|Status --@act| -1| 600| _Spider Climb[*[&ThisTarget]:character_name] --+|[c][b]You can climb like a spider[/b][/c] --+|[b]🔹You climbing speed = your walking speed.[/b] --+|[b]🔹You've have the ability to climb up, down, across vertical surfaces and ceilings, while leaving your hands free; for the duration of the spell [i](600 turns)[/i][/b] --^MARK| --:Stabilized| --+|[c][&SM_Token][/c] --#rightsub|Status --@token-mod|_set bar1_current|0 _silent --@token-mod|_set statusmarkers|-dead --+|[c][b]You've been stabilized.[/b][/c] --+|[b]🔹You no longer need to make death saves.[/b] --+|[b]🔹You are still unconscious [i](see condition)[/i][/b] --+|[b]🔹You will regain 1 hit point after[sm width=25px]1d4[/sm]hours[/b] --^MARK| --:Stealth| --+|[c][&SM_Token][/c] --#rightsub|Status --@bump|_slave --+|[c][b]Your Stealth![/b][/c] --+|[b]As long as you remain hidden, unseen, and unheard:[/b] --+|[b]🔹You can try to surprise OR sneak by other creatures you encounter.[/b] --+|[b]🔹You have [sm width=25px]Advantage[/sm] on attack rolls against creatures.[/b] --+|[b]🔹Your location is revealed, once you make an attack, whether the hits or misses.[/b] --+|[b]Remember while hiding, there's always a chance a creature will notice you with their passive perception[/b] --^MARK| --:Three Quarter Cover| --+|[c][&SM_Token][/c] --#rightsub|Status --@setattr|_sel _repeating_acmod_$4_global_ac_active_flag|1 _silent --+|[c][b]You have three quarters cover.[/b][/c] --+|[b]A target has three-quarters cover if about three-quarters of it is covered by an obstacle. The obstacle might be a portcullis, an arrow slit, or a thick tree trunk.[/b] --+|[b]🔹You gain a +5 bonus to AC and dexterity Saving Throws.[/b] --^MARK| --:Truesight| --+|[c][&SM_Token][/c] --#rightsub|Status --+|[c][b]You have truesight[/b][/c] --@token-mod|_set aura1_radius|30 --@token-mod|_set aura1_color|#9D33FF --+|[b]🔹You can see invisible creatures and objects.[/b] --+|[b]🔹You automatically detect visual illusions and succeed on Saving Throws against them.[/b] --+|[b]🔹You perceive the original form of a Shapechanger or a creature that is transformed by magic [i](Blur)[/i], and Into the Ethereal Plane.[/b] --^MARK| --:Zephyr Strike| --+|[c][&SM_Token][/c] --#rightsub|Status --@act| -1| 10| _Zephyr Strike[*[&ThisTarget]:character_name] --+|[c][b]You move like the wind.[/b][/c] --+|[b]🔹Your movement doesn’t provoke opportunity attacks, unit the spell ends[i](10 turns)[/i][/b] --+|[b]Once before the spell ends, you can give yourself [sm width=25px]Advantage[/sm] on one weapon attack roll on your turn. That attack deals an extra [sm width=25px]1d8[/sm] force damage on a hit. Whether you hit or miss your walking speed increases by 30 feet until the end of that turn. [/b] --^MARK| --:MARK| --@token-mod|_set statusmarkers|[&SM] _ids [&TokenId] _ignore-selected --X| --<| --:SECTION_HEADER|Title --&hdrstyle_T|style="width:100%;padding:1px;border-spacing:0px;border-collapse:collapse;text-shadow: 0px 0px 0px black;border:1px solid black;" --&hdrstyle_TR|style="border:0px solid black;" --&hdrstyle_TD|style="width:100%;background-color:#edf7f0;font-size:110%;font-weight:bold;text-align:center" --+|[t [&hdrstyle_T]][tr [&hdrstyle_TR]][td [&hdrstyle_TD]][c][%1%][/c][/td][/tr][/t] --<| }}
Hello, I'm wondering if there is a command to execute character ability macro direct to chat. I currently use a sheet button command to create buttons in the chat box that can be clicked to execute a ability macro so trying to skip the button creation step to automatically execute the macro Hopeful someone can help
FFR said: Hello, I'm wondering if there is a command to execute character ability macro direct to chat. I currently use a sheet button command to create buttons in the chat box that can be clicked to execute a ability macro so trying to skip the button creation step to automatically execute the macro Hopeful someone can help Well I wanted to say thank you for your response and report that I finally figured out how to remove the statusmarkers and reverse the changes to the character sheets that I implemented with the above script. It turns out I only needed to change the following line --:MARK| --@token-mod|_set statusmarkers|[&SM] _ids [&TokenId] _ignore-selected --X| --<| by adding in the <-> before the [&SM] to remove the statusmarkers from the tokens. --:MARK| --@token-mod|_set statusmarkers|-[&SM] _ids [&TokenId] _ignore-selected --X| --<| I had already figured out how to reverse the changes to the character sheets previously, it was just the fact I couldn't remove the statusmarkers that was holding me up.