Hey,
I would like to have the possibility to click on the word in a roll template to trigger another rolltemplate. Is this possible? Can I somehow transfer data between the templates?
Thanks
Hey,
I would like to have the possibility to click on the word in a roll template to trigger another rolltemplate. Is this possible? Can I somehow transfer data between the templates?
Thanks
https://wiki.roll20.net/Chat_Menus has info on how to do it. You know how if you have the 5E sheet to not auto-roll damage, the button to roll damage is done the same way.
Hey Andreas,
apparently I am doing something wrong and cannot get it to work.
This is the roll I want to reference.
<label class='sheet-fumbletitle' data-i18n="fumble-u" >FUMBLE</label><button class='sheet-fumble-roll' type='roll' name="roll_fumble" value= '@{whisper}&{template:fumble} {{title=FUMBLE}} {{name=@{character_name}}} {{roll=[[1d10!+1]]}}'></button><br />
And this is the roll template I want to refrence it in:
<table>
<tr><th style='text-transform: uppercase;'>{{title}}</th></tr>
<tr><td><strong class="template-title">NAME: </strong> {{name}}</td></tr>
<tr><td><strong class="template-title">SKILL ROLL: </strong> {{roll}}</td></tr>
{{#rollWasCrit() roll}}<tr style='text-align: justify; font-size: 12px;'><td><strong class="template-title" style='color: #66c600; text-shadow: 1px 1px #000;'>CRITICAL:</strong> Criticals are already calculated into the roll</td></tr>{{/rollWasCrit() roll}}
{{#rollWasFumble() roll}}<tr style='text-align: justify; font-size: 12px;'><td><strong class="template-title" style='color: #c60000; text-shadow: 1px 1px #000;'>FUMBLE:</strong> Use the [fumble](~fumble) button, **subtract** the result from your total score.</td></tr>{{/rollWasFumble() roll}}
</table>
I tried it with [fumble](~fumble] and the escaped variant both write in chat: TypeError: u is undefined
What am I missing?
You need to include which character sheet the ability roll is on, like:
[fumble](~NAME|fumble]
Change NAME to the relevant character sheet name, or selected.
When a button is rolled from the character sheet, roll20 knows which sheet it is coming from. When you click a button in chat, roll20 cannot tell which character sheet's button you want to use, so the information has to be included.
I'm still waking up so I cant remember how to generate the character sheet name automatically, to send with the rolltemplate, but I'm sure someone else will or this might point you in the right direction.
Hey Gigs,
thanks for the tip. I had the name in the rolltemplate anyway and could just use it. Now it works, thanks!
I tried to style the button but didnt get it to work. Is there a specific trick to it? I tried to simply overwrite it like written https://app.roll20.net/forum/post/7209333/show-off-your-style/?pageforid=7455586#post-7455586 or https://app.roll20.net/forum/post/7129900/css-makeover-for-default-template but that didnt work. Also being more specific did not change a thing.
In your links, Keith is using Stylus, a browser extension that only changes the style for him - each player who wants to use this style needs to install Stylus and set it up properly.
It is possible to style a button created via a rolltemplate, but you need very specific CSS to do it. Post the html for your rolltemplate (at least its name0, and the html for your button, and the css you'd like to apply to the button.
<rolltemplate class="sheet-rolltemplate-reputation">
<table>
{{#rollWasFumble() roll}}
<tr style='text-align: justify; font-size: 12px;'>
<td class="sheet-test">
<strong class="template-title" style='color: #c60000; text-shadow: 1px 1px #000;'>FUMBLE:</strong> Use the [fumble](~{{name}}|fumble) button, **subtract** the result from your total score.
</td>
</tr>{{/rollWasFumble() roll}}
</table>
</rolltemplate>
We can go with this styling, when it works I can tweak it myself :)
.textchatcontainer a[href^="~"] {
background-color: transparent;
padding: 0px;
color: #ce0f69;
display: inline-block;
border: none;
}
Thanks for the help
For styles within a rolltemplate, you need to include the rolltemplate. So the above CSS should start
.rolltemplate-reputation a[href^="~"] {
|
If you're using legacy code, that would be
.sheet-rolltemplate-reputation a[href^="~"] {
I don't think anything has changed with how roll templates need to be written in their html/css.
Note Regarding Roll Templates
Because chat is closely integrated into the VTT, roll templates will continue to use the legacy system, both for CSS and HTML.
From the first post here: