
hello, is it possible in an attack description to insert a clickable button...?
such as :
[somthing](#macro)
I tried but i just get a roughly visible line i can click but with absolutely no effect...
Am I doing something wrong ?
hello, is it possible in an attack description to insert a clickable button...?
such as :
[somthing](#macro)
I tried but i just get a roughly visible line i can click but with absolutely no effect...
Am I doing something wrong ?
The wiki entry on Chat Menus has information about the various ways to format a clickable button, depending on what you are calling (macro or ability) and from where (same sheet, different sheet, collections macro, roll template, ability description field)
What's going on up above, is a long-standing hack to get API Command Buttons to recognize a collections macro.
! tells the parser that this is going to be an API command. It allows the button to be a button.
is an HTML entity code for the Return character
#macro is what you actually want to send to chat.
So when you press the button, you send:
! #macro
By the time the chat parser is through with it, the is parsed into a Return, and it actually sees two lines:
!
#macro
The first line is ignored, since it is an empty API (Mod) command.
The second line is treated as its own chat entry, the same as typing #macro into the chat.
I agree, but the button itself isn't a button. It's a clickable line.
I'll try with that construction, it's the one I use for spells.
My question was about having this in attack description. Apparently this text doesn't react the same...
Do you have a screenshot of what you're trying to do? The [button](link) syntax actually creates an anchor element, not a button. The default styling is a horrid pink box, but this can be overridden by roll template CSS so there's no background or border, making it look less "buttony" and more "texty". You can use the style injection trick to restyle it to look like a button, if that's what you're after. Example (this has a null link, so it doesn't actually do anything):
[Button](#" style="border: 1px solid black; background: gray; color: white; border-radius: 0.4rem; padding: 0.2rem 1.5rem; font-variant: small-caps; font-weight: bold)
If you're talking about the functional part of the link - they function the same way in a template as outside of one, as the'yre just an anchor with a URL. If the "button" isn't working, there's something wrong with the (link) part of it. The character macro syntax is generally much easier to deal with, [Button](~bob|spell1)
I don't mind the horrid thing, but that's not what I get if I do it in the attack description field. It works in spells descriptions, in spells name, in features text, but not in attack description field
Can you give a screen shot of the text in place in the description field, as well as the text of the macro?
What you are describing is called an API Command Button (which was a misnomer before, and even moreso now that the name has been changed to "Mod". It doesn't actually require the API to use.)
I place buttons in the attack field for Rogue sneak attacks and Paladin smites all the time. I suspect there is a syntax issue, rather than the button simply not working in the attack action field.
It was the ! thing cause now it's working. I tried again with the wrong construction and it creates a clickable line instead of the pink box.
you can reproduce using the wrong construction and you'll see the issue i had.
I thought the brackets [ ] would create a box anyway, even if the rest was a wrong construction.
Thx for your help anyway.