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

New caracter problem in custom sheet

1718114135

Edited 1718118441
Hello, I want to add to the attribute list at the creation of the caracter sheet a list of attributes , but i don 't know how to make it . The need is because the "attr _ " needed to be created because i 'm modifiying readonly values [ 16:58 ] if the attr is not already created with a value the readonly cant be edited by the macro 16:59 ] This is why i need a "setup " of all those variable to 0 at the creation of the new caracter sheet . [ ] Could someone help ? I'm on discord if it's easier To add me in discord : royfr
1718119795
GiGs
Pro
Sheet Author
API Scripter
It seems like there might be a language barrier, since I'm not sure what you need. Can you try describing again, but assume that anyone answering has no knowledge of your character sheet.
1718205565

Edited 1718205632
I want to get all my attribute from the HTML to be here (check the picture) when you just created the caracter :
1718210657
GiGs
Pro
Sheet Author
API Scripter
There are some attributes that will never show up there. If the attribute is in a repeating section (fieldset) or is an autocalc (disabled input) it can't show there. When creating a character sheet,you must learn to ignore that list as meaningless. It belongs to the days of old, before we had character sheets.
If i'm asking it's because i need them to be created... Not to "ignore about them". They are readonly so it is possible because i get one SCRIPT that make it. In my case i was needed to get them created to modify them by macro, if they don't exist the macro can't.
1718213856
GiGs
Pro
Sheet Author
API Scripter
I've told you the practical limitations of that list: there is no way to get all the attributes to show up there, and if you want to deal with all attributes, you'll need to find another approach. If you want a script, you maybe should be asking in the Mods forum.
And any way to add few of them here in Java/Html ? If a script can why Java/Html could not ?
1718214839
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Royii said: If i'm asking it's because i need them to be created... Not to "ignore about them". They are readonly so it is possible because i get one SCRIPT that make it. In my case i was needed to get them created to modify them by macro, if they don't exist the macro can't. By macro, do you mean an API script? API scripts have difficulty interacting with default character sheet attributes. They can get the default value through the getAttrByName API function. The only way to get the attributes to show up on that tab at start (leaving aside pseudo attributes like character_name and repeating attributes) is to set them by sheetworker on sheet open. There really isn't a good reason to do this though. If you are building an API script that is meant to interact with your character sheet, then the API script should be setup to know what to do if the attribute doesn't yet exist to it and/or use the getAttrByName as a fallback to get the value.
Scott C. said: Royii said: If i'm asking it's because i need them to be created... Not to "ignore about them". They are readonly so it is possible because i get one SCRIPT that make it. In my case i was needed to get them created to modify them by macro, if they don't exist the macro can't. By macro, do you mean an API script? API scripts have difficulty interacting with default character sheet attributes. They can get the default value through the getAttrByName API function. The only way to get the attributes to show up on that tab at start (leaving aside pseudo attributes like character_name and repeating attributes) is to set them by sheetworker on sheet open. There really isn't a good reason to do this though. If you are building an API script that is meant to interact with your character sheet, then the API script should be setup to know what to do if the attribute doesn't yet exist to it and/or use the getAttrByName as a fallback to get the value. Thank you for your feedback, Yes i'm using API script and got a way to fix that with it. But i wanted to know if there is an other way into HTML & Java and you told me about sheetworker. Is it possible to do something in sheetwork that only apply on the creation of the caracter sheet and no more after ?