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

Trying to make a Rolltable

1756939376

Edited 1756939448
Could anyone help me by chance with getting a character sheet rolltable up? I've been trying to make it, but this is my first time and I'm not coding-intelligent. I want to have a rolltable that has a template that contains: The player's character sheet image on the left side. The title of the character at the top. The roll section that I can input a series of d6s in based on one of 4 stats that they have. The game it's meant for is called Cottages &amp; Cerberus I'm effectively trying to make it look like this little layout. &lt;div class="skills2x2"&gt; &lt;!-- CHARM --&gt; &lt;div class="skill-cell" style="border-right:1px solid #000;border-bottom:1px solid #000;"&gt; &lt;button type="roll" class="skill-title-roll" value="@{roll_charm}"&gt; &lt;span class="text-center upcase" style="display:block;border-bottom:1px solid #000;" data-i18n="Charm"&gt;Charm&lt;/span&gt; &lt;/button&gt; &lt;div class="pips"&gt; &lt;input type="checkbox" name="attr_pc_charm_1" value="1" class="shape-diamond-med checked-red"&gt; &lt;input type="checkbox" name="attr_pc_charm_2" value="1" class="shape-diamond-med checked-red"&gt; &lt;input type="checkbox" name="attr_pc_charm_3" value="1" class="shape-diamond-med checked-red"&gt; &lt;input type="checkbox" name="attr_pc_charm_4" value="1" class="shape-diamond-med checked-red"&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- ALCHEMY --&gt; &lt;div class="skill-cell" style="border-bottom:1px solid #000;"&gt; &lt;button type="roll" class="skill-title-roll" value="@{roll_alchemy}"&gt; &lt;span class="text-center upcase" style="display:block;border-bottom:1px solid #000;" data-i18n="Alchemy"&gt;Alchemy&lt;/span&gt; &lt;/button&gt; &lt;div class="pips"&gt; &lt;input type="checkbox" name="attr_pc_alchemy_1" value="1" class="shape-diamond-med checked-red"&gt; &lt;input type="checkbox" name="attr_pc_alchemy_2" value="1" class="shape-diamond-med checked-red"&gt; &lt;input type="checkbox" name="attr_pc_alchemy_3" value="1" class="shape-diamond-med checked-red"&gt; &lt;input type="checkbox" name="attr_pc_alchemy_4" value="1" class="shape-diamond-med checked-red"&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- LORE --&gt; &lt;div class="skill-cell" style="border-right:1px solid #000;"&gt; &lt;button type="roll" class="skill-title-roll" value="@{roll_lore}"&gt; &lt;span class="text-center upcase" style="display:block;border-bottom:1px solid #000;" data-i18n="Lore"&gt;Lore&lt;/span&gt; &lt;/button&gt; &lt;div class="pips"&gt; &lt;input type="checkbox" name="attr_pc_lore_1" value="1" class="shape-diamond-med checked-red"&gt; &lt;input type="checkbox" name="attr_pc_lore_2" value="1" class="shape-diamond-med checked-red"&gt; &lt;input type="checkbox" name="attr_pc_lore_3" value="1" class="shape-diamond-med checked-red"&gt; &lt;input type="checkbox" name="attr_pc_lore_4" value="1" class="shape-diamond-med checked-red"&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- MUSCLE --&gt; &lt;div class="skill-cell"&gt; &lt;button type="roll" class="skill-title-roll" value="@{roll_muscle}"&gt; &lt;span class="text-center upcase" style="display:block;border-bottom:1px solid #000;" data-i18n="Muscle"&gt;Muscle&lt;/span&gt; &lt;/button&gt; &lt;div class="pips"&gt; &lt;input type="checkbox" name="attr_pc_muscle_1" value="1" class="shape-diamond-med checked-red"&gt; &lt;input type="checkbox" name="attr_pc_muscle_2" value="1" class="shape-diamond-med checked-red"&gt; &lt;input type="checkbox" name="attr_pc_muscle_3" value="1" class="shape-diamond-med checked-red"&gt; &lt;input type="checkbox" name="attr_pc_muscle_4" value="1" class="shape-diamond-med checked-red"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- Hidden macros for the four CALM skills --&gt; &lt;input type="hidden" name="attr_roll_charm" value="&amp;{template:pipstat} {{rollname=@{pcname} - Charm}} {{img=@{avatar}}} {{pool=[[ (0+@{pc_charm_1}) + (0+@{pc_charm_2}) + (0+@{pc_charm_3}) + (0+@{pc_charm_4}) ]]}} {{roll=[[ [[ (0+@{pc_charm_1}) + (0+@{pc_charm_2}) + (0+@{pc_charm_3}) + (0+@{pc_charm_4}) ]]d6kh1 ]]}} {{zerodice=[[ 2d6kl1 ]]}}"&gt; &lt;input type="hidden" name="attr_roll_alchemy" value="&amp;{template:pipstat} {{rollname=@{pcname} - Alchemy}} {{pool=[[ (0+@{pc_alchemy_1}) + (0+@{pc_alchemy_2}) + (0+@{pc_alchemy_3}) + (0+@{pc_alchemy_4}) ]]}} {{roll=[[ [[ (0+@{pc_alchemy_1}) + (0+@{pc_alchemy_2}) + (0+@{pc_alchemy_3}) + (0+@{pc_alchemy_4}) ]]d6kh1 ]]}} {{zerodice=[[ 2d6kl1 ]]}}"&gt; &lt;input type="hidden" name="attr_roll_lore" value="&amp;{template:pips} {{rollname=@{pcname} - Lore}} {{pool=[[ (0+@{pc_lore_1}) + (0+@{pc_lore_2}) + (0+@{pc_lore_3}) + (0+@{pc_lore_4}) ]]}} {{roll=[[ [[ (0+@{pc_lore_1}) + (0+@{pc_lore_2}) + (0+@{pc_lore_3}) + (0+@{pc_lore_4}) ]]d6kh1 ]]}} {{zerodice=[[ 2d6kl1 ]]}}"&gt; &lt;input type="hidden" name="attr_roll_muscle" value="&amp;{template:pipstat} {{rollname=@{pcname} - Muscle}} {{pool=[[ (0+@{pc_muscle_1}) + (0+@{pc_muscle_2}) + (0+@{pc_muscle_3}) + (0+@{pc_muscle_4}) ]]}} {{roll=[[ [[ (0+@{pc_muscle_1}) + (0+@{pc_muscle_2}) + (0+@{pc_muscle_3}) + (0+@{pc_muscle_4}) ]]d6kh1 ]]}} {{zerodice=[[ 2d6kl1 ]]}}"&gt; This is the code for the setup I'm trying to do for the stats. And below is the rolltable.&nbsp; &lt;rolltemplate class="sheet-rolltemplate-pips"&gt; &lt;div class="rt-card"&gt; &lt;!-- LEFT: portrait (optional) --&gt; &lt;div class="rt-left"&gt; {{#img}}&lt;img src="{{img}}" alt="{{rollname}}"&gt;{{/img}} {{^img}}&lt;div class="rt-left--placeholder"&gt;&lt;/div&gt;{{/img}} &lt;/div&gt; &lt;!-- TOP-RIGHT: title --&gt; &lt;div class="rt-header"&gt;{{rollname}}&lt;/div&gt; &lt;!-- BOTTOM-RIGHT: body --&gt; &lt;div class="rt-body"&gt; &lt;div class="rt-row"&gt;&lt;span class="rt-label"&gt;Dice&lt;/span&gt; {{pool}}&lt;/div&gt; {{#rollTotal() pool 0}} &lt;div class="rt-row"&gt;&lt;span class="rt-label"&gt;Result&lt;/span&gt; {{zerodice}}&lt;/div&gt; {{/rollTotal() pool 0}} {{#^rollTotal() pool 0}} &lt;div class="rt-row"&gt;&lt;span class="rt-label"&gt;Result&lt;/span&gt; {{roll}}&lt;/div&gt; {{/^rollTotal() pool 0}} &lt;/div&gt; &lt;/div&gt; &lt;/rolltemplate&gt; And here is the CSS I tried to make. .skills2x2 { display: grid; grid-template-columns: repeat(2, 1fr); /* 2 columns */ align-items: center; } .skill-cell { display: flex; flex-direction: column; align-items: center; /* center label + checkbox in each cell */ justify-content: center; min-height: 3.25rem; /* optional: keep cells even */ } /* title looks like a header but is clickable */ .skill-title-roll{ background:transparent;border:0;width:100%;padding:.15rem 0;margin:0; text-transform:uppercase;font-weight:700;text-align:center;cursor:pointer; } .pips{display:flex;gap:.4rem;align-items:center;justify-content:center;} .sheet-rolltemplate-pipstat .rt-card{ background-image: url("<a href="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/Court%20Of%20Blades/Images/bg-web.png" rel="nofollow">https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/Court%20Of%20Blades/Images/bg-web.png</a>"); height: max-content; font-family: "EB Garamond", serif; color: black; display: block; border: double black 5px; } .sheet-rolltemplate-pipstat .rt-left{grid-row:1 / span 2; min-height:96px; background:#eef1ff; display:flex; align-items:center; justify-content:center;} .sheet-rolltemplate-pipstat .rt-left img{width:100%; height:100%; object-fit:cover; display:block;} .sheet-rolltemplate-pipstat .rt-header{grid-column:2; padding:6px 8px; border-bottom:2px solid #000; text-transform:uppercase; font-weight:700;} .sheet-rolltemplate-pipstat .rt-body{grid-column:2; padding:8px;} It's just giving errors when I try to gen it into a chat. Is there a coding guru out there that could help me out here? I'm very lost at this point. T.T
1756939625
GiGs
Pro
Sheet Author
API Scripter
It looks like you are trying to make a character sheet.&nbsp; You can't open them from chat. You can't run code from chat, unless you make a script (mod), and you have very limited control over the appearance of forms that pop up. Can you describe what your trying to do without using code? Just in plain language. Then we can tell you what's possible.
I'm trying to make it so when I click on the words "Charm", "Alchemy", "Lore" or "Muscle", it will roll a number of d6s equivalent to how many of the little red diamonds I have filled in to the chat.