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

Roll Templates and Expanding areas

December 26 (6 years ago)
Coal Powered Puppet
Pro
Sheet Author

Is there a way to "click" on a toll template and make it get bigger/reveal a hidden area?  It seems to happen with the D&D 5th sheets, and I think the still-being-worked Savage Worlds sheet throws a button in a template (still trying to figure that out), but I don't know how to make it happen.  I can get the hover thing to work, but its not really what I am looking for.

Any ideas?  

December 26 (6 years ago)
Finderski
Pro
Sheet Author
Compendium Curator

I don't believe it's possible to "show/hide" sections in the chat.  The one thing I know the Official 5e sheet (and the Savage Worlds sheet I'm working on) does is to use Ability Command Buttons.

On the Savage Worlds Sheet, I accomplish this via:

{{DmgRoll=[Roll Damage](~repeating_weapons_dmg) }}

I actually have a hidden roll button: 

<button type='roll' style='display: none;' name='roll_dmg' value='@{damageOnly}'></button>

I stole that idea from the OGL 5e sheet, when I was using it for a brief D&D stint.

December 26 (6 years ago)
Coal Powered Puppet
Pro
Sheet Author

The idea of using a button on a template to display a lot of text upon command is appealing.  "What does that power do again?" kind of thing.  Took me a bit, but I got it to work.  Now figuring out how to put it into the sheet...

Speaking of which, how does one style that button?  Can it be style?

December 27 (6 years ago)

Edited December 27 (6 years ago)
Finderski
Pro
Sheet Author
Compendium Curator


Coal Powered Puppet said:

The idea of using a button on a template to display a lot of text upon command is appealing.  "What does that power do again?" kind of thing.  Took me a bit, but I got it to work.  Now figuring out how to put it into the sheet...

Speaking of which, how does one style that button?  Can it be style?


To put it in the sheet, you will need a hidden roll button so you have an ability you can call.

As for styling the button...yep. You can do that:

.sheet-rolltemplate-roll .sheet-templateButton > a[href^="~"],
.sheet-rolltemplate-damage .sheet-templateButton > a[href^="~"] {
    background-color: #900C3F;
    font-weight: bold;
}

:)


Edit: You'd of course need to swap out the appropriate roll template info...but the important bit is the

> a[href^="~"]
December 27 (6 years ago)
Coal Powered Puppet
Pro
Sheet Author

It works! Thank you!

December 27 (6 years ago)
Finderski
Pro
Sheet Author
Compendium Curator

:)

January 03 (6 years ago)
Coal Powered Puppet
Pro
Sheet Author

Okay, with these button things, how do I get them to reference a repeating field?

January 03 (6 years ago)
Finderski
Pro
Sheet Author
Compendium Curator

Are you calling them from within a repeating field, or without?

January 03 (6 years ago)
Coal Powered Puppet
Pro
Sheet Author

From within

January 03 (6 years ago)
Finderski
Pro
Sheet Author
Compendium Curator

Assuming it's self-referential (meaning, you're trying to call a button from the same "row"), here's how I do it:

{{DmgRoll=[Roll Damage](~repeating_weapons_dmg) }}

That calls this button roll button:

<button type='roll' style='display: none;' name='roll_dmg' value='@{damageOnly}'></button>
January 03 (6 years ago)
GiGs
Pro
Sheet Author
API Scripter

I had no idea you could call sheet button rolls like Abilities. Handy.

January 03 (6 years ago)
Coal Powered Puppet
Pro
Sheet Author

It works!  Thanks Finderski!

And GiGs...it is really cool.

January 03 (6 years ago)
Finderski
Pro
Sheet Author
Compendium Curator

Glad to help. :)