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

Token action API

I'm using the Token Action to create action buttons for my players. What I would like to know is, if I ask a character to whisper me a secret roll (so other players do not know something has happened to them), is it possible to change the "skill" or "save" part to offer the option of whispered or not?
1657123660

Edited 1657203988
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Dave! Add this to the beginning of any check or save macro: ?{whisper|yes,/w gm |no, } Example: ?{whisper|yes,/w gm |no, }&{template:simple}  @{rtype}?{Ability|Acrobatics,+@{Acrobatics_bonus}@{pbd_safe}[Acrobatics]]]}} {{rname=Acrobatics}} {{mod=@{Acrobatics_bonus}}} {{r1=[[@{d20} + @{Acrobatics_bonus}@{pbd_safe}[Acrobatics]]]|Animal Handling,+@{Animal_Handling_bonus}@{pbd_safe}[Animal]]]}} {{rname=Animal Handling}} {{mod=@{Animal_Handling_bonus}}} {{r1=[[@{d20} + @{Animal_Handling_bonus}@{pbd_safe}[Animal]]]|Arcana,+@{Arcana_bonus}@{pbd_safe}[Arcana]]]}} {{rname=Arcana}} {{mod=@{Arcana_bonus}}} {{r1=[[@{d20} + @{Arcana_bonus}@{pbd_safe}[Arcana]]]|Athletics,+@{Athletics_bonus}@{pbd_safe}[Athletics]]]}} {{rname=Athletics}} {{mod=@{Athletics_bonus}}} {{r1=[[@{d20} + @{Athletics_bonus}@{pbd_safe}[Athletics]]]|Deception,+@{Deception_bonus}@{pbd_safe}[Deception]]]}} {{rname=Deception}} {{mod=@{Deception_bonus}}} {{r1=[[@{d20} + @{Deception_bonus}@{pbd_safe}[Deception]]]|History,+@{History_bonus}@{pbd_safe}[History]]]}} {{rname=History}} {{mod=@{History_bonus}}} {{r1=[[@{d20} + @{History_bonus}@{pbd_safe}[History]]]|Insight,+@{Insight_bonus}@{pbd_safe}[Insight]]]}} {{rname=Insight}} {{mod=@{Insight_bonus}}} {{r1=[[@{d20} + @{Insight_bonus}@{pbd_safe}[Insight]]]|Intimidation,+@{Intimidation_bonus}@{pbd_safe}[Intimidation]]]}} {{rname=Intimidation}} {{mod=@{Intimidation_bonus}}} {{r1=[[@{d20} + @{Intimidation_bonus}@{pbd_safe}[Intimidation]]]|Investigation,+@{Investigation_bonus}@{pbd_safe}[Investigation]]]}} {{rname=Investigation}} {{mod=@{Investigation_bonus}}} {{r1=[[@{d20} + @{Investigation_bonus}@{pbd_safe}[Investigation]]]|Medicine,+@{Medicine_bonus}@{pbd_safe}[Medicine]]]}} {{rname=Medicine}} {{mod=@{Medicine_bonus}}} {{r1=[[@{d20} + @{Medicine_bonus}@{pbd_safe}[Medicine]]]|Nature,+@{Nature_bonus}@{pbd_safe}[Nature]]]}} {{rname=Nature}} {{mod=@{Nature_bonus}}} {{r1=[[@{d20} + @{Nature_bonus}@{pbd_safe}[Nature]]]|Perception,+@{Perception_bonus}@{pbd_safe}[Perception]]]}} {{rname=Perception}} {{mod=@{Perception_bonus}}} {{r1=[[@{d20} + @{Perception_bonus}@{pbd_safe}[Perception]]]|Performance,+@{Performance_bonus}@{pbd_safe}[Performance]]]}} {{rname=Performance}} {{mod=@{Performance_bonus}}} {{r1=[[@{d20} + @{Performance_bonus}@{pbd_safe}[Performance]]]|Persuasion,+@{Persuasion_bonus}@{pbd_safe}[Persuasion]]]}} {{rname=Persuasion}} {{mod=@{Persuasion_bonus}}} {{r1=[[@{d20} + @{Persuasion_bonus}@{pbd_safe}[Persuasion]]]|Religion,+@{Religion_bonus}@{pbd_safe}[Religion]]]}} {{rname=Religion}} {{mod=@{Religion_bonus}}} {{r1=[[@{d20} + @{Religion_bonus}@{pbd_safe}[Religion]]]|Sleight Of Hand,+@{Sleight_Of_Hand_bonus}@{pbd_safe}[Sleight]]]}} {{rname=Sleight Of Hand}} {{mod=@{Sleight_Of_Hand_bonus}}} {{r1=[[@{d20} + @{Sleight_Of_Hand_bonus}@{pbd_safe}[Sleight]]]|Stealth,+@{Stealth_bonus}@{pbd_safe}[Stealth]]]}} {{rname=Stealth}} {{mod=@{Stealth_bonus}}} {{r1=[[@{d20} + @{Stealth_bonus}@{pbd_safe}[Stealth]]]|Survival,+@{Survival_bonus}@{pbd_safe}[Survival]]]}} {{rname=Survival}} {{mod=@{Survival_bonus}}} {{r1=[[@{d20} + @{Survival_bonus}@{pbd_safe}[Survival]]]|Strength,+@{Strength_mod}@{jack_attr}[STR]]]}} {{rname=Strength}} {{mod=@{Strength_mod}@{jack_bonus}}} {{r1=[[ @{d20} + @{Strength_mod}@{jack_attr}[STR]]]|Dexterity,+@{Dexterity_mod}@{jack_attr}[DEX]]]}} {{rname=Dexterity}} {{mod=@{Dexterity_mod}@{jack_bonus}}} {{r1=[[ @{d20} + @{Dexterity_mod}@{jack_attr}[DEX]]]|Constitution,+@{Constitution_mod}@{jack_attr}[CON]]]}} {{rname=Constitution}} {{mod=@{Constitution_mod}@{jack_bonus}}} {{r1=[[ @{d20} + @{Constitution_mod}@{jack_attr}[CON]]]|Intelligence,+@{Intelligence_mod}@{jack_attr}[INT]]]}} {{rname=Intelligence}} {{mod=@{Intelligence_mod}@{jack_bonus}}} {{r1=[[ @{d20} + @{Intelligence_mod}@{jack_attr}[INT]]]|Wisdom,+@{Wisdom_mod}@{jack_attr}[WIS]]]}} {{rname=Wisdom}} {{mod=@{Wisdom_mod}@{jack_bonus}}} {{r1=[[ @{d20} + @{Wisdom_mod}@{jack_attr}[WIS]]]|Charisma,+@{Charisma_mod}@{jack_attr}[CHA]]]}} {{rname=Charisma}} {{mod=@{Charisma_mod}@{jack_bonus}}} {{r1=[[ @{d20} + @{Charisma_mod}@{jack_attr}[CHA]]]}}} {{global=@{global_skill_mod}}} {{type=Check}} {{typec=Check}} @{charname_output} I could set up an option in the script, but I'm not in a place right now where I can easily code.
1657123698
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Note, this is likely to screw up if the pc is set to whisper already.
That's awesome, and it works perfectly, thanks Keith :)