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

Is there a way to change certain boxes and calculations to be editable like the AC?

Hey so how would I go about changing the initiative or rather any other box in this  sheet code  to make it editable for my players? In my current campaign we don't really have a need for Initiative so I was wondering if I could just repurpose it
1654899957
GiGs
Pro
Sheet Author
API Scripter
The sheet itself cannot be edited by players (or GMs either). There might be a way to do what you want. What specific change do you want to do?
Well you see that's the problem, I know that I cant edit the initiative on the sheet itself so I was wondering if there was anything in the code specifically I could change to be able to make the initiative editable, specifically that
1654907067
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You'd need to change span on line 1657 to an input with type number. You'd also almost certainly want to remove the  update_initiative  function that starts on line 11794, and you'll want to remove any line that calls that function as well.
1654907127
GiGs
Pro
Sheet Author
API Scripter
You can make the box editable, and you could replace the label with an editable box, but you can't make the underlying attribute names editable (which store the values of anything entered in those boxes).
How would I go about doing that? I don't really have any experience in coding rather than a few really really bare-bones basics.  Scott C. said: You'd need to change span on line 1657 to an input with type number. You'd also almost certainly want to remove the  update_initiative  function that starts on line 11794, and you'll want to remove any line that calls that function as well. This? with like a <input type="number"> is that all I need to do? Beyond the deleting and stuff