Wiki
Clone wiki5eShaped / Referencing Attributes, Macros, and Repeating Sections
Referencing Attributes and Macros
When dealing with the character sheet's attributes and macros, use the following format.
NAME
- Character nameATTRIBUTE
- The attribute to be referenced that can be found in the tables below.MACRO
- The name of the macro that can be found in the tables below.
An alternative to NAME
: Character ID
In most cases, the name of the character is used for the NAME section when referencing macros or attributes but if the name ever changes, all references will need to update to the new name. In most cases, a character's name should never change, but if it would or you have other plans that name is not ideal, you may want to use the character_id of the character instead. One thing to note however, it seems at this time this ID only works for macros and not attibutes.
To get the character_id of a character use @{NAME|character_id}
which will return something like -KnejtJVnjJKGWbCEUE1
which can be used just as NAME
for macros: %{-KnejtJVnjJKGWbCEUE1|shaped_charisma_saving_throw}
Referencing Attributes
@{NAME|ATTRIBUTE}
Referencing Macros
%{NAME|MACRO}
Macros with an Ability Command Button
[Any Text](~NAME|MACRO)
This will output a button in chart (or in a macro if uses in freetext for example) that can be clicked to execute a macro.
Referencing Repeating Sections
Repeating fields use a slightly different method to reference their attributes and macros. Detailed below are how to reference each.
Referencing Repeating Field Attributes
The attributes of a repeating section item can referenced using a format such as @{NAME|repeating_SECTION_ID_ATTRIBUTE}
NAME
is the name of the character to reference (if needed)SECTION
defines the repeating section to reference (such as skills, attack, spell, etc.)ID
is the id of the repeating field item (more under ID below)ATTRIBUTE
is the name of the attribute you want.
For example, to get the name of the first attack on the character sheet we would use @{Bob|repeating_offense_$0_name}
and this would display the name of the first item in the attack repeating section for the sheet Bob
.
Referencing Repeating Field Macros
Sometimes you want to execute the macro of an item in a repeating section as if was clicked. Macros work using a format such as %{NAME|repeating_SECTION_ID_MACRO}
NOTE: Using target does not seem to work fully with repeating sections at the moment when calling macros.
NAME
is the name of the character to reference (if needed)SECTION
defines the repeating section to reference (such as skills, attack, spell, etc.)ID
is the id of the repeating field item (more under ID below)MACRO
is the name of the macro you want to perform, almost alwaysroll
For example %{Bob|repeating_offense_$0_roll}
will roll the first offense item for the character Bob
as if clicking the field on the sheet.
Using the unique ID
@{NAME|repeating_offense_-KBhs8D0JovTXIUmcSyb_name}
Using this id means that you will always reference the specific item desired as long as it exists regardless of its position in the repeating section. It being first it the list or in the middle does not matter with this method.
Method 1
- For sections that output a list to chat (such as offense, utility, traits, spells, etc) output the list to chat either through the settings page macro or the macro button on the core page.
- Then from the list, hit the button to output the macro
- Then hit “up arrow” key in the chat window to see the last output and you should see something like
%{-Kp1Xd-_DkrJ2yI5igcI|repeating_offense_-konf19qt0knruztueih_roll}
- From this
-konf19qt0knruztueih
Is the unique id while the first id-Kp1Xd-_DkrJ2yI5igcI
Is the CHARACTER unique ID which can be used in place ofNAME
.
Method 2
- Right click on a repeating item (greatsword) and choose inspect
- On your screen, you should see the inspect tool. Scroll up until you see a section that looks like
<div class="repitem" data-reprowid="-KoNf19QT0kNruZTUeih">
- To copy this value double click on the id to highlight it and then copy
-KoNf19QT0kNruZTUeih
Using list order
@{NAME|repeating_offense_$0_name}
You are able to reference an item in a repeating section by its order is the list. If you use $0
, you are saying “the first item in this repeating section” with $1
being the second item, $2
being the third etc.
When using this method however, a change in the order of the list can change the macro. This means if you are referencing the first item in the section, and you delete that item or change the order, the macro of the new first item.
Updated