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

Pathfinder 2e referencing Monster Attacks/Abilities

Hello, right now I'm setting up my PF2 Campaign and using the Roll20 PF2 Compendium. So far all works as planned and I already have a lot of macros up and working. But now I've come to a halt; I'm trying to set up basic attack macros for my critters, but I don't see how I can reference the abilities/attacks/spells of them. I tried the  @{selected | repeating_XYZ}, but all I get is this error message:   TypeError: Cannot read property 'substring' of undefined Is there someone who can help me out? Thanks a lot, Rob
1575897381

Edited 1575898519
Andreas J.
Forum Champion
Sheet Author
Translator
Referencing buttons in repeating sections  follow the logic, notice that " %" is used for calling abilities/macros, while "@" is used for calling attributes on a sheet: % {selected | repeating_(name-of-repeating-section)_$id_(name-of-button)} "$id" is replaced by either the position it have in the repeating section(starting from zero, so "$0" for first entry), or the unique row-id it have(don't remember how this is figured out) The names of the NPC's repeating sections aren't yet mentioned on the wiki page , but digging through the latest public version of the sheet code I figured this out: NPC repeating rolls: Inventory: %{selected| repeating_items-worn_$id_action} Interaction Abilities : %{selected| repeating_ interaction-abilities _$id_action} Automatic & Reactive Abilities: %{selected|repeating_ free-actions-reactions _$id_action} Melee & Ranged Strikes: Melee Strikes(Attack & Damage): %{selected|repeating_melee-strikes_$id_ATTACK-DAMAGE -NPC } Melee Strikes(Attack Only): %{selected|repeating_melee-strikes_$id_ATTACK -NPC } Melee Strikes(Damage Only): %{selected|repeating_melee-strikes_$id_DAMAGE -NPC } Ranged Strikes(Attack & Damage): %{selected|repeating_ranged-strikes_$id_ATTACK-DAMAGE -NPC } Ranged Strikes(Attack Only): %{selected|repeating_ranged-strikes_$id_ATTACK -NPC } Ranged Strikes(Damage Only): %{selected|repeating_ranged-strikes_$id_DAMAGE -NPC } Offensive or Proactive Abilities: %{selected|repeating_ actions-activities_action } I think NPC spells are called with same macros as PC spells, but I'm not sure. The wiki mentions how spells are called , but after the Spell redesign it could be that the section is outdated. Edit: I figured out how spells with spell-levels are called now, and PC/NPC spells work the same way. Repeating Spells (PC & NPC rolls): Spells(Innate): %{selected|repeating_spellinnate_$id_spellroll} Spells(Focus): %{selected|repeating_spellfocus_$id_spellroll} Spells(Cantrip): %{selected|repeating_cantrip_$id_spellroll} Spells(lvl.1-10): %{selected|repeating_normalspells_$id_spellroll}
1575899150

Edited 1575899321
First of all: thanks a lot for your help. It is much appreciated. Unfortunately I still can't get it to work the way I hoped to. Whenever I use  %{selected|repeating_melee-strikes_$id_ATTACK-DAMAGE -NPC } e.g. switching out _ATTACK_DAMAGE-NPC with the name of the Button (say fangs) I still do get this error message:  No ability was found for %{selected|repeating_melee-strikes_fangs} Same goes for using a number (starting with 0);  No ability was found for %{selected|repeating_melee-strikes_} Robert (GM): selected|repeating_melee-strikes_$0 Maybe I'm to stupid to see my error, or I lack the ability to "program" as good as is needed for what I'm trying to accomplish.
1575900534

Edited 1575901315
Andreas J.
Forum Champion
Sheet Author
Translator
Sorry, the first example was meant to illustrate how repeated section rolls works in general . The list after the explanation for NPCs are meant to be used exactly as written, only changing the "id" part with the row number of the thing. Everything else is meant to left untouched. I realize the wording was confusing, as when I said "name of the button", I meant the hard-coded default name the sheet defines for the repeating section . (link to example in the PF2E sheet's code). The Macro wiki page also have a section explaining how repeating sections are called. I updated the PF2E wiki page so it now have the same info I just posted here. Concrete examples: To roll Attack & damage for a NPC's first melee attack: Melee Strikes(Attack & Damage): %{selected|repeating_melee-strikes_ $0 _ATTACK-DAMAGE-NPC} To roll Attack for a NPC's second ranged attack: Ranged Strikes(Attack): %{selected|repeating_ranged-strikes_ $1 _ATTACK-NPC}
Thank you very much. I guess my problem was also in translating what I meant from German to English and vice versa; now all works as intended. This will speed up my game by a huge amount.  Greetings, Rob