Difference between revisions of "Pseudo-Attributes"
From Roll20 Wiki
Andreas J. (Talk | contribs) (Created page with "{{revdate}}{{BCS|page}}{{stub}}{{NavSheetDoc}} Character Sheets pseudo-attributes are special sheet attributes that always exists, even if you don't "create" them in a sh...") |
Andreas J. (Talk | contribs) m |
||
Line 70: | Line 70: | ||
[[Category:Character Sheet Creation]] | [[Category:Character Sheet Creation]] | ||
[[Category:API]] | [[Category:API]] | ||
+ | [[Category:Macros]] |
Revision as of 13:32, 3 November 2021
Page Updated: 2021-11-03 |
This page is related to Editing(coding) Character Sheets, which require Pro info to be able to use.Main Page: Building Character Sheets |
This article is a stub. |
Character Sheet Development
Getting Started
- Using Custom Sheets
- Building Sheets
(Main Page) - Glossary
- Code Restrictions
- Best Practice
- Common Mistakes
- Tutorials
- Examples, Templates
- Pattern Libraries
- HTML & storing data
- CSS & Styling
General
- Updates & Changelog
- Known Bugs
- Character Sheet Enhancement(CSE)
- Custom Roll Parsing
- Legacy Sheet(LCS)
- Beacon SDK
Reference
- Buttons
- Repeating Sections
- Sheetworkers
- Roll Templates
- sheet.json
- Translation
- Auto-Calc
- Advanced
- All SheetDev Pages
Tools & Tips
Other
Character Sheets pseudo-attributes are special sheet attributes that always exists, even if you don't "create" them in a sheet, and are more like data tied to the character sheet that in some cases can be viewed or even edited on a sheet.
Some can be called in Macros.
Contents |
Pseudo-attributes
character_name
Display(and able to edit) the name defined for the character which shows up on the N Journal page.
<input type="text" name="attr_character_name">
If you don't want the name to be updated on the journal page, create a name attribute with another name, such as name="attr_name"
character_avatar
New, as of Oct 20th 2021 |
The character_avatar
and character_token
pseudo-attributes
With this functionality come two pseudo-attributes: attr_character_avatar
and attr_character_token
. These allow sheet authors to directly present the avatars and tokens of a character via the character sheet.
These attributes are read-only. You will be able to assign them to an input, but that input will be disabled by default. You will be able to access them via a getAttrs, but not change their value via a setAttrs
.
Example:
<img name="attr_character_avatar">
img{ width: 100px; height: 100px; }
character_token
New, as of Oct 20th 2021 |
The character_avatar
and character_token
pseudo-attributes
With this functionality come two pseudo-attributes: attr_character_avatar
and attr_character_token
. These allow sheet authors to directly present the avatars and tokens of a character via the character sheet.
These attributes are read-only. You will be able to assign them to an input, but that input will be disabled by default. You will be able to access them via a getAttrs, but not change their value via a setAttrs
.
Example:
<img name="attr_character_avatar">
img{ width: 100px; height: 100px; }
character_id
Cant be displayed on a sheet, but can be referenced with a macro.
A macro that displays a selected tokens character_name, character_id, and some token info.
&{template:default} {{name=**Character & Token ID**}} {{Character Name=@{selected|character_name} }} {{**Character ID**= @{selected|character_id} }} {{**Token Name**= @{selected|token_name} }} {{**Token ID**= @{selected|token_id} }} {{**Bar 1**= @{selected|bar1} / @{selected|bar1|max} }} {{**Bar 2**= @{selected|bar2} / @{selected|bar2|max} }} {{**Bar 3**= @{selected|bar3} / @{selected|bar3|max} }}