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

[Custom Character Sheet] Embedding existing ability macros in a custom sheet

January 01 (6 years ago)

Happy new year everyone!

After becoming a "pro-user" I want to build up a custom character sheet for the German rpg-system Midgard. With only basic knowledge of html I got quite far for now, but I need your help. Before getting that pro-status I wrote a ton of macros in the ability-section for the characters and just dragged many of those abilities into the "show as token action".

Is it possible to just use the already existing macros in the characters abilities just by linking them in your custom sheet-html? For example I handled the Abwehr=(defence)-ability like that:
"<td class="sheet-statlabel-big" style="width: 96px;">Abwehr</td>
<td><input class="sheet-inputbox" type="number" name="attr_Abwehr" value="@{Abwehr}" style="height: 24px; width: 70px;"></td>
<td><input class="sheet-inputbox" type="number" name="attr_AbwB" value="@{AbwB}" style="height: 24px; width: 60px;"></td>
<td><button type='roll' value='%{Abwehr}' name='roll_Abwehr'></button></td>"

The ability "Abwehr" already exists and contains a macro with a default table-command. Sorry for my lack of knowledge, but I am eager to learn and I want to work as properly as possible. I do not want to copy the macro from the ability into the html if it can be avoided.

Thanks for any help in advance! :)

January 01 (6 years ago)
GiGs
Pro
Sheet Author
API Scripter

I do not want to copy the macro from the ability into the html if it can be avoided.

This is in fact the only way to do it. Replace the %{Abwehr} in 

value='%{Abwehr}'

with whatever the contents of that ability are.

You cant trigger an ability from the character sheet, but you can copy the contents of an ability, and put that in the character sheet.

January 01 (6 years ago)
GiGs
Pro
Sheet Author
API Scripter

PS if you add 'tokenaction' to the buttons class, it'll show up as a token action for everyone. Most sheets dont do that, becayse there's no way to switch it off: it will show up for every token that is linked to a character sheet, which can be inconvenient.

But the option is there if you need it. That button above would be

<td><button type='roll' class='tokenaction' name='roll_Abwehr' value='text of Abwehr ability'></button></td>"
January 01 (6 years ago)

This is what I feared...


Thank you very much anyway! :)

January 01 (6 years ago)

GiGs said:

PS if you add 'tokenaction' to the buttons class, it'll show up as a token action for everyone. Most sheets dont do that, becayse there's no way to switch it off: it will show up for every token that is linked to a character sheet, which can be inconvenient.

But the option is there if you need it. That button above would be

<td><button type='roll' class='tokenaction' name='roll_Abwehr' value='text of Abwehr ability'></button></td>"

Thanks again! I do not need that command in particular as I just checked important actions on a character template which I copy for player characters. Then I always check additional abilities which the specific character has. That works fine for me.

Next step is to interpret rolls as "erfolgreich" (successful) or "kritisch erfolgreich" (critical success)...Judging from the templates wiki that might be a very challenging endeavour...


January 01 (6 years ago)
GiGs
Pro
Sheet Author
API Scripter

If you are making your own character sheet, you can handle success and failure in a rolltemplate.

Normally with roll20 dice macros, the best you can get is something like /roll 2d6>7, and the > means it will report either 1 or 0. It's a simple way to get success or failure, but its not pretty.

In a rolltemplate though, you can have the roll, and have an expression in the rolltemplate which looks at the rolls result, and you can have it output some text on success, and different text on failure. And include whatever html styling you need. 


January 01 (6 years ago)

GiGs said:

If you are making your own character sheet, you can handle success and failure in a rolltemplate.

Normally with roll20 dice macros, the best you can get is something like /roll 2d6>7, and the > means it will report either 1 or 0. It's a simple way to get success or failure, but its not pretty.

In a rolltemplate though, you can have the roll, and have an expression in the rolltemplate which looks at the rolls result, and you can have it output some text on success, and different text on failure. And include whatever html styling you need. 

Thank you very much! I'll give it a try, maybe it works out.