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

Question about the Select tag

1484313532
Matthew C
Pro
Sheet Author
Is it possible to make it so that the choices in a select area impact different things? I know I can give them all different values, but for example I want choice 1 to give a bonus to strength and choice 2 to give a bonus to dexterity, is this possible, or is there another way to do this?
1484316805
Finderski
Plus
Sheet Author
Compendium Curator
You can do this, but it would likely require a sheet worker script to accomplish it.
1484321534
Matthew C
Pro
Sheet Author
Is sheet worker the same as API, or is it possible to use sheet worker and still allow everyone to use the sheet? I am creating a sheet for a game I am making, so I do not want to use API.
1484322705
Kryx
Pro
Sheet Author
API Scripter
Sheet workers do not require any access level like plus or pro.
1484324485
Finderski
Plus
Sheet Author
Compendium Curator
Here's the wiki on how to use sheet workers . And here's a snippet of how I did something similar in the Savage Worlds (Tabbed) sheet: //Set Rank according to the XP value on("sheet:opened change:xp change:rank", function() { getAttrs(["xp", "rank", "class"], function(value) { console.log("xp value: " + value.xp); console.log("rank value: " + value.rank); var xpVal = parseInt(value.xp)||0; console.log(xpVal); if (xpVal >=80) { console.log("Setting rank to Legendary"); setAttrs({Rank: 5}); console.log("Setting class to Grad Student"); setAttrs({Class: 5}); } else if (xpVal >=60) { console.log("Setting rank to Heroic");       setAttrs({Rank: 4});       console.log("Setting class to Senior");       setAttrs({Class: 4});       }       else if (xpVal >=40) {       console.log("Setting rank to Veteran");       setAttrs({Rank: 3});       console.log("Setting class to Junior");       setAttrs({Class: 3});       }       else if (xpVal >=20) {       console.log("Setting rank to Seasoned");       setAttrs({Rank: 2});       console.log("Setting class to Sophmore");       setAttrs({Class: 2});       }       else {       console.log("Setting rank to Novice");       setAttrs({Rank: 1});       console.log("Setting class to Freshman");       setAttrs({Class: 1});       }     }); }); //End Rank
1484325645
Matthew C
Pro
Sheet Author
Awesome, as I am just learning how to do everything, it will take some serious effort to learn this (unless someone has an example of my request to make it easier ;p ) but thanks for the info and I am glad it means no pro or plus is needed as I do not want to restrict my sheet :D