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

new to API

I downloaded a few scripts but not sure how to implement them. Let me tell you what I'm trying to do. My son is new to TTRPGs and is playing a wizard and recently got a wand. What I'd like to do is that every time he uses it, I'd like it to automatically deduct a charge, so he can keep track of it.I downloaded the ammo and the pathfinder scripts, but how do I create the macro in the attack to deduct the charge? THANKS IN ADVANCE.
I guess it depends on the character sheet   you are using?   If it is 5e ogl, like myself, you can make the wand charges a resource and list that resource as the ammunition for the attack. I have an example below with my druid's Staff of Withering. I have the staff charges listed as a resource and under the ammunition section of the attack I listed 'Staff Charges'.
1562415899
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Tom is presumably using one of the Pathfinder sheets. These vary because there is an official and a community sheet. The ways of tracking uses will likewise vary.
1562418569
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi Tom, a few questions: As Keith Curtis pointed out, which Pathfinder sheet are you using? The pfcompanion will only work with the community sheet. If you're using the community sheet can you post a screen cap of what the attack on your son's sheet looks like for the wand? And what section is this in? How would you prefer to handle this? Have the charges tracked on the attack itself? Or on an equipment item on the sheet? When you say you downloaded the scripts? Do you mean you selected them from the one click drop-down on the API page/otherwise put them into the API scripts page? If you're using the pf community sheet, I'll need to remind myself of how I coded the companion script to work, but that's easy enough to do.
i'm using the community sheet
Scott C. said: Hi Tom, a few questions: As Keith Curtis pointed out, which Pathfinder sheet are you using? The pfcompanion will only work with the community sheet. - Community sheet If you're using the community sheet can you post a screen cap of what the attack on your son's sheet looks like for the wand? And what section is this in? - here it is again How would you prefer to handle this? Have the charges tracked on the attack itself? Or on an equipment item on the sheet? - I created an attack off the item, listed as a charged magic item. When he uses it, I'd like it if it deducts a charge When you say you downloaded the scripts? Do you mean you selected them from the one click drop-down on the API page/otherwise put them into the API scripts page? - Yes, selected them from the api pg If you're using the pf community sheet, I'll need to remind myself of how I coded the companion script to work, but that's easy enough to do.
1562458174

Edited 1562458492
vÍnce
Pro
Sheet Author
My suggestion is to install the Pathfinder Companion script .  (IMO, it's a must have with the community sheet)  PFC can handle resource tracking and many other features ( User's Manual ).  Enable "Automatic Resource Tracking" from the PFC configuration menu. (!pfc --config) Then create an Item on your equipment called "Wand of Magic Missiles".  On your Magic Missile attack, Choose "Ranged" so you can enter an ammo amount for your magic missiles.  In this case, ammo is the number of charges. Note that the actual number of charges will come from your item entry.  The number entered on the attack for ammo will not change. Now, the first time you make your Magic Missile attack, PFC will ask you what the name of the ammo is for your Magic Missile attack.  Enter "Wand of Magic Missiles" or whatever you decide to call your wand on your equipment page.  Now PFC will auto deduct one charge each time your use the Magic Missile attack. ;-) There are probably other methods that PFC can do this as well.  Scott may have to elaborate... Cheers .
I think that did it. On the actual item itself I put 50 for qty then did my attack. It auto rolled dmg and deducted one from the qty for the charge. Thanks for all the help!
1562467681
vÍnce
Pro
Sheet Author
Great.  Read up on the PFC script.  I'm sure you'll find other helpful features as well.  Roll High