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

Use a Ability with Journal Command Button

1545212060

Edited 1545212119
Hello everyone, I see this Journal Command Buttons in the wiki and I try to use this, but I don't understand how it work. I make a link in the Bio & Info, and I put a " ` " first in URL and then ? Can I just put for example "/w gm [1d20]]" or can I ask for a #macro or a %ability ? What do I must to write exacly ? Thanks a lot !
1545232900
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The text you would put into the link is anything formatted as you would type it into the chat field or macro, preceded by a backtick: ` Note that there is a syntax error in your example. You're missing an opening bracket. The text entered should be: /w gm [[1d20]] lastly, none of this will work if the handout is popped out of the window.
1545250864

Edited 1545295293
Thanks for your response ! Yeah, I try and it work. But for example, I have this macro in a Ability : /w gm &{template:default} {{Name=Attack resulat of @{Name}}} {{Decade=[[((1d10cs<2cf>8)-1)*10]]|[[((1d10cs<2cf>8)-1)*10]]}} {{Unit=[[(1D10cs<1cf>9)-1]]}} {{ModD%=D% (MJ Only) - [[1d10+@{Tiref}+@{Sick}]]%(Malus)}} {{Localisation= [Roll](~selected|Localisation)}} So I have a &{template:default} template , I call a attribut "Name", and a button "Roll" linked to a select token and the his ability "Localisation".  Just putt a "`" don't work. I'm begginer in Roll20 so it's not easy for me sorry :P
1545254528
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
No worries, we'll either get this sorted out or find out why it's not working. Let's run through a quick checklist: 1. Which character sheet does your game use, if any? 2. Does the Ability you posted work correctly when run directly from the character sheet? 3. Could you post the link text you are using in the Journal Command button (the part you are typing after the backtick)?
1545256074

Edited 1545295267
1. I don't use any character sheet, it's only homemade rules, so I want to use Bio and Info. 2. The Ability work correctly in the character sheet. 3.The link text after backtick is the link above : /w gm &{template:default} {{Name=Attack resulat of @{Name}}} {{Decade=[[((1d10cs<2cf>8)-1)*10]]|[[((1d10cs<2cf>8)-1)*10]]}} {{Unit=[[(1D10cs<1cf>9)-1]]}} {{ModD%=D% (MJ Only) - [[1d10+@{Tiref}+@{Sick}]]%(Malus)}} {{Localisation= [Roll](~selected|Localisation)}} When I insert that in the Bio and Info, the link didn't work and say "TypeError: c is undefined". (Sorry for my english, I'm a french speaker btw)
1545256463

Edited 1545257292
When I put a simple `/w gm &{template:default} {{name=Result}} {{Decade=[[1D10]]}}, so without button, attribute or ability, the themplate didn't appear and just the roll is done.
1545260324
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Alright, I believe that Journal Command Buttons have issues with Rolltemplates. There is probably some way to use HTML entity replacements to fix this, but the easiest way is to make this a true ability. If I create a character and give it the ability, I can trigger the ability from the handout: Character named Macro has the Ability called Result . Handout has link text called Roll Template that when clicked sends the text: `%{Macro|Result} When you click on the Journal Command Button, it runs the ability from the macro character, sidestepping HTML replacement and giving you the results correctly.
1545260421
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Building a Macro Character Sheet has a LOT of other benefits, besides making syntax simpler.
1545261888

Edited 1545262335
Thanks a lot, I will try that tomorow. A last question : if there any way to have a real button or a picture linked to macro in Bio and Info, without API ? Or it's just possible with a text ?
1545265977
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It's possible with a lot of difficulty, but it's a hack * and tricky to accomplish. For the Journal command buttons, text is really the best option. You could look into Chat Menus which can use real buttons and display images, (though not make image buttons). * The hack I posted is for aligning images in handouts, but I imagine it could be modified to insert links into graphics. I do not recommend it.
1545287569

Edited 1545295232
Thanks a lot for your time ans help. It would be awsome if there is a possibility to call a ability with a Roll Query ! ?{Test| ability name1, %&#123selected&#124Ability1}| ability name2, %&#123selected&#124Ability2} } That blow my mind because if I write directly %{selected|Ability1} in chat, that work :/
keithcurtis said: No worries, we'll either get this sorted out or find out why it's not working. Let's run through a quick checklist: 1. Which character sheet does your game use, if any? 2. Does the Ability you posted work correctly when run directly from the character sheet? 3. Could you post the link text you are using in the Journal Command button (the part you are typing after the backtick)? This doesn't work because of the colon after template. Hasn't since the text editor update.
1545316754
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Thanks Jeremy, I had clean forgotten that. I don't use Journal Command Buttons very often. Apparently you can't escape it either. I think the workaround I posted above is your best best bet, Maitre du Jeu TJ.
Thanks keithcurtis and Jeremy. Yes I will take your solution after all. And call a ability in a Roll Query isn't possible for the moment ?