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

Html noob. Can a char sheet do this?

Many games have stats which determine various things like say an initiative bonus. I know you can put a table into a webpage but what I want is to have an input where a person puts a number and then the web page compares that number in various internal tables and puts output in the determined slots. So John has agility of 18 so he gets an initiative bonus of 6. He only has to put the agility in and the initiative bonus is calculated from a table. I am not looking for a mathematical function since there are lots of tables with varying spreads jut the ability that when something is put in the stat slot each of the derived things, probably from all different tables give results. Is that possible just from character sheet code, or does it require the api too? Sorry if this is confusing I am a bit tired.
1465032791
Finderski
Pro
Sheet Author
Compendium Curator
Short answer, yes, it can be done. Depending on what all is involved Character Sheets can do Calculated Fields, or Sheet Workers (kind of like mini-API). What your describing sounds like Sheet Workers would be the way to go.  And just so you know, while Sheet Workers is JavaScript, it does not require a Pro account to be used. Sheet workers are part of the character sheet, and sheet workers work for anyone who is using that character sheet regardless of account type.
I was thinking of doing the code academy classes on html and javascript. I know html is standardized but is javascript a standard that if I learned it there it would be the same kind used by roll20?
1465064073
Finderski
Pro
Sheet Author
Compendium Curator
I believe so, but there are some things you can't do/funcions/commands that are restricted on roll20 to keep the environment safe and stable.
1465094175
Lithl
Pro
Sheet Author
API Scripter
Sylverlokk said: I was thinking of doing the code academy classes on html and javascript. I know html is standardized but is javascript a standard that if I learned it there it would be the same kind used by roll20? Technically , JavaScript is an implementation of the ECMAScript standard. But writing JavaScript is extremely common for web development, since it is the only reliable means to produce client-side behavior, and one means of doing server-side stuff as well. Learning JavaScript for Roll20 will teach you library functions only available on Roll20 (such as sendChat) and won't teach you library functions only available in other contexts (such as require with NodeJS), but learning a library is the most trivial part of learning a language.