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

Please help me finish my custom sheet. I'll pay you

1602186722

Edited 1602187046
Pete
Pro
Marketplace Creator
Sheet Author
I have a custom sheet for my homebrew system.  Someone else helped me make it, but I've made tweaks along the way. As a total amateur, I've managed to mostly fix what I need up until now, but I'm looking for someone to help me make some finishing touches. What I need: Adjust formatting. I'm a total scrub at coding and a few of the alignments are off due to my meddling. Should be a super easy fix for anyone that knows how to code. Return values from a table. I have a small table (already html coded into the sheet) and drop down menus set up. I'd like the drop down menu option selected to return a value in reference to the table. If anyone's willing to help, please PM me and I can provide the sheet html/css and specifics.
1602187359
GiGs
Pro
Sheet Author
API Scripter
I'd be happy to talk prices with you. But honestly, these seem like the kind of small, self-contained problems that the forums are great at solving with no payment required. The second one, at least. The first one could be simple, or could require major changes to code to achieve, depending on how the sheet is built. I suggest first posting a bit more information on what you need. You'd need to do this for anyone you were paying anyway.  For the table problem: post the code for the html table and dropdowns you have, and describe what value you want to get from the table. For the formatting problem, post a section of html where the problem is visible, and all the CSS that affects that section of the table. You can also  post your entire sheet code into pastebin or somewhere similar, but don't just  do that - post a snippet as described here where the problem is visible. This will help people figure out where the problem is.
1602188934

Edited 1602188987
Pete
Pro
Marketplace Creator
Sheet Author
Thanks for the quick reply. The system has a proficiency system similar to pathfinder 2e, but unfortunately, not so simple on the math. The drop down menus select your proficiency, which combined with your level should yield a number. The bonuses start 1 apart but end 2 apart in 10 levels, so the pattern isn't a simple math one, hence the table reference. My drop downs look like this: (The game calls them competencies, hence the name "skillcomp") <div class="lineheight1" > <select style="grid-column:3;width:95%;text-align:center;vertical-align:bottom;" name="attr_skillcomp" id="skillcomp"> <option value="1">Cursed</option> <option value="2">Flawed</option> <option value="3"selected>Average</option> <option value="4">Trained</option> <option value="5">Exceptional</option> <option value="6">Master</option> <option value="7">Legendary</option> </select> </div> And that works all well and good. Next to each of these is a simple text box so people can put in what their actual value is depending on their level. What I'd like to instead do is to have the thing pull your level and "competency" and return what the bonus is, according to the table. <table class="comp-table"> <thead><tr class="comp-firstrow"><th>lvl</th><th>Cursed</th><th>Flawed</th><th>Average</th><th>Trained</th><th>Exceptional</th><th>Master</th><th>Legendary</th></tr></thead><tbody> <tr><td>0.25</td><td>-2</td><td>-1</td><td>0</td><td>0</td><td>0</td><td>1</td><td>2</td></tr> <tr><td>0.5</td><td>-2</td><td>-1</td><td>0</td><td>0</td><td>1</td><td>2</td><td>3</td></tr> <tr><td>0</td><td>-2</td><td>-1</td><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td></tr> <tr><td>1</td><td>-2</td><td>-1</td><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td></tr> <tr><td>2</td><td>-2</td><td>-1</td><td>0</td><td>1</td><td>2</td><td>4</td><td>5</td></tr> <tr><td>3</td><td>-2</td><td>-1</td><td>0</td><td>1</td><td>3</td><td>4</td><td>5</td></tr> <tr><td>4</td><td>-2</td><td>-1</td><td>0</td><td>2</td><td>3</td><td>5</td><td>6</td></tr> <tr><td>5</td><td>-2</td><td>-1</td><td>1</td><td>2</td><td>4</td><td>5</td><td>6</td></tr> <tr><td>6</td><td>-1</td><td>0</td><td>1</td><td>3</td><td>4</td><td>6</td><td>7</td></tr> <tr><td>7</td><td>-1</td><td>0</td><td>1</td><td>3</td><td>5</td><td>6</td><td>7</td></tr> <tr><td>8</td><td>-1</td><td>0</td><td>1</td><td>3</td><td>5</td><td>7</td><td>8</td></tr> <tr><td>9</td><td>-1</td><td>0</td><td>1</td><td>4</td><td>6</td><td>7</td><td>8</td></tr> <tr><td>10</td><td>-1</td><td>0</td><td>2</td><td>4</td><td>6</td><td>8</td><td>9</td></tr> </tbody></table> As for referencing, there is already an attr_level. Any help would be greatly appreceiated, and as I said. I'm extremely amateur at this. Self taught, by trial, error, and google. 
1602190097

Edited 1602190152
GiGs
Pro
Sheet Author
API Scripter
This seems pretty simple with a sheet worker. Can you clarify that the level progression goes 0.25. 0.5, 0, 1, 2? It seems strange that 0 is above 0.5. Also, if so, wouldnt it be better to have the levels be -2, -1, 0, 1, 2...?
1602190867

Edited 1602191006
Pete
Pro
Marketplace Creator
Sheet Author
Actually, should just remove 0. I think it was in there as a band aid to fix some excel reference from my excel sheet that I copied the table from.
1602191706
GiGs
Pro
Sheet Author
API Scripter
What happens to that row of values? It does look like its idential to the level 1, so I guess just delete that entire row? Also can level ever be 0?
1602192019

Edited 1602192206
Pete
Pro
Marketplace Creator
Sheet Author
Yes, delete it. Level cannot be 0. It's set to be at level 1 when a new sheet is created and the .5/.25 are just for scrub enemies.
1602192840

Edited 1602193193
GiGs
Pro
Sheet Author
API Scripter
Is the skillcomp in a repeating section, and if so, what's the fieldset name? If its not in a repeating section, is there just one skillcomp stat? How do you distinguish between different skills competencies? Also what is the name of the attribute where the competence value is saved?
1602193098
Pete
Pro
Marketplace Creator
Sheet Author
It is a repeating section, but I also use the same drop downs for things that aren't skills, that themselves are not in repeating sections. There is also an attr_pecomp, attr_sdcomp, attr_wlcomp, and attr_fccomp. That is it.
1602193310
GiGs
Pro
Sheet Author
API Scripter
What is the repeating section named? For those dropdowns in the repeating section, what is the name of the attribute where the table value gets stored? For those attributes outside the repeating section, what are names of the attributes where those values get stored?
1602194326
Pete
Pro
Marketplace Creator
Sheet Author
1. Do you mean this? <fieldset class="repeating_skills2"> 2. It's text entry now, called Attr_rank. 3. attr_PEMod Attr_SDMod Attr_WLMod and Attr_FCMod
1602195909
GiGs
Pro
Sheet Author
API Scripter
Okay, I have a solution for you. You have to do two things in preparation. First, change your selects to remove the value= part from the options, like this:     <select name="attr_skillcomp" id="skillcomp">         <option>Cursed</option>         <option>Flawed</option>         <option selected>Average</option>         <option>Trained</option>         <option>Exceptional</option>         <option>Master</option>         <option>Legendary</option>     </select>         If you dont put a value in the options, it just uses the text as the option value. Secondly, check if your sheet has a script block. It's a section of code in the html file that starts <script type="text/worker"> and ends </script> If your sheet doesnt have that, add a script block at the end of your html, like this: <script type="text/worker"> </script> Now, copy all of the code below and paste it into your html just after the first line of the script block. Dont worry about its complexity. You dont need to edit it. And your proficiency values should now update automatically, whenever you change level or any of the dropdowns. const table_proficiencies = {     '0.25': {Cursed: -2,    Flawed: -1,     Average: 0,     Trained: 0,     Exceptional: 0,     Master: 1,  Legendary: 2    },      '0.5': {Cursed: -2,     Flawed: -1,     Average: 0,     Trained: 0,     Exceptional: 1,     Master: 2,  Legendary: 3    },      '1': {  Cursed: -2,     Flawed: -1,     Average: 0,     Trained: 1,     Exceptional: 2,     Master: 3,  Legendary: 4    },      '2': {  Cursed: -2,     Flawed: -1,     Average: 0,     Trained: 1,     Exceptional: 2,     Master: 4,  Legendary: 5    },      '3': {  Cursed: -2,     Flawed: -1,     Average: 0,     Trained: 1,     Exceptional: 3,     Master: 4,  Legendary: 5    },      '4': {  Cursed: -2,     Flawed: -1,     Average: 0,     Trained: 2,     Exceptional: 3,     Master: 5,  Legendary: 6    },      '5': {  Cursed: -2,     Flawed: -1,     Average: 1,     Trained: 2,     Exceptional: 4,     Master: 5,  Legendary: 6    },      '6': {  Cursed: -1,     Flawed: 0,      Average: 1,     Trained: 3,     Exceptional: 4,     Master: 6,  Legendary: 7    },      '7': {  Cursed: -1,     Flawed: 0,      Average: 1,     Trained: 3,     Exceptional: 5,     Master: 6,  Legendary: 7    },      '8': {  Cursed: -1,     Flawed: 0,      Average: 1,     Trained: 3,     Exceptional: 5,     Master: 7,  Legendary: 8    },      '9': {  Cursed: -1,     Flawed: 0,      Average: 1,     Trained: 4,     Exceptional: 6,     Master: 7,  Legendary: 8    },      '10': { Cursed: -1,     Flawed: 0,      Average: 2,     Trained: 4,     Exceptional: 6,     Master: 8,  Legendary: 9    }  }; const valid_levels = ['0.25', '0.5', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10']; ['pe', 'sd', 'wl', 'fc'].forEach(comp => {     on(`change:level change:${comp}comp sheet:opened`, () => {         getAttrs([`${comp}comp`, 'level'], values => {             const output = {};             const level = values.level;             if(valid_levels.includes(level)) {                 const comp_level = table_proficiencies[level] || table_proficiencies['1'];                 const comp_label = values[`${comp}comp`];                 output[`${comp}mod`] = comp_level[comp_label] || 0;             } else {                 output[`${comp}mod`] = 0;             }             setAttrs(output);         });     }); }); on('change:level change:repeating_skills2:skillcomp sheet:opened', () => {     getSectionIDs('repeating_skills2', idarray => {         const fieldnames = idarray.reduce((arr, id) => [...arr, `repeating_skills2_${id}_skillcomp`], []);         getAttrs([...fieldnames, 'level'], values => {             const output = {};             const level = values.level;             idarray.forEach(id => {                 if(valid_levels.includes(level)) {                                  const comp_level = table_proficiencies[level] || table_proficiencies['1'];                     const comp = values[`repeating_skills2_${id}_skillcomp`];                     output[`repeating_skills2_${id}_rank`] = comp_level[comp] || 0;                 } else {                     output[`repeating_skills2_${id}_rank`] = 0;                 }             });             setAttrs(output);         });     }); });
1602197133
Pete
Pro
Marketplace Creator
Sheet Author
Thank you! This is fantastic!
Thank you!