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

New to charactersheets and have a few questions

1626343318
Chris D.
Pro
Sheet Author
Hiya, I am most of the way through creating my first charactersheet and have a few questions before I can call v1 done. 1) Is there a checking, review or approval process for the charactersheet before it is uploaded to the collected sheets Git, or does all of that happen once it is uploaded.  I am unsure if there is somewhere else I need to submit it for code checking etc. 2) Working on a roll template, is there a way to insert an if/else statement into a roll without involving an API script?  Basically I need to check if a skill has points in it, if yes: roll some dice. If no: roll some different dice. I hope that this makes sense. Thanks in advance.
1626554266
Chris D.
Pro
Sheet Author
I have managed to figure out a way of working with the rollTemplates so that I can check stats and roll results to make the equivalent of an if/else statement. I have not got it perfect yet as it seems to have a problem with one of my variables (while I can display that variable, when I ask for it to be read it falls over. It works with a fixed number though) but I am sure I can get there eventually. As for the other thing, once I am happy with how it works I’ll just submit it and go from there.  Thanks. 
1626555960
GiGs
Pro
Sheet Author
API Scripter
For posting your character sheet, there's only a basic checking process and that happens when you submit the sheet. For your rolltemplate issue, it would help to show your code - both the button that launches the rolltemplate and the code of the template.
1626683048
Richard W.
Pro
Sheet Author
API Scripter
Compendium Curator
If this is a new sheet then make sure you read and follow the guidelines. There are a few things that will make the basic checking that GiGs mention, e.g. if&nbsp; you include other translations files than then translation.json. For a new sheet for a homebrew game I also think they need the rules to be linked to in the sheet.json and freely available, but that might not be so strict.&nbsp; I bet you have seen these already, but posting for posterity as well: <a href="https://wiki.roll20.net/Building_Character_Sheets#Roll20_Character_Sheets_Repository" rel="nofollow">https://wiki.roll20.net/Building_Character_Sheets#Roll20_Character_Sheets_Repository</a> &nbsp; <a href="https://wiki.roll20.net/BCS#Submitting_a_character_sheet_for_public_use" rel="nofollow">https://wiki.roll20.net/BCS#Submitting_a_character_sheet_for_public_use</a> &nbsp; <a href="https://wiki.roll20.net/Beginner%27s_Guide_to_GitHub#Create_a_PULL_Request" rel="nofollow">https://wiki.roll20.net/Beginner%27s_Guide_to_GitHub#Create_a_PULL_Request</a> <a href="https://wiki.roll20.net/Character_Sheet_i18n" rel="nofollow">https://wiki.roll20.net/Character_Sheet_i18n</a> &nbsp;(translation) About the roll template, I find that often a conditional CSS display of different buttons is better performance and easier set up than doing things in sheetworkers. You could display one button if the value of the skill is 0 and another button in all other cases, and have the two buttons call different rolls with different dice.&nbsp;
1626699133
Chris D.
Pro
Sheet Author
Thanks very much for getting back to me on this.&nbsp; I'll certainly check out the links you provided.&nbsp; I think I have seen some before as I have gone through the process of setting up to upload to the Git hub, but I'll review all of them to make sure there is nothing I am missing.&nbsp; I think I'll need to look into the translation files a bit more as this is something I am missing.&nbsp; The example I was copying from didn't have one (or I missed it, equally likely). I am still working on the sheet in a Sheet sandbox and it is 90% working as intended, although I am still working on a couple of bugs and am thinking of improving it with repeating sections (which I am still trying to get my head around).&nbsp; The sheet is for a published game called Red Markets, which uses a system where 2 d10s are rolled. One is red for the difficulty and one is black for success.&nbsp; Add your skill to the back and try to get over the red.&nbsp; If you have no ranks in the skill (defaulting) you try to roll under your key attribute for that skill (your Potential) in order to succeed. You might be right about the 2 buttons, but I am fairly happy with the checking code I have found, I just need to get it to display right. Code for the button is currently: &lt;button type="roll" name="roll_skill"&nbsp;value="&amp;{template:customRM} {{title=Unarmed Roll}} {{subtitle=@{character_name}}} [[ [[1d10]] + [[@{unarmed}]] + [[?{bonus|0}]] ]] {{firstroll=$[[0]]}} {{skl=$[[1]]}} {{bonus=$[[2]]}} {{total=$[[3]]}} {{poten=@{str}}} {{secondroll=[[1d10]]}}"&gt;&lt;/button&gt; The roll consists of a 1d10 roll &nbsp; / the relevant skill (in this case Unarmed Combat) and a bonus &nbsp;if one is needed. The roll also captures: firstroll = the first d10 value skl = the value of the skill used bonus = the bonus (if any) applied total = the combined value of firstroll+skl+bonus poten = the value of the key attribute (Potential) for that skill.&nbsp; This is the difficulty of the skill roll if there is no points in the skill (roll under your potential) secondroll = a second d10 roll which functions as the difficulty of the skill roll if the skill has a value above 0 The RollTemplate code is currently (cut down version for simplicity): &lt;rolltemplate class="sheet-rolltemplate-customRM"&gt; &nbsp; {{#rollTotal() skl 0}} &nbsp; &nbsp; &nbsp; &nbsp; &lt;!-- checks if the skill has no ranks and displays the defaulting display --&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class="sheet-key"&gt;&lt;span class="black"&gt;Black: &lt;/span&gt;&lt;/div&gt; &nbsp; &nbsp; &nbsp; &nbsp; {{#firstroll}}&lt;div class="sheet-value"&gt;&lt;span class="black"&gt;{{firstroll}}&lt;/span&gt;&lt;/div&gt;{{/firstroll}} &lt;div class="sheet-key"&gt;&lt;span class="red"&gt;Red: &lt;/span&gt;&lt;/div&gt; &nbsp; &nbsp; &nbsp; {{#poten}}&lt;div class="sheet-value"&gt;&lt;span class="red"&gt;{{poten}}&lt;/span&gt;&lt;/div&gt;{{/poten}} &lt;div class="sheet-desc"&gt; &nbsp; Result: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {{#rollLess() firstroll poten}} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;span&gt;Success&lt;/span&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {{/rollLess() firstroll poten}} &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {{#^rollLess() firstroll poten}} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;span&gt;Failure&lt;/span&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {{/^rollLess() firstroll poten}} &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;&lt;!--end of sheet-desc--&gt; &nbsp; &nbsp; {{/rollTotal() skl 0}} &nbsp;&nbsp; &nbsp; {{#rollGreater() skl 0}} &nbsp; &lt;!-- if the skill has ranks then roll normally --&gt; &nbsp;&nbsp;&lt;!-- Lots more code in here --&gt; &nbsp; {{/rollGreater() skl 0}} &lt;/rolltemplate&gt; Currently it works okay except while it is sucessfully checking if skl = 0 and displaying firstroll and poten it is not outputting Success or Failure at the end. However, when I set poten to a fixed number in the code (e.g. 3) it works fine.&nbsp; I'll figure it out and it's a minor gripe at the moment.&nbsp;&nbsp; I hope that this answers some questions.&nbsp; I'll keep on plugging away in my spare time. Thanks again.
1626714726

Edited 1626714739
GiGs
Pro
Sheet Author
API Scripter
In your button, this {{poten=@{str}}} should be {{poten=[[@{str}]]}} Numbers must always be put inside inline roll brackets, or they wont be recognised as numbers by the rolltemplate logic functions. As far as, say, rollLess is concerned, "3" is not a number, it's text, and it doesn't recognise it. But it does recognise [[3]].
1626723552
Chris D.
Pro
Sheet Author
Excellent.&nbsp; Thank you very much for that.