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 .
×

Macro that modifies attributes?

Hello, I'm incredibly new to roll20, it's only been my 3rd day using it and so far I'm really digging the entire thing. My question is, I'm making a macro for a heal ability, and so far I've got. /em @{selected|token_name} uses a Repair Kit on @{target|token_name}! @{target|token_name} repairs [[@{Repair Kit}]] worth of Endurance. (Endurance is the equivalent to health in this game) Now, because I'm a new user, I leave most of my macros like this and then, as the GM, manually edit the appropriate bars for the targets (so, in this case I'd find the target and manually edit their Endurance bar to whatever the result is, likewise when an attack damages the target's shields or endurance), I'm wondering if it's possible to add in lines in the macro to auto do this? Would there be some way for the macro to do something like @{target} modify Endurance by [[@Repair Kit}]] amount?
1407479325

Edited 1407479624
Howdy JG, welcome to Roll20. Good work on the macros, quite sophisticated for someone only 3 days in! Macros and Abilities have very limited functionality, by design. They have enough flexibility to be useful, but not quite enough to do what you want. In particular, think of them as one-way streets... they can take info from the journal entry and put it into the game's screen, but cannot put anything back into the journal. So, no, you cannot write a macro that will adjust anything... no healing macro, no stat-adjustment macro, no ammo-counting macro, nothing like that. However, there's something available to Roll20 Subscribers at Mentor Level called the Aardvark-Pickle Inheritor , or API (I can't seem to find out what this acronym actually stands for, heh), which is a scripting system for Javascript. THAT has the ability to make such changes, and much much more. Lots of people use it for lots of really amazing things, which they like to brag about (and share) in The Roll20 API Forum . Depending on how handy you are, you could either write your own script, find someone to write one for you, or use one that's already shared, to do exactly what you're asking for. In addition, I'm not sure what system you're using, but there are lots of pre-designed Character Sheets available for many systems, and you can write your own of those as well. This is kind of an add-on to the normal Journal entries for Roll20, making it easier to sort and store information as well as containing lots of 'macros' for easy use. edit: Character sheets also cannot make this type of modification without the API. So, in summary: Short answer no, long answer yes. q;} Have fun! -Phnord
Thanks for the quick reply! Ah I see. And I've also heard of that API thing, it was one of the first things that showed up when I first Googled roll20 after a friend referred me to it and, admittedly that script was crazy long and boggled my mind. The most complex macro I've done so far is a macro that allows someone to attack multiple targets and determine different damage for each target. But yes, I am considering subscribing at some level if only for a trail and then later decide at what level I'll sub. And I'm not using any of the character sheets that were provided, the reason for that is... I'm not familiar with any of them. I've only ever seen a D&D character sheet that came with a D&D beginner box my best friend had about 8 years ago. So I just made up my own attributes, 6 in total, that affect gameplay. It's just easier for me and would be easier for any of my friends who also have no experience with anything like GURPS, D&D, SW RPGs, etc etc.
1407480985
Lithl
Pro
Sheet Author
API Scripter
Phnord Prephect said: Aardvark-Pickle Inheritor , or API (I can't seem to find out what this acronym actually stands for, heh) Application Programming Interface
1407502583
The Aaron
Roll20 Production Team
API Scripter
(I have to admit, I'm pretty partial to Aardvark-Pickle Inheritor!!! =D )