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

Formatting issue for API driven macro call

The API script calls a macro via this command: let macro = getMacro(`${macrobase}-${foundtype}`,action,pcid,msg.who); sendChat(getSpeaker(msg),macro) ; which appropriately calls and executes the macro, ie "sb-base", which was derived by "up arrowing" after clicking the character sheet attack: @{Arkos|output_option} &{template:5e-shaped} {{character_name=@{Arkos|character_name}}} {{title=Sun Blade}} {{offense=1}}  @{Arkos|attacher_offense} @{Arkos|hide_gm_info} {{@{Arkos|shaped_d20}=1}} {{attack_type_macro=[Melee Weapon Attack:](~-LNSkNQHTH31VWs3bonm|repeating_offense_-LNsFK7c7ngkvqIL-Hil_attack)}} {{has_attack_damage=1}} {{attack_damage_crit=[[1d8]]}} {{attack_damage=[[1d8[damage] + @{Arkos|finesse_mod}[fin] + 4[bonus]]]}} {{attack_damage_type=radiant}} {{has_attack_damage=1}} {{attack_damage_macro=[Hit:](~-LNSkNQHTH31VWs3bonm|repeating_offense_-LNsFK7c7ngkvqIL-Hil_attack_damage)}} {{attack_damage_crit_macro=[Crit:](~-LNSkNQHTH31VWs3bonm|repeating_offense_-LNsFK7c7ngkvqIL-Hil_attack_damage_crit)}} {{attack1=[[@{Arkos|shaped_d20}@{Arkos|d20_mod}cs>20 + 3[proficient] + @{Arkos|finesse_mod}[fin] + 2[bonus]]]}} {{reach=5}} However, since using the template as shown does not properly update when using shaped sheet attachers (it always seems to default to the typed out rolls, not actually using the repeating ability) I tried to shorten things up to the following: %{-LNSkNQHTH31VWs3bonm|repeating_offense_-LNsFK7c7ngkvqIL-Hil_attack} %{-LNSkNQHTH31VWs3bonm|repeating_offense_-LNsFK7c7ngkvqIL-Hil_attack_damage} While this works simply typing it into chat, or calling it in a macro without using the script, the extra layer of the script call breaks it and now the macro is no longer executed, it is simply printed to chat as follows: Takryn: -LNSkNQHTH31VWs3bonm|repeating_offense_-LNsFK7c7ngkvqIL-Hil_attack -LNSkNQHTH31VWs3bonm|repeating_offense_-LNsFK7c7ngkvqIL-Hil_attack_damage The script can also call Abilities instead of Macros, but that did not solve the issue either. I have tried substituting all of the symbols (meaning %,{,|,_,-,}) with their HTML conversions, but that did not fix it either. I've devised 3 solutions/workarounds, but haven't been able to get any of them working: 1. Have the shortened call above actually execute 2. A way to make the shaped template actually pull the attachers 3. Assistance reformatting the template inputs to where I can leave off the hard-coded rolls and still reference the repeating abilities that would be great too. I've tried, but doesn't show any rolls at all (and is really just me blindly deleting things out): @{Arkos|output_option} &{template:5e-shaped} {{character_name=@{Arkos|character_name}}} {{title=Sun Blade}} {{offense=1}}  @{Arkos|attacher_offense} @{Arkos|hide_gm_info} {{@{Arkos|shaped_d20}=1}} {{attack_type_macro=[Melee Weapon Attack:](~-LNSkNQHTH31VWs3bonm|repeating_offense_-LNsFK7c7ngkvqIL-Hil_attack)}}  {{attack_damage_macro=[Hit:](~-LNSkNQHTH31VWs3bonm|repeating_offense_-LNsFK7c7ngkvqIL-Hil_attack_damage)}} Any help is much appreciated as always.
After some extensive digging, I have learned that the huge template macro is equivalent to the 5e Shaped Sheet macro call %{-LNSkNQHTH31VWs3bonm|repeating_offense_-LNsFK7c7ngkvqIL-Hil_ roll )  However, I've also determined that what was making the calls fail in my instance was trying to use the CharacterID, rather than character name.  %{-LNSkNQHTH31VWs3bonm|repeating_offense_-LNsFK7c7ngkvqIL-Hil_roll} fails to parse correctly when called from another macro, but %{Arkos|repeating_offense_-LNsFK7c7ngkvqIL-Hil_roll} works exactly as intended. Hopefully this ends up helpful to someone else.