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

[5e Community] DnD5e Character Sheet: Using Class Resources

1492066584

Edited 1492066610
So, I have a Monk. I have created a Class Resource on the sheet, called Ki. That's the easy bit. I have a Macro that was created by Mark.G for Flurry of Blows: &{template:5eDefault} {{weapon=2}} {{title=Flurry of Blows}} {{subheader=@{Selected|Token_Name}}} {{subheaderright=Cost: 1 Ki}} {{attack=[[ 1d20 + @{Dexterity_Mod}[Dex] + @{PB}[Prof] ]]}} {{attackadv=[[ 1d20 + @{Dexterity_Mod}[Dex] + @{PB}[Prof] ]]}} {{damage=[[ 1d6 + @{Dexterity_Mod}[Dex] ]]}} {{critdamage=[[1d6]] Addt'l Dmg}}}{{spellshowattack=1}}{{spellattack=[[ 1d20 + @{Dexterity_Mod}[Dex] + @{PB}[Prof] ]]}} {{spellshowattackadv=1}}{{spellattackadv=[[ 1d20 + @{Dexterity_Mod}[Dex] + @{PB}[Prof] ]]}}{{spellshowdamage=1}}{{spelldamage=[[ 1d6 + @{Dexterity_Mod}[Dex] ]] }}{{spellcancrit=1}}{{spellcritdamage=[[1d6]] Addt'l Dmg}} And I was trying to figure out how to use the DnD5e Character Sheet resource tracking, from the Wiki it says: -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Class A series of attributes for each class of the format : classname_level Class resources repeating section. See notes on repeating sections above. All attributes here start with repeating_classresources_X_ where X is the row number starting from 0 ClassResourceName ClassResourceRecharge ClassResourceTotal ClassResourceTotal_max Class features, class_abilities_and_feats Class Actions repeating section. See notes on repeating sections above. All attributes here start with repeating_classactions_X_ where X is the row number starting from 0 classactionname classactionsubname (coming in next release) classactiondescription -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- I have tried to use @{{repeating_classresources_0_}} - Which, if I am reading the documentation correctly should return the first Class Resource I have set, which would be Ki. But instead, I am getting the No attribute was found for @{character|{repeating_classresources_0_}. What am I doing wrong? Basically, I just want to deduct 1 from the 'Current' class resource box, whenever I use the macro listed above.
From the documentation that you linked (thank you by the way), I think that your problem is that you are not actually calling the attribute for the resource. The resource is split into 4 different attributes, each of which start with repeating_classresource_X_ and have a suffix depending on the actual attribute you want access to. So instead you should be calling on of the following: @{repreating_classresource_0_ClassResourceName} @{repreating_classresource_0_ClassResourceRecharge} @{repreating_classresource_0_ClassResourceTotal} @{repreating_classresource_0_ClassResourceTotal_max} Something I feel like I should point out in addition is that macros CANNOT change values on a character sheet unless they have access to the API, which is a Pro level feature. If you get access to the API I would suggest Jakob's ChatSetAttr script to do what you are looking for.
Still can't get this working. I get that I can't have it modify the character sheet unless I have API access (currently, do not) but it should be able to pull the data right? So for example my macro: &{template:5eDefault} {{weapon=2}} {{title=Flurry of Blows}} {{subheader=@{Selected|Token_Name}}} {{subheaderright=Cost: 1 Ki}} {{subheader2=Monk}} {{subheaderright2=Bonus Action}} {{Source=one of [[@{repeating_classresources_0_ClassResourceTotal}]] remaining KI}} {{attack=[[ 1d20 + @{Dexterity_Mod}[Dex] + @{PB}[Prof] ]]}} {{attackadv=[[ 1d20 + @{Dexterity_Mod}[Dex] + @{PB}[Prof] ]]}} {{damage=%{Ha'skarl "Preystalker" Iojio|Scaling-MA-Damage}}} {{critdamage=%{Ha'skarl "Preystalker" Iojio|Scaling-MA-Damge-NoDexNoProf} Additional Dmg}}}{{spellshowattack=1}}{{spellattack=[[ 1d20 + @{Dexterity_Mod}[Dex] + @{PB}[Prof] ]]}} {{spellshowattackadv=1}}{{spellattackadv=[[ 1d20 + @{Dexterity_Mod}[Dex] + @{PB}[Prof] ]]}}{{spellshowdamage=1}}{{spelldamage=%{Ha'skarl "Preystalker" Iojio|Scaling-MA-Damage} }}{{spellcancrit=1}}{{spellcritdamage=%{Ha'skarl "Preystalker" Iojio|Scaling-MA-Damge-NoDexNoProf} Additional Dmg}} Should come back saying it's one of [current] KI, right? I just can't figure it out.
Try typing @{selected|repeating_classresources_0_ClassResourceTotal} into chat and see what it prints out. Make sure to have the token of the character selected.
1492186376

Edited 1492187113
Ed S. said: Try typing @{selected|repeating_classresources_0_ClassResourceTotal} into chat and see what it prints out. Make sure to have the token of the character selected. Just returns "1". Tried it after setting my current to 0, and 5. Same result both times. Also when using the ClassResourceName it returns blank. If you mouseover the result, it just says "Rolling 1=1", maybe its broken?
1492191814

Edited 1492193990
I have figured it out! By chance, I was going over the documentation for general Macro's again and stumbled upon this:&nbsp; <a href="https://wiki.roll20.net/Macros#Referencing_Repeati" rel="nofollow">https://wiki.roll20.net/Macros#Referencing_Repeati</a>... For those who can't be bothered to click it: @{selected|repeating_items_$1_itembonus} So I changed mine to: @{repeating_classresources_$0_ClassResourceTotal} And bingo, its working! Turns out that you need to use the $ (dollar) symbol as a prefix to the row ID. Edit Ok, so it mostly works. ClassResourceTotal_max returns a 1 for some reason still. I have instead used @{monk_level} as a workaround to read my max Ki
Here is the finished Macro, for those interested: &{template:5eDefault} {{weapon=2}} {{title=Flurry of Blows}} {{subheader=@{Selected|Token_Name}}} {{subheaderright=Cost: 1 Ki}} {{subheader2=Monk}} {{subheaderright2=Bonus Action}} {{emote=unleashes a combo}} {{attack=[[ 1d20 + @{Dexterity_Mod}[Dex] + @{PB}[Prof] ]]}} {{attackadv=[[ 1d20 + @{Dexterity_Mod}[Dex] + @{PB}[Prof] ]]}} {{damage=%{Ha'skarl "Preystalker" Iojio|Scaling-MA-Damage}}} {{critdamage=%{Ha'skarl "Preystalker" Iojio|Scaling-MA-Damge-NoDexNoProf} Additional Dmg}}}{{spellshowattack=1}}{{spellattack=[[ 1d20 + @{Dexterity_Mod}[Dex] + @{PB}[Prof] ]]}} {{spellshowattackadv=1}}{{spellattackadv=[[ 1d20 + @{Dexterity_Mod}[Dex] + @{PB}[Prof] ]]}}{{spellshowdamage=1}}{{spelldamage=%{Ha'skarl "Preystalker" Iojio|Scaling-MA-Damage} }}{{spellcancrit=1}}{{spellcritdamage=%{Ha'skarl "Preystalker" Iojio|Scaling-MA-Damge-NoDexNoProf} Additional Dmg}}{{Ki Usage=[[@{repeating_classresources_$0_ClassResourceTotal}-1]] of [[@{monk_level}]] remaining @{repeating_classresources_$0_ClassResourceName}}}@{Ha'skarl "Preystalker" Iojio|classactioncustom1skill} I also have 2 scaling Martial Arts damage Macro's (one for crit die, one for non crit) which is called in the above:&nbsp;Scaling-MA-Damage and&nbsp;Scaling-MA-Damge-NoDexNoProf respectively. For those interested in the scaling MA damage macro, it's: [[1d[[4+2*floor((@{monk_level}+1)/6)]]+@{dexterity_mod}+@PB]] Removing the following part for the crit die +@{dexterity_mod}+@PB Pretty happy with it, might tweak it a little bit and refine it further.
Glad you got it figured out!