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 it possible to write a new Discipline or Advantage to the Official Roll20 V:TM Sheet?

1713913738

Edited 1713914482
Hi! I am setting things up to run a Vampire: The Masquerade   5th Ed. campaign using the official sheet for this game. Problem is, I would like to be able to add new disciplines, advantages and flaws as things come up in the campaign using API. But these stats are the expanding kind, and don't seem to appear in the "Attributes & Abilities" column of the character. So my questions are:   1) How do I find the name of the attribute(s) to write to?  2) Is there any special considerations/methodology required? (for example, do you first need to write the discipline into existence on the character then write the different abilities under that discipline and the descriptions?) And while I am at it, WHY don't the expandable attribute types show up under the  "Attributes & Abilities" column? (this question is less important than the first two). Any help on this would be greatly appreciated! Thanks in advance!
1713917558
GiGs
Pro
Sheet Author
API Scripter
Michael P. said: And while I am at it, WHY don't the expandable attribute types show up under the&nbsp; "Attributes &amp; Abilities" column? (this question is less important than the first two). This is fairly easy to explain in a satistfactory fashion. Those expandable parts (called Repeating Sections) aren't there because how would you include them? Repeating sections don't have a fixed number of attributes, and the names of attributes are pretty unreadable (they'd be very long). Another type of attribute not shown there is the autocalc (disabled attributes which contain a forumla, not a number). Only the simplest of attributes are shown. Generally speaking, I advise people who are using a chaacter sheet to ignore that attributes list: it doesnt tell you all the attributes, and there was a time that entering satuff manually there could lead to attributes getting corrupted (I don't think this happens now) Regarding your actual request: I don't know the sheet (I use my own), but if what you want to do is use a script to add repeating section attributes, and yiu just need to section name, I can tell you how to get those. The easiest way is to look for your sheet on the repo: <a href="https://github.com/Roll20/roll20-character-sheets" rel="nofollow">https://github.com/Roll20/roll20-character-sheets</a> , find your sheet, look in its folder, open the html file, and look for the fieldset for your section. If that isnt available, create an attribute in your section, rightclick it, select Inspect or Inspect Element, and it will open a sidebar with that attribute selected. Scroll up till you find repeating_[something] and thats what you need to create attributes in that section.
1713918285

Edited 1713918778
Thanks GiGs! So I can download the html for the official sheet from there? Does that mean I can just use that HTML and CSS in the custom sheet setting and make changes to the sheet to fit my campaign? That would be AWESOME! And, yeah, I knew&nbsp; autocalc attributes don't show up in the list. But I did not know expandable attributes didn't. Primarily because I have never really been able to understand how expandable attributes work. lol Thanks again! You are a life-saver! Michael
1713919422
GiGs
Pro
Sheet Author
API Scripter
Michael P. said: Thanks GiGs! So I can download the html for the official sheet from there? Does that mean I can just use that HTML and CSS in the custom sheet setting and make changes to the sheet to fit my campaign? That would be AWESOME! Unfortunately if its a "By Roll20" sheet it might not be there. They moved the D&amp;D sheet off to a separate secret repo a while ago, and soon after did the same with others, so they'd have conterol over them. A sheet in the repo can be modified by anyone. But if it is there, then yes, you can do that. It wount get future updates though.
1713923888

Edited 1713924868
So, GiGs, how do you write to an expanding attribute in API? This obviously won't work... // Get or Create an attribute from/on the character const getOrCreateAttribute = (name, cid) =&gt; findObjs({ type: 'attribute', characterid: cid, name: name }, {caseInsensitive: false})[0] || createObj('attribute',{ characterid: cid, name: name }); // TEST (embedded in a chat watcher) var sID = "-Nw7Ylcudk6iv61mvR3u"; let oTst = getOrCreateAttribute("repeating_disciplines",sID); oTst.set("current","Testing..."); sendChat("API","/w gm **The Test Has Fired**"); I didn't think it would. But I am obviously missing something here.
1713925647

Edited 1713925716
GiGs
Pro
Sheet Author
API Scripter
I didnt realise you were writing your own script. I would just use chatSetAttr. I'm rusty on script writing-&nbsp; I'd have to dig up my old scrpts to remember how to do this. You'll get a better response on this in the Mods forum. If you are trying to create a new row in a repeating section, be aware that a repeating attribute name is made of 3 parts, and you normally splice them together when creating the name: the repeating section name, like repeating_gear A row id, like -gt6ejrgnsyegs6es (this is the tricky part, but there is a function to create these) the field name, like item_weight . You'd concatenate them together, and get something like repeating_gear_-gt6ejrgnsyegs6es_item_weight and create that attribute. (You can see why you wouldnt want the attributes list cluttered with these names).