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

Custom caracter sheet : variables for macro

Hello everyone, We made a custom caracter sheet that is working pretty good. But we get one problem that is we want to use some of variable that are not show in the "Attribute list" and we don't know why they are not. The one not showing are the one "read-only" which are auto calculated based on others stats the player set. I'm avaible on discord if anyone need to check to help. Discord name : royfr
1690204502
GiGs
Pro
Sheet Author
API Scripter
Firstly, there is a roll20 discord if you want that help. I don't use it so can't give the address, butI'm sure someone will. Secondly, ignore the Attributes list. If you're making a character sheet, it will always fail to include some stats (such as hidden attributes and those in repeating sections). It would make sense for disabled and readonly attributes not to show up there, too, since they could easu=ily be modified by players if they did show there and they aren't supposed to be. Also, in the past, manipulating attributes there could lead to character sheet corruption, so its best not to touch any attributes that also exist in the character sheet. The brief response: don't look at the attributes list on attributes & abilities tab when making a character sheet. It is useless for anything you'd want to use it for.
1) i can't find the discord. 2) Then how to make macro if i don't the the variable ?
1690204780
GiGs
Pro
Sheet Author
API Scripter
For the discord, just be patient. Someone will be along. For the variab;e: Roll20 doesn't support variables as programmers understand them. I don't know what exactly ou wabt=nt a "variable" for and how you want to use it. Can you describe that?
1690205060

Edited 1690205117
As i told i made a custom caracter sheet & i need to use the variable " ContactTotal"  to show the damage of a player in the spell macro but actualy it don't work when i do @ ContactTotal
1690207452
GiGs
Pro
Sheet Author
API Scripter
If you want to use an attribute's value, you need to wrap it in curly braces, like this @{ContactTotal}
Ok, now i can get them : /r 1D10 Dommage : @{ContactTotal} But i can't put it into [[]] so it show :  + 6 + 19 + 2  instead of 27
1690209467
GiGs
Pro
Sheet Author
API Scripter
Inline roll brackets [[ ]] only show the final result. You can move our mouse over the result to see the working. But those brackets are incompatible with displaying the working. If you really want to display the working, the /roll or /r syntax is the way to go. But it looks pretty ugly. You can also use a Reusing Rolls trick to display the components of a roll, but that is very clunky and inflexible. I wouldn#t worry about this till you are more familiar with how roll20 works generally.
1690210577

Edited 1690210660
Well i know how it work if i do it with things like that : [[@{BaseCha}]] or more complexe formule [[@{Normal1Niveau}*2 + floor((@{BaseCha} + @{ObjetCha})/5)]] ou -1 blessure sur une aura de 15m it work where @{} contain normal But it don't work with  @{ContactTotal} where  @{ContactTotal} =@{ContactArme} + @{ContactFor} + @{ContactPassif} So it is strange because it is just a sum.
Ok solved it was because one of them was not setup