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

Added custom sheet options not showing up in Attribute & Abilities

Hello.

I continue to form a custom character sheet for the home rule system.

I ran into a problem that the new parameter is displayed in the character sheet, as well as the roll of the die. Moreover, it was possible to display all this with a separate button on the token action, however, the throw is tied to the parameter in Attributes and Abilities, however, the parameter is not displayed in it, only if you do not add it manually.

HTML:

Инициатива <input type="number" name="Инициатива" class="attribute"/>

<button type='roll' class="tokenaction" name="Инициатива" value='/roll @{Инициатива}d6 &{tracker}' name 'Инициатива'>Инициатива</button>



Is there a way to add in the code so that the parameters are also duplicated in Attributes and Abilities or do they always have to be manually entered for each character sheet?

July 03 (2 years ago)

Edited July 03 (2 years ago)
GiGs
Pro
Sheet Author
API Scripter

Attribute names must begin with attr_. I think that's true regardless of the language used. (rolls begin with roll_)

Also, if you are using a character sheet, and I can't stress this enough: ignore the Attributes list on the Attributes & Abilities tab. That dates back to a time before character sheets existed and will never include all the attributes (it doesn't include hidden attributes or those in repeating sections, for instance). You should only use that when creating attributes that don't exist in the character sheet.


GiGs said:

Attribute names must begin with attr_. I think that's true regardless of the language used. (rolls begin with roll_)

Also, if you are using a character sheet, and I can't stress this enough: ignore the Attributes list on the Attributes & Abilities tab. That dates back to a time before character sheets existed and will never include all the attributes (it doesn't include hidden attributes or those in repeating sections, for instance). You should only use that when creating attributes that don't exist in the character sheet.

And how then to appeal with variables that use rolls? After all, they refer to attributes (for example: /roll @{Иницатива}d6

Indeed, in this case, "Инициатива" is a parameter in Attributes & Abilities, and not in the Character Sheet. Or is it possible to use the values ​​directly from the Character Sheet?

My HTML looks like:

<div style="margin-bottom: 10px;">

<div class="sheet-row">

<label style="width: auto;" for="Инициатива">Инициатива:</label>

<input type="number" name="Инициатива" class="attribute"/>

<button type='roll' class="tokenaction" name="Инициатива" value='/roll @{Инициатива}d6 &{tracker}' name 'Инициатива'>Инициатива</button>

</div>

</div> 


and I see that no matter what value I drive into "Инициатива", when I close the character sheet, it is reset and remains empty



July 03 (2 years ago)

Edited July 03 (2 years ago)
GiGs
Pro
Sheet Author
API Scripter

Remember what I said to ignore the Attributes list. It is misleading and often inaccurate (and in the old days, manipulating attributes there could lead to sheet corruption (I don't think that happens now, but better safe than sorry.))

Killrot said:

and I see that no matter what value I drive into "Инициатива", when I close the character sheet, it is reset and remains empty

This is exactly what happens when you don't start an attribute with attr_. It's value doesn't get saved so it looks like it gets reset.

When a user refers to an attribute, they don't use the attr_ part - that is just for the HTML where you create the attribute. It is a flag to tell roll20, "this is an attribute, so treat it as one". The attribute wont work properly without it, but users (players) ignore it.

July 03 (2 years ago)

Edited July 03 (2 years ago)
GiGs
Pro
Sheet Author
API Scripter

Also your label is probably incorrect. This:

<label style="width: auto;" for="Инициатива">Инициатива:</label>

the for refers to an id, not the attribute name.  You'd need to create that id for it to work.