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

Header Image in Macros

1525262525

Edited 1525262537
MyRoll20Stuffs
API Scripter
I'm stumped on where in a default weapon macro to put the header image data. For instance where in this macro: @{PC-whisper} &{template:pf_attack} @{toggle_attack_accessible} @{toggle_rounded_flag}{{font=@{apply_specfont_chat}@{use_specfont}}} {{color=@{rolltemplate_color}}} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{subtitle}} {{name=@{name}}} {{attack=[[ 1d20cs&gt;[[ @{crit-target} ]] + @{attack_macro} ]]}} {{damage=[[@{damage-dice-num}d@{damage-die} + @{damage_macro}]]}} {{crit_confirm=[[ 1d20 + @{attack_macro} + [[ @{crit_conf_mod} ]] ]]}} {{crit_damage=[[ [[ @{damage-dice-num} * (@{crit-multiplier} - 1) ]]d@{damage-die} + ((@{damage_macro}) * [[ @{crit-multiplier} - 1 ]]) ]]}} {{type=@{type}}} {{weapon_notes=@{notes}}} @{iterative_attacks} @{macro_options} {{vs=@{vs}}} {{vs@{vs}=@{vs}}} {{precision_dmg1=@{precision_dmg_macro}}} {{precision_dmg1_type=@{precision_dmg_type}}} {{precision_dmg2=@{global_precision_dmg_macro}}} {{precision_dmg2_type=@{global_precision_dmg_type}}} {{critical_dmg1=@{critical_dmg_macro}}} {{critical_dmg1_type=@{critical_dmg_type}}} {{critical_dmg2=@{global_critical_dmg_macro}}} {{critical_dmg2_type=@{global_critical_dmg_type}}} {{attack1name=@{iterative_attack1_name}}} Do I put this: {{header_image=[Quarterstaff]( <a href="https://i.imgur.com/m6GjZAB.png" rel="nofollow">https://i.imgur.com/m6GjZAB.png</a>)} } To get this result: &nbsp; When I try adding&nbsp; {{header_image=[Quarterstaff]( <a href="https://i.imgur.com/m6GjZAB.png" rel="nofollow">https://i.imgur.com/m6GjZAB.png</a>)} } to the above macro this is what I get depending on placement: Can someone help me? Where in a default weapon attack macro do I put the header information for it to come out looking proper?
1525265836

Edited 1525265847
The Aaron
Pro
API Scripter
The structure of Roll Templates is: &{template:TEMPLATE_NAME} {{ KEY = VALUE }} {{ KEY = VALUE }} ... You should be able to put that new part anywhere after the &{template:pf_attack}, provided you it is outside of an existing {{ }} argument: @{PC-whisper} &{template:pf_attack} @{toggle_attack_accessible} @{toggle_rounded_flag}{{font=@{apply_specfont_chat}@{use_specfont} }} {{color=@{rolltemplate_color} }} {{character_name=@{character_name} }} {{character_id=@{character_id} }} {{subtitle }} {{name=@{name} }} {{attack=[[ 1d20cs&gt;[[ @{crit-target} ]] + @{attack_macro} ]] }} {{damage=[[@{damage-dice-num}d@{damage-die} + @{damage_macro}]] }} {{crit_confirm=[[ 1d20 + @{attack_macro} + [[ @{crit_conf_mod} ]] ]] }} {{crit_damage=[[ [[ @{damage-dice-num} * (@{crit-multiplier} - 1) ]]d@{damage-die} + ((@{damage_macro}) * [[ @{crit-multiplier} - 1 ]]) ]] }} {{type=@{type} }} {{weapon_notes=@{notes} }} @{iterative_attacks} @{macro_options} {{vs=@{vs} }} {{vs@{vs}=@{vs} }} {{precision_dmg1=@{precision_dmg_macro} }} {{precision_dmg1_type=@{precision_dmg_type} }} {{precision_dmg2=@{global_precision_dmg_macro} }} {{precision_dmg2_type=@{global_precision_dmg_type} }} {{critical_dmg1=@{critical_dmg_macro} }} {{critical_dmg1_type=@{critical_dmg_type} }} {{critical_dmg2=@{global_critical_dmg_macro} }} {{critical_dmg2_type=@{global_critical_dmg_type} }} {{attack1name=@{iterative_attack1_name} }} {{header_image=[Quarterstaff](<a href="https://i.imgur.com/m6GjZAB.png" rel="nofollow">https://i.imgur.com/m6GjZAB.png</a>)}}
1525266943

Edited 1525266962
MyRoll20Stuffs
API Scripter
I tried this: @{PC-whisper} &{template:pf_attack} {{header_image=[Warhammer]( <a href="https://i.imgur.com/W7ceUKN.png" rel="nofollow">https://i.imgur.com/W7ceUKN.png</a>)} } @{toggle_attack_accessible} @{toggle_rounded_flag} {{font=@{apply_specfont_chat}@{use_specfont}}} {{color=@{rolltemplate_color}}} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{subtitle}} {{name=@{name}}} {{attack=[[ 1d20cs&gt;[[ @{crit-target} ]] + @{attack_macro} ]]}} {{damage=[[@{damage-dice-num}d@{damage-die} + @{damage_macro}]]}} {{crit_confirm=[[ 1d20 + @{attack_macro} + [[ @{crit_conf_mod} ]] ]]}} {{crit_damage=[[ [[ @{damage-dice-num} * (@{crit-multiplier} - 1) ]]d@{damage-die} + ((@{damage_macro}) * [[ @{crit-multiplier} - 1 ]]) ]]}} {{type=@{type}}} {{weapon_notes=@{notes}}} @{iterative_attacks} @{macro_options} {{vs=@{vs}}} {{vs@{vs}=@{vs}}} {{precision_dmg1=@{precision_dmg_macro}}} {{precision_dmg1_type=@{precision_dmg_type}}} {{precision_dmg2=@{global_precision_dmg_macro}}} {{precision_dmg2_type=@{global_precision_dmg_type}}} {{critical_dmg1=@{critical_dmg_macro}}} {{critical_dmg1_type=@{critical_dmg_type}}} {{critical_dmg2=@{global_critical_dmg_macro}}} {{critical_dmg2_type=@{global_critical_dmg_type}}} {{attack1name=@{iterative_attack1_name}}} And I tried this: @{PC-whisper} &{template:pf_attack} @{toggle_attack_accessible} @{toggle_rounded_flag} {{font=@{apply_specfont_chat}@{use_specfont}}} {{color=@{rolltemplate_color}}} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{subtitle}} {{name=@{name}}} {{attack=[[ 1d20cs&gt;[[ @{crit-target} ]] + @{attack_macro} ]]}} {{damage=[[@{damage-dice-num}d@{damage-die} + @{damage_macro}]]}} {{crit_confirm=[[ 1d20 + @{attack_macro} + [[ @{crit_conf_mod} ]] ]]}} {{crit_damage=[[ [[ @{damage-dice-num} * (@{crit-multiplier} - 1) ]]d@{damage-die} + ((@{damage_macro}) * [[ @{crit-multiplier} - 1 ]]) ]]}} {{type=@{type}}} {{weapon_notes=@{notes}}} @{iterative_attacks} @{macro_options} {{vs=@{vs}}} {{vs@{vs}=@{vs}}} {{precision_dmg1=@{precision_dmg_macro}}} {{precision_dmg1_type=@{precision_dmg_type}}} {{precision_dmg2=@{global_precision_dmg_macro}}} {{precision_dmg2_type=@{global_precision_dmg_type}}} {{critical_dmg1=@{critical_dmg_macro}}} {{critical_dmg1_type=@{critical_dmg_type}}} {{critical_dmg2=@{global_critical_dmg_macro}}} {{critical_dmg2_type=@{global_critical_dmg_type}}} {{attack1name=@{iterative_attack1_name}}}&nbsp; {{header_image=[Warhammer]( <a href="https://i.imgur.com/W7ceUKN.png" rel="nofollow">https://i.imgur.com/W7ceUKN.png</a>) }} And the image isn't showing up at all in the chat output.
1525270427
vÍnce
Pro
Sheet Author
I'll help after work.
1525272705
Finderski
Plus
Sheet Author
Compendium Curator
Vince said: I'll help after work. Vince, you need to get your priorities right...Roll20 trumps work. ;)
1525274097
The Aaron
Pro
API Scripter
(no comment....got a meeting to go to... =D )
1525307727
vÍnce
Pro
Sheet Author
In theory, you are doing it correctly.&nbsp; As Aaron mentioned, the order that you place your key=value pairs within your macro shouldn't matter in regards to a roll template because the roll template already has instructions on how to format any given key.&nbsp; Maybe it's just me, but it looks like your header_image code includes an errant period just after the closing parenthesis.&nbsp; {{header_image=[Warhammer]( <a href="https://i.imgur.com/W7ceUKN.png" rel="nofollow">https://i.imgur.com/W7ceUKN.png</a>) }} This part;&nbsp; ) }} not sure if you intended to include that or not, but it would add a period immediately&nbsp;after your image. try using; {{header_image=[Quarterstaff](<a href="https://i.imgur.com/m6GjZAB.png" rel="nofollow">https://i.imgur.com/m6GjZAB.png</a>)}} example; I just added it to the end of macro-text as a test Also, you can include an image in the subtitle area {{subtitle=[Quarterstaff](<a href="https://i.imgur.com/m6GjZAB.png" rel="nofollow">https://i.imgur.com/m6GjZAB.png</a>)}} and even within your Descriptions using just&nbsp;[Quarterstaff](<a href="https://i.imgur.com/m6GjZAB.png" rel="nofollow">https://i.imgur.com/m6GjZAB.png</a>)
If I put it in subtitle I get this: If I copy and paste what you said to try using nothing shows up at all: If I put it in character name it shows like this: If I put it in name it shows like this: If I put it in description it shows like this: I'm really stumped here because if I use it in macros I've written from scratch like this one: &nbsp;&{template:pf_generic} {{header_image=[Magic Missile](<a href="https://i.imgur.com/m6GjZAB.png" rel="nofollow">https://i.imgur.com/m6GjZAB.png</a>)}} {{name=@{selected|character_name} Magic Missile}} {{Damage Type: Force}} {{Damage:[[1d4+1]]}} /fx beam-magic @{target|Caster|token_id} @{target|Foe|token_id} !sfx song:MagicMissile action:play unique:true volume:100 It shows up just fine:
Vince could you possibly share your entire attack macro for a weapon that includes crit chance / damage and see if I can try that with header_image to see if it works for me?
1525325572

Edited 1525327687
vÍnce
Pro
Sheet Author
Kastion said: Vince could you possibly share your entire attack macro for a weapon that includes crit chance / damage and see if I can try that with header_image to see if it works for me? I just added your snippet to the end of my attack's Full macro.&nbsp; Is this where you are adding it as well? @{PC-Whisper} &{template:pf_attack} @{toggle_attack_accessible} @{toggle_rounded_flag} {{color=@{rolltemplate_color}}} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{subtitle}} {{name=@{name}}} {{attack=[[ 1d20cs&gt;[[ @{crit-target} ]] + @{attack_macro} ]]}} {{damage=[[@{damage-dice-num}d@{damage-die} + @{damage_macro}]]}} {{crit_confirm=[[ 1d20 + @{attack_macro} + [[ @{crit_conf_mod} ]] ]]}} {{crit_damage=[[ [[ @{damage-dice-num} * (@{crit-multiplier} - 1) ]]d@{damage-die} + ((@{damage_macro}) * [[ @{crit-multiplier} - 1 ]]) ]]}} {{type=@{type}}} {{weapon_notes=@{notes}}} @{iterative_attacks} @{macro_options} {{vs=@{vs}}} {{vs@{vs}=@{vs}}} {{precision_dmg1=@{precision_dmg_macro}}} {{precision_dmg1_type=@{precision_dmg_type}}} {{precision_dmg2=@{global_precision_dmg_macro}}} {{precision_dmg2_type=@{global_precision_dmg_type}}} {{critical_dmg1=@{critical_dmg_macro}}} {{critical_dmg1_type=@{critical_dmg_type}}} {{critical_dmg2=@{global_critical_dmg_macro}}} {{critical_dmg2_type=@{global_critical_dmg_type}}} {{attack1name=@{iterative_attack1_name}}} {{header_image=[Quarterstaff](<a href="https://i.imgur.com/m6GjZAB.png" rel="nofollow">https://i.imgur.com/m6GjZAB.png</a>)}} I think I know your issue: MAKE SURE YOU ARE NOT USING SIMPLE TEMPLATES on attacks.&nbsp; Header images will not work if you choose simple templates. ;-)&nbsp; Check Settings|Accessibility and uncheck "Use Attack Simple Templates"&nbsp; same for spells if you want to use header images.
1525344393

Edited 1525345315
MyRoll20Stuffs
API Scripter
That's what it was Vince! I went into game settings and turned it off globably now I just need to turn it off manually on every currently existing character sheet. Getting one odd effect from this though. It tries to underline the name of the NPC with a link to it in the journal but when I use a header image it only underlines part of it. Is there a setting I can turn off so it doesn't link the name to a journal entry? EDIT: Found out how to remove that function by removing&nbsp;{{character_id=@{character_id}}}
It works swimmingly now thank you again Vince for figuring this out for me! Now I just have 150 or so character sheets to go through (maybe even as many as 200 I've lost count) and modify all the macros.
1525378286
GiGs
Pro
Sheet Author
API Scripter
Since you're a pro user, you can install ChatSetAttr, and change that setting to all characters at once with a command. Just find out what the attribute on the character sheet is called, and the value it needs, and enter in chat !setattr --all --ATTRIBUTE|VALUE and wait a few seconds. (Also: good idea to make a backup of your campaign first in case you enter the wrong attribute or value.)
G G said: Since you're a pro user, you can install ChatSetAttr, and change that setting to all characters at once with a command. Just find out what the attribute on the character sheet is called, and the value it needs, and enter in chat !setattr --all --ATTRIBUTE|VALUE and wait a few seconds. (Also: good idea to make a backup of your campaign first in case you enter the wrong attribute or value.) Thanks GG. I already have ChatSetAttr and that's good to know I can set a value on all sheets at once but in this instance I am adding header image / SFX / VFX to every sheets attacks so I'll be going through the sheets anyways so might as well do it manually.