Darkryss . said:
One question.... again.
It is possible to link some variable on a sheet with an other ( Pet's stat with owner prof ) ?
This is a perfect reason I've been suggesting a freeform section, something that would have no encoded parts ( things within {{ and }} brackets) to it but simply be parsed as written, at the bottom/ last point in all repeating sections (repeating_traits, for example). This way you could simply add whatever you wish (as long as both sheets have the same player's permissions) to anything and overwrite it. For Example, you could do this:
NORMAL parts output by a Hexblade Scimitar, Dueling Fighting Style from Paladin, slightly modified from a game I play in
@{Amarissa Coppernick|wtype}&{template:atkdmg} {{mod=+7}} {{rname=Scimitar (Pact Weapon)}} {{r1=[[@{Amarissa Coppernick|d20}cs>20 + 3[CHA] + 4[PROF]]]}} {{attack=1}} {{range=5' (Melee)}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d6[weapon] + 3[CHA]]]}} {{dmg1type=Slashing}} {{damage=1}} {{dmg2flag=1}} {{dmg2=[[2]]}} {{dmg2type=(Dueling Fighting Style) Slashing}} {{crit1=[[6 + 6[CRIT]]]}} {{crit2=[[0d0[CRIT]]]}} 0 {{desc}} {{spelllevel=}} {{innate=}} {{globalattack=@{Amarissa Coppernick|global_attack_mod}}} {{globaldamage=[[1d6]]}} {{globaldamagecrit=[[1*6]]}} {{globaldamagetype=@{Amarissa Coppernick|global_damage_mod_type}}} ammo= @{Amarissa Coppernick|charname_output}
W FREEFORM SECTION
@{Amarissa Coppernick|wtype}&{template:atkdmg} {{mod=+7}}
{{rname=Scimitar (Pact Weapon)}} {{r1=[[@{Amarissa
Coppernick|d20}cs>20 + 3[CHA] + 4[PROF]]]}} {{attack=1}} {{range=5'
(Melee)}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d6[weapon] + 3[CHA]]]}}
{{dmg1type=Slashing}} {{damage=1}} {{dmg2flag=1}} {{dmg2=[[2]]}}
{{dmg2type=(Dueling Fighting Style) Slashing}} {{crit1=[[6 + 6[CRIT]]]}}
{{crit2=[[0d0[CRIT]]]}} 0 {{desc}} {{spelllevel=}} {{innate=}}
{{globalattack=@{Amarissa Coppernick|global_attack_mod}}}
{{globaldamage=[[1d6]]}} {{globaldamagecrit=[[1*6]]}}
{{globaldamagetype=@{Amarissa Coppernick|global_damage_mod_type}}} ammo=
@{Amarissa Coppernick|charname_output} {{r1=[[@{Some Other Player|d20}cs>20 + @{Some Other Player|charisma_mod}[CHA] + @{Some Other Player|pb}[PROF]]]}}
What you would see is the final roll, never the roll the sheet had already setup, which uses the attack of "Some Other Player". This isn't a real world example, because, obviously you can't borrow another's abilities to swing your scimitar, but more a programming example. In your case, you would just steal the prof bonus (@{Other Sheet|pb}) or maybe the spell save dc (@{Other Sheet|spell_save_dc}).
But adding a freeform section would also help in triggering API's, macros, and other programming tricks. This should be in play for PC sheets and NPC. This would be an easy add, as all it takes is just putting it in there with no content. The trick is making sure it appears at the very final end of the code.
Traits, for example, do this very well. The last part of them is the descriptive text. So you can always do your description, then interrupt it with something like this:
...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.
**~~~~~~~~~~**
**@{target|token_name}** has Received **?{How much of pool? Curing Diseases or Poisons costs 5 per.}** (of @{other_resource|max} in pool) ?{HP or Cure?|Healing,HP of **Healing**|Cure Disease or Poison,to **Cure Disease**(s) or **Cure Poison**(s) affecting them}}}
!modbattr {{
--name Amarissa Coppernick
--other_resource|-?{How much of pool? Curing Diseases or Poisons costs 5 per.}
}}
!
To get ChatSetAttr to deduct your pool of LoH points directly from clicking the trait. But, sadly, Attacks and Spells add more behind the description, and are much more tricksy to work with, especially for API and macro calls. Because the description has more after it.
An alternative to adding a freeform section could simply take place by making sure all repeating items have the descriptive content in the very end of the process instead of the middle:
... {{desc=...}} {{spelllevel=}} {{innate=}} {{globalattack=@{Amarissa
Coppernick|global_attack_mod}}} {{globaldamage=[[0]]}}
{{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Amarissa
Coppernick|global_damage_mod_type}}} ammo= @{Amarissa
Coppernick|charname_output}
Would be better serving us this way to meet that objective:
... {{spelllevel=}} {{innate=}} {{globalattack=@{Amarissa
Coppernick|global_attack_mod}}} {{globaldamage=[[0]]}}
{{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Amarissa
Coppernick|global_damage_mod_type}}} ammo= @{Amarissa
Coppernick|charname_output} {{desc=...}}