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

Copy Character Ability Macro's from one sheet to another

Is anyone aware of a script that copies the abilities from one sheet to another? Up to this point I have had a character sheet "template" that I copy for people to add all of their information. But there are cases where users create their own ability macros, that I would like to copy back into the default template. Obviously these can be manually copied and pasted... however it seems possible with the API that it could be easier.
1406648228
The Aaron
Roll20 Production Team
API Scripter
It would be possible with the API. Probably not even very difficult. I don't think there is a script hanging about for this already, but I could certainly write you one.
If there wasn't one, that was going to be my next project as it will play in well with the importing script I am working on. I am quite the novice, but should hopefully be able to manage, but if you feeling froggy I wouldn't refuse :).
1406651052
The Aaron
Roll20 Production Team
API Scripter
So, how do you see that working. Do you want to copy all attributes and abilities from Character A to Character B if they do not already exist, or do you want to specify the ones to copy? (Possibly with an exclude/include sort of list?)
Aaron, I think initially being able to copy all abilities (no need to copy attributes) from Character A to Character B is what I am looking for. Second stage would be to specify individual abilities. So again for example I have a Basic Character Sheet as a storage for all of my common ability macros. Someone brings in their new character "Bob" from their vault. I would like to be able to copy all of my Basic Character Sheet ability macros to Bob's sheet. Second use case would be Bob has a cool ability macro that I want to add to my Basic Character Sheet, so I copy individually ability macro X back to my Basic Character Sheet. Is that clear?
1406653610
The Aaron
Roll20 Production Team
API Scripter
yup!
Why can't you use the transmogrifer, to copy the modified character with modified sheet back to the original campaign?
Why can't you use the transmogrifer, to copy the modified character with modified sheet back to the original campaign?
Ajax, The transmogrifier is an all or none copy... This doesn't cover either of the described use cases. Again I have a Basic Character Sheet with the macros I expect to be used in my games, but if someone joins with another character from their vault, they won't have all of my macros. So unless I make a copy of the Basic Character Sheet and have them re-enter their character, they must copy and paste over and over again on their sheet. The second use case is similar, character has a couple of cool macros that I want to be able to copy to my Basic Character Sheet for future use, sure I could copy these manually by hand... or run a command like (made up name) "!abilitycopy --Bob --Cool Macro --Basic Character Sheet".
1406693028

Edited 1407252326
The Aaron
Roll20 Production Team
API Scripter
What was CharDup is now moved to a new thread as CharUtils: <a href="https://app.roll20.net/forum/post/1067109/script-c" rel="nofollow">https://app.roll20.net/forum/post/1067109/script-c</a>...
@Aaron - Thank you! I will test this out tomorrow morning! Hopefully some day my code will look half as good as yours!
1406695762
The Aaron
Roll20 Production Team
API Scripter
No problem! =D My Javascript code was crap until I read Javascript: The Good Parts by Douglas Crockford . I highly recommend it.
Aaron, I tried this and on what appears to be a valid match, I am getting the following error: ReferenceError: valid is not defined at HandleInput (evalmachine. :1745:8) at eval (
1406727241
The Aaron
Roll20 Production Team
API Scripter
Fixed! Sorry about that. The original way I was matching character names wouldn't let you match a short name if it was a substring of another name and I changed it, but I guess I didn't test it thoroughly enough!
Cool, testing it out now!
Perfect! This is awesome and will work so well in conjunction with my import script.
1406735500
The Aaron
Roll20 Production Team
API Scripter
I'm trying to come up with a reasonable syntax for specifying only certain abilities to copy over, and possibly attributes. Also, I think it would be nice if it didn't duplicate abilities on copy, what do you think?
I agree on the duplicate abilities part, this would avoid potential issues/confusion. Syntax is always a challenge, I would add it as an additional optional parameter, so something like: !chardup --&lt;source_char&gt; --&lt;destination_char&gt; --&lt;ability&gt;
1406742326
The Aaron
Roll20 Production Team
API Scripter
Currently, it would interpret --&lt;ability&gt; as another character name. What do you think about defining a set of abilities with another command, then specifying it on the !chardup command? // create an attribute list named spells based on the character // drenach and any abilities he has matching the specified words !charset --drenach +spells flaming-sphere fireball ray // copy the abilities described by spells from drenach // on to the characters matched by bob, tim, evil wizard !chardup --drenach +spells --bob --tim --evil wizard That could let you create groups of abilities that you commonly copy, maybe grouped by class or level and copy them. Could also support a similar syntax for specifying abilities during the dup.
That would be excellent! I could see some great uses for the ability to copy multiple items to multiple characters in a single command.
1406743846
The Aaron
Roll20 Production Team
API Scripter
You can already copy all the abilities from one character to multiple others in the current script: !chardup --Base --char1 --char2 --some other char --bonkers char This will copy Base 's abilities to Char1 , Char2 , Some Other Char and Bonkers Char . =D
Some might say this is something different entirely and I won't disagree, I'm just not sure if this is worth a new thread, etc. I have a long list of journal entries / NPC characters. I need to do a mass "name" change of attributes. From STR_max to strength, etc. Is there any easy way to go through the entire list of my characters and create a new attribute if one doesn't exist, and if one does exist to do nothing? Sadly there is 5-10 attributes I need to do this for on over 200 entries and I am looking to save the time of several hours with a "fairly" easy API script if possible. Would this script be able to be modified to do this? I don't mind dragging the token on the map and having to select it etc, anything to save time if I can't just have it automatically go through my entire list.
1407252289
The Aaron
Roll20 Production Team
API Scripter
With a rename, that is a good fit for this script. Moved to a new thread: <a href="https://app.roll20.net/forum/post/1067109/script-charutils-a-collection-of-utilities-for-manipulating-character-data/#post-1067109" rel="nofollow">https://app.roll20.net/forum/post/1067109/script-charutils-a-collection-of-utilities-for-manipulating-character-data/#post-1067109</a>