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

[Help] Adding new Repeating Attacks in Pathfinder Char sheet by Script

So i'm attempting to add attacks into the import script i made, noticed a few hangups when i add repeating attacks: If i set the checkbox "Mwk" = true it ticks the box, but i have to physically untick and tick the box again before it will calculate ATK? How should i be setting the value with code? Also problems with the attack type and damage ability not being set at all, should these be set to a value instead of a string? function AddAttribute(attr, value, charID) { createObj("attribute", { name: attr, current: value, characterid: charID }); return; } and in code: AddAttribute("repeating_weapon_0_masterwork",true,charID); AddAttribute("repeating_weapon_0_attack-type","Melee",charID); AddAttribute("repeating_weapon_0_damage-ability","STR",charID); Cheers, Jas
I had a lot of trouble with weapons on my HeroLabs import script and never did manage to get things 100% accurate (more due to the limitation of information in the XML export than anything. So you can look at the script I wrote here: <a href="https://github.com/beeke01/PathfinderHLImport/blob" rel="nofollow">https://github.com/beeke01/PathfinderHLImport/blob</a>... My code is super ugly, I'm generally a novice that fumbled my way through, but it may be helpful. Lines ~1675 - 1845 are the ones that deal with weapons. The masterwork field is a 0 or 1 value, with 1 being masterwork. There is a lot of interdependent fields that require different setting and you must set everything if you want the weapon to work properly.
Beautiful! repeating_weapon_0_attack-type = "@{attk-melee}" or "@{attk-ranged}" repeating_weapon_0_damage-ability = "@{STR-mod}" is what i was looking for, thanks Kevin!
You're welcome! Glad to help!