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

[Macro} To add to inventiory on a character sheet

1482036759
Mike W.
Pro
Sheet Author
I apologize if this has been asked before but I couldn't  find anything about it. Can a Macro be used to add items to a character sheet? Like adding to an inventory that uses Repeating Rows? I want to be able to select an item, either from a handout or a rollable table, then select a character sheet and have that item added to his\her inventory. If this is possible, could you provide an example? Thanks
1482038214
Lithl
Pro
Sheet Author
API Scripter
Not possible without an API script.
1482046270
Mike W.
Pro
Sheet Author
Ok thanks. I was hoping that it could be done without using an API but i can understand why that is the onyl way.
1482084155

Edited 1482084186
Mike W.
Pro
Sheet Author
Does anyone know of any existing API script that can do this?
1482086295
Jakob
Sheet Author
API Scripter
Blowing my own horn here, but  ChatSetAttr can do this, via something like !setattr {{ --sel --repeating_inventory_-create_name|Torch --repeating_inventory_-create_description|This torch sheds some light... ... (more attributes here) }} Obviously, the precise attribute names will depend on the sheet you are using, but that's the general idea. If you want to do this from a handout, I think you can use  Journal Command Buttons to call these commands from links within a handout (the above version with --sel will add it for characters whose tokens are currently selected).
1482101964
Mike W.
Pro
Sheet Author
Thank you very much Jakob. I will give this a try and if I have any further questions I will get back to yo. Love this community. Mike