Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Difference between revisions of "Custom Roll Parsing"

From Roll20 Wiki

Jump to: navigation, search
(consolidate "Custom Roll Parsing" docs to new page)
 
m
Line 1: Line 1:
{{pro only}}''Main Article:'' '''[[Building Character Sheets]]'''
+
{{revdate}}{{pro only}}''Main Article:'' '''[[Building Character Sheets]]'''
{{NavSheetDoc}}
+
  
  
 
'''Custom Roll Parsing''' ('''CRP''') is a new capability for character sheets can now combine the functionality of [[Button#Roll_Button|roll buttons]] and [[Button#Action_Button|action buttons]] to allow for a new custom roll parsing. It was release July 13th, 2021.{{source|https://help.roll20.net/hc/en-us/articles/360037772613-Change-Log#july-13-2021-0-21}}
 
'''Custom Roll Parsing''' ('''CRP''') is a new capability for character sheets can now combine the functionality of [[Button#Roll_Button|roll buttons]] and [[Button#Action_Button|action buttons]] to allow for a new custom roll parsing. It was release July 13th, 2021.{{source|https://help.roll20.net/hc/en-us/articles/360037772613-Change-Log#july-13-2021-0-21}}
 
+
{{NavSheetDoc}}
 
* {{fpl|10296045/ Oosh's explanation of CRP}}
 
* {{fpl|10296045/ Oosh's explanation of CRP}}
 
* {{hc|articles/4403865972503-Custom-Roll-Parsing-for-Character-Sheets Custom Roll Parsing for Character Sheets}}
 
* {{hc|articles/4403865972503-Custom-Roll-Parsing-for-Character-Sheets Custom Roll Parsing for Character Sheets}}

Revision as of 18:41, 21 September 2021

Main Article: Building Character Sheets


Custom Roll Parsing (CRP) is a new capability for character sheets can now combine the functionality of roll buttons and action buttons to allow for a new custom roll parsing. It was release July 13th, 2021.


Parts

Currently you can only display computed values in the first 10 fields that are sent in the macro.


Example:

<button type="action" name="act_test">Click me</button>

<rolltemplate class="sheet-rolltemplate-test">
    <div class="sheet-template-container">
        <h1>{{name}}</h1>
        <div class="sheet-results">
            <h4>Result = {{roll1}}</h4>
            <h4>Custom Result = {{computed::roll1}}</h4>
        </div>
    </div>
</rolltemplate>

<script type="text/worker">
    on('clicked:test', (info) => {
        startRoll("&{template:test} {{name=Test}} {{roll1=[[1d20]]}}", (results) => {
            const total = results.results.roll1.result
            const computed = total % 4;

            finishRoll(
                results.rollId,
                {
                    roll1: computed
                }
            );
        });
    });
</script>

Forum threads

See Also