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

Conditional attribute boni in charsheets

Hi (hope this is the correct subforum). I looked and looked but didn't see anything conclusive there: If one defines a new charsheet is it possible to define specific values depending on what another value is? To be more exact there: Lets take a field attr_species if it is "dwarf" that you have in the field attr_con_speciesModifier 1 and if it is "human" then 0. Or is it better to let players type such modifiers in? (like I said I searched through github there where I thought that specific sheets COULD have used that and also looked here but didn't see anything there). And if it is possible what commands would need to be used there? Thanks
1434563064
Lithl
Pro
Sheet Author
API Scripter
You could do this: <select name="attr_con_speciesModifier"> <option value="1">Dwarf</option> <option value="0">Human</option> </select> This doesn't work well with multiple options that have the same value.
And how could I check for that in the attr_con_speciesModifier? (if I have more than 2 species a multiplicator wouldn't work because of the different values)
1434566797

Edited 1434567081
vÍnce
Pro
Sheet Author
You could have 10 races, all with the same or different bonuses. It doesn't matter since the attribute is going to be whatever you assign as the bonus.
Vince said: You could have 10 races, all with the same or different bonuses. It doesn't matter since the attribute is going to be whatever you assign as the bonus. And that is excactly my question tehre. How can I assign the bonus already in the charsheet itself (without the player having to type it in)? Thus what do I need to do in order to assign such a bonus and how.
1434569449
vÍnce
Pro
Sheet Author
Once a selection is made, that's what the value of the attribute will be unless it's changed. The player won't have to type anything. You can use that attribute in the calculation of other attributes and/or macros as well. If there already is an attribute on the sheet for racial modifier, you should use that attribute's name since the data has already been created and that particular attribute is "in-use". Appoligies if I'm not fully understanding the question.
Vince said: Once a selection is made, that's what the value of the attribute will be unless it's changed. The player won't have to type anything. You can use that attribute in the calculation of other attributes and/or macros as well. If there already is an attribute on the sheet for racial modifier, you should use that attribute's name since the data has already been created and that particular attribute is "in-use". Appoligies if I'm not fully understanding the question. No problems. It sounds more or less either we are talking about the same thing but talking beside each other or we think of different things there. Lets try to formulat it this way: Humans: +0 to all attribute. Dwarves: +2 to Constitution. Elves: +2 to Dexterity. Dark elves: +1 Dexterity, +1 Charisma. So far I got an input field for the attribute points the player has put into the attribute himself (thus without the species modification). Then I got the "total" input field. Both of them for each existing attribute. Then I have a select box where I can choose the species (humans, dwarves, elves, dark elves). Thus the question is if there is a way to make it so taht when the player chooses dwarves that then his constitution total is his "base" constitution +2. Or when he chooses dark elf then his dexterity total is his base dexterity + 1 and his charisma total is his base charisma + 1. Hope that is more clear there. If not I will try a different approach in describing (english isn't my mother language and its a bit hard for me to describe it in english)
1434571141
vÍnce
Pro
Sheet Author
You just need to include the racial bonus attribute as part of the value="" formula used to determine the total of the other attribute. Have your racial attribute default to "0" so that it will only affect the total if there is actually a bonus.
I think we are getting clearer now there. And that racial attribute value? Is there a way so that the player does not need to type it in? (thus that it is automatically set depending on which species the player selects)?
1434576103
Lithl
Pro
Sheet Author
API Scripter
What you are describing isn't really possible to do automatically.
Ok feared that. Will then use input fields for manual input instead. Thanks
1434577947
esampson
Pro
Sheet Author
Not entirely accurate. What is being described isn't really possible to do using only the character sheet functions. It is possible to do if you utilize the programming API.