Craven said:
Theodore S. said:
Craven said:
Theodore S. said:
I am trying to get ChatSetAttr to work with variables. Here is the code used for setting the attribute:
!setattr --name @{selected|character_name} --modb --repeating_resource_$0_resource_left|[^Dmg]
--Mana Pool Left:|[[ [$Dmg] {@{selected|repeating_resource_$0_resource_left} - ?{Mana Pool?|0}} ]]
This does output [^Dmg] = resource left - Mana Pool
Errors
Attribute
repeating_resource_$0_resource_left is not number-valued for character
Kelowinn 'Kel' Shadestar. Attribute left unchanged.
!setattr --name @{selected|character_name} --modb --repeating_resource_$0_resource_left|[[ @{selected|repeating_resource_$0_resource_left} - ?{Mana Pool?|0} ]] ?
!setattr is not power cards.
So I take it there is no way to make Power Cards/ChatSetAttr to function together when it comes to variables?
No they don't pass info to each other and when i tried to get it to work inside power card it didn't work.
you can use stuff like !setattr --name @{selected|character_name} --modb --lvl?{Spell Slot|1|2|3|4|5|6|7|8|9}_slots_expended|?{Add or Subtract?|+|-}?{Number?|1|2|3|4} and can be used before or after power card like
!setattr --name @{selected|character_name} --modb --lvl?{Spell Slot|2}_slots_expended|-1
!power {{
--emote|** @{selected|token_name} Unleashes a spell **
--tokenid|@{selected|token_id}
--titlefontshadow|none
--format|Conditions
--corners|10
--name|Scorching Ray | 3 Targets
--leftsub|Ranged Attack spell
--rightsub| 120’
--Spell Level:| **Level 2**
}}
You inadvertently solved my problem Craven. Here is the finished Power Card using ChatSetAttr for Lay on Hands:
!setattr --name @{selected|character_name} --modb --repeating_resource_$0_resource_left|-?{Mana Pool Used?|0}
!power {{
--tokenid|@{selected|token_id}
--titlebackground|none
--titlefontshadow|none
--corners|10
--format|atwill
--name|Lay On Hands
--leftsub|@{selected|character_name}
--rightsub|Level @{selected|level} @{selected|class}
--Action:|Your blessed touch can heal wounds. You have a pool of healing power that replenishes when you take a long rest. With that pool, you can restore a total number of hit points equal to your paladin level x 5.^^ ^^
As an action, you can touch a creature and draw power from the pool to restore a number of hit points to that creature, up to the maximum amount remaining in your pool.^^ ^^
Alternatively, you can expend 5 hit points from your pool of healing to cure the target of one disease or neutralize one poison affecting it. You can cure multiple diseases and neutralize multiple poisons with a single use of Lay on Hands, expending hit points separately for each one.^^ ^^
This feature has no effect on undead and constructs.^^ ^^
--!Action|@{selected|character_name} uses [[?{Mana Pool Used?|0}]] of his mana pool.
--Mana Pool Left:|[[ {@{selected|repeating_resource_$0_resource_left} - ?{Mana Pool Used?|0}} ]]
}}