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

Using the results of a drop down menu to ore populate specific boxes

I’m not sure whether this would be possible or not, but I’m wondering if I can use what a player selects from a specific drop down menu to then define the content of certain other boxes on the character sheet (Text boxes mainly, but prepopulating another drop down menu to further narrow it down would be ideal) anyone down anything similar before? cheers chris
1673868217
Ziechael
Forum Champion
Sheet Author
API Scripter
Sort of depends on the context. As a standard macro, no... you can't update/edit/populate values using a standard macro although it is possible using mods (pro-subscription perk formerly known as API). If creating a new community contributed character sheet, yes... you would be able to set values on the sheet based on values entered elsewhere but would still be unable to take input from a macro and update the sheet.
1673869435
Chris Jones
Pro
Sheet Author
API/Mods is fine as i've got the Pro license - i'm just not sure how you go about coding that, or how difficult it is!
1673882615
GiGs
Pro
Sheet Author
API Scripter
If you're creating your own sheet, this is possible (easy, even). If you're using a custom mod/script, you can't put dropdowns on the sheet itself, but you can have them in macros and uodate attribute values on the sheet. If you use an existing script like chatSettAttrs or ScriptCards, it is easy. If you using macros without either of those options, it can't be done - basic macros cannot change values on a character sheet, they can only read values that already exist. Prepopulating new dropdowns isn't really possible. The contents of each dropdown are set at the beginning of the macro, and cannot be changed partway through the macro. Responses are going to be vague without specific details of what you want to do.
1673890762
Chris Jones
Pro
Sheet Author
I'm using a (heavily) modified version of the non-official version for 5th edition Vampire the Masquerade. It's only me and my group who use it, so i can do what i want with it. The section i want to start automating is the Disciplines (the powers). I've already made the main Discipline choice into a drop-down, and below this, you've got space for 5 powers, each with costs, roll details, and a description. This all needs to be entered manually currently. Ideally, the "Power x" section would be a drop-down too, but what i really don't want is a list including every possible power for every Discipline - i'd want the drop-down to limit the options listed to the ones associated with the Chosen Discipline. When you select a power, it would populate the other sections. That's what i'd like, but no idea how doable that is.
1673890856
Chris Jones
Pro
Sheet Author
1673893567
GiGs
Pro
Sheet Author
API Scripter
If you have control of the sheet, that kind of thing is fairly straightforward, but does involve use of CSS and maybe a sheet worker. I'll reply in more detail later, if no one else has. Are the 5 powers for each discipline always the same (e.g. each Disciple has 5 linked powers)? What are the attribute names for each box set by the disciplne change I see theres Power 1/power 2/etc, but probably also the details and first and second attribute for each power. The attribute names for all of those need to be listed. Also the default attributes for the basic discipkine? i notice you have 2 dropdowns there but only one filled. What is happening there?
1673894597
Chris Jones
Pro
Sheet Author
Unfortunatly the powers aren't the same - there's a choice of between 10 and 15, but you can only buy a maximum of 5 for each Discipline. As new powers get released, i'd have to manually add them in, so there isn't really a finite amount that there could possibly be. I'm not too fussed about the attributes, but the first drop-down has 9 attributes listed (Str, Dex, Sta, Cha, Man, Comp, Int, Wits, Res). Most powers will use one of these, but some are blank (which is the default setting in my drop-down). The second box will always be the same - so i've set that to always default to that setting. Aprreciate the help!
1673895037

Edited 1673895048
GiGs
Pro
Sheet Author
API Scripter
I wasnt asking about the game's attributes, but the sheet's attribute names (those things that start with attr_)
1673895636
Chris Jones
Pro
Sheet Author
Haha, Gotcha! XXX is a replaced by a number in the actual code as it varies attr_DisciplinePowerNameXXX (This is the Main Power - i'd hope to make this a drop-down) attr_DisciplinecostXXX (The cost, currently i'm using a number field, but i'd prefer to switch this to Radio Buttons) attr_DPPowerAttXXX (The first attribute that is used, this is an existing drop-down) attr_DPPowerAbiXXX  (The second attribute that is used, this is an existing drop-down) attr_ DisciplinePowerDetailsXXX (Currently a free text field) attr_DisciplineLevelXXX (Radio Buttons) attr_AmalgamNameXXX (An existing drop-down)
1673905778
GiGs
Pro
Sheet Author
API Scripter
Those are the ones :) Knowing that each Discipline might have a variable number of powers complicates things, and makes it unclear what you are asking for. Roll20 really only supports dropdowns if the contents of that dropdown are fixed and never change, so each discipline is fully set when you create it. There is a way to have a dropdown that allows players to add data, but that would vary from sheet to sheet. If Andrew added the Beast power for the first time to Animalism, then when Betty chose Animalism, the Beast power would not be there. Tell us what would you like to happen, and I'll tell you if its poossible and how to do it.