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 Shaped] Linking resources

Is there a way, already built into the shaped sheet/ companion, that you can link two resources together?  I'll give two examples: 1) Monk: Class Feature: Ki (counter, deduct) = Monk: Class Feature: Flurry of Blows (use) 2) Wizard: Spell (Find Familiar): Material Component (use) = Wizard: Utility: 10 GP worth of charcoal, incense, and herbs (counter, deduct) If this is not already built as something that a macro, ability call, etc. could do, is there a API made that can do this trick?   I'd rather it was something the Shaped API (I'm a pro user, so full features = on) could do, but I'm sure there are other scripts capable of helping me with this as well.  It's just a matter of knowing the codes to use.
1531970554
The Aaron
Pro
API Scripter
You should be able to do that with Jakob's ChatSetAttr by adding the appropriate command in the freeform block of the Use side of things. You have to put a return before it, so something like: !some-api-command I don't know the particulars, but someone probably does.
Nothing native to the sheet or Companion API though? As you know, I don't mind working through other API's (now that they're updated ... ROFLMFAO [inside joke between me and Aaron folks.  It involves a heavy *facepalm*), but I wondered if Kryx & co. built something specifically in mind for this type of thing.  Considering there is one area for Ki, and you add to that with usage, there should be a callback to decrement ki automatically when using the dependant abilities.  While Ki may hold "1/1 per Long/ Short Rest", you would think that a Flurry of Blows would just hold "Use 1", and auto-decrement what it is tied to, this case being Ki.  This way also, you could set up Way of Shadow's Spell Like Abilities and other things that use Ki, all tied to the same pool.  Monk, of course, being one example, the other being material components for casters.
Actually, maybe it is, in the form of attachers. &nbsp;I've never used them, but that seems to be a way to go. I got a basic idea from&nbsp; <a href="https://www.youtube.com/watch?v=CBGigLBdO-E&amp;feature=youtu.be" rel="nofollow">https://www.youtube.com/watch?v=CBGigLBdO-E&amp;feature=youtu.be</a> ,&nbsp;but any advice is always welcome.
Hmm just tried it with a Sneak Attack. &nbsp;And all it did was rename my attack with a Rapier "Sneak Attack" (the name of the Attacher), and put the sneak attack damage and information in the description. &nbsp;Not exactly what i was going for, linking the attack with a rapier/ any offense to a button that could roll for sneak attack. &nbsp;I'm figuring I did something wrong, but this is a first time using the attacher area.
1532002046
Kryx
Pro
Sheet Author
API Scripter
Attachers just add text to specified areas. What you're looking to do is best done by ChatSetAttr.
Thx for the reply Kryx.&nbsp; Ok, will go that route then. Best use for attachers then?&nbsp; Just for reference?&nbsp;
1532025520
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Wolf Thunderspirit said: Thx for the reply Kryx.&nbsp; Ok, will go that route then. Best use for attachers then?&nbsp; Just for reference?&nbsp; Attachers are great for adding optional or extra abilities or actions to an action. You can add a Sneak Attack button to all melee attacks, or an option to use a divine smite for instance. There's a lot of good material here in the docs. I use them for adding optional sound effects, or rolling a wild magic surge—there are all sorts of possibilities.
1532028242
The Aaron
Pro
API Scripter
Oh man, attachers "are my Jam," as the hipsters say. =D
Took me a long while to figure out, but once again, Aaron makes it understandable to me, and keith points me to the right resources. &nbsp; So many ducks have to be in a row to set those up right, but VERY nice when they are. Biggest issue I had was understanding that Freeform text block area. &nbsp;without defining the text block, and in the right section, which has to be enabled, I was having so many issues.
1532102104
The Aaron
Pro
API Scripter
One thing to be aware of is that only one attacher with a given checkbox set will get applied.
1532103738
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I still confuse when to use freeform and when to use freetext.
1532105741
The Aaron
Pro
API Scripter
FreeText will get placed in a specific segment of the Roll Template, conceptually: &amp;{template:5eShaped}{{name=blah}}{{ ... }}{{freetext=@{freetext} }}{{ ... }} FreeForm is appended to the Roll Template, and thus must have Roll Template bits if you want it in the template, but can additionally have other Roll20 commands, like API scripts or /em or /desc or whatever.&nbsp; Conceptually: &amp;{template:5eShaped}{{name=blah}}{{ ... }}@{freeform} The implications are that you must follow these rules with FreeForm: 1) If you want to add to or replace fields of the Roll Template, you must do that starting on the first line. 2) If you want to add other commands, there needs to be a carriage return on the first line (either by itself or after Roll Template stuff). For example: !token-mod --set bar2_value|-1 or {{text_center=Using Bardic Inspiration}} !token-mod --set bar2_value|-1 You can see the reason if you do the substitution: &amp;{template:5eShaped}{{name=blah}}{{ ... }} {{text_center=Using Bardic Inspiration}} !token-mod --set bar2_value|-1 Roll Template bits must be on the same line as the &amp;{template:...} line (ignoring newlines embedded in {{ }} blocks), and API Commands (and /commands) must be at the beginning of the line to be recognized.