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

[SWNR] Sheet will not accept decimal encumberance amounts

As per the title, whenever one of my players enters in a decimal encumbrance item such as a laz patch or ammo, it will not let them enter in any additional details.
1591719274
GiGs
Pro
Sheet Author
API Scripter
Is this just happening to that one player?
It's happened to three players
1591754516
GiGs
Pro
Sheet Author
API Scripter
Are there any players that can enter decimal values? Can you?
I can enter the values, but it keeps saying that the nearest values are 0 and 1, and says that anytime i try to add another entry field into the sheet
1591853165
GiGs
Pro
Sheet Author
API Scripter
I see the issue in the code. For some reason the gear_encumbrance has been set to a number field with step 1, which means it wont accept decimal values.  I've raised an issue on the roll20 repo, and pinged the sheet's maintainers. Hopefully one will respond before Monday when the sheets get updated.
Thank you, GiGs.
So this was actually changed by request recently, as stepping by 0.01 makes the arrows and scrolling completely pointless. I'm curious what your use case for decimal encumbrance is? The consensus was that bundles of items can be tracked as one item per bundle. Regardless, I didn't consider that it would pop up a validation message. As far as I can tell that's the only thing it does, everything else still works with decimals (apart from the arrows, but tbh they're more useful stepping by 1 than 0.01), so I think the best option is to just add a mouseover text which overrides the validation message (saying "Encumbrance", because the label only says "Enc" anyway). It'll be in the next push on monday I guess.
Oh and for future reference I'm much more likely to see issues posted to the sheet's GitHub , which is also linked at the bottom-right of the sheet. That way I'll see it right away instead of after someone else finds it and pings me :)
I was/am unaware of any sort of "consensus" about updated rules for this system. I don't even have any idea where such a consensus would be derived. I'm not sure that popular opinion of a select group should apply to every group. The only thing I did was instruct my players to take equipment packages, which come with ammunition and such, most of which are .33 rather than 1, which to my knowledge makes sense because it says in the book some items have a less-than-1 enc. 
1591898444
GiGs
Pro
Sheet Author
API Scripter
Karl H. said: So this was actually changed by request recently, as stepping by 0.01 makes the arrows and scrolling completely pointless. I'm curious what your use case for decimal encumbrance is? The consensus was that bundles of items can be tracked as one item per bundle. Regardless, I didn't consider that it would pop up a validation message. As far as I can tell that's the only thing it does, everything else still works with decimals (apart from the arrows, but tbh they're more useful stepping by 1 than 0.01), so I think the best option is to just add a mouseover text which overrides the validation message (saying "Encumbrance", because the label only says "Enc" anyway). It'll be in the next push on monday I guess. Chrome handles step values very intrusively. Just adding a popup wont stop them. It would be better to remove the Step completely, and just allow free entry.
The "consensus" was derived from some informal discussions on the SWN community Discord server , where the issue of the arrows on the numbers field being absolutely useless was brought up. I'm not trying to prescribe some playstyle here, just make the sheet more useful in how it interacts. To that end I sometimes have to make judgements on what is the more likely interaction mode. To be clear: we weren't discussing some kind of rule change, just how to best and most convieniently represent items on the character sheet. A bundle of (up to) three items has 1 encumbrance, and we felt it made more sense to put down bundles as their own row in the list. The Discord server is also, incidentally, a better place to reach me in the future, though I do now get updates to this thread specifically. As for GiGs' point, I was unaware of Chrome being extra intrusive on this, though I am unable to replicate anything more intrusive than defaulting back to a whole number when the selection arrows are used (once the validation message is overwritten, that is). Regardless, number inputs also take a step="any" attribute, which makes the selection arrows increment in whole numbers without giving validation errors. This will be the functionality going forward. As for the items that carry a 0.33 encumbrance, this might be changed (in the autofilling, of course. Anything already in your list will stay the same). Ammo and power cells carry an encumbrance of 1 normally, but can be bundled into a bundle of 3. Since unpacking a bundle takes a main action, it seems reasonable to represent them separately in the list (as "Power cell, Bundle of 3" with 1 enc). This will not, of course, stop a player from changing the encumbrance value to 0.33 to represent them that way. A toggle to represent bundling is also possible (with the associated encumbrance reduction), but this won't be part of this week's fix.
1591979877

Edited 1591979897
GiGs
Pro
Sheet Author
API Scripter
Sorry, i meant firefox not Chrome. The intrusiveness I'm referring to is when you try to enter a value that doesnt match the step value. It will warn you of an error, putting a red border around the attribute that wont go away, and sometimes jerking your cursor back to it when you try to enter data elsewhere. If the spinner arrows are the issue, it's better to just get rid of them in CSS with code like /* Chrome, Safari, Edge, Opera */ input::-webkit-outer-spin-button, input::-webkit-inner-spin-button  {   -webkit-appearance :  none ;   margin :  0 ; } /* Firefox */ input[type=number]  {   -moz-appearance :  textfield ; }
I've tested step="any" and it does what I want. The arrows step by 1 (which is a useful feature), but there's no validation messages. I'd rather not get rid of the arrows since they are actually useful when they step by 1, and since this disables the validation on the field this shouldn't be an issue anymore. I appreciate the suggestion, though! And thanks, btw, for letting me know about this in the first place. Both Outsider for reporting it and GiGs for pinging me on GitHub where I get alerted.
Okay, turns out I had some time and motivation, so here's the situation: Input validation is going away. Decimals will be accepted, but the spinner arrows will increment by whole numbers (so 1.5 -> 2.5, for instance). A new "Bundled" checkbox is added. When checked the encumbrance score for that row is divided by 3 (and rounded up). This reflects the rules better, as they don't deal with decimal encumbrance but rather packing several items into 1. Ammo, powercells, etc will now autofill with encumbrance value 1, but with the bundled chachbox checked (to indicate that they can be bundled). In the preview they will display "Enc 1#". This is in line with the way they are displayed in the rulebook.
That sounds acceptable, thank you for the update and explaining it.