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

Is there a way to suppress empty actions?

1683644531

Edited 1683644574
I have a macro that shows me the NPC actions so I can easily run fights.  Click token, click button and it shows me the NPCs attacks. /w gm&{template:npcatk} {{name=@{selected|npc_name}}} {{rname=Actions}} {{r1=[[4]] }} {{normal=1}} {{description=1:[@{selected|repeating_npcaction_$0_name}](~selected|repeating_npcaction_$0_npc_action) 2:[@{selected|repeating_npcaction_$1_name}](~selected|repeating_npcaction_$1_npc_action) 3:[@{selected|repeating_npcaction_$2_name}](~selected|repeating_npcaction_$2_npc_action) 4:[@{selected|repeating_npcaction_$3_name}](~selected|repeating_npcaction_$3_npc_action) }} However, when I run this for some creatures, they don't have 4 actions and I get garbage to the chat window.  Is there a way to suppress items that don't resolve properly? Obviously I would like to extend this a bit with traits, but feel the output will be too mucked up if NPC doesn't have stuff. OUTPUT Actions Goblin :   4 1: Scimitar 2: Shortbow 3:[](~selected|repeating_npcaction_$2_npc_action) 4:[](~selected|repeating_npcaction_$3_npc_action)
1683645161
timmaugh
Forum Champion
API Scripter
I see you don't have the Pro tag, but I'll ask anyway: are scripts available in your game?
I think my Universal Statblock Macro Mule will do exactly what you're looking for .
timmaugh said: I see you don't have the Pro tag, but I'll ask anyway: are scripts available in your game? Sorry no...
Jarren said: I think my Universal Statblock Macro Mule will do exactly what you're looking for . I saw this once before and meant to check it out, not sure if I can vault characters in, is that a campaign setting?  I will have to research this a bit.  I am the creator of the Game on r20, so maybe I can turn it on to import characters down or do I need plus/pro ?
Graan said: I saw this once before and meant to check it out, not sure if I can vault characters in, is that a campaign setting?  I will have to research this a bit.  I am the creator of the Game on r20, so maybe I can turn it on to import characters down or do I need plus/pro ? You don't have to be able to use the character vault or the Mod script.   If you have a game with All Access Vault turned on, then the Character Vault option is just there to make it easier for you.   It is absolutely possible to use it with a free account; it just requires manually copying and pasting the code from the linked Google Sheet .  I think was able to manually copy all the code in about 20 minutes.
Graan said: I saw this once before and meant to check it out, not sure if I can vault characters in, is that a campaign setting?  I will have to research this a bit.  I am the creator of the Game on r20, so maybe I can turn it on to import characters down or do I need plus/pro ? Oh and here's the link for the Wiki on the Character Vault .  The default setting for games is to have the Character Vault turned on.  Which type of Character Vault (Limited or All-Access) depends on a few things: If the Game Creator has a Plus or Pro subscription, then they can turn on the All-Access Vault for any of the players in that game, which allows any of their players to import characters. If you have a Free subscription and are using specific paid modules as the base for your game, you may have All-Access Vault available for that game - it will be listed in the module description if it includes All-Access Vault functionality. But if the Game Creator has a Free subscription and isn't using a paid module, then games will have a Limited Access Vault, which means that any of their players who have a Plus or Pro subscription can import a character into the game, unless the Game Creator has turned off the Character Vault in the game settings. Also I'm not sure if you've checked your messages , but I sent you a separate PM about testing something out if you're interested.