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

PFC Sheet - Copying "Attacks"

Is there an API script floating around somewhere that will let me copy attacks from one character to another character? I have about 15 attacks I need to copy to 12 different sheets that already have all their own unique settings / stats / other attacks. It's such a pain to try and do it manually...
1532809446
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Are the attacks in the form of abilities (Macros on character sheets)? If so, yes, I believe there is a script for that (by The Aaron, of course). Depending on who the attacks are written, you might need to still do some editing (for instance, if they refer to the character by name of character id. If by "attacks" you mean something else, please elaborate.
1532809631
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
CharUtils is the script you are looking for and !chardup is the command.
It's not Abiities I want to copy it a repeating entry in the "Attacks" section of the sheet. I want to copy everything, Name,  Attack Mods, Attack, Vs., all in the form of repeating_weapon_$X values including repeating_weapon_$X_damage-dice-num, repeating_weapon_$X_damage-damage-die, and most importantly repeating_weapon_$X_macro-text I tried setattr but it parses all variables so instead of getting my dynamic variables in the macro text it parses the variables and the macro is filled with static numbers.
keithcurtis said: CharUtils is the script you are looking for and !chardup is the command. This only does Abilities. I need to be able to copy Attriubutes
I found a partial solution to my problem: Open the Sheet you want to copy Attacks to and create as many "empty" Attack entries as needed (Give it a 1 letter name to make sure it doesn't vanish on you.) Make sure the first dummy attack's entry # match the repeating row of the first Attack you want to copy on the Sheet you're copying from (Possibly Needed) Make "buffer" dummy attacks that you can delete later if the repeating rows don't match and have the same # (Delete these dummy attack entries once you're done copying the attacks you want) Get the ID of the Sheet you want to copy Attacks to Place a token down on the map with the "Represents" set to the Sheet you want to copy Attacks from Select the token you just placed ( Make sure they are selected !) Run the following CharSetAttr command !setattr --charid -LHdueWCLbOuhW0bR36o --repeating_weapon_$44_name|@{selected|repeating_weapon_$44_name} --repeating_weapon_$44_attack-type|@{selected|repeating_weapon_$44_attack-type} --repeating_weapon_$44_damage-dice-num|@{selected|repeating_weapon_$44_damage-dice-num} --repeating_weapon_$44_damage-die|@{selected|repeating_weapon_$44_damage-die} --repeating_weapon_$44_attack-type|@{selected|repeating_weapon_$44_attack-type} --repeating_weapon_$44_damage|@{selected|repeating_weapon_$44_damage} --repeating_weapon_$44_type|@{selected|repeating_weapon_$44_type} --repeating_weapon_$44_range|@{selected|repeating_weapon_$44_range} --repeating_weapon_$44_group|@{selected|repeating_weapon_$44_group} This is all fine and dandy for copying static values, but when trying to copy variables it parses them first and gives you a static value or no value at all in its pace. Because of this, I have to put in manually the macros for each attack entry. If I copy it with !setattr it parses all the @ variables and you can't make a value dynamic because of !setattr parsing them. Is there any way to make !setattr not parse all the values in a macro? Or is it being parsed at a different stage of execution and out of my hands?
1532958795

Edited 1532958823
MyRoll20Stuffs
API Scripter
Anyone got any input on this? Is it at all possible to copy a macro with the API with its variables names intact and dynamic instead of parsed and static values?