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

Old Shadowrun 5e sheet problem

I've run into a character sheet problem I hope the community can help me to fix. I have a Shadowrun 5th edition game which has been on a hiatus for two years (or so). For that game I used an old SR 5 character sheet which doesn't seem to be available anymore (there are two sheets listed for SR 5, neither is the one we're using). I had tweaked the sheet a bit to make it fit our games better (but nothing fancy), so I was using the Custom sheet feature of Roll20. Everything worked splendidly when we last played, but now as I test the sheet as I'm moving the game out of hiatus, the roll buttons on the sheet do not work anymore. When I press the button, nothing happens (no error message, nothing). After I moved the code to the Custom Sheet Sandbox to try to fix it, I noticed the button alignment was off (the skill values were below the button). However, the buttons do work now! Below is an image from the Custom Sheet Sandbox.   After a bit of testing and moving the custom sheet code to a new game (out of the sandbox), I noticed that in the game settings if I have the Legacy Sanitation checked OFF, the result is as above. The values are misaligned, but the buttons work. I can roll the dice with the buttons like before. However, if the Legacy Sanitation is checked ON, the values are no longer misaligned but the buttons do not work anymore (which is the situation in my actual game). Below is an image of that situation. I have no idea how to fix this and if some kind soul could look into the code below and tell me how to fix this. I don't want to switch character sheets to the new ones as I have tons of NPCs and stuff statted out in the game on these old sheets and I doubt they would transfer to the new ones smoothly. Besides I like this sheet more. In a the worst case scenario I can run the game with those misaligned buttons, but with a longer skill list it looks really messy and it isn't optimal in any way. So I would really love to fix this button alignment bug and continue to use the old sheet. Here's the code snippet (as far as I can tell) for the above part of the sheet: <div class="sheet-item sheet-puny"> <input type="hidden" name="attr_knowledgeskilldiesum" value="@{knowledgeskillattr}+@{knowledgeskillbase}+@{knowledgeskillmisc}-@{calcwoundmod}" disabled="true" /> <button class="sheet-hidden-roll" type="roll" name="roll_knowledgeskillroll" value="@{gmonlyrolls}&{template:@{templatechoice}} {{shownotes=@{configshownotes}}} {{name=@{name}}} {{roll_header=Knowledge Skill}} {{v1=@{knowledgeskillname}}} {{v1_num=@{knowledgeskillbase}}} {{v2=Attribute}} {{v2_num=@{knowledgeskillattr}}} {{v3=Misc}} {{v3_num=@{knowledgeskillmisc}}} {{v4=Situational Mod}} {{v4_num=?{Situational Modifiers?|0}}} {{woundpenalty=[[@{calcwoundmod}]]}} {{limit=@{knowledgeskillcalclimit}}} {{result1_label=Successes}} {{result1=[[(@{knowledgeskilldiesum}+?{Situational Modifiers?|0})d6>5sk@{knowledgeskillcalclimit}]]}}" title="Skill Roll" /> <input type="number" name="attr_knowledgeskilltotal" value="@{knowledgeskillattr}+@{knowledgeskillbase}+@{knowledgeskillmisc}" disabled="true" /> </button> </div> <div class="sheet-item sheet-puny"> <button class="sheet-hidden-roll" type="roll" name="roll_knowledgeskillroll" value="@{gmonlyrolls}&{template:@{templatechoice}} {{shownotes=@{configshownotes}}} {{name=@{name}}} {{roll_header=Knowledge Skill}} {{v1=@{knowledgeskillname}}} {{v1_num=@{knowledgeskillbase}}} {{v2=Attribute}} {{v2_num=@{knowledgeskillattr}}} {{v3=Misc}} {{v3_num=@{knowledgeskillmisc}}} {{v4=Situational Mod}} {{v4_num=?{Situational Modifiers?|0}}} {{v5=Specialized}} {{v5_num=2}} {{woundpenalty=[[@{calcwoundmod}]]}} {{limit=@{knowledgeskillcalclimit}}} {{result1_label=Successes}} {{result1=[[(@{knowledgeskilldiesum}+2+?{Situational Modifiers?|0})d6>5sk@{knowledgeskillcalclimit}]]}}" title="Skill Roll" /> <input type="number" name="attr_knowledgeskillspectotal" value="@{knowledgeskillattr}+@{knowledgeskillbase}+@{knowledgeskillmisc}+2" disabled="true" /> </button> </div> Help a poor chummer in trouble, will ya pal!
1716653456

Edited 1716653503
vÍnce
Pro
Sheet Author
Roll20 has probably made a change that is overwriting the sheet's css and messing with the z-index... Who knows. Try adding position and z-index to a couple of the button-related classes; example; .charsheet .sheet-wrapper button[type="roll"], .charsheet .sheet-wrapper .sheet-btn {     position: relative;     z-index: 0; } .charsheet .sheet-wrapper button[type="roll"] label, .charsheet .sheet-wrapper button[type="roll"] input {     position: relative;     z-index: -1; } The input as text inside the button could also be causing a problem.  Maybe try wrapping those inside a span; example; <span><input type="number" name="attr_knowledgeskilltotal" value="@{knowledgeskillattr}+@{knowledgeskillbase}+@{knowledgeskillmisc}" disabled="true" /></span> and <span><input type="number" name="attr_knowledgeskillspectotal" value="@{knowledgeskillattr}+@{knowledgeskillbase}+@{knowledgeskillmisc}+2" disabled="true" /></span>
Unfortunately neither of the above helped. I really didn't know where in the CSS file to stick what you wrote, so I stuck it under the header 'Main Styles' (image below). Maybe that's wrong, I really don't know anything about CSS. I only have a passing knowledge of HTML. Thanks for the advice, anyhow. Maybe I should try to delete the input inside the button, perhaps. Or what do you suggest? I noticed that there are buttons that do work on the sheet. For example this Defense Roll (below) works just fine and is aligned correctly. The code for that section is as follows: <div class="sheet-item sheet-big"> <input type="hidden" name="attr_avoidrollsum" value="@{reaction}+@{intuition}+@{avoidmisc}-@{calcwoundmod}" diabled="true" /> <button type="roll" name="roll_avoidance" value="@{gmonlyrolls}&{template:@{templatechoice}} {{shownotes=@{configshownotes}}} {{name=@{name}}} {{roll_header=Avoidance Roll}} {{v1=Avoidance}} {{v1_num=@{avoid}}} {{v2=Avoid Misc}} {{v2_num=@{avoidmisc}}} {{woundpenalty=[[@{calcwoundmod}]]}} {{v9=Situational Modifiers?}} {{v9_num=?{Situational Modifiers?|0}}} {{result1_label=Hits Avoided}} {{result1=[[(@{avoidrollsum}+?{Situational Modifiers?|0})d6>5s]]}}" title="Defense Roll"> <input type="text" name="attr_avoidancebutton" value="@{avoidrollsum}" disabled="true" /> </button> </div> Any thoughts on why this button works, but the Knowledge Skills one doesn't.
1716671598

Edited 1716672169
vÍnce
Pro
Sheet Author
I did a quick test using the sheet's code on the repo here Not sure if that's the right sheet...? I was able to get the skill rolls to work with the changes mentioned above.  Actually just the Active skills.  The Knowledge still appears to be hidden or something...  Hmmm? Some of those other button are using a label around the button's text. The buttons with the problem appear to be using an input as the text which shows the total adjusted mod. Do you have a link to your code?  maybe pastebin, gist, or similar?  You might be able to DM me the code as well (be sure use the "code" format option and maybe send css and html as separate messages.) I'm sure I can help you get it worked out.
1716674301

Edited 1716674357
vÍnce
Pro
Sheet Author
Seems like the Knowledge skills in the code I are actually setup the same as the active skills. Same attribute names. This causes the knowledge skills to fail.  It also was causing the button text to not render since the attribute names were not correct.  I switched the attribute names to be "knowledgeskill..." instead of "activeskill..." and they now appear to work as well. 
DM sent. Had to split it in several parts as it was too big (and blocked) otherwise.
1716676818
vÍnce
Pro
Sheet Author
It's one of the drawbacks with code on the forums.  I'll have a look-see and post back.
1716678102

Edited 1716680224
vÍnce
Pro
Sheet Author
Just needed to add the position: relative and the proper z-index for the buttons.  Make sure you are in legacy mode unless you convert the sheet. A sandbox game will require sheet.json of { "legacy": true } Custom game; just use the legacy toggle in the game settings. Also, the css file had an extra } which can cause problems. line:731 So, replace these classes in your css with my updated version. (just do a text search on the css file to locate) .charsheet .sheet-wrapper button[type="roll"], .charsheet .sheet-wrapper .sheet-btn { width: 100%; height: 24px; vertical-align: middle; padding: 0; display: inline-block; margin: 0; font-weight: 400; text-align: center; cursor: pointer; background-image: none; background-color: #00A000; border: 1px solid #ccc; white-space: nowrap; border-radius: 4px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;     position: relative;     z-index: 0; } .charsheet .sheet-wrapper button[type="roll"] label, .charsheet .sheet-wrapper button[type="roll"] input { height: 24px; line-height: 24px; font-size: 12px; vertical-align: middle; text-align: center; width: 99%; cursor: pointer; background: none; box-shadow: none; transition: none; border-radius: none; border: none; position: relative; z-index: -1; } BTW: that css change allowed me use the buttons(ie I get query prompt), but they didn't seem to actually send anything to chat. So not sure if there are further issues with the actual macro being sent to chat or perhaps the roll template? example; I rolled the Active Skill and got the query, but nothing posted in chat. When I checked to see what was sent to chat from the roll @{Mojo|gmonlyrolls}&{template:@{Mojo|templatechoice}} {{shownotes=@{Mojo|configshownotes}}} {{name=@{Mojo|name}}} {{roll_header=Active Skill}} {{v1=Test 1}} {{v1_num=0}} {{v2=Attribute}} {{v2_num=@{Mojo|body}}} {{v3=Misc}} {{v3_num=0}} {{v4=Situational Mod}} {{v4_num=?{Situational Modifiers?|0}}} {{v5=Specialized}} {{v5_num=2}} {{woundpenalty=[[@{Mojo|calcwoundmod}]]}} {{limit=[[((((10 + + + )/3)-.0001+(1-(((10 + + + )/3)-.0001)%1))+0)]]}} {{result1_label=Successes}} {{result1=[[(0+2+?{Situational Modifiers?|0})d6>5sk[[((((10 + + + )/3)-.0001+(1-(((10 + + + )/3)-.0001)%1))+0)]]]]}} I'm guessing that something in there is breaking the output. The "+ + +" are highly suspect to me. It might be that I have to fully fill out the sheet in order for certain attributes to be created? Not sure. Just thought I would mention it.
Hooray, that did it! The buttons work now and the values are aligned correctly - for Active and Knowledge Skills both and for all other cases too. Many, many thanks! I owe you a beer or three. BTW, the Active Skill snippet you posted above is something I cannot find on my sheet. I did a text find on the HTML of those triple plusses and the "/3)-.0001" bit (as it looked so weird) and got no hits. The corresponding part (I think) looks like this in my sheet code: <input type="hidden" name="attr_activeskilldiesum" value="@{activeskillattr}+@{activeskillbase}+@{activeskillmisc}-@{calcwoundmod}" disabled="true" /> <button class="sheet-hidden-roll" type="roll" name="roll_activeskillroll" value="@{gmonlyrolls}&{template:@{templatechoice}} {{shownotes=@{configshownotes}}} {{name=@{name}}} {{roll_header=Active Skill}} {{v1=@{activeskillname}}} {{v1_num=@{activeskillbase}}} {{v2=Attribute}} {{v2_num=@{activeskillattr}}} {{v3=Misc}} {{v3_num=@{activeskillmisc}}} {{v4=Limit Mod}} {{v4_num=@{activeskilllimitmod}}} {{v5=Situational Mod}} {{v5_num=?{Situational Modifiers?|0}}} {{woundpenalty=[[@{calcwoundmod}]]}} {{limit=@{activeskillcalclimit}}} {{result1_label=Successes}} {{result1=[[(@{activeskilldiesum}+?{Situational Modifiers?|0})d6>5sk@{activeskillcalclimit}]]}}" title="Skill Roll" /> <input type="number" name="attr_activeskilltotal" value="@{activeskillattr}+@{activeskillbase}+@{activeskillmisc}" disabled="true" /> </button> I have the buttons rolling correctly (and asking modifier queries), plus they do send the result to chat correctly which is essential of course. Don't know why it won't work for you. Maybe it's about not fully filling out the sheet, like you thought. There are many parts that depend on each other (welcome to SR 5), like the limits for skill rolls requiring attribute and Essence values and so on.
1716728191

Edited 1716728312
vÍnce
Pro
Sheet Author
Awesome! Regarding the sheet roll output;  what I posted was actually sent to chat after I made the roll. A cool trick you can do is make a roll from the sheet, then click in the chat command window and use the ↑ (up arrow) key to show what was actually sent to chat.  You can actually step through previous commands backward and forward as well.  Very handy trick when you want to learn about roll templates and troubleshooting macros.  So, I wasn't seeing anything actually posting to the output window, but I knew a roll had been made.  I used the trick to see what the button actually sent to chat just to help decipher things.  It looks to me like some of the attributes included with the macro haven't been resolved yet, which more than likely indicates that other areas of the sheet needed to be filled out.  Since the macro only had part of it's necessary data, it was failing to complete.  No errors, but it just wasn't posting anything. Glad you've got it working.  Have fun tweaking the sheet.  It can be very addicting.